guhongwei 4 년 전
부모
커밋
f7cbd85c5b
4개의 변경된 파일55개의 추가작업 그리고 7개의 파일을 삭제
  1. 5 0
      src/store/user/auth-user.js
  2. 37 4
      src/views/dockCenter/dockInfo/index.vue
  3. 4 3
      src/views/dockbind.vue
  4. 9 0
      src/views/user/parts/clickBtn.vue

+ 5 - 0
src/store/user/auth-user.js

@@ -7,6 +7,7 @@ const api = {
   interface: `/api/auth/user`,
   getMenu: `/api/auth/user/menus`,
   bindInfo: `/api/auth/user/bind`,
+  dockInfo: `/api/auth/wxbind`,
 };
 const state = () => ({});
 const mutations = {};
@@ -39,6 +40,10 @@ const actions = {
     const res = await this.$axios.$post(`${api.bindInfo}`, payload);
     return res;
   },
+  async dockInfo({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.dockInfo}`, payload);
+    return res;
+  },
 };
 
 export default {

+ 37 - 4
src/views/dockCenter/dockInfo/index.vue

@@ -69,6 +69,8 @@
 import { mapState, createNamespacedHelpers } from 'vuex';
 import NavBar from '@/layout/common/topInfo.vue';
 const { mapActions: place } = createNamespacedHelpers('place');
+const { mapActions: dock } = createNamespacedHelpers('dock');
+const { mapActions: authUser } = createNamespacedHelpers('authUser');
 export default {
   name: 'index',
   props: {},
@@ -90,13 +92,36 @@ export default {
   created() {
     this.searcOption();
     this.changeshenge();
+    this.searchInfo();
   },
   methods: {
     ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
+    ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
+    ...authUser({authUserUpdate: 'update',}),
+     async searchInfo() {
+      let res = await this.dockfetch('5f0c09a268972785441dfa1c');
+     if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+      }
+    },
     submitForm(formName) {
-      this.$refs[formName].validate(valid => {
+      this.$refs[formName].validate(async valid => {
         if (valid) {
-          console.log('提交');
+          let data=this.form;
+         let res = await this.dockupdate(data);
+      if (this.$checkRes(res)) {
+        let authdata = {};
+        authdata.id = data.user_id;
+        authdata.name = data.adminuser;
+        let arr = await this.authUserUpdate(authdata);
+        if (this.$checkRes(arr)) {
+         this.$notify({
+          message: '修改信息成功',
+          type: 'success',
+        });
+          this.searchInfo();
+        }
+      }
         } else {
           console.log('error submit!!');
           return false;
@@ -104,9 +129,17 @@ export default {
       });
     },
     submitStatus(formName) {
-      this.$refs[formName].validate(valid => {
+      this.$refs[formName].validate(async valid => {
         if (valid) {
-          console.log('提交');
+             let data=this.form;
+         let res = await this.dockupdate(data);
+      if (this.$checkRes(res)) {
+        this.$notify({
+          message: '对接会审核成功',
+          type: 'success',
+        });
+        this.searchInfo();
+      }
         } else {
           console.log('error submit!!');
           return false;

+ 4 - 3
src/views/dockbind.vue

@@ -41,12 +41,13 @@ export default {
     },
   },
   methods: {
-    ...authUser(['bind']),
+    ...authUser(['dockbind']),
     async bindBtn() {
       let data = {};
-      data.qrcode = this.qrcode;
+      data.dock_id = this.qrcode;
+      data.role='3';
       data.openid = this.openid;
-      let res = await this.bind(data);
+      let res = await this.dockbind(data);
       if (res.errcode == '0') {
         this.$message({
           message: '绑定成功',

+ 9 - 0
src/views/user/parts/clickBtn.vue

@@ -43,6 +43,14 @@
             <van-cell is-link title="统计报表" @click="$router.push({ path: '/vipDockCenter/statisInfo/index' })" />
             <van-cell is-link title="动态监测" @click="$router.push({ path: '/vipDockCenter/dynamicInfo/index' })" />
           </span>
+          <span v-if="role=='3'">
+            <van-cell is-link title="展会管理" @click="$router.push({ path: '/dockCenter/dockInfo/index' })" />
+            <van-cell is-link title="申请管理" @click="$router.push({ path: '/dockCenter/applyInfo/index' })" />
+            <van-cell is-link title="VIP用户" @click="$router.push({ path: '/dockCenter/vipInfo/index' })" />
+            <van-cell is-link title="交易备案" @click="$router.push({ path: '/dockCenter/transaction/index' })" />
+            <van-cell is-link title="统计报表" @click="$router.push({ path: '/dockCenter/statisInfo/index' })" />
+            <van-cell is-link title="动态监测" @click="$router.push({ path: '/dockCenter/dynamicInfo/index' })" />
+          </span>
         </span>
       </el-col>
     </el-row>
@@ -62,6 +70,7 @@ export default {
       twoName: '',
       threeName: '',
       fourName: '',
+      role: '3'
     };
   },
   created() {