From 2631dd99db5ef47172257a7734139aa461ff43c4 Mon Sep 17 00:00:00 2001
From: unknown <331404948@qq.com>
Date: Wed, 24 Apr 2024 18:55:14 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E4=B8=8E?=
=?UTF-8?q?=E5=AE=9A=E4=BD=8D=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 39 +++++++--
README.md | 6 ++
common/js/qqLatLng.js | 32 ++++----
config/request.js | 4 +-
config/site.config.js | 4 +-
manifest.json | 23 ++++--
pages.json | 10 ++-
pages/indexEntry/enroll/payment/payh5.vue | 62 ++++++++++++++
pages/indexEntry/enroll/payment/payment.vue | 91 +++++++--------------
pages/indexEntry/enroll/registInfo/registInfo.vue | 2 +-
pages/indexEntry/enroll/signContract/webView.vue | 99 -----------------------
pages/tabbar/index/index.vue | 1 +
pages/tabbar/learnCar/comp/topInfo.vue | 4 +-
pages/tabbar/mine/index.vue | 19 ++++-
store/modules/user.js | 50 +++++++++++-
15 files changed, 243 insertions(+), 203 deletions(-)
create mode 100644 pages/indexEntry/enroll/payment/payh5.vue
delete mode 100644 pages/indexEntry/enroll/signContract/webView.vue
diff --git a/App.vue b/App.vue
index 66440a9..8f48b16 100644
--- a/App.vue
+++ b/App.vue
@@ -1,24 +1,47 @@
-
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index e69de29..31339ec 100644
--- a/README.md
+++ b/README.md
@@ -0,0 +1,6 @@
+
+易收宝对接文档: [](https://docs.qq.com/doc/DSFJKS01tTlVVUkZU)
+
+小程序的appid:wx9e7d9eea420f6541
+
+中原聚端的appid: wxe8bb3f7b8cf30362
\ No newline at end of file
diff --git a/common/js/qqLatLng.js b/common/js/qqLatLng.js
index 3a466f1..33f0d10 100644
--- a/common/js/qqLatLng.js
+++ b/common/js/qqLatLng.js
@@ -65,6 +65,8 @@ KJTencentLocation.setLocationManagerInfo(dic)
export function requestSingleFreshLocation() {
+
+
return new Promise((resolve, reject) => {
console.log(KJTencentLocation.requestSingleFreshLocation)
KJTencentLocation.requestSingleFreshLocation((res) => {
@@ -83,21 +85,21 @@ export function requestSingleFreshLocation() {
}
}
- if(res.location.latitude==0) {
- uni.showModal({
- title: 'app想要获取您的定位权限',
- content: '为了能够获取精确的数据,请去手机设置里手动开启app定位权限',
- showCancel: false,
- confirmText: '知道了,关闭弹窗',
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
+ // if(res.location.latitude==0) {
+ // uni.showModal({
+ // title: 'app想要获取您的定位权限',
+ // content: '为了能够获取精确的数据,请去手机设置里手动开启app定位权限',
+ // showCancel: false,
+ // confirmText: '知道了,关闭弹窗',
+ // success: function (res) {
+ // if (res.confirm) {
+ // console.log('用户点击确定');
+ // } else if (res.cancel) {
+ // console.log('用户点击取消');
+ // }
+ // }
+ // });
+ // }
resolve(res)
});
})
diff --git a/config/request.js b/config/request.js
index eaa1c71..42afb1b 100644
--- a/config/request.js
+++ b/config/request.js
@@ -26,8 +26,8 @@ module.exports = (vm) => {
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
config.data = config.data || {}
// 根据custom参数中配置的是否需要token,添加对应的请求头
- // console.log('--------------')
- // console.log(config)
+ console.log('--------------')
+ console.log(config)
let token = vm.$store.state.user.vuex_loginInfo.accessToken
if(token) {
config.header.Authorization = 'Bearer ' + token
diff --git a/config/site.config.js b/config/site.config.js
index 7dcae32..c6807e2 100644
--- a/config/site.config.js
+++ b/config/site.config.js
@@ -2,8 +2,8 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
- 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://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.54:8099/非代理地址
website: 'http://192.168.1.37',
httpPrefix: 'app-api/',
imgUrl: 'https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/defaultImages/app/bigImg/'
diff --git a/manifest.json b/manifest.json
index b8184c9..44922b9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "洛阳学车",
"appid" : "__UNI__3347C6E",
"description" : "",
- "versionName" : "1.1.5",
- "versionCode" : 115,
+ "versionName" : "1.1.8",
+ "versionCode" : 118,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
@@ -16,13 +16,19 @@
"autoclose" : true,
"delay" : 0
},
+ "permission" : {
+ "scope.userLocation" : {
+ "desc" : "查询用户地理位置,推荐本地驾校,提高用户服务"
+ }
+ },
/* 模块配置 */
"modules" : {
"Maps" : {},
"Barcode" : {},
"Geolocation" : {},
"VideoPlayer" : {},
- "Share" : {}
+ "Share" : {},
+ "Payment" : {}
},
/* 应用发布信息 */
"distribute" : {
@@ -33,6 +39,7 @@
"",
"",
"",
+ "",
"",
"",
"",
@@ -51,8 +58,7 @@
"",
"",
"",
- "",
- ""
+ ""
]
},
/* ios打包配置 */
@@ -91,6 +97,13 @@
"appkey_android" : "3c5fcc5ee6aaba56e4806f3382399c16",
"name" : "amapOV4nNDfa"
}
+ },
+ "payment" : {
+ "weixin" : {
+ "__platform__" : [ "ios", "android" ],
+ "appid" : "wx9e7d9eea420f6541",
+ "UniversalLinks" : ""
+ }
}
}
},
diff --git a/pages.json b/pages.json
index 1e00bbb..3e53cde 100644
--- a/pages.json
+++ b/pages.json
@@ -143,7 +143,6 @@
"backgroundTextStyle": "dark"
}
},
-
{
"path": "enroll/payment/payment",
"style": {
@@ -153,6 +152,13 @@
}
},
{
+ "path": "enroll/payment/payh5",
+ "style": {
+ "navigationBarTitleText": "支付",
+ "backgroundTextStyle": "dark"
+ }
+ },
+ {
"path": "enroll/paymentSuccess/paymentSuccess",
"style": {
"navigationBarTitleText": "报名成功",
@@ -422,7 +428,7 @@
{
"path": "myOrder/voucher/voucher",
"style": {
- "navigationBarTitleText": "培训缴费电子凭证666",
+ "navigationBarTitleText": "培训缴费电子凭证",
// "navigationStyle": "custom",
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
diff --git a/pages/indexEntry/enroll/payment/payh5.vue b/pages/indexEntry/enroll/payment/payh5.vue
new file mode 100644
index 0000000..a6a6fc8
--- /dev/null
+++ b/pages/indexEntry/enroll/payment/payh5.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/indexEntry/enroll/payment/payment.vue b/pages/indexEntry/enroll/payment/payment.vue
index a9cf1de..7ea6496 100644
--- a/pages/indexEntry/enroll/payment/payment.vue
+++ b/pages/indexEntry/enroll/payment/payment.vue
@@ -3,16 +3,16 @@
- 翔力驾校
+ {{schoolName}}
- ¥{{ info.a }}
+ ¥{{ $u.utils.priceTo(amount) }}
-
- 订单金额
+
+
-
@@ -62,7 +63,8 @@
info: {
a: '待对接'
},
- link: ''
+ schoolName: '',
+ amount: '0',
}
},
onLoad(options) {
@@ -74,9 +76,10 @@
this.initWx()
},
onPullDownRefresh() {
- this.getStudentByPayment()
+ // this.getStudentByPayment()
},
methods: {
+
initWx() {
// #ifdef APP-PLUS
plus.share.getServices((s) => {
@@ -93,47 +96,19 @@
});
// #endif
},
- wxPay(data) {
- // const data = {
- // channelNo: 'QD202401250001', //易收宝分配的渠道号
- // encodeData: '', //{"outOrderNo":"15456","timestamp":"1632815312300"},json进行加签加密后的值,outOrderNo商户订单号
- // miniAppName: '', //第三方小程序的名称
- // env: '',// u8、u6为测试环境,prod为生产环境
- // distinctId: '',//第三方小程序的用户唯一标识
- // unionMode: 'miniProToMiniPro', // 微信跳转微信小程序时使用
- // }
-
- // #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({
- miniAppId: 'wx9e7d9eea420f6541', //小程序原始ID
- path: '', //跳转小程序的页面路径,可携带参数
- miniProgramType: '1', //小程序的版本 0正式版 1开发版 2体验版
- }) : plus.nativeUI.alert('当前环境不支持微信操作!');
- // #endif
- },
- async getStudentByPayment() {
+
+ async getStudentByPayment(type) {
+ console.log('来到了这没有')
const {
data: res
} = await pre_create({
trainingApplyId: this.trainingApplyId
})
+ this.amount = res.amount
+ this.schoolName = res.schoolName
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)
-
+ console.log(res)
+ this.param_sign(res.orderNo)
},
// 加密数据
async param_sign(outOrderNo) {
@@ -143,11 +118,12 @@
}
console.log(JSON.stringify(obj))
const {data: res} = await param_sign({jsonParam:JSON.stringify(obj)})
-
+ this.encodeData = res.encodeData
console.log('加密后的数据')
console.log(res.encodeData)
+ this.getYSBLink()
},
- getYSBLink() {
+ async getYSBLink() {
if(!this.encodeData) return this.$u.toast('没有获取到支付信息')
const channelNo = 'QD202404083509';
//common普通的h5平台,如果当前的运行环境为微信小程序则platform的值为pay_miniPro
@@ -159,25 +135,16 @@
// 生产地址
// 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)
+ const payLink = `${preUrl}?encodeData=${this.encodeData}#/checkStandPre?platform=${platform}&channelNo=${channelNo}&checkStand_v3=true&distinctId=${distinctId}`;
+ console.log('payLink')
+ console.log(payLink)
+ this.$store.commit('updateWebVeiwUrl', payLink)
+ this.$goPage('/pages/indexEntry/enroll/payment/payh5')
},
- loadWebView() {
- console.log('会来到vebview事件里吗?')
- this.wxPay()
- },
- paySubmit() {
- console.log('这是什么')
- console.log(this.sweixin)
- this.wxPay()
- // this.$goPage('/pages/indexEntry/enroll/paymentSuccess/paymentSuccess')
- }
+
+
}
}
diff --git a/pages/indexEntry/enroll/registInfo/registInfo.vue b/pages/indexEntry/enroll/registInfo/registInfo.vue
index 47ea5c1..5360a12 100644
--- a/pages/indexEntry/enroll/registInfo/registInfo.vue
+++ b/pages/indexEntry/enroll/registInfo/registInfo.vue
@@ -279,7 +279,7 @@
finishSubjectName: '',//已过显示文字
waitSubjectName: '',//待学科目显示文字
waitSubject: '',//待学科目
- photoPath: '',
+ photoPath: 'https://lyjp-bucket-main.oss-cn-beijing.aliyuncs.com/985114ca01ff35554333927a5d1d52883d3ad21301caac4b637df56169b2c916.png',
address: '',
totalAmount: 0,
transfer: 2, //是否异地
diff --git a/pages/indexEntry/enroll/signContract/webView.vue b/pages/indexEntry/enroll/signContract/webView.vue
deleted file mode 100644
index 3b2a0ed..0000000
--- a/pages/indexEntry/enroll/signContract/webView.vue
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/tabbar/index/index.vue b/pages/tabbar/index/index.vue
index 9a9f0ed..32bfff5 100644
--- a/pages/tabbar/index/index.vue
+++ b/pages/tabbar/index/index.vue
@@ -210,6 +210,7 @@
this.initApi()
},
onShow() {
+
// if(!this.vuex_cityInfo.lat) {
// this.$store.dispatch('getCity')
// }
diff --git a/pages/tabbar/learnCar/comp/topInfo.vue b/pages/tabbar/learnCar/comp/topInfo.vue
index 74e5ba4..f79b5b9 100644
--- a/pages/tabbar/learnCar/comp/topInfo.vue
+++ b/pages/tabbar/learnCar/comp/topInfo.vue
@@ -2,7 +2,9 @@
-
+
+
+
diff --git a/pages/tabbar/mine/index.vue b/pages/tabbar/mine/index.vue
index 6184439..6842687 100644
--- a/pages/tabbar/mine/index.vue
+++ b/pages/tabbar/mine/index.vue
@@ -4,7 +4,9 @@
-
+
+
+
@@ -69,7 +71,7 @@
{name: '学时查询', icon: require('@/static/images/mineIcon/minIcon (4).png'),url: '/pages/mineEntry/carLearnHours/carLearnHours'},
{name: '我的评价', icon: require('@/static/images/mineIcon/minIcon (1).png'),url: '/pages/mineEntry/myEvaluate/myEvaluate'},
// {name: '退款申请', icon: require('@/static/images/mineIcon/minIcon (3).png'),url: '/pages/mineEntry/refund/refund'},
- {name: '变更车型', icon: require('@/static/images/mineIcon/minIcon (7).png'),url: '/pages/mineEntry/modelChange/modelChange'},
+ // {name: '变更车型', icon: require('@/static/images/mineIcon/minIcon (7).png'),url: '/pages/mineEntry/modelChange/modelChange'},
{name: '同城转校', icon: require('@/static/images/mineIcon/minIcon (5).png'),url: '/pages/mineEntry/schoolTransfer/schoolTransfer'},
// {name: '退款申请记录', icon: require('@/static/images/mineIcon/minIcon (6).png'),url: ''},
{name: '关于我们', icon: require('@/static/images/mineIcon/minIcon (2).png'),url: '/pages/mineEntry/aboutUs/aboutUs'},
@@ -92,8 +94,17 @@
if(item.name=='我的订单'&&this.vuex_userInfo.applyStep>2&&this.vuex_userInfo.applyStep<6) {
return this.$goPage('/pages/mineEntry/myForecastName/myForecastName')
}
- if(this.vuex_userInfo.applyStep!=6) {
- return this.$u.toast('您还未报名驾校')
+ // if(this.vuex_userInfo.applyStep!=6) {
+ // return this.$u.toast('您还未报名驾校')
+ // }
+ if(item.name=='同城转校') {
+ uni.showModal({
+ content: '请在原驾校退学后至新驾校报名!',
+ success:(res)=> {
+ if(res.confirm) this.$goPage(item.url)
+ }
+ })
+ return false
}
}
this.$goPage(item.url)
diff --git a/store/modules/user.js b/store/modules/user.js
index 28e0104..9e94cf4 100644
--- a/store/modules/user.js
+++ b/store/modules/user.js
@@ -179,8 +179,9 @@ function getCityInfo(resolve, reject, commit) {
let result = res.location
if(result.latitude===0) {
console.log('gogogo来了吗?')
+ // openGps()
// uni.getLocation({
- // type: 'wgs84',
+ // // type: 'wgs84',
// type: 'gcj02',
// success: function(res) {
// console.log('只为弹出权限当前位置的经度:' + res.longitude);
@@ -220,4 +221,49 @@ function getCityInfo(resolve, reject, commit) {
})
}
-}
\ No newline at end of file
+}
+
+ function openGps(){
+ plus.android.requestPermissions(
+ ['android.permission.ACCESS_FINE_LOCATION'],
+ function(resultObj) {
+ var result = 0;
+ for (var i = 0; i < resultObj.granted.length; i++) {
+ var grantedPermission = resultObj.granted[i];
+ console.log('已获取的权限:' + grantedPermission);
+ result = 1
+ }
+ for (var i = 0; i < resultObj.deniedPresent.length; i++) {
+ var deniedPresentPermission = resultObj.deniedPresent[i];
+ console.log('拒绝本次申请的权限:' + deniedPresentPermission);
+ result = 0
+ }
+ for (var i = 0; i < resultObj.deniedAlways.length; i++) {
+ var deniedAlwaysPermission = resultObj.deniedAlways[i];
+ console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
+ result = -1
+ }
+ // 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
+ if (result != 1) {
+ //如果用户第一次拒绝后,跳转到**应用**的权限页面
+ var Intent = plus.android.importClass("android.content.Intent");
+ var Settings = plus.android.importClass("android.provider.Settings");
+ var Uri = plus.android.importClass("android.net.Uri");
+ var mainActivity = plus.android.runtimeMainActivity();
+ var intent = new Intent();
+ intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+ var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
+ intent.setData(uri);
+ mainActivity.startActivity(intent);
+ }
+ },
+ function(error) {
+ console.log('申请权限错误:' + error.code + " = " + error.message);
+ resolve({
+ code: error.code,
+ message: error.message
+ });
+ }
+ );
+ }
+