| | |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | uni.navigateBack() |
| | | } else if (res.code === 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.baseUrl = uni.getStorageSync('baseUrl') |
| | | this.getCsmtr() |
| | | |
| | | // this.getCsmtr() |
| | | }, |
| | | // 新建按钮事件 |
| | | onNavigationBarButtonTap(e) { |
| | | uni.navigateTo({ |
| | | url:'/pages/business/cstmr/addCsmtr', |
| | | }) |
| | | }, |
| | | onShow() { |
| | | this.baseUrl = uni.getStorageSync('baseUrl') |
| | | this.getCsmtr() |
| | | }, |
| | | methods: { |
| | | getCsmtr() { |
| | |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | that.csmtrList = res.data.records |
| | | } else if (res.code === 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | console.log(that.csmtrList); |
| | | } |
| | | }) |
| | | } |