From 7b4f9fa9fa7cb6c2d81615b962051f9e36613d34 Mon Sep 17 00:00:00 2001
From: "[caserKing]" <[wkx12138@126.com]>
Date: Tue, 11 Aug 2020 11:44:58 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=88=E6=9D=83=E6=89=8B=E6=9C=BA=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ext.json | 71 ++++++++++++++++---------------------
index/user.js | 23 ++++++++++++
index/user.wxml | 10 ++++++
index/user.wxss | 3 +-
pages/getphoneInfo/index.js | 9 +++++
project.config.json | 2 +-
6 files changed, 76 insertions(+), 42 deletions(-)
diff --git a/ext.json b/ext.json
index 3fa4222..c94ab09 100644
--- a/ext.json
+++ b/ext.json
@@ -1,20 +1,16 @@
{
"ext": {
"attr": {
- "imgProxy": [
- {
- "newUrl": "https://ctest.malls.iformall.com/img",
- "orgUrl": "https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn"
- },
- {
- "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"
- }
- ],
+ "imgProxy": [{
+ "newUrl": "https://ctest.malls.iformall.com/img",
+ "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com"
+ }, {
+ "newUrl": "https://ctest.malls.iformall.com/img1",
+ "orgUrl": "https://formall.oss-accelerate.aliyuncs.com"
+ }, {
+ "newUrl": "https://ctest.malls.iformall.com/img2",
+ "orgUrl": "https://wx.qlogo.cn"
+ }],
"configUrl": "https://ctest.malls.iformall.com/C/api",
"etcpAppId": "wx192b7d2e8dcbefd0",
"etcpVersion": "release",
@@ -28,32 +24,27 @@
},
"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"
- }
- ],
+ "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"
},
diff --git a/index/user.js b/index/user.js
index 6cbfc29..edada71 100644
--- a/index/user.js
+++ b/index/user.js
@@ -36,6 +36,7 @@ Page({
mineFlag: "",
flag: 'hidden',
score: '0',
+ curPhone: '',
name: "",
birthdate: "",
sex: "",
@@ -62,6 +63,15 @@ Page({
})
})
},
+ gotoPhoneInfo() {
+ /**
+ * 将值传到用户手机号授权的页面
+ *
+ */
+ wx.redirectTo({
+ url: `/pages/getphoneInfo/index?path=main`
+ });
+ },
/**
* 跳转到成长值的页面
*/
@@ -230,8 +240,21 @@ Page({
showEdit: true
})
}
+ let curPhone = res.data.phone?res.data.phone:'';
+ if (curPhone) {
+ let curPhoneList = curPhone.split('');
+ let curPhoneList01 = [];
+ curPhoneList.forEach((item,index) => {
+ if (index>=3 && index<=6) {
+ item = '*';
+ }
+ curPhoneList01.push(item);
+ })
+ curPhone = curPhoneList01.join('');
+ }
that.setData({
score: res.data.score,
+ curPhone: curPhone,
levelName: res.data.levelName,
})
if (res.data.nickName) {
diff --git a/index/user.wxml b/index/user.wxml
index 92824ba..4528b0a 100644
--- a/index/user.wxml
+++ b/index/user.wxml
@@ -21,6 +21,16 @@
{{levelName}}
+
+
+ 我的手机号:
+ {{curPhone}}
+ [微信授权手机号]
+
+
+ 获取微信授权手机号
+
+
我的
成长值{{score}}
diff --git a/index/user.wxss b/index/user.wxss
index 77a6097..4b3226e 100644
--- a/index/user.wxss
+++ b/index/user.wxss
@@ -54,8 +54,9 @@ page{
line-height: 44rpx;
font-size: 36rpx;
color: #000;
- padding:20rpx;
+ padding: 0 20rpx 20rpx;
text-align: center;
+ margin-top:20rpx;
}
.user-avatar {
position: absolute;
diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js
index eb4b156..879d2c3 100755
--- a/pages/getphoneInfo/index.js
+++ b/pages/getphoneInfo/index.js
@@ -76,6 +76,15 @@ Page({
}
}).then(res=>{
app.globalData.phone = res.data.phone;
+ /**
+ * 来自我的
+ */
+ if (that.data.path == 'main') {
+ wx.switchTab({
+ url: `/index/user`
+ })
+ return;
+ }
/**
* 来自积分兑换
*/
diff --git a/project.config.json b/project.config.json
index 850364e..378754f 100644
--- a/project.config.json
+++ b/project.config.json
@@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
- "urlCheck": true,
+ "urlCheck": false,
"es6": true,
"enhance": false,
"postcss": true,