Compare commits

...

6 Commits
master ... fox

14 changed files with 161 additions and 47 deletions
Unified View
  1. +6
    -6
      config.js
  2. +9
    -3
      manifest.json
  3. +8
    -0
      pages.json
  4. +1
    -1
      pages/index/index.vue
  5. +1
    -1
      pages_order/auth/wxLogin.vue
  6. +28
    -0
      pages_order/report/export.vue
  7. +57
    -8
      pages_order/report/index.vue
  8. +13
    -15
      pages_order/report/pay.vue
  9. +9
    -3
      pages_order/report/reportTableView.vue
  10. +14
    -1
      pages_order/report/userInfo.vue
  11. BIN
      pages_order/static/auth/bg.png
  12. +2
    -1
      pages_order/test/answer.vue
  13. +4
    -4
      pages_order/test/start.vue
  14. +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', baseUrl : 'http://augcl.natapp1.cc/assessment-admin/assessment',
}, },
prod : { 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 = { const defaultConfig = {
mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU', mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
aliOss: { aliOss: {
url: 'https://image.hhlm1688.com/',
url: 'https://image.kjetax.com/',
config: { config: {
//桶的地址 //桶的地址
region: 'oss-cn-guangzhou', region: 'oss-cn-guangzhou',
//id //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模板", "name" : "unapp模板",
"appid" : "__UNI__197A38F",
"appid" : "__UNI__40D2531",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
@ -89,7 +89,7 @@
} }
}, },
"devServer" : { "devServer" : {
"https" : false,
"https" : true,
"proxy" : { "proxy" : {
"/ws/geocoder/v1/" : { "/ws/geocoder/v1/" : {
"target" : "https://apis.map.qq.com", "target" : "https://apis.map.qq.com",
@ -100,6 +100,12 @@
"changeOrigin" : true "changeOrigin" : true
} }
} }
}
},
"optimization" : {
"treeShaking" : {
"enable" : true
}
},
"title" : "报告保存&分享"
} }
} }

+ 8
- 0
pages.json View File

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


+ 1
- 1
pages/index/index.vue View File

@ -17,7 +17,7 @@
</view> </view>
<view class="flex flex-column card"> <view class="flex flex-column card">
<view class="title">公司风险检测</view>
<view class="title">{{ configList.page_index_title }}</view>
<image class="icon" src="@/static/image/icon-index.png" mode="widthFix"></image> <image class="icon" src="@/static/image/icon-index.png" mode="widthFix"></image>
<button class="btn" @click="onStartTest">开始测评</button> <button class="btn" @click="onStartTest">开始测评</button>
</view> </view>


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

