YY 2 سال پیش
والد
کامیت
5f05786e82
1فایلهای تغییر یافته به همراه24 افزوده شده و 12 حذف شده
  1. 24 12
      pagesMy/account/upBasic.vue

+ 24 - 12
pagesMy/account/upBasic.vue

@@ -61,27 +61,39 @@
 						}]
 					},
 				},
-				genderList: [{
-						label: '保密',
-						value: '0'
-					},
-					{
-						label: '男',
-						value: '1'
-					},
-					{
-						label: '女',
-						value: '2'
-					},
+				genderList: [
+					// {
+					// 	label: '保密',
+					// 	value: '0'
+					// },
+					// {
+					// 	label: '男',
+					// 	value: '1'
+					// },
+					// {
+					// 	label: '女',
+					// 	value: '2'
+					// },
 				],
 				icon: []
 			};
 		},
 		onLoad: function(e) {
 			const that = this;
+			that.searchOther();
 			that.watchLogin();
 		},
 		methods: {
+			async searchOther(){
+				const that = this;
+				let res;
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "gender"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `genderList`, res.data)
+				}
+			},
 			watchLogin() {
 				const that = this;
 				uni.getStorage({