Browse Source

易收宝支付事件修改

master
unknown 4 months ago
parent
commit
77cf59fc7c
  1. 28
      common/css/app.scss
  2. 1
      common/js/utils.js
  3. 3
      config/api.js
  4. 4
      config/request.js
  5. 5
      config/site.config.js
  6. 1
      main.js
  7. 14
      manifest.json
  8. 3
      nativePlugins/md.md
  9. 6
      pages/indexEntry/enroll/payment/payh5.vue
  10. 4
      pages/indexEntry/enroll/payment/payment.vue
  11. 2
      pages/indexEntry/enroll/registInfo/registInfo.vue
  12. 4
      pages/indexEntry/findShcool/screen/screen.vue
  13. 2
      pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue
  14. 4
      pages/mineEntry/myForecastName/myForecastName.vue
  15. 8
      pages/mineEntry/myOrder/myOrder.vue
  16. 23
      pages/mineEntry/refund/comp/myform.vue
  17. 18
      pages/tabbar/index/index.vue
  18. 1
      pages/tabbar/mine/index.vue
  19. 38
      pages/userCenter/login/login.vue
  20. 3
      store/modules/user.js

28
common/css/app.scss

@ -146,17 +146,21 @@ image {
} }
/* 通用 */ /* 通用 */
::-webkit-input-placeholder { color:#ADADAD; }
::-moz-placeholder { color:#ADADAD; } /* firefox 19+ */
:-ms-input-placeholder { color:#ADADAD; } /* ie */
input:-moz-placeholder { color:#ADADAD; }
::-webkit-input-placeholder { color:#BBBBBB; }
::-moz-placeholder { color:#BBBBBB; } /* firefox 19+ */
:-ms-input-placeholder { color:#BBBBBB; } /* ie */
input:-moz-placeholder { color:#BBBBBB; }
input::-webkit-input-placeholder { input::-webkit-input-placeholder {
color: #CDCDCD !important;
}
input::-moz-input-placeholder {
color: #CDCDCD !important;
}
input::-ms-input-placeholder {
color: #CDCDCD !important;
}
color: #BBBBBB !important;
}
input::-moz-input-placeholder {
color: #BBBBBB !important;
}
input::-ms-input-placeholder {
color: #BBBBBB !important;
}
// .uni-input-placeholder {
// color: #BBBBBB !important;
// }

1
common/js/utils.js

@ -120,6 +120,7 @@ const install = (Vue, vm) => {
let clickSignUp = ()=> { let clickSignUp = ()=> {
let accessToken = store.state.user.vuex_loginInfo.accessToken let accessToken = store.state.user.vuex_loginInfo.accessToken
if(!accessToken) { if(!accessToken) {
store.commit('goLogin') store.commit('goLogin')
return return

3
config/api.js

@ -226,6 +226,9 @@ export const periodConfirm = (data) => http.post('app/student-process/periodConf
export const course_info = (data) => http.post('pay/ysb/course_info', data) export const course_info = (data) => http.post('pay/ysb/course_info', data)
// 查询支付状态 // 查询支付状态
export const order_info = (data) => http.post('pay/ysb/order_info', data) export const order_info = (data) => http.post('pay/ysb/order_info', data)
// 退学申请
export const refuse_apply = (data) => http.post('pay/ysb/refuse_apply', data)

4
config/request.js

@ -44,8 +44,8 @@ module.exports = (vm) => {
// 响应拦截 // 响应拦截
uni.$u.http.interceptors.response.use(async (response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/ uni.$u.http.interceptors.response.use(async (response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/
const data = response.data const data = response.data
console.log('请求结果')
console.log(data)
// console.log('请求结果')
// console.log(data)
if(data.code==406&&response.config.url!='member/auth/refresh-token'&&response.config.url!=='member/auth/logout') { if(data.code==406&&response.config.url!='member/auth/refresh-token'&&response.config.url!=='member/auth/logout') {
await refreshToken() await refreshToken()
let obj = response.config let obj = response.config

5
config/site.config.js

@ -2,9 +2,12 @@ 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.35:8318',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.43:8318/',//非代理地址 不要忘记加/
// WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',// http://192.168.1.43:8318/ http://123.6.232.1:8099//非代理地址 // WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',// http://192.168.1.43:8318/ http://123.6.232.1:8099//非代理地址
website: 'http://192.168.1.37', website: 'http://192.168.1.37',
httpPrefix: 'app-api/', httpPrefix: 'app-api/',
imgUrl: 'https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/defaultImages/app/bigImg/' imgUrl: 'https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/defaultImages/app/bigImg/'
}; };
// http://123.6.232.54:8099/测试地址

1
main.js

@ -17,7 +17,6 @@ import uView from '@/uni_modules/uview-ui'
Vue.use(uView) Vue.use(uView)
const app = new Vue({ const app = new Vue({
...App, ...App,
store store

14
manifest.json

@ -2,8 +2,8 @@
"name" : "洛阳学车", "name" : "洛阳学车",
"appid" : "__UNI__3347C6E", "appid" : "__UNI__3347C6E",
"description" : "", "description" : "",
"versionName" : "1.2.1",
"versionCode" : 121,
"versionName" : "1.2.6",
"versionCode" : 126,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -27,8 +27,7 @@
"Barcode" : {}, "Barcode" : {},
"Geolocation" : {}, "Geolocation" : {},
"VideoPlayer" : {}, "VideoPlayer" : {},
"Share" : {},
"Payment" : {}
"Share" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -59,7 +58,8 @@
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\"/>", "<uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>" "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>"
]
],
"targetSdkVersion" : 26
}, },
/* ios */ /* ios */
"ios" : { "ios" : {
@ -190,8 +190,8 @@
"disableHostCheck" : true, "disableHostCheck" : true,
"proxy" : { "proxy" : {
"/api" : { "/api" : {
"target" : "http://192.168.1.35:8318/",
// "target" : "http://192.168.1.36:48080/",
"target" : "http://192.168.1.43:8318/",
// "target" : "http://123.6.232.1:8099/",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : true, "secure" : true,
"pathRewrite" : { "pathRewrite" : {

3
nativePlugins/md.md

@ -1,2 +1,3 @@
有一条理解,允许接纳的路,通向个体内在,只有内求才是无限的道路
只要还清晰的数呼吸就继续,

6
pages/indexEntry/enroll/payment/payh5.vue

@ -38,11 +38,11 @@
console.log(res) console.log(res)
console.log('监听到的发送事件') console.log('监听到的发送事件')
console.log(item) console.log(item)
if(item.action=='lyxc-wxPay') {
if(item.action=='ysb-wxPay') {
// this.$u.toast('') // this.$u.toast('')
this.iswxPay = true this.iswxPay = true
this.wxPay(item) this.wxPay(item)
}else if(item.action=='lyxc-paySuccess') {
}else if(item.action=='ysb-paySuccess') {
this.$u.toast('支付成功') this.$u.toast('支付成功')
this.iswxPay = false this.iswxPay = false
this.$store.dispatch('getUserInfo') this.$store.dispatch('getUserInfo')
@ -50,7 +50,7 @@
uni.switchTab({ uni.switchTab({
url: '/pages/tabbar/learnCar/index' url: '/pages/tabbar/learnCar/index'
}) })
},1500)
},800)
} }
}, },
// //

4
pages/indexEntry/enroll/payment/payment.vue

@ -21,7 +21,7 @@
</view> </view>
<view class="footerBtn pad"> <view class="footerBtn pad">
<view class="btnBg" @click="getStudentByPayment()">确认支付</view>
<view class="btnBg" @click="$u.debounce(getStudentByPayment, 1000)">确认支付</view>
<!-- <view class="btnBg" @click="paySubmit">确认支付</view> --> <!-- <view class="btnBg" @click="paySubmit">确认支付</view> -->
</view> </view>
@ -75,6 +75,8 @@
}, },
// //
async course_infoFn() { async course_infoFn() {
console.log('获取订单信息')
console.log(this.trainingApplyId)
const {data: res} = await course_info({trainingApplyId: this.trainingApplyId}) const {data: res} = await course_info({trainingApplyId: this.trainingApplyId})
this.amount = res.amount this.amount = res.amount
this.schoolName = res.schoolName this.schoolName = res.schoolName

2
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -620,6 +620,8 @@
let obj = Object.assign({},this.form) let obj = Object.assign({},this.form)
obj.name = obj.name.replace(/\s+/g, '') obj.name = obj.name.replace(/\s+/g, '')
obj.idcard = obj.idcard.replace(/\s+/g, '') obj.idcard = obj.idcard.replace(/\s+/g, '')
console.log('请求参数')
console.log(obj)
const {data: res} = await applyOnline(obj) const {data: res} = await applyOnline(obj)
// //
console.log(res) console.log(res)

4
pages/indexEntry/findShcool/screen/screen.vue

@ -41,7 +41,6 @@
} }
if(options.district) { if(options.district) {
this.areTypeArr = options.district.split(',').map(item=>item*1) this.areTypeArr = options.district.split(',').map(item=>item*1)
console.log(this.areTypeArr)
} }
this.licenseTypeFn() this.licenseTypeFn()
this.nachangListFn() this.nachangListFn()
@ -50,12 +49,10 @@
async licenseTypeFn() { async licenseTypeFn() {
const {data: res} = await licenseType() const {data: res} = await licenseType()
this.driverList = res this.driverList = res
console.log(res)
}, },
async nachangListFn() { async nachangListFn() {
const {data: res} = await nachangList() const {data: res} = await nachangList()
this.areList = res this.areList = res
console.log(res)
}, },
driverTypeClick(item) { driverTypeClick(item) {
let index = this.driverTypeArr.indexOf(item.label) let index = this.driverTypeArr.indexOf(item.label)
@ -79,7 +76,6 @@
this.driverTypeArr = [] this.driverTypeArr = []
}, },
screenConfirm() { screenConfirm() {
console.log( this.driverTypeArr)
let obj = { let obj = {
businessScope: this.driverTypeArr.join(','), businessScope: this.driverTypeArr.join(','),
district: this.areTypeArr.join(',') district: this.areTypeArr.join(',')

2
pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue

@ -120,7 +120,7 @@
const {data: res} = await getSchoolDetail(Object.assign(this.params,{id: this.schoolId})) const {data: res} = await getSchoolDetail(Object.assign(this.params,{id: this.schoolId}))
uni.hideLoading() uni.hideLoading()
this.schoolDetail = res this.schoolDetail = res
this.swiperList = res.schoolIntroduceDO&&res.schoolIntroduceDO.headImages.split(',')
this.swiperList = res.schoolIntroduceDO&&res.schoolIntroduceDO.headImages&&res.schoolIntroduceDO.headImages.split(',')
}, },
// //
async coachPageFn() { async coachPageFn() {

4
pages/mineEntry/myForecastName/myForecastName.vue

@ -53,12 +53,12 @@
this.$u.toast('删除成功') this.$u.toast('删除成功')
} }
this.trainingApplyListFn() this.trainingApplyListFn()
console.log(res)
} }
}) })
}, },
itemClickFn(item) { itemClickFn(item) {
console.log(item)
// 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||item.applyStep==5) { }else if(item.applyStep==4||item.applyStep==5) {

8
pages/mineEntry/myOrder/myOrder.vue

@ -28,9 +28,9 @@
data() { data() {
return { return {
tabList: [ tabList: [
{text: '已完成',id: 1},
{text: '已完成',id: 10},
{text: '待付款',id: 0}, {text: '待付款',id: 0},
{text: '退款',id: -1},
{text: '退款',id: 30},
],//01-12 ],//01-12
navList: [ navList: [
{text: '全部', id: 0}, {text: '全部', id: 0},
@ -40,8 +40,8 @@
params: { params: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 20,
orderStatus: 1,
orderType: 0,
orderStatus: 10,
orderType: 1,
sercheValue: '' sercheValue: ''
}, },
list: [], list: [],

23
pages/mineEntry/refund/comp/myform.vue

@ -71,7 +71,7 @@
</template> </template>
<script> <script>
import { getdictDataList, applyOnlineFund, getLoginCode, scanningBanks } from '@/config/api.js'
import { getdictDataList, refuse_apply, getLoginCode, scanningBanks } from '@/config/api.js'
import { H5_API, WX_API,httpPrefix } from '@/config/site.config.js'; import { H5_API, WX_API,httpPrefix } from '@/config/site.config.js';
import { chooseImages } from '@/config/utils.js' import { chooseImages } from '@/config/utils.js'
const _url = H5_API + WX_API + httpPrefix + 'app/apply-order/scanningBanks.do'; const _url = H5_API + WX_API + httpPrefix + 'app/apply-order/scanningBanks.do';
@ -131,12 +131,21 @@
} }
} }
if(!this.isBankCardNumber(this.FormData.idCard)) return this.$u.toast('请输入正确的银行卡号') if(!this.isBankCardNumber(this.FormData.idCard)) return this.$u.toast('请输入正确的银行卡号')
let obj = Object.assign({},this.FormData)
obj.idCard = obj.idCard.replace(/\s/g, '');
obj.studentId = this.studentId
obj.orderId = this.orderId
obj.feeType = this.info.orderType
const res = await applyOnlineFund(obj)
// obj.studentId = this.studentId
// obj.orderId = this.orderId
// obj.feeType = this.info.orderType
let obj = {
refundAmount: this.FormData.amount,
refundReasonType: this.FormData.reasonType,
bankCardName: this.FormData.bankName,
bankCardNo: this.FormData.idCard,
userName: this.FormData.stuName,
validCode: this.FormData.code,
}
obj.idCard = this.FormData.idCard.replace(/\s/g, '');
console.log('上传信息')
console.log(obj)
const res = await refuse_apply(obj)
if(res.code==0) { if(res.code==0) {
this.$u.toast('申请退款成功') this.$u.toast('申请退款成功')
this.FormData = { this.FormData = {

18
pages/tabbar/index/index.vue

@ -117,6 +117,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<u-popup :show="showPrivacy" mode="center" :round="20" > <u-popup :show="showPrivacy" mode="center" :round="20" >
@ -144,42 +145,26 @@
text: '学车报名', text: '学车报名',
icon: require('../../../static/images/indexIcon/entryIcon (3).png'), icon: require('../../../static/images/indexIcon/entryIcon (3).png'),
url: '/pages/indexEntry/enroll/enroll', url: '/pages/indexEntry/enroll/enroll',
goPage: function (){
console.log(666)
// this.$goPage(item.url)
}
}, },
{ {
text: '找驾校', text: '找驾校',
icon: require('../../../static/images/indexIcon/entryIcon (4).png'), icon: require('../../../static/images/indexIcon/entryIcon (4).png'),
url: '/pages/indexEntry/findShcool/findShcool', url: '/pages/indexEntry/findShcool/findShcool',
goPage: (item)=>{
this.$goPage(item.url)
}
}, },
{ {
text: '找教练', text: '找教练',
icon: require('../../../static/images/indexIcon/entryIcon (1).png'), icon: require('../../../static/images/indexIcon/entryIcon (1).png'),
url: '/pages/indexEntry/findCoach/findCoach', url: '/pages/indexEntry/findCoach/findCoach',
goPage: ((item)=>{
this.$goPage(item.url)
})
}, },
{ {
text: '签到签退', text: '签到签退',
icon: require('../../../static/images/indexIcon/entryIcon (5).png'), icon: require('../../../static/images/indexIcon/entryIcon (5).png'),
url: '/pages/indexEntry/signIn/signIn', url: '/pages/indexEntry/signIn/signIn',
goPage: ((item)=>{
this.$u.toast('正在开发中,敬请期待...')
})
}, },
{ {
text: '理论学习', text: '理论学习',
icon: require('../../../static/images/indexIcon/entryIcon (2).png'), icon: require('../../../static/images/indexIcon/entryIcon (2).png'),
url: '/pages/indexEntry/theory/theory', url: '/pages/indexEntry/theory/theory',
goPage: ((item)=>{
this.$goPage(item.url)
})
}, },
], ],
@ -203,7 +188,6 @@
}, },
async onLoad() { async onLoad() {
}, },
onPullDownRefresh() { onPullDownRefresh() {

1
pages/tabbar/mine/index.vue

@ -91,6 +91,7 @@
}, },
goPage(item) { goPage(item) {
if(item.name!='关于我们') { if(item.name!='关于我们') {
// return this.$goPage('/pages/mineEntry/myForecastName/myForecastName')
if(item.name=='我的订单'&&this.vuex_userInfo.applyStep>2&&this.vuex_userInfo.applyStep<6) { if(item.name=='我的订单'&&this.vuex_userInfo.applyStep>2&&this.vuex_userInfo.applyStep<6) {
return this.$goPage('/pages/mineEntry/myForecastName/myForecastName') return this.$goPage('/pages/mineEntry/myForecastName/myForecastName')
} }

38
pages/userCenter/login/login.vue

@ -17,14 +17,16 @@
</view> </view>
</view> </view>
<view class="inputBox my"> <view class="inputBox my">
<u--input placeholder="请输入手机号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
<!-- <u--input placeholder="请输入手机号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone" :holdKeyboard="true" :adjustPosition="false"></u--input> -->
<input v-model="FormData.phone" placeholder="请输入手机号" type="number" maxlength="11" >
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="inputBox my"> <view class="inputBox my">
<u--input placeholder="请输入验证码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.code"></u--input>
<!-- <u--input placeholder="请输入验证码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.code"></u--input> -->
<input type="text" placeholder="请输入验证码" v-model="FormData.code">
</view> </view>
<view class="code" @click='goSms' :class="{active: isPhone&&!codeOn}">{{codeText}}</view>
<view class="code" @click.stop='goSms' :class="{active: isPhone&&!codeOn}">{{codeText}}</view>
</view> </view>
<view class="loginBtn" :class="{active: btnHighlight}" @click="submitFn"> </view> <view class="loginBtn" :class="{active: btnHighlight}" @click="submitFn"> </view>
<view style="margin-top: 40rpx;"> <view style="margin-top: 40rpx;">
@ -50,11 +52,12 @@
FormData: {}, FormData: {},
codeOn: false, codeOn: false,
bgColor: 'transparent', bgColor: 'transparent',
autoBack:'arrow-left'
autoBack:'arrow-left',
redirect: ''
} }
}, },
onLoad(options) { onLoad(options) {
if(options.redirect) this.redirect = options.redirect
this.isCheck = options.isCheck=='true'?true:false this.isCheck = options.isCheck=='true'?true:false
// alert(options.autoBack) // alert(options.autoBack)
if(options.autoBack) this.autoBack = '' if(options.autoBack) this.autoBack = ''
@ -71,10 +74,12 @@
methods: { methods: {
// //
changeRadio(val) { changeRadio(val) {
uni.hideKeyboard();
this.isCheck = val this.isCheck = val
}, },
// //
goSms() { goSms() {
uni.hideKeyboard();
const { const {
FormData FormData
} = this } = this
@ -104,6 +109,7 @@
}, },
async submitFn() { async submitFn() {
uni.hideKeyboard();
if(!this.btnHighlight) return if(!this.btnHighlight) return
if(!this.isCheck) return this.$u.toast('请勾选产品协议与隐私政策'); if(!this.isCheck) return this.$u.toast('请勾选产品协议与隐私政策');
let obj = { let obj = {
@ -113,14 +119,12 @@
const res = await loginSMS(obj) const res = await loginSMS(obj)
this.$store.commit('update_vuex_loginInfo',res.data) this.$store.commit('update_vuex_loginInfo',res.data)
await this.$store.dispatch('getUserInfo') await this.$store.dispatch('getUserInfo')
let login_front = uni.getStorageSync('login_front')
console.log('login_front')
console.log(login_front)
if(login_front) {
if(this.redirect) {
let switchBar = ['/pages/tabbar/index/index', '/pages/tabbar/learnCar/index', '/pages/tabbar/mine/index'] let switchBar = ['/pages/tabbar/index/index', '/pages/tabbar/learnCar/index', '/pages/tabbar/mine/index']
if(switchBar.includes(login_front)) {
if(switchBar.includes(this.redirect)) {
uni.reLaunch({ uni.reLaunch({
url: login_front
url: this.redirect
}) })
}else { }else {
const pages = getCurrentPages(); const pages = getCurrentPages();
@ -153,6 +157,9 @@
min-height: 100vh; min-height: 100vh;
// background: url('../../../static/images/userCenter/loginTopBg.png') no-repeat; // background: url('../../../static/images/userCenter/loginTopBg.png') no-repeat;
// background-size: 100% 360rpx; // background-size: 100% 360rpx;
.uni-input-placeholder {
color: #BBBBBB !important;
}
.u-back-top { .u-back-top {
padding: 32rpx 0 0 0; padding: 32rpx 0 0 0;
.backBox { .backBox {
@ -189,10 +196,19 @@
.inputBox { .inputBox {
flex: 1; flex: 1;
input {
display: block;
width: 100%;
height: 100%;
display: block;
line-height: 112rpx;
font-size: 30rpx;
}
} }
.code { .code {
color: #BBBBBB; color: #BBBBBB;
margin-left: 30rpx; margin-left: 30rpx;
font-size: 30rpx;
&.active { &.active {
color: $themC color: $themC
} }

3
store/modules/user.js

@ -41,10 +41,9 @@ const user = {
if(page!= url) { if(page!= url) {
console.log('当前页面') console.log('当前页面')
console.log(page) console.log(page)
if(page) uni.setStorageSync('login_front', page)
setTimeout(()=>{ setTimeout(()=>{
uni.navigateTo({ uni.navigateTo({
url
url: url+'?redirect='+ page
}) })
},500) },500)

Loading…
Cancel
Save