团体支付
Showing
9 changed files
with
364 additions
and
317 deletions
.idea/UniappTool.xml
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project version="4"> | ||
| 3 | <component name="cn.fjdmy.uniapp.UniappProjectDataService"> | ||
| 4 | <option name="basePath" value="$PROJECT_DIR$" /> | ||
| 5 | <option name="generalBasePath" value="$PROJECT_DIR$" /> | ||
| 6 | <option name="manifestPath" value="$PROJECT_DIR$/manifest.json" /> | ||
| 7 | <option name="pagesPath" value="$PROJECT_DIR$/pages.json" /> | ||
| 8 | <option name="scanNum" value="1" /> | ||
| 9 | <option name="type" value="store" /> | ||
| 10 | <option name="uniapp" value="true" /> | ||
| 11 | <option name="uniappHx" value="true" /> | ||
| 12 | <option name="vueVersion" value="3" /> | ||
| 13 | </component> | ||
| 14 | </project> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
.idea/inspectionProfiles/Project_Default.xml
0 → 100644
| 1 | <component name="InspectionProjectProfileManager"> | ||
| 2 | <profile version="1.0"> | ||
| 3 | <option name="myName" value="Project Default" /> | ||
| 4 | <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" /> | ||
| 5 | <inspection_tool class="HtmlDeprecatedAttribute" enabled="false" level="WARNING" enabled_by_default="false" /> | ||
| 6 | <inspection_tool class="JSEqualityComparisonWithCoercion" enabled="false" level="WARNING" enabled_by_default="false" /> | ||
| 7 | <inspection_tool class="JSUnresolvedReference" enabled="false" level="WEAK WARNING" enabled_by_default="false" /> | ||
| 8 | </profile> | ||
| 9 | </component> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -85,9 +85,13 @@ async function minShengPay(orderId, encryptedData) { | ... | @@ -85,9 +85,13 @@ async function minShengPay(orderId, encryptedData) { |
| 85 | 85 | ||
| 86 | uni.hideLoading() | 86 | uni.hideLoading() |
| 87 | // 8. 调起微信支付 | 87 | // 8. 调起微信支付 |
| 88 | const [payErr] = await to(invokeWechatPayment(payParams, orderId)) | 88 | const [payErr, paySuccess] = await to(invokeWechatPayment(payParams, orderId)) |
| 89 | if (payErr) { | 89 | if (payErr) { |
| 90 | handlePaymentError(payErr, orderId) | 90 | handlePaymentError(payErr, orderId) |
| 91 | |||
| 92 | } | ||
| 93 | if (paySuccess) { | ||
| 94 | return paySuccess | ||
| 91 | } | 95 | } |
| 92 | } | 96 | } |
| 93 | 97 | ... | ... |
| 1 | // dev | 1 | // dev |
| 2 | // const baseUrl_api = 'http://192.168.1.137:8787' | 2 | const baseUrl_api = 'http://192.168.1.137:8787' |
| 3 | const baseUrl_api = 'http://tk001.wxjylt.com/stage-api' | 3 | // const baseUrl_api = 'http://tk001.wxjylt.com/stage-api' |
| 4 | const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' | 4 | const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' |
| 5 | 5 | ||
| 6 | // prod | 6 | // prod | ... | ... |
| ... | @@ -3,7 +3,8 @@ | ... | @@ -3,7 +3,8 @@ |
| 3 | <view v-if="showDirectly&&directUnderFlag==0"> | 3 | <view v-if="showDirectly&&directUnderFlag==0"> |
| 4 | <view class="flexbox"> | 4 | <view class="flexbox"> |
| 5 | <view> | 5 | <view> |
| 6 | 有效日期至 <text class="text-primary">{{form?.validityDate?.slice(0,10) }}</text> | 6 | 有效日期至 |
| 7 | <text class="text-primary">{{ form?.validityDate?.slice(0, 10) }}</text> | ||
| 7 | </view> | 8 | </view> |
| 8 | <view> | 9 | <view> |
| 9 | <text v-if="activeStatus==0&&authenticationStatusa" class="text-danger">未激活</text> | 10 | <text v-if="activeStatus==0&&authenticationStatusa" class="text-danger">未激活</text> |
| ... | @@ -18,87 +19,92 @@ | ... | @@ -18,87 +19,92 @@ |
| 18 | </view> | 19 | </view> |
| 19 | </view> | 20 | </view> |
| 20 | <view class="flexbox" style="justify-content: flex-end;padding: 0 30rpx 40rpx;"> | 21 | <view class="flexbox" style="justify-content: flex-end;padding: 0 30rpx 40rpx;"> |
| 21 | <button class="btn-red" style="margin: 0 20rpx 0 0;" size="mini" | 22 | <button v-if="activeStatus==0&&authenticationStatusa" class="btn-red" size="mini" |
| 22 | v-if="activeStatus==0&&authenticationStatusa" @click="payTheFees">激活</button> | 23 | style="margin: 0 20rpx 0 0;" @click="payTheFees">激活 |
| 24 | </button> | ||
| 23 | <view v-else> | 25 | <view v-else> |
| 24 | <button class="btn-red" style="margin: 0 20rpx 0 0;" size="mini" | 26 | <button :disabled="auditStatus==1||auditStatus==2||form.isPoints==0" class="btn-red" size="mini" |
| 25 | :disabled="auditStatus==1||auditStatus==2||form.isPoints==0" | 27 | style="margin: 0 20rpx 0 0;" |
| 26 | @click="showApplyDialog">考点申请</button> | 28 | @click="showApplyDialog">考点申请 |
| 27 | <button class="btn-red" style="margin: 0 20rpx 0 0;" size="mini" :disabled="btn" | 29 | </button> |
| 28 | @click="payTheFees">去缴费</button> | 30 | <button :disabled="btn" class="btn-red" size="mini" style="margin: 0 20rpx 0 0;" |
| 29 | <button class="btn-red-kx" style="margin: 0 20rpx 0 0;" size="mini" v-if="form.deptType!=1" | 31 | @click="payTheFees">去缴费 |
| 30 | @click="auditEditFN">审核详情</button> | 32 | </button> |
| 33 | <button v-if="form.deptType!=1" class="btn-red-kx" size="mini" style="margin: 0 20rpx 0 0;" | ||
| 34 | @click="auditEditFN">审核详情 | ||
| 35 | </button> | ||
| 31 | </view> | 36 | </view> |
| 32 | </view> | 37 | </view> |
| 33 | </view> | 38 | </view> |
| 34 | <view class="mainbox"> | 39 | <view class="mainbox"> |
| 35 | <uni-list> | 40 | <uni-list> |
| 36 | <uni-list-item v-if="authenticationStatusa != 1&&authenticationStatusa != 0&&authenticationStatusa != 3" | 41 | <uni-list-item v-if="authenticationStatusa != 1&&authenticationStatusa != 0&&authenticationStatusa != 3" |
| 37 | title="所属协会" :rightText="form.aname"> | 42 | :rightText="form.aname" title="所属协会"> |
| 38 | </uni-list-item> | 43 | </uni-list-item> |
| 39 | <uni-list-item title="会员编号" v-if="form.menCode" :rightText="form.menCode" /> | 44 | <uni-list-item v-if="form.menCode" :rightText="form.menCode" title="会员编号"/> |
| 40 | <uni-list-item title="机构名称" :rightText="form.name" /> | 45 | <uni-list-item :rightText="form.name" title="机构名称"/> |
| 41 | <uni-list-item title="所属省份"> | 46 | <uni-list-item title="所属省份"> |
| 42 | <template v-slot:footer> | 47 | <template v-slot:footer> |
| 43 | <view class="frrr"> | 48 | <view class="frrr"> |
| 44 | <uni-data-picker readonly :clear-icon="false" v-model="form.belongProvinceId" | 49 | <uni-data-picker v-model="form.belongProvinceId" :clear-icon="false" :localdata="options" |
| 45 | :localdata="options"> | 50 | readonly> |
| 46 | </uni-data-picker> | 51 | </uni-data-picker> |
| 47 | </view> | 52 | </view> |
| 48 | </template> | 53 | </template> |
| 49 | </uni-list-item> | 54 | </uni-list-item> |
| 50 | <uni-list-item title="社会信用代码" | 55 | <uni-list-item |
| 51 | v-if="authenticationStatusa != 1&&authenticationStatusa != 0&&authenticationStatusa != 3&&newResult||form.associateId&&form.associateId>0||activeStatus==1" | 56 | v-if="authenticationStatusa != 1&&authenticationStatusa != 0&&authenticationStatusa != 3&&newResult||form.associateId&&form.associateId>0||activeStatus==1" |
| 52 | :rightText="form.creditCode" /> | 57 | :rightText="form.creditCode" |
| 53 | <uni-list-item v-if="form.certSiteContact" title="联系人" :rightText="form.certSiteContact" /> | 58 | title="社会信用代码"/> |
| 54 | <uni-list-item v-else title="联系人" :rightText="form.contact" /> | 59 | <uni-list-item v-if="form.certSiteContact" :rightText="form.certSiteContact" title="联系人"/> |
| 55 | <uni-list-item v-if="form.certSiteTel" title="联系方式" :rightText="form.certSiteTel" /> | 60 | <uni-list-item v-else :rightText="form.contact" title="联系人"/> |
| 56 | <uni-list-item v-else title="联系方式" :rightText="form.phone" /> | 61 | <uni-list-item v-if="form.certSiteTel" :rightText="form.certSiteTel" title="联系方式"/> |
| 62 | <uni-list-item v-else :rightText="form.phone" title="联系方式"/> | ||
| 57 | <uni-list-item title="认证地址"> | 63 | <uni-list-item title="认证地址"> |
| 58 | <template v-slot:footer> | 64 | <template v-slot:footer> |
| 59 | <view class="frrr"> | 65 | <view class="frrr"> |
| 60 | <uni-data-picker readonly :clear-icon="false" v-if="form.certRegionId" | 66 | <uni-data-picker v-if="form.certRegionId" v-model="form.certRegionId" :clear-icon="false" |
| 61 | v-model="form.certRegionId" :localdata="options"> | 67 | :localdata="options" readonly> |
| 62 | </uni-data-picker> | 68 | </uni-data-picker> |
| 63 | <uni-data-picker readonly :clear-icon="false" v-else-if="form.certCityId" | 69 | <uni-data-picker v-else-if="form.certCityId" v-model="form.certCityId" :clear-icon="false" |
| 64 | v-model="form.certCityId" :localdata="options"> | 70 | :localdata="options" readonly> |
| 65 | </uni-data-picker> | 71 | </uni-data-picker> |
| 66 | <uni-data-picker readonly :clear-icon="false" v-else-if="form.certProvinceId" | 72 | <uni-data-picker v-else-if="form.certProvinceId" v-model="form.certProvinceId" :clear-icon="false" |
| 67 | v-model="form.certProvinceId" :localdata="options"> | 73 | :localdata="options" readonly> |
| 68 | </uni-data-picker> | 74 | </uni-data-picker> |
| 69 | </view> | 75 | </view> |
| 70 | </template> | 76 | </template> |
| 71 | </uni-list-item> | 77 | </uni-list-item> |
| 72 | <uni-list-item title="认证详细地址" :rightText="form.certAddress" /> | 78 | <uni-list-item :rightText="form.certAddress" title="认证详细地址"/> |
| 73 | <uni-list-item title="法人姓名" :rightText="form.certLegal||'--'" /> | 79 | <uni-list-item :rightText="form.certLegal||'--'" title="法人姓名"/> |
| 74 | 80 | ||
| 75 | <uni-list-item v-if="form.deptType==6" title="是否为考点" :rightText="form.isPoints==0?'是':'否'" /> | 81 | <uni-list-item v-if="form.deptType==6" :rightText="form.isPoints==0?'是':'否'" title="是否为考点"/> |
| 76 | <uni-list-item title="法人身份证" clickable> | 82 | <uni-list-item clickable title="法人身份证"> |
| 77 | <template v-slot:footer> | 83 | <template v-slot:footer> |
| 78 | <view v-if="form.legalIdcPhotoArr&&form.legalIdcPhotoArr?.length>0" class="frrr"> | 84 | <view v-if="form.legalIdcPhotoArr&&form.legalIdcPhotoArr?.length>0" class="frrr"> |
| 79 | <image class="ylImage" mode="aspectFit" @click="showImage(form.legalIdcPhotoArr,index)" | 85 | <image v-for="(item,index) in form.legalIdcPhotoArr" :key="item" :src="item" |
| 80 | v-for="(item,index) in form.legalIdcPhotoArr" :key="item" :src="item"> | 86 | class="ylImage" mode="aspectFit" @click="showImage(form.legalIdcPhotoArr,index)"> |
| 81 | </image> | 87 | </image> |
| 82 | </view> | 88 | </view> |
| 83 | </template> | 89 | </template> |
| 84 | </uni-list-item> | 90 | </uni-list-item> |
| 85 | 91 | ||
| 86 | <uni-list-item title="营业执照" clickable> | 92 | <uni-list-item clickable title="营业执照"> |
| 87 | <template v-slot:footer> | 93 | <template v-slot:footer> |
| 88 | <view class="frrr" @click="download(form.businessLicenseArr[0]?.url)" | 94 | <view v-if="form.businessLicenseArr&&form.businessLicenseArr?.length>0" class="frrr" |
| 89 | v-if="form.businessLicenseArr&&form.businessLicenseArr?.length>0"> | 95 | @click="download(form.businessLicenseArr[0]?.url)"> |
| 90 | <text class="text-primary">{{form.businessLicenseArr[0]?.name}}</text> | 96 | <text class="text-primary">{{ form.businessLicenseArr[0]?.name }}</text> |
| 91 | </view> | 97 | </view> |
| 92 | </template> | 98 | </template> |
| 93 | </uni-list-item> | 99 | </uni-list-item> |
| 94 | <uni-list-item title="机构照片" clickable> | 100 | <uni-list-item clickable title="机构照片"> |
| 95 | <template v-slot:footer> | 101 | <template v-slot:footer> |
| 96 | <view class="frrr"> | 102 | <view class="frrr"> |
| 97 | <view v-if="form.picturesArr&&form.picturesArr?.length>0" class="photoBook" | 103 | <view v-if="form.picturesArr&&form.picturesArr?.length>0" class="photoBook" |
| 98 | @click="showImage(form.picturesArr,0)"> | 104 | @click="showImage(form.picturesArr,0)"> |
| 99 | <image mode="aspectFit" class="ylImage" :src="form.picturesArr[0]"> | 105 | <image :src="form.picturesArr[0]" class="ylImage" mode="aspectFit"> |
| 100 | </image> | 106 | </image> |
| 101 | <text>共{{form.picturesArr?.length}}张</text> | 107 | <text>共{{ form.picturesArr?.length }}张</text> |
| 102 | </view> | 108 | </view> |
| 103 | </view> | 109 | </view> |
| 104 | </template> | 110 | </template> |
| ... | @@ -106,8 +112,8 @@ | ... | @@ -106,8 +112,8 @@ |
| 106 | </uni-list> | 112 | </uni-list> |
| 107 | </view> | 113 | </view> |
| 108 | <!-- 弹窗添加触摸事件拦截 --> | 114 | <!-- 弹窗添加触摸事件拦截 --> |
| 109 | <uni-popup ref="applyPopup" type="center" @touchmove.stop.prevent="() => {}" @open="onPopupOpen" | 115 | <uni-popup ref="applyPopup" type="center" @close="onPopupClose" @open="onPopupOpen" |
| 110 | @close="onPopupClose"> | 116 | @touchmove.stop.prevent="() => {}"> |
| 111 | <view class="apply-dialog" @touchmove.stop.prevent="() => {}"> | 117 | <view class="apply-dialog" @touchmove.stop.prevent="() => {}"> |
| 112 | <view class="dialog-title">考点申请</view> | 118 | <view class="dialog-title">考点申请</view> |
| 113 | <view class="dialog-content"> | 119 | <view class="dialog-content"> |
| ... | @@ -124,58 +130,60 @@ | ... | @@ -124,58 +130,60 @@ |
| 124 | </template> | 130 | </template> |
| 125 | 131 | ||
| 126 | <script setup> | 132 | <script setup> |
| 127 | import * as api from '@/common/api.js' | 133 | import * as api from '@/common/api.js' |
| 128 | import config from '@/config.js' | 134 | import config from '@/config.js' |
| 129 | import * as loginServer from '@/common/login.js'; | 135 | import * as loginServer from '@/common/login.js'; |
| 130 | 136 | ||
| 131 | import _ from 'underscore' | 137 | import _ from 'underscore' |
| 132 | import { | 138 | import { |
| 133 | ref, | 139 | ref, |
| 134 | onUnmounted | 140 | onUnmounted |
| 135 | } from 'vue' | 141 | } from 'vue' |
| 136 | import { | 142 | import { |
| 137 | onLoad, | 143 | onLoad, |
| 138 | onShow | 144 | onShow |
| 139 | } from '@dcloudio/uni-app' | 145 | } from '@dcloudio/uni-app' |
| 140 | const app = getApp() | 146 | |
| 141 | const form = ref({ | 147 | const app = getApp() |
| 148 | const form = ref({ | ||
| 142 | type: 1 | 149 | type: 1 |
| 143 | }) | 150 | }) |
| 144 | const userType = ref() | 151 | const userType = ref() |
| 145 | const activeStatus = ref(0) | 152 | const activeStatus = ref(0) |
| 146 | const directUnderFlag = ref(0) | 153 | const directUnderFlag = ref(0) |
| 147 | const showDirectly = ref(true) | 154 | const showDirectly = ref(true) |
| 148 | const authenticationStatusa = ref() | 155 | const authenticationStatusa = ref() |
| 149 | const result = ref(false) | 156 | const result = ref(false) |
| 150 | const newResult = ref(false) | 157 | const resultNoProvince = ref(false) |
| 151 | const btn = ref(false) | 158 | const newResult = ref(false) |
| 152 | const type = ref(true) | 159 | const btn = ref(false) |
| 153 | const flag = ref(false) | 160 | const type = ref(true) |
| 154 | const pr = ref({}) | 161 | const flag = ref(false) |
| 155 | const applicationForMembership1 = ref({}) | 162 | const pr = ref({}) |
| 156 | const options = ref([]) | 163 | const applicationForMembership1 = ref({}) |
| 157 | const applyPopup = ref(null) | 164 | const options = ref([]) |
| 158 | // 新增:控制弹窗显示状态(用于锁定滚动) | 165 | const applyPopup = ref(null) |
| 159 | const popupShow = ref(false) | 166 | // 新增:控制弹窗显示状态(用于锁定滚动) |
| 160 | // 考点审核状态 0 未提交 1 审核中 2 审核成功 3 审核失败 | 167 | const popupShow = ref(false) |
| 161 | const auditStatus = ref(0) | 168 | // 考点审核状态 0 未提交 1 审核中 2 审核成功 3 审核失败 |
| 162 | 169 | const auditStatus = ref(0) | |
| 163 | onShow(() => { | 170 | |
| 171 | onShow(() => { | ||
| 164 | init() | 172 | init() |
| 165 | if (form.value.deptType != 1) { // 修复:原代码deptType未定义,改为form.value.deptType | 173 | if (form.value.deptType != 1) { // 修复:原代码deptType未定义,改为form.value.deptType |
| 166 | getMyStatusAPI() | 174 | getMyStatusAPI() |
| 167 | } | 175 | } |
| 168 | }) | 176 | }) |
| 169 | 177 | ||
| 170 | // 页面卸载时恢复滚动(防止异常锁死) | 178 | // 页面卸载时恢复滚动(防止异常锁死) |
| 171 | onUnmounted(() => { | 179 | onUnmounted(() => { |
| 172 | uni.setPageScrollEnabled({ | 180 | uni.setPageScrollEnabled({ |
| 173 | enabled: true | 181 | enabled: true |
| 174 | }) | 182 | }) |
| 175 | popupShow.value = false | 183 | popupShow.value = false |
| 176 | }) | 184 | }) |
| 177 | 185 | ||
| 178 | function init() { | 186 | function init() { |
| 179 | api.regionsList().then(res => { | 187 | api.regionsList().then(res => { |
| 180 | options.value = res.data | 188 | options.value = res.data |
| 181 | }) | 189 | }) |
| ... | @@ -184,6 +192,7 @@ | ... | @@ -184,6 +192,7 @@ |
| 184 | userType.value = app.globalData.userType | 192 | userType.value = app.globalData.userType |
| 185 | newResult.value = res.data.newResult | 193 | newResult.value = res.data.newResult |
| 186 | result.value = res.data.result | 194 | result.value = res.data.result |
| 195 | resultNoProvince.value = res.data.resultNoProvince2 | ||
| 187 | authenticationStatusa.value = res.data.authenticationStatus | 196 | authenticationStatusa.value = res.data.authenticationStatus |
| 188 | showDirectly.value = !res.data.memberInfo.associateId | 197 | showDirectly.value = !res.data.memberInfo.associateId |
| 189 | activeStatus.value = res.data.memberInfo.activeStatus | 198 | activeStatus.value = res.data.memberInfo.activeStatus |
| ... | @@ -194,7 +203,8 @@ | ... | @@ -194,7 +203,8 @@ |
| 194 | } else if (authenticationStatusa.value == 1) { | 203 | } else if (authenticationStatusa.value == 1) { |
| 195 | btn.value = true | 204 | btn.value = true |
| 196 | } else { | 205 | } else { |
| 197 | btn.value = !result.value | 206 | // btn.value = !result.value |
| 207 | btn.value = !resultNoProvince.value | ||
| 198 | } | 208 | } |
| 199 | // 认证信息 | 209 | // 认证信息 |
| 200 | if (authenticationStatusa.value == 0 || authenticationStatusa.value == 3) { | 210 | if (authenticationStatusa.value == 0 || authenticationStatusa.value == 3) { |
| ... | @@ -270,9 +280,9 @@ | ... | @@ -270,9 +280,9 @@ |
| 270 | console.log(form.value.picturesArr) | 280 | console.log(form.value.picturesArr) |
| 271 | } | 281 | } |
| 272 | }) | 282 | }) |
| 273 | } | 283 | } |
| 274 | 284 | ||
| 275 | async function getMyStatusAPI() { | 285 | async function getMyStatusAPI() { |
| 276 | const { | 286 | const { |
| 277 | data | 287 | data |
| 278 | } = await api.getMyStatus() | 288 | } = await api.getMyStatus() |
| ... | @@ -281,10 +291,10 @@ | ... | @@ -281,10 +291,10 @@ |
| 281 | } else { | 291 | } else { |
| 282 | auditStatus.value = 0 | 292 | auditStatus.value = 0 |
| 283 | } | 293 | } |
| 284 | } | 294 | } |
| 285 | 295 | ||
| 286 | // 新增:弹窗打开时锁定滚动 | 296 | // 新增:弹窗打开时锁定滚动 |
| 287 | function onPopupOpen() { | 297 | function onPopupOpen() { |
| 288 | popupShow.value = true | 298 | popupShow.value = true |
| 289 | // 1. 小程序API锁定页面滚动 | 299 | // 1. 小程序API锁定页面滚动 |
| 290 | uni.setPageScrollEnabled({ | 300 | uni.setPageScrollEnabled({ |
| ... | @@ -296,10 +306,10 @@ | ... | @@ -296,10 +306,10 @@ |
| 296 | enabled: false | 306 | enabled: false |
| 297 | }) | 307 | }) |
| 298 | }, 100) | 308 | }, 100) |
| 299 | } | 309 | } |
| 300 | 310 | ||
| 301 | // 新增:弹窗关闭时恢复滚动 | 311 | // 新增:弹窗关闭时恢复滚动 |
| 302 | function onPopupClose() { | 312 | function onPopupClose() { |
| 303 | popupShow.value = false | 313 | popupShow.value = false |
| 304 | // 恢复页面滚动 | 314 | // 恢复页面滚动 |
| 305 | uni.setPageScrollEnabled({ | 315 | uni.setPageScrollEnabled({ |
| ... | @@ -310,51 +320,54 @@ | ... | @@ -310,51 +320,54 @@ |
| 310 | enabled: true | 320 | enabled: true |
| 311 | }) | 321 | }) |
| 312 | }, 100) | 322 | }, 100) |
| 313 | } | 323 | } |
| 314 | 324 | ||
| 315 | function showApplyDialog() { | 325 | function showApplyDialog() { |
| 316 | applyPopup.value.open() | 326 | applyPopup.value.open() |
| 317 | } | 327 | } |
| 318 | 328 | ||
| 319 | // 关闭申请弹窗 | 329 | // 关闭申请弹窗 |
| 320 | function closeApplyDialog() { | 330 | function closeApplyDialog() { |
| 321 | applyPopup.value.close() | 331 | applyPopup.value.close() |
| 322 | } | 332 | } |
| 323 | 333 | ||
| 324 | // 跳转到考点申请页面 | 334 | // 跳转到考点申请页面 |
| 325 | function goToApplyPage() { | 335 | function goToApplyPage() { |
| 326 | closeApplyDialog() | 336 | closeApplyDialog() |
| 327 | uni.navigateTo({ | 337 | uni.navigateTo({ |
| 328 | url: `/myCenter/examPointApply?memId=${form.value.memId}` | 338 | url: `/myCenter/examPointApply?memId=${form.value.memId}` |
| 329 | }) | 339 | }) |
| 330 | } | 340 | } |
| 331 | 341 | ||
| 332 | function auditEditFN() { | 342 | function auditEditFN() { |
| 333 | uni.navigateTo({ | 343 | uni.navigateTo({ |
| 334 | url: `/myCenter/reviewList` | 344 | url: `/myCenter/reviewList` |
| 335 | }) | 345 | }) |
| 336 | } | 346 | } |
| 337 | 347 | ||
| 338 | function showImage(arr, index) { | 348 | function showImage(arr, index) { |
| 339 | uni.previewImage({ | 349 | uni.previewImage({ |
| 340 | urls: arr, | 350 | urls: arr, |
| 341 | current: index, | 351 | current: index, |
| 342 | success: function(res) {} | 352 | success: function (res) { |
| 343 | }) | ||
| 344 | } | 353 | } |
| 354 | }) | ||
| 355 | } | ||
| 345 | 356 | ||
| 346 | function download(url) { | 357 | function download(url) { |
| 347 | console.log(url) | 358 | console.log(url) |
| 348 | if (url.indexOf('.png') > -1 || url.indexOf('.jpg') > -1) { | 359 | if (url.indexOf('.png') > -1 || url.indexOf('.jpg') > -1) { |
| 349 | if (url.indexOf('http') > -1) { | 360 | if (url.indexOf('http') > -1) { |
| 350 | uni.previewImage({ | 361 | uni.previewImage({ |
| 351 | urls: [url], | 362 | urls: [url], |
| 352 | success: function(res) {} | 363 | success: function (res) { |
| 364 | } | ||
| 353 | }) | 365 | }) |
| 354 | } else { | 366 | } else { |
| 355 | uni.previewImage({ | 367 | uni.previewImage({ |
| 356 | urls: [config.baseUrl_api + url], | 368 | urls: [config.baseUrl_api + url], |
| 357 | success: function(res) {} | 369 | success: function (res) { |
| 370 | } | ||
| 358 | }) | 371 | }) |
| 359 | } | 372 | } |
| 360 | } else { | 373 | } else { |
| ... | @@ -364,16 +377,16 @@ | ... | @@ -364,16 +377,16 @@ |
| 364 | goWebView(config.baseUrl_api + url) | 377 | goWebView(config.baseUrl_api + url) |
| 365 | } | 378 | } |
| 366 | } | 379 | } |
| 367 | } | 380 | } |
| 368 | 381 | ||
| 369 | function goWebView(url) { | 382 | function goWebView(url) { |
| 370 | url = url.replace("http://", "https://") | 383 | url = url.replace("http://", "https://") |
| 371 | uni.showLoading({ | 384 | uni.showLoading({ |
| 372 | title: '下载中' | 385 | title: '下载中' |
| 373 | }); | 386 | }); |
| 374 | uni.downloadFile({ | 387 | uni.downloadFile({ |
| 375 | url: url, | 388 | url: url, |
| 376 | success: function(res) { | 389 | success: function (res) { |
| 377 | uni.hideLoading(); | 390 | uni.hideLoading(); |
| 378 | var filePath = res.tempFilePath; | 391 | var filePath = res.tempFilePath; |
| 379 | uni.showLoading({ | 392 | uni.showLoading({ |
| ... | @@ -382,10 +395,10 @@ | ... | @@ -382,10 +395,10 @@ |
| 382 | uni.openDocument({ | 395 | uni.openDocument({ |
| 383 | filePath: filePath, | 396 | filePath: filePath, |
| 384 | showMenu: true, | 397 | showMenu: true, |
| 385 | success: function(res) { | 398 | success: function (res) { |
| 386 | uni.hideLoading(); | 399 | uni.hideLoading(); |
| 387 | }, | 400 | }, |
| 388 | fail: function(err) { | 401 | fail: function (err) { |
| 389 | uni.hideLoading(); | 402 | uni.hideLoading(); |
| 390 | uni.showToast({ | 403 | uni.showToast({ |
| 391 | title: err, | 404 | title: err, |
| ... | @@ -395,7 +408,7 @@ | ... | @@ -395,7 +408,7 @@ |
| 395 | } | 408 | } |
| 396 | }); | 409 | }); |
| 397 | }, | 410 | }, |
| 398 | fail: function(error) { | 411 | fail: function (error) { |
| 399 | uni.hideLoading(); | 412 | uni.hideLoading(); |
| 400 | uni.showToast({ | 413 | uni.showToast({ |
| 401 | title: `下载失败`, | 414 | title: `下载失败`, |
| ... | @@ -404,9 +417,9 @@ | ... | @@ -404,9 +417,9 @@ |
| 404 | }); | 417 | }); |
| 405 | } | 418 | } |
| 406 | }); | 419 | }); |
| 407 | } | 420 | } |
| 408 | 421 | ||
| 409 | function payTheFees() { | 422 | function payTheFees() { |
| 410 | if (!form.value.name) { | 423 | if (!form.value.name) { |
| 411 | uni.showToast({ | 424 | uni.showToast({ |
| 412 | title: `请先完善单位信息`, | 425 | title: `请先完善单位信息`, |
| ... | @@ -417,12 +430,12 @@ | ... | @@ -417,12 +430,12 @@ |
| 417 | uni.navigateTo({ | 430 | uni.navigateTo({ |
| 418 | url: `/myCenter/perfect` | 431 | url: `/myCenter/perfect` |
| 419 | }) | 432 | }) |
| 420 | } | 433 | } |
| 421 | </script> | 434 | </script> |
| 422 | 435 | ||
| 423 | <style scoped lang="scss"> | 436 | <style lang="scss" scoped> |
| 424 | // 新增:锁定滚动的核心样式 | 437 | // 新增:锁定滚动的核心样式 |
| 425 | .lock-scroll { | 438 | .lock-scroll { |
| 426 | position: fixed !important; | 439 | position: fixed !important; |
| 427 | top: 0; | 440 | top: 0; |
| 428 | left: 0; | 441 | left: 0; |
| ... | @@ -430,13 +443,13 @@ | ... | @@ -430,13 +443,13 @@ |
| 430 | bottom: 0; | 443 | bottom: 0; |
| 431 | overflow: hidden !important; | 444 | overflow: hidden !important; |
| 432 | height: 100vh !important; | 445 | height: 100vh !important; |
| 433 | } | 446 | } |
| 434 | 447 | ||
| 435 | .height1 { | 448 | .height1 { |
| 436 | height: 100rpx; | 449 | height: 100rpx; |
| 437 | } | 450 | } |
| 438 | 451 | ||
| 439 | .photobox { | 452 | .photobox { |
| 440 | position: relative; | 453 | position: relative; |
| 441 | margin: 30rpx auto; | 454 | margin: 30rpx auto; |
| 442 | 455 | ||
| ... | @@ -447,17 +460,17 @@ | ... | @@ -447,17 +460,17 @@ |
| 447 | display: block; | 460 | display: block; |
| 448 | margin: auto; | 461 | margin: auto; |
| 449 | } | 462 | } |
| 450 | } | 463 | } |
| 451 | 464 | ||
| 452 | .ylImage { | 465 | .ylImage { |
| 453 | width: 300rpx; | 466 | width: 300rpx; |
| 454 | height: 200rpx; | 467 | height: 200rpx; |
| 455 | display: block; | 468 | display: block; |
| 456 | box-shadow: 0 0 10rpx #ddd; | 469 | box-shadow: 0 0 10rpx #ddd; |
| 457 | border-radius: 8rpx; | 470 | border-radius: 8rpx; |
| 458 | } | 471 | } |
| 459 | 472 | ||
| 460 | .photoBook { | 473 | .photoBook { |
| 461 | position: relative; | 474 | position: relative; |
| 462 | border-radius: 10rpx; | 475 | border-radius: 10rpx; |
| 463 | overflow: hidden; | 476 | overflow: hidden; |
| ... | @@ -480,86 +493,86 @@ | ... | @@ -480,86 +493,86 @@ |
| 480 | bottom: 4rpx; | 493 | bottom: 4rpx; |
| 481 | right: 8rpx; | 494 | right: 8rpx; |
| 482 | } | 495 | } |
| 483 | } | 496 | } |
| 484 | 497 | ||
| 485 | .frrr { | 498 | .frrr { |
| 486 | width: 100%; | 499 | width: 100%; |
| 487 | text-align: right; | 500 | text-align: right; |
| 488 | text-align: right; | 501 | text-align: right; |
| 489 | display: flex; | 502 | display: flex; |
| 490 | flex-wrap: wrap; | 503 | flex-wrap: wrap; |
| 491 | justify-content: flex-end; | 504 | justify-content: flex-end; |
| 492 | } | 505 | } |
| 493 | 506 | ||
| 494 | :deep(.selected-list) { | 507 | :deep(.selected-list) { |
| 495 | font-size: 32rpx; | 508 | font-size: 32rpx; |
| 496 | padding: 0; | 509 | padding: 0; |
| 497 | } | 510 | } |
| 498 | 511 | ||
| 499 | :deep(.input-value) { | 512 | :deep(.input-value) { |
| 500 | padding: 0; | 513 | padding: 0; |
| 501 | } | 514 | } |
| 502 | 515 | ||
| 503 | :deep(.uni-list-item__extra-text) { | 516 | :deep(.uni-list-item__extra-text) { |
| 504 | font-size: 32rpx; | 517 | font-size: 32rpx; |
| 505 | color: #000; | 518 | color: #000; |
| 506 | } | 519 | } |
| 507 | 520 | ||
| 508 | :deep(.uni-list-item__extra) { | 521 | :deep(.uni-list-item__extra) { |
| 509 | flex: 1 1 auto; | 522 | flex: 1 1 auto; |
| 510 | } | 523 | } |
| 511 | 524 | ||
| 512 | :deep(.uni-list-item__content) { | 525 | :deep(.uni-list-item__content) { |
| 513 | flex: 0 0 auto; | 526 | flex: 0 0 auto; |
| 514 | } | 527 | } |
| 515 | 528 | ||
| 516 | :deep(.uni-list-item__content-title) { | 529 | :deep(.uni-list-item__content-title) { |
| 517 | color: #999; | 530 | color: #999; |
| 518 | } | 531 | } |
| 519 | 532 | ||
| 520 | .flexbox { | 533 | .flexbox { |
| 521 | padding: 30rpx; | 534 | padding: 30rpx; |
| 522 | background-color: #fff; | 535 | background-color: #fff; |
| 523 | justify-content: space-between; | 536 | justify-content: space-between; |
| 524 | } | 537 | } |
| 525 | 538 | ||
| 526 | .mainbox { | 539 | .mainbox { |
| 527 | margin: 30rpx; | 540 | margin: 30rpx; |
| 528 | } | 541 | } |
| 529 | 542 | ||
| 530 | .apply-dialog { | 543 | .apply-dialog { |
| 531 | width: 530rpx; | 544 | width: 530rpx; |
| 532 | background: #fff; | 545 | background: #fff; |
| 533 | border-radius: 16rpx; | 546 | border-radius: 16rpx; |
| 534 | padding: 40rpx; | 547 | padding: 40rpx; |
| 535 | // 新增:禁止弹窗内部滚动 | 548 | // 新增:禁止弹窗内部滚动 |
| 536 | touch-action: none; | 549 | touch-action: none; |
| 537 | } | 550 | } |
| 538 | 551 | ||
| 539 | .dialog-title { | 552 | .dialog-title { |
| 540 | font-size: 32rpx; | 553 | font-size: 32rpx; |
| 541 | font-weight: bold; | 554 | font-weight: bold; |
| 542 | text-align: center; | 555 | text-align: center; |
| 543 | margin-bottom: 30rpx; | 556 | margin-bottom: 30rpx; |
| 544 | } | 557 | } |
| 545 | 558 | ||
| 546 | .dialog-content { | 559 | .dialog-content { |
| 547 | margin: 40rpx; | 560 | margin: 40rpx; |
| 548 | } | 561 | } |
| 549 | 562 | ||
| 550 | .remind { | 563 | .remind { |
| 551 | color: #FF8124; | 564 | color: #FF8124; |
| 552 | font-size: 26rpx; | 565 | font-size: 26rpx; |
| 553 | margin-top: 40rpx; | 566 | margin-top: 40rpx; |
| 554 | } | 567 | } |
| 555 | 568 | ||
| 556 | .dialog-buttons { | 569 | .dialog-buttons { |
| 557 | display: flex; | 570 | display: flex; |
| 558 | justify-content: space-between; | 571 | justify-content: space-between; |
| 559 | margin-top: 40rpx; | 572 | margin-top: 40rpx; |
| 560 | } | 573 | } |
| 561 | 574 | ||
| 562 | .btn-cancel { | 575 | .btn-cancel { |
| 563 | width: 225rpx; | 576 | width: 225rpx; |
| 564 | height: 80rpx; | 577 | height: 80rpx; |
| 565 | line-height: 80rpx; | 578 | line-height: 80rpx; |
| ... | @@ -569,9 +582,9 @@ | ... | @@ -569,9 +582,9 @@ |
| 569 | color: #333; | 582 | color: #333; |
| 570 | text-align: center; | 583 | text-align: center; |
| 571 | font-size: 14px; | 584 | font-size: 14px; |
| 572 | } | 585 | } |
| 573 | 586 | ||
| 574 | .btn-confirm { | 587 | .btn-confirm { |
| 575 | width: 225rpx; | 588 | width: 225rpx; |
| 576 | height: 80rpx; | 589 | height: 80rpx; |
| 577 | line-height: 80rpx; | 590 | line-height: 80rpx; |
| ... | @@ -580,10 +593,10 @@ | ... | @@ -580,10 +593,10 @@ |
| 580 | font-size: 14px; | 593 | font-size: 14px; |
| 581 | color: #fff; | 594 | color: #fff; |
| 582 | text-align: center; | 595 | text-align: center; |
| 583 | } | 596 | } |
| 584 | 597 | ||
| 585 | // 新增:给uni-popup蒙版添加禁止滚动样式 | 598 | // 新增:给uni-popup蒙版添加禁止滚动样式 |
| 586 | :deep(.uni-popup__mask) { | 599 | :deep(.uni-popup__mask) { |
| 587 | touch-action: none !important; | 600 | touch-action: none !important; |
| 588 | } | 601 | } |
| 589 | </style> | 602 | </style> | ... | ... |
| ... | @@ -5,13 +5,13 @@ | ... | @@ -5,13 +5,13 @@ |
| 5 | <view class="yearRow"> | 5 | <view class="yearRow"> |
| 6 | <view class="label">缴费年限</view> | 6 | <view class="label">缴费年限</view> |
| 7 | <view class="control"> | 7 | <view class="control"> |
| 8 | <image class="icon" @click="minusYear" src="/static/dd_02.png" mode="widthFix" | 8 | <image v-if="form.renewYear > 1" class="icon" mode="widthFix" src="/static/dd_02.png" |
| 9 | v-if="form.renewYear > 1"></image> | 9 | @click="minusYear"></image> |
| 10 | <image class="icon" src="/static/dd_02_g.png" mode="widthFix" v-else></image> | 10 | <image v-else class="icon" mode="widthFix" src="/static/dd_02_g.png"></image> |
| 11 | <text class="num">{{ form.renewYear }}年</text> | 11 | <text class="num">{{ form.renewYear }}年</text> |
| 12 | <image class="icon" src="/static/btn_03.png" mode="widthFix" @click="plusYear" | 12 | <image v-if="form.renewYear < 5" class="icon" mode="widthFix" src="/static/btn_03.png" |
| 13 | v-if="form.renewYear < 5"></image> | 13 | @click="plusYear"></image> |
| 14 | <image class="icon" src="/static/btn_03_g.png" mode="widthFix" v-else></image> | 14 | <image v-else class="icon" mode="widthFix" src="/static/btn_03_g.png"></image> |
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| 17 | </view> | 17 | </view> |
| ... | @@ -23,18 +23,19 @@ | ... | @@ -23,18 +23,19 @@ |
| 23 | <text class="value red">{{ (form.renewYear * memberFee).toFixed(2) }}元</text> | 23 | <text class="value red">{{ (form.renewYear * memberFee).toFixed(2) }}元</text> |
| 24 | </view> | 24 | </view> |
| 25 | 25 | ||
| 26 | <view class="hintRow" v-if="preferentialPolicy"> | 26 | <view v-if="preferentialPolicy" class="hintRow"> |
| 27 | <text | 27 | <text |
| 28 | class="hintText">温馨提示:根据中国跆协{{ preferentialData.name || '优惠' }}政策减免一年费用,每个单位在政策有效期内只享受一次</text> | 28 | class="hintText">温馨提示:根据中国跆协{{ preferentialData.name || '优惠' }}政策减免一年费用,每个单位在政策有效期内只享受一次 |
| 29 | </text> | ||
| 29 | </view> | 30 | </view> |
| 30 | </view> | 31 | </view> |
| 31 | 32 | ||
| 32 | <view class="payRow "> | 33 | <view class="payRow "> |
| 33 | <radio-group @change="onPayTypeChange"> | 34 | <radio-group @change="onPayTypeChange"> |
| 34 | <label class="radioItem"> | 35 | <label class="radioItem"> |
| 35 | <radio value="1" :checked="payType === '1'" class="custom-radio" /> | 36 | <radio :checked="payType === '1'" class="custom-radio" value="1"/> |
| 36 | <view class="payInfo"> | 37 | <view class="payInfo"> |
| 37 | <image class="icon" src="/static/min.png" mode="widthFix"></image> | 38 | <image class="icon" mode="widthFix" src="/static/min.png"></image> |
| 38 | <text>民生付</text> | 39 | <text>民生付</text> |
| 39 | </view> | 40 | </view> |
| 40 | </label> | 41 | </label> |
| ... | @@ -53,62 +54,63 @@ | ... | @@ -53,62 +54,63 @@ |
| 53 | <text class="label">减免费用</text> | 54 | <text class="label">减免费用</text> |
| 54 | <text class="value red">-{{ memberFee.toFixed(2) }}元</text> | 55 | <text class="value red">-{{ memberFee.toFixed(2) }}元</text> |
| 55 | </view> | 56 | </view> |
| 56 | <button class="payBtn" @click="handelPay" :loading="isPaying">立即支付 ¥{{ memberTotalFee }}</button> | 57 | <button :loading="isPaying" class="payBtn" @click="handelPay">立即支付 ¥{{ memberTotalFee }}</button> |
| 57 | </view> | 58 | </view> |
| 58 | 59 | ||
| 59 | </view> | 60 | </view> |
| 60 | </template> | 61 | </template> |
| 61 | 62 | ||
| 62 | <script setup> | 63 | <script setup> |
| 63 | import { | 64 | import { |
| 64 | ref, | 65 | ref, |
| 65 | computed | 66 | computed |
| 66 | } from 'vue' | 67 | } from 'vue' |
| 67 | import { | 68 | import { |
| 68 | onLoad | 69 | onLoad |
| 69 | } from '@dcloudio/uni-app'; | 70 | } from '@dcloudio/uni-app'; |
| 70 | import to from 'await-to-js' | 71 | import to from 'await-to-js' |
| 71 | import * as api from '@/common/api.js' | 72 | import * as api from '@/common/api.js' |
| 73 | import {minShengPay} from '@/common/pay.js' | ||
| 72 | 74 | ||
| 73 | const form = ref({ | 75 | const form = ref({ |
| 74 | renewYear: 1 | 76 | renewYear: 1 |
| 75 | }) | 77 | }) |
| 76 | const memberFee = ref(0) | 78 | const memberFee = ref(0) |
| 77 | const preferentialPolicy = ref(false) | 79 | const preferentialPolicy = ref(false) |
| 78 | const preferentialData = ref({ | 80 | const preferentialData = ref({ |
| 79 | name: '优惠' | 81 | name: '优惠' |
| 80 | }) | 82 | }) |
| 81 | const payType = ref('1') | 83 | const payType = ref('1') |
| 82 | const isPaying = ref(false) | 84 | const isPaying = ref(false) |
| 83 | 85 | ||
| 84 | const memberTotalFee = computed(() => { | 86 | const memberTotalFee = computed(() => { |
| 85 | if (preferentialPolicy.value) { | 87 | if (preferentialPolicy.value) { |
| 86 | return (memberFee.value * form.value.renewYear - memberFee.value * 1).toFixed(2) | 88 | return (memberFee.value * form.value.renewYear - memberFee.value * 1).toFixed(2) |
| 87 | } else { | 89 | } else { |
| 88 | return (memberFee.value * form.value.renewYear).toFixed(2) | 90 | return (memberFee.value * form.value.renewYear).toFixed(2) |
| 89 | } | 91 | } |
| 90 | }) | 92 | }) |
| 91 | 93 | ||
| 92 | // 年限减 | 94 | // 年限减 |
| 93 | const minusYear = () => { | 95 | const minusYear = () => { |
| 94 | if (form.value.renewYear > 1) { | 96 | if (form.value.renewYear > 1) { |
| 95 | form.value.renewYear-- | 97 | form.value.renewYear-- |
| 96 | } | 98 | } |
| 97 | } | 99 | } |
| 98 | // 年限加 | 100 | // 年限加 |
| 99 | const plusYear = () => { | 101 | const plusYear = () => { |
| 100 | if (form.value.renewYear < 6) { | 102 | if (form.value.renewYear < 6) { |
| 101 | form.value.renewYear++ | 103 | form.value.renewYear++ |
| 102 | } | 104 | } |
| 103 | } | 105 | } |
| 104 | 106 | ||
| 105 | // 支付方式切换 | 107 | // 支付方式切换 |
| 106 | const onPayTypeChange = (e) => { | 108 | const onPayTypeChange = (e) => { |
| 107 | payType.value = e.detail.value | 109 | payType.value = e.detail.value |
| 108 | } | 110 | } |
| 109 | 111 | ||
| 110 | // 支付操作 | 112 | // 支付操作 |
| 111 | const handelPay = async () => { | 113 | const handelPay = async () => { |
| 112 | if (memberTotalFee.value < 0) { | 114 | if (memberTotalFee.value < 0) { |
| 113 | uni.showToast({ | 115 | uni.showToast({ |
| 114 | title: '支付金额异常', | 116 | title: '支付金额异常', |
| ... | @@ -146,28 +148,33 @@ | ... | @@ -146,28 +148,33 @@ |
| 146 | }) | 148 | }) |
| 147 | return | 149 | return |
| 148 | } | 150 | } |
| 149 | 151 | if (data.payResult.encryptedData) { | |
| 152 | const res = minShengPay(data.orderId, data.payResult.encryptedData) | ||
| 153 | console.log(res) | ||
| 154 | } | ||
| 150 | // 需要支付回调 | 155 | // 需要支付回调 |
| 151 | if (data.orderId) { | 156 | // if (data.orderId) { |
| 152 | await to(api.callBack2(data.orderId)) | 157 | // await to(api.callBack2(data.orderId)) |
| 153 | uni.hideLoading() | 158 | // uni.hideLoading() |
| 154 | isPaying.value = false | 159 | // isPaying.value = false |
| 160 | // | ||
| 161 | // uni.redirectTo({ | ||
| 162 | // url: `/myCenter/sucPay?orderId=${data.orderId}` | ||
| 163 | // }) | ||
| 164 | // } | ||
| 155 | 165 | ||
| 156 | uni.redirectTo({ | ||
| 157 | url: `/myCenter/sucPay?orderId=${data.orderId}` | ||
| 158 | }) | ||
| 159 | } | ||
| 160 | } | ||
| 161 | 166 | ||
| 162 | onLoad((option) => { | 167 | } |
| 168 | |||
| 169 | onLoad((option) => { | ||
| 163 | // 接收年限 | 170 | // 接收年限 |
| 164 | form.value.renewYear = Number(option.renewYear || 1) | 171 | form.value.renewYear = Number(option.renewYear || 1) |
| 165 | // 初始化获取费用和优惠 | 172 | // 初始化获取费用和优惠 |
| 166 | init() | 173 | init() |
| 167 | }) | 174 | }) |
| 168 | 175 | ||
| 169 | // 初始化接口 | 176 | // 初始化接口 |
| 170 | async function init() { | 177 | async function init() { |
| 171 | uni.showLoading({ | 178 | uni.showLoading({ |
| 172 | title: '加载中...' | 179 | title: '加载中...' |
| 173 | }) | 180 | }) |
| ... | @@ -180,78 +187,78 @@ | ... | @@ -180,78 +187,78 @@ |
| 180 | if (err) { | 187 | if (err) { |
| 181 | console.error('初始化失败:', err) | 188 | console.error('初始化失败:', err) |
| 182 | } | 189 | } |
| 183 | } | 190 | } |
| 184 | 191 | ||
| 185 | // 获取会员单价 | 192 | // 获取会员单价 |
| 186 | async function getMyMemberCertUnitFeeApi() { | 193 | async function getMyMemberCertUnitFeeApi() { |
| 187 | const [err, res] = await to(api.getMyMemberCertUnitFee()) | 194 | const [err, res] = await to(api.getMyMemberCertUnitFee()) |
| 188 | if (!err && res.data) { | 195 | if (!err && res.data) { |
| 189 | memberFee.value = Number(res.data || 1500) | 196 | memberFee.value = Number(res.data || 1500) |
| 190 | } | 197 | } |
| 191 | } | 198 | } |
| 192 | 199 | ||
| 193 | // 是否可用优惠 | 200 | // 是否可用优惠 |
| 194 | async function canUseDiscountApi() { | 201 | async function canUseDiscountApi() { |
| 195 | const [err, res] = await to(api.canUseDiscount()) | 202 | const [err, res] = await to(api.canUseDiscount()) |
| 196 | if (!err && res.data !== undefined) { | 203 | if (!err && res.data !== undefined) { |
| 197 | preferentialPolicy.value = res.data | 204 | preferentialPolicy.value = res.data |
| 198 | } | 205 | } |
| 199 | } | 206 | } |
| 200 | 207 | ||
| 201 | // 获取优惠政策详情 | 208 | // 获取优惠政策详情 |
| 202 | async function getZtxDiscountPolicyApi() { | 209 | async function getZtxDiscountPolicyApi() { |
| 203 | const [err, res] = await to(api.getZtxDiscountPolicy()) | 210 | const [err, res] = await to(api.getZtxDiscountPolicy()) |
| 204 | if (!err && res.data) { | 211 | if (!err && res.data) { |
| 205 | preferentialData.value = res.data | 212 | preferentialData.value = res.data |
| 206 | } | 213 | } |
| 207 | } | 214 | } |
| 208 | </script> | 215 | </script> |
| 209 | 216 | ||
| 210 | <style scoped> | 217 | <style scoped> |
| 211 | /* 整体容器 */ | 218 | /* 整体容器 */ |
| 212 | .container { | 219 | .container { |
| 213 | min-height: 100vh; | 220 | min-height: 100vh; |
| 214 | background-color: #f7f7f7; | 221 | background-color: #f7f7f7; |
| 215 | } | 222 | } |
| 216 | 223 | ||
| 217 | /* 内容区域 */ | 224 | /* 内容区域 */ |
| 218 | .content { | 225 | .content { |
| 219 | padding: 20rpx 20rpx 120rpx; | 226 | padding: 20rpx 20rpx 120rpx; |
| 220 | } | 227 | } |
| 221 | 228 | ||
| 222 | /* 卡片 */ | 229 | /* 卡片 */ |
| 223 | .card { | 230 | .card { |
| 224 | background: #fff; | 231 | background: #fff; |
| 225 | border-radius: 8rpx; | 232 | border-radius: 8rpx; |
| 226 | padding: 25rpx 20rpx; | 233 | padding: 25rpx 20rpx; |
| 227 | margin-bottom: 20rpx; | 234 | margin-bottom: 20rpx; |
| 228 | } | 235 | } |
| 229 | 236 | ||
| 230 | /* 缴费年限行 */ | 237 | /* 缴费年限行 */ |
| 231 | .yearRow { | 238 | .yearRow { |
| 232 | display: flex; | 239 | display: flex; |
| 233 | align-items: center; | 240 | align-items: center; |
| 234 | justify-content: space-between; | 241 | justify-content: space-between; |
| 235 | margin-bottom: 20rpx; | 242 | margin-bottom: 20rpx; |
| 236 | } | 243 | } |
| 237 | 244 | ||
| 238 | .yearRow .label { | 245 | .yearRow .label { |
| 239 | font-size: 28rpx; | 246 | font-size: 28rpx; |
| 240 | color: #333; | 247 | color: #333; |
| 241 | } | 248 | } |
| 242 | 249 | ||
| 243 | .yearRow .control { | 250 | .yearRow .control { |
| 244 | display: flex; | 251 | display: flex; |
| 245 | align-items: center; | 252 | align-items: center; |
| 246 | } | 253 | } |
| 247 | 254 | ||
| 248 | .control image { | 255 | .control image { |
| 249 | width: 50rpx; | 256 | width: 50rpx; |
| 250 | height: 50rpx; | 257 | height: 50rpx; |
| 251 | } | 258 | } |
| 252 | 259 | ||
| 253 | /* 加减按钮样式 */ | 260 | /* 加减按钮样式 */ |
| 254 | .num-btn { | 261 | .num-btn { |
| 255 | width: 40rpx; | 262 | width: 40rpx; |
| 256 | height: 40rpx; | 263 | height: 40rpx; |
| 257 | border-radius: 50%; | 264 | border-radius: 50%; |
| ... | @@ -260,59 +267,59 @@ | ... | @@ -260,59 +267,59 @@ |
| 260 | justify-content: center; | 267 | justify-content: center; |
| 261 | background-color: #fff; | 268 | background-color: #fff; |
| 262 | border: 1rpx solid #C4121B; | 269 | border: 1rpx solid #C4121B; |
| 263 | } | 270 | } |
| 264 | 271 | ||
| 265 | .num-btn.disabled { | 272 | .num-btn.disabled { |
| 266 | border-color: #ccc; | 273 | border-color: #ccc; |
| 267 | } | 274 | } |
| 268 | 275 | ||
| 269 | .num-btn.disabled .btn-icon { | 276 | .num-btn.disabled .btn-icon { |
| 270 | color: #ccc; | 277 | color: #ccc; |
| 271 | } | 278 | } |
| 272 | 279 | ||
| 273 | .btn-icon { | 280 | .btn-icon { |
| 274 | font-size: 24rpx; | 281 | font-size: 24rpx; |
| 275 | color: #C4121B; | 282 | color: #C4121B; |
| 276 | font-weight: bold; | 283 | font-weight: bold; |
| 277 | } | 284 | } |
| 278 | 285 | ||
| 279 | .yearRow .num { | 286 | .yearRow .num { |
| 280 | font-size: 28rpx; | 287 | font-size: 28rpx; |
| 281 | color: #333; | 288 | color: #333; |
| 282 | min-width: 80rpx; | 289 | min-width: 80rpx; |
| 283 | text-align: center; | 290 | text-align: center; |
| 284 | margin: 0 10rpx; | 291 | margin: 0 10rpx; |
| 285 | } | 292 | } |
| 286 | 293 | ||
| 287 | 294 | ||
| 288 | /* 通用行 */ | 295 | /* 通用行 */ |
| 289 | .row { | 296 | .row { |
| 290 | display: flex; | 297 | display: flex; |
| 291 | justify-content: space-between; | 298 | justify-content: space-between; |
| 292 | align-items: center; | 299 | align-items: center; |
| 293 | 300 | ||
| 294 | } | 301 | } |
| 295 | 302 | ||
| 296 | .row .label { | 303 | .row .label { |
| 297 | font-size: 28rpx; | 304 | font-size: 28rpx; |
| 298 | color: #333; | 305 | color: #333; |
| 299 | } | 306 | } |
| 300 | 307 | ||
| 301 | .row .value { | 308 | .row .value { |
| 302 | font-size: 30rpx; | 309 | font-size: 30rpx; |
| 303 | color: #C4121B; | 310 | color: #C4121B; |
| 304 | font-weight: 500; | 311 | font-weight: 500; |
| 305 | } | 312 | } |
| 306 | 313 | ||
| 307 | /* 优惠提示 */ | 314 | /* 优惠提示 */ |
| 308 | .hintRow { | 315 | .hintRow { |
| 309 | display: flex; | 316 | display: flex; |
| 310 | align-items: flex-start; | 317 | align-items: flex-start; |
| 311 | font-size: 24rpx; | 318 | font-size: 24rpx; |
| 312 | line-height: 1.4; | 319 | line-height: 1.4; |
| 313 | } | 320 | } |
| 314 | 321 | ||
| 315 | .hint-icon { | 322 | .hint-icon { |
| 316 | width: 24rpx; | 323 | width: 24rpx; |
| 317 | height: 24rpx; | 324 | height: 24rpx; |
| 318 | border-radius: 50%; | 325 | border-radius: 50%; |
| ... | @@ -323,25 +330,25 @@ | ... | @@ -323,25 +330,25 @@ |
| 323 | margin-right: 10rpx; | 330 | margin-right: 10rpx; |
| 324 | flex-shrink: 0; | 331 | flex-shrink: 0; |
| 325 | margin-top: 2rpx; | 332 | margin-top: 2rpx; |
| 326 | } | 333 | } |
| 327 | 334 | ||
| 328 | .icon { | 335 | .icon { |
| 329 | width: 30px; | 336 | width: 30px; |
| 330 | } | 337 | } |
| 331 | 338 | ||
| 332 | .icon-check { | 339 | .icon-check { |
| 333 | color: #fff; | 340 | color: #fff; |
| 334 | font-size: 16rpx; | 341 | font-size: 16rpx; |
| 335 | } | 342 | } |
| 336 | 343 | ||
| 337 | .hintRow .hintText { | 344 | .hintRow .hintText { |
| 338 | color: #FF8124; | 345 | color: #FF8124; |
| 339 | flex: 1; | 346 | flex: 1; |
| 340 | margin-top: 10rpx; | 347 | margin-top: 10rpx; |
| 341 | } | 348 | } |
| 342 | 349 | ||
| 343 | /* 减免费用 */ | 350 | /* 减免费用 */ |
| 344 | .deductRow { | 351 | .deductRow { |
| 345 | background: #fff; | 352 | background: #fff; |
| 346 | padding: 20rpx 20rpx; | 353 | padding: 20rpx 20rpx; |
| 347 | display: flex; | 354 | display: flex; |
| ... | @@ -349,64 +356,64 @@ | ... | @@ -349,64 +356,64 @@ |
| 349 | align-items: center; | 356 | align-items: center; |
| 350 | margin-bottom: 10rpx; | 357 | margin-bottom: 10rpx; |
| 351 | border-radius: 8rpx; | 358 | border-radius: 8rpx; |
| 352 | } | 359 | } |
| 353 | 360 | ||
| 354 | .deductRow .label { | 361 | .deductRow .label { |
| 355 | font-size: 28rpx; | 362 | font-size: 28rpx; |
| 356 | color: #333; | 363 | color: #333; |
| 357 | } | 364 | } |
| 358 | 365 | ||
| 359 | .deductRow .value { | 366 | .deductRow .value { |
| 360 | font-size: 30rpx; | 367 | font-size: 30rpx; |
| 361 | color: #C4121B; | 368 | color: #C4121B; |
| 362 | } | 369 | } |
| 363 | 370 | ||
| 364 | /* 支付方式行 */ | 371 | /* 支付方式行 */ |
| 365 | .payRow { | 372 | .payRow { |
| 366 | background: #fff; | 373 | background: #fff; |
| 367 | border-radius: 8rpx; | 374 | border-radius: 8rpx; |
| 368 | padding: 20rpx 20rpx; | 375 | padding: 20rpx 20rpx; |
| 369 | margin-bottom: 20rpx; | 376 | margin-bottom: 20rpx; |
| 370 | } | 377 | } |
| 371 | 378 | ||
| 372 | .radioItem { | 379 | .radioItem { |
| 373 | display: flex; | 380 | display: flex; |
| 374 | align-items: center; | 381 | align-items: center; |
| 375 | } | 382 | } |
| 376 | 383 | ||
| 377 | /* 自定义红色单选框 */ | 384 | /* 自定义红色单选框 */ |
| 378 | ::v-deep .custom-radio .wx-radio-input { | 385 | ::v-deep .custom-radio .wx-radio-input { |
| 379 | width: 30rpx; | 386 | width: 30rpx; |
| 380 | height: 30rpx; | 387 | height: 30rpx; |
| 381 | border-radius: 50%; | 388 | border-radius: 50%; |
| 382 | border: 2rpx solid #ccc; | 389 | border: 2rpx solid #ccc; |
| 383 | } | 390 | } |
| 384 | 391 | ||
| 385 | ::v-deep .custom-radio .wx-radio-input.wx-radio-input-checked { | 392 | ::v-deep .custom-radio .wx-radio-input.wx-radio-input-checked { |
| 386 | border-color: #C4121B !important; | 393 | border-color: #C4121B !important; |
| 387 | background: #C4121B !important; | 394 | background: #C4121B !important; |
| 388 | } | 395 | } |
| 389 | 396 | ||
| 390 | 397 | ||
| 391 | .payInfo { | 398 | .payInfo { |
| 392 | display: flex; | 399 | display: flex; |
| 393 | align-items: center; | 400 | align-items: center; |
| 394 | margin-left: 15rpx; | 401 | margin-left: 15rpx; |
| 395 | } | 402 | } |
| 396 | 403 | ||
| 397 | .payInfo .icon { | 404 | .payInfo .icon { |
| 398 | width: 40rpx; | 405 | width: 40rpx; |
| 399 | height: 40rpx; | 406 | height: 40rpx; |
| 400 | margin-right: 10rpx; | 407 | margin-right: 10rpx; |
| 401 | } | 408 | } |
| 402 | 409 | ||
| 403 | .payInfo text { | 410 | .payInfo text { |
| 404 | font-size: 28rpx; | 411 | font-size: 28rpx; |
| 405 | color: #333; | 412 | color: #333; |
| 406 | } | 413 | } |
| 407 | 414 | ||
| 408 | /* 总费用行(突出显示) */ | 415 | /* 总费用行(突出显示) */ |
| 409 | .totalRow { | 416 | .totalRow { |
| 410 | background: #fff; | 417 | background: #fff; |
| 411 | border-radius: 8rpx; | 418 | border-radius: 8rpx; |
| 412 | padding: 20rpx 20rpx; | 419 | padding: 20rpx 20rpx; |
| ... | @@ -414,21 +421,21 @@ | ... | @@ -414,21 +421,21 @@ |
| 414 | justify-content: space-between; | 421 | justify-content: space-between; |
| 415 | align-items: center; | 422 | align-items: center; |
| 416 | margin-top: 10rpx; | 423 | margin-top: 10rpx; |
| 417 | } | 424 | } |
| 418 | 425 | ||
| 419 | .totalRow .label { | 426 | .totalRow .label { |
| 420 | font-size: 28rpx; | 427 | font-size: 28rpx; |
| 421 | color: #333; | 428 | color: #333; |
| 422 | } | 429 | } |
| 423 | 430 | ||
| 424 | .redBig { | 431 | .redBig { |
| 425 | font-size: 32rpx; | 432 | font-size: 32rpx; |
| 426 | color: #C4121B; | 433 | color: #C4121B; |
| 427 | font-weight: bold; | 434 | font-weight: bold; |
| 428 | } | 435 | } |
| 429 | 436 | ||
| 430 | /* 底部按钮 */ | 437 | /* 底部按钮 */ |
| 431 | .bottomBtn { | 438 | .bottomBtn { |
| 432 | position: fixed; | 439 | position: fixed; |
| 433 | bottom: 0; | 440 | bottom: 0; |
| 434 | left: 0; | 441 | left: 0; |
| ... | @@ -436,9 +443,9 @@ | ... | @@ -436,9 +443,9 @@ |
| 436 | padding: 20rpx 20rpx; | 443 | padding: 20rpx 20rpx; |
| 437 | background: #fff; | 444 | background: #fff; |
| 438 | border-top: 1rpx solid #eee; | 445 | border-top: 1rpx solid #eee; |
| 439 | } | 446 | } |
| 440 | 447 | ||
| 441 | .payBtn { | 448 | .payBtn { |
| 442 | width: 100%; | 449 | width: 100%; |
| 443 | height: 88rpx; | 450 | height: 88rpx; |
| 444 | line-height: 88rpx; | 451 | line-height: 88rpx; |
| ... | @@ -448,15 +455,15 @@ | ... | @@ -448,15 +455,15 @@ |
| 448 | font-size: 32rpx; | 455 | font-size: 32rpx; |
| 449 | text-align: center; | 456 | text-align: center; |
| 450 | border: none; | 457 | border: none; |
| 451 | } | 458 | } |
| 452 | 459 | ||
| 453 | .payBtn[disabled] { | 460 | .payBtn[disabled] { |
| 454 | background-color: #ccc; | 461 | background-color: #ccc; |
| 455 | color: #999; | 462 | color: #999; |
| 456 | } | 463 | } |
| 457 | 464 | ||
| 458 | /* 通用红色文字 */ | 465 | /* 通用红色文字 */ |
| 459 | .red { | 466 | .red { |
| 460 | color: #C4121B; | 467 | color: #C4121B; |
| 461 | } | 468 | } |
| 462 | </style> | 469 | </style> | ... | ... |
| ... | @@ -109,7 +109,7 @@ | ... | @@ -109,7 +109,7 @@ |
| 109 | const res = await api.goPay(rangeId.value) | 109 | const res = await api.goPay(rangeId.value) |
| 110 | 110 | ||
| 111 | if (res.data?.orderId) { | 111 | if (res.data?.orderId) { |
| 112 | api.pcallBack2(res.data.orderId) | 112 | await api.pcallBack2(res.data.orderId) |
| 113 | uni.redirectTo({ | 113 | uni.redirectTo({ |
| 114 | url: `/myCenter/sucPay?rangeId=${rangeId.value}from=payOrder` | 114 | url: `/myCenter/sucPay?rangeId=${rangeId.value}from=payOrder` |
| 115 | }) | 115 | }) | ... | ... |
| ... | @@ -330,6 +330,7 @@ | ... | @@ -330,6 +330,7 @@ |
| 330 | }; | 330 | }; |
| 331 | } | 331 | } |
| 332 | }) | 332 | }) |
| 333 | |||
| 333 | onLoad(option => { | 334 | onLoad(option => { |
| 334 | let userName = uni.getStorageSync('userName') | 335 | let userName = uni.getStorageSync('userName') |
| 335 | if (!userName) { | 336 | if (!userName) { |
| ... | @@ -443,8 +444,7 @@ | ... | @@ -443,8 +444,7 @@ |
| 443 | // deptInfo.value = app.globalData.dept || {} | 444 | // deptInfo.value = app.globalData.dept || {} |
| 444 | // app.globalData.deptInfo = res.dept || {} | 445 | // app.globalData.deptInfo = res.dept || {} |
| 445 | console.log(43,res) | 446 | console.log(43,res) |
| 446 | if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData | 447 | if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData.authenticationStatus != '4') { |
| 447 | .authenticationStatus != '4') { | ||
| 448 | // 注册引导 | 448 | // 注册引导 |
| 449 | uni.navigateTo({ | 449 | uni.navigateTo({ |
| 450 | url: '/pages/index/perfect' | 450 | url: '/pages/index/perfect' |
| ... | @@ -524,7 +524,7 @@ | ... | @@ -524,7 +524,7 @@ |
| 524 | }); | 524 | }); |
| 525 | } | 525 | } |
| 526 | </script> | 526 | </script> |
| 527 | <style scope lang="scss"> | 527 | <style scoped lang="scss"> |
| 528 | :deep(.uni-section) { | 528 | :deep(.uni-section) { |
| 529 | background-color: transparent !important; | 529 | background-color: transparent !important; |
| 530 | } | 530 | } | ... | ... |
| ... | @@ -84,7 +84,7 @@ | ... | @@ -84,7 +84,7 @@ |
| 84 | <button | 84 | <button |
| 85 | class="action-btn submit-btn" | 85 | class="action-btn submit-btn" |
| 86 | @click.stop="commitFN(item)" | 86 | @click.stop="commitFN(item)" |
| 87 | :disabled="item.auditStatus != 0"> | 87 | :disabled="item.auditStatus != 0&&item.auditStatus != 9"> |
| 88 | 提交审核 | 88 | 提交审核 |
| 89 | </button> | 89 | </button> |
| 90 | </view> | 90 | </view> | ... | ... |
-
Please register or sign in to post a comment