| @@ -132,7 +132,9 @@ App({ | |||
| } | |||
| Http.setToken(res.data.token); | |||
| that.globalData.token = res.data.token; | |||
| console.log(that.globalData.token) | |||
| console.log(that.tokenCallback,"that.tokenCallback") | |||
| if (that.tokenCallback) { | |||
| that.tokenCallback(res.data.token); | |||
| } | |||
| @@ -223,6 +225,7 @@ App({ | |||
| }) | |||
| }, | |||
| globalData: { | |||
| userName:"",//用户名 | |||
| userAvatarUrl:"",//用户头像地址 | |||
| goHomeUrl:'/index/index', | |||
| mouldConfig:{},//模板尺寸 | |||
| @@ -2,7 +2,7 @@ const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | |||
| let weappId = extConfig.weappId; | |||
| let configUrls = extConfig.attr.configUrl; | |||
| let sockUrls = extConfig.attr.socketUrl; | |||
| var config = { | |||
| var config = { | |||
| url: configUrls, | |||
| wsurl: sockUrls, | |||
| api: { | |||
| @@ -5,7 +5,7 @@ var config = require("../config/config.js"); | |||
| let app = getApp(); | |||
| Component({ | |||
| data: { | |||
| home_a_img:[], | |||
| home_a_img: [], | |||
| selected: 0, | |||
| "color": "#abb1be", | |||
| "selectedColor": "#FD782D", | |||
| @@ -35,15 +35,15 @@ Component({ | |||
| } | |||
| ] | |||
| }, | |||
| created(){ | |||
| if(app.globalData.token){ | |||
| created() { | |||
| if (app.globalData.token) { | |||
| this.getType() | |||
| } | |||
| }, | |||
| // lifetimes: { | |||
| // attached: function () { | |||
| // // 在组件实例进入页面节点树时执行 | |||
| // }, | |||
| // }, | |||
| attached() { | |||
| @@ -89,14 +89,14 @@ Component({ | |||
| }, | |||
| methods: { | |||
| switchTab(e) { | |||
| // this.setData({ | |||
| // list: this.data.home_a_img | |||
| // }) | |||
| // console.log(this.data.home_a_img) | |||
| const data = e.currentTarget.dataset; | |||
| this.setData({ | |||
| this.setData({ | |||
| selected: data.index | |||
| }) | |||
| console.log(data.index) | |||
| @@ -104,7 +104,7 @@ Component({ | |||
| if (data.index == 0 || data.index == 3) { | |||
| this.getTemplateId() | |||
| } | |||
| wx.switchTab({ | |||
| url | |||
| }); | |||
| @@ -112,7 +112,7 @@ Component({ | |||
| /** | |||
| * 获取全局样式 | |||
| */ | |||
| getType() { | |||
| getType() { | |||
| Http.get({ | |||
| url: config.api.setType, | |||
| data: { | |||
| @@ -131,71 +131,71 @@ Component({ | |||
| }) | |||
| }, | |||
| // 初始换底部导航栏 | |||
| setTabStyle: function () { | |||
| console.log(app.globalData.mouldType,"mouldType") | |||
| if(app.globalData.mouldType==0){ | |||
| setTabStyle: function() { | |||
| console.log(app.globalData.mouldType, "mouldType") | |||
| if (app.globalData.mouldType == 0) { | |||
| this.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){ | |||
| } else if (app.globalData.mouldType == 1) { | |||
| 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": "我的" | |||
| } | |||
| "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": "我的" | |||
| } | |||
| ], | |||
| }) | |||
| } | |||
| }, | |||
| getTemplateId() { | |||
| // console.log("隐藏") | |||
| // wx.hideTabBar() | |||
| @@ -239,7 +239,7 @@ Component({ | |||
| Http.post({ | |||
| url: config.api.wxMsg | |||
| }).then(res => { | |||
| wx.setStorageSync({ | |||
| key: 'ifShowTab', | |||
| data: true, | |||
| @@ -248,20 +248,14 @@ Component({ | |||
| }) | |||
| return | |||
| } | |||
| // for (let i = 0; i < tmplIds.length;i++){ | |||
| // if (res.tmplIds[i] == 'accept'){ | |||
| // console.log("发送") | |||
| // } | |||
| // } | |||
| }, | |||
| complete(){ | |||
| complete() { | |||
| } | |||
| }) | |||
| }, | |||
| } | |||
| }) | |||
| @@ -81,7 +81,7 @@ | |||
| "provider": "wxfab2bf944bfc4da6" | |||
| }, | |||
| "live-player-plugin": { | |||
| "version": "1.2.5", | |||
| "version": "1.3.4", | |||
| "provider": "wx2b03c6e691cd7370" | |||
| } | |||
| }, | |||
| @@ -681,8 +681,9 @@ Page({ | |||
| token: token | |||
| } | |||
| }).then(res => { | |||
| if (res.data.avatarUrl){ | |||
| app.globalData.userAvatarUrl = res.data.avatarUrl | |||
| if (res.data.avatarUrl && res.data.nickName){ | |||
| app.globalData.userAvatarUrl = res.data.avatarUrl, | |||
| app.globalData.userName = res.data.nickName | |||
| } | |||
| that.setData({ | |||
| levelName: res.data.levelName, | |||
| @@ -23,7 +23,7 @@ | |||
| <view class="user-data fl" bindtap='gotoChengzhangzhi' style="{{typeLsit.sy_xxb.styleClass}}"> | |||
| <view class='nameBox'> | |||
| <!-- <open-data type="userNickName" style="{{typeLsit.sy_xxb_nf.styleClass}}"></open-data> --> | |||
| <p style="font-size: 26rpx;color:#292723;float: left;">{{userName}}</p> | |||
| <p style="font-size: 28rpx;color:#292723;float: left;">{{userName}}</p> | |||
| <view class='chengzhangBox' style='background:{{chengzhangBox}}'> | |||
| <text class='chengzhang'>{{levelName}}</text> | |||
| </view> | |||
| @@ -20,7 +20,7 @@ | |||
| </view> | |||
| <view class="user-name" bindtap='gotoedit'> | |||
| <!-- <open-data class="name" type="userNickName"></open-data> --> | |||
| <p style="font-size: 26rpx;color:#292723;float: left;">{{userName}}</p> | |||
| <p class="name" >{{userName}}</p> | |||
| <!-- 会员等级 --> | |||
| <!-- <view class=' usre_level'style='background:{{levelBg}}'> | |||
| <text class='chengzhang '>{{levelName}}</text> | |||
| @@ -370,7 +370,7 @@ Page({ | |||
| app.globalData.previewFlag = true | |||
| /* 判断是否授权*/ | |||
| Http.get({ | |||
| url: config.api.checkUserStatus, | |||
| url: config.api.checkUserStatus, | |||
| data: { | |||
| token: app.globalData.token | |||
| } | |||
| @@ -39,6 +39,7 @@ Page({ | |||
| sortOrder:'', | |||
| goHomeUrl:"", | |||
| userAvatarUrl:'',// | |||
| userName:'', | |||
| }, | |||
| qrcodeH: function () { | |||
| var that = this; | |||
| @@ -56,11 +57,12 @@ Page({ | |||
| }) | |||
| }, | |||
| onLoad: function (options) { | |||
| // console.log("app.globalData.userAvatarUrl", app.globalData.userAvatarUrl) | |||
| console.log(app.globalData.userName, app.globalData.userAvatarUrl,9999) | |||
| let that = this; | |||
| that.setData({ | |||
| goHomeUrl: app.globalData.goHomeUrl, | |||
| userAvatarUrl: app.globalData.userAvatarUrl, | |||
| userName: app.globalData.userName | |||
| }) | |||
| var todayDate = new Date().getTime(); | |||
| that.getPoints(); | |||
| @@ -13,7 +13,8 @@ | |||
| </view> | |||
| <view class='bot'> | |||
| <view class='myName'> | |||
| <open-data class="name" type="userNickName"></open-data> | |||
| <!-- <open-data class="name" type="userNickName"></open-data> --> | |||
| <p class="name">{{userName}}</p> | |||
| <view class=' usre_level'> | |||
| <text class='chengzhang '>{{levelName}}</text> | |||
| </view> | |||
| @@ -112,6 +112,7 @@ Page({ | |||
| // } else { | |||
| // if (that.data.orderFlag) { | |||
| that.getStaticGame() | |||
| var createDate = util.formatTime(res.data.orders[0].createDate, "yyyy-MM-dd hh:mm:ss"); | |||
| let tempData = res.data.orders[0] | |||
| tempData.deliveryInfo = tempData.deliveryInfo ? JSON.parse(tempData.deliveryInfo) : "" | |||
| @@ -690,8 +690,9 @@ Page({ | |||
| token: token | |||
| } | |||
| }).then(res => { | |||
| if (res.data.avatarUrl) { | |||
| app.globalData.userAvatarUrl = res.data.avatarUrl | |||
| if (res.data.avatarUrl && res.data.nickName) { | |||
| app.globalData.userAvatarUrl = res.data.avatarUrl, | |||
| app.globalData.userName = res.data.nickName | |||
| } | |||
| that.setData({ | |||
| levelName: res.data.levelName, | |||
| @@ -699,8 +700,8 @@ Page({ | |||
| upgradeScore: res.data.upgradeScore, | |||
| memberId: res.data.id, | |||
| credit: res.data.credit, | |||
| userAvatarUrl: res.data.avatarUrl, | |||
| userName: res.data.nickName, | |||
| userAvatarUrl: res.data.avatarUrl ? res.data.avatarUrl:'', | |||
| userName: res.data.nickName ? res.data.nickName:'', | |||
| }) | |||
| }) | |||
| .catch(err => { | |||
| @@ -23,7 +23,7 @@ | |||
| <view class='nameBox' bindtap="goIntegralmall"> | |||
| <!-- <open-data type="userNickName" style="{{typeLsit.sy_xxb_nf.styleClass}}"></open-data> --> | |||
| <!-- <open-data type="userNickName" style="font-size: 26rpx;color:#292723;"></open-data> --> | |||
| <p style="font-size: 26rpx;color:#292723;float: left;">{{userName}}</p> | |||
| <p style="font-size: 28rpx;color:#292723;float: left;">{{userName}}</p> | |||
| <!-- <image src="{{huanlechengImgurl+'home_ic_vip.png'}}" mode='widthFix'></image> --> | |||
| <view class="vgrade">{{levelName}}</view> | |||
| <view class="integralNum">积分:{{credit}}</view> | |||
| @@ -67,7 +67,6 @@ Page({ | |||
| mapThemeURL: config.url + `/fengniaoMapfile/${this.data.initMap.tenantId}/theme/`, | |||
| defaultThemeName: this.data.initMap.defaultThemeName, | |||
| defaultMapScaleLevel:19, | |||
| // compassOffset:[28,100] | |||
| }; | |||
| console.log(canvas,"canvas") | |||
| @@ -2,7 +2,7 @@ const config = require("../config/config.js"); | |||
| class HttpBasics { | |||
| constructor(address) { | |||
| if (address) { | |||
| this.address = address; | |||
| this.address = address; | |||
| } | |||
| } | |||
| /** | |||