guhongwei 2 lat temu
rodzic
commit
cc307c43de
3 zmienionych plików z 5 dodań i 4 usunięć
  1. 1 1
      common/api.js
  2. 1 0
      config.js
  3. 3 3
      pages/login/index.vue

+ 1 - 1
common/api.js

@@ -2,7 +2,7 @@ import config from '../config.js';
 const getDomain = (uri, method, type) => {
 	if (type && type == 'file') return config.serverUrl + '/files' + uri;
 	if (uri.startsWith('/wechat/api')) return config.serverUrl + uri;
-	else return config.serverUrl + '/tnhqApp/v1/api' + uri;
+	else return config.serverUrl + '/point/v1/api' + uri;
 }
 // 获取token
 const getToken = () => {

+ 1 - 0
config.js

@@ -4,6 +4,7 @@ export default {
   logoUrl: 'https://broadcast.waityou24.cn/files/point/indexModule/20221010124133.png',
   shareUrl:'https://broadcast.waityou24.cn/files/point/indexModule/20221011091759.png',
   point_title:'天恩活泉',
+  wx_projectkey:'tnhqApp',//pointApp
   china: [
     //全国地址
     {

+ 3 - 3
pages/login/index.vue

@@ -155,8 +155,8 @@
 						provider: 'weixin',
 						success: async function(res) {
 							const aee = await that.$api(`/wechat/api/login/app`, 'GET', {
-								js_code: res.code,
-								config: 'pointApp'
+								config: that.$config.wx_projectkey,
+								js_code: res.code
 							})
 							if (aee.errcode == '0') {
 								that.$set(that, `openid`, aee.data.openid);
@@ -267,7 +267,7 @@
 				let user = that.user;
 				let detail = e.detail;
 				let res = await that.$api(`/wechat/api/login/getPhone`, 'GET', {
-					config: 'pointApp',
+					config: that.$config.wx_projectkey,
 					code: detail.code
 				})
 				if (res.errcode == '0') {