diff --git a/components/diy_seckill/diy_seckill.js b/components/diy_seckill/diy_seckill.js
index 4c67c3f..0e858a4 100644
--- a/components/diy_seckill/diy_seckill.js
+++ b/components/diy_seckill/diy_seckill.js
@@ -57,6 +57,7 @@ Component({
var item = {};
goodsidlist+=val.goodsid+",";
})
+ goodsidlist=ut.sub_last(goodsidlist);
//--调用接口,读取秒杀--
app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id="
diff --git a/components/goods_list/goods_list.js b/components/goods_list/goods_list.js
index 3fe92f1..60e5404 100644
--- a/components/goods_list/goods_list.js
+++ b/components/goods_list/goods_list.js
@@ -146,16 +146,17 @@ Component({
var card_name_map = new Map();
var user = getApp().globalData.userInfo;
-
- for (var i = 0; i < plusCard.length; i++) {
- if ((user.card_field==null || user.card_field=="") && (plusCard[i].IsStopBuy==true)) {
- continue;
+ if(plusCard) {
+ for (var i = 0; i < plusCard.length; i++) {
+ if (user && (user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) {
+ continue;
+ }
+ var name = "card" + plusCard[i].CorrPrice.toLowerCase();
+ card_name_map.set(name, plusCard[i].CardName);
+ new_arr.push(plusCard[i]);
+
+
}
- var name = "card" + plusCard[i].CorrPrice.toLowerCase();
- card_name_map.set(name, plusCard[i].CardName);
- new_arr.push(plusCard[i]);
-
-
}
var ob = {
"card_list": new_arr,
diff --git a/components/goods_list/goods_list.wxss b/components/goods_list/goods_list.wxss
index 2814822..0c7f8dc 100644
--- a/components/goods_list/goods_list.wxss
+++ b/components/goods_list/goods_list.wxss
@@ -1,5 +1,6 @@
.collects {
margin-top: 40rpx;
+ margin-bottom: 40rpx;
}
.ib {
diff --git a/components/my_confirm/my_confirm.js b/components/my_confirm/my_confirm.js
index de6129e..dd401fb 100644
--- a/components/my_confirm/my_confirm.js
+++ b/components/my_confirm/my_confirm.js
@@ -29,10 +29,13 @@ Component({
})
},
go_sure: function() {
- this.data.success();
+ this.setData({ yu_e_show: 0})
+ if(this.data.success) this.data.success();
+
},
go_cancle: function() {
- this.data.cancle();
+ this.setData({ yu_e_show: 0})
+ if(this.data.cancle) this.data.cancle();
},
close_yu_e: function() {
this.setData({
diff --git a/components/my_confirm/my_confirm.wxml b/components/my_confirm/my_confirm.wxml
index 00f519b..d82fc15 100644
--- a/components/my_confirm/my_confirm.wxml
+++ b/components/my_confirm/my_confirm.wxml
@@ -4,7 +4,7 @@
ⅹ
- {{title}}
+ {{title}}
{{s_text}}
{{c_text}}
diff --git a/components/my_confirm/my_confirm.wxss b/components/my_confirm/my_confirm.wxss
index aa124ba..f05f462 100644
--- a/components/my_confirm/my_confirm.wxss
+++ b/components/my_confirm/my_confirm.wxss
@@ -40,7 +40,7 @@
}
.xc-qr-frame{
width:560rpx;
- height: 280rpx;
+ min-zoom: 280rpx;
background: #fff;
z-index: 55;
position: fixed;
diff --git a/packageA/pages/prom_list/prom_list.js b/packageA/pages/prom_list/prom_list.js
index f563d5a..450ce8e 100644
--- a/packageA/pages/prom_list/prom_list.js
+++ b/packageA/pages/prom_list/prom_list.js
@@ -43,8 +43,20 @@ Page({
//------初始化加载----------
onLoad: function(t) {
var goods_id=t.goods_id;
- this.setData({gid:goods_id});
+ this.setData({gid:goods_id});
var ee=this,th=ee,that=ee;
+ var first_leader=t.first_leader;
+ if(first_leader){
+ getApp().globalData.first_leader=first_leader;
+ //调用接口判断是不是会员
+ getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
+ if(res.data.code==0){
+ getApp().globalData.guide_id=res.data.data.id;
+ }
+ })
+ }
+
+
//----获取系统参数,并判断等级价格-----
getApp().getConfig2(function(e) {
var json_d = JSON.parse(e.switch_list);
@@ -216,7 +228,7 @@ Page({
//--- 判断是等级会员,且在有效期范围内 ---
if(user.card_field && now5) card_name=card_name.substring(0,5);
+ if(card_name && card_name.length>5) card_name=card_name.substring(0,5);
th.setData({card_field:user.card_field,card_name:card_name});
if(t.data.data[user.card_field]>0) t.data.data.shop_price=t.data.data[user.card_field];
}
@@ -323,7 +335,6 @@ Page({
a = 0,
o = this.data.data;
a = o.goods_id;
-
//----------添加到购物车时,要判断限购数量,--------
e.get_buy_num(o, function(ee) {
//---判断商品是否超出限购---
@@ -383,6 +394,14 @@ Page({
}
}
+ //如果有导购ID的话
+ if(newd['guide_id'] && th.data.sele_collocation){
+ for(var jj in th.data.sele_collocation ){
+ th.data.sele_collocation[jj]['guide_id']=newd['guide_id'];
+ th.data.sele_collocation[jj]['guide_type']=newd['guide_type'];
+ }
+ }
+
//-----如果是秒杀,团购,积分购,拼团-----
if (th.data.data.prom_type != 5) {
@@ -626,22 +645,25 @@ Page({
//--点击分享事件---
onShareAppMessage: function(t) {
- var th = this;
- var price = th.data.data.shop_price;
- if (th.data.prom_act) {
- price = th.data.prom_act.price;
- }
- var title= th.data.data.goods_name;
- var img=th.data.data.original_img;
- if(th.data.prom_type==6){
- title=th.data.prom_act.share_title;
- img=th.data.iurl+th.data.prom_act.share_imgurl;
- }
+ var curPage=this;
+ var pagePath = curPage.route; //当前页面url
+ if (pagePath.indexOf('/') != 0) {
+ pagePath = '/' + pagePath;
+ }
+ if(getApp().globalData.user_id){
+ if(pagePath.indexOf("?")>0){
+ pagePath+="&goods_id="+this.data.gid+" &first_leader="+getApp().globalData.user_id;
+ }else{
+ pagePath+="?goods_id="+this.data.gid+"&first_leader="+getApp().globalData.user_id;
+ }
+ }
+
+ console.log("111");
+ console.log(pagePath);
return {
- title: price + "元 " +title,
- path: "/pages/goods/goodsInfo/goodsInfo?goods_id=" + th.data.gid,
- imageUrl: img,
+ title: "搭配购",
+ path: pagePath,
}
},
diff --git a/pages/activity/pind_list/pind_list.js b/pages/activity/pind_list/pind_list.js
index a3e37d2..ea1bb48 100644
--- a/pages/activity/pind_list/pind_list.js
+++ b/pages/activity/pind_list/pind_list.js
@@ -17,6 +17,24 @@ Page({
iurl: os.imghost,
},
+ //------初始化加载----------
+ onLoad: function(t) {
+ var first_leader = t.first_leader;
+
+ console.log("------------");
+ console.log(first_leader);
+
+ if (first_leader) {
+ getApp().globalData.first_leader = first_leader;
+ //调用接口判断是不是会员
+ getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
+ if (res.data.code == 0) {
+ getApp().globalData.guide_id = res.data.data.id;
+ }
+ })
+ }
+ },
+
onShow: function(t) {
wx.setNavigationBarTitle({ title: "天天拼单",})
@@ -126,12 +144,34 @@ Page({
this.reloadGoodList();
},
- //---------分享配置--------
- onShareAppMessage: function (e) {
- return {
- title: "限时团购",
- }
- },
+
+
+ //---------分享配置--------
+ onShareAppMessage: function (e) {
+ var curPage=this;
+ var pagePath = curPage.route; //当前页面url
+ if (pagePath.indexOf('/') != 0) {
+ pagePath = '/' + pagePath;
+ }
+ if(getApp().globalData.user_id){
+
+ if(pagePath.indexOf("?")>0){
+ pagePath+="&first_leader="+getApp().globalData.user_id;
+ }else{
+ pagePath+="?first_leader="+getApp().globalData.user_id;
+ }
+ }
+
+ console.log("11"+pagePath);
+
+ return {
+ title: "限时团购",
+ path:pagePath,
+ }
+ },
+
+
+
//图片失败,默认图片
bind_bnerr2: function (e) {
diff --git a/pages/activity/pind_list/pind_list.json b/pages/activity/pind_list/pind_list.json
index 47305b4..fe12943 100644
--- a/pages/activity/pind_list/pind_list.json
+++ b/pages/activity/pind_list/pind_list.json
@@ -1,3 +1,6 @@
{
- "navigationBarTitleText": "天天拼单"
+ "navigationBarTitleText": "天天拼单",
+ "usingComponents": {
+ "share_box": "/components/share_box/share_box"
+ }
}
\ No newline at end of file
diff --git a/pages/activity/pind_list/pind_list.wxml b/pages/activity/pind_list/pind_list.wxml
index e19716e..12741c4 100644
--- a/pages/activity/pind_list/pind_list.wxml
+++ b/pages/activity/pind_list/pind_list.wxml
@@ -84,4 +84,6 @@
没有相关内容
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/pages/activity/seckill_list/seckill_list.js b/pages/activity/seckill_list/seckill_list.js
index a669049..aa6e5e0 100644
--- a/pages/activity/seckill_list/seckill_list.js
+++ b/pages/activity/seckill_list/seckill_list.js
@@ -12,6 +12,26 @@ Page({
ismore:1, //是否可以加载更多
isshow:0,
},
+
+ //------初始化加载----------
+ onLoad: function(t) {
+ var first_leader = t.first_leader;
+
+ console.log("------------");
+ console.log(first_leader);
+
+ if (first_leader) {
+ getApp().globalData.first_leader = first_leader;
+ //调用接口判断是不是会员
+ getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
+ if (res.data.code == 0) {
+ getApp().globalData.guide_id = res.data.data.id;
+ }
+ })
+ }
+ },
+
+
onShow: function(t) {
wx.setNavigationBarTitle({ title: "商品秒杀",})
@@ -123,12 +143,31 @@ Page({
this.setData({type:a,goodlist:null});
this.reloadGoodList();
},
- //---------分享配置--------
- onShareAppMessage: function (e) {
- return {
- title: "疯狂秒杀",
- }
- },
+
+
+ //---------分享配置--------
+ onShareAppMessage: function (e) {
+ var curPage=this;
+ var pagePath = curPage.route; //当前页面url
+ if (pagePath.indexOf('/') != 0) {
+ pagePath = '/' + pagePath;
+ }
+ if(getApp().globalData.user_id){
+
+ if(pagePath.indexOf("?")>0){
+ pagePath+="&first_leader="+getApp().globalData.user_id;
+ }else{
+ pagePath+="?first_leader="+getApp().globalData.user_id;
+ }
+ }
+
+ console.log("11"+pagePath);
+ return {
+ title: "限时秒杀",
+ path:pagePath,
+ }
+ },
+
//图片失败,默认图片
bind_bnerr2: function (e) {
var _errImg = e.target.dataset.errorimg;
diff --git a/pages/activity/seckill_list/seckill_list.json b/pages/activity/seckill_list/seckill_list.json
index b6cce60..e533db3 100644
--- a/pages/activity/seckill_list/seckill_list.json
+++ b/pages/activity/seckill_list/seckill_list.json
@@ -1,3 +1,6 @@
{
- "navigationBarTitleText": "商品秒杀"
+ "navigationBarTitleText": "商品秒杀",
+ "usingComponents": {
+ "share_box": "/components/share_box/share_box"
+ }
}
\ No newline at end of file
diff --git a/pages/activity/seckill_list/seckill_list.wxml b/pages/activity/seckill_list/seckill_list.wxml
index c10ebd1..8de10eb 100644
--- a/pages/activity/seckill_list/seckill_list.wxml
+++ b/pages/activity/seckill_list/seckill_list.wxml
@@ -73,3 +73,5 @@
+
+
diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js
index c8fef47..6569fa0 100644
--- a/pages/cart/cart/cart.js
+++ b/pages/cart/cart/cart.js
@@ -145,102 +145,105 @@ Page({
carr = su.data.data.pageData;
var all_num = 0;
- for (var i = 0; i < carr.length; i++) {
- var item = carr[i];
- var good=null;
- await getApp().request.promiseGet("/api/weshop/goods/get/"+os.stoid+"/"+item.goods_id,{}).then(res=>{
- good=res.data.data;
- })
- var tt=ut.gettimestamp();
- //如果商品下架了,或者商品是赠品,一开始都要清除
- if((good.down_time>0 && good.down_time0) {
+ for (var i = 0; i < carr.length; i++) {
+ var item = carr[i];
+ var good = null;
+ await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + item.goods_id, {}).then(res => {
+ good = res.data.data;
+ })
+ var tt = ut.gettimestamp();
+ //如果商品下架了,或者商品是赠品,一开始都要清除
+ if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0 || item.is_gift) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {
- success: function(t) { }
+ success: function (t) {
+ }
});
//商品已经下架
continue;
- }
- //如果秒杀活动都去掉了,或者结束了,那么这个商品也没有必要留着
- if(item.prom_type==1){
- var prom=null;
- await getApp().request.promiseGet("/api/ms/flash_sale/get/"+os.stoid+"/"+item.prom_id,{
- }).then(res=>{
- if(res.data.code==0) prom=res.data.data;
- })
- //---如果有活动,不算在一起---
- if(!prom && prom.is_end==0 && prom.end_time>now && prom.start_time {
- if(res.data.code==0){
- var r_data=res.data.data;
- if(!r_data.promGoodsLists){
- var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
- a.delete(url, {});
- //商品已经下架
- isok=0;
- }
+ }
+ //如果秒杀活动都去掉了,或者结束了,那么这个商品也没有必要留着
+ if (item.prom_type == 1) {
+ var prom = null;
+ await getApp().request.promiseGet("/api/ms/flash_sale/get/" + os.stoid + "/" + item.prom_id, {}).then(res => {
+ if (res.data.code == 0) prom = res.data.data;
+ })
+ //---如果有活动,不算在一起---
+ if (!prom && prom.is_end == 0 && prom.end_time > now && prom.start_time < now) {
+ var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
+ a.delete(url, {
+ success: function (t) {
}
- else{
+ });
+ //商品已经下架
+ continue;
+ }
+ }
+ //--判断优惠活动有没有过期--
+ else if (item.prom_type == 3) {
+ var isok = 1;
+ await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + item.goods_id + "/1", {}).then(res => {
+ if (res.data.code == 0) {
+ var r_data = res.data.data;
+ if (!r_data.promGoodsLists) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
- a.delete(url, { });
+ a.delete(url, {});
//商品已经下架
- isok=0;
+ isok = 0;
}
+ } else {
+ var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
+ a.delete(url, {});
+ //商品已经下架
+ isok = 0;
+ }
})
- if(!isok) continue;
- }
+ if (!isok) continue;
+ }
- all_num += item.goods_num;
- item.original_img = oo.imghost + item.original_img;
- item.selected = 0;
+ all_num += item.goods_num;
+ item.original_img = oo.imghost + item.original_img;
+ item.selected = 0;
- var pcid = item.pick_id;
- var find = 0;
- //---------循环查找门店---
- if (arr.length > 0) {
- for (var j = 0; j < arr.length; j++) {
- if (arr[j].pid == pcid) {
- arr[j].goods.push(item);
- find = 1;
- break;
+ var pcid = item.pick_id;
+ var find = 0;
+ //---------循环查找门店---
+ if (arr.length > 0) {
+ for (var j = 0; j < arr.length; j++) {
+ if (arr[j].pid == pcid) {
+ arr[j].goods.push(item);
+ find = 1;
+ break;
+ }
}
}
- }
- //------如果没有找到-----
- if (find == 0) {
- var pikname = '';
- //找到门店名称
- for (var k = 0; k < th.data.allsto.length; k++) {
- if (pcid == th.data.allsto[k].pickup_id) {
- pikname = th.data.allsto[k].pickup_name;
- break;
+ //------如果没有找到-----
+ if (find == 0) {
+ var pikname = '';
+ //找到门店名称
+ for (var k = 0; k < th.data.allsto.length; k++) {
+ if (pcid == th.data.allsto[k].pickup_id) {
+ pikname = th.data.allsto[k].pickup_name;
+ break;
+ }
}
+ var narr = new Array();
+ narr.push(item);
+ var ie = {
+ pid: pcid,
+ pname: pikname,
+ goods: narr,
+ selected: 0
+ };
+ arr.push(ie);
}
- var narr = new Array();
- narr.push(item);
- var ie = {
- pid: pcid,
- pname: pikname,
- goods: narr,
- selected: 0
- };
- arr.push(ie);
}
}
+
if(arr.length==0) {
setTimeout(function () {
var goods_list = th.selectComponent("#goods_list"); //组件的id
@@ -1299,4 +1302,5 @@ Page({
getApp().goto(url);
}
+
});
\ No newline at end of file
diff --git a/pages/cart/cart/cart.wxml b/pages/cart/cart/cart.wxml
index 8744b68..76f395c 100644
--- a/pages/cart/cart/cart.wxml
+++ b/pages/cart/cart/cart.wxml
@@ -1,3 +1,6 @@
+
+
+
@@ -181,5 +184,3 @@
-
-
\ No newline at end of file
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index 1ba655c..be89d3a 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -1431,7 +1431,7 @@ Page({
goods.guide_id=gg.guide_id;
goods.guide_type=gg.guide_type;
//调用接口判断是不是会员
- await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+oo.stoid+"/"+gg.guide_id,{}).then(res=>{
+ await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/"+oo.stoid+"/"+gg.guide_id,{}).then(res=>{
if(res.data.code==0){
goods.guide_name=res.data.data.salesman;
goods.guide_sn=res.data.data.salesman_no;
@@ -1631,7 +1631,7 @@ Page({
goods.guide_id=g_item.guide_id;
goods.guide_type=g_item.guide_type;
//调用接口判断是不是会员
- await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+oo.stoid+"/"+g_item.guide_id,{}).then(res=>{
+ await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/"+oo.stoid+"/"+g_item.guide_id,{}).then(res=>{
if(res.data.code==0){
goods.guide_name=res.data.data.salesman;
goods.guide_sn=res.data.data.salesman_no;
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index 357e537..d5a4918 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/pages/cart/cart2_pt/cart2_pt.js
@@ -353,7 +353,7 @@ Page({
});
},
//--------------------提交订单-----------------------
- submitForm:function(t){
+ submitForm: async function(t){
if(this.data.is_summit_ing==1) return false; //--提交中退出--
this.data.is_summit_ing=1;
@@ -440,6 +440,13 @@ Page({
if(gg.guide_id){
goods.guide_id=gg.guide_id;
goods.guide_type=gg.guide_type;
+ //调用接口判断是不是会员
+ await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/"+oo.stoid+"/"+gg.guide_id,{}).then(res=>{
+ if(res.data.code==0){
+ goods.guide_name=res.data.data.salesman;
+ goods.guide_sn=res.data.data.salesman_no;
+ }
+ })
}
item.order_goods.push(goods);
diff --git a/pages/getphone/getphone.js b/pages/getphone/getphone.js
index d000bf6..e772f65 100644
--- a/pages/getphone/getphone.js
+++ b/pages/getphone/getphone.js
@@ -26,8 +26,7 @@ Page({
if (openid == "" || openid == null || r==null ){
getApp().globalData.user_id=null;
getApp().globalData.userInfo=null;
- console.log("openid");
- wx.navigateTo({ url: '/pages/togoin/togoin', })
+ getApp().goto('/pages/togoin/togoin')
return false;
}
var user_info=getApp().globalData.userInfo;
diff --git a/pages/giftpack/birthdaygift/birthdaygift.js b/pages/giftpack/birthdaygift/birthdaygift.js
index 6889911..7070465 100644
--- a/pages/giftpack/birthdaygift/birthdaygift.js
+++ b/pages/giftpack/birthdaygift/birthdaygift.js
@@ -115,22 +115,22 @@ Page({
},
onLoad: function onLoad(options) {
+
var th = this;
th.setData({
getActId: options.actId,
giftID: options.giftBagId
})
- th.GetList();
+
},
onShow: function onShow() {
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- wx.navigateTo({
- url: '/pages/getphone/getphone',
- })
+ getApp().goto('/pages/getphone/getphone');
return false;
}
+ this.GetList();
},
GetReceive: function() {
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js
index 6532ee7..9c60f1e 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.js
+++ b/pages/giftpack/buygiftpack/giftpackbuy.js
@@ -27,6 +27,7 @@ Page({
total: 0, //总数量
},
onLoad: function(options) {
+
var th = this;
var my_confirm = th.selectComponent("#my_confirm"); //组件的id
my_confirm.open_cancel(0);
@@ -34,17 +35,16 @@ Page({
getStorageID: a.stoid,
getUserID: d.user_id
})
- th.getList();
+
},
onShow: function() {
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- wx.navigateTo({
- url: '/pages/getphone/getphone',
- })
+ getApp().goto('/pages/getphone/getphone');
return false;
}
+ this.getList();
},
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml
index b99e9d7..0669a52 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.wxml
+++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml
@@ -36,7 +36,7 @@
- {{"原价:¥"+items.giftPosPrice}}
+ {{"零售价:¥"+items.giftPosPrice}}
{{"活动结束时间:"+items.endTime}}
diff --git a/pages/giftpack/evaluategift/evaluategift.js b/pages/giftpack/evaluategift/evaluategift.js
index 347f0e0..68b985d 100644
--- a/pages/giftpack/evaluategift/evaluategift.js
+++ b/pages/giftpack/evaluategift/evaluategift.js
@@ -120,6 +120,7 @@ Page({
})
},
onLoad: function(options) {
+
var th = this;
th.setData({
getActId: options.actId,
@@ -133,17 +134,17 @@ Page({
th.setData({ orderType: orderType})
}
- th.GetList();
+
},
onShow: function() {
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- wx.navigateTo({
- url: '/pages/getphone/getphone',
- })
+ getApp().goto('/pages/getphone/getphone');
return false;
}
+
+ this.GetList();
},
GetReceive: function() {
diff --git a/pages/giftpack/festival/festival.js b/pages/giftpack/festival/festival.js
index 0d8515c..6666a6a 100644
--- a/pages/giftpack/festival/festival.js
+++ b/pages/giftpack/festival/festival.js
@@ -118,13 +118,13 @@ Page({
},
onLoad: function(options) {
+
var th = this;
th.setData({
getActId: options.actId,
giftID: options.giftBagId
})
- th.is_festival();
- th.GetList();
+
wx.setNavigationBarTitle({
title: "节日有礼",
});
@@ -133,11 +133,11 @@ Page({
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- wx.navigateTo({
- url: '/pages/getphone/getphone',
- })
+ getApp().goto('/pages/getphone/getphone');
return false;
}
+ this.is_festival();
+ this.GetList();
},
GetReceive: function() {
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index 54724ac..1eb560b 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -30,29 +30,31 @@ Page({
is_lb: 0, //是否有礼包
},
onLoad: function(options) {
+
+
var th = this;
th.setData({
isBuy: options.isBuy,
getGiftID: options.lbId,
orderSn: options.orderSn
})
- if (options.isBuy == 0) {
- th.GetMyGiftList();
- } else {
- th.GetBuyGiftList();
- }
+
th.close();
},
onShow: function() {
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- wx.navigateTo({
- url: '/pages/getphone/getphone',
- })
+ getApp().goto('/pages/getphone/getphone');
return false;
}
+ if (this.data.isBuy == 0) {
+ this.GetMyGiftList();
+ } else {
+ this.GetBuyGiftList();
+ }
+
},
GetBuyPrice: function(e) {
var that = this.data;
diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxml b/pages/giftpack/giftpacklist/giftpacklist.wxml
index aef38d6..739f79a 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.wxml
+++ b/pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -25,7 +25,7 @@
diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js
index a9ec61c..209bd3f 100644
--- a/pages/goods/goodsList/goodsList.js
+++ b/pages/goods/goodsList/goodsList.js
@@ -21,10 +21,13 @@ Page({
is_new:0,
is_hot:0,
prom_goods_list:null,
+ rq_data:null,
},
onLoad: function(t) {
+ this.data.rq_data=t;
+
//接受有没有导购的参数
var first_leader=t.first_leader;
if(first_leader){
@@ -32,7 +35,7 @@ Page({
//调用接口判断是不是会员
getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+oo.stoid+"/"+first_leader,{}).then(res=>{
if(res.data.code==0){
- getApp().globalData.guide_id=res.data.data.bind_user_id;
+ getApp().globalData.guide_id=res.data.data.id;
}
})
}
@@ -212,14 +215,20 @@ Page({
if (pagePath.indexOf('/') != 0) {
pagePath = '/' + pagePath;
}
- if(getApp().globalData.user_id){
+ if(this.data.rq_data && JSON.stringify(this.data.rq_data) != "{}") {
+ var parm = ut.ob_to_parm(this.data.rq_data);
+ pagePath += "?" + parm;
+ }
+
+ if(getApp().globalData.user_id){
if(pagePath.indexOf("?")>0){
pagePath+="&first_leader="+getApp().globalData.user_id;
}else{
pagePath+="?first_leader="+getApp().globalData.user_id;
}
}
+ console.log("11-11"+pagePath);
return {
title: "商品列表",
path:pagePath,
diff --git a/pages/goods/goodsList/goodsList.wxml b/pages/goods/goodsList/goodsList.wxml
index e3d4e06..36b4f38 100644
--- a/pages/goods/goodsList/goodsList.wxml
+++ b/pages/goods/goodsList/goodsList.wxml
@@ -142,6 +142,7 @@
{{item.name}}
+
{{item.name}}
diff --git a/pages/goods/search/search.js b/pages/goods/search/search.js
index 10a8ea5..f58b152 100644
--- a/pages/goods/search/search.js
+++ b/pages/goods/search/search.js
@@ -21,8 +21,11 @@ Page({
tabname: "goods_id", //排序的字段
adname: "desc", //升降的字段
+ rq_data:null,
},
onLoad: function(t) {
+ this.data.rq_data=t;
+
//接受有没有导购的参数
var first_leader=t.first_leader;
if(first_leader){
@@ -30,7 +33,7 @@ Page({
//调用接口判断是不是会员
getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+oo.stoid+"/"+first_leader,{}).then(res=>{
if(res.data.code==0){
- getApp().globalData.guide_id=res.data.data.bind_user_id;
+ getApp().globalData.guide_id=res.data.data.id;
}
})
}
@@ -52,8 +55,7 @@ Page({
th.setData({ hotWords: arr});
}
-
-
+
//计算等级价相关
var swithc_list=rs.switch_list;
var sw_arr=JSON.parse(swithc_list);
@@ -185,14 +187,39 @@ Page({
//-----点击搜索按钮----
search: function(t) {
if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词");
+ this.data.key_str=t;
this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
},
- //---------分享配置--------
- onShareAppMessage: function (e) {
- return {
- title: "商品分类",
- }
- },
+
+ //---------分享配置--------
+ onShareAppMessage: function (e) {
+ var curPage=this;
+ var pagePath = curPage.route; //当前页面url
+ if (pagePath.indexOf('/') != 0) {
+ pagePath = '/' + pagePath;
+ }
+
+ if(this.data.key_str) {
+ pagePath += "?s_key=" + this.data.key_str;
+ }
+
+ if(getApp().globalData.user_id){
+
+ if(pagePath.indexOf("?")>0){
+ pagePath+="&first_leader="+getApp().globalData.user_id;
+ }else{
+ pagePath+="?first_leader="+getApp().globalData.user_id;
+ }
+ }
+
+ console.log("11-11"+pagePath);
+ return {
+ title: "商品搜索",
+ path:pagePath,
+ }
+ },
+
+
//---------图片失败,默认图片--------
bind_bnerr: function (e) {
var _errImg = e.target.dataset.errorimg;
diff --git a/pages/goods/search/search.json b/pages/goods/search/search.json
index 45e88b5..0aa7add 100644
--- a/pages/goods/search/search.json
+++ b/pages/goods/search/search.json
@@ -1,4 +1,7 @@
{
"navigationBarTitleText": "商品搜索",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": false,
+ "usingComponents": {
+ "share_box": "/components/share_box/share_box"
+ }
}
\ No newline at end of file
diff --git a/pages/goods/search/search.wxml b/pages/goods/search/search.wxml
index 0666b43..270f2b9 100644
--- a/pages/goods/search/search.wxml
+++ b/pages/goods/search/search.wxml
@@ -106,6 +106,9 @@
+
+
+
diff --git a/pages/index/index/index.js b/pages/index/index/index.js
index d7099f7..faf1e5c 100644
--- a/pages/index/index/index.js
+++ b/pages/index/index/index.js
@@ -828,5 +828,6 @@ Page({
})
})
}
-
+
+
});
\ No newline at end of file
diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml
index 2c18783..73cd56c 100644
--- a/pages/index/index/index.wxml
+++ b/pages/index/index/index.wxml
@@ -1,3 +1,6 @@
+
+
+
@@ -360,8 +363,7 @@
-
-
+
diff --git a/pages/tabbar/tabbar.wxml b/pages/tabbar/tabbar.wxml
index ce80d75..4e29db7 100644
--- a/pages/tabbar/tabbar.wxml
+++ b/pages/tabbar/tabbar.wxml
@@ -1,36 +1,31 @@
+
-
+
-
-
-
@@ -43,7 +38,7 @@
-
+
首页
@@ -51,7 +46,7 @@
-
+
首页
@@ -62,7 +57,7 @@
-
+
分类
@@ -70,7 +65,7 @@
-
+
分类
@@ -81,9 +76,9 @@
-
-
diff --git a/pages/user/integral/query/index.wxml b/pages/user/integral/query/index.wxml
index 4fcbd06..9f291dc 100644
--- a/pages/user/integral/query/index.wxml
+++ b/pages/user/integral/query/index.wxml
@@ -63,8 +63,8 @@
{{details.BillDate}}
-
- {{(details.OutIntegral!=0)?"":"+"}}{{(details.InIntegral==0)?filter.getNum(details.OutIntegral):filter.getNum(details.InIntegral)}}积分
+
+ {{(details.InOutInt>0)?"+":""}}{{filter.getNum(details.InOutInt)}}积分
diff --git a/pages/user/plus/plus.js b/pages/user/plus/plus.js
index c428acd..135e67a 100644
--- a/pages/user/plus/plus.js
+++ b/pages/user/plus/plus.js
@@ -312,7 +312,8 @@ Page({
//--支付成功,跳转到等级卡续费页面--
success:function () {
-
+ var u_url = "/pages/user/cardinfo/cardinfo";
+ wx.reLaunch({url: u_url})
},
//--绑定邀请码的输入--
diff --git a/utils/pay2.js b/utils/pay2.js
index a99a44c..084a4a2 100644
--- a/utils/pay2.js
+++ b/utils/pay2.js
@@ -8,7 +8,11 @@ module.exports = {
data: dd,
success: function(t) {
if(t.data.code==0){
- i.weixinPay(t.data.data, succ,fail);
+ if(t.data.data=="升级成功"){
+ "function" == typeof succ && succ(1);
+ }else{
+ i.weixinPay(t.data.data, succ,fail);
+ }
}else{
"function" == typeof fail && fail();
}
diff --git a/utils/util.js b/utils/util.js
index 38900e8..043bb12 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -401,6 +401,15 @@ function base64_encode (str) { // 编码,配合encodeURIComponent使用
return strin
}
+function ob_to_parm(ob){
+ var parm="";
+ for( var key in ob){
+ parm+="&"+key+"="+ob[key];
+ }
+ parm = parm.substr(1);
+ return parm;
+}
+
module.exports = {
formatTime: function(e, r) {
var t = e ? new Date(1e3 * e) : new Date(), n = t.getFullYear(), o = t.getMonth() + 1, a = t.getDate(), u = t.getHours(), i = t.getMinutes(), f = t.getSeconds(), s = function(e) {
@@ -505,5 +514,6 @@ module.exports = {
draw_circle:draw_circle,//绘制圆,
mergeArray:mergeArray, //数组合并
isContained:isContained, //是否包含
- base64_encode:base64_encode //64位加密
+ base64_encode:base64_encode, //64位加密
+ ob_to_parm:ob_to_parm //对象变成参数
};
diff --git a/utils/wxParse/wxParse.wxml b/utils/wxParse/wxParse.wxml
index 6a73bec..2251a18 100644
--- a/utils/wxParse/wxParse.wxml
+++ b/utils/wxParse/wxParse.wxml
@@ -377,7 +377,7 @@
-
+