Browse Source

2023-10-31

cmy 1 năm trước cách đây
mục cha
commit
f3c9a07356

+ 4 - 3
api/index.js

@@ -16,9 +16,9 @@ export function getIndex(data) {
 		data
 	});
 }
-
+// #ifndef MP
 /**
- * 商品分类类版本
+ * 版本
  */
 export function getAppVersion(data) {
 	return request({
@@ -26,4 +26,5 @@ export function getAppVersion(data) {
 		method: 'get',
 		data
 	});
-}
+}
+// #endif

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "互娛有獎",
     "appid" : "__UNI__3DD0668",
     "description" : "",
-    "versionName" : "1.0.11",
-    "versionCode" : 110,
+    "versionName" : "1.0.13",
+    "versionCode" : 113,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 38 - 1
pages/public/login.vue

@@ -25,7 +25,12 @@
 			<navigator url="./forget">
 				<view class="forget">{{$t('login.b2')}}</view>
 			</navigator>
-			
+			<!-- #ifdef H5 -->
+			<view class="flex">
+				<button class="uni-button loadapp" @click="domApp('apk')">APK下载</button>
+				<button class="uni-button loadapp" @click="domApp('ios')">IOS下载</button>
+			</view>
+			<!-- #endif -->
 		</view>
 	</view>
 </template>
@@ -54,7 +59,11 @@
 	import {
 		loginWinxin
 	} from '@/utils/wxAuthorized';
+	import {
+		getAppVersion
+	} from '@/api/index.js'
 	// #endif
+	
 	export default {
 		data() {
 			return {
@@ -87,6 +96,34 @@
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo', 'login']),
+			// #ifdef H5
+			domApp(type) {
+				console.log('111');
+				const bool = navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
+				if (bool) {
+					uni.showModal({
+						// title: '提示',
+						title: this.$t("enter.a7"),
+						// content: '无法在微信中下载,请用浏览器打开下载',
+						content: this.$t("login.c2"),
+						showCancel: false,
+					});
+				} else {
+					if (type == 'apk') {
+						getAppVersion().then((res) => {
+							console.log(res, 'res');
+							window.open(res.data.apk);
+						}).catch((err) => {
+							console.log(err, 'err');
+						})
+						return
+					}
+					if(type=="ios"){
+						window.open("/index/dom/iosdom.mobileconfig");
+					}
+				}
+			},
+			// #endif
 			// 微信登录
 			wecahtLogin(type) {
 				let obj = this;

+ 2 - 0
pages/public/register.vue

@@ -60,9 +60,11 @@
 		register,
 		verify
 	} from '@/api/login.js';
+	// #ifdef H5
 	import {
 		getAppVersion
 	} from '@/api/index.js'
+	// #endif
 	export default {
 		data() {
 			return {

+ 4 - 4
pages/user/set/password.vue

@@ -60,10 +60,10 @@ export default {
 				this.$api.msg(obj.$t("reg.a3"));
 				return;
 			}
-			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
-				this.$api.msg(obj.$t("safe.b8"));
-				return;
-			}
+			// if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+			// 	this.$api.msg(obj.$t("safe.b8"));
+			// 	return;
+			// }
 			// 判断是否在倒计时
 			if (obj.countDown > 0) {
 				return false;

+ 4 - 4
pages/user/set/transaction.vue

@@ -67,10 +67,10 @@ export default {
 				this.$api.msg(obj.$t("safe.b5"));
 				return;
 			}
-			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
-				this.$api.msg(obj.$t("safe.b8"));
-				return;
-			}
+			// if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+			// 	this.$api.msg(obj.$t("safe.b8"));
+			// 	return;
+			// }
 			// 判断是否在倒计时
 			if (obj.countDown > 0) {
 				return false;