This commit is contained in:
2020-07-24 08:57:03 +08:00
parent 78f63eb990
commit 52bbaf55e1
4 changed files with 192 additions and 11 deletions

View File

@@ -19,16 +19,16 @@
<u-form-item label-position="right">
<u-input v-model="form.text" placeholder="请填写直播简介" />
</u-form-item>
<view class="values"><text>{{max_two}}</text>/20</view>
<u-form-item label-position="right">
<u-input v-model="form.values" placeholder="我的售货袋" />
<view class="rightes" @click="navto('selectshop')">售货袋</view>
<view class="values"><text>{{20 - form.text.length}}</text>/20</view>
<u-form-item label-position="right" >
<u-input v-model="form.values" placeholder="我的售货袋" @click="navto('selectshop')"/>
<view class="rightes" @click="navto('selectshop')">售货袋</view>
</u-form-item>
</u-form>
<!-- 标签的引入 -->
<tap_tosign :fileListes="fileListes" @chuangjian="chuangjian" @qiehuan="qiehuan"></tap_tosign>
<view class="titles">直播封面图</view>
<u-upload :form-data="{'name':'article_cover'}" action='https://dmmall.sdbairui.com/storeapi/Upload/uploadFile' name="article_cover" :max-count="1" :show-progress="false" :before-upload="tupian" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
<u-upload :form-data="{'name':'article_cover'}" action='https://dmmall.sdbairui.com/storeapi/Upload/uploadFile' name="article_cover" :max-count="1" :show-progress="false" @on-change="tupian" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
</view>
<view class="button-uview">
<u-button @click="kaibo">{{relerest}}</u-button>
@@ -49,16 +49,18 @@
form: {
name: '',
intro: '',
sex: ''
sex: '',
text:''
},
value: '',
max_two : '20',
max : '优秀的标题可以卖的更好哦~',
max : '',
titleMaxLength : '20',
show: false,
relerest: '开始直播',
fileListes:[],
rSelect:[]
rSelect:[],
image:""
};
},
methods: {
@@ -88,7 +90,8 @@
this.init()
},
tupian(a){
console.log(a)
console.log(JSON.parse(a.data).data)
this.image = JSON.parse(a.data).data.file_name
},
navto(url){
this.$u.route({
@@ -101,7 +104,15 @@
live_desc:this.form.text,
spec:this.rSelect.join(","),
goods_id:uni.getStorageSync("gouwudai"),
cover_img:this.image
}).then((res)=>{
console.log(res)
this.$u.route({
url:"/pages/release/zhibo",
params:{
url:res.data.url.replace("&","*")
}
})
})
},
init(){
@@ -124,6 +135,7 @@
},
onLoad(){
this.init()
uni.removeStorageSync('gouwudai')
}
};
</script>