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 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot"
},
"version": "1.4.2"
"version": "1.4.3"
}
......@@ -64,9 +64,9 @@
<span class="el-radio__inner"></span>
</span><span class="el-radio__label">安全模式</span>
</span>
<!-- @click="changeDataType('1')" -->
<span class="danger-type" >
<span class="el-radio__input is-disabled" :class="dataType == '1' ? 'is-checked' : ''">
<!-- -->
<span class="danger-type" @click="changeDataType('1')">
<span class="el-radio__input" :class="[{'is-disabled':!deveStatusBool},dataType == '1' ? 'is-checked' : '']">
<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>
......@@ -228,6 +228,7 @@
dataType:'0',
timeValue:'',
total:0,
deveStatusBool:true, // 开发模式下风险模式可用,生产不可用
}
},
beforeMount() {
......@@ -259,10 +260,7 @@
});
})
.catch(err => {
this.$message.error({
duration: 1000,
message: error.message
})
console.log(err)
});
},
......@@ -660,17 +658,28 @@
},
// 切换数据模式
changeDataType(type){
this.dataType = type;
this.$nextTick(_ => {
if(this.dataType=="1"){
this.$refs.dataTypeWrap.init();
}
});
if(this.deveStatusBool){ // 不是生产环境
this.dataType = type;
this.$nextTick(_ => {
if(this.dataType=="1"){
this.$refs.dataTypeWrap.init();
}
});
}
},
// 获取子组件的数据模式
getDataType(val){
// console.log(val);
this.dataType = val;
},
// 判断环境 开发还是生产
getDeveStatus(){
var host = window.location.host;
if(host=='hope.demogic.com'){
this.deveStatusBool = false
}else{
this.deveStatusBool = true
}
}
},
watch: {
......@@ -734,6 +743,8 @@
// 获取初始数据模式
this.initDataType();
// 判断环境 开发or生产
this.getDeveStatus()
},
components:{
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