zhengkaixin пре 2 година
родитељ
комит
16c279a944
4 измењених фајлова са 24 додато и 10 уклоњено
  1. 6 4
      .env.js
  2. 5 2
      package.json
  3. 8 2
      pagesFinance/statistics/index.vue
  4. 5 2
      vue.config.js

+ 6 - 4
.env.js

@@ -1,9 +1,11 @@
 (function() {  
     const NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境  
-    let ENV_VAR = null;  
-	 
+    let ENV_VAR = null; 
+	
+
+	
 	var NODE_NAME=  process.env['NODE_NAME']
-	console.log(NODE_NAME)
+	
     if (process.env.NODE_ENV === "development") {  
 
         if (NODE_ENV === 'dev') {  
@@ -25,7 +27,7 @@
 		} 
       
     }  
-
+	
     if (ENV_VAR) {  
 		process.car = {};  
         for (let key in ENV_VAR) {  

+ 5 - 2
package.json

@@ -40,7 +40,8 @@
      "NODE_NAME": "test"
     },
     "define": {
-     "CUSTOM-CONST": true
+     "CUSTOM-CONST": true,
+	  "NODE_NAME_T": "test"
     }
    },
    "production-platform": {
@@ -49,9 +50,11 @@
     "env": {
      "UNI_PLATFORM": "h5",
      "NODE_NAME": "production"
+	 
     },
     "define": {
-     "CUSTOM-CONST": true
+     "CUSTOM-CONST": true,
+	   "NODE_NAME_T": "production"
     }
    }
   }

+ 8 - 2
pagesFinance/statistics/index.vue

@@ -1089,8 +1089,14 @@
 
 				// this.showlist1 = ['收入', '利润', '次数','新电途'];
 				var showlistColor = ['#5872c0', '#de6e6a', '#f3c96b', '#69be8d', '#c661b4'];
-				this.showlist1 = ['收入', '利润', '电量', '新电途', '快电'];
-				var sz2 = ['todayAmount', 'todayProfit', 'todayEQAmount2', 'todayXDTAmount','todayKDAmount'];
+				this.showlist1 = ['收入', '利润', '电量', '新电途'];
+				var sz2 = ['todayAmount', 'todayProfit', 'todayEQAmount2', 'todayXDTAmount'];
+				if(this.info.accountType == 1){
+					this.showlist1 = ['收入', '利润', '电量', '新电途', '快电'];
+					var sz2 = ['todayAmount', 'todayProfit', 'todayEQAmount2', 'todayXDTAmount','todayKDAmount'];
+					
+				}
+				
 				var zLevel = [20, 40, 10, 30,9];
 				//var sz2 = ['todayAmount', 'todayProfit', 'todayEQNum','todayXDTAmount'];
 				if (!this.myChart) {

+ 5 - 2
vue.config.js

@@ -1,4 +1,5 @@
 if(process.env.NODE_ENV === "production"){
+ const Templates = process.UNI_SCRIPT_DEFINE;
 
 const path = require('path');
 const webpack = require('webpack')
@@ -56,8 +57,10 @@ module.exports = {
 			})
 		); */
 
-			config.plugins.push(new webpack.ProgressPlugin(percentage => {
-				percentage === 1 ? console.log('编译完成:100.00%') : console.log(`编译进度:${(percentage * 100).toFixed(2)}%`)
+			config.plugins.push(new webpack.ProgressPlugin(percentage => {
+
+				
+					percentage === 1 ? console.log('编译完成:100.00%') : console.log(`编译${Templates['NODE_NAME_T']}进度:${(percentage * 100).toFixed(2)}%,提示!构建请点击‘发行’-‘自定义发行’`)
 			}));
 		config.output.filename = `./static/js/[name].${Timestamp}.js`
 		config.output.chunkFilename = `./static/js/[name].${Timestamp}.js`