Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
fc9e3a70
Commit
fc9e3a70
authored
Jan 04, 2023
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
原生订单详情页
parent
cbba0fca
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
1 deletions
+110
-1
src/app.json
+2
-1
src/pages/order/index.vue
+97
-0
src/pages/order/main.js
+5
-0
src/pages/order/main.json
+2
-0
src/pages/wxArticle/index.vue
+4
-0
No files found.
src/app.json
View file @
fc9e3a70
...
...
@@ -19,7 +19,8 @@
"pages/memberCode/main"
,
"pages/toMini/main"
,
"pages/paySuccess/main"
,
"pages/stateAccountList/main"
"pages/stateAccountList/main"
,
"pages/order/main"
],
"subPackages"
:
[
{
...
...
src/pages/order/index.vue
0 → 100644
View file @
fc9e3a70
<!-- 原生订单页面 -->
<
template
>
<div
class=
"order"
>
<web-view
v-if=
"showPage"
:src=
"newPageUrl"
@
message=
"getMessage"
@
error=
"handleError"
@
load=
"handleLoad"
></web-view>
</div>
</
template
>
<
script
type=
"text/ecmascript-6"
>
let
forUrlAddKey
=
require
(
"mayi-front-tools/forUrlAddKey"
).
default
;
import
{
serialize
,
getQueryVariable
,
DFSImg
}
from
"@/utils/index"
;
const
app
=
getApp
();
const
{
log
}
=
app
;
export
default
{
name
:
"order"
,
data
()
{
return
{
showPage
:
false
,
newPageUrl
:
""
,
shopId
:
this
.
$store
.
state
.
mixid
,
baseUrl
:
process
.
env
.
BASE_URL
,
page
:
"/order/orderList"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
`&native_test=1`
,
}
},
components
:
{},
computed
:
{
pageUrl
()
{
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
params
+=
`&sessionid=
${
wx
.
getStorageSync
(
"sessionid"
)}
`
;
}
if
(
wx
.
getStorageSync
(
"enterpriseAccount"
))
{
this
.
params
+=
`&enterpriseAccount=
${
wx
.
getStorageSync
(
"enterpriseAccount"
)}
`
;
}
console
.
log
(
this
.
baseUrl
,
'======='
,
this
.
page
,
'++++++++++++++'
,
this
.
params
,
'************'
)
let
pageUrl1
=
(
this
.
page
.
startsWith
(
'http://'
)
||
this
.
page
.
startsWith
(
'https://'
))
?
(
this
.
page
+
this
.
params
)
:
this
.
baseUrl
+
this
.
page
+
this
.
params
console
.
log
(
pageUrl1
,
'--------pageUrl1--'
)
let
pageUrl
=
forUrlAddKey
(
decodeURIComponent
(
pageUrl1
));
console
.
log
(
pageUrl
,
'--------pageUrl'
)
return
pageUrl
;
},
},
watch
:
{
pageUrl
()
{
console
.
log
(
wx
.
getStorageSync
(
"sessionid"
),
'--wx.getStorageSync("sessionid")'
)
this
.
newPageUrl
=
this
.
pageUrl
;
},
},
created
()
{
},
mounted
()
{
},
onLoad
(
options
)
{
this
.
newPageUrl
=
this
.
pageUrl
;
console
.
log
(
this
.
newPageUrl
,
wx
.
getStorageSync
(
"sessionid"
),
'----------------------52'
)
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
showPage
=
true
;
}
else
{
// 跳转到登录
let
backUrl
=
`/pages/order/main`
;
const
url
=
`/pages/login/main?back=
${
encodeURIComponent
(
backUrl
)}
&hideBack=1`
;
wx
.
navigateTo
({
url
:
url
});
}
},
onShow
()
{
console
.
log
(
'order页面------onShow'
)
log
.
info
(
'order页面------onShow'
)
},
methods
:
{
getMessage
(
res
)
{
console
.
log
(
res
,
'----------------23'
)
},
//加载成功
handleLoad
()
{
log
.
info
(
'网页加载成功'
);
},
handleError
(
data
)
{
log
.
info
(
'handleError'
,
data
)
wx
.
showLoading
({
title
:
"网页加载失败 请右上角刷新"
});
this
.
$mpAnalytics
.
recordError
({
data
,
extendsInfo
:
{
mixid
:
this
.
$store
.
state
.
mixid
||
null
}
});
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.order
{}
</
style
>
src/pages/order/main.js
0 → 100644
View file @
fc9e3a70
import
Vue
from
'vue'
import
App
from
'./index'
const
app
=
new
Vue
(
App
)
app
.
$mount
()
src/pages/order/main.json
0 → 100644
View file @
fc9e3a70
{}
\ No newline at end of file
src/pages/wxArticle/index.vue
View file @
fc9e3a70
...
...
@@ -203,7 +203,11 @@ export default {
if
(
this
.
link
.
includes
(
'$%7Btoken%7D'
)
&&
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
getSsoBcakUrl
(
decodeURIComponent
(
this
.
link
));
}
if
((
!
this
.
link
.
includes
(
'sessionid'
))
&&
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
link
+=
`
${
this
.
link
.
includes
(
'?'
)?
'&'
:
'?'
}
sessionid=
${
wx
.
getStorageSync
(
"sessionid"
)}
`
}
this
.
useLink
=
this
.
link
;
console
.
log
(
this
.
useLink
,
'--this.useLink'
)
},
},
methods
:
{
...
...
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