Browse Source

完善信息

devlop
邓雄飞 4 years ago
parent
commit
b70f31ff5f
18 changed files with 826 additions and 63 deletions
  1. 12
      apis/clientCreditApi.js
  2. 9
      apis/enterpriseInfoApi.js
  3. 9
      enums/index.js
  4. 4
      manifest.json
  5. 12
      pages.json
  6. 26
      pages/add-user/index.vue
  7. 85
      pages/client-credit/index.vue
  8. 491
      pages/enterprise-info/index.vue
  9. 26
      pages/login/index.vue
  10. 205
      pages/mine/index.vue
  11. BIN
      static/imgs/client-credit/has-selected-icon.png
  12. BIN
      static/imgs/mine/certified-icon.png
  13. BIN
      static/imgs/mine/mine-top-bg.png
  14. BIN
      static/imgs/mine/non-certified-icon.png
  15. BIN
      static/imgs/mine/user-avatar.png
  16. BIN
      static/imgs/mine/vip-icon.png
  17. BIN
      static/logo.png
  18. 10
      store/index.js

12
apis/clientCreditApi.js

@ -7,3 +7,15 @@ export function getCompanyList(data) {
data
})
}
/**
* 获取客户授信方式
* @param {*} data {customerEnterpriseId: '客户id',mallSupplierId:'供应商id'}
* @returns
*/
export function getCustomerCreditInfo(data) {
return http.get({
url: '/yyt-uec/supplier/get/customer/credit-status',
data
})
}

9
apis/enterpriseInfoApi.js

@ -0,0 +1,9 @@
import http from '../utils/http/index.js'
// 完善企业信息
export function completeInfo(data) {
return http.post({
url: '/yyt-uec/save/my/enterprise',
data
})
}

9
enums/index.js

@ -30,6 +30,15 @@ export const verificationType = {
PHONE: 1,
EMAIL: 2
}
/**
* 法大大企业认证状态 1:未认证 2:认证中 3:已认证 4:认证失败
*/
export const fddEnterpriseStatus = {
UNCERTIFIED: 1,
CERTIFIED_ING: 2,
CERTIFIED_SUCCESS: 3,
CERTIFIED_FAIL: 4
}
/**
* 上传地址
*/

4
manifest.json

