|
|
@@ -34,23 +34,39 @@
|
|
|
<script>
|
|
|
import {
|
|
|
hwmsAppRegisterApprovalMenuShow,
|
|
|
+ hwmsRecycleConfigList,
|
|
|
} from '@/pages_hazardousWasteRecycling/api/index.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
buttonTypeA:false,
|
|
|
buttonTypeB:false,
|
|
|
+ switchType:false,
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.hwmsRecycleConfigList();
|
|
|
this.hwmsAppRegisterApprovalMenuShow();
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ async hwmsRecycleConfigList(){
|
|
|
+ let self = this;
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await hwmsRecycleConfigList()
|
|
|
+ if (data.code == 200) {
|
|
|
+ for(let i=0;i<data.data.length;i++){
|
|
|
+ if(data.data[i].configKey == 'HWMS_MASTER_SWITCH'){
|
|
|
+ self.$set(self,'switchType',data.data[i].configValue == 1?true:false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
async hwmsAppRegisterApprovalMenuShow(){
|
|
|
const {
|
|
|
data
|
|
|
@@ -73,6 +89,15 @@
|
|
|
},
|
|
|
goPage(type){
|
|
|
if(type == 1){
|
|
|
+ if(!this.switchType){
|
|
|
+ uni.showToast({
|
|
|
+ title: '危废回收已关闭 , 如有疑问请联系管理员',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
uni.navigateTo({
|
|
|
url: "/pages_hazardousWasteRecycling/views/recyclingReportRecord/index",
|
|
|
});
|