guhongwei 2 年之前
父节点
当前提交
b577a3b0ef
共有 5 个文件被更改,包括 17 次插入13 次删除
  1. 2 2
      components/mobile-frame/index.vue
  2. 1 1
      pages.json
  3. 2 2
      pagesMy/account/bindEmail.vue
  4. 1 1
      pagesMy/account/bindPhone.vue
  5. 11 7
      pagesMy/account/index.vue

+ 2 - 2
components/mobile-frame/index.vue

@@ -43,10 +43,10 @@
 					},
 					{
 						name: '分类',
-						route: 'pagesHome/market/type',
+						route: 'pages/week/index',
 						normal: require('@/static/type.png'),
 						active: require('@/static/type_1.png'),
-						type: '1'
+						type: '0'
 					},
 					{
 						name: '购物车',

+ 1 - 1
pages.json

@@ -33,7 +33,7 @@
 		{
 			"path": "pages/week/index",
 			"style": {
-				"navigationBarTitleText": "周边"
+				"navigationBarTitleText": "分类"
 			}
 		},
 		{

+ 2 - 2
pagesMy/account/bindEmail.vue

@@ -4,7 +4,7 @@
 			<view class="one">
 				<uni-forms ref="form" :modelValue="form" :rules="rules" label-width="auto">
 					<uni-forms-item label="电子邮箱" name="email">
-						<uni-easyinput type="number" v-model="form.email" placeholder="请输入电子邮箱" />
+						<uni-easyinput type="text" v-model="form.email" placeholder="请输入电子邮箱" />
 					</uni-forms-item>
 					<uni-forms-item label="邮箱验证码" name="code">
 						<view class="yzm">
@@ -12,7 +12,7 @@
 								<uni-easyinput type="text" v-model="form.code" placeholder="请输入您的邮箱验证码" />
 							</view>
 							<view class="r">
-								<button type="default" size="mini" @tap="sendCount">{{time_count==0?'发送验证码':time_count}}</button>
+								<button type="default" size="mini" @tap="sendCount">{{time_count==0?'验证码':time_count}}</button>
 							</view>
 						</view>
 					</uni-forms-item>

+ 1 - 1
pagesMy/account/bindPhone.vue

@@ -12,7 +12,7 @@
 								<uni-easyinput type="text" v-model="form.code" placeholder="请输入您的手机验证码" />
 							</view>
 							<view class="r">
-								<button type="default" size="mini" @tap="sendCount">{{time_count==0?'发送验证码':time_count}}</button>
+								<button type="default" size="mini" @tap="sendCount">{{time_count==0?'验证码':time_count}}</button>
 							</view>
 						</view>
 					</uni-forms-item>

+ 11 - 7
pagesMy/account/index.vue

@@ -12,7 +12,7 @@
 			</view>
 			<view class="one" @click="toCommon('/pagesMy/account/bindPhone')">
 				<view class="other">
-					<view class="title">{{phone.name}} <text>已绑定{{phone.phone}}</text> </view>
+					<view class="title">{{phone.name}} <text>{{phone.phone?`已绑定${phone.phone}`:'未绑定'}}</text> </view>
 					<view class="titles">{{phone.content}}</view>
 				</view>
 				<view class="btn">
@@ -21,7 +21,7 @@
 			</view>
 			<view class="one" @click="toCommon('/pagesMy/account/bindEmail')">
 				<view class="other">
-					<view class="title">{{email.name}}</view>
+					<view class="title">{{email.name}}<text>{{email.email?`已绑定${email.email}`:'未绑定'}}</text></view>
 					<view class="titles">{{email.content}}</view>
 				</view>
 				<view class="btn">
@@ -59,7 +59,8 @@
 				},
 				email: {
 					name: '绑定邮箱',
-					content: '未绑定邮箱,请及时绑定'
+					content: '未绑定邮箱,请及时绑定',
+					email: ''
 				},
 				info: {
 					name: '修改个人信息',
@@ -82,15 +83,18 @@
 						if (user) {
 							const arr = await that.$api(`/user/${user.id}`, 'GET');
 							if (arr.errcode == '0') {
-								if (arr.data && arr.data.phone) {
-									var phone = arr.data.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
+								let data=arr.data;
+								if (data && data.phone) {
+									var phone = data.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
 									that.$set(that.phone, `phone`, phone)
 								}
+								if (data && data.email) {
+									that.$set(that.email, `email`, arr.data.email)
+								}
 							} else {
 								uni.showToast({
 									title: arr.errmsg,
-									icon: 'error',
-									duration: 2000
+									icon: 'none',
 								});
 							}
 						}