Commit 42f6008b authored by Facius's avatar Facius

improvement: tab图标,首页跳转

parent d58c747f
...@@ -262,20 +262,20 @@ ...@@ -262,20 +262,20 @@
"list": [ "list": [
{ {
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/logo.png", "iconPath": "static/tab/tiku0.png",
"selectedIconPath": "static/logo.png", "selectedIconPath": "static/tab/tiku1.png",
"text": "题库" "text": "题库"
}, },
{ {
"pagePath": "pages/index/cert", "pagePath": "pages/index/cert",
"iconPath": "static/logo.png", "iconPath": "static/tab/zhengshu0.png",
"selectedIconPath": "static/logo.png", "selectedIconPath": "static/tab/zhengshu1.png",
"text": "证书" "text": "证书"
}, },
{ {
"pagePath": "pages/index/mine", "pagePath": "pages/index/mine",
"iconPath": "static/logo.png", "iconPath": "static/tab/wode0.png",
"selectedIconPath": "static/logo.png", "selectedIconPath": "static/tab/wode1.png",
"text": "我的" "text": "我的"
} }
] ]
......
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
:border-bottom="false" :border-bottom="false"
title-bold title-bold
:is-back="false" :is-back="false"
><slot
><image
:src="quanbutikuImage"
class="left-image"
@click="handleClickLeftTop"
></image></slot
></u-navbar> ></u-navbar>
<view class="content"> <view class="content">
<view class="exam-title-view" @click="$u.throttle(handleSelect, 500)"> <view class="exam-title-view" @click="$u.throttle(handleSelect, 500)">
...@@ -118,6 +124,9 @@ export default { ...@@ -118,6 +124,9 @@ export default {
mokaodashiImage() { mokaodashiImage() {
return process.uniEnv.qn_base_url + 'mokaodashi.png' return process.uniEnv.qn_base_url + 'mokaodashi.png'
}, },
quanbutikuImage() {
return process.uniEnv.qn_base_url + 'quanbutiku.png'
},
marks() { marks() {
return [ return [
{ {
...@@ -242,6 +251,11 @@ export default { ...@@ -242,6 +251,11 @@ export default {
this.show = true this.show = true
} }
}, },
handleClickLeftTop() {
this.$u.route({
url: 'pages/learn/selectCategory',
})
},
handleClickToast(type) { handleClickToast(type) {
var str = type == 'select' ? 'addExam' : 'detail' var str = type == 'select' ? 'addExam' : 'detail'
...@@ -264,6 +278,9 @@ export default { ...@@ -264,6 +278,9 @@ export default {
// 点击了全部试题 // 点击了全部试题
} else { } else {
// 点击了模拟考试 // 点击了模拟考试
this.$u.route({
url: 'pages/learn/beginAnswer',
})
} }
}, },
handleClick(path) { handleClick(path) {
...@@ -308,6 +325,11 @@ export default { ...@@ -308,6 +325,11 @@ export default {
background-image: linear-gradient(to top, #f8fafd 0%, #e9f3ff 50%); background-image: linear-gradient(to top, #f8fafd 0%, #e9f3ff 50%);
background-size: 100% 520rpx; background-size: 100% 520rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
.left-image {
width: 32rpx;
height: 32rpx;
margin-left: 22rpx;
}
.content { .content {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
......
...@@ -183,8 +183,8 @@ export default { ...@@ -183,8 +183,8 @@ export default {
onLoad() {}, onLoad() {},
methods: { methods: {
handleClick() { handleClick() {
uni.switchTab({ this.$u.route({
url: '/pages/index/index', url: 'pages/learn/boundQuestions',
}) })
}, },
handleClickBuy() { handleClickBuy() {
...@@ -221,20 +221,20 @@ export default { ...@@ -221,20 +221,20 @@ export default {
}, },
checkPayStatus(no) { checkPayStatus(no) {
const params = { const params = {
outTradeNo: no outTradeNo: no,
} }
this.$u.api.payQuery(params).then(res => { this.$u.api.payQuery(params).then((res) => {
if (res.trade_state === 'SUCCESS') { if (res.trade_state === 'SUCCESS') {
this.$u.toast('支付成功') this.$u.toast('支付成功')
} else if (res.trade_state === 'NOTPAY') { } else if (res.trade_state === 'NOTPAY') {
this.$u.toast('请稍后核实订单状态,不要重复发起支付') this.$u.toast('请稍后核实订单状态,不要重复发起支付')
} else if (res.trade_state === 'PAYERROR') { } else if (res.trade_state === 'PAYERROR') {
this.$u.toast('支付失败') this.$u.toast('支付失败')
} else { } else {
this.$u.toast(res.trade_state_desc) this.$u.toast(res.trade_state_desc)
} }
}) })
} },
}, },
} }
</script> </script>
......
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