diff --git a/app.json b/app.json index b4ae20d..06d4421 100644 --- a/app.json +++ b/app.json @@ -87,23 +87,23 @@ "pages/template/index", "pages/store/index" ], - + "plugins": { + "live-player-plugin": { + "version": "1.1.1", + "provider": "wx2b03c6e691cd7370" + } + }, "subPackages": [{ "root": "packageA/", "name":"pack1", - "pages": [ - "pages/liveStream/liveStream", + "pages": [ "pages/prom_list/prom_list", "pages/quan_list/quan_list", "pages/quan_pro/quan_pro", + "pages/liveStream/liveStream", "pages/liveStreamDetails/liveStreamDetails" - ], - "plugins": { - "live-player-plugin": { - "version": "1.0.13", - "provider": "wx2b03c6e691cd7370" - } - } + ] + }], "permission": { diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js index 7f4bcb7..b5f9507 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.js +++ b/components/diy_goodsGroup/diy_goodsGroup.js @@ -83,39 +83,10 @@ Component({ }, pageLifetimes: { + //游客登陆后,只要更新卡的情况 show: function () { - this.data.firist_type_curr=0, - this.data.currentPage=1, - this.setData({ goods_array: null}) - - // 页面被展示 - // 在组件实例进入页面节点树时执行 - this.data.classstyle_id = this.data.object.classstyle; - this.data.goodscount = this.data.object.goodscount; - this.data.wgroup = this.data.object.wgroup; - - this.setData({ - classstyle_id: this.data.object.classstyle - }) - if (this.data.object.goodsclass == 1) { - this.data.is_recommend = 1 - } - if (this.data.object.goodsclass == 2) { - this.data.is_hot = 1 - } - if (this.data.object.goodsclass == 3) { - this.data.is_new = 1 - } - this.data.requestData = new Array(); - //---将数组--- - this.data.g_id = this.data.object.data; - var arr = []; - for (var i = 0; i < this.data.g_id .length; i += this.data.goodscount) { - arr.push(this.data.g_id .slice(i, i + this.data.goodscount)); - } - - this.data.firist_type_data = arr; - this.init(this.data.classstyle_id, this.data.wgroup); + //--初始化卡类-- + this.card_init(); }, }, @@ -178,16 +149,18 @@ Component({ break; case "2": var item = {}; + var r_data={ + store_id: os.stoid , + pageSize: th.data.goodscount, + page: th.data.currentPage, + isonsale: 1, + }; + if(th.data.is_recommend) r_data.is_recommend=th.data.is_recommend; + if(th.data.is_hot) r_data.is_hot=th.data.is_hot; + if(th.data.is_new) r_data.is_new=th.data.is_new; + app.request.promiseGet("/api/weshop/goods/page", { - data: { - store_id: os.stoid , - is_recommend: th.data.is_recommend, - is_hot: th.data.is_hot, - is_new: th.data.is_new, - pageSize: th.data.goodscount, - page: th.data.currentPage, - isonsale: 1, - } + data:r_data }).then(res => { //商品地址 var goods = res.data.data.pageData; diff --git a/components/diy_searchbox/diy_searchbox.wxml b/components/diy_searchbox/diy_searchbox.wxml index cb77060..2ce8ff1 100644 --- a/components/diy_searchbox/diy_searchbox.wxml +++ b/components/diy_searchbox/diy_searchbox.wxml @@ -10,7 +10,7 @@ - + @@ -26,7 +26,7 @@ - 在店铺内搜索 + 在店铺内搜索 diff --git a/components/goods_list/goods_list.js b/components/goods_list/goods_list.js index 60e5404..b436a56 100644 --- a/components/goods_list/goods_list.js +++ b/components/goods_list/goods_list.js @@ -23,6 +23,13 @@ Component({ }, ready: function () { }, + pageLifetimes:{ + //要处理一下,游客登陆后的界面的变化,主要还该是改变会员 + show: function () { + this.init(); + } + }, + methods: { init: function () { var th = this; diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index 05050b3..1e0becd 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -239,7 +239,7 @@ Page({ } } } else { - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); + getApp().my_warnning(res.data.msg, 0, th); return false; } } @@ -283,6 +283,7 @@ Page({ _this2.setData({ giftDate: res.data.data.endTime, + giftStart: res.data.data.starTime, giftPosPrice: res.data.data.giftPosPrice, giftQty: res.data.data.giftQty, giftIntegral: res.data.data.payIntegral, @@ -293,7 +294,7 @@ Page({ isStart:isStart, }) } else { - getApp().my_warnning("系统繁忙,请稍后再试", 0, _this2); + getApp().my_warnning(res.data.msg, 0, _this2); return false; } } @@ -337,7 +338,6 @@ Page({ }, "put" - ) }, diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxml b/pages/giftpack/giftpacklist/giftpacklist.wxml index de8a720..70208c2 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.wxml +++ b/pages/giftpack/giftpacklist/giftpacklist.wxml @@ -7,8 +7,18 @@ {{giftTitle}} - {{"兑换截至时间:"+giftDate}} - {{"活动结束至时间:"+giftDate}} + + + {{"活动开始时间:"+giftStart}} + + + + {{"兑换结束时间:"+giftDate}} + + {{"活动结束时间:"+giftDate}} + + + @@ -100,29 +110,39 @@ - - - - - 立即购买 - - - - - 立即兑换 - - - - - 立即购买 - - - - - 立即兑换 - - - + + + + + + 立即购买 + + + + + 立即兑换 + + + + + 立即购买 + + + + + 立即兑换 + + + + + + + + 活动还未开始 + + + + diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxss b/pages/giftpack/giftpacklist/giftpacklist.wxss index 26e7cbb..958233b 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.wxss +++ b/pages/giftpack/giftpacklist/giftpacklist.wxss @@ -245,5 +245,5 @@ page.data-v-3a5b7e36 { background-color: rgb(153,153,153); } -.foot_button_left.data-v-3a5b7e36.gray{ background-color: #aaa; } -.foot_button_right.data-v-3a5b7e36.gray{ background-color: #aaa;} +.foot_button_intalge.data-v-3a5b7e36.gray{ background-color: #aaa; } + diff --git a/pages/index/index/index.js b/pages/index/index/index.js index faf1e5c..89efc1a 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -76,7 +76,7 @@ Page({ }, - onLoad: function() { + onLoad: async function() { var th = this; //看一下商家是否开通了权益 //--初始化是否有打勾-- @@ -92,26 +92,11 @@ Page({ }); } }) - - - }, - //关闭新用户领取广告 - close_disgraceful: function() { - var th = this; - th.setData({ - is_disgraceful: 0 - }) - }, - async onShow() { - - var th = this - //调用底部导航 getApp().globalData.url=th.data.url t.editTabBar(th,o.stoid,th.data.url); - await this.init_load(); //显示的时候要开启计时器 this.data.is_timer = 1; @@ -119,16 +104,16 @@ Page({ if (this.data.isTemplate) { //---先获取会员--- t.getUserFir(function() { - th.is_festival(); - var new_nav = th.data.new_nav; - if (new_nav == "") { - th.is_new(); - } - setTimeout(function () { - if (getApp().globalData.user_id) getApp().requestCardNum(th); - },500) - - }); + th.is_festival(); + var new_nav = th.data.new_nav; + if (new_nav == "") { + th.is_new(); + } + setTimeout(function () { + if (getApp().globalData.user_id) getApp().requestCardNum(th); + },500) + + }); } else { await this.init_fir(); wx.setNavigationBarColor({ @@ -168,12 +153,25 @@ Page({ }).then(res => { if (res.data.data) { var gd_category = res.data.data.pageData; - th.setData({ gd_category: gd_category }); } }) + + + + }, + //关闭新用户领取广告 + close_disgraceful: function() { + var th = this; + th.setData({ + is_disgraceful: 0 + }) + }, + + async onShow() { + var th = this }, //当隐藏的时候就关闭计时器 onHide: function() { @@ -185,6 +183,7 @@ Page({ clearInterval(i); } + }, //同步初始加载 @@ -469,13 +468,12 @@ Page({ this.data.timer && (clearInterval(this.data.timer), this.data.timer = null); }, onPageScroll: function(e) { - this.setData({ - scrollTop: e.scrollTop - }); + this.data.scrollTop=e.scrollTop; + + var t = getCurrentPages(); "pages/index/index/index" == t[t.length - 1].route; - /*-- - && (e.scrollTop > 10 ? wx.setNavigationBarColor({ + /*--(e.scrollTop > 10 ? wx.setNavigationBarColor({ frontColor: "#ffffff", backgroundColor: "#f95959" }) : wx.setNavigationBarColor({ @@ -829,5 +827,4 @@ Page({ }) } - }); \ No newline at end of file diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index 73cd56c..0d6c695 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -249,7 +249,7 @@ - + diff --git a/pages/index/index/index.wxss b/pages/index/index/index.wxss index 087b2b7..e3f1467 100644 --- a/pages/index/index/index.wxss +++ b/pages/index/index/index.wxss @@ -9,6 +9,7 @@ width: 100%; height: 88rpx; z-index: 10; + background-color: #ff7295; } .classify-img { diff --git a/pages/template/index.js b/pages/template/index.js index 28870d2..bfbc70d 100644 --- a/pages/template/index.js +++ b/pages/template/index.js @@ -45,6 +45,11 @@ Page({ var data = res.data.data; if (data) { var temp_data = data; + + wx.setNavigationBarTitle({ + title: temp_data.page_title, + }); + var t_arr = JSON.parse(temp_data.json_str); th.setData({ template_arr: t_arr, @@ -63,9 +68,7 @@ Page({ } }) - wx.setNavigationBarTitle({ - title: '模板预览', - }); + },