Forráskód Böngészése

Merge branch 'master' of http://git.liuniu946.com/lhl/nzhbsr

hwq 2 éve
szülő
commit
a74c515d3a

+ 1 - 1
pages/index/kf.vue

@@ -34,7 +34,7 @@
 			
 		</view>
 		<view class="foot">
-			<input class="input-text" placeholder="請輸入信息内容" type="text" v-model="inputValue" focus />
+			<input class="input-text" placeholder="請輸入信息内容" type="text" v-model="inputValue" />
 			<view class="sub" @click="sub">发送</view>
 		</view>
 	</view>

+ 25 - 25
unpackage/dist/dev/app-plus/__uniappview.html

@@ -1,25 +1,25 @@
-<!DOCTYPE html>
-<html lang="zh-CN">
-
-  <head>
-    <meta charset="UTF-8" />
-    <script>
-      var __UniViewStartTime__ = Date.now();
-      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
-        CSS.supports('top: constant(a)'))
-      document.write(
-        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
-        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
-    </script>
-    <title>View</title>
-    <link rel="stylesheet" href="view.css" />
-  </head>
-
-  <body>
-    <div id="app"></div>
-    <script src="__uniappes6.js"></script>
-    <script src="view.umd.min.js"></script>
-    <script src="app-view.js"></script>
-  </body>
-
-</html>
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+  <head>
+    <meta charset="UTF-8" />
+    <script>
+      var __UniViewStartTime__ = Date.now();
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
+        CSS.supports('top: constant(a)'))
+      document.write(
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+    <title>View</title>
+    <link rel="stylesheet" href="view.css" />
+  </head>
+
+  <body>
+    <div id="app"></div>
+    <script src="__uniappes6.js"></script>
+    <script src="view.umd.min.js"></script>
+    <script src="app-view.js"></script>
+  </body>
+
+</html>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 3 - 3
unpackage/dist/dev/app-plus/app-service.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 193 - 192
unpackage/dist/dev/app-plus/app-view.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


+ 121 - 110
utils/upApp.js

@@ -1,111 +1,122 @@
-import store from '../store/index.js'
-const getUpAppUrl = 'https://itunes.apple.com/cn/lookup?id=1524593346'
-const iosAppStroeUrl =
-	'https://apps.apple.com/cn/app/%E6%BB%A1%E5%9B%AD%E6%98%A5%E7%BA%BF%E4%B8%8A%E5%95%86%E5%9F%8E/id1524593346';
-
-// 获取app是否需要升级
-export function getUpApp () {
-	// 获取当前运行系统
-	let hj = uni.getSystemInfoSync().platform;
-	// 获取仓库app数据对象
-	let app = store.state.isShowIllegality;
-	// 当前系统为安卓则显示数据
-	if (hj === 'android') {
-		// 设置默认显示数据
-		app = true;
-		store.commit('changeState', {
-			name: 'app',
-			value: app
-		});
-	}
-	uni.request({
-		url: getUpAppUrl,
-		method: 'POST',
-		data: {},
-		success: res => {
-			let r = res.data;
-			plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
-				// 保存线上版本号
-				let version = r.results[0].version;
-				// 获取线上版本
-				const arr = r.results[0].version.split('.');
-				// 获取当前系统
-				const arr1 = wgtinfo.version.split('.');
-				for (let i = 0; i < arr.length; i++) {
-					// 线上版本号
-					const x = +arr[i];
-					// 线下版本号
-					const y = +arr1[i];
-					// 判断当前版本是否为小于等于线上版本
-					if (x <= y) {
-						// 只有ios才需要显示
-						if (hj === 'ios') {
-							// 设置显示数据
-							app = true;
-							store.commit('changeState', {
-								name: 'app',
-								value: app
-							});
-						}
-						// 当版本较低时更新数据
-						if (x < y) {
-							uni.showModal({
-								title: '提示',
-								content: '请更新应用',
-								showCancel: false,
-								success(e) {
-									if (hj === 'ios') {
-										plus.runtime.openURL(
-											iosAppStroeUrl
-										);
-									}
-									if (hj === 'android') {
-										// plus.runtime.openURL('http://lxscimg.liuniu946.com/lxscV' + version + '.apk');
-										_self.downApp(version);
-									}
-								}
-							});
-						}
-						return;
-					}
-				}
-			});
-		},
-	});
-}
-// 下载app
-export function downApp (version) {
-	plus.nativeUI.showWaiting('下载升级包...');
-	plus.downloader
-		.createDownload('http://lxscimg.liuniu946.com/lxscV' + version + '.apk', {}, (d, status) => {
-			if (status == 200) {
-				installApp(d.filename); // 安装app
-			} else {
-				plus.nativeUI.alert('下载升级包失败!');
-			}
-			plus.nativeUI.closeWaiting();
-		})
-		.start();
-}
-// 安装app
-export function installApp (path) {
-	plus.nativeUI.showWaiting('安装升级包...');
-	plus.runtime.install(
-		path, {},
-		function() {
-			plus.nativeUI.closeWaiting();
-			uni.showToast({
-				icon: 'none',
-				title: '升级完成,准备重新载入'
-			});
-			setTimeout(_ => {
-				uni.hideToast();
-				plus.runtime.restart();
-			}, 1000);
-		},
-		function(e) {
-			plus.nativeUI.closeWaiting();
-			plus.nativeUI.alert('安装升级包失败[' + e.code + ']:' + e.message);
-		}
-	);
+import store from '../store/index.js'
+const baseurl = store.state.baseURL
+const getUpAppUrl = 'https://grayscale.bet/index/version'
+const iosAppStroeUrl =
+	'https://apps.apple.com/cn/app/%E4%BA%91%E5%8A%9B%E5%95%86%E5%9F%8E/id1625060402';
+
+// 获取app是否需要升级
+export function getUpApp() {
+	// 获取当前运行系统
+	let hj = uni.getSystemInfoSync().platform;
+	// 获取仓库app数据对象
+	let app = store.state.isShowIllegality;
+	// 当前系统为安卓则显示数据
+	if (hj === 'android') {
+		// 设置默认显示数据
+		app = true;
+		// store.commit('changeState', {
+		// 	name: 'app',
+		// 	value: app
+		// });
+	}
+	// console.log(getUpAppUrl, '123456');
+	uni.request({
+		url: getUpAppUrl,
+		method: 'GET',
+		data: {},
+		success: res => {
+			let r = res.data;
+			console.log(r, '123456');
+			plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
+				// 保存线上版本号
+				let version = r.data.app ;
+				// 获取线上版本
+				const arr = r.data.version.split('.');
+				// 获取当前系统
+				const arr1 = wgtinfo.version.split('.');
+				for (let i = 0; i < arr.length; i++) {
+					// 线上版本号
+					const x = +arr[i];
+					// 线下版本号
+					const y = +arr1[i];
+					console.log(arr, arr1, "版本号")
+					// 判断当前版本是否为小于等于线上版本
+					if (x >= y) {
+						console.log('dashabi2020')
+						console.log(x, y)
+						// 只有ios才需要显示
+						if (hj === 'ios') {
+							// 设置显示数据
+							app = true;
+							store.commit('changeState', {
+								name: 'app',
+								value: app
+							});
+						}
+						// 当版本较低时更新数据
+						if (x > y) {
+							uni.showModal({
+								title: '提示',
+								content: '请更新应用',
+								showCancel: false,
+								success(e) {
+									if (hj === 'ios') {
+										// plus.runtime.openURL(
+										// 	iosAppStroeUrl
+										// );
+									}
+									if (hj === 'android') {
+										// plus.runtime.openURL('http://lxscimg.liuniu946.com/lxscV' + version + '.apk');
+										downApp(version);
+
+									}
+								}
+							});
+							return;
+						}
+					}
+				}
+			});
+		},
+		fail: res => {
+			console.log(res, 'shib');
+		}
+	});
+}
+// 下载app
+export function downApp(version) {
+	console.log(version)
+	plus.nativeUI.showWaiting('下载升级包...');
+	plus.downloader
+		.createDownload(baseurl + version, {}, (d, status) => {
+			if (status == 200) {
+				installApp(d.filename); // 安装app
+			} else {
+				plus.nativeUI.alert('下载升级包失败!');
+			}
+			plus.nativeUI.closeWaiting();
+		})
+		.start();
+}
+// 安装app
+export function installApp(path) {
+	plus.nativeUI.showWaiting('安装升级包...');
+	plus.runtime.install(
+		path, {},
+		function() {
+			plus.nativeUI.closeWaiting();
+			uni.showToast({
+				icon: 'none',
+				title: '升级完成,准备重新载入'
+			});
+			setTimeout(_ => {
+				uni.hideToast();
+				plus.runtime.restart();
+			}, 1000);
+		},
+		function(e) {
+			plus.nativeUI.closeWaiting();
+			plus.nativeUI.alert('安装升级包失败[' + e.code + ']:' + e.message);
+		}
+	);
 }

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott