Commit 05730bce authored by ly's avatar ly

多典花

parent 5ed32c4b
No preview for this file type
<script>
import { convertPromise } from './utils/header.js'
import Permission from '@/js_sdk/wa-permission/permission'
import { SelectLocation } from "./utils/authPerission";
import { switchShowTabbar } from './utils/filters'
export default {
onLaunch: function() {
/*** tabbar*/
switchShowTabbar()
//禁止横屏
plus.screen.lockOrientation("portrait-primary")
const common = uni.getStorageSync("m-header-device")
......@@ -38,7 +41,13 @@
const self=this
// let realVersion = '109';//这里是热更新的版本号,依次累加,(后端要比这里的版本号大)
plus.runtime.getProperty(plus.runtime.appid,function(widgetInfo){
let currentVersion = widgetInfo.version.replace(/\./g, ""); //获取当前版本号
let currentVersion //获取当前版本号= widgetInfo.version.replace(/\./g, "");
if(wgtinfo.version){
currentVersion = wgtinfo.version;
}else{
currentVersion = plus.runtime.version;
}
console.log(currentVersion,'currentVersion')
self.$request('/app/v1/checkVersions','GET').then(res=>{
console.log(res,'appvue')
const { versionInfo }=res.result
......
......@@ -2,10 +2,10 @@
<view class='p-tabber'>
<view class="dock">
<view class="dock-tabbar">
<view v-for="(item,index) in tabBarList" :key="index" @click="selectTab(index,item.pagePath)">
<view v-for="(item,index) in tabBarList" :key="item.id" @click="selectTab(item)">
<view class="itemView" >
<image :src="current==index?item.selectedIconPath:item.iconPath"></image>
<label :class="current==index?'selectTab':'noSelectTab'">{{item.text}}</label>
<image :src="current==item.id ?item.selectedIconPath:item.iconPath"></image>
<label :class="current==item.id ?'selectTab':'noSelectTab'">{{item.text}}</label>
</view>
</view>
......@@ -30,16 +30,24 @@
"selectedIconPath": "/static/tab/indexf.png",
"text": "首页"
},
{
"id":1,
// "pagePath": "uni:/pages/webHview/index",
"pagePath": "uni:/pages/indexfinance/index",
"iconPath": "/static/tab/index-h.png",
"selectedIconPath": "/static/tab/index.png",
"text": "贷款"
},
{
"id":2,
"pagePath": "uni:/pages/bill/index",
"iconPath": "/static/tab/billh.png",
"selectedIconPath": "/static/tab/bill.png",
"text": "账单"
},
{
"id":2,
"id":3,
"pagePath": "uni:/pages/my/index",
"iconPath": "/static/tab/my-h.png",
"selectedIconPath": "/static/tab/my.png",
......@@ -49,17 +57,24 @@
};
},
onLoad(option) {
console.log(current,'current')
},
methods:{
selectTab(e,url){
this.selectTabId = e
console.log(this.selectTabId,url,'999')
this.Go(url,'launch')
// this.Go(url,'redirect')
// uni.reLaunch(url)
selectTab(item){
this.selectTabId = item.id
// const indexs=item.pagePath.indexOf(":")
// if(indexs!==-1){
// const schema = item.pagePath.substring(0, indexs)
// if(schema=='uni'){
// this.Go(item.pagePath,'launch')
// }else{
// uni.navigateTo({
// url:`/pages/websrc/websrc?url=${item.pagePath}`
// })
// }
// }
// console.log(this.selectTabId ,item,'999')
this.Go(item.pagePath,'launch')
}
}
}
......@@ -68,7 +83,7 @@
<style lang="less" scoped>
.p-tabber{
width: 100vw;
height: 100vh;
// height: 100vh;
background: #F7FAFF;
.dock {
......
......@@ -12,6 +12,16 @@
}
}
},
{
"path": "pages/webHview/index",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"app-plus": {
"bounce": "none"
}
}
},
{
"path": "pages/sort/index",
"style": {
......@@ -261,9 +271,7 @@
{
"path": "pages/web/web",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationStyle": "custom"
}
},
{
......@@ -290,7 +298,40 @@
}
}
],
"tabBar": {
"borderStyle": "white",
"color": "#BBBBBB",
"selectedColor": "#2263E6",
"iconWidth": "24px",
"height": "52px",
"fontSize": "12px",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "/static/tab/indexfh.png",
"selectedIconPath": "/static/tab/indexf.png",
"text": "首页"
},
{
"pagePath": "pages/webHview/index",
"iconPath": "/static/tab/index-h.png",
"selectedIconPath": "/static/tab/index.png",
"text": "贷款"
},
{
"pagePath": "pages/bill/index",
"iconPath": "/static/tab/billh.png",
"selectedIconPath": "/static/tab/bill.png",
"text": "账单"
},
{
"pagePath": "pages/my/index",
"iconPath": "/static/tab/my-h.png",
"selectedIconPath": "/static/tab/my.png",
"text": "我的"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
......
No preview for this file type
......@@ -46,8 +46,7 @@
<view class='n-text'>目前还没有账单哦~</view>
<view class='n-btn' v-show="tokenShow==''" @click="goLoan">去登录</view>
</view>
<view-tabbar :current='1'/>
<!-- <pyh-tab></pyh-tab> -->
<!-- <view-tabbar :current='2'/> -->
</view>
</template>
......
......@@ -67,8 +67,7 @@
</scroll-view>
</view>
</view>
<view-tabbar :current='0'/>
<!-- <pyh-tab></pyh-tab> -->
<!-- <view-tabbar :current='0'/> -->
</view>
</template>
......@@ -122,6 +121,7 @@
},
onLoad() {
const token=uni.getStorageSync('token')
const common = uni.getStorageSync("m-header-device")
this.token=token
......
......@@ -51,6 +51,7 @@
</view>
</view>
<view class='i-footer-text'>理性借贷 合理消费</view>
<!-- <view-tabbar :current='1'/> -->
</view>
</template>
......
......@@ -51,8 +51,7 @@
<view class='footer-tips'>理性借贷 合理消费</view>
</view>
</view>
<view-tabbar :current='2'/>
<!-- <pyh-tab></pyh-tab> -->
<!-- <view-tabbar :current='3'/> -->
</view>
</template>
......
<template>
<view class="page-web">
<view class='web-header' v-if="showNavBar">{{2}}</view>
<web-view ref='webview' :webview-styles="webviewStyles" @message="handleMessage" :src="src"></web-view>
<view-tabbar :current='1'/>
</view>
</template>
......@@ -14,8 +14,8 @@
data() {
return {
// src:'http://192.168.0.38:8081/index.html#/middle?type=mieye&',
src:null,
src:'http://ddhdctest.yyhock.com/#/loan',
// src:null,
webviewStyles: {
progress: {
color: '#FF4050'
......
<template>
<view class="container">
<web-view :src="webViewUrl"></web-view>
<view-tabbar :current='1'/>
</view>
</template>
<script>
export default {
data() {
return {
webViewUrl: 'http://ddhdctest.yyhock.com/#/loan'
};
}
}
</script>
<style>
/* 样式可根据需要调整 */
.container {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
import Vue from "vue";
// import { switchTabbar } from '@/api/other'
export function switchShowTabbar() {
const token=uni.getStorageSync('token')
if (!token) {
console.log(token,'token')
uni.setTabBarItem({
index: 1,
visible: false
})
} else {
console.log(token,'token2')
switchTabbar().then(res => {
if (res.data.code === 200 && res.data.result) {
try {
uni.setTabBarItem({
index: 1,
text: '贷款',
visible: true,
})
} catch (error) {
console.log(error);
}
} else {
uni.setTabBarItem({
index: 1,
visible: false
})
}
})
}
}
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