Commit ea4daffd by zhu_yu_dan

add:风险模式开发环境可用生产环境不可用;

parent b4dea7d0
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -66,5 +66,5 @@ ...@@ -66,5 +66,5 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules", "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot" "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot"
}, },
"version": "1.4.2" "version": "1.4.3"
} }
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
<span class="el-radio__inner"></span> <span class="el-radio__inner"></span>
</span><span class="el-radio__label">安全模式</span> </span><span class="el-radio__label">安全模式</span>
</span> </span>
<!-- @click="changeDataType('1')" --> <!-- -->
<span class="danger-type" > <span class="danger-type" @click="changeDataType('1')">
<span class="el-radio__input is-disabled" :class="dataType == '1' ? 'is-checked' : ''"> <span class="el-radio__input" :class="[{'is-disabled':!deveStatusBool},dataType == '1' ? 'is-checked' : '']">
<span class="el-radio__inner"></span> <span class="el-radio__inner"></span>
</span><span class="el-radio__label">风险模式<span v-show="total>0" style="margin-left:4px">{{ timeValue }}</span></span> </span><span class="el-radio__label">风险模式<span v-show="total>0" style="margin-left:4px">{{ timeValue }}</span></span>
</span> </span>
...@@ -228,6 +228,7 @@ ...@@ -228,6 +228,7 @@
dataType:'0', dataType:'0',
timeValue:'', timeValue:'',
total:0, total:0,
deveStatusBool:true, // 开发模式下风险模式可用,生产不可用
} }
}, },
beforeMount() { beforeMount() {
...@@ -259,10 +260,7 @@ ...@@ -259,10 +260,7 @@
}); });
}) })
.catch(err => { .catch(err => {
this.$message.error({ console.log(err)
duration: 1000,
message: error.message
})
}); });
}, },
...@@ -660,17 +658,28 @@ ...@@ -660,17 +658,28 @@
}, },
// 切换数据模式 // 切换数据模式
changeDataType(type){ changeDataType(type){
this.dataType = type; if(this.deveStatusBool){ // 不是生产环境
this.$nextTick(_ => { this.dataType = type;
if(this.dataType=="1"){ this.$nextTick(_ => {
this.$refs.dataTypeWrap.init(); if(this.dataType=="1"){
} this.$refs.dataTypeWrap.init();
}); }
});
}
}, },
// 获取子组件的数据模式 // 获取子组件的数据模式
getDataType(val){ getDataType(val){
// console.log(val); // console.log(val);
this.dataType = val; this.dataType = val;
},
// 判断环境 开发还是生产
getDeveStatus(){
var host = window.location.host;
if(host=='hope.demogic.com'){
this.deveStatusBool = false
}else{
this.deveStatusBool = true
}
} }
}, },
watch: { watch: {
...@@ -734,6 +743,8 @@ ...@@ -734,6 +743,8 @@
// 获取初始数据模式 // 获取初始数据模式
this.initDataType(); this.initDataType();
// 判断环境 开发or生产
this.getDeveStatus()
}, },
components:{ components:{
dataType dataType
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment