Browse Source

我的认证

master
453530270@qq.com 3 years ago
parent
commit
d884e131e3
  1. 80
      pages/user/index.vue
  2. 57
      pages/user/mycertinfo/mycertinfo.vue
  3. BIN
      static/icons.png
  4. 3
      utils/request/index.js

80
pages/user/index.vue

@ -32,9 +32,9 @@
</view>
<!-- 订单操作 -->
<!-- 操作区域 -->
<view class="order-navbar">
<view class="order-navbar-item" v-for="(item, index) in orderNavbar" :key="index" @click="onTargetOrder(item)">
<!-- <view class="order-navbar-item" v-for="(item, index) in orderNavbar" :key="index" @click="onTargetOrder(item)">
<view class="item-icon">
<text class="iconfont" :class="[`icon-${item.icon}`]"></text>
</view>
@ -43,7 +43,35 @@
<text v-if="item.count <= 99" class="text">{{ item.count }}</text>
<text v-else class="text">99+</text>
</view>
</view>
</view> -->
<!-- 我的认证 -->
<view class="order-navbar-item" @click="mycertinfo()">
<view class="item-icon">
<text class="iconfont icon-qpdingdan"></text>
</view>
<view class="item-name"> 我的认证</view>
</view>
<!-- 买入订单 -->
<view class="order-navbar-item">
<view class="item-icon">
<text class="iconfont icon-daifukuan"></text>
</view>
<view class="item-name"> 买入订单</view>
</view>
<!-- 卖出订单 -->
<view class="order-navbar-item">
<view class="item-icon">
<text class="iconfont icon-qpdingdan"></text>
</view>
<view class="item-name"> 卖出订单</view>
</view>
<!-- 发票管理 -->
<view class="order-navbar-item">
<view class="item-icon">
<text class="iconfont icon-qpdingdan"></text>
</view>
<view class="item-name"> 发票管理</view>
</view>
</view>
<!-- 操作日志 -->
@ -78,22 +106,10 @@
<script>
import store from '@/store'
import AvatarImage from '@/components/avatar-image'
import { setCartTabBadge } from '@/core/app'
import SettingKeyEnum from '@/common/enum/setting/Key'
import SettingModel from '@/common/model/Setting'
import * as UserApi from '@/api/user'
import * as OrderApi from '@/api/order'
import { checkLogin } from '@/core/app'
//
const orderNavbar = [
{ id: 'all', name: '我的认证', icon: 'qpdingdan' },
{ id: 'payment', name: '买入订单', icon: 'daifukuan', count: 0 },
{ id: 'delivery', name: '卖出订单', icon: 'order-c', count: 0 },
{ id: 'received', name: '发票管理', icon: 'daishouhuo', count: 0 },
]
export default {
components: {
@ -101,24 +117,16 @@
},
data() {
return {
//
SettingKeyEnum,
//
isLoading: true,
//
isFirstload: true,
//
isLogin: false,
//
setting: {},
//
userInfo: {},
//
oplist:[],
//
orderNavbar,
//
todoCounts: { payment: 0, deliver: 0, received: 0 }
oplist:[]
}
},
@ -151,8 +159,7 @@
Promise.all([app.getUserInfo(), app.getOplogs()])
.then(result => {
app.isFirstload = false
//
app.initOrderTabbar()
//
callback && callback()
})
@ -160,19 +167,6 @@
.finally(() => app.isLoading = false)
},
//
initOrderTabbar() {
const app = this
const newOrderNavbar = []
orderNavbar.forEach(item => {
if (item.count != undefined) {
item.count = app.todoCounts[item.id]
}
newOrderNavbar.push(item)
})
app.orderNavbar = newOrderNavbar
},
//
getUserInfo() {
@ -200,6 +194,7 @@
// console.log("err",err);
if (err && err.statusCode == 401) {
app.isLogin = false
uni.clearStorageSync()
resolve(null)
} else {
reject(err)
@ -220,6 +215,8 @@
.catch(err => {
if (err.result && err.result.status == 401) {
app.isLogin = false
store.dispatch('Logout', {})
.then(result => app.onRefreshPage())
resolve(null)
} else {
reject(err)
@ -228,6 +225,11 @@
})
},
//
mycertinfo(){
this.$navTo('pages/user/mycertinfo/mycertinfo')
},
//
handleLogin() {

57
pages/user/mycertinfo/mycertinfo.vue

@ -1,10 +1,54 @@
<template>
<view>
<view class="certinfo">
<!-- 认证第一步 -->
<view class="ce-frist">
<view class="cert-title">我的认证</view>
<view class="ce-fbox">
<view class="fbtit">机构认证</view>
<view class="fbicon fbjg"></view>
<view class="">
含企业政府事业单位团体组织
</view>
</view>
<view class="ce-fbox">
<view class="fbtit">个人认证</view>
<view class="fbicon fbgr"></view>
<view class="">
适用于个人用户
</view>
</view>
</view>
<!-- <div class="right_box" id="institutions">
<div class="box_title" id="box_title1">机构认证</div>
<div class="border_box">
<div class="border_icon1"></div>
<div class="border_title">机构认证</div>
<div class="border_title" style="margin: 15px 0px;">含企业政府事业单位团体组织</div>
<div class="border_input">
<input autocomplete="off" autocomplete="off" type="button" name="" id="organAuth01" value="立即认证"
onclick="handelOrganization()" />
</div>
</div>
</div> -->
<!-- <div class="right_box" id="people">
<div class="box_title" id="box_title2">个人认证</div>
<div class="border_box">
<div class="border_icon"></div>
<div class="border_title">个人认证</div>
<div class="border_title" style="margin: 15px 0px;">适用于个人用户</div>
<div class="border_input">
<input autocomplete="off" autocomplete="off" type="button" name="" id="organAuth02" value="立即认证"
onclick="handelPersonal()" />
</div>
</div> -->
</div>
</view>
</template>
<script>
import { checkLogin } from '@/core/app'
export default {
data() {
return {
@ -17,6 +61,11 @@
}
</script>
<style>
<style lang="scss" scoped>
.certinfo{
//
.ce-frist{
}
}
</style>

BIN
static/icons.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

3
utils/request/index.js

@ -109,8 +109,7 @@ $http.dataFactory = async res => {
})
}
console.log("sdfsaf")
console.log("rsp",res.response)
// console.log("rsp",res.response)
let httpData = res.response.data
if (typeof httpData == "string") {
try {

Loading…
Cancel
Save