Browse Source

修改储值功能;修改config文件切换

付晓文。 3 weeks ago
parent
commit
1f2cb33b7c

+ 25 - 18
common/service/config.service.js

@@ -1,24 +1,31 @@
-let BASE_URL = ''
-
+const configs = {
+	TEST: {
+		// baseUrl: 'http://192.168.0.36:8080/jeecg-boot', // 开发环境
+		// baseUrl: 'http://192.168.0.52:8081/jeecg-boot', // 开发环境
+		// baseUrl: 'http://192.168.0.42:8080/jeecg-boot', // 开发环境
+		// baseUrl: 'http://192.168.1.77:8082/jeecg-boot', // 开发环境 周
+		// baseUrl: 'http://x3add5c5.natappfree.cc/jeecg-boot', // 开发环境 郭子栋
+		baseUrl: 'https://test.baoxianzhanggui.com/locallive-java',
+		appId: '__UNI__85094A3', // 测试版
+	},
+	PROD: {
+		baseUrl: 'https://life.baoxianzhanggui.com/locallive-pro-java',
+		appId: '__UNI__E0EA6E1', // 正式版
+	}
+};
 
-if (process.env.NODE_ENV == 'development') {
-	// BASE_URL = 'https://life.baoxianzhanggui.com/locallive-pro-java' // 正式环境
-	// BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境
-	// BASE_URL = 'http://192.168.0.36:8080/jeecg-boot' // 开发环境
-    // BASE_URL = 'http://192.168.0.52:8081/jeecg-boot' // 开发环境
-	// BASE_URL = 'http://192.168.0.42:8080/jeecg-boot' // 开发环境
-	// BASE_URL = 'http://192.168.1.77:8082/jeecg-boot' // 开发环境 周
-	BASE_URL = 'http://x3add5c5.natappfree.cc/jeecg-boot' // 开发环境 郭子栋
+// 手动切换环境
+let ENV = 'TEST';
+// let ENV = 'PROD';
 
-} else {
-	// BASE_URL = 'https://life.baoxianzhanggui.com/locallive-pro-java' // 正式环境
-	BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境
-}
-let staticDomainURL = BASE_URL + '/sys/common/static';
+const { baseUrl, appId } = configs[ENV] || configs.TEST;
+const staticDomainURL = baseUrl + '/sys/common/static';
 
 const configService = {
-	apiUrl: BASE_URL,
-	staticDomainURL: staticDomainURL
+	apiUrl: baseUrl,
+	staticDomainURL: staticDomainURL,
+	appId: appId,
+	ENV: ENV
 };
 
-export default configService
+export default configService;

+ 4 - 3
components/yzhua006-update/app-update.vue

@@ -32,6 +32,7 @@
   </view>
 </template>
 <script>
+import configService from '@/common/service/config.service.js'
 var vm;
 export default {
   name: "appUpdate",
@@ -109,15 +110,15 @@ export default {
       //向后台发起请求,获取最新版本号
       let apkquote = await this.$http.post('/sysVersionRecord/sysVersionRecord/queryByAppId', {
         apptype: '2',
-        appId: "__UNI__E0EA6E1"
+        appId: configService.appId
       });
       vm.apkInfo = apkquote.data.result
       vm.apkLatestVersion = apkquote.data.result.versionno;
       let wgtquote = await this.$http.post('/sysVersionRecord/sysVersionRecord/queryByAppId', {
         apptype: '2',
-        appId: "__UNI__E0EA6E1"
+        appId: configService.appId
       });
-      console.log(apkquote, wgtquote)
+      console.log('更新',apkquote, wgtquote)
       // wgtquote
       vm.wgtInfo = wgtquote.data.result
       vm.wgtLatestVersion = wgtquote.data.result.versionno;

+ 9 - 2
pages/topUp/records.vue

@@ -63,7 +63,9 @@
 									</view>
 									<view class="row2">
 										<text class="store">{{ item.storeName }}</text>
-										<text class="time">{{ formatListTime(item.time) }}</text>
+										<text class="time" :class="{ refunded: item.orderStatus === 6 }">
+											{{ item.orderStatus === 6 ? '已退款' : formatListTime(item.time) }}
+										</text>
 									</view>
 								</view>
 							</view>
@@ -166,7 +168,8 @@
 							? Number(item.payAmount || 0) + Number(item.giftAmount || 0)
 							: -Math.abs(Number(item.payAmount || 0))
 						: changeAmount,
-					time: item.transactionTime || ''
+					time: item.transactionTime || '',
+					orderStatus: Number(item.orderStatus)
 				};
 			},
 			afterFetch(result) {
@@ -369,6 +372,10 @@
 				color: #999;
 			}
 
+			.time.refunded {
+				color: #ff4d4f;
+			}
+
 			.store {
 				overflow: hidden;
 				text-overflow: ellipsis;