diff --git a/app.js b/app.js
index 7ad62bb..04b502c 100644
--- a/app.js
+++ b/app.js
@@ -110,26 +110,40 @@ App({
var th=this;
var pages = getCurrentPages(); //获取加载的页面
var currentPage = pages[pages.length - 1]; //获取当前页面的对象
- if(!currentPage || currentPage.route.indexOf('error/error')==-1){
- var tt=this.globalData.wxapp_buy_obj;
- if (!tt){
- this.get_isbuy(function (){
- tt=th.globalData.wxapp_buy_obj;
- if (tt.isout == 1){
- th.promiseGet('/api/weshop/store/get/'+t.stoid,{}).then(res=>{
- wx.reLaunch({
- url: "/pages/error/error?msg=该商城已到期,暂停浏览!\r\n可联系:"+res.data.data.store_tel,
- });
- })
- }
- else if (tt.isbuy == 0)
- wx.reLaunch({
- url: "/pages/error/error?msg=还未购买小程序",
- });
- })
- }
- }
-
+ var turl="/api/weshop/storeconfig/get/" + th.globalData.setting.stoid;
+
+ th.promiseGet(turl,{}).then(res=>{
+ var o=res;
+ if(o.data.code==0){
+ th.globalData.config2 = o.data.data;
+ //有配置成要验证过期,因为过期的小程序没有办法审核
+ if(th.globalData.config2.is_overdue){
+
+ //要开始验证,小程序有没有购买和过期
+ if(!currentPage || currentPage.route.indexOf('error/error')==-1){
+ var tt=this.globalData.wxapp_buy_obj;
+ if (!tt){
+ this.get_isbuy(function (){
+ tt=th.globalData.wxapp_buy_obj;
+ if (tt.isout == 1){
+ th.promiseGet('/api/weshop/store/get/'+t.stoid,{}).then(res=>{
+ wx.reLaunch({
+ url: "/pages/error/error?msg=该商城已到期,暂停浏览!\r\n可联系:"+res.data.data.store_tel,
+ });
+ })
+ }
+ else if (tt.isbuy == 0)
+ wx.reLaunch({
+ url: "/pages/error/error?msg=还未购买小程序",
+ });
+ })
+ }
+ }
+ }
+ }
+ })
+
+
},
//---初始化第三方----
diff --git a/app.json b/app.json
index c89cfe1..70151a1 100644
--- a/app.json
+++ b/app.json
@@ -30,7 +30,6 @@
"pages/activity/seckill_list/seckill_list",
"pages/activity/pind_list/pind_list",
"pages/togoin/togoin",
- "pages/getphone/getphone",
"pages/team/team_success/team_success",
"pages/team/team_show/team_show",
"pages/team/team_ping/team_ping",
@@ -97,7 +96,7 @@
],
"plugins": {
"live-player-plugin": {
- "version": "1.2.1",
+ "version": "1.2.5",
"provider": "wx2b03c6e691cd7370"
}
},
diff --git a/pages/getphone/getphone.js b/pages/getphone/getphone.js
deleted file mode 100644
index a27dd3f..0000000
--- a/pages/getphone/getphone.js
+++ /dev/null
@@ -1,136 +0,0 @@
-var t = require("../../utils/common.js");var os=getApp().globalData.setting;
-Page({
- data:{
- store:null,
- imghots: os.imghost,
- },
-
- onLoad: function (options) {
- //--判断是否有接受到邀请人的ID--
- if(options.first_leader){
- this.setData({first_leader:options.first_leader});
- }
- },
- onShow:function(){
- var th=this,app = getApp();
- var sessionKey = getApp().globalData.sessionKey;
- var openid = getApp().globalData.openid;
-
- if (openid == "" || openid == null) {
-
- if (getApp().globalData.userInfo)
- openid = getApp().globalData.userInfo.weapp_openid;
- }
- var r = getApp().globalData.getu;
-
- if (openid == "" || openid == null || r==null ){
- getApp().globalData.user_id=null;
- getApp().globalData.userInfo=null;
- getApp().goto('/pages/togoin/togoin')
- return false;
- }
- var user_info=getApp().globalData.userInfo;
- console.log("getphone");
-
- if(user_info!=null && user_info.mobile!=undefined && user_info.mobile!="" && user_info.mobile!=null){
- wx.navigateBack({
- delta: 1
- })
- }
-
- app.getConfig(function(e){
- th.setData({ store:e});
- })
- },
-
- getphone: function(e) {
- var that = this;
- var app=getApp(),a=app;
- //此处授权得到userInfo
- console.log("getphone");
-
- e=e.detail;
- console.log(e);
- //接下来写业务代码登录
- //最后,记得返回刚才的页面
- if (e.encryptedData==undefined){
- /*---
- wx.navigateTo({
- url: '/pages/user/binding_info/binding_info',
- })--*/
- return app.my_warnning("登录需要授权手机号码!", 0, that);
- return false;
- }
- var r=getApp().globalData.getu;
- var sessionKey = getApp().globalData.sessionKey;
- var openid = getApp().globalData.openid;
-
- console.log(sessionKey,openid);
- that.save_the_data(r,e,sessionKey,openid)
-
- },
-
- save_the_data:function (r,e,sessionKey,openid) {
- var app=getApp(),a=app,th=this;
- var dd = {
- oauth: "miniapp",
- nickname:a.clear_word(r.nickName),
- head_pic: r.avatarUrl,
- sex: r.gender,
- terminal: "miniapp",
- sessionKey: sessionKey,
- openid:openid,
- encryptedData: e.encryptedData,
- iv: e.iv,
- store_id: getApp().globalData.setting.stoid,
- };
- //--如果有邀请人的时候--
- if(th.data.first_leader){
- dd.first_leader=th.data.first_leader;
- }
-
- console.log(dd);
- app.request.get("/api/weshop/users/thirdLogin", {
- data: dd,
- success: function (e) {
- console.log("thirdLogin");
- console.log(e);
- if (e.data.code == 0) {
- app.globalData.user_id = e.data.data.user_id;
- } else {
- return app.showWarning("授权登入失败!"+e.data.msg);
- }
-
- wx.setStorageSync("userinfo",e.data.data);
- wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = t.getFullUrl(a.globalData.userInfo.head_pic);
- wx.navigateBack({ delta: 1})
-
- },
- failStatus: function (t) {
- /*---
- return "100" === t.data.result ? (i.goHome(), wx.navigateTo({
- url: "/pages/user/binding_info/binding_info?nickName=" + r.nickName + "&userHeadPic=" + r.avatarUrl
- }), !1) : (i.clearAuth(), i.alertLoginErrorAndGoHome(t.data.msg), a.request.post("/api/user/logout", {
- isShowLoading: !1,
- data: {
- token: a.request.getToken()
- },
- failStatus: function () {
- return !1;
- }
- }), !1);--*/
- return app.my_warnning("授权登入失败,请稍后再试!", 0, that);
- },
- fail: function (t) {
- return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1;
- }
- });
- },
-
- cancle_bind: function () {
- getApp().goto('/pages/user/index/index');
- }
-
-
-
-});
diff --git a/pages/getphone/getphone.json b/pages/getphone/getphone.json
deleted file mode 100644
index fb13409..0000000
--- a/pages/getphone/getphone.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "绑定手机",
- "usingComponents": {
- "warn": "/components/long_warn/long_warn"
- }
-}
diff --git a/pages/getphone/getphone.wxml b/pages/getphone/getphone.wxml
deleted file mode 100644
index e511fa5..0000000
--- a/pages/getphone/getphone.wxml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- {{store.store_name}}
- {{store.store_desc}}
-
- 暂不绑定
-
-
-
\ No newline at end of file
diff --git a/pages/getphone/getphone.wxss b/pages/getphone/getphone.wxss
deleted file mode 100644
index 3756909..0000000
--- a/pages/getphone/getphone.wxss
+++ /dev/null
@@ -1,40 +0,0 @@
-.all_page{
- position: fixed;
- height: 100%;
- width: 100%;
- background: #fff;
- justify-content: center;/*水平居中*/
-}
-.all_page .content{
- font-size: 30rpx;
- text-align: center;
- height: 400px;
- width: 100%;
- position: absolute;
- top: 50%;
- margin-top:-200px;
-}
-.logo{width: 140rpx; height: 140rpx; border-radius:50% }
-.all_page .content .title{
- font-size: 36rpx; margin: 20rpx 0
-}
-
-.all_page .btn{
- height: 80rpx;
- line-height: 80rpx;
- width: 580rpx;
- background: #fc661f;
- color:#fff;
- font-size: 32rpx;
- margin-top: 100rpx;
- border-radius: 5rpx;
-}
-.all_page .btn2{
- height: 80rpx;
- line-height: 80rpx;
- width: 580rpx;
- color:#999;
- font-size: 32rpx;
- border-radius: 5rpx;
- margin-top: 10rpx;
-}
\ No newline at end of file
diff --git a/pages/index/index/index.js b/pages/index/index/index.js
index 978e97e..1765275 100644
--- a/pages/index/index/index.js
+++ b/pages/index/index/index.js
@@ -277,8 +277,11 @@ Page({
async init_load() {
await getApp().getConfig_ays();
var th = this;
- await getApp().get_isbuy();
- this.setappdata(getApp().globalData.wxapp_buy_obj);
+ if(getApp().globalData.config2.is_overdue==1){
+ await getApp().get_isbuy();
+ this.setappdata(getApp().globalData.wxapp_buy_obj);
+ }
+
//因为营销版本的功能包含了自定义模板的功能,是同时的
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 4890523..ea6caa5 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -103,9 +103,11 @@ Page({
th = s,
need_money = 0,
cur_g_num = 0;
-
- //调用底部导航
- getApp().get_isbuy(th.setappdata);
+
+ if(getApp().globalData.config2.is_overdue==1){
+ //调用底部导航
+ getApp().get_isbuy(th.setappdata);
+ }
setTimeout(function () {
if (getApp().globalData.user_id) getApp().requestCardNum(th);
},500)