|
@@ -1,9 +1,10 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view>
|
|
<view>
|
|
|
- <view class="image-container" @click="upload">
|
|
|
|
|
|
|
+ <view class="image-container" @click="selectShow = true">
|
|
|
<view class="cuIcon-roundaddfill theme-color" style="font-size: 80upx;padding: 100upx 0 30upx 0;"></view>
|
|
<view class="cuIcon-roundaddfill theme-color" style="font-size: 80upx;padding: 100upx 0 30upx 0;"></view>
|
|
|
<view class="text-black text-bold text-sm">添加图片或视频</view>
|
|
<view class="text-black text-bold text-sm">添加图片或视频</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <u-action-sheet :list="list" @click="upload" v-model="selectShow"></u-action-sheet>
|
|
|
<view class="basic-container">
|
|
<view class="basic-container">
|
|
|
<view class="padding-sm">
|
|
<view class="padding-sm">
|
|
|
<text class="cuIcon-titles theme-color" style="font-size: 36upx;"></text>
|
|
<text class="cuIcon-titles theme-color" style="font-size: 36upx;"></text>
|
|
@@ -50,6 +51,12 @@
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
detail:{},
|
|
detail:{},
|
|
|
|
|
+ selectShow: false,
|
|
|
|
|
+ list: [{
|
|
|
|
|
+ text: '上传图片'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ text: '上传视频'
|
|
|
|
|
+ }],
|
|
|
current: 0,
|
|
current: 0,
|
|
|
classification: [],
|
|
classification: [],
|
|
|
name: '',
|
|
name: '',
|
|
@@ -61,14 +68,16 @@
|
|
|
this.getActivityDetail(options.activityId);
|
|
this.getActivityDetail(options.activityId);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- upload(){
|
|
|
|
|
- this.$mpi.uploadFile().then(res=>{
|
|
|
|
|
- console.log(res.data);
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ upload(index) {
|
|
|
|
|
+ console.log(index);
|
|
|
|
|
+ // this.$mpi.uploadFile().then(res => {
|
|
|
|
|
+ // let obj = JSON.parse(res);
|
|
|
|
|
+ // console.log(res.data);
|
|
|
|
|
+ // })
|
|
|
},
|
|
},
|
|
|
getActivityDetail(id) {
|
|
getActivityDetail(id) {
|
|
|
this.$u.api.activity.detail({id: id}).then(res => {
|
|
this.$u.api.activity.detail({id: id}).then(res => {
|
|
|
- this.detail=res
|
|
|
|
|
|
|
+ this.detail = res
|
|
|
this.classification = res.classification.split(',');
|
|
this.classification = res.classification.split(',');
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|