diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index e3333ce..3d5d1a0 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -10,29 +10,29 @@ Component({ "color": "#abb1be", "selectedColor": "#FD782D", "list": [{ - "pagePath": "/index/index", - "iconPath": "../assets/images/home.png", - "selectedIconPath": "../assets/images/home-a.png", - "text": "首页" - }, - { - "pagePath": "/index/searchbar", - "iconPath": "../assets/images/mendian.png", - "selectedIconPath": "../assets/images/mendian-a.png", - "text": "门店" - }, - { - "pagePath": "/index/passCar", - "iconPath": "../assets/images/park.png", - "selectedIconPath": "../assets/images/park-a.png", - "text": "停车" - }, - { - "pagePath": "/index/user", - "iconPath": "../assets/images/user.png", - "selectedIconPath": "../assets/images/user-a.png", - "text": "我的" - } + "pagePath": "/index/index", + "iconPath": "../assets/images/home.png", + "selectedIconPath": "../assets/images/home-a.png", + "text": "首页" + }, + { + "pagePath": "/index/searchbar", + "iconPath": "../assets/images/mendian.png", + "selectedIconPath": "../assets/images/mendian-a.png", + "text": "门店" + }, + { + "pagePath": "/index/passCar", + "iconPath": "../assets/images/park.png", + "selectedIconPath": "../assets/images/park-a.png", + "text": "停车" + }, + { + "pagePath": "/index/user", + "iconPath": "../assets/images/user.png", + "selectedIconPath": "../assets/images/user-a.png", + "text": "我的" + } ] }, created() { @@ -50,39 +50,39 @@ Component({ if (ifStoreApp == 1) { this.setData({ list: [{ - "pagePath": "/index/index", - "iconPath": "../assets/images/home.png", - "selectedIconPath": "../assets/images/home-a.png", - "text": "首页" - }, - { - "pagePath": "/index/user", - "iconPath": "../assets/images/user.png", - "selectedIconPath": "../assets/images/user-a.png", - "text": "我的" - } + "pagePath": "/index/index", + "iconPath": "../assets/images/home.png", + "selectedIconPath": "../assets/images/home-a.png", + "text": "首页" + }, + { + "pagePath": "/index/user", + "iconPath": "../assets/images/user.png", + "selectedIconPath": "../assets/images/user-a.png", + "text": "我的" + } ] }) } else if (ifStoreApp == 2) { this.setData({ list: [{ - "pagePath": "/index/index", - "iconPath": "../assets/images/home.png", - "selectedIconPath": "../assets/images/home-a.png", - "text": "首页" - }, - { - "pagePath": "/index/searchbar", - "iconPath": "../assets/images/mendian.png", - "selectedIconPath": "../assets/images/mendian-a.png", - "text": "门店" - }, - { - "pagePath": "/index/user", - "iconPath": "../assets/images/user.png", - "selectedIconPath": "../assets/images/user-a.png", - "text": "我的" - } + "pagePath": "/index/index", + "iconPath": "../assets/images/home.png", + "selectedIconPath": "../assets/images/home-a.png", + "text": "首页" + }, + { + "pagePath": "/index/searchbar", + "iconPath": "../assets/images/mendian.png", + "selectedIconPath": "../assets/images/mendian-a.png", + "text": "门店" + }, + { + "pagePath": "/index/user", + "iconPath": "../assets/images/user.png", + "selectedIconPath": "../assets/images/user-a.png", + "text": "我的" + } ] }) } @@ -131,64 +131,65 @@ Component({ }) }, // 初始换底部导航栏 - setTabStyle: function() { + setTabStyle: function () { + const that = this console.log(app.globalData.mouldType, "mouldType") if (app.globalData.mouldType == 0) { - this.getTabBar().setData({ + that.getTabBar().setData({ selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, list: [{ - "pagePath": "/index/index", - "iconPath": `${app.globalData.styleLsit.t_in.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, - "text": "首页" - }, - { - "pagePath": "/index/searchbar", - "iconPath": `${app.globalData.styleLsit.t_md.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, - "text": "门店" - }, - { - "pagePath": "/index/passCar", - "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, - "text": "停车" - }, - { - "pagePath": "/index/user", - "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, - "text": "我的" - } + "pagePath": "/index/index", + "iconPath": `${app.globalData.styleLsit.t_in.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, + "text": "首页" + }, + { + "pagePath": "/index/searchbar", + "iconPath": `${app.globalData.styleLsit.t_md.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, + "text": "门店" + }, + { + "pagePath": "/index/passCar", + "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, + "text": "停车" + }, + { + "pagePath": "/index/user", + "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, + "text": "我的" + } ], }) } else if (app.globalData.mouldType == 1) { - this.getTabBar().setData({ + that.getTabBar().setData({ selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, list: [{ - "pagePath": "/pages/theme/index1/index", - "iconPath": `${app.globalData.styleLsit.t_in.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, - "text": "首页" - }, - { - "pagePath": "/index/searchbar", - "iconPath": `${app.globalData.styleLsit.t_md.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, - "text": "门店" - }, - { - "pagePath": "/index/passCar", - "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, - "text": "停车" - }, - { - "pagePath": "/index/user", - "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, - "text": "我的" - } + "pagePath": "/pages/theme/index1/index", + "iconPath": `${app.globalData.styleLsit.t_in.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, + "text": "首页" + }, + { + "pagePath": "/index/searchbar", + "iconPath": `${app.globalData.styleLsit.t_md.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, + "text": "门店" + }, + { + "pagePath": "/index/passCar", + "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, + "text": "停车" + }, + { + "pagePath": "/index/user", + "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, + "text": "我的" + } ], }) diff --git a/ext.json b/ext.json index 34dfe10..948869d 100644 --- a/ext.json +++ b/ext.json @@ -1,14 +1,7 @@ { "ext": { "attr": { - "car": { - "etcp": { - "etcpAppId": "wx192b7d2e8dcbefd0", - "etcpVersion": "release", - "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" - } - }, - "mchId": "1604439800", + "mchId": "1623869862", "imgProxy": [ { "newUrl": "https://ctest.malls.iformall.com/img", @@ -24,12 +17,16 @@ } ], "configUrl": "https://ctest.malls.iformall.com/C/api", + "etcpAppId": "wx219a81b9c87aa4f7", + "etcpVersion": "release", + "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", "businessSwitch": "1", + "businessVersion": "1", "ifHaveWebSocket": "0", "ifHaveCarModular": "1" }, - "name": "金泸商务", - "weappId": "wx649b3be73c1afe47", + "name": "富茂光谷测试版", + "weappId": "wx219a81b9c87aa4f7", "appVersion": "C.test.5.2.0" }, "debug": false, @@ -77,15 +74,15 @@ }, "plugins": { "auto-points-plugin": { - "version": "1.3.0", + "version": "2.4.0", "provider": "wxfab2bf944bfc4da6" }, "live-player-plugin": { - "version": "1.3.4", + "version": "1.2.5", "provider": "wx2b03c6e691cd7370" } }, - "extAppid": "wx649b3be73c1afe47", + "extAppid": "wx219a81b9c87aa4f7", "extEnable": true, "permission": { "scope.userLocation": { diff --git a/pages/theme/index1/index.js b/pages/theme/index1/index.js index 5b9b6be..4b052cb 100644 --- a/pages/theme/index1/index.js +++ b/pages/theme/index1/index.js @@ -1,6 +1,8 @@ const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} +console.log(extConfig, 'extConfig'); let ifStoreApp = extConfig.attr.ifStoreApp; let businessSwitch = extConfig.attr.businessSwitch +let businessVersion = extConfig.attr.businessVersion let mch_id = extConfig.attr.mchId const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" const Http = require("../../../utils/HttpBasics"); @@ -9,6 +11,7 @@ const config = require("../../../config/config"); const QR = require("../../../utils/memberqrcode.js"); const util = require("../../../utils/util"); const bgColor = require("../../../utils/bgColor.js") +const myPluginInterface = requirePlugin('auto-points-plugin') let app = getApp(); Page({ data: { @@ -31,7 +34,7 @@ Page({ huanlechengImgurl: "https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/", mch_id: mch_id, goUrl: "", //商圈跳转链接 - accreditFlag: 1, //1是未授权微信且未授权手机号 2授权了微信 没授权手机号 3微信和手机号都授权了 + accreditFlag: 1, //1:未授权微信且未授权手机号,2:授权了微信没授权手机号,3:微信和手机号都授权了 businessSwitch: businessSwitch, typeLsit: {}, showLocationIf: true, @@ -109,8 +112,8 @@ Page({ squareName: "", //当前广场 isShowSqare: false, moduleList: [], //按钮列表 - userAvatarUrl:"", - userName:"", + userAvatarUrl: "", + userName: "", }, getBusineData(e) { this.setData({ @@ -565,53 +568,49 @@ Page({ // 初始换底部导航栏 setTabStyle: function () { - Http.get({ - url: config.api.setType, - data: { - mouldType: app.globalData.mouldType - } - }).then(res => { - const { - code, - data - } = res - if (code == 200) { - app.globalData.styleLsit = data - this.getTabBar().setData({ - selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, - list: [{ - "pagePath": "/pages/theme/index1/index", - "iconPath": `${app.globalData.styleLsit.t_in.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, - "text": "首页" - }, - { - "pagePath": "/index/searchbar", - "iconPath": `${app.globalData.styleLsit.t_md.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, - "text": "门店" - }, - { - "pagePath": "/index/passCar", - "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, - "text": "停车" - }, - { - "pagePath": "/index/user", - "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, - "text": "我的" - } - ], - }) - } - // console.log(this.data.list[0].selectedIconPath, '99999999999999999999999999999999999999999') - }) - - - - + Http.get({ + url: config.api.setType, + data: { + mouldType: app.globalData.mouldType + } + }).then(res => { + const { + code, + data + } = res + if (code == 200) { + app.globalData.styleLsit = data + this.getTabBar().setData({ + selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, + list: [{ + "pagePath": "/pages/theme/index1/index", + "iconPath": `${app.globalData.styleLsit.t_in.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, + "text": "首页" + }, + { + "pagePath": "/index/searchbar", + "iconPath": `${app.globalData.styleLsit.t_md.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, + "text": "门店" + }, + { + "pagePath": "/index/passCar", + "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, + "text": "停车" + }, + { + "pagePath": "/index/user", + "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, + "text": "我的" + } + ], + }) + } + // console.log(this.data.list[0].selectedIconPath, '99999999999999999999999999999999999999999') + }) }, onShow: function () { console.log(app.globalData.mouldType, "mouldType") @@ -623,12 +622,23 @@ Page({ this.uesrInfo() if (businessSwitch) { let openId = wx.getStorageSync("openId") - this.setData({ - goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}` + let member_status = 0 + myPluginInterface.getAuthStatus(openId, this.data.mch_id).then(res => { + member_status = res.status + console.log(res.status, 'member_status') }) + if (businessVersion) { + this.setData({ + goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}&member_status=${1}` + }) + } else { + this.setData({ + goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}` + }) + } } - console.log(JSON.stringify(app.globalData.styleLsit),"styleLsit") - + console.log(JSON.stringify(app.globalData.styleLsit), "styleLsit") + this.ifShowSqare(); if (wx.getStorageSync("squareList") && wx.getStorageSync("selectedMall")) { @@ -685,7 +695,7 @@ Page({ getmemberId: function (token) { let that = this; Http.get({ - url: config.api.getScore, + url: config.api.getScore, data: { token: token } @@ -700,8 +710,8 @@ Page({ upgradeScore: res.data.upgradeScore, memberId: res.data.id, credit: res.data.credit, - userAvatarUrl: res.data.avatarUrl ? res.data.avatarUrl:'', - userName: res.data.nickName ? res.data.nickName:'', + userAvatarUrl: res.data.avatarUrl ? res.data.avatarUrl : '', + userName: res.data.nickName ? res.data.nickName : '', }) }) .catch(err => { @@ -1219,8 +1229,7 @@ Page({ //限时抢购的详情页面 gotodetail: function (e) { wx.navigateTo({ - url: `/pages/coupon/detail/index?couponChannelId=${ - e.currentTarget.dataset.couponchannelid + url: `/pages/coupon/detail/index?couponChannelId=${e.currentTarget.dataset.couponchannelid }&couponId=${e.currentTarget.dataset.couponid}` }); }, diff --git a/pages/theme/index1/index.wxml b/pages/theme/index1/index.wxml index 7210e13..b8d7bd9 100644 --- a/pages/theme/index1/index.wxml +++ b/pages/theme/index1/index.wxml @@ -121,7 +121,7 @@ 您今日签到成功,获得{{fistLogin}}成长值 - + diff --git a/project.private.config.json b/project.private.config.json index c253fce..dc2cbdc 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -4,5 +4,5 @@ "setting": { "compileHotReLoad": true }, - "libVersion": "2.11.2" + "libVersion": "2.21.4" } \ No newline at end of file