Commit 0d421e4d authored by ly's avatar ly

新增一个web

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