Commit 1c164044 authored by caimeng's avatar caimeng

FIX:1012 10:41

parent 287b34e0
<script>
import { switchShowTabbar, loadDevice, loadLocation, loadNetwork, loadUuid } from '@/utils/index.js'
import config from '@/config/api'
export default {
globalData: {
WebUrl: config['h5']
},
onLaunch: function () {
// 手机型号
uni.getSystemInfo({
......@@ -37,7 +41,7 @@ export default {
versionNumber = plus.runtime.version;
}
// 存储所有请求的头部信息
uni.setStorage({key: 'm-header-version',data: versionNumber});
uni.setStorage({ key: 'm-header-version', data: versionNumber });
})
/*** tabbar*/
......
......@@ -47,10 +47,10 @@ export default {
...data
},
success: (res) => {
console.log(res, '埋点返回')
// console.log(res, '埋点返回')
},
fail: (err) => {
console.log(err, '埋点报错')
// console.log(err, '埋点报错')
}
})
......
......@@ -208,12 +208,7 @@ export default {
console.log('强更了')
self.appUpgeadeObj = response
}
}
console.log(response, 'response')
}
})
}
......
......@@ -55,6 +55,7 @@
</template>
<script>
import { switchShowTabbar } from '@/utils/index'
export default {
data() {
return {
......@@ -69,13 +70,16 @@ export default {
onLoad() {
this.init();
},
onShow() {
async onShow() {
this.init();
await switchShowTabbar();
},
// 页面下拉刷新
async onPullDownRefresh() {
// 初始化设备
await this.init()
await switchShowTabbar();
setTimeout(() => {
uni.stopPullDownRefresh();
......@@ -95,46 +99,10 @@ export default {
}
},
// 显示隐藏tabBar
switchShowTabbar() {
const token = uni.getStorageSync('token')
if (!token) {
console.log(token, 'tokentab')
uni.setTabBarItem({
index: 1,
visible: false
})
} else {
const self = this
self.$request('/pawn/setting/other/switch/loan', 'GET').then(res => {
const { data } = res.result
if (res.code == 200 && data == true) {
try {
console.log(data, '显示')
uni.setTabBarItem({
index: 1,
text: '贷款',
visible: true,
})
} catch (error) {
console.log(error);
}
} else {
console.log(data, '隐藏')
uni.setTabBarItem({
index: 1,
visible: false
})
}
})
}
},
// 初始化APP配置页面
initTels() {
const self = this
self.$request('/app/v1/settings', 'GET').then(res => {
console.log(res, 'settings');
const { serviceCall } = res.result
self.serviceCall = serviceCall
}).catch(err => {
......@@ -146,7 +114,6 @@ export default {
initMy() {
const self = this
self.$request('/app/v1/userIndex', 'GET').then(res => {
console.log(res, 'userIndex');
const { menuBar, user, baseMenuBar, extMenuBarList } = res.result
self.menuBar = menuBar
self.menuList = baseMenuBar
......@@ -185,7 +152,8 @@ export default {
switch (item.title) {
case "我的还款":
this.buryingPoint('app:my_repayment_click')
this.Go('uni:/pages/web/web?src=http://ddang-h5-s.rockstect.cn/index.html#/bill', 'tab')
getApp().globalData.WebUrl = "http://ddang-h5-s.rockstect.cn/index.html#/bill"
this.Go('uni:/pages/web/web', 'tab')
break;
case "申请记录":
this.buryingPoint('app:my_application_record_click')
......@@ -228,10 +196,8 @@ export default {
if (item.linkUrl != '') {
console.log('66', item)
this.Go(item.linkUrl)
} else {
console.log('67', this.mobileNum, item)
uni.makePhoneCall({
phoneNumber: this.mobileNum
});
......
......@@ -26,7 +26,7 @@ export default {
name: "WEB",
data() {
return {
src: api['h5'],
src: getApp().globalData.WebUrl,
wv: null,
isLogin: token,
canBack: false,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -9143,7 +9143,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10);
exports = ___CSS_LOADER_API_IMPORT___(false);
// Module
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*每个页面公共css */\n", ""]);
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*每个页面公共css */\n", ""]);
// Exports
module.exports = exports;
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