Переглянути джерело

nickName偶尔为空的处理

release
[caserKing] 4 роки тому
джерело
коміт
cf8d3d9c4f
4 змінених файлів з 113 додано та 101 видалено
  1. +78
    -91
      ext.json
  2. +28
    -9
      pages/canvas/index.js
  3. +6
    -0
      pages/getuserinfo/index.js
  4. +1
    -1
      project.config.json

+ 78
- 91
ext.json Переглянути файл

@@ -1,97 +1,84 @@
{
"ext": {
"attr": {
"car": {
"tjd": {
"payPath": "",
"tjdAppId": "wx6945d1bda68d7993"
},
"etcp": {
"payPath": "pages/pay/order-pay-open/main",
"etcpAppId": "wxc07f9d67923d676d",
"etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback"
},
"bolink": {
"payPath": "pages/park/park",
"bolinkAppId": "wxbd08b4baa10fcc1d"
},
"version": "release"
},
"imgProxy": [
{
"newUrl": "https://c.malls.iformall.com/img",
"orgUrl": "https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn"
},
{
"newUrl": "https://c.malls.iformall.com/img1",
"orgUrl": "https://s3.cn-northwest-1.amazonaws.com.cn"
},
{
"newUrl": "https://c.malls.iformall.com/img2",
"orgUrl": "https://wx.qlogo.cn"
}
],
"configUrl": "https://c.malls.iformall.com/C/api",
"ifStoreApp": "0",
"ifHaveWebSocket": "0",
"ifHaveCarModular": "1"
"ext": {
"attr": {
"imgProxy": [
{
"newUrl": "https://ctest.malls.iformall.com/img",
"orgUrl": "https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn"
},
"name": "富茂链客生产版",
"weappId": "wx6a2524a8286d687f",
"appVersion": "C.5.1.1",
"plugins": {
"live-player-plugin": {
"version": "1.0.16",
"provider": "wx2b03c6e691cd7370"
}
}
},
"debug": false,
"tabBar": {
"list": [
{
"text": "首页",
"iconPath": "assets/images/home.png",
"pagePath": "index/index",
"selectedIconPath": "assets/images/home-a.png"
},
{
"text": "门店",
"iconPath": "assets/images/mendian.png",
"pagePath": "index/searchbar",
"selectedIconPath": "assets/images/mendian-a.png"
},
{
"text": "停车",
"iconPath": "assets/images/park.png",
"pagePath": "index/passCar",
"selectedIconPath": "assets/images/park-a.png"
},
{
"text": "我的",
"iconPath": "assets/images/user.png",
"pagePath": "index/user",
"selectedIconPath": "assets/images/user-a.png"
}
],
"custom": true
},
"window": {
"backgroundTextStyle": "dark",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF"
},
"extAppid": "wx6a2524a8286d687f",
"extEnable": true,
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
{
"newUrl": "https://ctest.malls.iformall.com/img1",
"orgUrl": "https://s3.cn-northwest-1.amazonaws.com.cn"
},
{
"newUrl": "https://ctest.malls.iformall.com/img2",
"orgUrl": "https://wx.qlogo.cn"
}
],
"configUrl": "https://ctest.malls.iformall.com/C/api",
"etcpAppId": "wx192b7d2e8dcbefd0",
"etcpVersion": "release",
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback",
"ifHaveWebSocket": "0",
"ifHaveCarModular": "1"
},
"directCommit": false,
"networkTimeout": {
"request": 30000,
"downloadFile": 10000
"name": "金泸商务",
"weappId": "wx649b3be73c1afe47",
"appVersion": "C.test.5.2.0"
},
"debug": false,
"tabBar": {
"list": [
{
"text": "首页",
"iconPath": "assets/images/home.png",
"pagePath": "index/index",
"selectedIconPath": "assets/images/home-a.png"
},
{
"text": "门店",
"iconPath": "assets/images/mendian.png",
"pagePath": "index/searchbar",
"selectedIconPath": "assets/images/mendian-a.png"
},
{
"text": "停车",
"iconPath": "assets/images/park.png",
"pagePath": "index/passCar",
"selectedIconPath": "assets/images/park-a.png"
},
{
"text": "我的",
"iconPath": "assets/images/user.png",
"pagePath": "index/user",
"selectedIconPath": "assets/images/user-a.png"
}
],
"color": "#abb1be",
"selectedColor": "#b2743d"
},
"window": {
"backgroundTextStyle": "dark",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF"
},
"plugins": {
"live-player-plugin": {
"version": "1.0.11",
"provider": "wx2b03c6e691cd7370"
}
},
"extAppid": "wx649b3be73c1afe47",
"extEnable": true,
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"directCommit": false,
"networkTimeout": {
"request": 30000,
"downloadFile": 10000
}
}

+ 28
- 9
pages/canvas/index.js Переглянути файл

@@ -33,9 +33,9 @@ Page({
that.getList(options.merchantId);
that.getCouponList(options.merchantId);
}
this.getUserInfo();
this.getMallInfo();
this.begainDrawShareImage(options);
this.getUserInfo(options);
},

/**
@@ -372,21 +372,39 @@ Page({
});
},
//获取头像和昵称
getUserInfo: function() {
getUserInfo: function (options) {
let that = this;
// 获取用户信息
Http.get({
url: config.api.getScore,
data: {}
}).then(res => {
that.setData({
nickName: res.data.nickName,
avatarUrl: res.data.avatarUrl
});
let nickName = '';
if (res.data.nickName == undefined || res.data.nickName == undefined) {
wx.getUserInfo({
success: function (data) {
nickName = data.userInfo.nickName;
that.setData({
nickName: nickName,
avatarUrl: data.userInfo.avatarUrl
});
that.getMallInfo(options);
}
})
} else {
nickName = res.data.nickName;
that.setData({
nickName: nickName,
avatarUrl: res.data.avatarUrl
});
that.getMallInfo(options);
}
});
},
//商场信息
getMallInfo: function() {
getMallInfo: function (options) {
let that = this;
// 获取用户信息
Http.get({
@@ -397,6 +415,7 @@ Page({
that.setData({
mallname: res.data.name
});
that.begainDrawShareImage(options);
});
},
/**


+ 6
- 0
pages/getuserinfo/index.js Переглянути файл

@@ -108,6 +108,8 @@ Page({
let that = this;
var iv = e.detail.iv;
var encryptedData = e.detail.encryptedData;
wx.getUserInfo({
success: function (res) {
Http.post({
url: config.api.getUserInfo,
data: {
@@ -315,6 +317,10 @@ Page({
mask: false
});
})

}
})
},
getGameOne: function (token, id) {
let _this = this;


+ 1
- 1
project.config.json Переглянути файл

@@ -27,7 +27,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.5.0",
"appid": "wx453ae0d37f3550d0",
"appid": "wxfa336cad86ed598d",
"projectname": "oldC",
"isGameTourist": false,
"simulatorType": "wechat",


Завантаження…
Відмінити
Зберегти