guhongwei 2 lat temu
rodzic
commit
5534e19ef7
2 zmienionych plików z 6 dodań i 10 usunięć
  1. 5 0
      config.js
  2. 1 10
      pages/index/index.vue

+ 5 - 0
config.js

@@ -6,6 +6,11 @@ const system = uni.getSystemInfoSync();
 const wx_projectkey = 'tehqApp';
 // 请求地址
 const wx_dev = '';
+const pro_env = process.env.NODE_ENV;
+uni.showToast({
+	title: `运行环境:${pro_env}`,
+	icon: "none",
+});
 // 测试环境:/dev
 // 生产环境:''
 export default {

+ 1 - 10
pages/index/index.vue

@@ -17,16 +17,7 @@
 		},
 		onLoad: async function() {
 			const that = this;
-			if(process.env.NODE_ENV === 'development'){
-			  uni.showToast({
-			  	title: '开发环境'
-			  });
-			}else{
-				uni.showToast({
-					title: '开发环境'
-				});
-				await that.searchConfig();
-			}
+			await that.searchConfig();
 		},
 		methods: {
 			// 查询基本设置