Compare commits

...

5 Commits
master ... fox

12 changed files with 154 additions and 40 deletions
Split View
  1. +6
    -6
      config.js
  2. +9
    -3
      manifest.json
  3. +8
    -0
      pages.json
  4. +1
    -1
      pages_order/auth/wxLogin.vue
  5. +28
    -0
      pages_order/report/export.vue
  6. +57
    -8
      pages_order/report/index.vue
  7. +12
    -14
      pages_order/report/pay.vue
  8. +9
    -3
      pages_order/report/reportTableView.vue
  9. +14
    -1
      pages_order/report/userInfo.vue
  10. BIN
      pages_order/static/auth/bg.png
  11. +1
    -0
      pages_order/test/answer.vue
  12. +9
    -4
      pages_order/test/testCard.vue

+ 6
- 6
config.js View File

@ -17,7 +17,7 @@ const config = {
baseUrl : 'http://augcl.natapp1.cc/assessment-admin/assessment',
},
prod : {
baseUrl : 'https://assessment.augcl.com/assessment-admin/assessment',
baseUrl : 'https://admin.kjetax.com/assessment-admin/assessment',
}
}
@ -26,17 +26,17 @@ const config = {
const defaultConfig = {
mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
aliOss: {
url: 'https://image.hhlm1688.com/',
url: 'https://image.kjetax.com/',
config: {
//桶的地址
region: 'oss-cn-guangzhou',
//id
accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
accessKeyId: 'LTAI5tSfSyNKzrvkyCn3Tmon',
//密钥
accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
accessKeySecret: '5Tax04eUSHBlYiDpCTBR5YsTwtPf2B',
//桶的名字
bucket: 'hanhaiimage',
endpoint: 'oss-cn-shenzhen.aliyuncs.com',
bucket: 'risk-assessment',
endpoint: 'oss-cn-guangzhou.aliyuncs.com',
}
},
}


+ 9
- 3
manifest.json View File

@ -1,6 +1,6 @@
{
"name" : "unapp模板",
"appid" : "__UNI__197A38F",
"appid" : "__UNI__40D2531",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
@ -89,7 +89,7 @@
}
},
"devServer" : {
"https" : false,
"https" : true,
"proxy" : {
"/ws/geocoder/v1/" : {
"target" : "https://apis.map.qq.com",
@ -100,6 +100,12 @@
"changeOrigin" : true
}
}
}
},
"optimization" : {
"treeShaking" : {
"enable" : true
}
},
"title" : "报告保存&分享"
}
}

+ 8
- 0
pages.json View File

@ -59,6 +59,14 @@
{
"path": "report/index"
},
{
"path": "report/export",
"style": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "报告保存&分享",
"navigationBarBackgroundColor": "#014FA2"
}
},
{
"path": "service/index"
},


+ 1
- 1
pages_order/auth/wxLogin.vue View File

@ -1,7 +1,7 @@
<template>
<view class="page_view">
<image class="bg" src="@/pages_order/static/auth/bg.png" mode="widthFix"></image>
<image class="bg" :src="configList.login_bg" mode="widthFix"></image>
<view class="content flex flex-column">


+ 28
- 0
pages_order/report/export.vue View File

@ -0,0 +1,28 @@
<template>
<view class="">
<web-view :src="h5Url" @message="message"></web-view>
</view>
</template>
<script>
export default {
data(){
return{
batchNo: '',
h5Url: '',
imageData: '',
}
},
onLoad({ batchNo }) {
this.batchNo = batchNo
this.h5Url = `https://adminh5.kjetax.com/#/?batchNo=${batchNo}&token=${uni.getStorageSync('token')}`
// this.h5Url = `https://192.168.10.100:8080/#/?batchNo=${batchNo}&token=${uni.getStorageSync('token')}`
console.log('url', this.h5Url)
},
}
</script>
<style>
</style>

+ 57
- 8
pages_order/report/index.vue View File

