Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uni-app-ddh-shop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
uni-app-ddh-shop
Commits
7b69a037
Commit
7b69a037
authored
Oct 28, 2024
by
caimeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改webview的onload 方法支持接收参数跳转到指定的页面
parent
2a453831
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2688 additions
and
2687 deletions
+2688
-2687
web.vue
pages/web/web.vue
+32
-31
app-config-service.js
unpackage/dist/dev/app-plus/app-config-service.js
+1
-1
app-service.js
unpackage/dist/dev/app-plus/app-service.js
+1254
-1254
app-view.js
unpackage/dist/dev/app-plus/app-view.js
+1399
-1399
manifest.json
unpackage/dist/dev/app-plus/manifest.json
+1
-1
view.umd.min.js
unpackage/dist/dev/app-plus/view.umd.min.js
+1
-1
No files found.
pages/web/web.vue
View file @
7b69a037
...
...
@@ -20,13 +20,13 @@ import api from '@/config/api'
let
reloadTimeOut
=
null
let
token
=
uni
.
getStorageSync
(
'token'
)
console
.
log
(
token
,
'是否登录'
)
console
.
log
(
token
,
'是否登录'
)
export
default
{
name
:
"WEB"
,
data
()
{
return
{
src
:
''
,
src
:
''
,
wv
:
null
,
isLogin
:
token
,
canBack
:
false
,
...
...
@@ -36,7 +36,7 @@ export default {
}
},
deviceStatus
:
''
,
typePage
:
false
,
typePage
:
false
,
};
},
onBackPress
(
e
)
{
...
...
@@ -67,23 +67,23 @@ export default {
// #endif
},
onTabItemTap
(
e
)
{
console
.
log
(
e
,
'tabItemTap'
)
this
.
wv
&&
this
.
wv
.
evalJS
(
`callback({ 'action': 'OnShow' })`
)
},
async
onLoad
(
option
)
{
const
mianH5Url
=
uni
.
getStorageSync
(
'mianH5Url'
)
const
mianH5Url
=
uni
.
getStorageSync
(
'mianH5Url'
)
console
.
log
(
'web onload'
,
option
)
const
that
=
this
if
(
mianH5Url
){
console
.
log
(
mianH5Url
,
'参数666'
)
if
(
option
.
src
)
{
console
.
log
(
option
.
src
,
'参数555'
)
that
.
src
=
option
.
src
}
else
if
(
mianH5Url
)
{
console
.
log
(
mianH5Url
,
'参数666'
)
that
.
src
=
mianH5Url
}
// if (option.src) {
// console.log(option.src,'参数555')
// that.src = option.src
// }
uni
.
getStorage
({
key
:
'm-device-info'
,
success
:
function
(
res
)
{
...
...
@@ -91,6 +91,7 @@ export default {
that
.
deviceStatus
=
device
}
})
},
onHide
()
{
// uni.removeStorageSync('hasRefresh')
...
...
@@ -114,7 +115,7 @@ export default {
}
let
pagearr
=
getCurrentPages
();
//获取应用页面栈
let
currentPage
=
pagearr
[
pagearr
.
length
-
1
];
//获取当前页面信息
console
.
log
(
'option:'
,
currentPage
.
options
)
//获取页面传递的信息
console
.
log
(
'option:'
,
currentPage
.
options
)
//获取页面传递的信息
},
onUnload
()
{
uni
.
$off
(
'loadingSubnvue'
);
//移除监听配置的原生子窗体
...
...
@@ -196,16 +197,16 @@ export default {
},
// 获取用户手机号
GetUserMobile
()
{
const
self
=
this
const
self
=
this
try
{
uni
.
getStorage
({
key
:
'l-mobile'
,
success
:
function
(
res
)
{
console
.
log
(
res
,
'结果'
)
const
mobile
=
res
.
data
;
success
:
function
(
res
)
{
console
.
log
(
res
,
'结果'
)
const
mobile
=
res
.
data
;
self
.
GetWebView
().
evalJS
(
"receiveUserMobile('"
+
mobile
+
"')"
)
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
console
.
log
(
err
,
'报错了'
)
}
})
...
...
@@ -235,24 +236,24 @@ export default {
})
},
//返回方法
GoBack
(
num
){
console
.
log
(
'wori'
)
try
{
const
self
=
this
GoBack
(
num
)
{
console
.
log
(
'wori'
)
try
{
const
self
=
this
uni
.
navigateBack
({
delta
:
num
,
delta
:
num
,
success
(
res
)
{
console
.
log
(
res
,
'9877'
)
self
.
typePage
=
true
console
.
log
(
self
.
typePage
,
'resss'
)
console
.
log
(
res
,
'9877'
)
self
.
typePage
=
true
console
.
log
(
self
.
typePage
,
'resss'
)
}
})
}
catch
(
err
)
{
}
catch
(
err
)
{
this
.
toast
(
'返回失败'
)
console
.
log
(
err
,
'err'
)
console
.
log
(
err
,
'err'
)
}
},
// Toast 提示框
Toast
(
config
)
{
...
...
unpackage/dist/dev/app-plus/app-config-service.js
View file @
7b69a037
var
isReady
=
false
;
var
onReadyCallbacks
=
[];
var
isServiceReady
=
false
;
var
onServiceReadyCallbacks
=
[];
var
__uniConfig
=
{
"pages"
:[
"pages/index/index"
,
"pages/sort/index"
,
"pages/my/index"
,
"pages/recruit/index"
,
"pages/recruitResult/index"
,
"pages/category/category"
,
"pages/application/application"
,
"pages/myneed/myneed"
,
"pages/Ineed/Ineed"
,
"pages/productDetails/productDetails"
,
"pages/detailResult/detailResult"
,
"pages/useFeed/useFeed"
,
"pages/lookGoods/lookGoods"
,
"pages/login/login"
,
"pages/prolist/prolist"
,
"pages/setting/setting"
,
"pages/contact/contact"
,
"pages/web/contact"
,
"pages/webview/webview"
,
"pages/websrc/websrc"
,
"pages/web/web"
,
"pages/web/websrc"
,
"pages/bill/indexs"
,
"pages/finance/index"
,
"pages/app-update/index"
,
"pages/agreement/index"
],
"window"
:{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"backgroundColor"
:
"#F8F8F8"
,
"bounce"
:
"none"
},
"tabBar"
:{
"borderStyle"
:
"white"
,
"color"
:
"#BBBBBB"
,
"selectedColor"
:
"#2263E6"
,
"list"
:[{
"pagePath"
:
"pages/index/index"
,
"iconPath"
:
"/static/tab/indexfh.png"
,
"selectedIconPath"
:
"/static/tab/indexf.png"
,
"text"
:
"首页"
},{
"pagePath"
:
"pages/web/web"
,
"iconPath"
:
"/static/tab/index-h.png"
,
"selectedIconPath"
:
"/static/tab/index.png"
,
"text"
:
"贷款"
},{
"pagePath"
:
"pages/sort/index"
,
"iconPath"
:
"/static/tab/sort-h.png"
,
"selectedIconPath"
:
"/static/tab/sort.png"
,
"text"
:
"分类"
},{
"pagePath"
:
"pages/my/index"
,
"iconPath"
:
"/static/tab/my-h.png"
,
"selectedIconPath"
:
"/static/tab/my.png"
,
"text"
:
"我的"
}]},
"darkmode"
:
false
,
"nvueCompiler"
:
"uni-app"
,
"nvueStyleCompiler"
:
"uni-app"
,
"renderer"
:
"auto"
,
"splashscreen"
:{
"alwaysShowBeforeRender"
:
true
,
"autoclose"
:
false
},
"appname"
:
"多典花"
,
"compilerVersion"
:
"4.2
4
"
,
"entryPagePath"
:
"pages/index/index"
,
"networkTimeout"
:{
"request"
:
60000
,
"connectSocket"
:
60000
,
"uploadFile"
:
60000
,
"downloadFile"
:
60000
}};
var
__uniConfig
=
{
"pages"
:[
"pages/index/index"
,
"pages/sort/index"
,
"pages/my/index"
,
"pages/recruit/index"
,
"pages/recruitResult/index"
,
"pages/category/category"
,
"pages/application/application"
,
"pages/myneed/myneed"
,
"pages/Ineed/Ineed"
,
"pages/productDetails/productDetails"
,
"pages/detailResult/detailResult"
,
"pages/useFeed/useFeed"
,
"pages/lookGoods/lookGoods"
,
"pages/login/login"
,
"pages/prolist/prolist"
,
"pages/setting/setting"
,
"pages/contact/contact"
,
"pages/web/contact"
,
"pages/webview/webview"
,
"pages/websrc/websrc"
,
"pages/web/web"
,
"pages/web/websrc"
,
"pages/bill/indexs"
,
"pages/finance/index"
,
"pages/app-update/index"
,
"pages/agreement/index"
],
"window"
:{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"backgroundColor"
:
"#F8F8F8"
,
"bounce"
:
"none"
},
"tabBar"
:{
"borderStyle"
:
"white"
,
"color"
:
"#BBBBBB"
,
"selectedColor"
:
"#2263E6"
,
"list"
:[{
"pagePath"
:
"pages/index/index"
,
"iconPath"
:
"/static/tab/indexfh.png"
,
"selectedIconPath"
:
"/static/tab/indexf.png"
,
"text"
:
"首页"
},{
"pagePath"
:
"pages/web/web"
,
"iconPath"
:
"/static/tab/index-h.png"
,
"selectedIconPath"
:
"/static/tab/index.png"
,
"text"
:
"贷款"
},{
"pagePath"
:
"pages/sort/index"
,
"iconPath"
:
"/static/tab/sort-h.png"
,
"selectedIconPath"
:
"/static/tab/sort.png"
,
"text"
:
"分类"
},{
"pagePath"
:
"pages/my/index"
,
"iconPath"
:
"/static/tab/my-h.png"
,
"selectedIconPath"
:
"/static/tab/my.png"
,
"text"
:
"我的"
}]},
"darkmode"
:
false
,
"nvueCompiler"
:
"uni-app"
,
"nvueStyleCompiler"
:
"uni-app"
,
"renderer"
:
"auto"
,
"splashscreen"
:{
"alwaysShowBeforeRender"
:
true
,
"autoclose"
:
false
},
"appname"
:
"多典花"
,
"compilerVersion"
:
"4.2
9
"
,
"entryPagePath"
:
"pages/index/index"
,
"networkTimeout"
:{
"request"
:
60000
,
"connectSocket"
:
60000
,
"uploadFile"
:
60000
,
"downloadFile"
:
60000
}};
var
__uniRoutes
=
[{
"path"
:
"/pages/index/index"
,
"meta"
:{
"isQuit"
:
true
,
"isTabBar"
:
true
},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
,
"bounce"
:
"none"
}},{
"path"
:
"/pages/sort/index"
,
"meta"
:{
"isQuit"
:
true
,
"isTabBar"
:
true
},
"window"
:{
"navigationBarTitleText"
:
"款式"
}},{
"path"
:
"/pages/my/index"
,
"meta"
:{
"isQuit"
:
true
,
"isTabBar"
:
true
},
"window"
:{
"enablePullDownRefresh"
:
true
,
"navigationStyle"
:
"custom"
}},{
"path"
:
"/pages/recruit/index"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"鉴定师招聘"
}},{
"path"
:
"/pages/recruitResult/index"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
}},{
"path"
:
"/pages/category/category"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"选择鉴定品类"
}},{
"path"
:
"/pages/application/application"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"我的鉴定申请"
}},{
"path"
:
"/pages/myneed/myneed"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"我需要的"
}},{
"path"
:
"/pages/Ineed/Ineed"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"我需要"
}},{
"path"
:
"/pages/productDetails/productDetails"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"商品详情"
}},{
"path"
:
"/pages/detailResult/detailResult"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
}},{
"path"
:
"/pages/useFeed/useFeed"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"用户反馈"
}},{
"path"
:
"/pages/lookGoods/lookGoods"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
""
}},{
"path"
:
"/pages/login/login"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"登录"
}},{
"path"
:
"/pages/prolist/prolist"
,
"meta"
:{},
"window"
:{
"navigationBarTitleText"
:
"相关协议"
}},{
"path"
:
"/pages/setting/setting"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
"设置"
}},{
"path"
:
"/pages/contact/contact"
,
"meta"
:{},
"window"
:{
"navigationBarTitleText"
:
"通讯录"
,
"enablePullDownRefresh"
:
false
}},{
"path"
:
"/pages/web/contact"
,
"meta"
:{},
"window"
:{
"navigationBarTitleText"
:
"通讯录"
,
"enablePullDownRefresh"
:
false
}},{
"path"
:
"/pages/webview/webview"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
""
}},{
"path"
:
"/pages/websrc/websrc"
,
"meta"
:{},
"window"
:{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}},{
"path"
:
"/pages/web/web"
,
"meta"
:{
"isQuit"
:
true
,
"isTabBar"
:
true
},
"window"
:{
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"navigationBarTitleText"
:
""
}},{
"path"
:
"/pages/web/websrc"
,
"meta"
:{},
"window"
:{
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
}},{
"path"
:
"/pages/bill/indexs"
,
"meta"
:{},
"window"
:{
"navigationBarTitleText"
:
"账单"
}},{
"path"
:
"/pages/finance/index"
,
"meta"
:{},
"window"
:{
"enablePullDownRefresh"
:
true
,
"navigationStyle"
:
"custom"
}},{
"path"
:
"/pages/app-update/index"
,
"meta"
:{},
"window"
:{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
,
"bounce"
:
"none"
,
"animationType"
:
"fade-in"
,
"background"
:
"transparent"
,
"backgroundColor"
:
"rgba(0,0,0,0)"
,
"webviewBGTransparent"
:
true
,
"mask"
:
"none"
}},{
"path"
:
"/pages/agreement/index"
,
"meta"
:{},
"window"
:{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
,
"bounce"
:
"none"
,
"animationType"
:
"fade-in"
,
"background"
:
"transparent"
,
"backgroundColor"
:
"rgba(0,0,0,0)"
,
"webviewBGTransparent"
:
true
,
"mask"
:
"none"
}}];
__uniConfig
.
onReady
=
function
(
callback
){
if
(
__uniConfig
.
ready
){
callback
()}
else
{
onReadyCallbacks
.
push
(
callback
)}};
Object
.
defineProperty
(
__uniConfig
,
"ready"
,{
get
:
function
(){
return
isReady
},
set
:
function
(
val
){
isReady
=
val
;
if
(
!
isReady
){
return
}
const
callbacks
=
onReadyCallbacks
.
slice
(
0
);
onReadyCallbacks
.
length
=
0
;
callbacks
.
forEach
(
function
(
callback
){
callback
()})}});
__uniConfig
.
onServiceReady
=
function
(
callback
){
if
(
__uniConfig
.
serviceReady
){
callback
()}
else
{
onServiceReadyCallbacks
.
push
(
callback
)}};
Object
.
defineProperty
(
__uniConfig
,
"serviceReady"
,{
get
:
function
(){
return
isServiceReady
},
set
:
function
(
val
){
isServiceReady
=
val
;
if
(
!
isServiceReady
){
return
}
const
callbacks
=
onServiceReadyCallbacks
.
slice
(
0
);
onServiceReadyCallbacks
.
length
=
0
;
callbacks
.
forEach
(
function
(
callback
){
callback
()})}});
...
...
unpackage/dist/dev/app-plus/app-service.js
View file @
7b69a037
This diff is collapsed.
Click to expand it.
unpackage/dist/dev/app-plus/app-view.js
View file @
7b69a037
This diff is collapsed.
Click to expand it.
unpackage/dist/dev/app-plus/manifest.json
View file @
7b69a037
This diff is collapsed.
Click to expand it.
unpackage/dist/dev/app-plus/view.umd.min.js
View file @
7b69a037
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment