diff --git a/common/http.api.js b/common/http.api.js
index 556c5ba..0279728 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -12,6 +12,12 @@ const install = (Vue, vm) => {
},
createLivesp({spec_name}){
return vm.$u.post("Streaming/createLivesp",{spec_name})
+ },
+ 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)下
diff --git a/components/release/shop-item.vue b/components/release/shop-item.vue
new file mode 100644
index 0000000..7f41cd7
--- /dev/null
+++ b/components/release/shop-item.vue
@@ -0,0 +1,71 @@
+
+
+
+ {{title}}
+
+ {{price}}
+ 销量:{{num}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/release/tap_tosign.vue b/components/release/tap_tosign.vue
index c543dc0..484a79f 100644
--- a/components/release/tap_tosign.vue
+++ b/components/release/tap_tosign.vue
@@ -5,7 +5,7 @@
标签
+ 新建标签
{{item.spec_name}}
+ :key="index">{{item.name}}
@@ -15,8 +15,10 @@
- 确定
+ 确定
+
+
@@ -50,6 +52,25 @@
} else {
this.rSelect.splice(this.rSelect.indexOf(e), 1); //取消
}
+ this.$emit("qiehuan",this.rSelect)
+ },
+ 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")
+ }
+ })
+
}
}
}
diff --git a/main.js b/main.js
index 4271103..ff7a4ee 100644
--- a/main.js
+++ b/main.js
@@ -19,4 +19,4 @@ Vue.use(httpInterceptor, app)
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
-app.$mount()
+app.$mount()
diff --git a/pages.json b/pages.json
index b5918d2..d636b7a 100644
--- a/pages.json
+++ b/pages.json
@@ -195,6 +195,18 @@
}
}
}
+ },
+ {
+ "path": "pages/release/selectshop",
+ "style": {
+ "navigationBarTitleText": "选择商品",
+ "app-plus": {
+ "titleNView": {
+ "backgroundColor": "#2D2D2D",
+ "titleColor": "#FFFFFF"
+ }
+ }
+ }
}
],
"globalStyle": {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 24e55a2..08b2f6d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -167,6 +167,9 @@ export default {
},
methods: {
+ release(){
+ this.publishstate = true
+ },
publish(){
},
@@ -177,13 +180,6 @@ export default {
name: e[1].label
}
},
- // 发布页面跳转
- release(){
- // uni.navigateTo({
- // url: '/pages/release/tosign'
- // });
- this.publishstate = true
- },
tabsChange(index) {
this.swiperCurrent = index;
},
diff --git a/pages/release/selectshop.vue b/pages/release/selectshop.vue
new file mode 100644
index 0000000..76d78d7
--- /dev/null
+++ b/pages/release/selectshop.vue
@@ -0,0 +1,89 @@
+
+
+ 我的商品
+
+
+
+
+
+ 加入售货袋
+
+
+
+
\ No newline at end of file
diff --git a/pages/release/tosign.vue b/pages/release/tosign.vue
index 77e05ce..c484075 100644
--- a/pages/release/tosign.vue
+++ b/pages/release/tosign.vue
@@ -22,16 +22,16 @@
{{max_two}}/20
- 售货袋
+ 售货袋
-
+
直播封面图
-
+
- {{relerest}}
+ {{relerest}}
@@ -57,8 +57,8 @@
titleMaxLength : '20',
show: false,
relerest: '开始直播',
- fileListes:[]
-
+ fileListes:[],
+ rSelect:[]
};
},
methods: {
@@ -71,7 +71,7 @@
// console.log(e);
},
mask_u() {
- this.show = !this.show
+
},
// 获取验证码倒计时
getCode() {
@@ -79,6 +79,37 @@
},
loading() {
+ },
+ qiehuan(a){
+ // console.log(a)
+ this.rSelect = a
+ },
+ chuangjian(){
+ this.init()
+ },
+ tupian(a){
+ console.log(a)
+ },
+ navto(url){
+ this.$u.route({
+ 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(){
+ this.$u.api.getLiveSpec().then((res)=>{
+ console.log(res)
+ this.fileListes = res.data
+ })
+
}
},
components: {
@@ -92,10 +123,7 @@
}
},
onLoad(){
- this.$u.api.getLiveSpec().then((res)=>{
- console.log(res)
- this.fileListes = res.data
- })
+ this.init()
}
};