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/components/share_box/share_box.js b/components/share_box/share_box.js
new file mode 100644
index 0000000..789813d
--- /dev/null
+++ b/components/share_box/share_box.js
@@ -0,0 +1,18 @@
+var t = getApp(),os =t.globalData.setting;
+Component({
+ properties: {
+ },
+ data: {
+ iurl:os.imghost,
+ },
+ ready: function() {
+ },
+ methods: {
+ //--- 分享 ---
+ go_share:function () {
+ this.triggerEvent('go_share')
+ }
+
+ }
+
+})
\ No newline at end of file
diff --git a/components/share_box/share_box.json b/components/share_box/share_box.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/share_box/share_box.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/share_box/share_box.wxml b/components/share_box/share_box.wxml
new file mode 100644
index 0000000..449574a
--- /dev/null
+++ b/components/share_box/share_box.wxml
@@ -0,0 +1,3 @@
+
+
diff --git a/components/share_box/share_box.wxss b/components/share_box/share_box.wxss
new file mode 100644
index 0000000..3c25d2a
--- /dev/null
+++ b/components/share_box/share_box.wxss
@@ -0,0 +1,7 @@
+.box_main{
+ width: 80rpx;height: 80rpx; background-color: #fff; border-radius: 50%; border: 1rpx solid #adadad; position: fixed;right: 0; top:50%;
+ background-repeat: no-repeat;background-position: center center; background-size: cover;
+}
+button.control[plain] {
+ border: 0;
+}
\ No newline at end of file
diff --git a/packageA/pages/prom_list/prom_list.js b/packageA/pages/prom_list/prom_list.js
index 2ff76e1..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) {
//---判断商品是否超出限购---
@@ -370,6 +381,28 @@ Page({
prom_id:o.prom_id
};
+ //---是不是从收藏夹出来的---
+ if(th.data.c_guide_id){
+ newd['guide_id'] = th.data.c_guide_id;
+ newd['guide_type']=2;
+ if ("add" == t.currentTarget.dataset.action) newd['guide_type']=3;
+ }else{
+ if(getApp().globalData.guide_id){
+ newd['guide_id'] = getApp().globalData.guide_id;
+ newd['guide_type']=0;
+ if ("add" == t.currentTarget.dataset.action) newd['guide_type']=1;
+ }
+ }
+
+ //如果有导购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) {
return s.my_warnning("商品不是搭配活动!", 0, th);
@@ -612,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 05f1aae..6569fa0 100644
--- a/pages/cart/cart/cart.js
+++ b/pages/cart/cart/cart.js
@@ -57,9 +57,12 @@ Page({
var th = this;
//调用底部导航
t.editTabBar(th,getApp().globalData.setting.stoid,getApp().globalData.url);
-
this.getCardList();
- if(getApp().globalData.user_id) getApp().requestCardNum();
+ //--强行等待,让购物车的数量能够正确的线上
+ setTimeout(function () {
+ if(getApp().globalData.user_id) getApp().requestCardNum(th);
+ },500)
+
//--获取是否又秒杀活动--
getApp().request.promiseGet("/api/ms/flash_sale/spikepage", {
data: {
@@ -142,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
@@ -657,10 +663,11 @@ Page({
e.doCheckAll();
t.goods_num=false_data.false_data.buy_limit;
- e.update_cart(t, pitem, item);
-
+ e.update_cart(t, pitem, item);
return false;
}
+ e.update_cart(t, pitem, item);
+
}else{
//--- 看一下是不是线下库存 ---
if(th.data.sales_rules==2){
@@ -789,6 +796,7 @@ Page({
e.check_prom_activity(i)
}
e.doCheckAll();
+ getApp().requestCardNum(e);
}
});
},
@@ -1294,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 51abda5..e037e4b 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -152,6 +152,7 @@ Page({
console.log("getuser_addr")
console.log(ie)
+
//地址切换要把包邮券清空
if( !th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){
var using_quan=th.data.using_quan;
@@ -167,6 +168,7 @@ Page({
//更换地址回来要重新调用计算价钱的接口
if(!th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){
+ th.setData({user_addr: ie });
if (th.data.is_b_now == 1) {
if(th.data.bn_goods) {
th.calculatePrice2();
@@ -176,9 +178,9 @@ Page({
th.calculatePrice();
}
}
+ }else{
+ th.setData({user_addr: ie });
}
-
- th.setData({user_addr: ie });
var going=0;
@@ -280,7 +282,7 @@ Page({
success: function (su) {
if (su.data.code == 0) {
var yuer = parseFloat(th.data.userinfo.user_money -
- th.data.userinfo.frozen_money - su.data.data.summoney).toFixed(2);
+ (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
th.setData({ txmon: su.data.data.summoney, yuer: yuer });
}
}
@@ -479,6 +481,12 @@ Page({
if(gg.prom_type==5){
t.data.data.prom_id = gg.prom_id ;
t.data.data.prom_type =5;
+
+ //--主商品要有导购id和导购类型--
+ if(gg.guide_id){
+ t.data.data.guide_id=gg.guide_id;
+ t.data.data.guide_type=gg.guide_type;
+ }
th.setData({collocation_goods:gg.collocation_goods});
var cart_arr=new Array();
@@ -596,7 +604,7 @@ Page({
var all_cutprice=0; //所有的优惠减件
var all_order_prom=0; //所有的订单优惠
- var umoney = th.data.userinfo.user_money - th.data.txmon - th.data.userinfo.frozen_money;
+ var umoney = th.data.userinfo.user_money - th.data.txmon - (th.data.userinfo.frozen_money?th.data.userinfo.frozen_money:0);
var freight_free = ee.freight_free; //全场满多少包邮
var no_ex_id=ee.no_ex_id;
var no_ex_good=null;
@@ -1423,7 +1431,20 @@ Page({
'prom_type':th.data.bn_goods.prom_type, //促销活动类型
'prom_id': th.data.bn_goods.prom_id, //促销活动id
};
-
+
+ //-- 把导购的信息填入--
+ 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;
+ }
+ })
+ }
+
//如果不立即购买或者秒杀,如果是线下库存购买的时候
if(goods.prom_type!=1 && goods.prom_type!=6 && th.data.sales_rules==2){
var isok=1;
@@ -1610,6 +1631,19 @@ Page({
return false;
}
}
+
+ //导购ID
+ if(g_item.guide_id){
+ goods.guide_id=g_item.guide_id;
+ goods.guide_type=g_item.guide_type;
+ //调用接口判断是不是会员
+ 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;
+ }
+ })
+ }
item.order_goods.push(goods);
}
@@ -1620,7 +1654,7 @@ Page({
if (pdata.length==0) return;
var str = JSON.stringify(pdata);
-
+
wx.showLoading({title: "加载中"});
wx.request({
url: oo.url + '/api/weshop/order/createWxdOrder',
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index 7d85168..d5a4918 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/pages/cart/cart2_pt/cart2_pt.js
@@ -56,7 +56,8 @@ Page({
qh:'', //期号
pt_listno:'',//期号
is_normal:0,
- is_express:0,//选择物流的控制器
+ is_express:0,//选择物流的控制器
+ yuer:0,
},
onLoad: function(t) {
console.log("onLoad_pt_cart");
@@ -128,6 +129,18 @@ Page({
th.setData({ userinfo: to.globalData.userInfo});
//获取立即购买的商品信息
th.get_buy_goods();
+
+ //获取提现金额
+ getApp().request.get("/api/weshop/withdrawals/summoney", {
+ data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
+ success: function (su) {
+ if (su.data.code == 0) {
+ var yuer = parseFloat(th.data.userinfo.user_money -
+ (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
+ th.setData({ txmon: su.data.data.summoney, yuer: yuer });
+ }
+ }
+ });
},
//-----获取立即购买的商品信息----
@@ -325,12 +338,12 @@ Page({
var txt2 = "formData.order_amount";
//--------------如果使用余额---------------------
if (th.data.bn_use_money == 1) {
- if (th.data.userinfo.user_money > total_m) {
+ if ( parseFloat(th.data.yuer) > total_m) {
th.setData({ [txt]: total_m, [txt2]:0 })
}else{
- order_m = order_m - th.data.userinfo.user_money;
+ order_m = order_m - parseFloat(th.data.yuer);
order_m = order_m.toFixed(2);
- th.setData({ [txt]: th.data.userinfo.user_money, [txt2]: order_m })
+ th.setData({ [txt]: th.data.userinfo.yuer, [txt2]: order_m })
}
}else{
th.setData({ [txt]: 0, [txt2]: order_m })
@@ -340,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;
@@ -422,6 +435,20 @@ Page({
'prom_type':th.data.bn_goods.prom_type, //促销活动类型
'prom_id': th.data.bn_goods.prom_id, //促销活动id
};
+
+ //--导购分享过来的id--
+ 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);
pdata.push(item);
diff --git a/pages/cart/cart2_pt/cart2_pt.wxml b/pages/cart/cart2_pt/cart2_pt.wxml
index 4de1c84..58566d5 100644
--- a/pages/cart/cart2_pt/cart2_pt.wxml
+++ b/pages/cart/cart2_pt/cart2_pt.wxml
@@ -105,7 +105,7 @@
- 使用余额 :¥{{userinfo.user_money}}
+ 使用余额 :¥{{yuer}}
diff --git a/pages/cart/cart_wk/cart_wk.js b/pages/cart/cart_wk/cart_wk.js
index 0bd9bda..b224433 100644
--- a/pages/cart/cart_wk/cart_wk.js
+++ b/pages/cart/cart_wk/cart_wk.js
@@ -389,7 +389,7 @@ Page({
getApp().my_warnning("支付成功",1,th);
setTimeout(function () {
th.setData({ isclose: 0 });
- wx.navigateTo({
+ wx.redirectTo({
url: "/pages/user/order_list/order_list"
})
}, 1000)
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 bc5144e..7070465 100644
--- a/pages/giftpack/birthdaygift/birthdaygift.js
+++ b/pages/giftpack/birthdaygift/birthdaygift.js
@@ -115,14 +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) {
+ 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 59bc087..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,9 +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) {
+ 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 189fda9..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,9 +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) {
+ 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 473f42f..6666a6a 100644
--- a/pages/giftpack/festival/festival.js
+++ b/pages/giftpack/festival/festival.js
@@ -118,18 +118,26 @@ Page({
},
onLoad: function(options) {
+
var th = this;
th.setData({
getActId: options.actId,
giftID: options.giftBagId
})
- th.is_festival();
- th.GetList();
+
wx.setNavigationBarTitle({
title: "节日有礼",
});
},
onShow: function() {
+ //--先判断会员状态--
+ var user_info = getApp().globalData.userInfo;
+ if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
+ 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 8455595..1eb560b 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -30,20 +30,30 @@ 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) {
+ getApp().goto('/pages/getphone/getphone');
+ return false;
+ }
+
+ if (this.data.isBuy == 0) {
+ this.GetMyGiftList();
+ } else {
+ this.GetBuyGiftList();
+ }
},
GetBuyPrice: function(e) {
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 ee77df3..209bd3f 100644
--- a/pages/goods/goodsList/goodsList.js
+++ b/pages/goods/goodsList/goodsList.js
@@ -21,9 +21,25 @@ 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){
+ getApp().globalData.first_leader=first_leader;
+ //调用接口判断是不是会员
+ 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.id;
+ }
+ })
+ }
+
var th=this;
a.init(this, "", "requestData");
var url = this.data.baseUrl;
@@ -194,9 +210,29 @@ Page({
},
//---------分享配置--------
onShareAppMessage: function (e) {
- return {
- title: "商品列表",
- }
+ var curPage=this;
+ var pagePath = curPage.route; //当前页面url
+ if (pagePath.indexOf('/') != 0) {
+ pagePath = '/' + pagePath;
+ }
+
+ 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,
+ }
},
//---图片失败,默认图片---
bind_bnerr2: function (e) {
diff --git a/pages/goods/goodsList/goodsList.json b/pages/goods/goodsList/goodsList.json
index 074fc3a..3dc51e0 100644
--- a/pages/goods/goodsList/goodsList.json
+++ b/pages/goods/goodsList/goodsList.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/goods/goodsList/goodsList.wxml b/pages/goods/goodsList/goodsList.wxml
index 2aa4d1c..36b4f38 100644
--- a/pages/goods/goodsList/goodsList.wxml
+++ b/pages/goods/goodsList/goodsList.wxml
@@ -142,6 +142,7 @@
{{item.name}}
+
{{item.name}}
@@ -164,4 +165,6 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/pages/goods/search/search.js b/pages/goods/search/search.js
index fb31a6a..f58b152 100644
--- a/pages/goods/search/search.js
+++ b/pages/goods/search/search.js
@@ -21,8 +21,23 @@ 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){
+ getApp().globalData.first_leader=first_leader;
+ //调用接口判断是不是会员
+ 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.id;
+ }
+ })
+ }
+
var th=this;
a.getConfig2(function(rs){
var arr=new Array(),arr2=new Array();
@@ -40,8 +55,7 @@ Page({
th.setData({ hotWords: arr});
}
-
-
+
//计算等级价相关
var swithc_list=rs.switch_list;
var sw_arr=JSON.parse(swithc_list);
@@ -173,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 48e0915..faf1e5c 100644
--- a/pages/index/index/index.js
+++ b/pages/index/index/index.js
@@ -112,7 +112,6 @@ Page({
t.editTabBar(th,o.stoid,th.data.url);
- if (getApp().globalData.user_id) getApp().requestCardNum();
await this.init_load();
//显示的时候要开启计时器
this.data.is_timer = 1;
@@ -125,6 +124,9 @@ Page({
if (new_nav == "") {
th.is_new();
}
+ setTimeout(function () {
+ if (getApp().globalData.user_id) getApp().requestCardNum(th);
+ },500)
});
} else {
@@ -405,6 +407,11 @@ Page({
if (new_nav == "") {
th.is_new();
}
+
+ setTimeout(function () {
+ if (getApp().globalData.user_id) getApp().requestCardNum(th);
+ },500)
+
});
var goods_list = this.selectComponent("#goods_list"); //组件的id
@@ -821,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 6abe180..4e29db7 100644
--- a/pages/tabbar/tabbar.wxml
+++ b/pages/tabbar/tabbar.wxml
@@ -1,36 +1,31 @@
+
-
+
-
-
-
+
+
{{tabBar.cartGoodsNum}}
-
-
+
+
+
- {{item.nav_name}}
+ {{item.nav_name}}
-
-
+
+
{{tabBar.cartGoodsNum}}
-
-
-
-
-
-
-
-
-
+
+
+
- {{item.nav_name}}
+ {{item.nav_name}}
@@ -43,7 +38,7 @@
-
+
首页
@@ -51,7 +46,7 @@
-
+
首页
@@ -62,7 +57,7 @@
-
+
分类
@@ -70,7 +65,7 @@
-
+
分类
@@ -81,9 +76,9 @@
-
+
{{tabBar.cartGoodsNum}}
-
+
购物车
@@ -91,9 +86,9 @@
-
+
{{tabBar.cartGoodsNum}}
-
+
购物车
@@ -103,7 +98,7 @@
-
+
我的
@@ -111,8 +106,8 @@
-
-
+
+
我的
diff --git a/pages/tabbar/tabbar.wxss b/pages/tabbar/tabbar.wxss
index e69de29..d7bf8ae 100644
--- a/pages/tabbar/tabbar.wxss
+++ b/pages/tabbar/tabbar.wxss
@@ -0,0 +1,8 @@
+.menu_red{
+
+ top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;
+}
+
+.menu_default_red{
+ background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;height: 40rpx;line-heith:40rpx;position: fixed;z-index: 100;left:63%
+}
\ No newline at end of file
diff --git a/pages/team/team_show/team_show.js b/pages/team/team_show/team_show.js
index c3d2f8f..f5638ca 100644
--- a/pages/team/team_show/team_show.js
+++ b/pages/team/team_show/team_show.js
@@ -66,12 +66,29 @@ Page({
wx.setNavigationBarTitle({ title: "拼团订单",})
//var postdata=getApp().globalData.to_group;
var postdata=options;
- var tg_id = postdata.tg_id;
+ var tg_id = postdata.tg_id, first_leader=options.first_leader;
//如果tg_id是空的话
if(tg_id==undefined || tg_id==null || tg_id==""){
- tg_id=decodeURIComponent(postdata.scene);
+ var tg_id_str=decodeURIComponent(postdata.scene);
+ tg_id_str=tg_id_str.split("_");
+ tg_id=tg_id_str[0];
+ if(tg_id_str.length>1){
+ first_leader=tg_id_str[1];
+ }
}
- this.setData({tg_id: tg_id });
+ //--判断一下是不是导购--
+ 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;
+ }
+ })
+ }
+
+
+ this.setData({tg_id: tg_id });
getApp().globalData.to_group=null;
},
@@ -568,7 +585,6 @@ Page({
});
setTimeout(th.countDown2, 1000);
},
-
//--获取门店---
async get_sto(e) {
var th = this, dd = null,i=getApp().request;
@@ -741,6 +757,20 @@ Page({
goods_name: th.data.goods.goods_name,
goods_sn: th.data.goods.goods_sn,
};
+
+ //---是不是从收藏夹出来的---
+ if(th.data.c_guide_id){
+ newd['guide_id'] = th.data.c_guide_id;
+ newd['guide_type']=2;
+
+ }else{
+ if(getApp().globalData.guide_id){
+ newd['guide_id'] = getApp().globalData.guide_id;
+ newd['guide_type']=0;
+
+ }
+ }
+
//-----拼团-----
newd.goods_price = th.data.teamlist.price;
newd.prom_type = 6;
@@ -767,8 +797,12 @@ Page({
}
newd['pick_dis'] = th.data.pick_dis;
- s.set_b_now(newd);
+ if(getApp().globalData.guide_id){
+ newd['guide_id'] = getApp().globalData.guide_id;
+ newd['guide_type']=0;
+ }
+ s.set_b_now(newd);
wx.navigateTo({
url: "/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + th.data.goods.goods_id,
});
@@ -882,4 +916,30 @@ Page({
this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
},
+ //------ 分享配置 --------
+ onShareAppMessage: function (e) {
+ var curPage=this;
+ var pagePath = curPage.route; //当前页面url
+ if (pagePath.indexOf('/') != 0) {
+ pagePath = '/' + pagePath;
+ }
+ var url=pagePath;
+
+ //--分享图片--
+ img=th.data.iurl+th.data.teamlist.share_imgurl;
+ //--把会员分享出去--
+ if(getApp().globalData.user_id){
+ if(url.indexOf("?")>0)
+ url+="&first_leader="+getApp().globalData.user_id;
+ else
+ url+="?first_leader="+getApp().globalData.user_id;
+ }
+
+ return {
+ path:url,
+ title: "商品分类",
+ imageUrl: img,
+ }
+ },
+
})
\ No newline at end of file
diff --git a/pages/team/team_success/team_success.js b/pages/team/team_success/team_success.js
index 4081d8e..000d1bc 100644
--- a/pages/team/team_success/team_success.js
+++ b/pages/team/team_success/team_success.js
@@ -355,6 +355,11 @@ Page({
var app = getApp();
var unit = that.data.screenWidth / 750 * 1.35;
var scene=th.data.teamgroup.id;
+ var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;
+ if(user_id>0){
+ scene+="_"+user_id;
+ }
+
//二微码
var path3 = os.url+ "/api/wx/open/app/user/getWeAppEwm/"+
os.stoid+"?sceneValue="+scene+"&pageValue=pages/team/team_show/team_show";
@@ -667,7 +672,31 @@ Page({
ob[err_img] = this.data.iurl + "/miniapp/images/default_g_img.gif";
this.setData(ob);
- }
+ },
+
+ //------ 分享配置 --------
+ onShareAppMessage: function (e) {
+ var th=this;
+ var scene=this.data.teamgroup.id;
+ var url="/pages/team/team_show/team_show?tg_id="+scene;
+ //--分享图片--
+ var img=th.data.iurl+th.data.teamlist.share_imgurl;
+ //--把会员分享出去--
+ if(getApp().globalData.user_id){
+ if(url.indexOf("?")>0)
+ url+="&first_leader="+getApp().globalData.user_id;
+ else
+ url+="?first_leader="+getApp().globalData.user_id;
+ }
+ console.log(url);
+
+ return {
+ path:url,
+ title: th.data.teamlist.title,
+ imageUrl: img,
+ }
+ },
+
})
diff --git a/pages/user/assistance/assistance.js b/pages/user/assistance/assistance.js
index a988d7e..7257d3d 100644
--- a/pages/user/assistance/assistance.js
+++ b/pages/user/assistance/assistance.js
@@ -34,6 +34,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
+
var th = this;
var nav_b = th.selectComponent("#nav_b"); //组件的id
nav_b.set_name("助力", "/pages/user/assistance/assistance");
@@ -44,9 +45,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
+
+ //--先判断会员状态--
+ var user_info = getApp().globalData.userInfo;
+ if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
+ getApp().goto('/pages/getphone/getphone');
+ return false;
+ }
+
var th = this;
// 助力活动
- th.assistance();
+ this.assistance();
},
// 助力活动
assistance() {
diff --git a/pages/user/assistance/friend_assistance.js b/pages/user/assistance/friend_assistance.js
index 9c525c7..a85edeb 100644
--- a/pages/user/assistance/friend_assistance.js
+++ b/pages/user/assistance/friend_assistance.js
@@ -28,6 +28,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
+
var th = this;
var nav_b = th.selectComponent("#nav_b"); //组件的id
@@ -39,7 +40,6 @@ Page({
if (this.data.tasking == 0 || this.data.tasking == undefined) {
this.data.tasking = decodeURIComponent(options.scene);
}
- getApp().getUserFir(function() {});
},
@@ -54,6 +54,14 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
+ //--先判断会员状态--
+ var user_info = getApp().globalData.userInfo;
+ if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
+ getApp().goto('/pages/getphone/getphone');
+ return false;
+ }
+
+
var th=this;
if (!th.data.user) th.setData({ user: getApp().globalData.userInfo});
if (this.data.tasking != null && this.data.tasking != 'undefined' && this.data.tasking != "" && this.data.tasking !=
diff --git a/pages/user/assistance/giftpacklist.js b/pages/user/assistance/giftpacklist.js
index d033364..a7c90ff 100644
--- a/pages/user/assistance/giftpacklist.js
+++ b/pages/user/assistance/giftpacklist.js
@@ -38,6 +38,7 @@ Page({
id: "", //一键领取的时候使用
},
onLoad: function(options) {
+
var th = this;
if (options.is_libao == 0) {
th.setData({
@@ -67,6 +68,12 @@ Page({
nav_b.set_name("助力", "/pages/user/assistance/assistance");
},
onShow: function() {
+ //--先判断会员状态--
+ var user_info = getApp().globalData.userInfo;
+ if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
+ getApp().goto('/pages/getphone/getphone');
+ return false;
+ }
},
//助力活动查看礼包详情调用
diff --git a/pages/user/assistance/giftpacklist.wxml b/pages/user/assistance/giftpacklist.wxml
index 01ac169..53d5937 100644
--- a/pages/user/assistance/giftpacklist.wxml
+++ b/pages/user/assistance/giftpacklist.wxml
@@ -25,7 +25,7 @@
@@ -145,6 +157,30 @@
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.CardName}}
+
+
+ ¥{{item.CardFee}}
+ 立即变更
+ 立即升级
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/cardinfo/cardinfo.wxss b/pages/user/cardinfo/cardinfo.wxss
index 0f83393..e4f3bac 100644
--- a/pages/user/cardinfo/cardinfo.wxss
+++ b/pages/user/cardinfo/cardinfo.wxss
@@ -225,4 +225,17 @@ align-items:center;
width: 100%;
height: 320rpx;
-}
\ No newline at end of file
+}
+
+.content{ position: fixed; top: 0;left:0; width: 100%; height: 100%; z-index: 12; }
+.content .card_list{ width: 700rpx; margin: 0 auto; background-color: #ffe88b; border-radius: 15rpx}
+.content .card_list .hg{ width: 100%;height: 156rpx}
+
+.content .card_list .list{ max-height: 700rpx; padding: 0 25rpx; margin-bottom: 20rpx; overflow-y: auto}
+.content .card_list .item{ margin-bottom: 10rpx; background: #fff; height: 150rpx; border-radius: 10rpx}
+.content .card_list .item .hg_img{ width: 70rpx; height: 60rpx; margin-left: 40rpx; margin-right: 20rpx }
+.content .card_list .item .price_show{ width: 200rpx; height: 110rpx; background: #ffd430;
+ border-top-left-radius: 55rpx; border-bottom-left-radius:55rpx; }
+ .content .card_list .list .card_name{ max-width: 230rpx}
+
+ .price_show .thr{color: #999; text-decoration:line-through }
\ No newline at end of file
diff --git a/pages/user/collect_list/collect_list.js b/pages/user/collect_list/collect_list.js
index 396deba..cc53c36 100644
--- a/pages/user/collect_list/collect_list.js
+++ b/pages/user/collect_list/collect_list.js
@@ -8,6 +8,7 @@ var t = function(t) {
o = new t.default();
var oo = e.globalData.setting,
app_d = e.globalData;
+var ut = require('../../../utils/util.js');
Page({
data: {
@@ -153,6 +154,19 @@ Page({
iconClick: function(e) {
var th = this.data;
var index = e.currentTarget.dataset.index;
+ var url = e.currentTarget.dataset.url;
+
+ var item=this.data.collects[index];
+ if(url){
+ console.log("---");
+ console.log(item.add_time);
+ console.log(ut.gettimestamp());
+
+ if(ut.gettimestamp()-item.add_time<3600*24 && item.guide_id>0)
+ url+="&c_guide_id="+item.guide_id;
+ getApp().goto(url);
+ return false;
+ }
var collect = "collects[" + index + "].checked";
if (this.data.collects[index].checked == true) {
this.setData({
diff --git a/pages/user/collect_list/collect_list.wxml b/pages/user/collect_list/collect_list.wxml
index 4e0dd07..00f5f3b 100644
--- a/pages/user/collect_list/collect_list.wxml
+++ b/pages/user/collect_list/collect_list.wxml
@@ -21,7 +21,8 @@
-
+
diff --git a/pages/user/coupons/coupons.wxml b/pages/user/coupons/coupons.wxml
index 2aea6bb..61da795 100644
--- a/pages/user/coupons/coupons.wxml
+++ b/pages/user/coupons/coupons.wxml
@@ -63,7 +63,7 @@
有效期:不限
- 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null?"":",不包邮地区:"+region_list_name}}
+ 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
diff --git a/pages/user/coupons/query/index.wxml b/pages/user/coupons/query/index.wxml
index af3319f..763f94c 100644
--- a/pages/user/coupons/query/index.wxml
+++ b/pages/user/coupons/query/index.wxml
@@ -102,7 +102,7 @@
有效期: 不限
- 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{detail.UseObjectID==null?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null?"":",不包邮地区:"+region_list_name}}
+ 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{detail.UseObjectID==null || detail.UseObjectID==''?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index ca7b64e..3e25205 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -84,10 +84,12 @@ Page({
need_money = 0,
cur_g_num = 0;
- //调用底部导航
- getApp().editTabBar(th,getApp().globalData.setting.stoid,getApp().globalData.url);
+ //调用底部导航
+ getApp().editTabBar(th,getApp().globalData.setting.stoid,getApp().globalData.url);
getApp().get_isbuy(th.setappdata);
- if (getApp().globalData.user_id) getApp().requestCardNum();
+ setTimeout(function () {
+ if (getApp().globalData.user_id) getApp().requestCardNum(th);
+ },500)
/*------会员登录------*/
app.getUserFir(async function(e) {
if (e != undefined && e != null && e.mobile) {
diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml
index efec660..19479fc 100644
--- a/pages/user/index/index.wxml
+++ b/pages/user/index/index.wxml
@@ -1,3 +1,6 @@
+
+
+
@@ -297,5 +300,3 @@
-
-
\ No newline at end of file
diff --git a/pages/user/integral/integral.wxml b/pages/user/integral/integral.wxml
index bd352ff..ba47d3c 100644
--- a/pages/user/integral/integral.wxml
+++ b/pages/user/integral/integral.wxml
@@ -38,8 +38,8 @@
{{details.BillDate}}
-
- {{(details.OutIntegral==0)?"+":"-"}}{{(details.InIntegral==0)?details.OutIntegral:details.InIntegral}}积分
+
+ {{(details.InOutInt>0)?"+":""}}{{filter.getNum(details.InOutInt)}}积分
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/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js
index 2193860..084f4c2 100644
--- a/pages/user/order_detail/order_detail.js
+++ b/pages/user/order_detail/order_detail.js
@@ -522,7 +522,9 @@ Page({
zfwk:function(){
var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.order.order_id;
- getApp().goto(url);
+ wx.redirectTo({
+ url:url,
+ })
},
//--------跳转到退款详情-----------
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/LoadMore.js b/utils/LoadMore.js
index 37acfbd..7c405f1 100644
--- a/utils/LoadMore.js
+++ b/utils/LoadMore.js
@@ -87,7 +87,7 @@ var e = function() {
g[ii].original_img = oo.imghost + g[ii].original_img;
}
- if (g[ii].add_time != undefined){
+ if (g[ii].add_time != undefined && rurl.indexOf("goodscollect")<0){
var tx = g[ii].add_time + "";
if (tx.indexOf('-') == -1) {
g[ii].add_time = ut.formatTime(g[ii].add_time, 'yyyy-MM-dd hh:mm:ss');
diff --git a/utils/pay.js b/utils/pay.js
index eca068a..82b18ab 100644
--- a/utils/pay.js
+++ b/utils/pay.js
@@ -34,7 +34,7 @@ module.exports = {
if(t.data.code==0){
i.weixinPay(t.data.data, e, a);
}else{
- getApp().showWarning(t.data.msg);
+ getApp().confirmBox(t.data.msg);
setTimeout(function(){
wx.redirectTo({
url: "/pages/user/order_list/order_list",
@@ -62,7 +62,8 @@ module.exports = {
console.log(n), t.showSuccess("支付成功!", e);
},
fail: function(n) {
- console.log(n), "requestPayment:fail" == n.errMsg ? t.showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? t.showWarning("您已取消支付") : t.showWarning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)),
+ console.log(n), "requestPayment:fail" == n.errMsg ? t.showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? t.showWarning("您已取消支付") :
+ t.confirmBox("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)),
"function" == typeof a && a();
}
});
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 @@
-
+