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