|
@@ -3,8 +3,8 @@ Component({
|
|
|
data: {
|
|
|
//默认是2
|
|
|
active: 2,
|
|
|
- isBazi:false,
|
|
|
-
|
|
|
+ isBazi: false,
|
|
|
+
|
|
|
list2: [
|
|
|
{
|
|
|
"pagePath": "/pages/carVideo/index",
|
|
@@ -39,11 +39,17 @@ Component({
|
|
|
"text": "教学视频"
|
|
|
},
|
|
|
{
|
|
|
- "pagePath": "/pages/future/index",
|
|
|
- "iconPath": "/static/imgs/fortune.png",
|
|
|
- "selectedIconPath": "/static/imgs/fortune-active.png",
|
|
|
- "text": "人生报告"
|
|
|
+ "pagePath": "/pages/buyExamTool/index",
|
|
|
+ "iconPath": "/static/imgs/tool.png",
|
|
|
+ "selectedIconPath": "/static/imgs/tool-active.png",
|
|
|
+ "text": "驾考神器"
|
|
|
},
|
|
|
+ // {
|
|
|
+ // "pagePath": "/pages/future/index",
|
|
|
+ // "iconPath": "/static/imgs/fortune.png",
|
|
|
+ // "selectedIconPath": "/static/imgs/fortune-active.png",
|
|
|
+ // "text": "人生报告"
|
|
|
+ // },
|
|
|
{
|
|
|
"pagePath": "/pages/user/index",
|
|
|
"iconPath": "/static/imgs/user.png",
|
|
@@ -51,30 +57,30 @@ Component({
|
|
|
"text": "我的"
|
|
|
}]
|
|
|
},
|
|
|
- attached(){
|
|
|
- let that =this
|
|
|
+ attached() {
|
|
|
+ let that = this
|
|
|
// const baseUrl = wx.getSystemInfoSync().platform === 'devtools' ? 'https://nbjk1.zzxcx.net/nbjk-admin/' : 'https://nbjk.zzxcx.net/nbjk-admin/'
|
|
|
- const baseUrl = wx.getStorageSync("NODE_ENV")==='development'? 'https://nbjk1.zzxcx.net/nbjk-admin/' : 'https://nbjk.zzxcx.net/nbjk-admin/'
|
|
|
-
|
|
|
+ const baseUrl = wx.getStorageSync("NODE_ENV") === 'development' ? 'https://nbjk1.zzxcx.net/nbjk-admin/' : 'https://nbjk.zzxcx.net/nbjk-admin/'
|
|
|
+
|
|
|
wx.request({
|
|
|
- url:baseUrl+"open-api/system/dict/data/configKey/IS_BAZI",
|
|
|
- method:'GET',
|
|
|
- success(res){
|
|
|
-
|
|
|
- if(res.data.data=='1'){
|
|
|
-
|
|
|
+ url: baseUrl + "open-api/system/dict/data/configKey/IS_BAZI",
|
|
|
+ method: 'GET',
|
|
|
+ success(res) {
|
|
|
+
|
|
|
+ if (res.data.data == '1') {
|
|
|
+
|
|
|
that.setData({
|
|
|
- isBazi:true,
|
|
|
-
|
|
|
+ isBazi: true,
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
- else{
|
|
|
+ else {
|
|
|
that.setData({
|
|
|
- isBazi:false,
|
|
|
-
|
|
|
+ isBazi: false,
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|
|
|
})
|
|
@@ -84,10 +90,10 @@ Component({
|
|
|
switchTab(e) {
|
|
|
const data = e.currentTarget.dataset
|
|
|
const url = data.path
|
|
|
-
|
|
|
- if(url=='/pages/future/index'){
|
|
|
+
|
|
|
+ if (url == '/pages/future/index') {
|
|
|
wx.navigateTo({
|
|
|
- url:'/pages/future/index'
|
|
|
+ url: '/pages/future/index'
|
|
|
})
|
|
|
return
|
|
|
|