直播需要修改接口

This commit is contained in:
luyuan 2020-07-21 19:50:26 +08:00
parent d04146d479
commit 9838aab5f4
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
4 changed files with 22 additions and 5 deletions

View File

@ -15,6 +15,9 @@ const install = (Vue, vm) => {
}, },
getStoreGoodsList(){ getStoreGoodsList(){
return vm.$u.post("article/getStoreGoodsList") return vm.$u.post("article/getStoreGoodsList")
},
createChatRoom({chat_name,live_desc,spec,goods_id,cover_img}){
return vm.$u.post("Streaming/createChatRoom",{chat_name,live_desc,spec,goods_id,cover_img})
} }
} }
// 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下 // 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下

View File

@ -52,6 +52,7 @@
} else { } else {
this.rSelect.splice(this.rSelect.indexOf(e), 1); // this.rSelect.splice(this.rSelect.indexOf(e), 1); //
} }
this.$emit("qiehuan",this.rSelect)
}, },
chuangjian(){ chuangjian(){
this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{ this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{

View File

@ -37,7 +37,7 @@ export default {
}, },
jiaru(){ jiaru(){
let that = this let that = this
uni.setStorageSync("gouwudai",JSON.stringify(that.sele)) uni.setStorageSync("gouwudai",that.sele.join(","))
this.$u.route({ this.$u.route({
type:"back", type:"back",
delta:1 delta:1

View File

@ -26,12 +26,12 @@
</u-form-item> </u-form-item>
</u-form> </u-form>
<!-- 标签的引入 --> <!-- 标签的引入 -->
<tap_tosign :fileListes="fileListes" @chuangjian="chuangjian"></tap_tosign> <tap_tosign :fileListes="fileListes" @chuangjian="chuangjian" @qiehuan="qiehuan"></tap_tosign>
<view class="titles">直播封面图</view> <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" :before-upload="tupian" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
</view> </view>
<view class="button-uview"> <view class="button-uview">
<u-button>{{relerest}}</u-button> <u-button @click="kaibo">{{relerest}}</u-button>
</view> </view>
</view> </view>
</view> </view>
@ -57,8 +57,8 @@
titleMaxLength : '20', titleMaxLength : '20',
show: false, show: false,
relerest: '开始直播', relerest: '开始直播',
fileListes:[] fileListes:[],
rSelect:[]
}; };
}, },
methods: { methods: {
@ -79,6 +79,10 @@
}, },
loading() { loading() {
},
qiehuan(a){
// console.log(a)
this.rSelect = a
}, },
chuangjian(){ chuangjian(){
this.init() this.init()
@ -91,6 +95,15 @@
url:"/pages/release/" + url url:"/pages/release/" + url
}) })
}, },
kaibo(){
this.$u.api.createChatRoom({
chat_name:this.max,
live_desc:this.form.text,
spec:this.rSelect.join(","),
goods_id:uni.getStorageSync("gouwudai"),
})
},
init(){ init(){
this.$u.api.getLiveSpec().then((res)=>{ this.$u.api.getLiveSpec().then((res)=>{
console.log(res) console.log(res)