Jelajahi Sumber

增加昵称和性别(对应PC端会员信息)

htc 14 jam lalu
induk
melakukan
d6ee922096
1 mengubah file dengan 32 tambahan dan 2 penghapusan
  1. 32 2
      pagesMy/information.vue

+ 32 - 2
pagesMy/information.vue

@@ -12,9 +12,28 @@
 				</view>
 			</view>
 			<view class="item adfacjb">
-				<view class="left">用户名</view>
+				<view class="left">昵称</view>
 				<view class="right">
-					<input class="setinp" v-model="userInfo.realName" placeholder="请输入用户名"></input>
+					<input class="setinp" v-model="userInfo.nickName" placeholder="请输入昵称"></input>
+				</view>
+			</view>
+			<view class="item adfacjb">
+				<view class="left">姓名</view>
+				<view class="right">
+					<input class="setinp" v-model="userInfo.realName" placeholder="请输入姓名"></input>
+				</view>
+			</view>
+			<view class="item adfacjb">
+				<view class="left">性别</view>
+				<view class="right">
+					<up-radio-group
+					    v-model="userInfo.gender"
+					    placement="row">
+						<view class="adfac" style="width: 100%;justify-content: flex-end;">
+							<u-radio activeColor="#B7F358" label="男" :name="0"></u-radio>
+							<u-radio activeColor="#B7F358" label="女" :name="1"></u-radio>
+						</view>
+					</up-radio-group>
 				</view>
 			</view>
 			<view class="item adfacjb">
@@ -144,6 +163,7 @@
 			proxy.$api.get(`/wx/${JSON.parse(uni.getStorageSync('userInfo')).id}`).then(({data:res})=>{
 				if(res.code!==0) return proxy.$showToast(res.msg)
 				userInfo.value = res.data;
+				userInfo.value.gender = Number(userInfo.value.gender||-1);
 			})
 		}catch(e){
 			userInfo.value = null
@@ -156,6 +176,16 @@
 </script>
 
 <style scoped lang="scss">
+	::v-deep .u-radio__text{
+		font-size: 30rpx !important;
+		color: #252525 !important;
+		line-height: 42rpx !important;
+		text-align: right !important;
+	}
+	::v-deep .u-radio__icon-wrap{
+		margin-left: 60rpx !important;
+	}
+	
 	.common_page{
 		.form{
 			background: #FFFFFF;