future 11 月之前
父節點
當前提交
ea681741d5
共有 4 個文件被更改,包括 25 次插入7 次删除
  1. 1 0
      xs-app/config/config.ts
  2. 3 2
      xs-app/framework/sdkUtil.ts
  3. 18 0
      xs-app/framework/tools.ts
  4. 3 5
      xs-app/pagesA/aboutMine/aboutMine.vue

+ 1 - 0
xs-app/config/config.ts

@@ -3,6 +3,7 @@ export class config {
 	public static app_name = '卿卿小屋'
 	public static applet_id = '10000'  //douyin_卿卿小屋:10000 wx_卿卿小屋:10001
 	public static theme_color = '#fcd9e0'
+	public static version = '1.1.3'
 	
 	/**
 	 * douyin_卿卿小屋:10000 wx_卿卿小屋:10001

+ 3 - 2
xs-app/framework/sdkUtil.ts

@@ -2,7 +2,7 @@ import { config } from "../config/config"
 import { wx_pay_data } from "../data/data";
 import { log } from "./log"
 import { tools } from "./tools"
-import { util } from "./util";
+
 export default {
   onShareAppMessage() {
     return {
@@ -11,8 +11,9 @@ export default {
     };
   }
 }
+
 export class sdkUtil {
-		
+			
 	public static login(cb:Function) {
 		switch (tools.getCurPlatform()){
 			case config.Platform.H5:

+ 18 - 0
xs-app/framework/tools.ts

@@ -51,6 +51,24 @@ export class tools {
 		return id
 	}
 	
+	// 获取版本号
+	public static getVersion():string {
+		let version = ''
+		switch (tools.getCurPlatform()){
+			case config.Platform.H5:
+			    version = '1.0'
+				break;
+			case config.Platform.WEIXIN:
+			    version = config.version
+			    break;
+			case config.Platform.TOUTIAO:
+			    break;
+			default:
+				break;
+		}
+		return version
+	}
+	
 	// 获取订单状态信息
 	public static getOrderStatusInfo(type:number):order_status_info_data {
 		if(!type) {type = config.order_status.PAYING}

+ 3 - 5
xs-app/pagesA/aboutMine/aboutMine.vue

@@ -26,11 +26,9 @@
 </template>
 
 <script setup lang="ts">
-import { tools } from '../../framework/tools';
-	let version = uni.getSystemInfoSync().version
-	// #ifdef H5
-	version = '1.0'
-	// #endif
+    import { tools } from '../../framework/tools';
+	
+	let version = tools.getVersion()
 	let data_list = [
 		{'id':1,'name':'用户协议','des':''},
 	    {'id':2,'name':'隐私协议','des':''},