直播的修改

This commit is contained in:
luyuan 2020-07-17 09:49:42 +08:00
parent feb2b358e1
commit 4bade07d14
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
6 changed files with 82 additions and 26 deletions

View File

@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name:"shop-item",
data(){
return {
}
}
}
</script>

View File

@ -15,8 +15,10 @@
<view class="u-inputes">
<u-input v-model="form.name" />
</view>
<u-button class="custom-style-button" shape="circle" size="default">确定</u-button>
<u-button class="custom-style-button" shape="circle" size="default" @click="chuangjian">确定</u-button>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
@ -50,6 +52,24 @@
} else {
this.rSelect.splice(this.rSelect.indexOf(e), 1); //
}
},
chuangjian(){
this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{
if(res.errCode != 0){
this.$refs.uToast.show({
title: res.message,
type: 'error'
})
}else{
this.show_add()
this.$refs.uToast.show({
title: res.message,
type: 'success'
})
this.$emit("chuangjian")
}
})
}
}
}

11
main.js
View File

@ -20,14 +20,3 @@ import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
app.$mount()
// http拦截器将此部分放在new Vue()和app.$mount()之间才能App.vue中正常使用
import httpInterceptor from '@/common/http.interceptor.js'
Vue.use(httpInterceptor, app)
// http接口API集中管理引入部分
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
app.$mount()

View File

@ -177,13 +177,6 @@ export default {
name: e[1].label
}
},
//
release(){
// uni.navigateTo({
// url: '/pages/release/tosign'
// });
this.publishstate = true
},
tabsChange(index) {
this.swiperCurrent = index;
},

View File

@ -0,0 +1,32 @@
<template>
<view class="selectshop">
<view class="title">我的商品</view>
</view>
</template>
<script>
export default {
name:"selectshop",
data(){
return {
}
},
methods:{
},
onLoad(){
}
}
</script>
<style lang="scss" scoped>
.selectshop{
padding: 15rpx 30rpx;
.title{
color: #FF780F;
font-size: 30rpx;
font-weight: 400;
}
}
</style>

View File

@ -26,9 +26,9 @@
</u-form-item>
</u-form>
<!-- 标签的引入 -->
<tap_tosign :fileListes="fileListes"></tap_tosign>
<tap_tosign :fileListes="fileListes" @chuangjian="chuangjian"></tap_tosign>
<view class="titles">直播封面图</view>
<u-upload :max-count="1" :show-progress="true" 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 class="button-uview">
<u-button>{{relerest}}</u-button>
@ -71,7 +71,7 @@
// console.log(e);
},
mask_u() {
this.show = !this.show
},
//
getCode() {
@ -79,6 +79,18 @@
},
loading() {
},
chuangjian(){
this.init()
},
tupian(a){
console.log(a)
},
init(){
this.$u.api.getLiveSpec().then((res)=>{
console.log(res)
this.fileListes = res.data
})
}
},
components: {
@ -92,10 +104,7 @@
}
},
onLoad(){
this.$u.api.getLiveSpec().then((res)=>{
console.log(res)
this.fileListes = res.data
})
this.init()
}
};
</script>