diff --git a/ext.json b/ext.json index 3c0587f..34dfe10 100644 --- a/ext.json +++ b/ext.json @@ -1,7 +1,14 @@ { "ext": { "attr": { - "mchId": "1602801645", + "car": { + "etcp": { + "etcpAppId": "wx192b7d2e8dcbefd0", + "etcpVersion": "release", + "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" + } + }, + "mchId": "1604439800", "imgProxy": [ { "newUrl": "https://ctest.malls.iformall.com/img", @@ -17,16 +24,12 @@ } ], "configUrl": "https://ctest.malls.iformall.com/C/api", - "etcpAppId": "wx219a81b9c87aa4f7", - "etcpVersion": "release", "businessSwitch": "1", - "businessVersion": "1", - "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", "ifHaveWebSocket": "0", "ifHaveCarModular": "1" }, - "name": "富茂光谷测试版", - "weappId": "wx219a81b9c87aa4f7", + "name": "金泸商务", + "weappId": "wx649b3be73c1afe47", "appVersion": "C.test.5.2.0" }, "debug": false, @@ -74,15 +77,15 @@ }, "plugins": { "auto-points-plugin": { - "version": "2.4.0", + "version": "1.3.0", "provider": "wxfab2bf944bfc4da6" }, "live-player-plugin": { - "version": "1.2.5", + "version": "1.3.4", "provider": "wx2b03c6e691cd7370" } }, - "extAppid": "wx219a81b9c87aa4f7", + "extAppid": "wx649b3be73c1afe47", "extEnable": true, "permission": { "scope.userLocation": { diff --git a/pages/setUserInfo/index.js b/pages/setUserInfo/index.js index 02a97e2..c9b20ce 100644 --- a/pages/setUserInfo/index.js +++ b/pages/setUserInfo/index.js @@ -2,6 +2,7 @@ let app = getApp(); const Http = require("../../utils/HttpBasics"); const bgColor = require("../../utils/bgColor.js") const config = require("../../config/config"); +const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0' Page({ @@ -9,6 +10,7 @@ Page({ * 页面的初始数据 */ data: { + navigationBarHeight, avatarUrl: defaultAvatarUrl, theme: wx.getSystemInfoSync().theme, typeLsit: {}, @@ -46,22 +48,31 @@ Page({ avatarUrl: this.data.avatarUrl, nickName: e.detail.value.nickname } - Http.post({ - url: "/user/updateUserInfo", - data, - }).then(res => { - if (res.code == 200) { - wx.showToast({ - title: '更改成功!', - duration: 2000 - }) - setTimeout(() => { - wx.navigateBack() - }, 2000) - } - }).catch(err => { - console.log(err); - }) + if (data.nickName) { + Http.post({ + url: "/user/updateUserInfo", + data, + }).then(res => { + if (res.code == 200) { + wx.showToast({ + title: '更改成功', + icon: 'success', + duration: 2000 + }) + setTimeout(() => { + wx.navigateBack() + }, 2000) + } + }).catch(err => { + console.log(err); + }) + } else { + wx.showToast({ + title: '请输入昵称', + icon: 'error', + duration: 2000 + }) + } }, /** diff --git a/pages/setUserInfo/index.wxml b/pages/setUserInfo/index.wxml index 126ee59..c36d4a2 100644 --- a/pages/setUserInfo/index.wxml +++ b/pages/setUserInfo/index.wxml @@ -1,15 +1,17 @@ - + + - - 点击更换头像 - -
+ + 头像 + + + + 昵称
-
\ No newline at end of file diff --git a/pages/setUserInfo/index.wxss b/pages/setUserInfo/index.wxss index c157a2d..3be3841 100644 --- a/pages/setUserInfo/index.wxss +++ b/pages/setUserInfo/index.wxss @@ -1,36 +1,47 @@ @import "../../app.wxss"; .container { - margin-top: 200rpx; + margin-top: 30rpx; padding: 0 40rpx 0 40rpx; - text-align: center; } -.avatar-wrapper { +.avatar { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 50rpx; +} + +.avatarBtn { + width: 100rpx; + height: 100rpx; + border: 1px #b6b6b6 solid; + border-radius: 50%; + margin: 0; padding: 0; - width: 103rpx !important; - border-radius: 10rpx; - margin-top: 40rpx; - margin-bottom: 40rpx; } -.avatar { - display: block; - width: 56px; - height: 56px; +.avatarCover { + width: 100%; + height: 100%; } -.des { - margin-bottom: 30rpx; +.form { + position: relative; } -.submit { - margin-top: 40rpx; +.nickName { + position: absolute; + top: 18rpx; + width: 60rpx; } .input { - text-align: left; + text-align: right; padding-left: 20rpx; height: 70rpx; - border-bottom: 1px solid #afafaf; +} + +.submit { + margin-top: 50rpx; } \ No newline at end of file diff --git a/pages/site/site.wxml b/pages/site/site.wxml index 27d1e2b..fcd0c7c 100644 --- a/pages/site/site.wxml +++ b/pages/site/site.wxml @@ -1,14 +1,17 @@ - - 我的个人信息 - - - - 我的子女信息 - - - - 我的收货地址 - + + + + 我的个人信息 + + + + 我的子女信息 + + + + 我的收货地址 + + \ No newline at end of file diff --git a/pages/site/site.wxss b/pages/site/site.wxss index 490cac6..d17b163 100644 --- a/pages/site/site.wxss +++ b/pages/site/site.wxss @@ -1,19 +1,22 @@ /* pages/site/site.wxss */ -.item{ - position: relative; +.items { + text-align: center; + padding: 0 25rpx 0 25rpx; +} + +.item { + display: flex; + justify-content: space-between; + align-items: center; text-align: center; - width: 88%; height: 80rpx; line-height: 80rpx; border-radius: 16rpx; - border: 1rpx #333 solid; - margin: 20rpx auto + margin: 20rpx 0 20rpx 0 } -.logo{ + +.logo { width: 50rpx; - position: absolute; - right: 10rpx; - top: 0rpx; font-size: 36rpx; color: rgba(0, 0, 0, 0.8); } \ No newline at end of file