Prechádzať zdrojové kódy

Merge branch 'master' into 'dev'

Master

See merge request tuosi-crowd-test-service/cofotest-frontend!7
郭超 2 rokov pred
rodič
commit
3fbf976613

+ 401 - 397
src/components/commons/Header2.0.vue

@@ -1,429 +1,433 @@
 <template>
   <div class="header-nav" v-loading="loading">
     <div class="container">
-        <div class="nav-location pull-left">
-          <i class="el-icon-location-outline" style="margin-right: 5px"></i>
-          <span style="line-height: 34px" v-if="!city || city == ''">暂无</span>
-          <span style="line-height: 34px" v-else>{{city}}</span>
-        </div>
-        <div class="nav-list pull-right">
-          <ul>
-            <li>
-              <a @click="gotoHome" style="cursor: pointer">首页</a>
-            </li>
-            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
-            <li>
-            <li v-if="isLogin">
-              <el-dropdown>
+      <div class="nav-location pull-left">
+        <i class="el-icon-location-outline" style="margin-right: 5px"></i>
+        <span style="line-height: 34px" v-if="!city || city == ''">暂无</span>
+        <span style="line-height: 34px" v-else>{{ city }}</span>
+      </div>
+      <div class="nav-list pull-right">
+        <ul>
+          <li>
+            <a @click="gotoHome" style="cursor: pointer">首页</a>
+          </li>
+          &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+          <li>
+          <li v-if="isLogin">
+            <el-dropdown>
                 <span class="el-dropdown-link" style="color:rgb(153,153,153)">
-                  {{user.userVO.name}}<i class="el-icon-arrow-down el-icon--right"></i>
+                  {{ user.userVO.name }}<i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
-                <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item>
-                    <router-link :to="{ path:'/personal/mine'}">
-                      <el-link icon="el-icon-user" :underline="false">
-                        个人中心
-                      </el-link>
-                    </router-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item v-if="rolesPermissions.isSystemAdministrator">
-                    <router-link :to="{ name: 'AuthenticationManage'}">
-                      <el-link icon="el-icon-view" :underline="false">
-                        审核认证信息
-                      </el-link>
-                    </router-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item divided @click.native="userLogout()">登出</el-dropdown-item>
-                </el-dropdown-menu>
-              </el-dropdown>
-            </li>
-            <li v-if="!isLogin">
-              <a :href="loginUrl">请登录</a>
-            </li>
-            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
-            <li v-if="!isLogin">
-              <a :href="registerUrl">免费注册</a>
-            </li>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item>
+                  <router-link :to="{ path:'/personal/mine'}">
+                    <el-link icon="el-icon-user" :underline="false">
+                      个人中心
+                    </el-link>
+                  </router-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-if="rolesPermissions.isSystemAdministrator">
+                  <router-link :to="{ name: 'AuthenticationManage'}">
+                    <el-link icon="el-icon-view" :underline="false">
+                      审核认证信息
+                    </el-link>
+                  </router-link>
+                </el-dropdown-item>
+                <el-dropdown-item divided @click.native="userLogout()">登出</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </li>
+          <li v-if="!isLogin">
+            <a :href="loginUrl">请登录</a>
+          </li>
+          &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+          <li v-if="!isLogin">
+            <a :href="registerUrl">免费注册</a>
+          </li>
 
-            <li v-if="isLogin">
-              <span v-if="!isLogin">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
-              <router-link v-if="isLogin" to="/mine">
-                <a class="dropdown-toggle nav-link" data-toggle="dropdown">
-<!--                  <img class="icon" src="@/assets/img/mine_icon.svg">-->
-                  <span>我的众测</span>
-                </a>
-              </router-link>
-            </li>
+          <li v-if="isLogin">
+            <span v-if="!isLogin">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
+            <router-link v-if="isLogin" to="/mine">
+              <a class="dropdown-toggle nav-link" data-toggle="dropdown">
+                <!--                  <img class="icon" src="@/assets/img/mine_icon.svg">-->
+                <span>我的众测</span>
+              </a>
+            </router-link>
+          </li>
 
-            <span v-if="isLogin&&rolesPermissions.isSystemAdministrator">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
-            <li v-if="isLogin&&rolesPermissions.isSystemAdministrator">
-              <router-link v-if="isLogin" to="/statistics">
-                <span>机构统计</span>
-              </router-link>
-            </li>
+          <span v-if="isLogin&&rolesPermissions.isSystemAdministrator">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
+          <li v-if="isLogin&&rolesPermissions.isSystemAdministrator">
+            <router-link v-if="isLogin" to="/statistics">
+              <span>机构统计</span>
+            </router-link>
+          </li>
 
