unknown 8 months ago
parent
commit
82a24bf9aa
  1. 2
      common/js/utils.js
  2. 5
      config/api.js
  3. 2
      config/site.config.js
  4. 4
      manifest.json
  5. 218
      pages/indexEntry/enroll/payment/payment.vue
  6. 4
      pages/indexEntry/enroll/registInfo/registInfo.vue
  7. 4
      pages/indexEntry/enroll/signContract/signContract.vue
  8. 24
      pages/indexEntry/signIn/signAndOut/signAndOut.vue
  9. 5
      pages/mineEntry/myForecastName/myForecastName.vue

2
common/js/utils.js

@ -124,7 +124,7 @@ const install = (Vue, vm) => {
store.commit('goLogin') store.commit('goLogin')
return return
} }
return vm.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
// return vm.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
// store.commit('updateNonPlatformStudent', false) // store.commit('updateNonPlatformStudent', false)
if( vm.vuex_userInfo.applyStep<2) { if( vm.vuex_userInfo.applyStep<2) {
vm.$goPage('/pages/indexEntry/enroll/enroll') vm.$goPage('/pages/indexEntry/enroll/enroll')

5
config/api.js

@ -218,6 +218,11 @@ export const periodConfirm = (data) => http.post('app/student-process/periodConf
export const getStudentDynamics = (data) => http.post('app/student-dynamic/getStudentDynamics', data) export const getStudentDynamics = (data) => http.post('app/student-dynamic/getStudentDynamics', data)
// 根据已过科目计算价格 // 根据已过科目计算价格
export const paymentPrice = (data) => http.post('app/student-record/paymentPrice', data) export const paymentPrice = (data) => http.post('app/student-record/paymentPrice', data)
// 创建订单
export const pre_create = (data) => http.post('pay/ysb/pre_create', data)
// 创建支付应用信息加密
export const param_sign = (data) => http.post('pay/ysb/param_sign', data)

2
config/site.config.js

@ -2,7 +2,7 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false // localIp = false
module.exports = { module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理 H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.43:8318/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.38:8318/',//非代理地址
// WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',//非代理地址 // WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',//非代理地址
website: 'http://192.168.1.37', website: 'http://192.168.1.37',
httpPrefix: 'app-api/', httpPrefix: 'app-api/',

4
manifest.json

@ -69,7 +69,7 @@
"sdkConfigs" : { "sdkConfigs" : {
"share" : { "share" : {
"weixin" : { "weixin" : {
"appid" : "wxdfeef42d2a053912",
"appid" : "wx9e7d9eea420f6541",
"UniversalLinks" : "" "UniversalLinks" : ""
} }
}, },
@ -170,7 +170,7 @@
"disableHostCheck" : true, "disableHostCheck" : true,
"proxy" : { "proxy" : {
"/api" : { "/api" : {
"target" : "http://192.168.1.38:8318/",
"target" : "http://192.168.1.43:8318/",
// "target" : "http://192.168.1.36:48080/", // "target" : "http://192.168.1.36:48080/",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : true, "secure" : true,

218
pages/indexEntry/enroll/payment/payment.vue

@ -13,10 +13,10 @@
<view class="lab">订单金额</view> <view class="lab">订单金额</view>
<view class="val"> {{info.a}}</view> <view class="val"> {{info.a}}</view>
</view> </view>
<view class="li">
<!-- <view class="li">
<view class="lab">订单编号</view> <view class="lab">订单编号</view>
<view class="val">{{info.a}}</view> <view class="val">{{info.a}}</view>
</view>
</view> -->
</view> </view>
<view class="card"> <view class="card">
<view class="pay"> <view class="pay">
@ -28,46 +28,54 @@
<view class="text">支付宝</view> <view class="text">支付宝</view>
<view class="icon"> <view class="icon">
<!-- <image src="@/static/images/index/noSelect.png" mode=""></image> --> <!-- <image src="@/static/images/index/noSelect.png" mode=""></image> -->
<!-- <image src="@/static/images/carIcon/isSelect.png" mode=""></image>
<!-- <image src="@/static/images/carIcon/isSelect.png" mode=""></image>
</view> --> </view> -->
</view>
<!-- <view class="row">
<view class="wxIcon">
<image src="@/static/images/carIcon/wxIcon.png" mode=""></image>
</view> </view>
<view class="row">
<view class="wxIcon">
<image src="@/static/images/carIcon/wxIcon.png" mode=""></image>
</view>
<view class="text">微信</view>
<view class="icon">
<!-- <image src="@/static/images/index/noSelect.png" mode=""></image> -->
<image src="@/static/images/carIcon/isSelect.png" mode=""></image>
</view>
<view class="text">微信</view>
<view class="icon">
<image src="@/static/images/index/noSelect.png" mode=""></image>
<image src="@/static/images/carIcon/isSelect.png" mode=""></image>
</view> </view>
</view>
</view>
<view class="footerBtn pad">
<view class="btnBg" @click="paySubmit">确认支付</view>
</view> -->
</view> </view>
</view> </view>
<view class="footerBtn pad">
<view class="btnBg" @click="getYSBLink">确认支付</view>
</view>
<web-view :src="link" v-if="link" @load="loadWebView"></web-view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { getStudentByPayment } from '@/config/api.js'
import {
getStudentByPayment, pre_create, param_sign
} from '@/config/api.js'
export default { export default {
data() { data() {
return { return {
trainingApplyId: '', trainingApplyId: '',
info: { info: {
a: '待对接' a: '待对接'
}
},
link: ''
} }
}, },
onLoad(options) { onLoad(options) {
if(options.trainingApplyId) {
if (options.trainingApplyId) {
this.trainingApplyId = options.trainingApplyId this.trainingApplyId = options.trainingApplyId
} }
// this.getYSBLink()
this.getStudentByPayment() this.getStudentByPayment()
this.initWx() this.initWx()
}, },
onPullDownRefresh() {
this.getStudentByPayment()
},
methods: { methods: {
initWx() { initWx() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -85,19 +93,84 @@
}); });
// #endif // #endif
}, },
wxPay() {
wxPay(data) {
// const data = {
// channelNo: 'QD202401250001', //
// encodeData: '', //{"outOrderNo":"15456","timestamp":"1632815312300"},jsonoutOrderNo
// miniAppName: '', //
// env: '',// u8u6prod
// distinctId: '',//
// unionMode: 'miniProToMiniPro', // 使
// }
// #ifdef APP-PLUS // #ifdef APP-PLUS
// this.sweixin ? this.sweixin.launchMiniProgram({
// appId: 'wx9e7d9eea420f6541', //appid wx9e7d9eea420f6541 wx05c2e4857b6806c8
// path: `/pages/ysbCheckStand/ysbCheckStand?data=${JSON.stringify(data)}`, // pages/index/index
// envVersion: 'trial', // trial, release
// }) : plus.nativeUI.alert('!');
this.sweixin ? this.sweixin.launchMiniProgram({ this.sweixin ? this.sweixin.launchMiniProgram({
// path: '/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode, // pages/index/index
path: '/' , // pages/index/index
type: 0, // 0- 1- 2- 0
id: 'gh_012fd4bda1c2' //id
miniAppId: 'wx9e7d9eea420f6541', //ID
path: '', //
miniProgramType: '1', // 0 1 2
}) : plus.nativeUI.alert('当前环境不支持微信操作!'); }) : plus.nativeUI.alert('当前环境不支持微信操作!');
// #endif // #endif
}, },
async getStudentByPayment() { async getStudentByPayment() {
const {data: res} = await getStudentByPayment({trainingApplyId: this.trainingApplyId})
this.$store.dispatch('getUserInfo')
const {
data: res
} = await pre_create({
trainingApplyId: this.trainingApplyId
})
console.log('创建的订单信息')
// console.log(res.orderNo)
this.encodeData = res.encodeData
// this.param_sign(res.orderNo)
// await this.getYSBLink(res.encodeData)
// this.wxPay()
// this.$store.dispatch('getUserInfo')
// setTimeout(()=>{
// this.wxPay()
// },1500)
},
//
async param_sign(outOrderNo) {
let obj = {
outOrderNo,
timestamp: Date.now()
}
console.log(JSON.stringify(obj))
const {data: res} = await param_sign({jsonParam:JSON.stringify(obj)})
console.log('加密后的数据')
console.log(res.encodeData)
},
getYSBLink() {
if(!this.encodeData) return this.$u.toast('没有获取到支付信息')
const channelNo = 'QD202404083509';
//commonh5platformpay_miniPro
const platform = 'common';
//H54
//
// const preUrl = 'https://ft1wbs.zyebank.cn/cem_ysb_ft2/index.html'
const preUrl = 'https://u8wbs.zyebank.cn/cem_ysb_u8/index.html'
//
// const preUrl = 'https://zmcht.zybank.com.cn/cem_ysb/index.html';
// let obj = {"outOrderNo":orderNo || "2024041211570300000308","timestamp":"1632815312300"}
// const encodeData = encodeData
// ()-
const distinctId = this.userId
const callback = `${preUrl}?encodeData=${this.encodeData}#/checkStandPre?platform=${platform}&channelNo=${channelNo}&checkStand_v3=true&distinctId=${distinctId}`;
this.link = callback;
console.log('callback')
console.log(callback)
},
loadWebView() {
console.log('会来到vebview事件里吗?')
this.wxPay()
}, },
paySubmit() { paySubmit() {
console.log('这是什么') console.log('这是什么')
@ -114,64 +187,76 @@
width: 100%; width: 100%;
margin-bottom: 20rpx; margin-bottom: 20rpx;
padding: 0 20rpx; padding: 0 20rpx;
.orderInfo {
text-align: center;
.schoolName {
font-size: 28rpx;
color: #ccc;
padding: 40rpx 0 20rpx 0;
}
.price {
font-size: 72rpx;
font-weight: 600;
text.uint {
font-size: 44rpx;
font-weight: 600;
}
}
.num {
font-size: 24rpx;
color: #ADADAD;
}
}
.li {
display: flex;
height: 88rpx;
line-height: 88rpx;
&.border{
border-bottom: 1px solid #F6F7FA;
.orderInfo {
text-align: center;
.schoolName {
font-size: 28rpx;
color: #ccc;
padding: 40rpx 0 20rpx 0;
}
.price {
font-size: 72rpx;
font-weight: 600;
text.uint {
font-size: 44rpx;
font-weight: 600;
}
}
.num {
font-size: 24rpx;
color: #ADADAD;
}
}
.li {
display: flex;
height: 88rpx;
line-height: 88rpx;
&.border {
border-bottom: 1px solid #F6F7FA;
}
.lab {
color: #ccc;
width: 230rpx;
}
.val {
font-weight: 500;
flex: 1;
text-align: right;
}
} }
.lab {
color: #ccc;
width: 230rpx;
}
.val {
font-weight: 500;
flex: 1;
text-align: right;
}
}
} }
.pay { .pay {
.h2 { .h2 {
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
.row { .row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 88rpx; height: 88rpx;
&.border{
&.border {
border-bottom: 1px solid #F6F7FA; border-bottom: 1px solid #F6F7FA;
} }
.wxIcon { .wxIcon {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
.text { .text {
margin-left: 20rpx; margin-left: 20rpx;
flex: 1; flex: 1;
@ -179,12 +264,11 @@
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
} }
.icon { .icon {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
} }
} }
</style> </style>

4
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -484,8 +484,8 @@
// //
confirmClassModel(val) { confirmClassModel(val) {
let item = val.value[0] let item = val.value[0]
console.log(item)
this.showClassModel = false this.showClassModel = false
if(!item) return
this.form.classModel = item.name this.form.classModel = item.name
this.form.schoolClassId = item.id this.form.schoolClassId = item.id
if(this.form.finishSubject&&this.form.transfer==1) { if(this.form.finishSubject&&this.form.transfer==1) {
@ -497,8 +497,8 @@
// //
confirmCar(val) { confirmCar(val) {
let item = val.value[0] let item = val.value[0]
console.log(item)
this.showCar = false this.showCar = false
if(!item) return
if(this.form.trainType == item) return if(this.form.trainType == item) return
this.form.trainType = item this.form.trainType = item
this.form.coach = '' this.form.coach = ''

4
pages/indexEntry/enroll/signContract/signContract.vue

@ -99,12 +99,10 @@
}) })
console.log(res) console.log(res)
if (res.flowStatus == 2) { if (res.flowStatus == 2) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/indexEntry/enroll/payment/payment?trainingApplyId='+this.trainingApplyId
url: '/pages/indexEntry/enroll/payment/payment?trainingApplyId='+res.trainingApplyId
}) })
if (res.flowStatus > 2) { if (res.flowStatus > 2) {
this.$u.toast('合同已撤销或过期') this.$u.toast('合同已撤销或过期')
} }
} }

24
pages/indexEntry/signIn/signAndOut/signAndOut.vue

@ -115,18 +115,20 @@
console.log(res.msg) console.log(res.msg)
if(res.code=='200240213') { if(res.code=='200240213') {
this.stepFailureReason = res.msg this.stepFailureReason = res.msg
if(res.msg=='学员未签退,请先签退') {
if(!this.count) {
this.count ++
console.log('来这了?')
const res2 = await reSignOut({coachId: this.params.coachId})
console.log('来这没有?')
this.vailStudentInfoFn()
console.log('补签结果')
console.log(res2)
}
// if(res.msg=='退,退') {
// if(!this.count) {
// this.count ++
// console.log('')
// const res2 = await reSignOut({coachId: this.params.coachId})
// console.log('')
// this.vailStudentInfoFn()
// console.log('')
// console.log(res2)
}
// this.getInitFaceVerifyFn('退')
// }
// }
} }
if(res.code==0) { if(res.code==0) {

5
pages/mineEntry/myForecastName/myForecastName.vue

@ -53,10 +53,11 @@
console.log(res) console.log(res)
}, },
itemClickFn(item) { itemClickFn(item) {
return this.$goPage('/pages/indexEntry/enroll/payment/payment?trainingApplyId='+ item.trainingApplyId)
console.log(item)
// return this.$goPage('/pages/indexEntry/enroll/payment/payment?trainingApplyId='+ item.trainingApplyId)
if(item.applyStep==3) { if(item.applyStep==3) {
this.$goPage('/pages/indexEntry/enroll/signContract/signContract?schoolId='+item.trainingSchoolId+'&trainingApplyId='+ item.trainingApplyId) this.$goPage('/pages/indexEntry/enroll/signContract/signContract?schoolId='+item.trainingSchoolId+'&trainingApplyId='+ item.trainingApplyId)
}else if(item.applyStep==4) {
}else if(item.applyStep==4||item.applyStep==5) {
return this.$goPage('/pages/indexEntry/enroll/payment/payment?trainingApplyId='+ item.trainingApplyId) return this.$goPage('/pages/indexEntry/enroll/payment/payment?trainingApplyId='+ item.trainingApplyId)
} }
} }

Loading…
Cancel
Save