chengjunhui 11 tuntia sitten
vanhempi
commit
4a47c82e34
1 muutettua tiedostoa jossa 14 lisäystä ja 9 poistoa
  1. 14 9
      pages/my/myData/myData.js

+ 14 - 9
pages/my/myData/myData.js

@@ -448,8 +448,11 @@ Page({
 				}
 				gender.unshift(all)
 				let sexI = 0;
+				console.log('_this.data.u==>?', _this.data.u)
 				if (_this.data.u.sex) {
 					let sex = _this.data.u.sex;
+					console.log('sex==>?', sex)
+					console.log(gender)
 					if (gender.length) {
 						for (let i = 0; i < gender.length; i++) {
 							if (gender[i].itemcode === sex) {
@@ -458,6 +461,7 @@ Page({
 						}
 					}
 				}
+				console.log('sexI==>?', sexI)
 				_this.setData({
 					sexArray: gender,
 					sexIndex: sexI
@@ -933,6 +937,7 @@ Page({
 					})
 					setTimeout(() => {
 						_this.PushVipInfo();
+						that.getNum();
 						if (_this.data.nolink === true) {
 							wx.switchTab({
 								url: '/pages/my/index/index'
@@ -1024,15 +1029,15 @@ Page({
 	getNum() {
 		let id = util.getUserId();
 		let _this = this;
-		App._get('member/completeNum/' + id, 'application/json',
-			null,
-			function (res) {
-				if (res.code === 0) {
-					_this.setData({
-						formNum: res.data || 0
-					})
-				}
+		App._get('member/completeNum/' + id, {}, res => {
+			console.log(res);
+			if (res.code === 0) {
+				this.setData({
+					formNum: res.data || 0
+				})
 			}
-		)
+		}, err => { }, complete => {
+
+		})
 	},
 })