Browse Source

优化、征信管理、个推

devlop
邓雄飞 4 years ago
parent
commit
4d1d2046e8
18 changed files with 813 additions and 38 deletions
  1. 21
      App.vue
  2. 17
      apis/commonApi.js
  3. 34
      apis/creditManagementApi.js
  4. 39
      hybrid/html/share.html
  5. 19
      manifest.json
  6. 21
      pages.json
  7. 370
      pages/credit-company-order/index.vue
  8. 277
      pages/credit-management/index.vue
  9. 8
      pages/login/index.vue
  10. 5
      pages/mall/index.vue
  11. 30
      pages/mine/index.vue
  12. 3
      pages/switching-mall/index.vue
  13. BIN
      static/imgs/client-credit/credit-order-icon.png
  14. BIN
      static/imgs/general/down-arrow-icon.png
  15. BIN
      static/imgs/general/not-overdue-icon.png
  16. BIN
      static/imgs/general/overdue-icon.png
  17. 3
      store/index.js
  18. 4
      utils/hook.js

21
App.vue

@ -11,6 +11,27 @@ export default {
if (flag && token) {
go2('client')
}
setTimeout(() => {
plus.push.addEventListener(
'click',
function (msg) {
plus.ui.alert('click:' + JSON.stringify(msg))
plus.ui.alert(msg.payload)
// plus.ui.alert(JSON.stringify(msg));
},
false
)
// 线
plus.push.addEventListener(
'receive',
function (msg) {
// plus.ui.alert(2);
plus.ui.alert('receive:' + JSON.stringify(msg))
console.log('receive:' + JSON.stringify(msg))
},
false
)
}, 1000)
},
onShow: function () {},
onHide: function () {}

17
apis/commonApi.js

@ -1,5 +1,6 @@
import http from '../utils/http/index.js'
import store from '@/store/index'
import { XAPPID } from '@/enums/index.js'
let areaCache = null
/**
* 获取省市区街道
@ -28,7 +29,7 @@ let baseInfo = null
function syncStore(res) {
if (res.enterpriseList && res.enterpriseList.length > 0) {
let supplierInfo = res.enterpriseList[0]
let vipExpireTime = supplierInfo.supplier.vipExpireTime
let vipExpireTime = supplierInfo.supplier.vipExpireTime || null
let isVip = false
if (vipExpireTime) {
let now = new Date().getTime()
@ -41,7 +42,8 @@ function syncStore(res) {
name: supplierInfo.name,
fddEnterpriseStatus: supplierInfo.fddEnterpriseStatus,
supplierId: supplierInfo.supplier.id,
isVip
isVip,
vipExpireTime
})
let userInfo = {
name: supplierInfo.employeeName, // 没有企业就没有name,
@ -115,3 +117,14 @@ export function transformFileToImg(data) {
data: data
})
}
/**
* 推送客户绑定
*
*/
export function pushCustomerBind(cid, platformType = 'Android', appId = XAPPID) {
return http.post({
url: '/base-paper-trading/user/binding/geTui/cid',
data: { cid, appId, platformType }
})
}

34
apis/creditManagementApi.js