-<!--            <span v-if="isLogin&&(rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionManager)">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>-->
-<!--            <li v-if="isLogin&&(rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionManager)">-->
-<!--              <a :href="manage_url" v-if="manage_url">后台管理</a>-->
-<!--            </li>-->
-          </ul>
-        </div>
+          <!--            <span v-if="isLogin&&(rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionManager)">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>-->
+          <!--            <li v-if="isLogin&&(rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionManager)">-->
+          <!--              <a :href="manage_url" v-if="manage_url">后台管理</a>-->
+          <!--            </li>-->
+        </ul>
+      </div>
     </div>
   </div>
 
 </template>
 
 <script>
-  import {
-    defaultValue,
-    deleteAuthInfo,
-    getCurrentAgencyAuthInfo,
-    getCurrentEnterpriseAuthInfo,
-    getCurrentIndividualAuthenInfo,
-    getCurrentUser,
-    getRolesPermissions,
-    logout,
-    storageGet,
-    storageSave,
-    storageRemove
-  } from '@/js/index'
-  import Http from '@/js/http.js'
-  import Apis from '@/js/api.js'
-  import {mapActions} from 'vuex'
-  import {login_url,register_url,CONFIG} from '../../config/index'
-  export default {
-    name: "Header2.0",
-    data(){
-      return {
-        user: {},
-        loading: false,
-        fullScreenLoading: true,
-        loginUrl: login_url,
-        registerUrl: register_url,
-        manage_url:CONFIG.manage_url,
-        authInfo: {},
-        isShowAuthCheckingDialog: false,
-        isShowAuthRejectDialog: false,
-        isShowAuthPassDialog: false,
-        //loading: true,
-        openNavBar: false,
-        defaultValue: defaultValue,
-        userIdentity: '',
-        isLogin: false,
-        rolesPermissions: {},
-        city: ''
-      }
+import {
+  defaultValue,
+  deleteAuthInfo,
+  getCurrentAgencyAuthInfo,
+  getCurrentEnterpriseAuthInfo,
+  getCurrentIndividualAuthenInfo,
+  getCurrentUser,
+  getRolesPermissions,
+  logout,
+  storageGet,
+  storageSave,
+  storageRemove
+} from '@/js/index'
+import Http from '@/js/http.js'
+import Apis from '@/js/api.js'
+import {mapActions} from 'vuex'
+import {login_url, register_url, CONFIG} from '../../config/index'
+
+export default {
+  name: 'Header2.0',
+  data () {
+    return {
+      user: {},
+      loading: false,
+      fullScreenLoading: true,
+      loginUrl: login_url,
+      registerUrl: register_url,
+      manage_url: CONFIG.manage_url,
+      authInfo: {},
+      isShowAuthCheckingDialog: false,
+      isShowAuthRejectDialog: false,
+      isShowAuthPassDialog: false,
+      //loading: true,
+      openNavBar: false,
+      defaultValue: defaultValue,
+      userIdentity: '',
+      isLogin: false,
+      rolesPermissions: {},
+      city: ''
+    }
+  },
+  watch: {
+    'user.authStatus' (val) {
+      this.user.authStatus = val
+      // console.log('changed')
+      // console.log(this.user.authStatus)
+    },
+    deep: true
+  },
+  methods: {
+    ...mapActions(['setUser']),
+    gotoHome () {
+      this.$router.push('/home')
+    },
+    openNavBarFunc () {
+      this.openNavBar = !this.openNavBar
     },
-    watch: {
-        'user.authStatus' (val) {
-            this.user.authStatus = val
-            // console.log('changed')
-            // console.log(this.user.authStatus)
-        },
-        deep: true
+    getAddress () {
+      Http.get(Apis.USER.GET_ADDRESS).then((res) => {
+        this.city = res.city
+      }).catch((error) => {
+        this.hideLoading()
+        notify('error', '获取定位失败:' + error.data)
+      })
     },
-    methods: {
-        ...mapActions(['setUser']),
-        gotoHome(){
-            this.$router.push('/home');
-        },
-        openNavBarFunc () {
-            this.openNavBar = !this.openNavBar
-        },
-        getAddress(){
-            Http.get(Apis.USER.GET_ADDRESS).then((res) => {
-                this.city = res.city
-            }).catch((error) => {
-                this.hideLoading()
-                notify('error', '获取定位失败:' + error.data)
-            })
-        },
 
-        showLoading() {
-          this.loading = true
-        },
-        hideLoading() {
-          this.loading = false
-        },
-        setUserInfo () {
-            this.showLoading();
-            if (storageGet('user') == null) {
-                storageSave('rolesPermissions', {
-                    'isRegionManager': false,
-                    'isIndividualUser': false,
-                    'isEnterpriseUser': false,
-                    'isAgency': false,
-                    'isSystemAdministrator': false
-                });
-                // console.log('本地没有用户信息,开始加载用户信息')
-              //暂时注释
-              // this.user = storageGet('user')
-              // this.rolesPermissions = getRolesPermissions(storageGet('user')&&storageGet('user').roleList)
-              // storageSave('rolesPermissions', getRolesPermissions(torageGet('user')&&storageGet('user').roleList))
-              // this.isLogin = true
-              // this.fullScreenLoading = false
-                getCurrentUser().then((res) => {
-                    storageSave('user', res)
-                    this.setUser(res);
-                    this.user = res;
-                    storageSave('rolesPermissions', getRolesPermissions(res.roleList))
-                    this.rolesPermissions = storageGet('rolesPermissions')
-                    console.log('用户信息加载成功')
-                    this.isLogin = true
-                    // this.fullScreenLoading = false
-                    this.hideLoading();
-                }).catch((error) => {
-                    console.log('用户信息加载失败')
-                    // this.fullScreenLoading = false
-                    this.hideLoading();
-                })
-            } else {
-                this.user = storageGet('user');
-                this.rolesPermissions = storageGet('rolesPermissions')
-                // this.fullScreenLoading = false
-                this.isLogin = true
-            }
-            this.hideLoading();
-        },
-        getCurrentUserSuccess (res) {
-            storageSave('user', res)
-            this.user = res
-            storageSave('rolesPermissions', getRolesPermissions(res.roleList))
-            this.rolesPermissions = storageGet('rolesPermissions')
-            console.log('用户信息加载成功')
-            this.isLogin = true
-            this.fullScreenLoading = false
-        },
-        getCurrentUserFail (error) {
-            console.log('用户信息加载失败')
-            this.fullScreenLoading = false
-        },
-        userLogout () {
-            this.isLogin = false
-            storageRemove('user')
-            logout().then((res) => {
-                // location.reload();
-                if(this.$route.fullPath.includes("/home")){
-                  location.reload();
-                }else{
-                  this.$router.push('/home')
-                }
+    showLoading () {
+      this.loading = true
+    },
+    hideLoading () {
+      this.loading = false
+    },
+    setUserInfo () {
+      this.showLoading()
+      getCurrentUser().then((res) => {
+        storageSave('user', res)
+        this.setUser(res)
+        this.user = res
+        storageSave('rolesPermissions', getRolesPermissions(res.roleList))
+        this.rolesPermissions = storageGet('rolesPermissions')
+        console.log('用户信息加载成功')
+        this.isLogin = true
+        // this.fullScreenLoading = false
+        this.hideLoading()
+      }).catch((error) => {
+        console.log('用户信息加载失败')
+        // this.fullScreenLoading = false
+        storageRemove('user')
+        this.hideLoading()
+      })
+      // if (storageGet('user') == null) {
+      //   storageSave('rolesPermissions', {
+      //     'isRegionManager': false,
+      //     'isIndividualUser': false,
+      //     'isEnterpriseUser': false,
+      //     'isAgency': false,
+      //     'isSystemAdministrator': false
+      //   })
+      //   // console.log('本地没有用户信息,开始加载用户信息')
+      //   //暂时注释
+      //   // this.user = storageGet('user')
+      //   // this.rolesPermissions = getRolesPermissions(storageGet('user')&&storageGet('user').roleList)
+      //   // storageSave('rolesPermissions', getRolesPermissions(torageGet('user')&&storageGet('user').roleList))
+      //   // this.isLogin = true
+      //   // this.fullScreenLoading = false
+      //
+      // } else {
+      //   this.user = storageGet('user')
+      //   this.rolesPermissions = storageGet('rolesPermissions')
+      //   // this.fullScreenLoading = false
+      //   this.isLogin = true
+      // }
+      this.hideLoading()
+    },
+    getCurrentUserSuccess (res) {
+      storageSave('user', res)
+      this.user = res
+      storageSave('rolesPermissions', getRolesPermissions(res.roleList))
+      this.rolesPermissions = storageGet('rolesPermissions')
+      console.log('用户信息加载成功')
+      this.isLogin = true
+      this.fullScreenLoading = false
+    },
+    getCurrentUserFail (error) {
+      console.log('用户信息加载失败')
+      this.fullScreenLoading = false
+    },
+    userLogout () {
+      this.isLogin = false
+      storageRemove('user')
+      logout().then((res) => {
+        // location.reload();
+        if (this.$route.fullPath.includes('/home')) {
+          location.reload()
+        } else {
+          this.$router.push('/home')
+        }
 
-            })
+      })
 
-        },
-        // showLoading () {
-        //     this.fullScreenLoading = true
-        // },
-        // hideLoading () {
-        //     this.fullScreenLoading = false
-        // },
-        handleClickAuthReject () {
-            if (this.user.userVO.authType == 'agency') {
-                this.$router.push({
-                    name: 'AgencyAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }
-            if (this.user.userVO.authType == 'enterprise') {
-                this.$router.push({
-                    name: 'EnterpriseAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }
-            if (this.user.userVO.authType == 'personal') {
-                this.$router.push({
-                    name: 'IndividualAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }
+    },
+    // showLoading () {
+    //     this.fullScreenLoading = true
+    // },
+    // hideLoading () {
+    //     this.fullScreenLoading = false
+    // },
+    handleClickAuthReject () {
+      if (this.user.userVO.authType == 'agency') {
+        this.$router.push({
+          name: 'AgencyAuthentication',
+          params: {userId: this.user.userVO.id}
+        })
+      }
+      if (this.user.userVO.authType == 'enterprise') {
+        this.$router.push({
+          name: 'EnterpriseAuthentication',
+          params: {userId: this.user.userVO.id}
+        })
+      }
+      if (this.user.userVO.authType == 'personal') {
+        this.$router.push({
+          name: 'IndividualAuthentication',
+          params: {userId: this.user.userVO.id}
+        })
+      }
 
-            //this.getAuthInfo()
-        },
-        handleClickAuthPass () {
-            if (this.user.personalAuthVO) {
-                this.$router.push({
-                    name: 'IndividualAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }else if (this.user.agencyVO) {
-                this.$router.push({
-                    name: 'AgencyAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }
-            else if (this.user.enterpriseAuthVO) {
-                this.$router.push({
-                    name: 'EnterpriseAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }
+      //this.getAuthInfo()
+    },
+    handleClickAuthPass () {
+      if (this.user.personalAuthVO) {
+        this.$router.push({
+          name: 'IndividualAuthentication',
+          params: {userId: this.user.userVO.id}
+        })
+      } else if (this.user.agencyVO) {
+        this.$router.push({
+          name: 'AgencyAuthentication',
+          params: {userId: this.user.userVO.id}
+        })
+      } else if (this.user.enterpriseAuthVO) {
+        this.$router.push({
+          name: 'EnterpriseAuthentication',
+          params: {userId: this.user.userVO.id}
+        })
+      }
 
-            //this.getAuthInfo()
-        },
-        handleClickAuthChecking () {
-            //this.getAuthInfo()
-            if (this.user.userVO.authType == 'agency') {
-                this.$router.push({
-                    name: 'AgencyAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }
-            if (this.user.userVO.authType == 'enterprise') {
-                this.$router.push({
-                    name: 'EnterpriseAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }
-            if (this.user.userVO.authType == 'personal') {
-                this.$router.push({
-                    name: 'IndividualAuthentication',
-                    params: {userId: this.user.userVO.id}
-                })
-            }
-        },
-        showAuthRejectDialog () {
-            this.isShowAuthRejectDialog = true
-        },
-        showAuthPassDialog () {
-            this.isShowAuthPassDialog = true
-        },
-        showAuthCheckingDialog () {
-            this.isShowAuthCheckingDialog = true
-        },
-        hideAuthRejectDialog () {
-            this.isShowAuthRejectDialog = false
-        },
-        hideAuthPassDialog () {
-            this.isShowAuthPassDialog = false
-        },
-        hideAuthCheckingDialog () {
-            this.isShowAuthCheckingDialog = false
-        },
-        deleteOldAuthInfo () {
-            this.hideAuthCheckingDialog()
-            this.hideAuthRejectDialog()
-            this.hideAuthPassDialog()
-            this.showLoading()
-            deleteAuthInfo().then((res) => {
-                this.hideLoading()
-                notify('success', '成功删除认证信息')
-            }).catch((error) => {
-                this.hideLoading()
-                notify('error', '删除认证信息失败:' + error.data)
-            })
-        },
-        getAuthInfo () {
-            this.showLoading()
-            if (this.user.userVO.authType == 'agency') {
-                getCurrentAgencyAuthInfo(this.user.userVO.id, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail)
-            }
-            if (this.user.userVO.authType == 'personal') {
-                getCurrentIndividualAuthenInfo(this.user.userVO.id, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail)
-            }
-            if (this.user.userVO.authType == 'enterprise') {
-                getCurrentEnterpriseAuthInfo(this.user.userVO.id, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail)
-            }
-        },
-        getCurrentAgencyAuthInfoSuccess () {
-            this.hideLoading()
-        },
-        getCurrentAgencyAuthInfoFail () {
-            this.hideLoading()
-        },
-        getCurrentIndividualAuthenInfoSuccess () {
-            this.hideLoading()
-        },
-        getCurrentIndividualAuthenInfoFail () {
-            this.hideLoading()
-        },
-        getCurrentEnterpriseAuthInfoSuccess () {
-            this.hideLoading()
-        },
-        getCurrentEnterpriseAuthInfoFail () {
-            this.hideLoading()
-        },
-        handleUpdateAuthInfo () {
-            this.hideAuthPassDialog()
-            this.hideAuthRejectDialog()
-            this.hideAuthCheckingDialog()
-            if (this.user.userVO.authType == 'personal') {
-                this.$router.push({
-                    name: 'IndividualAuthentication',
-                    params: {
-                        userId: this.authInfo.userId
-                    }
-                })
-            }
-            if (this.authInfo.type == 'enterprise') {
-                this.$router.push({
-                    name: 'EnterpriseAuthentication',
-                    params: {
-                        userId: this.authInfo.userId
-                    }
-                })
-            }
-            if (this.authInfo.type == 'agency') {
-                this.$router.push({
-                    name: 'AgencyAuthentication',
-                    params: {
-                        userId: this.authInfo.userId
-                    }
-                })
-            }
-        }
+      //this.getAuthInfo()
     },
-    created () {
-        var self = this
-        this.$root.$on('user', function (val) {
-            self.user = val
+    handleClickAuthChecking () {
+      //this.getAuthInfo()
+      if (this.user.userVO.authType == 'agency') {
+        this.$router.push({
+          name: 'AgencyAuthentication',
+          params: {userId: this.user.userVO.id}
+        })
+      }
+      if (this.user.userVO.authType == 'enterprise') {
+        this.$router.push({
+          name: 'EnterpriseAuthentication',
+          params: {userId: this.user.userVO.id}
+        })
+      }
+      if (this.user.userVO.authType == 'personal') {
+        this.$router.push({
+          name: 'IndividualAuthentication',
+          params: {userId: this.user.userVO.id}
         })
+      }
+    },
+    showAuthRejectDialog () {
+      this.isShowAuthRejectDialog = true
+    },
+    showAuthPassDialog () {
+      this.isShowAuthPassDialog = true
+    },
+    showAuthCheckingDialog () {
+      this.isShowAuthCheckingDialog = true
+    },
+    hideAuthRejectDialog () {
+      this.isShowAuthRejectDialog = false
+    },
+    hideAuthPassDialog () {
+      this.isShowAuthPassDialog = false
+    },
+    hideAuthCheckingDialog () {
+      this.isShowAuthCheckingDialog = false
+    },
+    deleteOldAuthInfo () {
+      this.hideAuthCheckingDialog()
+      this.hideAuthRejectDialog()
+      this.hideAuthPassDialog()
+      this.showLoading()
+      deleteAuthInfo().then((res) => {
+        this.hideLoading()
+        notify('success', '成功删除认证信息')
+      }).catch((error) => {
+        this.hideLoading()
+        notify('error', '删除认证信息失败:' + error.data)
+      })
+    },
+    getAuthInfo () {
+      this.showLoading()
+      if (this.user.userVO.authType == 'agency') {
+        getCurrentAgencyAuthInfo(this.user.userVO.id, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail)
+      }
+      if (this.user.userVO.authType == 'personal') {
+        getCurrentIndividualAuthenInfo(this.user.userVO.id, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail)
+      }
+      if (this.user.userVO.authType == 'enterprise') {
+        getCurrentEnterpriseAuthInfo(this.user.userVO.id, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail)
+      }
     },
-    beforeMount () {
-      this.getAddress();
-        this.setUserInfo();
-        // if (storageGet('user' != null)){
-        //   this.isLogin = true
-        // }
+    getCurrentAgencyAuthInfoSuccess () {
+      this.hideLoading()
     },
-  }
+    getCurrentAgencyAuthInfoFail () {
+      this.hideLoading()
+    },
+    getCurrentIndividualAuthenInfoSuccess () {
+      this.hideLoading()
+    },
+    getCurrentIndividualAuthenInfoFail () {
+      this.hideLoading()
+    },
+    getCurrentEnterpriseAuthInfoSuccess () {
+      this.hideLoading()
+    },
+    getCurrentEnterpriseAuthInfoFail () {
+      this.hideLoading()
+    },
+    handleUpdateAuthInfo () {
+      this.hideAuthPassDialog()
+      this.hideAuthRejectDialog()
+      this.hideAuthCheckingDialog()
+      if (this.user.userVO.authType == 'personal') {
+        this.$router.push({
+          name: 'IndividualAuthentication',
+          params: {
+            userId: this.authInfo.userId
+          }
+        })
+      }
+      if (this.authInfo.type == 'enterprise') {
+        this.$router.push({
+          name: 'EnterpriseAuthentication',
+          params: {
+            userId: this.authInfo.userId
+          }
+        })
+      }
+      if (this.authInfo.type == 'agency') {
+        this.$router.push({
+          name: 'AgencyAuthentication',
+          params: {
+            userId: this.authInfo.userId
+          }
+        })
+      }
+    }
+  },
+  created () {
+    var self = this
+    this.$root.$on('user', function (val) {
+      self.user = val
+    })
+  },
+  beforeMount () {
+    this.getAddress()
+    this.setUserInfo()
+    // if (storageGet('user' != null)){
+    //   this.isLogin = true
+    // }
+  },
+}
 </script>
 
 <style scoped>
-  .header-nav {
-    padding: 5px 0;
-    text-align: center;
-    display: flex;
-    font-size: 16px;
-    color: rgba(153, 153, 153, 1);
-    /*height:58px;*/
-    background:rgba(243,244,247,1);
-  }
-  .header-nav ul{
-    margin-bottom: 0;
-    padding: 0;
-    list-style: none;
-  }
+.header-nav {
+  padding: 5px 0;
+  text-align: center;
+  display: flex;
+  font-size: 16px;
+  color: rgba(153, 153, 153, 1);
+  /*height:58px;*/
+  background: rgba(243, 244, 247, 1);
+}
+
+.header-nav ul {
+  margin-bottom: 0;
+  padding: 0;
+  list-style: none;
+}
+
+.header-nav ul li {
+  display: inline-block;
+}
 
-  .header-nav ul li {
-    display: inline-block;
-  }
+.header-nav ul li a {
+  color: inherit;
+  padding: 5px;
+  font-weight: 500;
+  text-transform: uppercase;
+  border-radius: 3px;
+  position: relative;
+  display: block;
+}
 
-  .header-nav ul li a{
-    color: inherit;
-    padding: 5px;
-    font-weight: 500;
-    text-transform: uppercase;
-    border-radius: 3px;
-    position: relative;
-    display: block;
-  }
+.header-nav .copyright {
+  padding: 5px 0;
+  color: #333;
+}
 
-  .header-nav .copyright {
-    padding: 5px 0;
-    color:#333;
-  }
-  .copyright a{
-    color:#666;
-  }
+.copyright a {
+  color: #666;
+}
 </style>

+ 21 - 2
src/components/task/Task.vue

@@ -86,6 +86,19 @@
             <el-form-item label="领取人数" prop="contactPhone" v-if="isModifyMode&&task.resource !== '0' && currType.type===1">
               <el-input-number v-model="task.participantCount" :min="2" :max="1000" label="领取人数"></el-input-number>
             </el-form-item>
+            <el-form-item label="Go平台" prop="goPlatform">
+              <div v-if="!isModifyMode">
+                <!--<div v-if="task.resource=='1'">{{updateLocation(task.location)}}</div>-->
+                <div v-if="task.goPlatform">使用</div>
+                <div v-else>不使用</div>
+              </div>
+              <div v-else>
+                <el-radio-group v-model="task.goPlatform">
+                  <el-radio :label="0">不使用</el-radio>
+                  <el-radio :label="1">使用</el-radio>
+                </el-radio-group>
+              </div>
+            </el-form-item>
             <el-form-item label="领取人数" prop="quotePrice" v-if="!isModifyMode">
               {{task.acceptedCount }}/{{ task.participantCount}}
             </el-form-item>
@@ -154,10 +167,11 @@
             </el-form-item>
 
             <el-form-item v-if="!isModifyMode">
+              <el-button size="mini" @click="toProject()">项目详情</el-button>
               <el-button v-if="taskOperationControl.update||taskOperationControl.taskRecommend" @click="manageVirtualMachine()" type="primary" size="mini">管理虚拟机</el-button>
               <el-button v-if="taskOperationControl.writeReport||taskOperationControl.uploadReport" @click="connectVirtualMachine()" type="primary" size="mini">连接虚拟机</el-button>
-              <el-button size="mini" @click="toProject()">项目详情</el-button>
-              <el-button size="mini" @click="toGo()">go语言测试在线测试平台</el-button>
+
+              <el-button v-if="(taskOperationControl.writeReport||taskOperationControl.uploadReport||taskOperationControl.update||taskOperationControl.taskRecommend)&&task.goPlatform" type="primary" size="mini" @click="toGo()">go语言测试在线测试平台</el-button>
 
               <el-popover
                 placement="top-start"
@@ -338,6 +352,7 @@ export default {
         doc: [],
         requireDocUrl: '',
         participantCount: 1,
+        goPlatform: 0,
         title: '',
         description: '',
         endPoint: {
@@ -536,6 +551,7 @@ export default {
       this.task.institution = ''
       this.task.datetime = ''
       this.task.participantCount = 1
+      this.task.goPlatform = 0
       // this.task.endPointVO.caseId = ''
       // this.task.endPointVO.examId = ''
     },
@@ -646,6 +662,7 @@ export default {
       this.task.quotePrice = res.crowdTaskVO.quotePrice
       this.task.acceptedCount = res.crowdTaskVO.acceptedCount
       this.task.participantCount = res.crowdTaskVO.participantCount
+      this.task.goPlatform = res.crowdTaskVO.goPlatform
       this.task.fixedPrice = res.crowdTaskVO.fixedPrice
       this.task.doc = []
       this.task.requireDocUrl = res.crowdTaskVO.requirementFile
@@ -731,6 +748,7 @@ export default {
             fixedPrice: this.task.fixedPrice,
             requirementFile: this.task.requireDocUrl,
             participantCount: this.task.participantCount,
+            goPlatform: this.task.goPlatform,
             endPoint: this.task.endPoint
           }
           //console.log(newTask)
@@ -762,6 +780,7 @@ export default {
       this.task.doc = []
       this.task.requireDocUrl = res.crowdTaskVO.requirementFile,
         this.task.participantCount = res.crowdTaskVO.participantCount
+      this.task.goPlatform = res.crowdTaskVO.goPlatform
       this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {
         serverCode: '',
       }

+ 11 - 0
src/components/task/TaskCreate.vue

@@ -80,6 +80,14 @@
         <el-form-item label="领取人数" prop="contactPhone" v-if="task.resource !== '0' && currType.type===1">
           <el-input-number v-model="task.participantCount" :min="2" :max="1000" label="领取人数"></el-input-number>
         </el-form-item>
+
+        <el-form-item label="Go平台" prop="goPlatform">
+          <el-radio-group v-model="task.goPlatform">
+            <el-radio :label="0">不使用</el-radio>
+            <el-radio :label="1">使用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
         <el-form-item label="需求文档" prop="doc">
           <el-upload
             drag
@@ -159,6 +167,7 @@
           doc: [],
           requireDocUrl: '',
           participantCount: 1,
+          goPlatform: 0,
           endPoint: {
             serverCode: '',
           }
@@ -328,6 +337,7 @@
               fixedPrice: this.task.fixedPrice,
               requirementFile: this.task.requireDocUrl,
               participantCount: this.task.participantCount,
+              goPlatform: this.task.goPlatform,
               endPoint: this.task.endPoint
             }
             Http.post(Apis.TASK.CREATE_TASK.replace('{projectId}', this.projectId), newTask).then((res) => {
@@ -356,6 +366,7 @@
           (this.task.institution = '')
         this.task.datetime = '',
           this.task.participantCount = 1
+        this.task.goPlatform
       },
       locationChange(provinceId, cityId) {
         if (provinceId || cityId) {

+ 2 - 2
src/pages/Homepage/HotAgency.vue

@@ -7,7 +7,7 @@
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in agencyRank" :key="item.id">
-        <el-col :span="19">
+        <el-col :span="18">
           <img :src="item.agencyPhoto==null?defaultValue.image:item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.userId)">
           <div style="margin-left: 55px; cursor: pointer;" @click="goToDetail(item.userId)"  >
             <div class="list-item-title single-line-title">
@@ -18,7 +18,7 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="5">
+        <el-col :span="6">
           <div class="project-people-number">
             {{item.taskCount}}次
           </div>

+ 2 - 2
src/pages/Homepage/HotCrowd.vue

@@ -7,7 +7,7 @@
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in applicationTypeRank" :key="item.id" @click.native="goToDetail(item.code)">
-        <el-col :span="19">
+        <el-col :span="18">
           <img :src="item.image" alt="logo-project" class="pull-left project-logo-img">
           <div style="margin-left: 55px">
             <div class="list-item-title single-line-title">
@@ -17,7 +17,7 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="5">
+        <el-col :span="6">
           <div class="project-people-number">
             {{item.count}}次
           </div>

+ 1 - 0
src/pages/HomepageSearch/UserList.vue

@@ -108,6 +108,7 @@
     data() {
       return {
         user: {},
+        logoTitle:CONFIG.logoTitle,
         isLogin: false,
         logo_transparent:CONFIG.logo_transparent,
         id: 0,

+ 61 - 49
src/pages/Technology/CrowdCase.vue

@@ -1,22 +1,22 @@
 <template>
   <div class="technology-card">
     <div class="card-wrapper" v-if="caseList&&caseList.length">
-      <el-card  v-for="item in caseList" :key="item.id"  style="margin-bottom: 15px">
+      <el-card v-for="item in caseList" :key="item.id" style="margin-bottom: 15px">
         <el-row>
           <el-col :span="21">
-            <div class="technology-title">
-              {{item.title}}
-<!--              <el-tag :type="item.statusVO&&item.statusVO.style" size="medium" class="case-status">{{item.statusVO&&item.statusVO.text}}</el-tag>-->
-              <el-tag size="medium" class="case-status">{{item.serviceType}}</el-tag>
+            <div class="technology-title" @click="goToProjectDetail(item.projectId)" style="cursor: pointer">
+              {{ item.title }}
+              <!--              <el-tag :type="item.statusVO&&item.statusVO.style" size="medium" class="case-status">{{item.statusVO&&item.statusVO.text}}</el-tag>-->
+              <el-tag size="medium" class="case-status">{{ item.serviceType }}</el-tag>
             </div>
             <div class="technology-info">
-              任务描述:{{item.description}}
+              任务描述:{{ item.description }}
             </div>
             <div class="technology-info">
-              发布时间:{{$moment(item.createTime).format('YYYY-MM-DD HH:mm:ss')}}
+              发布时间:{{ $moment(item.createTime).format('YYYY-MM-DD HH:mm:ss') }}
             </div>
             <div class="technology-info">
-              截至时间:{{$moment(item.dateTime).format('YYYY-MM-DD HH:mm:ss')}}
+              截至时间:{{ $moment(item.dateTime).format('YYYY-MM-DD HH:mm:ss') }}
             </div>
           </el-col>
 
@@ -36,58 +36,70 @@
 </template>
 
 <script>
-  export default {
-    name: 'CrowdTool',
-    props:['caseList'],
-    methods:{
-      gotoDetail(item){
-        window.open(item.endPointVO.token)
-      }
+export default {
+  name: 'CrowdTool',
+  props: ['caseList'],
+  methods: {
+    gotoDetail (item) {
+      window.open(item.endPointVO.token)
+    },
+    goToProjectDetail (id) {
+      let routeUrl = this.$router.resolve({
+        name: 'Project',
+        params: {projectId: id}
+      })
+      window.open(routeUrl.href, '_blank')
+      // this.$router.push({name: 'Project', params: {projectId: id}})
     }
   }
+}
 </script>
 
 <style scoped lang="scss">
-  @import "../../style/main";
+@import "../../style/main";
 
-  .technology-card {
-    .card-wrapper {
-      .technology-img {
-        width: 100%;
-        height: 130px;
-      }
-      .technology-title{
-        font-size:22px;
-        font-family:Source Han Sans CN;
-        font-weight:500;
-        color:rgba(0,0,0,1);
+.technology-card {
+  .card-wrapper {
+    .technology-img {
+      width: 100%;
+      height: 130px;
+    }
+
+    .technology-title {
+      font-size: 22px;
+      font-family: Source Han Sans CN;
+      font-weight: 500;
+      color: rgba(0, 0, 0, 1);
+      line-height: 30px;
+
+      .case-status {
         line-height: 30px;
-        .case-status {
-          line-height: 30px;
-          margin-left: 10px;
-        }
-      }
-      .technology-info {
-        font-size:16px;
-        font-family:Source Han Sans CN;
-        font-weight:400;
-        color:rgba(0,0,0,1);
-        margin: 10px 0
+        margin-left: 10px;
       }
     }
-    .get-info-btn {
-      display: inline-block;
-      color: white;
-      background-color: $--color-primary;
-      border-radius: 50%;
-      width: 18px;
-      height: 18px;
-      margin-left: 5px;
+
+    .technology-info {
       font-size: 16px;
+      font-family: Source Han Sans CN;
+      font-weight: 400;
+      color: rgba(0, 0, 0, 1);
+      margin: 10px 0
+    }
+  }
 
-      i {
-        margin: 1px;
-      }
+  .get-info-btn {
+    display: inline-block;
+    color: white;
+    background-color: $--color-primary;
+    border-radius: 50%;
+    width: 18px;
+    height: 18px;
+    margin-left: 5px;
+    font-size: 16px;
+
+    i {
+      margin: 1px;
     }
   }
+}
 </style>

+ 18 - 9
src/pages/UserCenter/MyBankCard.vue

@@ -31,13 +31,16 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="开户行" prop="subName">
+          <el-input v-model="bankCardForm.subName"></el-input>
+        </el-form-item>
       </el-form>
-      <div>
-        银行卡绑定成功后,您将享受以下服务:
-      </div>
-      <div>①可以申请平台的收益</div>
-      <div>②可以申请平台的收益</div>
-      <div>③可以申请平台的收益</div>
+<!--      <div>-->
+<!--        银行卡绑定成功后,您将享受以下服务:-->
+<!--      </div>-->
+<!--      <div>①可以申请平台的收益</div>-->
+<!--      <div>②可以申请平台的收益</div>-->
+<!--      <div>③可以申请平台的收益</div>-->
       <span slot="footer" class="dialog-footer">
     <el-button @click="addBankCard = false">取 消</el-button>
     <el-button type="primary" @click="handleAddBankCard">确认添加</el-button>
@@ -66,6 +69,7 @@
         form: {
           name: '',
           number:'',
+          subName:'',
           institution:'',
           date:'',
           isPublic:''
@@ -73,7 +77,8 @@
         bankCardForm:{
           user:'',
           number:'',
-          name:''
+          name:'',
+          subName:'',
         },
         user:{},
         bankCardVOList:[],
@@ -87,7 +92,10 @@
             ],
             name: [
                 {required: true, message: '银行类型不可为空', trigger: 'blur'}
-            ]
+            ],
+            subName: [
+              {required: true, message: '开户行不可为空', trigger: 'blur'},
+            ],
         }
       }
     },
@@ -110,7 +118,8 @@
 
                       this.bankCardForm.user = '',
                       this.bankCardForm.number = '',
-                      this.bankCardForm.name = ''
+                      this.bankCardForm.name = '',
+                      this.bankCardForm.subName = '',
                       this.loadData();
 
                   }).catch(error => {