@ -13,34 +13,44 @@
<view class="section-content">
<view class="summary">
<view class="text">
经过本次问答信息收集的综合分析检测出风险点共<text class="highlight">{{ detail.levelAllNum }}</text>其中极高风险{{ detail.level3Num }}高风险{{ detail.level2Num }}中风险{{ detail.level1Num }}低风险{{ detail.level0Num }}
经过本次问答信息收集的综合分析检测出风险点共<text class="highlight">{{ detail.levelAllNum - detail.level3Num }}</text>其中高风险{{ detail.level2Num }}中风险{{ detail.level1Num }}低风险{{ detail.level0Num }}
</view>
<view class="flex charts">
<progressCircle label="极高风险" :value="detail.level3Num" color="#B81C1C"></progressCircle>
<progressCircle label="高风险" :value="detail.level2Num" color="#FF0000"></progressCircle>
<progressCircle label="中风险" :value="detail.level1Num" color="#FFA800"></progressCircle>
<progressCircle label="低风险" :value="detail.level0Num" color="#014FA2"></progressCircle>
<progressCircle label="合规" :value="detail.level3Num" color="#5AC725"></progressCircle>
</view>
</view>
<view class="table">
<reportTableView :list="tableList"></reportTableView>
<!-- 全部合规 -->
<template v-if="detail.level3Num === detail.levelAllNum">
<image class="img-succ" :src="configList.compliance_img" mode="widthFix"></image>
</template>
<template v-else>
<reportTableView :list="tableList"></reportTableView>
</template>
</view>
</view>
</view>
<view class="flex flex-column contact">
<view class="flex flex-column contact" v-if="configList.company_qrcode">
<view>扫下方二维码联系我们给你1V1解决方案</view>
<image class="qr" :src="configList.company_qrcode" :show-menu-by-longpress="true" mode="widthFix"></image>
</view>
<view>
<image class="img" :src="configList.company_info" mode="widthFix"></image>
<view class="logo">
<image class="img" v-if="configList.company_info" :src="configList.company_info" mode="widthFix"></image>
<view class="logo" v-if="configList.company_logo">
<image class="img" :src="configList.company_logo" mode="widthFix"></image>
</view>
</view>
</template>
<view class="bottom">
<button class="btn" @click="onDownload">保存&分享</button>
</view>
</view>
</template>
@ -55,12 +65,14 @@
},
data() {
return {
batchNo: null,
detail: null,
tableList: [],
}
},
onLoad(arg) {
const { batchNo } = arg
this.batchNo = batchNo
this.getData(batchNo)
},
methods: {
@ -73,7 +85,7 @@
level0Num, //
level1Num, //
level2Num, //
level3Num, //
level3Num, //
levelAllNum,
pageList,
} = result
@ -81,6 +93,10 @@
this.tableList = pageList.reduce((arr, item) => {
const { id, risk, reason, level, consequence } = item
if (level == '3') {
return arr
}
const obj = {
id,
reason,
@ -108,13 +124,18 @@
level0Num, //
level1Num, //
level2Num, //
level3Num, //
level3Num, //
levelAllNum,
}
} catch (err) {
}
},
onDownload() {
uni.navigateTo({
url: `/pages_order/report/export?batchNo=${this.batchNo}`
})
},
},
}
</script>
@ -176,6 +197,11 @@
.table {
margin-top: 49rpx;
}
.img-succ {
width: 100%;
height: auto;
}
.contact {
margin-top: 53rpx;
@ -203,4 +229,27 @@
padding: 42rpx 127rpx 46rpx 127rpx;
box-sizing: border-box;
}
.bottom {
position: sticky;
left: 0;
bottom: 0;
width: 100%;
padding: 35rpx 56rpx;
padding-bottom: calc(env(safe-area-inset-bottom) + 35rpx);
background: #FFFFFF;
box-sizing: border-box;
.btn {
width: 100%;
padding: 29rpx 0;
font-size: 30rpx;
line-height: 1.5;
color: #FFFFFF;
background: #014FA2;
border-radius: 50rpx;
}
}
</style>

+ 12
- 14
pages_order/report/pay.vue View File

@ -132,8 +132,10 @@
code,
} = this.form
let payAmount = this.payAmount
let discountAmount = 0
const params = {
batchNo: this.batchNo,
payAmount: this.payAmount,
}
if (payment == 1) { //
const infoRes = await this.$fetch('queryCodeById', { code }, false, null, true)
@ -144,26 +146,22 @@
return
}
discountAmount = infoResult.discountAmount
payAmount -= discountAmount
params.discountAmount = infoResult.discountAmount
params.payAmount -= params.discountAmount
params.code = code
}
const params = {
batchNo: this.batchNo,
payAmount,
discountAmount,
code,
}
const result = await this.$fetch('createOrder', params)
await uni.requestPaymentWxPay({ result })
if (params.payAmount > 0) {
await uni.requestPaymentWxPay({ result })
}
uni.showToast({
title: '支付成功',
icon: 'none'
})
setTimeout(() => {
uni.redirectTo({
url: `/pages_order/report/userInfo?batchNo=${this.batchNo}`


+ 9
- 3
pages_order/report/reportTableView.vue View File

@ -25,7 +25,7 @@
'0': '低风险',
'1': '中风险',
'2': '高风险',
'3': '极高风险',
'3': '合规',
}
export default {
@ -91,9 +91,15 @@
}
&:last-child {
.table-cell {
& > .table-cell {
border-bottom: none;
}
& > .table-row-cols {
.table-cell:nth-last-child(-n+3) {
border-bottom: none;
}
}
}
}
@ -140,7 +146,7 @@
color: #FF0000;
}
&-3 {
color: #B81C1C;
color: #5AC725;
}
}
</style>

+ 14
- 1
pages_order/report/userInfo.vue View File

@ -81,6 +81,8 @@
</template>
<script>
import util from '@/utils/utils.js'
export default {
data() {
return {
@ -91,6 +93,14 @@
company: '',
},
rules: {
'phone': {
type: 'string',
required: true,
message: '请输入正确的手机号',
validator: (rule, value, callback) => {
return util.verificationPhone(value)
},
},
'company': {
type: 'string',
required: true,
@ -105,13 +115,16 @@
disabled() {
const { name, phone, company } = this.form
return !company
return !phone || !company
}
},
onLoad(arg) {
const { batchNo } = arg
this.batchNo = batchNo
},
onReady() {
this.$refs.form.setRules(this.rules);
},
methods: {
async onCreateReport() {


BIN
pages_order/static/auth/bg.png View File

Before After
Width: 750  |  Height: 563  |  Size: 22 KiB

+ 1
- 0
pages_order/test/answer.vue View File

@ -384,6 +384,7 @@
.card {
min-height: 745rpx;
padding: 0;
background: transparent;
&-bg {
width: 100%;


+ 9
- 4
pages_order/test/testCard.vue View File

@ -54,10 +54,15 @@
})
},
onCreateReport() {
// todo: check
uni.navigateTo({
url: `/pages_order/report/pay?batchNo=${this.data.batchNo}`
})
if (this.data.isPay) {
uni.navigateTo({
url: `/pages_order/report/userInfo?batchNo=${this.batchNo}`
})
} else {
uni.navigateTo({
url: `/pages_order/report/pay?batchNo=${this.data.batchNo}`
})
}
},
},
}


Loading…
Cancel
Save