@ -1,9 +1,37 @@
import http from '../utils/http/index.js'
// 添加纸品
export function addPaper(data) {
/**
* 获取授信公司列表
* @param {object} data
* @returns
*/
export function getCreditCompanyList(data) {
return http.get({
url: '/base-paper-trading/get/customer-investigationcredit/list',
data
})
}
/**
* 获取公司授信订单列表
* @param {object} data
* @returns
*/
export function getCompanyCreditOrderList(data) {
return http.get({
url: '/base-paper-trading/get/customer-feisuan-order/list',
data
})
}
/**
* 上传征信
* @param {object} data
* @returns
*/
export function uploadCompanyCredit(data) {
return http.post({
url: '/base-paper-trading/create/product',
url: `/base-paper-trading/upload/bank-investigation-credit/for-customer?customerEnterpriseId=${data.customerEnterpriseId}&supplierId=${data.supplierId}`,
data
})
}

39
hybrid/html/share.html

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.qrcode {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<image class="qrcode">
</image>
</body>
<script>
document.addEventListener('plusready', function () {
console.log('window', window.location.search)
let params = {}
window.location.search.substr(1).split('&').forEach(item => {
const [key, value] = item.split('=')
params[key] = decodeURI(value)
})
console.log(JSON.stringify(params))
if (params.img) {
const img = document.querySelector('.qrcode')
img.src = params.img
}
});
</script>
</html>

19
manifest.json

@ -3,7 +3,7 @@
"appid" : "__UNI__8C1E198",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionCode" : 102,
"transformPx" : false,
"networkTimeout" : {
"request" : 6000
@ -27,7 +27,8 @@
"Maps" : {},
"Geolocation" : {},
"FaceID" : {},
"iBeacon" : {}
"iBeacon" : {},
"Push" : {}
},
/* */
"distribute" : {
@ -58,7 +59,16 @@
"abiFilters" : [ "armeabi-v7a", "x86" ]
},
/* ios */
"ios" : {},
"ios" : {
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,以便为你编辑信息",
"NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,以便为你保存信息",
"NSCameraUsageDescription" : "该应用需要使用你的摄像头,以便为你编辑信息",
"NSLocationWhenInUseUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置附近印包厂信息",
"NSLocationAlwaysUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置附近印包厂信息",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置附近印包厂信息"
}
},
/* SDK */
"sdkConfigs" : {
"maps" : {
@ -82,7 +92,8 @@
"appkey_android" : "877848546f7f3717101a17c33e1d4df3"
}
},
"share" : {}
"share" : {},
"push" : {}
},
"icons" : {
"android" : {

21
pages.json

@ -1,12 +1,12 @@
{
"pages": [
{
"path": "pages/client/index",
"style": {
"navigationBarTitleText": "客户",
"navigationStyle": "custom"
}
},
{
"path": "pages/client/index",
"style": {
"navigationBarTitleText": "客户",
"navigationStyle": "custom"
}
},
{
"path": "pages/start-page/index",
"style": {
@ -231,6 +231,13 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/credit-company-order/index",
"style": {
"navigationBarTitleText": "客户订单",
"navigationStyle": "custom"
}
},
{
"path": "pages/credit-order-list/index",
"style": {

370
pages/credit-company-order/index.vue

@ -0,0 +1,370 @@
<template>
<view class="content">
<uni-nav-bar left-icon="back" statusBar @clickLeft="back" fixed title="客户订单"></uni-nav-bar>
<view class="info-area flex-col">
<view class="top-group flex-row">
<image class="image_4" src="/static/imgs/client/client-default.png" />
<view class="right-group flex-col">
<view class="top-group_1 flex-row">
<text>{{ info.enterpriseName }}</text>
<image :src="info.isOverdue ? '/static/imgs/general/overdue-icon.png' : '/static/imgs/general/not-overdue-icon.png'" class="image_6" />
</view>
<view class="center-group flex-row-center-space">
<view class="flex-row">
<text>授信日期</text>
<text>{{ info.createTime | dateFormat }}</text>
</view>
<view class="right-group_1 flex-row">
<text>授信额度</text>
<text>{{ info.creditLine | transformAmount }}</text>
</view>
</view>
<view class="bottom-group flex-row-center-space">
<view class="left-group flex-row">
<text>交易额度</text>
<text>{{ info.usedCreditLine | transformAmount }}</text>
</view>
<view class="right-group_2 flex-row">
<text>剩余额度</text>
<text>{{ info.availableCreditLine | transformAmount }}</text>
</view>
</view>
</view>
</view>
<view v-for="(item, index) in orderList" :key="item.id">
<view class="group_14 flex-row">
<view class="left-group flex-row view_1">
<image src="/static/imgs/client-credit/credit-order-icon.png" class="image_6" />
<text class="text_13">{{ item.id | idFormat }}</text>
<text class="text_15">{{ item.shouldRepayDate | dateFormat }}</text>
</view>
<view class="flex-row group_15" @click="show(index)">
<text :style="{ color: statusMap[item.loanStatus].color }">{{ statusMap[item.loanStatus].text }}</text>
<image :style="{ transform: openList.includes(index) ? 'rotate(180deg)' : '' }" src="/static/imgs/general/down-arrow-icon.png" class="image_8" />
</view>
</view>
<view class="flex-col list-item" v-show="openList.includes(index)">
<view class="flex-col list_1">
<view class="list-item_1 flex-row" :key="i" v-for="(production, i) in item.orderInfo.itemList">
<image :src="production.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'" class="image_16" />
<view class="right-group flex-col">
<text class="text_27">{{ production.productName }}</text>
<text class="text_29">
{{ production.categoryName }}/{{ production.brandName }}/{{ production.gramWeight }}g/{{ production.width }}*{{ production.length }}/{{
production.pieceQuantity
}}
</text>
</view>
</view>
</view>
<view class="justify-between group_24">
<text class="text_33">下单时间{{ item.orderInfo.createTime | dateFormat }}</text>
<view class="flex-row">
<text class="text_34">¥ {{ item.orderInfo.totalPrice }}</text>
<text class="text_35" @click="go2('order-detail', { orderId: item.orderId })">查看详情</text>
<image
src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/611dd17441a9be0011f45822/620ccb0962a7d90011fe5c8f/16450868979750382253.png"
class="image_19"
/>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { go2, back } from '@/utils/hook.js'
import { getCompanyCreditOrderList } from '@/apis/creditManagementApi.js'
const statusMap = {
1: {
text: '待还款',
color: '#FA8C16'
},
2: {
text: '逾期未还款',
color: '#F5222D'
},
3: {
text: '已还款',
color: '#888888'
}
}
export default {
data() {
return {
info: {},
orderList: [],
statusMap: Object.freeze(statusMap),
openList: []
}
},
methods: {
go2,
back,
getList() {
getCompanyCreditOrderList({ customerEnterpriseId: this.info.enterpriseId }).then((res) => {
if (res) {
this.orderList = res.records
}
})
},
show(index) {
if (this.openList.includes(index)) {
this.openList.splice(this.openList.indexOf(index), 1)
} else {
this.openList.push(index)
}
}
},
filters: {
transformAmount(value) {
if (value == null) {
return '0'
}
let cnt = value / 10000
cnt = Math.round(+cnt + 'e' + 2) / 100
cnt = cnt + ''
let arr = cnt.split('.')
arr[1] ? (arr[1] = arr[1] + '00'.substr(0, 2 - arr[1].length)) : (arr[1] = '00')
return arr.join('.') + '万'
},
dateFormat(value) {
if (!value) {
return ''
}
return value.split(' ')[0]
},
idFormat(value) {
if (!value) {
return ''
}
return value.substr(0, 12)
}
},
onLoad(option) {
this.info = JSON.parse(option.info)
this.getList()
}
}
</script>
<style lang="scss" scoped>
.content {
width: 750rpx;
.info-area {
background-color: rgb(255, 255, 255);
.top-group {
padding: 20rpx 32rpx 28rpx 32rpx;
border-bottom: solid 2rpx rgb(221, 221, 221);
.image_4 {
width: 100rpx;
height: 100rpx;
}
.right-group {
margin-left: 20rpx;
padding-bottom: 10rpx;
flex: 1 1 auto;
.top-group_1 {
color: rgb(51, 51, 51);
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
text {
word-break: break-all;
max-width: 440rpx;
}
.image_6 {
margin-left: 20rpx;
margin-top: 6rpx;
width: 100rpx;
height: 32rpx;
}
}
.center-group {
margin-top: 24rpx;
color: rgb(51, 51, 51);
font-size: 26rpx;
line-height: 37rpx;
white-space: nowrap;
.right-group_1 {
margin-left: 39rpx;
}
}
.bottom-group {
margin-top: 12rpx;
color: rgb(51, 51, 51);
font-size: 26rpx;
line-height: 37rpx;
white-space: nowrap;
.right-group_2 {
margin-left: 39rpx;
}
}
}
}
.group_14 {
padding: 23rpx 32rpx;
border-bottom: solid 2rpx rgb(221, 221, 221);
.left-group {
color: rgb(51, 51, 51);
font-size: 28rpx;
line-height: 40rpx;
white-space: nowrap;
.image_6 {
width: 40rpx;
height: 40rpx;
}
.text_13 {
margin-left: 16rpx;
}
.text_15 {
margin-left: 40rpx;
}
}
.view_1 {
flex: 1 1 auto;
}
.group_15 {
margin-left: 40rpx;
color: rgb(245, 34, 45);
font-size: 28rpx;
font-weight: 500;
line-height: 40rpx;
white-space: nowrap;
.image_8 {
margin-left: 16rpx;
align-self: center;
width: 24rpx;
height: 13rpx;
}
}
}
}
}
.list-item {
background-color: rgb(255, 255, 255);
box-shadow: 0px 2rpx 14rpx 0px rgba(220, 220, 220, 0.5);
.list_1 {
padding: 0 32rpx;
.list-item_1 {
padding: 24rpx 0 21rpx;
.image_16 {
width: 100rpx;
height: 100rpx;
}
.right-group {
margin-left: 20rpx;
margin-right: 40rpx;
flex: 1 1 auto;
.text_27 {
color: rgb(51, 51, 51);
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
white-space: nowrap;
}
.text_29 {
margin-top: 24rpx;
color: rgb(136, 136, 136);
font-size: 26rpx;
line-height: 37rpx;
white-space: nowrap;
}
}
}
}
.group_24 {
padding: 23rpx 32rpx 15rpx;
border-top: solid 2rpx rgb(221, 221, 221);
.text_33 {
margin: 3rpx 0;
color: rgb(136, 136, 136);
font-size: 26rpx;
line-height: 37rpx;
white-space: nowrap;
}
.text_34 {
color: rgb(255, 83, 104);
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
white-space: nowrap;
}
.text_35 {
margin-left: 9rpx;
color: rgb(0, 122, 255);
font-size: 28rpx;
line-height: 40rpx;
white-space: nowrap;
}
.image_19 {
margin: 9rpx 0 9rpx 8rpx;
width: 24rpx;
height: 24rpx;
}
}
}
view,
image,
text {
box-sizing: border-box;
flex-shrink: 0;
}
.flex-row {
display: flex;
flex-direction: row;
}
.flex-col {
display: flex;
flex-direction: column;
}
.justify-start {
display: flex;
justify-content: flex-start;
}
.justify-center {
display: flex;
justify-content: center;
}
.justify-end {
display: flex;
justify-content: flex-end;
}
.justify-evenly {
display: flex;
justify-content: space-evenly;
}
.justify-around {
display: flex;
justify-content: space-around;
}
.justify-between {
display: flex;
justify-content: space-between;
}
.items-start {
display: flex;
align-items: flex-start;
}
.items-center {
display: flex;
align-items: center;
}
.items-end {
display: flex;
align-items: flex-end;
}
</style>

277
pages/credit-management/index.vue

@ -1,18 +1,153 @@
<template>
<view class="content">
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="征信管理"></uni-nav-bar>
<uni-nav-bar left-icon="back" statusBar @clickLeft="back" fixed title="征信管理"></uni-nav-bar>
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback">
<view class="list-item flex-col" :key="i" v-for="(item, i) in list">
<view class="top-group flex-row">
<image class="image_4" src="/static/imgs/client/client-default.png" />
<view class="right-group flex-col">
<view class="top-group_1 flex-row">
<text>{{ item.enterpriseName }}</text>
<image :src="item.isOverdue ? '/static/imgs/general/overdue-icon.png' : '/static/imgs/general/not-overdue-icon.png'" class="image_6" />
</view>
<view class="center-group flex-row-center-space">
<view class="flex-row">
<text>授信日期</text>
<text>{{ item.createTime | dateFormat }}</text>
</view>
<view class="right-group_1 flex-row">
<text>授信额度</text>
<text>{{ item.creditLine | transformAmount }}</text>
</view>
</view>
<view class="bottom-group flex-row-center-space">
<view class="left-group flex-row">
<text>交易额度</text>
<text>{{ item.usedCreditLine | transformAmount }}</text>
</view>
<view class="right-group_2 flex-row">
<text>剩余额度</text>
<text>{{ item.availableCreditLine | transformAmount }}</text>
</view>
</view>
</view>
</view>
<view class="bottom-text-wrapper flex-row-center-space">
<text class="text_15" @click="go2('credit-company-order', { info: JSON.stringify(item) })">查看订单</text>
<view class="flex-col items-center text-wrapper" v-show="item.isOverdue && item.uploadStatus == 0" @click="uploadCredit(item)">
<text>上传银行征信</text>
</view>
<text class="text_15" v-show="item.uploadStatus == 1">已上传</text>
<text class="text_15" v-show="item.uploadStatus == 2">已审核通过</text>
</view>
</view>
</scroll-list>
</view>
</template>
<script>
import { go2, back } from '@/utils/hook.js'
import { getCreditCompanyList, uploadCompanyCredit } from '@/apis/creditManagementApi.js'
export default {
data() {
return {}
return {
pagination: {
pageNum: 0, //
pageSize: 10
},
condition: {
supplierId: this.$store.state.supplierInfo.supplierId
},
list: [],
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA'
}
}
},
methods: {
go2,
back
back,
getList() {
return new Promise((resolve, reject) => {
getCreditCompanyList({ ...this.condition, ...this.pagination })
.then((res) => {
if (res) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)
}
resolve({ list: this.list, total: res.total })
} else {
reject()
}
})
.catch((err) => {
reject(err)
})
})
},
downCallback() {
this.pagination.pageNum = 1
this.getList()
.then(({ list, total }) => {
this.$refs.list.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.list.refreshFail()
})
},
upCallback(page) {
this.pagination.pageNum++
this.getList()
.then(({ list, total }) => {
this.$refs.list.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.list.loadFail()
})
},
uploadCredit(item) {
uni.showModal({
title: '提示',
content: '确定上传银行征信吗?',
success: (res) => {
if (res.confirm) {
uploadCompanyCredit({ customerEnterpriseId: item.enterpriseId, supplierId: this.condition.supplierId }).then((res) => {
if (res) {
this.$refs.list.refresh()
uni.showToast({
title: '申请已提交,请耐心等待',
icon: 'none'
})
}
})
}
}
})
}
},
filters: {
transformAmount(value) {
if (value == null) {
return '0'
}
let cnt = value / 10000
cnt = Math.round(+cnt + 'e' + 2) / 100
cnt = cnt + ''
let arr = cnt.split('.')
arr[1] ? (arr[1] = arr[1] + '00'.substr(0, 2 - arr[1].length)) : (arr[1] = '00')
return arr.join('.') + '万'
},
dateFormat(value) {
if (!value) {
return ''
}
return value.split(' ')[0]
}
}
}
</script>
@ -20,5 +155,141 @@ export default {
<style lang="scss" scoped>
.content {
width: 750rpx;
.list-item {
background-color: rgb(255, 255, 255);
&:last-of-type {
margin-top: 20rpx;
}
.top-group {
padding: 20rpx 32rpx 28rpx 32rpx;
border-bottom: solid 2rpx rgb(221, 221, 221);
.image_4 {
width: 100rpx;
height: 100rpx;
}
.right-group {
margin-left: 20rpx;
padding-bottom: 10rpx;
flex: 1 1 auto;
.top-group_1 {
color: rgb(51, 51, 51);
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
text {
word-break: break-all;
max-width: 440rpx;
}
.image_6 {
margin-left: 20rpx;
margin-top: 6rpx;
width: 100rpx;
height: 32rpx;
}
}
.center-group {
margin-top: 24rpx;
color: rgb(51, 51, 51);
font-size: 26rpx;
line-height: 37rpx;
white-space: nowrap;
.right-group_1 {
margin-left: 39rpx;
}
}
.bottom-group {
margin-top: 12rpx;
color: rgb(51, 51, 51);
font-size: 26rpx;
line-height: 37rpx;
white-space: nowrap;
.right-group_2 {
margin-left: 39rpx;
}
}
}
}
.bottom-text-wrapper {
padding: 18rpx 32rpx 20rpx;
.text_15 {
color: rgb(0, 122, 255);
font-size: 28rpx;
line-height: 40rpx;
white-space: nowrap;
}
.text-wrapper {
padding: 7rpx 0;
color: rgb(255, 255, 255);
font-size: 28rpx;
font-weight: 500;
line-height: 40rpx;
white-space: nowrap;
background-color: rgb(0, 122, 255);
border-radius: 27rpx;
width: 216rpx;
}
}
}
}
view,
image,
text {
box-sizing: border-box;
flex-shrink: 0;
}
.flex-row {
display: flex;
flex-direction: row;
}
.flex-col {
display: flex;
flex-direction: column;
}
.justify-start {
display: flex;
justify-content: flex-start;
}
.justify-center {
display: flex;
justify-content: center;
}
.justify-end {
display: flex;
justify-content: flex-end;
}
.justify-evenly {
display: flex;
justify-content: space-evenly;
}
.justify-around {
display: flex;
justify-content: space-around;
}
.justify-between {
display: flex;
justify-content: space-between;
}
.items-start {
display: flex;
align-items: flex-start;
}
.items-center {
display: flex;
align-items: center;
}
.items-end {
display: flex;
align-items: flex-end;
}
</style>

8
pages/login/index.vue

@ -44,7 +44,7 @@
<script>
import { getAuthCaptcha, loginByPhone, getQnToken } from '@/apis/loginApi'
import { getBaseInfo } from '@/apis/commonApi'
import { getBaseInfo, pushCustomerBind } from '@/apis/commonApi'
import { accountType, verificationType, codePurpose } from '@/enums/index.js'
import store from '@/store/index.js'
import { go2, back } from '@/utils/hook.js'
@ -157,6 +157,12 @@ export default {
setAccountInfo(page = { url: 'client', data: {}, isRedirect: true }) {
getBaseInfo({}, true).then((res) => {
if (res) {
//
// #ifdef APP-PLUS
let cid = plus.push.getClientInfo().clientid
let platform = uni.getSystemInfoSync().platform
pushCustomerBind(cid, platform)
// #endif
if (!res.enterpriseList || res.enterpriseList.length === 0) {
go2('enterprise-info', { operation: 'add' }, true)
} else {

5
pages/mall/index.vue

@ -73,7 +73,7 @@
</view>
<view class="" v-if="!hasLogin"><not-logged @loginChange="loginChange()"></not-logged></view>
</view>
<view class="share-area" v-if="visible" @click="closeShare">
<!-- <view class="share-area" v-if="visible" @click="closeShare">
<view class="share-content">
<image class="bg" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-bg.png"></image>
<view class="flex-col-center-start code">
@ -87,6 +87,9 @@
<text style="font-size: 32rpx; color: #888888; margin-top: 14rpx">每天上新特价纸库存有限先到先得</text>
</view>
</view>
</view> -->
<view v-if="visible" @click="closeShare">
<!-- <web-view :webview-styles="webviewStyles" src="/hybrid/html/share.html"></web-view> -->
</view>
</view>
</template>

30
pages/mine/index.vue

@ -52,7 +52,7 @@
<image class="icon" src="/static/imgs/mine/vip-icon.png"></image>
<text class="text">VIP会员</text>
</view>
<text class="center">立即开通会员 尊享特权</text>
<text class="center">{{ isVip ? `到期时间:${vipExpireTime}` : '立即开通会员 尊享特权' }}</text>
<view class="right" @click="makeVip">
<text class="text">{{ isVip ? '续费会员' : '开通会员' }}</text>
</view>
@ -117,10 +117,10 @@
<image class="icon" src="/static/imgs/mine/contract-icon.png"></image>
<text class="label">合同管理</text>
</view>
<!-- <view class="icon-item" @click="loginGo2('credit-management')">
<view class="icon-item" @click="loginGo2('credit-management')">
<image class="icon" src="/static/imgs/mine/credit-icon.png"></image>
<text class="label">征信管理</text>
</view> -->
</view>
<view class="icon-item" @click="loginGo2('client-credit-list')">
<image class="icon" src="/static/imgs/mine/credit-icon.png"></image>
<text class="label">授信记录</text>
@ -212,9 +212,9 @@ export default {
},
methods: {
test() {
loginGo2('client')
},
test() {
loginGo2('client')
},
//
certifyCompany() {
if (!this.hasCompany) {
@ -224,7 +224,11 @@ export default {
})
return
}
if (this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.UNCERTIFIED || this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.CERTIFIED_FAIL) {
if (
this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.UNCERTIFIED ||
this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.CERTIFIED_FAIL ||
this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.CERTIFIED_ING
) {
getVerifyUrl({ enterpriseId: this.$store.state.supplierInfo.id }).then((res) => {
if (res) {
// #ifdef APP-PLUS
@ -236,12 +240,6 @@ export default {
}
})
}
if (this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.UNCERTIFIED) {
// uni.showToast({
// title: '~',
// icon: 'none'
// })
}
},
go2,
loginGo2,
@ -330,6 +328,12 @@ export default {
}
},
computed: {
vipExpireTime() {
if (this.$store.state.supplierInfo.vipExpireTime) {
return this.$store.state.supplierInfo.vipExpireTime.substr(0, 10)
}
return ''
},
hasLogin() {
return this.$store.state.qnToken != ''
},

3
pages/switching-mall/index.vue

@ -61,7 +61,8 @@ export default {
name: item.name,
fddEnterpriseStatus: item.fddEnterpriseStatus,
supplierId: item.supplierId,
isVip
isVip,
vipExpireTime: item.vipExpireDate || null
})
go2('mall')
}

BIN
static/imgs/client-credit/credit-order-icon.png

Before After
Width: 80  |  Height: 80  |  Size: 6.5 KiB

BIN
static/imgs/general/down-arrow-icon.png

Before After
Width: 48  |  Height: 26  |  Size: 1.2 KiB

BIN
static/imgs/general/not-overdue-icon.png

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

BIN
static/imgs/general/overdue-icon.png

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

3
store/index.js

@ -16,11 +16,12 @@ let qnToken = null,
* @value name 企业名称
* @value fddEnterpriseStatus 法大大认证状态 1未认证2认证进行中3认证成功4认证失败
* @value isVip 是否是vip企业
* @value vipExpireTime vip到期时间,可能为undefined
*/
supplierInfo = null,
uecToken = null,
searchHistory = null
const supplierInfoParams = ['id', 'name', 'fddEnterpriseStatus', 'supplierId', 'isVip']
const supplierInfoParams = ['id', 'name', 'fddEnterpriseStatus', 'supplierId', 'isVip', 'vipExpireTime']
const userInfoParams = ['name', 'userId', 'mobile', 'avatar']
try {
uecToken = uni.getStorageSync('uecToken')

4
utils/hook.js

@ -75,7 +75,7 @@ export function go2(url, data = {}, isRedirect = false) {
*/
export function loginGo2(url, data = {}, isRedirect) {
const token = store.state.qnToken
console.log('token',token)
console.log('token', token)
if (token) {
go2(url, data, isRedirect)
} else {
@ -161,7 +161,7 @@ export function uploadFile(path, type = 'image') {
}
/**
* 屏幕截图并保存到相册(不包含状态栏和tabBar)
* 屏幕截图并保存到相册(不包含状态栏和tabBar),原理就是用webview的draw方法
*/
export function screenShot() {
var pages = getCurrentPages()

Loading…
Cancel
Save