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..f563d5a 100644
--- a/packageA/pages/prom_list/prom_list.js
+++ b/packageA/pages/prom_list/prom_list.js
@@ -370,6 +370,20 @@ 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;
+ }
+ }
+
+
//-----如果是秒杀,团购,积分购,拼团-----
if (th.data.data.prom_type != 5) {
return s.my_warnning("商品不是搭配活动!", 0, th);
diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js
index 05f1aae..c8fef47 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: {
@@ -657,10 +660,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 +793,7 @@ Page({
e.check_prom_activity(i)
}
e.doCheckAll();
+ getApp().requestCardNum(e);
}
});
},
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index 51abda5..1ba655c 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 });
}
}
@@ -596,7 +598,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 +1425,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/get/"+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 +1625,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/get/"+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,6 +1648,7 @@ Page({
if (pdata.length==0) return;
var str = JSON.stringify(pdata);
+
wx.showLoading({title: "加载中"});
wx.request({
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index 7d85168..357e537 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 })
@@ -422,6 +435,13 @@ 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;
+ }
+
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/giftpack/birthdaygift/birthdaygift.js b/pages/giftpack/birthdaygift/birthdaygift.js
index bc5144e..6889911 100644
--- a/pages/giftpack/birthdaygift/birthdaygift.js
+++ b/pages/giftpack/birthdaygift/birthdaygift.js
@@ -123,6 +123,14 @@ Page({
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',
+ })
+ return false;
+ }
},
GetReceive: function() {
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js
index 59bc087..6532ee7 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.js
+++ b/pages/giftpack/buygiftpack/giftpackbuy.js
@@ -37,6 +37,14 @@ Page({
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',
+ })
+ return false;
+ }
},
diff --git a/pages/giftpack/evaluategift/evaluategift.js b/pages/giftpack/evaluategift/evaluategift.js
index 189fda9..347f0e0 100644
--- a/pages/giftpack/evaluategift/evaluategift.js
+++ b/pages/giftpack/evaluategift/evaluategift.js
@@ -136,6 +136,14 @@ Page({
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',
+ })
+ return false;
+ }
},
GetReceive: function() {
diff --git a/pages/giftpack/festival/festival.js b/pages/giftpack/festival/festival.js
index 473f42f..0d8515c 100644
--- a/pages/giftpack/festival/festival.js
+++ b/pages/giftpack/festival/festival.js
@@ -130,6 +130,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) {
+ wx.navigateTo({
+ url: '/pages/getphone/getphone',
+ })
+ return false;
+ }
},
GetReceive: function() {
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index 8455595..54724ac 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -44,6 +44,14 @@ Page({
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',
+ })
+ return false;
+ }
},
GetBuyPrice: function(e) {
diff --git a/pages/giftpack/mygiftpack/mygiftpack.js b/pages/giftpack/mygiftpack/mygiftpack.js
index 4944146..c6700b1 100644
--- a/pages/giftpack/mygiftpack/mygiftpack.js
+++ b/pages/giftpack/mygiftpack/mygiftpack.js
@@ -38,6 +38,14 @@ Page({
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',
+ })
+ return false;
+ }
},
getList: function() {
diff --git a/pages/giftpack/newvipgift/newvipgift.js b/pages/giftpack/newvipgift/newvipgift.js
index 30f0261..b2d88ef 100644
--- a/pages/giftpack/newvipgift/newvipgift.js
+++ b/pages/giftpack/newvipgift/newvipgift.js
@@ -122,6 +122,14 @@ Page({
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',
+ })
+ return false;
+ }
},
GetReceive: function() {
diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js
index fcd1c55..28cce2e 100644
--- a/pages/goods/categoryList/categoryList.js
+++ b/pages/goods/categoryList/categoryList.js
@@ -1,5 +1,4 @@
var t = getApp(), e = t.request, oo = t.globalData.setting;
-
var i = function (i) {
return i && i.__esModule ? i : {
default: i
@@ -7,65 +6,87 @@ var i = function (i) {
}(require("../../../utils/LoadMore.js")), a = new i.default(), ut = require("../../../utils/util.js");
//t = i,e = t
Page({
- data: {
- is_date:true,
- scrollHeight: 0,
- currentTab:-1,
- abc:0,
- windowHeight:0,
- windowWidth: 0,
- eachLetterHeight:0,
- lettersPosition:0,
- catelist:null, //分类读取
- nationlist: null,//国家读取
- groups: null, //品牌读取
- iurl: oo.imghost,//图片地址
-
- // 当前选择的导航字母
- selected: 0,
- // 选择字母视图滚动的位置id
- scrollIntoView: 'A',
- // 导航字母
- letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
- 'U', 'V', 'W', 'X', 'Y', 'Z'],
- //控制新旧分类版本
- is_used_share:0,
- //国家的控制属性
- is_country:1,
- //品牌的控制属性
- is_brand:1,
- //选择分类的控制属性
- select_classify_on:223,
- index:223,
- classify_name:"国家",//项目类型
- brand_list:null,//品牌列表
-
- one_level_classify:[],// 新的版本左边的边分类1级
- is_level_three:0,//判断有没有3级
- cat_id:0,
- pl_timer: null,//只有品类的定时器
- is_pl_time:0,
- requestData:null, //风格三的商品数据列表 分页
- stylePage:1, //商品列表分页标识
-
- //风格三使用
- url: t.globalData.setting.imghost,
- currentPage: 1,
- requestData: null,
- allData: null,
- openFilterModal: !1,
- baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=goods_id&orderType=desc&page=1&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1",
- requestUrl: "",
- tabname: "goods_id", //排序的字段
- adname: "desc", //升降的字段
- is_new: 0,
- is_hot: 0,
- msgStatus:false, //页面显示暂无数据状态
- countDownNum: 3,
- timer: '', //定时器
- lastMsg:false,
- toView:"",
- },
+ data: {
+ is_date:true,
+ scrollHeight: 0,
+ currentTab:-1,
+ abc:0,
+ windowHeight:0,
+ windowWidth: 0,
+ eachLetterHeight:0,
+ lettersPosition:0,
+ catelist:null, //分类读取
+ nationlist: null,//国家读取
+ groups: null, //品牌读取
+ iurl: oo.imghost,//图片地址
+
+ // 当前选择的导航字母
+ selected: 0,
+ // 选择字母视图滚动的位置id
+ scrollIntoView: 'A',
+ // 导航字母
+ letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
+ 'U', 'V', 'W', 'X', 'Y', 'Z'],
+ //控制新旧分类版本
+ is_used_share:0,
+ //国家的控制属性
+ is_country:1,
+ //品牌的控制属性
+ is_brand:1,
+ //选择分类的控制属性
+ select_classify_on:223,
+ index:223,
+ classify_name:"国家",//项目类型
+ brand_list:null,//品牌列表
+
+ one_level_classify:[],// 新的版本左边的边分类1级
+ is_level_three:0,//判断有没有3级
+ cat_id:0,
+ pl_timer: null,//只有品类的定时器
+ is_pl_time:0,
+ requestData:null, //风格三的商品数据列表 分页
+ stylePage:1, //商品列表分页标识
+
+ //风格三使用
+ url: t.globalData.setting.imghost,
+ currentPage: 1,
+ allData: null,
+ openFilterModal: !1,
+ baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=goods_id&orderType=desc&page=1&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1",
+ requestUrl: "",
+ tabname: "goods_id", //排序的字段
+ adname: "desc", //升降的字段
+ is_new: 0,
+ is_hot: 0,
+ msgStatus:false, //页面显示暂无数据状态
+ countDownNum: 3,
+ timer: '', //定时器
+ lastMsg:false,
+ toView:"",
+ is_show_class:false,//是否添加新样式
+ status_show:0,
+ currentTab: 0, //预设当前项的值
+ },
+
+
+ //判断当前滚动超过一屏时,设置tab标题滚动条。
+ checkCor: function() {
+ let that = this;
+ //这里计算按照实际情况进行修改,动态数据要进行动态分析
+ //思路:窗体高度/单个分类高度 200rpx 转px计算 =>得到一屏幕所显示的个数,结合后台传回分类总数进行计算
+ //数据很多可以多次if判断然后进行滚动距离计算即可
+ if (that.data.currentTab > 7) {
+ that.setData({
+ scrollTop: 500
+ })
+ } else {
+ that.setData({
+ scrollTop: 0
+ })
+ }
+ },
+
+
onLoad: function(tt) {
var that = this;
that.get_brand();
@@ -156,8 +177,11 @@ Page({
//调用底部导航
t.editTabBar(that,getApp().globalData.setting.stoid,getApp().globalData.url);
//this.requestFirstCategoris();
- if(getApp().globalData.user_id) getApp().requestCardNum();
- getApp().getConfig2(function (e) {
+ setTimeout(function () {
+ if (getApp().globalData.user_id) getApp().requestCardNum(that);
+ },500)
+
+ getApp().getConfig2(function (e) {
var data=e;
var switch_list_data = data.switch_list;
@@ -189,10 +213,14 @@ Page({
}
that.setData({ is_level_three: is_lev_thr });
if (is_lev_thr!=1) {
- that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name, goodslist: item.array });
- } else {
- that.setData({ select_classify_on: 0, index: 0, goodslist: arr });
- }
+ that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name,cat_id: item.items.id,goodslist: item.array });
+ console.log("id:="+item.items.id)
+ that.style(that.data.stylePage,that.data.cat_id);
+ } else {
+ that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name,cat_id: item.items.id,goodslist: arr });
+ console.log("id:="+item.items.id)
+ that.style(that.data.stylePage,that.data.cat_id);
+ }
}
else{
that.setData({ select_classify_on: 0, index: 0, goodslist: null,classify_name:item.items.name,is_level_three: 0});
@@ -222,6 +250,12 @@ Page({
} else if (that.data.is_show_pl) {
that.setData({ currentTab: 0 });
}
+ // 获取默认选中的第一个
+ if(that.data.is_show_gb && that.data.select_classify_on == 223){
+ that.setData({ status_show: 1 });
+ }else if(that.data.is_show_pp && that.data.select_classify_on == 220){
+ that.setData({ status_show: 2 });
+ }
})
},
@@ -291,8 +325,18 @@ Page({
}
}
}
-
}
+ for(var i=0;i 4){
+ arr[i]['items']['name'] = mobile_name.substring(0, 4)
+ }
+ }
+ if(t.data.is_show_pl==1 && t.data.is_show_pp != 1 && t.data.is_show_gb != 1){
+ arr[0]['items']['is_show_class'] = true;
+ }
+ //console.log(arr)
t.setData({one_level_classify:arr});
}
@@ -557,6 +601,37 @@ Page({
},
// 新的版本分类点击一级分类
click_classify:function(e){
+ let cur = e.currentTarget.dataset.current;
+ if (this.data.currentTab == cur) {
+ return false;
+ } else {
+ wx.pageScrollTo({
+ scrollTop: 0
+ })
+ this.setData({
+ currentTab: cur,
+ select_classify_on:cur
+ })
+ this.checkCor();
+ }
+ // if(e.currentTarget.dataset.index == 223){
+ // this.setData({ status_show: 1});
+ // }else if(e.currentTarget.dataset.index == 220){
+ // this.setData({ status_show: 2});
+ // }else{
+ // this.setData({ status_show: 0});
+ // }
+ var arr2 = this.data.one_level_classify
+ for(var i=0;i
+
@@ -98,7 +98,7 @@
-
+
@@ -113,46 +113,46 @@
-
-
+
+
+
-
-
-
-
- 国家
+
+
+
+
+
+
+ 国家
-
-
- 品牌
+
+
+
+
+ 品牌
-
-
-
-
- {{name}}
-
-
-
-
- {{ittms.items.name}}
-
+
+
+
+
+
+ {{ittms.items.name}}
-
+
-
+
@@ -288,21 +288,25 @@
-
+
-
- 国家
+
+ 国家
-
- 品牌
+
+
+ 品牌
-
-
+
+
+
+
+
+
+
+
+ {{ittms.items.name}}
+
-
-
+
+
+
+
@@ -364,7 +383,7 @@
-
+
-
\ 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..10a8ea5 100644
--- a/pages/goods/search/search.js
+++ b/pages/goods/search/search.js
@@ -23,6 +23,18 @@ Page({
adname: "desc", //升降的字段
},
onLoad: function(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.bind_user_id;
+ }
+ })
+ }
+
var th=this;
a.getConfig2(function(rs){
var arr=new Array(),arr2=new Array();
diff --git a/pages/index/index/index.js b/pages/index/index/index.js
index 48e0915..d7099f7 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
diff --git a/pages/tabbar/tabbar.wxml b/pages/tabbar/tabbar.wxml
index 6abe180..ce80d75 100644
--- a/pages/tabbar/tabbar.wxml
+++ b/pages/tabbar/tabbar.wxml
@@ -1,12 +1,12 @@
-
+
-
-
+
+
@@ -16,8 +16,8 @@
-
-
+
+
@@ -81,7 +81,7 @@
-
+
@@ -91,7 +91,7 @@
-
+
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..96b35b9 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=t.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.bind_user_id;
+ }
+ })
+ }
+
+
+ this.setData({tg_id: tg_id });
getApp().globalData.to_group=null;
},
@@ -767,8 +784,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 +903,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..8408738 100644
--- a/pages/team/team_success/team_success.js
+++ b/pages/team/team_success/team_success.js
@@ -355,6 +355,12 @@ 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 +673,30 @@ Page({
ob[err_img] = this.data.iurl + "/miniapp/images/default_g_img.gif";
this.setData(ob);
- }
+ },
+
+
+ //------ 分享配置 --------
+ onShareAppMessage: function (e) {
+ var scene=th.data.teamgroup.id;
+ var url="/pages/team/team_show/team_show?tg_id="+scene;
+ //--分享图片--
+ 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,
+ }
+ },
+
})
diff --git a/pages/user/assistance/friend_assistance.js b/pages/user/assistance/friend_assistance.js
index 9c525c7..c6ffc63 100644
--- a/pages/user/assistance/friend_assistance.js
+++ b/pages/user/assistance/friend_assistance.js
@@ -54,6 +54,16 @@ Page({
* 生命周期函数--监听页面显示
*/
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',
+ })
+ 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/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/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/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/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();
}
});