@ -1,7 +1,7 @@
<template> <template>
<view class="page_view"> <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"> <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="section-content">
<view class="summary"> <view class="summary">
<view class="text"> <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>
<view class="flex charts"> <view class="flex charts">
<progressCircle label="极高风险" :value="detail.level3Num" color="#B81C1C"></progressCircle>
<progressCircle label="高风险" :value="detail.level2Num" color="#FF0000"></progressCircle> <progressCircle label="高风险" :value="detail.level2Num" color="#FF0000"></progressCircle>
<progressCircle label="中风险" :value="detail.level1Num" color="#FFA800"></progressCircle> <progressCircle label="中风险" :value="detail.level1Num" color="#FFA800"></progressCircle>
<progressCircle label="低风险" :value="detail.level0Num" color="#014FA2"></progressCircle> <progressCircle label="低风险" :value="detail.level0Num" color="#014FA2"></progressCircle>
<progressCircle label="合规" :value="detail.level3Num" color="#5AC725"></progressCircle>
</view> </view>
</view> </view>
<view class="table"> <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>
</view> </view>
<view class="flex flex-column contact">
<view class="flex flex-column contact" v-if="configList.company_qrcode">
<view>扫下方二维码联系我们给你1V1解决方案</view> <view>扫下方二维码联系我们给你1V1解决方案</view>
<image class="qr" :src="configList.company_qrcode" :show-menu-by-longpress="true" mode="widthFix"></image> <image class="qr" :src="configList.company_qrcode" :show-menu-by-longpress="true" mode="widthFix"></image>
</view> </view>
<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> <image class="img" :src="configList.company_logo" mode="widthFix"></image>
</view> </view>
</view> </view>
</template> </template>
<view class="bottom">
<button class="btn" @click="onDownload">保存&分享</button>
</view>
</view> </view>
</template> </template>
@ -55,12 +65,14 @@
}, },
data() { data() {
return { return {
batchNo: null,
detail: null, detail: null,
tableList: [], tableList: [],
} }
}, },
onLoad(arg) { onLoad(arg) {
const { batchNo } = arg const { batchNo } = arg
this.batchNo = batchNo
this.getData(batchNo) this.getData(batchNo)
}, },
methods: { methods: {
@ -73,7 +85,7 @@
level0Num, // level0Num, //
level1Num, // level1Num, //
level2Num, // level2Num, //
level3Num, //
level3Num, //
levelAllNum, levelAllNum,
pageList, pageList,
} = result } = result
@ -81,6 +93,10 @@
this.tableList = pageList.reduce((arr, item) => { this.tableList = pageList.reduce((arr, item) => {
const { id, risk, reason, level, consequence } = item const { id, risk, reason, level, consequence } = item
if (level == '3') {
return arr
}
const obj = { const obj = {
id, id,
reason, reason,
@ -108,13 +124,18 @@
level0Num, // level0Num, //
level1Num, // level1Num, //
level2Num, // level2Num, //
level3Num, //
level3Num, //
levelAllNum, levelAllNum,
} }
} catch (err) { } catch (err) {
} }
}, },
onDownload() {
uni.navigateTo({
url: `/pages_order/report/export?batchNo=${this.batchNo}`
})
},
}, },
} }
</script> </script>
@ -176,6 +197,11 @@
.table { .table {
margin-top: 49rpx; margin-top: 49rpx;
} }
.img-succ {
width: 100%;
height: auto;
}
.contact { .contact {
margin-top: 53rpx; margin-top: 53rpx;
@ -203,4 +229,27 @@
padding: 42rpx 127rpx 46rpx 127rpx; padding: 42rpx 127rpx 46rpx 127rpx;
box-sizing: border-box; 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> </style>

+ 13
- 15
pages_order/report/pay.vue View File

@ -3,7 +3,7 @@
<navbar title="支付" leftClick @leftClick="$utils.navigateBack" /> <navbar title="支付" leftClick @leftClick="$utils.navigateBack" />
<view class="flex flex-column info"> <view class="flex flex-column info">
<view>实付金额</view>
<view>{{ configList.page_pay_amount_label }}</view>
<view class="flex price"> <view class="flex price">
<view>¥</view> <view>¥</view>
<view class="highlight">{{ payAmount }}</view> <view class="highlight">{{ payAmount }}</view>
@ -132,8 +132,10 @@
code, code,
} = this.form } = this.form
let payAmount = this.payAmount
let discountAmount = 0
const params = {
batchNo: this.batchNo,
payAmount: this.payAmount,
}
if (payment == 1) { // if (payment == 1) { //
const infoRes = await this.$fetch('queryCodeById', { code }, false, null, true) const infoRes = await this.$fetch('queryCodeById', { code }, false, null, true)
@ -144,26 +146,22 @@
return 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) const result = await this.$fetch('createOrder', params)
await uni.requestPaymentWxPay({ result })
if (params.payAmount > 0) {
await uni.requestPaymentWxPay({ result })
}
uni.showToast({ uni.showToast({
title: '支付成功', title: '支付成功',
icon: 'none' icon: 'none'
}) })
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url: `/pages_order/report/userInfo?batchNo=${this.batchNo}` url: `/pages_order/report/userInfo?batchNo=${this.batchNo}`


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

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

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

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


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

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

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

@ -1,6 +1,6 @@
<template> <template>
<view class="page__view"> <view class="page__view">
<navbar title="答题测评" leftClick @leftClick="$utils.navigateBack" bgColor="transparent" />
<navbar :title="configList.page_answer_title" leftClick @leftClick="$utils.navigateBack" bgColor="transparent" />
<!-- 答题完成 --> <!-- 答题完成 -->
<template v-if="total && current === total"> <template v-if="total && current === total">
@ -384,6 +384,7 @@
.card { .card {
min-height: 745rpx; min-height: 745rpx;
padding: 0; padding: 0;
background: transparent;
&-bg { &-bg {
width: 100%; width: 100%;


+ 4
- 4
pages_order/test/start.vue View File

@ -1,12 +1,11 @@
<template> <template>
<view class="page__view"> <view class="page__view">
<navbar title="答题测评" leftClick @leftClick="$utils.navigateBack" bgColor="transparent" />
<navbar :title="configList.page_answer_title" leftClick @leftClick="$utils.navigateBack" bgColor="transparent" />
<view class="main"> <view class="main">
<view class="card"> <view class="card">
<view class="flex flex-column card-header"> <view class="flex flex-column card-header">
<view>您好 !</view>
<view>请选择您要答题的题库可多选</view>
<text>{{ configList.page_answer_choose_title.replace(/\\n/g,'\n') }}</text>
</view> </view>
<view class="card-content list"> <view class="card-content list">
<uv-checkbox-group <uv-checkbox-group
@ -59,7 +58,7 @@
onStart() { onStart() {
if (!this.selectedArr.length) { if (!this.selectedArr.length) {
uni.showToast({ uni.showToast({
title: '请选择您要答题的题库(可多选)',
title: this.configList.page_answer_choose_tips,
icon:'none' icon:'none'
}) })
return return
@ -99,6 +98,7 @@
box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16); box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
&-header { &-header {
white-space: pre-wrap;
align-items: flex-start; align-items: flex-start;
row-gap: 10rpx; row-gap: 10rpx;
padding: 0 0 27rpx 5rpx; padding: 0 0 27rpx 5rpx;


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

@ -54,10 +54,15 @@
}) })
}, },
onCreateReport() { 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