From f6ae77815f0c729c92223277e92477ae26656387 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Tue, 16 Aug 2022 11:00:05 +0800 Subject: [PATCH] app.js 里面有佣金的统一代码 --- app.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 9dc5acd..31e5340 100644 --- a/app.js +++ b/app.js @@ -51,7 +51,7 @@ App({ config: null, //门店参数 config2: null, //门店配置 code: null, - user_id:null,// 6520210,//6520119 qa 4687 6519901 zs 10153869 + user_id:null,// qa-6519858,// buy_now: null, picklist: null, //门店列表 wuliuprice: null, //物流价格表 @@ -1024,6 +1024,58 @@ App({ if(!this.globalData.scene) return false; if(this.globalData.sp_scene.indexOf(this.globalData.scene)==-1) return false; return true; + }, + + is_distribut:async function (th){ + var isok=1; + var dis=null; + await this.promiseGet("/api/weshop/storeDistribut/get/"+os.stoid,{}).then(rs=>{ + dis=rs.data.data; + if( dis && dis.switch==0){ + isok=0; + } + }) + if(!isok) return false; + await this.promiseGet("/store/storemoduleendtime/page?store_id=" +os.stoid + "&type=2",{}).then(rs=>{ + if(rs.data.code==0){ + var arr = rs.data.data.pageData; + if (arr.length > 0) { + var item=arr[0]; + if(item.is_sy==0){ + var now = Date.parse(new Date());now = now / 1000; + if(item.end_time