@ -54,7 +54,7 @@
"sdkConfigs" : {
"maps" : {
"amap" : {
"appkey_ios" : "5e4da36f4c1649ca28a1f8f795bcf5d2",
"appkey_ios" : "0182ee2a9fdd5fd3ef6a8bd5a2f98325",
"appkey_android" : "877848546f7f3717101a17c33e1d4df3"
}
},
@ -69,7 +69,7 @@
"geolocation" : {
"amap" : {
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "5e4da36f4c1649ca28a1f8f795bcf5d2",
"appkey_ios" : "0182ee2a9fdd5fd3ef6a8bd5a2f98325",
"appkey_android" : "877848546f7f3717101a17c33e1d4df3"
}
}

12
pages.json

@ -44,7 +44,9 @@
{
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "我的"
"navigationBarTitleText": "我的",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
@ -55,6 +57,14 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/enterprise-info/index",
"style": {
"navigationBarTitleText": "完善企业信息",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/agreement/index",
"style": {

26
pages/add-user/index.vue

@ -146,7 +146,7 @@
v-model="form.legalPersonMobile"
:inputBorder="false"
text="right"
placeholder="请输入法人/实控人"
placeholder="请输入法人/实控人手机"
></qn-easyinput>
</view>
</view>
@ -192,10 +192,14 @@
>
点击上传
</text>
<text v-if="form.businessLicenseImg" @click="!hasSelected && showImage()" :style="`font-size: 28rpx; color: ${hasSelected ? '#eee' : '#007aff'}`">
已上传(点击查看)
<text
v-if="form.businessLicenseImg"
@click="!hasSelected && selectedImage('businessLicenseImg')"
:style="`font-size: 28rpx;margin-right: 16rpx; color: ${hasSelected ? '#eee' : '#007aff'}`"
>
重新上传
</text>
<!-- <qn-easyinput v-model="form.businessLicenseImg" :inputBorder="false" text="right" placeholder="请输入企业名称"></qn-easyinput> -->
<text v-if="form.businessLicenseImg" @click="!hasSelected && showImage()" style="font-size: 28rpx; color: #007aff">预览</text>
</view>
</view>
<view class="qn-form-item qn-form-item">
@ -424,13 +428,13 @@ export default {
})
return
}
if (!/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/.test(this.form['legalPersonIdCardNo'])) {
uni.showToast({
title: '请输入正确法人身份证号',
icon: 'none'
})
return
}
// if (!/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/.test(this.form['legalPersonIdCardNo'])) {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// return
// }
}
if (this.form.contactMobile && !/^1[3456789]\d{9}$/.test(this.form['contactMobile'])) {
uni.showToast({

85
pages/client-credit/index.vue

@ -13,20 +13,25 @@
placeholder="请选择账号下的盘商"
popup-title="请选择盘商"
:map="{ text: 'name', value: 'id' }"
@change="onSupplierChange"
:clear-icon="false"
:localdata="supplierList"
></qn-data-picker>
</view>
</qn-form>
<view class="card_area">
<view class="card_area-item" :class="{ selected: form.creditType == 'month' }" @click="selectCreditType('month')">
<image class="selected-icon" v-if="form.creditType == 'month'" src="/static/imgs/client-credit/selected-icon.png"></image>
<view
class="card_area-item"
:class="{ selected: creditType == 'month', hasSelected: hasCreditList.includes('month') }"
@click="selectCreditType('month')"
>
<image class="selected-icon" v-if="creditType == 'month'" src="/static/imgs/client-credit/selected-icon.png"></image>
<image class="hasSelected-icon" v-if="hasCreditList.includes('month')" src="/static/imgs/client-credit/has-selected-icon.png"></image>
<image class="card_area-item-icon" src="/static/imgs/client-credit/month-credit-icon.png"></image>
<text class="card_area-item-text">月结授信</text>
</view>
<view class="card_area-item" :class="{ selected: form.creditType == 'fs' }" @click="selectCreditType('fs')">
<image class="selected-icon" v-if="form.creditType == 'fs'" src="/static/imgs/client-credit/selected-icon.png"></image>
<view class="card_area-item" :class="{ selected: creditType == 'fs' }" @click="selectCreditType('fs')">
<image class="selected-icon" v-if="creditType == 'fs'" src="/static/imgs/client-credit/selected-icon.png"></image>
<image class="hasSelected-icon" v-if="hasCreditList.includes('fs')" src="/static/imgs/client-credit/has-selected-icon.png"></image>
<image class="card_area-item-icon" src="/static/imgs/client-credit/fs-credit-icon.png"></image>
<text class="card_area-item-text">飞算授信</text>
</view>
@ -62,7 +67,7 @@
import { back, go2 } from '@/utils/hook.js'
import qnForm from '@/components/qn-form/qn-form.vue'
import qnDataPicker from '@/components/qn-data-picker/qn-data-picker.vue'
import { getCompanyList } from '@/apis/clientCreditApi.js'
import { getCompanyList, getCustomerCreditInfo } from '@/apis/clientCreditApi.js'
import { getBaseInfo } from '@/apis/commonApi.js'
const columns = [
{
@ -97,12 +102,14 @@ export default {
return {
columns: Object.freeze(columns),
form: {
enterpriseId: null,
name: null,
creditType: null,
supplierId: this.$store.state.supplierInfo.id
supplierId: this.$store.state.supplierInfo.supplierId
},
creditType: null,
searchList: [],
supplierList: []
supplierList: [],
hasCreditList: []
}
},
methods: {
@ -123,7 +130,7 @@ export default {
selectCompany(enterpriseId, enterpriseName) {
this.$refs.popup.close()
this.form.name = enterpriseName
this.form.id = enterpriseId
this.form.enterpriseId = enterpriseId
},
next() {
go2('client-signing', {
@ -131,18 +138,41 @@ export default {
})
},
selectCreditType(creditType) {
console.log(creditType)
this.form.creditType = creditType
if (this.hasCreditList.includes(creditType)) {
return
}
if (!this.form.supplierId) {
uni.showToast({
title: '请选择账号下的盘商',
icon: 'none'
})
return
}
if (!this.form.enterpriseId) {
uni.showToast({
icon: 'none',
title: '请先选择客户'
})
return
}
this.creditType = creditType
},
onSupplierChange(e) {
console.log('e', e)
getCreditList(data) {
getCustomerCreditInfo(data).then((res) => {
if (res) {
res.hasCredit && this.hasCreditList.push('month')
res.hasFeisuanCredit && this.hasCreditList.push('fs')
} else {
this.hasCreditList = []
}
})
}
},
created() {
getBaseInfo().then((res) => {
if (res) {
this.supplierList = res.supplierList.map((item) => ({
id: item.id,
this.supplierList = res.enterpriseList.map((item) => ({
id: item.supplier?.id, // 使id
name: item.name
}))
}
@ -150,7 +180,7 @@ export default {
},
computed: {
canSubmit() {
return this.form.id != null && this.form.creditType != null
return this.form.enterpriseId != null && this.form.supplierId != null && this.creditType != null
}
},
watch: {
@ -158,6 +188,17 @@ export default {
if (this.form.id) {
this.form.id = null
}
},
['form.enterpriseId']() {
console.log('form.enterpriseId', this.form)
if (this.form.enterpriseId && this.form.supplierId) {
this.getCreditList({ mallSupplierId: this.form.supplierId, customerEnterpriseId: this.form.enterpriseId })
}
},
['form.supplierId']() {
if (this.form.enterpriseId && this.form.supplierId) {
this.getCreditList({ mallSupplierId: this.form.supplierId, customerEnterpriseId: this.form.enterpriseId })
}
}
}
}
@ -246,6 +287,13 @@ export default {
top: 0;
right: 0;
}
.hasSelected-icon {
width: 159rpx;
height: 50rpx;
position: absolute;
top: 0;
right: 0;
}
.card_area-item-icon {
width: 48rpx;
height: 48rpx;
@ -263,5 +311,8 @@ export default {
.selected {
border: 3rpx solid #007aff;
}
.hasSelected {
border: 3rpx solid #86e2df;
}
}
</style>

491
pages/enterprise-info/index.vue

@ -0,0 +1,491 @@
<template>
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="完善信息">
<text v-if="operation === 'add'" style="color: #007aff" slot="right">跳过</text>
</uni-nav-bar>
<qn-form :columns="columns">
<view slot="name">
<qn-easyinput :maxlength="20" v-model="form.name" :inputBorder="false" text="right" placeholder="请输入企业名称"></qn-easyinput>
</view>
<view slot="shortName">
<qn-easyinput :maxlength="20" v-model="form.shortName" :inputBorder="false" text="right" placeholder="请输入企业简称"></qn-easyinput>
</view>
<view slot="locStreetName">
<qn-data-picker
text="right"
:border="false"
class="qn-picker"
placeholder="区域"
popup-title="请选择城市"
:map="{ text: 'name', value: 'id' }"
@change="onAreaChange"
:clear-icon="true"
:localdata="items"
>
<text v-if="form.locStreetName">
{{ `${form.locProvinceName || ''}/${form.locCityName || ''}/${form.locDistrictName || ''}/${form.locStreetName || ''}` }}
</text>
</qn-data-picker>
</view>
<view slot="locDetail">
<qn-easyinput
:maxlength="20"
:styles="{ disableColor: '#fff' }"
v-model="form.locDetail"
:inputBorder="false"
text="right"
placeholder="请输入详细地址"
></qn-easyinput>
</view>
<view slot="uniformSocialCreditCode">
<qn-easyinput
:maxlength="18"
:styles="{ disableColor: '#fff' }"
v-model="form.uniformSocialCreditCode"
:inputBorder="false"
text="right"
placeholder="请输入企业信用代码"
></qn-easyinput>
</view>
<view slot="legalPersonName">
<qn-easyinput
:maxlength="20"
:styles="{ disableColor: '#fff' }"
v-model="form.legalPersonName"
:inputBorder="false"
text="right"
placeholder="请输入法人/实控人"
></qn-easyinput>
</view>
<view slot="legalPersonMobile">
<qn-easyinput
:maxlength="11"
type="number"
:styles="{ disableColor: '#fff' }"
v-model="form.legalPersonMobile"
:inputBorder="false"
text="right"
placeholder="请输入法人/实控人手机"
></qn-easyinput>
</view>
<view slot="legalPersonIdCardNo">
<qn-easyinput
:maxlength="18"
:styles="{ disableColor: '#fff' }"
v-model="form.legalPersonIdCardNo"
:inputBorder="false"
text="right"
placeholder="请输入法人/实控人身份证号"
></qn-easyinput>
</view>
<view slot="legalPersonIdCardFrontImg">
<view class="upload-area">
<image class="idCard" @click="selectedImage('legalPersonIdCardFrontImg')" :src="frontIDCard" />
<image class="idCard" @click="selectedImage('legalPersonIdCardBackImg')" :src="backIDCard" />
</view>
</view>
<view slot="businessLicenseImg">
<text v-if="!form.businessLicenseImg" @click="selectedImage('businessLicenseImg')" style="font-size: 28rpx; color: #007aff">点击上传</text>
<text v-if="form.businessLicenseImg" @click="selectedImage('businessLicenseImg')" style="font-size: 28rpx; color: #007aff; margin-right: 16rpx">
重新上传
</text>
<text v-if="form.businessLicenseImg" @click="showImage" style="font-size: 28rpx; color: #007aff">预览</text>
</view>
<view slot="bankAccountName">
<qn-easyinput
:maxlength="50"
:styles="{ disableColor: '#fff' }"
v-model="form.bankAccountName"
:inputBorder="false"
text="right"
placeholder="请输入账户名"
></qn-easyinput>
</view>
<view slot="bankAccount">
<qn-easyinput
:maxlength="50"
:styles="{ disableColor: '#fff' }"
v-model="form.bankAccount"
:inputBorder="false"
text="right"
placeholder="请输入银行账户"
></qn-easyinput>
</view>
<view slot="bankName">
<qn-easyinput
:maxlength="50"
:styles="{ disableColor: '#fff' }"
v-model="form.bankName"
:inputBorder="false"
text="right"
placeholder="请输入开户行"
></qn-easyinput>
</view>
<view slot="cardholderName">
<qn-easyinput
:maxlength="50"
:styles="{ disableColor: '#fff' }"
v-model="form.cardholderName"
:inputBorder="false"
text="right"
placeholder="请输入账户名"
></qn-easyinput>
</view>
<view slot="bankCardNumber">
<qn-easyinput
:maxlength="50"
:styles="{ disableColor: '#fff' }"
v-model="form.bankCardNumber"
:inputBorder="false"
text="right"
placeholder="请输入银行账户"
></qn-easyinput>
</view>
<view slot="openingBank">
<qn-easyinput
:maxlength="50"
:styles="{ disableColor: '#fff' }"
v-model="form.openingBank"
:inputBorder="false"
text="right"
placeholder="请输入开户行"
></qn-easyinput>
</view>
</qn-form>
<qn-footer fixed height="120rpx">
<view class="button-area">
<view class="button button__cancel" @click="cancel">
<text class="text">取消</text>
</view>
<view class="button button__submit" @click="saveInfo">
<text class="text" style="color: white">保存信息</text>
</view>
</view>
</qn-footer>
</view>
</template>
<script>
import qnForm from '@/components/qn-form/qn-form.vue'
import qnDataPicker from '@/components/qn-data-picker/qn-data-picker.vue'
import qnEasyinput from '@/components/qn-easyinput/qn-easyinput.vue'
import { back, go2, uploadImage } from '@/utils/hook.js'
import { getArea } from '@/apis/commonApi.js'
import { completeInfo } from '@/apis/enterpriseInfoApi.js'
const columns = [
{
key: 1,
type: 'title',
label: '基础信息'
},
{
key: 'name',
type: 'item',
label: '企业名称',
required: true
},
{
key: 'shortName',
type: 'item',
label: '企业简称'
},
{
key: 'locStreetName',
type: 'item',
label: '所在地区',
required: true
},
{
key: 'locDetail',
type: 'item',
label: '详细地址',
required: true
},
{
key: 2,
type: 'title',
label: '工商信息'
},
{
key: 'uniformSocialCreditCode',
type: 'item',
label: '信用代码',
required: true
},
{
key: 'legalPersonName',
type: 'item',
label: '法人/实控人',
required: true
},
{
key: 'legalPersonMobile',
type: 'item',
label: '法人/实控人手机',
required: true
},
{
key: 'legalPersonIdCardNo',
type: 'item',
label: '法人/实控人身份证号',
required: true
},
{
key: 'legalPersonIdCardFrontImg',
type: 'item',
label: '身份证照片',
required: true,
size: 'large'
},
{
key: 'businessLicenseImg',
type: 'item',
label: '营业执照',
required: true
},
{
key: 3,
type: 'title',
label: '结算账户(公账)'
},
{
key: 'bankAccountName',
type: 'item',
label: '账户名',
required: true
},
{
key: 'bankAccount',
type: 'item',
label: '对公账户',
required: true
},
{
key: 'bankName',
type: 'item',
label: '开户行',
required: true
},
{
key: 4,
type: 'title',
label: '结算账户(私账)'
},
{
key: 'cardholderName',
type: 'item',
label: '账户名',
required: true
},
{
key: 'bankCardNumber',
type: 'item',
label: '对公账户',
required: true
},
{
key: 'openingBank',
type: 'item',
label: '开户行',
required: true
}
]
export default {
components: {
qnForm,
qnDataPicker,
qnEasyinput
},
data() {
return {
operation: 'add',
columns: Object.freeze(columns),
form: {
name: '',
shortName: '',
locProvinceId: null,
locCityId: null,
locDistrictId: null,
locStreetId: null,
locProvinceName: null,
locCityName: null,
locDistrictName: null,
locStreetName: null,
locDetail: '',
uniformSocialCreditCode: '',
legalPersonName: '',
legalPersonMobile: '',
legalPersonIdCardNo: '',
legalPersonIdCardFrontImg: '',
legalPersonIdCardBackImg: '',
businessLicenseImg: '',
bankAccountName: '',
bankAccount: '',
bankName: '',
cardholderName: '',
bankCardNumber: ''
},
items: [],
canSubmit: false
}
},
methods: {
back,
onAreaChange(e) {
if (e.detail.value && e.detail.value.length > 0) {
const [province, city, district, street] = e.detail.value
this.form.locProvinceId = province.value
this.form.locProvinceName = province.text
this.form.locCityId = city.value
this.form.locCityName = city.text
this.form.locDistrictId = district.value
this.form.locDistrictName = district.text
this.form.locStreetId = street.value
this.form.locStreetName = street.text
} else {
this.form.locProvinceId = null
this.form.locProvinceName = null
this.form.locCityId = null
this.form.locCityName = null
this.form.locDistrictId = null
this.form.locDistrictName = null
this.form.locStreetId = null
this.form.locStreetName = null
}
},
showImage() {
uni.previewImage({
urls: [this.form.businessLicenseImg]
})
},
selectedImage(type) {
uploadImage()
.then((url) => {
if (url) {
this.form[type] = url
}
})
.catch((e) => {
uni.showToast({
title: '上传失败',
icon: 'fail'
})
})
},
cancel() {
//
if (this.operation === 'add') {
go2('client', true)
} else {
back()
}
},
saveInfo() {
//
for (let i = 0; i < columns.length; i++) {
const item = columns[i]
if (item.required && !this.form[item.key]) {
uni.showToast({
title: `${item.label}不能为空`,
icon: 'none'
})
return
}
}
//
if (!this.form.legalPersonIdCardBackImg) {
uni.showToast({
title: `身份证反面不能为空`,
icon: 'none'
})
}
completeInfo(this.form).then((res) => {
if (res) {
uni.showToast({
title: '保存成功',
icon: 'success'
})
go2('client', true)
}
})
}
},
onLoad(option) {
if (option) {
this.operation = option.operation
}
},
mounted() {
getArea().then((res) => {
if (res) {
this.items = res
}
})
},
computed: {
frontIDCard() {
let url = 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/frontIDCard.png'
if (!this.form.legalPersonIdCardFrontImg) {
return url
}
return this.form.legalPersonIdCardFrontImg
},
backIDCard() {
let url = 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/backDCard.png'
if (!this.form.legalPersonIdCardBackImg) {
return url
}
return this.form.legalPersonIdCardBackImg
}
}
}
</script>
<style lang="scss" scoped>
.upload-area {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top: 10rpx;
margin-bottom: 24rpx;
.idCard {
width: 324rpx;
height: 280rpx;
flex-grow: 0;
flex-shrink: 0;
}
}
.button-area {
width: 750rpx;
padding: 0 32rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.button {
flex-grow: 0;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.text {
font-size: 30rpx;
font-weight: 500;
text-align: center;
}
}
.button__cancel {
width: 270rpx;
height: 88rpx;
border: 2rpx solid #979797;
}
.button__submit {
width: 400rpx;
height: 88rpx;
background: #007aff;
}
}
</style>

26
pages/login/index.vue

@ -140,16 +140,15 @@ export default {
//
const nextPage = store.state.nextPage
if (nextPage.name) {
go2(nextPage.name, nextPage.data)
go2(nextPage.name, nextPage.data, true)
} else {
go2('mine')
//
this.setAccountInfo()
}
store.commit('removeNextPage')
}, 1000)
}
})
//
this.setAccountInfo()
}
})
}
@ -158,12 +157,19 @@ export default {
setAccountInfo() {
getBaseInfo({}, true).then((res) => {
if (res) {
let supplierInfo = res.enterpriseList[0]
store.commit('setSupplierInfo', { id: supplierInfo.id, name: supplierInfo.name, fddEnterpriseStatus: supplierInfo.fddEnterpriseStatus })
let userInfo = supplierInfo.employeeName
store.commit('setUserInfo', { name: userInfo.name })
} else {
//
if (!res.enterpriseList || res.enterpriseList.length === 0) {
go2('enterprise-info', { operation: 'add' }, true)
} else {
let supplierInfo = res.enterpriseList[0]
store.commit('setSupplierInfo', {
id: supplierInfo.id,
name: supplierInfo.name,
fddEnterpriseStatus: supplierInfo.fddEnterpriseStatus,
supplierId: supplierInfo.supplier.id
})
store.commit('setUserInfo', { name: supplierInfo.employeeName, userId: res.userId, mobile: res.mobile })
go2('client')
}
}
})
}

205
pages/mine/index.vue

@ -1,5 +1,46 @@
<template>
<view class="content">
<view class="top-area">
<view class="reset">
<image class="bg" src="/static/imgs/mine/mine-top-bg.png"></image>
<view class="operation-area">
<view class="user">
<image class="avatar" :src="userInfo.avatar || '/static/imgs/mine/user-avatar.png'"></image>
<view v-if="!hasLogin" @click="go2('login')">
<view>
<text style="font-size: 40rpx; color: #fff; font-weight: 600">点击登录</text>
</view>
<view style="margin-top: 10rpx">
<text style="font-size: 26rpx; color: #fff; font-weight: 400">登录解锁更全功能</text>
</view>
</view>
<view v-else>
<view class="user__name">
<text class="name">{{ userInfo.name }}</text>
<image v-if="userInfo.fddEnterpriseStatus === fddStatus.UNCERTIFIED" class="image" src="/static/imgs/mine/certified-icon.png"></image>
<image v-else class="image" src="/static/imgs/mine/non-certified-icon.png"></image>
</view>
<view style="margin-top: 10rpx">
<text style="font-size: 26rpx; color: #fff; font-weight: 400">{{ userInfo.supplierName }}</text>
</view>
</view>
</view>
<view class="operation"></view>
</view>
<view class="vip-area">
<view class="vip-content">
<view class="left">
<image class="icon" src="/static/imgs/mine/vip-icon.png"></image>
<text class="text">VIP会员</text>
</view>
<text class="center">立即开通会员 尊享特权</text>
<view class="right">
<text class="text">开通会员</text>
</view>
</view>
</view>
</view>
</view>
<view @click="logout">mine</view>
<view @click="go2('client-credit')">client-credit</view>
</view>
@ -7,40 +48,166 @@
<script>
import { exit, go2 } from '@/utils/hook.js'
import { fddEnterpriseStatus } from '@/enums/index.js'
export default {
data() {
return {
userInfo: {
avatar: this.$store.state.userInfo.avatar,
name: this.$store.state.userInfo.name,
supplierName: this.$store.state.supplierInfo.name,
fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus
},
fddStatus: Object.freeze(fddEnterpriseStatus)
}
},
methods: {
logout() {
exit()
},
go2
},
computed: {
hasLogin() {
return this.$store.state.qnToken != ''
}
}
}
</script>
<style>
<style lang="scss" scoped>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
.top-area {
width: 750rpx;
height: 380rpx;
overflow: hidden;
position: relative;
border-radius: 0 0 350px 350px;
transform: scaleX(2.5);
.reset {
width: 750rpx;
height: 380rpx;
transform: scaleX(0.4); //
position: relative;
overflow: hidden;
}
.bg {
width: 750rpx;
height: 380rpx;
z-index: 0;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.operation-area {
width: 750rpx;
margin: 96rpx 0 36rpx;
padding: 0 32rpx;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
.user {
z-index: 5;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.avatar {
width: 156rpx;
height: 156rpx;
border-radius: 50%;
flex-grow: 0;
flex-shrink: 0;
overflow: hidden;
background-color: #fff;
margin-right: 16rpx;
}
.user__name {
flex-grow: 1;
flex-shrink: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.name {
font-size: 40rpx;
color: #fff;
font-weight: 600;
margin-right: 16rpx;
}
.image {
width: 100rpx;
height: 32rpx;
flex-grow: 0;
flex-shrink: 0;
}
}
}
.operation {
}
}
.vip-area {
z-index: 5;
position: absolute;
bottom: 0;
left: 0;
width: 686rpx;
height: 90rpx;
margin: 0 32rpx;
background-image: linear-gradient(90deg, #333333 0%, #696c6b 99%);
border-radius: 10rpx;
.vip-content {
width: 686rpx;
padding: 18rpx 24rpx 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.icon {
width: 28rpx;
height: 28rpx;
flex-grow: 0;
flex-shrink: 0;
}
.text {
font-size: 26rpx;
color: #dbc189;
font-weight: 500;
}
}
.center {
font-size: 24rpx;
color: #e7e1be;
font-weight: 600;
}
.right {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: 128rpx;
height: 44rpx;
border-radius: 14rpx;
background-image: linear-gradient(90deg, #f4edce 1%, #f3d99e 98%);
.text {
font-size: 24rpx;
color: #443015;
}
}
}
}
}
</style>

BIN
static/imgs/client-credit/has-selected-icon.png

Before After
Width: 150  |  Height: 50  |  Size: 2.9 KiB

BIN
static/imgs/mine/certified-icon.png

Before After
Width: 100  |  Height: 32  |  Size: 4.9 KiB

BIN
static/imgs/mine/mine-top-bg.png

Before After
Width: 750  |  Height: 184  |  Size: 138 KiB

BIN
static/imgs/mine/non-certified-icon.png

Before After
Width: 100  |  Height: 32  |  Size: 4.5 KiB

BIN
static/imgs/mine/user-avatar.png

Before After
Width: 44  |  Height: 44  |  Size: 1.5 KiB

BIN
static/imgs/mine/vip-icon.png

Before After
Width: 28  |  Height: 26  |  Size: 1.3 KiB

BIN
static/logo.png

Before After
Width: 72  |  Height: 72  |  Size: 3.9 KiB Width: 72  |  Height: 72  |  Size: 6.6 KiB

10
store/index.js

@ -4,19 +4,23 @@ import { isObject, isArray } from '@/utils/is'
let qnToken = null,
/**
* @value name 职员名称
* @value avatar 头像
* @value name 当前供应商下职员名称
* @value userId 用户id
* @value mobile 手机号
*/
userInfo = null,
/**
* @value id 企业id
* @value supplierId 供应商id
* @value name 企业名称
* @value fddEnterpriseStatus 法大大认证状态 1未认证2认证进行中3认证成功4认证失败
*/
supplierInfo = null,
uecToken = null,
searchHistory = null
const supplierInfoParams = ['id', 'name', 'fddEnterpriseStatus']
const userInfoParams = ['name']
const supplierInfoParams = ['id', 'name', 'fddEnterpriseStatus', 'supplierId']
const userInfoParams = ['name', 'userId', 'mobile', 'avatar']
try {
uecToken = uni.getStorageSync('uecToken')
qnToken = uni.getStorageSync('qnToken')

Loading…
Cancel
Save