Commit 42f6008b authored by Facius's avatar Facius

improvement: tab图标,首页跳转

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