12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <template>
- <u-modal
- v-model="show"
- :content="content"
- :show-cancel-button="true"
- @cancel="cancel"
- @confirm="confirm"
- ></u-modal>
- </template>
- <script>
- export default {
- name: 'judgeAuth',
- data() {
- return {
- show: false,
- content: '你还没有认证,该功能需要认证后才能使用!',
- auditStatus: null
- };
- },
- methods: {
- /**
- * @param {Object} bool
- */
- modalShow(url) {
- console.log(url);
- this.$u.api.getmemberinfo().then(res => {
- console.log('用户基本信息:', res.data)
- if (res.code === 200){
- this.$u.vuex('vuex_memberInfo', res.data);
- this.auditStatus = Number(res.data.auditStatus)
- switch (Number(res.data.auditStatus)){
- case 0:
- this.content = '您的认证正在审核中,该功能需要认证后才能使用!'
- this.show = true
- break;
- case 1:
- this.content = '您的认证未通过,无法使用该功能!'
- this.show = true
- break;
- case 2:
- this.$emit('adoptAuth', url)
- break;
- case 3:
- this.content = '您的认证已被撤销,该功能需要认证后才能使用!'
- this.show = true
- break;
- }
- } else {
- this.$refs.uToast.show({
- title: res.msg,
- type: 'error'
- })
- }
- }).catch(err => {
- this.$refs.uToast.show({
- title: err.msg,
- type: 'error'
- })
- })
- },
- /**
- * 取消
- */
- cancel() {},
- /**
- * 确认
- */
- confirm() {
- this.show = false;
- if (this.auditStatus === 1 || this.auditStatus === 3 ) {
- uni.navigateTo({
- url: '/pages/applyEducationCode/applyEducationCode'
- });
- }
- }
- }
- };
- </script>
- <style>
- </style>
|