Commit 1c164044 authored by caimeng's avatar caimeng

FIX:1012 10:41

parent 287b34e0
<script> <script>
import { switchShowTabbar, loadDevice, loadLocation, loadNetwork, loadUuid } from '@/utils/index.js' import { switchShowTabbar, loadDevice, loadLocation, loadNetwork, loadUuid } from '@/utils/index.js'
import config from '@/config/api'
export default { export default {
globalData: {
WebUrl: config['h5']
},
onLaunch: function () { onLaunch: function () {
// 手机型号 // 手机型号
uni.getSystemInfo({ uni.getSystemInfo({
...@@ -37,7 +41,7 @@ export default { ...@@ -37,7 +41,7 @@ export default {
versionNumber = plus.runtime.version; versionNumber = plus.runtime.version;
} }
// 存储所有请求的头部信息 // 存储所有请求的头部信息
uni.setStorage({key: 'm-header-version',data: versionNumber}); uni.setStorage({ key: 'm-header-version', data: versionNumber });
}) })
/*** tabbar*/ /*** tabbar*/
......
...@@ -47,10 +47,10 @@ export default { ...@@ -47,10 +47,10 @@ export default {
...data ...data
}, },
success: (res) => { success: (res) => {
console.log(res, '埋点返回') // console.log(res, '埋点返回')
}, },
fail: (err) => { fail: (err) => {
console.log(err, '埋点报错') // console.log(err, '埋点报错')
} }
}) })
......
...@@ -208,12 +208,7 @@ export default { ...@@ -208,12 +208,7 @@ export default {
console.log('强更了') console.log('强更了')
self.appUpgeadeObj = response self.appUpgeadeObj = response
} }
} }
console.log(response, 'response')
} }
}) })
} }
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
</template> </template>
<script> <script>
import { switchShowTabbar } from '@/utils/index'
export default { export default {
data() { data() {
return { return {
...@@ -69,13 +70,16 @@ export default { ...@@ -69,13 +70,16 @@ export default {
onLoad() { onLoad() {
this.init(); this.init();
}, },
onShow() { async onShow() {
this.init(); this.init();
await switchShowTabbar();
}, },
// 页面下拉刷新 // 页面下拉刷新
async onPullDownRefresh() { async onPullDownRefresh() {
// 初始化设备 // 初始化设备
await this.init() await this.init()
await switchShowTabbar();
setTimeout(() => { setTimeout(() => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
...@@ -95,46 +99,10 @@ export default { ...@@ -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配置页面 // 初始化APP配置页面
initTels() { initTels() {
const self = this const self = this
self.$request('/app/v1/settings', 'GET').then(res => { self.$request('/app/v1/settings', 'GET').then(res => {
console.log(res, 'settings');
const { serviceCall } = res.result const { serviceCall } = res.result
self.serviceCall = serviceCall self.serviceCall = serviceCall
}).catch(err => { }).catch(err => {
...@@ -146,7 +114,6 @@ export default { ...@@ -146,7 +114,6 @@ export default {
initMy() { initMy() {
const self = this const self = this
self.$request('/app/v1/userIndex', 'GET').then(res => { self.$request('/app/v1/userIndex', 'GET').then(res => {
console.log(res, 'userIndex');
const { menuBar, user, baseMenuBar, extMenuBarList } = res.result const { menuBar, user, baseMenuBar, extMenuBarList } = res.result
self.menuBar = menuBar self.menuBar = menuBar
self.menuList = baseMenuBar self.menuList = baseMenuBar
...@@ -185,7 +152,8 @@ export default { ...@@ -185,7 +152,8 @@ export default {
switch (item.title) { switch (item.title) {
case "我的还款": case "我的还款":
this.buryingPoint('app:my_repayment_click') 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; break;
case "申请记录": case "申请记录":
this.buryingPoint('app:my_application_record_click') this.buryingPoint('app:my_application_record_click')
...@@ -228,10 +196,8 @@ export default { ...@@ -228,10 +196,8 @@ export default {
if (item.linkUrl != '') { if (item.linkUrl != '') {
console.log('66', item)
this.Go(item.linkUrl) this.Go(item.linkUrl)
} else { } else {
console.log('67', this.mobileNum, item)
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: this.mobileNum phoneNumber: this.mobileNum
}); });
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
name: "WEB", name: "WEB",
data() { data() {
return { return {
src: api['h5'], src: getApp().globalData.WebUrl,
wv: null, wv: null,
isLogin: token, isLogin: token,
canBack: false, 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) {} ...@@ -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); 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); exports = ___CSS_LOADER_API_IMPORT___(false);
// Module // 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 // Exports
module.exports = 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