Commit 0d421e4d authored by ly's avatar ly

新增一个web

parent b8c4fbee
......@@ -134,7 +134,6 @@ export default {
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 => {
......@@ -182,22 +181,19 @@ export default {
this.Go('uni:/pages/login/login')
},
goBar(item) {
console.log(item.linkUrl,'item')
switch (item.title) {
case "我的还款":
this.buryingPoint('app:my_repayment_click')
const newpath='http://192.168.0.23:8080/index.html#/bill'
uni.setStorageSync('web-src', newpath)
uni.setStorageSync('web-src-title', '账单')
this.Go('uni:/pages/web/websrc')
// this.Go('uni:/pages/web/websrc?src=http://192.168.0.23:8080/index.html#/bill')
uni.navigateTo({
url:`/pages/web/websrc?url=${item.linkUrl}`
})
break;
case "申请记录":
this.buryingPoint('app:my_application_record_click')
const Recordpath='http://192.168.0.23:8080/index.html#/loanRecord'
uni.setStorageSync('web-src', Recordpath)
uni.setStorageSync('web-src-title', '借款记录')
this.Go('uni:/pages/web/websrc')
// this.Go('uni:/pages/web/websrc?src=http://192.168.0.23:8080/index.html#/loanRecord')
uni.navigateTo({
url:`/pages/web/websrc?url=${item.linkUrl}`
})
break;
default:
break;
......
......@@ -90,10 +90,7 @@ export default {
// uni.removeStorageSync('hasRefresh')
},
onShow() {
console.log('WEB show方法')
// if (option.src) {
// this.src = option.src
// }
if (uni.getStorageSync('canRefreshWeb')) {
uni.removeStorageSync('canRefreshWeb')
if (this.wv) {
......
......@@ -74,13 +74,16 @@ export default {
async onLoad(option) {
const newURL=uni.getStorageSync('web-src')
console.log(newURL,'参数555')
const that = this
if (newURL) {
that.src = newURL
if(option.url){
that.src=option.url
}
// const newURL=uni.getStorageSync('web-src')
console.log(option,'参数555')
// if (newURL) {
// that.src = newURL
// }
uni.getStorage({
key: 'm-device-info',
success: function (res) {
......@@ -94,8 +97,8 @@ export default {
},
onShow() {
console.log('WEB show方法')
const newURL=uni.getStorageSync('web-src')
this.src=newURL
// const newURL=uni.getStorageSync('web-src')
// this.src=newURL
if (uni.getStorageSync('canRefreshWeb')) {
uni.removeStorageSync('canRefreshWeb')
if (this.wv) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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