diff --git a/app.js b/app.js
index eca65c5..3165bc2 100644
--- a/app.js
+++ b/app.js
@@ -51,7 +51,7 @@ App({
config: null, //门店参数
config2: null, //门店配置
code: null,
- user_id: null,//5682094,6520044,6520119 qa 4687 6519901 zs 10153869
+ user_id:null,//5682094,6520044,6520119 qa 4687 6519901 zs 10153869
buy_now: null,
picklist: null, //门店列表
wuliuprice: null, //物流价格表
@@ -73,15 +73,17 @@ App({
},
auth: o,
request: a,
- onLaunch: function () {
+ onLaunch: function (option) {
//初始化美图测肤插件
// var plugin = requirePlugin('mtSkinSdk');
// params.login_id = wx.getStorageSync('login_id') || '' // 可将登录id缓存下来,方便下次进入小程序直接获取
// plugin.setConfig(pluginGD)
-
+ if(option) this.globalData.scene=option.scene;
wx.hideTabBar();
this.initExt();
+
+
//检查更新
this.checkUpdateVersion();
@@ -690,6 +692,7 @@ App({
th.globalData.dis_buy_obj = null; //等级卡的购买记录
th.globalData.storeFooter = null; //底部的导航
th.globalData.full_screen = null; //全屏
+ th.globalData.scene=null
} else {
th.globalData.no_clear = 0;
}
@@ -851,21 +854,23 @@ App({
});
},
- con_wx(th) {
- var url = th.data.sys_switch.weapp_customertype_url;
- var id = th.data.sys_switch.weapp_customertype_appid;
- this.globalData.no_clear = 1;
+
+
+ //联系客服的3个函数
+ con_wx(th){
+ var url=th.data.sys_switch.weapp_customertype_url;
+ var id=th.data.sys_switch.weapp_customertype_appid;
+ this.globalData.no_clear=1;
wx.openCustomerServiceChat({
extInfo: { url: url },
corpId: id,
success(res) { }
})
},
-
- con_Service() {
- var th = this;
- var oss = this.globalData.setting;
- this.getConfig(function (t) {
+ con_Service(){
+ var th=this;
+ var oss= this.globalData.setting;
+ this.getConfig(function(t) {
if (t.store_tel == undefined) {
th.request.get("/api/weshop/store/get/" + oss.stoid, {
isShowLoading: 1,
@@ -935,8 +940,28 @@ App({
check_can_share() {
if (!this.globalData.user_id) wx.hideShareMenu();
else wx.showShareMenu();
- }
+ },
+ //--- 判断是不是皮肤的商品的公共函数 ---
+ check_skin_face(options,type,goods_id){
+ if(options.skinface_id){
+ this.globalData.skinface_id=options.skinface_id;
+ var stoid=this.globalData.setting.stoid;
+ var user_id=this.globalData.user_id;
+ if(!user_id) return false;
+ //点击量的
+ this.request.promisePost("/api/weshop/face/skinGoodsBrowse/save",{
+ data:{
+ store_id:stoid,
+ goods_id:goods_id,
+ user_id:user_id,
+ addtime:ut.gettimestamp(),
+ skinface_id:options.skinface_id,
+ goods_type:type
+ }
+ }).then(res=>{})
+ }
+ }
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js
index 18e779f..11fd6c8 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.js
+++ b/pages/giftpack/buygiftpack/giftpackbuy.js
@@ -140,6 +140,8 @@ Page({
var th = this;
var index = e.currentTarget.dataset.index; //活动id
var sele_g=th.data.wareCard[index];
+ this.data.payMoney=sele_g.payMoney;
+
th.setData({sele_g:sele_g,buyType:2,})
if(sele_g.is_pickup){
if(sele_g.pickup_list && th.data.def_pick_store){
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index 848f1db..a9d09ea 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -138,6 +138,7 @@ Page({
return false;
}
+ this.data.payMoney=th.data.sele_g.payMoney;
th.setData({ buyType:2 })
if(th.data.sele_g.is_pickup){
th.setData({
@@ -260,6 +261,19 @@ Page({
break;
}
}
+
+ if(res.data.data.pickup_id){
+ getApp().request.get("/api/weshop/pickup/get/"+os.stoid+"/"+res.data.data.pickup_id,{
+ success: function (res) {
+ if(res.data.code==0){
+ th.setData({pick_up:res.data.data});
+ }
+ }
+ });
+
+ }
+
+
} else {
getApp().my_warnning(res.data.msg, 0, th);
return false;
diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxml b/pages/giftpack/giftpacklist/giftpacklist.wxml
index dde5f6a..07f7ad8 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.wxml
+++ b/pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -3,6 +3,11 @@
+
+
+ {{pick_up.pickup_name}}
+
+
{{giftTitle}}
@@ -95,19 +100,14 @@
+
+
-
-
-
+
diff --git a/pages/giftpack/public/buy_com.js b/pages/giftpack/public/buy_com.js
index 4b67daa..95adf88 100644
--- a/pages/giftpack/public/buy_com.js
+++ b/pages/giftpack/public/buy_com.js
@@ -484,6 +484,7 @@ module.exports = {
},
check_def_pk:function (th) {
+ th.data.def_pick_store.is_no_dis=0;
var def_pick_store=th.data.def_pick_store
var sele_g=th.data.sele_g;
var arr=sele_g.pickup_list.split(',');
@@ -494,9 +495,8 @@ module.exports = {
if(idx==-1){
def_pick_store.is_no_dis=1;
- th.setData({def_pick_store})
}
-
+ th.setData({def_pick_store})
}
diff --git a/utils/pay.js b/utils/pay.js
index ddd33e6..2c66988 100644
--- a/utils/pay.js
+++ b/utils/pay.js
@@ -32,6 +32,9 @@ module.exports = {
};
if (type == 1) dd.type = 1;
+ if(getApp().globalData.scene)
+ dd.scene=getApp().globalData.scene;
+
wx.showLoading();
n.post(this.url, {
data: dd,
diff --git a/utils/pay2.js b/utils/pay2.js
index 11562b3..1d753b9 100644
--- a/utils/pay2.js
+++ b/utils/pay2.js
@@ -7,6 +7,9 @@ module.exports = {
if(wx_paying) return false;
wx_paying=1;
+ if(getApp().globalData.scene)
+ dd.scene=getApp().globalData.scene;
+
wx.showLoading();
var i = this;
n.post(this.url, {
diff --git a/utils/request.js b/utils/request.js
index 2ed01bb..95bb025 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -244,13 +244,19 @@ module.exports = {
promisePut:function(url,data){
var th=this;
if(url.indexOf("http")==-1) url=getApp().globalData.setting.url +url;
+ var post_data=data.data;
+ var header={"content-type": "application/x-www-form-urlencoded" };
+ if(data.is_json){
+ header={ 'content-type': 'application/json'};
+ post_data=JSON.stringify(post_data);
+ };
return new Promise((resolve, reject) => {
data.isShowLoading && th.showLoading();
wx.request({
url,
method: 'PUT',
- header: {"content-type": "application/x-www-form-urlencoded" },
- data:data.data,
+ header: header,
+ data:post_data,
success(res) {
data.isShowLoading && th.hideLoading();
resolve(res);