Kaynağa Gözat

条件编译小程序和h5

xuqiaoying 2 yıl önce
ebeveyn
işleme
bbce187d85

+ 8 - 7
common/request.js

@@ -5,23 +5,23 @@ import method from '@/common/methodTool.js'
 import api from './api.js'
 var num = 1
 //接口api   
-export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地
 // export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
 
  //图片上传api
-export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 // web_view的
 // export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release-祥粤云学堂
-export const WEBVIEW_URL = 'https://cm.xyyxt.net/'  //release-祥粤学堂
+// export const WEBVIEW_URL = 'https://cm.xyyxt.net/'  //release-祥粤学堂
 // export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
-// export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境-祥粤云学堂
+export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境-祥粤云学堂
 // export const WEBVIEW_URL = 'http://120.79.166.78:18011/' // 测试环境-祥粤学堂  
 // export const WEBVIEW_URL = 'http://api.xyyxt.net:6066/'  //预发布(弃用了)
 
@@ -37,7 +37,7 @@ hF6WiNlWfQTVoF1rhwIDAQAB
 -----END PUBLIC KEY-----`;
 
 export const version = '1.0.2' 
-export const tenantId = '667735392758919630'  // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630
+export const tenantId = '867735392558919680'  // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {
 		uni.showLoading({
@@ -105,6 +105,7 @@ export const myRequest = (options) => {
 					title: "请求接口失败",
 					icon: 'none'
 				})
+				console.log('请求失败err---: ', err);
 				if (options.url == '/face/certification/CompareFace') {
 					console.log('人脸识别错误---1:', err)
 				}

+ 1 - 1
manifest.json

@@ -75,7 +75,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx871153afc95f55f4", // 祥粤云学堂:wxd3c8ae80cf43a305
+        "appid" : "wxd3c8ae80cf43a305", // 祥粤云学堂:wxd3c8ae80cf43a305, 祥粤学堂-wx871153afc95f55f4
         "setting" : {
             "urlCheck" : false,
             "postcss" : true,

+ 2 - 1
pages/index/index.vue

@@ -203,7 +203,7 @@
 				</template>
 			</view>
 		</view>
-
+		 <!-- #ifdef MP-WEIXIN -->
 		<view :style="{'opacity':opacitys}" class="officials">
 			<view class="weixin_official_account">
 				<image class="off_logo" src="/static/index/official.png"></image>
@@ -220,6 +220,7 @@
 				</view>
 			</view>
 		</view>
+		<!-- #endif -->
 		
 	</view>
 </template>

+ 2 - 3
pages2/invoice/index.vue

@@ -579,10 +579,9 @@ export default {
 	// onPullDownRefresh() {},
 	onLoad(option) {
 		this.orderInvoiceCanInvoiceList();
-		this.$refs.uForm.setRules(this.rules)
 	},
-	onShow() {
-		
+	onReady() {
+		this.$refs.uForm.setRules(this.rules)
 	},
 	methods: {
 		orderCancel() {

+ 4 - 2
pages2/register/forget.vue

@@ -171,7 +171,6 @@ export default {
 		},
 	},
 	onLoad(option) {
-		this.$refs.uForm.setRules(this.rules)
 		let that = this;
 		// this.from = option.from; // 看页面没有用到
 		uni.login({
@@ -180,7 +179,10 @@ export default {
 				that.code = loginRes.code;
 			}
 		});
-	}
+	},
+	onReady() {
+		this.$refs.uForm.setRules(this.rules)
+	},
 };
 </script>
 

+ 10 - 3
pages4/login/login.vue

@@ -1,7 +1,9 @@
 <template>
 	<view style="height: 100%;">
 		<image mode="widthFix" src="/pages4/static/login_bg.jpg" class="full_img"></image>
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="登录" :border-bottom="false" background="{ background: '#ffffff',opacity:0.4; }" title-color="#ffffff" back-icon-color="#ffffff"></u-navbar>
+		<!-- #endif -->
 		<view style="padding: 30rpx;">
 			<view style="width: 400rpx;">
 				<u-subsection @change="sectionChange" :list="list" :current="current" active-color="#007AFF" inactive-color="#ffffff" bg-color="rgba(255,255,255,0.52)"></u-subsection>
@@ -32,11 +34,12 @@
 					<navigator  hover-class="none" url="/pages2/register/forget" style="margin: 0 40rpx;">忘记密码</navigator>
 				</view>
 			</view>
-			
+			<!-- #ifdef MP-WEIXIN -->
 			<view  class="wxBtn">
 				<button type="default" open-type="getPhoneNumber" @getphonenumber="wxLogin" class="wxloginBtn"></button>
 				<view style="text-align: center;color: #999999;font-size: 24rpx;margin-top: 10rpx;">微信快捷登录</view>
 			</view>
+			<!-- #endif -->
 		</view>
 		<u-verification-code seconds="60" ref="uCode" @change="codeChange"></u-verification-code>
 	</view>
@@ -121,8 +124,6 @@ export default {
 		};
 	},
 	onLoad(option) {
-		this.$refs.uForm1.setRules(this.rules)
-		this.$refs.uForm2.setRules(this.rules)
 		if(option.isBack){
 			this.isBack = option.isBack;
 		} 
@@ -138,7 +139,13 @@ export default {
 	},
 	onShow() {
 		// 获取code
+		// #ifdef MP-WEIXIN
 		this.getwxCode()
+		// #endif
+	},
+	onReady() {
+		this.$refs.uForm1.setRules(this.rules)
+		this.$refs.uForm2.setRules(this.rules)
 	},
 	methods: {
 		getwxCode() {