guhongwei 2 năm trước cách đây
mục cha
commit
a61e939aec
2 tập tin đã thay đổi với 10 bổ sung5 xóa
  1. 7 1
      config.js
  2. 3 4
      pages/login/index.vue

+ 7 - 1
config.js

@@ -2,10 +2,16 @@
 const wx_min = uni.getAccountInfoSync();
 // 设备信息
 const system = uni.getSystemInfoSync();
+let wx_projectkey = 'tnhqApp';
+
+if (system.uniPlatform == 'mp-weixin') {
+	let envV = wx_min.miniProgram.envVersion;
+	if (envV == 'develop' || envV == 'trial') wx_projectkey = 'pointApp';
+}
 export default {
 	serverUrl: 'https://broadcast.waityou24.cn',
 	// serverUrl: 'http://192.168.223.1:12111',
-	wx_projectkey: 'tnhqApp', //pointApp
+	wx_projectkey: wx_projectkey,
 	wx_miniProgram: wx_min.miniProgram,
 	system: system,
 	wx_dev: 'dev',

+ 3 - 4
pages/login/index.vue

@@ -179,10 +179,9 @@
 						that.searchOpenid();
 					},
 					fail: function(err) {
-						uni.showToast({
-							title: err.errMsg,
-							icon: 'none'
-						})
+						let system = that.$config.system;
+						that.$set(that, `system`, system);
+						that.searchOpenid();
 					}
 				})
 			},