xuqiaoying 2 년 전
부모
커밋
ef834edec3
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      pages/index/index.vue

+ 7 - 4
pages/index/index.vue

@@ -338,7 +338,7 @@ export default {
 			}
 			console.log('optObj:', this.optObj);
 			uni.setStorageSync('h5_code', this.optObj.code)
-			this.OfficialLogin()
+			// this.OfficialLogin()
 		} else {
 			// 没有code,就重定向到地址https://www.xyyxt.net?ask_type=h.xyyxt.net 去获取code,授权后就会把code带上然后访问域名,这时候你就拿到code了
 			if (!uni.getStorageSync('h5_code')) {
@@ -352,7 +352,7 @@ export default {
 				return
 			} else {
 				this.$set(this.optObj, 'code', uni.getStorageSync('h5_code'))
-				this.OfficialLogin()
+				// this.OfficialLogin()
 			}
 		}
 		// #endif
@@ -450,11 +450,14 @@ export default {
 				url: '/app/common/gzh_login',
 				method: 'post',
 				data: {
-					code: this.optObj.code
+					code: this.optObj.code || '011j2t0w3R1oNZ2Vh44w3sgS251j2t0B'
 				},
 				noToken: true
 			}).then((res) => {
-				if (res.data.code == 200) {}
+				if (res.data.code == 200) {
+				} else {
+					this.$u.toast(res.data.msg)
+				}
 			})
 		},
 		tobuy(item) {