Commit fad14374 authored by Facius's avatar Facius

improvement: 支付

parent 2b46ef27
const UNI_APP = { const UNI_APP = {
apiUrl: 'http://192.168.0.208:8760', apiUrl: 'http://192.168.0.204:8760',
qn_base_url: 'https://qn-static.banshouhui.com/study/', qn_base_url: 'https://qn-static.banshouhui.com/study/',
qn_asset_url: 'http://deudn.c.pp.cc/', qn_asset_url: 'http://deudn.c.pp.cc/',
uCenterUrl: 'http://192.168.0.5:8093/', //'http://rest-u.yunya.com/' uCenterUrl: 'http://192.168.0.5:8093/', //'http://rest-u.yunya.com/'
......
...@@ -152,6 +152,16 @@ ...@@ -152,6 +152,16 @@
"disableScroll": true "disableScroll": true
} }
}, },
{
"path": "detail",
"name": "learnDetail",
"style": {
"navigationBarTitleText": "", // 题库详情绑卡首页
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{ {
"path": "beginAnswer", "path": "beginAnswer",
"name": "learnBeginAnswer", "name": "learnBeginAnswer",
......
...@@ -367,6 +367,14 @@ export default { ...@@ -367,6 +367,14 @@ export default {
}) })
}, },
handleClickItem(key) { handleClickItem(key) {
this.$u.route({
url: 'pages/learn/detail',
params: {
relationId: this.relationId,
id: this.info.id,
},
})
return
if (this.info.id) { if (this.info.id) {
// 跳转到学练记录 // 跳转到学练记录
this.$u.route({ this.$u.route({
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
data() { data() {
return { return {
relationId: 0, // 绑卡用 relationId: 0, // 绑卡用
info: {} realPrice: null,
} }
}, },
...@@ -81,6 +81,9 @@ export default { ...@@ -81,6 +81,9 @@ export default {
if (e && e.relationId) { if (e && e.relationId) {
this.relationId = e.relationId this.relationId = e.relationId
} }
if (e && e.relationId) {
this.realPrice = e.realPrice
}
}, },
methods: { methods: {
handleClick() { handleClick() {
...@@ -101,12 +104,13 @@ export default { ...@@ -101,12 +104,13 @@ export default {
}) })
}, },
handleClickBuy() { handleClickBuy() {
if (this.realPrice == null) return
const lists = [ const lists = [
{ {
questionWarehouseId: this.questionWarehouseId, questionWarehouseId: this.questionWarehouseId,
amount: this.info.discount, amount: this.realPrice,
count: 1, count: 1,
} },
] ]
const data = { const data = {
instrtutionId: getApp().globalData.orgId, instrtutionId: getApp().globalData.orgId,
......
...@@ -96,14 +96,7 @@ export default { ...@@ -96,14 +96,7 @@ export default {
relationId: 0, // 绑卡用 relationId: 0, // 绑卡用
info: { info: {
questionWarehouse: {}, questionWarehouse: {},
title: '高处安装、维护、拆除作业人员题库', },
money: 80.0,
discount: 30.0,
singleChoice: 128,
multipleChoice: 322,
trueOrFalse: 526,
total: 986,
}
} }
}, },
...@@ -202,6 +195,7 @@ export default { ...@@ -202,6 +195,7 @@ export default {
url: 'pages/learn/boundQuestions', url: 'pages/learn/boundQuestions',
params: { params: {
relationId: this.relationId, relationId: this.relationId,
realPrice: this.info.questionWarehouse.realPrice,
}, },
}) })
}, },
...@@ -209,9 +203,9 @@ export default { ...@@ -209,9 +203,9 @@ export default {
const lists = [ const lists = [
{ {
questionWarehouseId: this.questionWarehouseId, questionWarehouseId: this.questionWarehouseId,
amount: this.info.discount, amount: this.info.questionWarehouse.realPrice,
count: 1, count: 1,
} },
] ]
const data = { const data = {
instrtutionId: getApp().globalData.orgId, instrtutionId: getApp().globalData.orgId,
...@@ -317,7 +311,7 @@ export default { ...@@ -317,7 +311,7 @@ export default {
.message-view { .message-view {
color: #9ea5bb; color: #9ea5bb;
font-size: 26rpx; font-size: 26rpx;
margin: 16rpx 24rpx 30rpx 24rpx; margin: 16rpx 30rpx 30rpx 30rpx;
} }
.tip-view { .tip-view {
background-color: rgba(41, 83, 255, 0.1); background-color: rgba(41, 83, 255, 0.1);
...@@ -326,7 +320,7 @@ export default { ...@@ -326,7 +320,7 @@ export default {
border-radius: 4rpx; border-radius: 4rpx;
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
padding-left: 14rpx; padding: 0 30rpx;
margin: 0 24rpx; margin: 0 24rpx;
} }
...@@ -334,7 +328,7 @@ export default { ...@@ -334,7 +328,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin: 40rpx 24rpx 50rpx 34rpx; margin: 40rpx 30rpx 50rpx 30rpx;
.left-view { .left-view {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment