Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
group-buy-ui
Commits
f4028313
Commit
f4028313
authored
Sep 25, 2021
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:更改小程序路径
parent
f40adb24
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
61 deletions
+26
-61
groupShare.vue
src/components/groupShare.vue
+2
-2
common.setting.js
src/config/common.setting.js
+1
-1
utils.service.js
src/service/utils.service.js
+7
-26
module.js
src/store/module.js
+2
-2
goodsCard.vue
src/views/goodsList/components/goodsCard.vue
+2
-1
index.vue
src/views/goodsList/index.vue
+12
-29
No files found.
src/components/groupShare.vue
View file @
f4028313
...
...
@@ -153,7 +153,7 @@ export default {
},
weixinHandleLink
(
linkPath
)
{
if
(
isWxMp
)
{
return
`/pages/
webview
/webview?url=
${
encodeURIComponent
(
JSON
.
stringify
(
linkPath
))}
`
;
return
`/pages/
groupbuy
/webview?url=
${
encodeURIComponent
(
JSON
.
stringify
(
linkPath
))}
`
;
}
return
linkPath
;
},
...
...
@@ -190,7 +190,7 @@ export default {
const
{
posterUrl
}
=
this
.
shareInfo
;
console
.
log
(
posterUrl
);
this
.
nativeBridge
.
openNewUrl
({
newUrl
:
`/pages/g
oodshare/index
?url=
${
encodeURIComponent
(
JSON
.
stringify
(
posterUrl
))}
`
newUrl
:
`/pages/g
roupbuy/goodshare
?url=
${
encodeURIComponent
(
JSON
.
stringify
(
posterUrl
))}
`
});
},
shareDialogConfirm
()
{
...
...
src/config/common.setting.js
View file @
f4028313
export
default
{
MP_URL_MAP
:
{
home
:
'
/pages/index/index
'
,
webview
:
'
/pages/
webview
/webview
'
,
webview
:
'
/pages/
groupbuy
/webview
'
,
middleWay
:
'
/pages/webview/middleWay
'
,
goodDetail
:
'
/pages/product/goodDetail
'
,
landPage
:
'
/pages/landing/goods
'
,
...
...
src/service/utils.service.js
View file @
f4028313
...
...
@@ -365,36 +365,17 @@ export function setAppTitleColor(bgcolor = '#fff') {
});
}
export
function
getQueryParams
(
key
)
{
var
search
=
window
.
location
.
search
;
var
regExp
=
new
RegExp
(
'
[
\\
?
\\
&]([^
\\
?
\\
&]+)=([^
\\
?
\\
&]+)
'
,
'
ig
'
);
var
queryStringList
=
{};
var
parttern
;
while
((
parttern
=
regExp
.
exec
(
search
)))
{
if
(
!
queryStringList
[
parttern
[
1
].
toLowerCase
()])
{
queryStringList
[
parttern
[
1
].
toLowerCase
()]
=
parttern
[
2
];
}
}
//返回指定键的值
if
(
key
)
{
return
queryStringList
[
key
.
toLowerCase
()]
||
''
;
}
//返回所有查询参数
return
queryStringList
;
}
export
function
paramsParentheses
()
{
let
paramsObj
=
getQueryParams
();
export
function
paramsParentheses
(
pointer
)
{
const
params
=
pointer
.
$route
.
query
;
const
path
=
pointer
.
$route
.
path
;
let
tempString
=
''
;
// !h=0$activityId=39"
for
(
let
key
in
paramsObj
)
{
let
option
=
`
${
key
}
=
${
paramsObj
[
key
]}
`
;
for
(
let
key
in
params
)
{
let
option
=
`
${
key
}
=
${
params
[
key
]}
`
;
tempString
+=
`$
${
option
}
`
;
}
if
(
tempString
.
length
)
{
tempString
=
`
${
config
.
localHost
}
!`
+
tempString
.
slice
(
1
);
tempString
=
`
${
config
.
localHost
}
${
path
}
!`
+
tempString
.
slice
(
1
);
}
console
.
log
(
tempString
);
return
tempString
;
}
src/store/module.js
View file @
f4028313
...
...
@@ -104,9 +104,9 @@ const mutations = {
// todo 跳转到小程序
let
getScheme
=
async
function
()
{
const
[
res
]
=
await
groupBuy
.
getScheme
({
miniUrl
:
'
pages/
product/goodDetail
'
,
miniUrl
:
'
pages/
groupbuy/webview
'
,
// params: `url=${window.location.href}`
params
:
`from=groupBuy&url=
${
paramsParentheses
()}
`
params
:
`from=groupBuy&url=
${
paramsParentheses
(
pointer
)}
`
});
const
url
=
res
;
window
.
location
.
href
=
url
;
// todo 需要验证
...
...
src/views/goodsList/components/goodsCard.vue
View file @
f4028313
<
template
>
<dl
class=
"group-item"
:class=
"
{ disabled: groupStop }" @click="onButtonClick">
<dl
class=
"group-item"
:class=
"
{ disabled: groupStop }" @click
.stop
="onButtonClick">
<dt
class=
"group-item-thumb"
>
<cr-image
:src=
"goodsItem.thumbImageUrl"
/>
<span
class=
"group-item-tag"
>
{{
goodsItem
.
groupBuyLimitUserCount
}}
人团
</span>
...
...
@@ -141,6 +141,7 @@ export default {
align-items: center;
padding: 12px 0;
border-bottom: #ededed solid 1px;
cursor: pointer;
position: relative;
&:last-of-type {
border-bottom: none;
...
...
src/views/goodsList/index.vue
View file @
f4028313
...
...
@@ -135,6 +135,18 @@ export default {
mounted
()
{
this
.
showLoops
=
true
;
},
deactivated
()
{
clearTimeout
((
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
timer
)
||
null
);
this
.
showLoops
=
false
;
this
.
setTitleColor
();
},
activated
()
{
this
.
showLoops
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
onSlidePrevChange
();
});
},
beforeRouteEnter
(
to
,
from
,
next
)
{
const
{
activityId
}
=
to
.
query
;
if
(
!
activityId
||
isNaN
(
activityId
))
{
...
...
@@ -151,18 +163,6 @@ export default {
}
}
},
// beforeDestroy() {
// },
deactivated
()
{
clearTimeout
((
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
timer
)
||
null
);
this
.
showLoops
=
false
;
},
activated
()
{
this
.
showLoops
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
onSlidePrevChange
();
});
},
methods
:
{
animationEventStart
()
{
this
.
showSwipe
=
false
;
...
...
@@ -187,11 +187,6 @@ export default {
shareInfo
,
type
:
0
});
// const activity_id = this.activityId;
// this.$store.dispatch('goods_share_open', shareInfo);
// registeredEvents('H5_GroupZeroYuanPurchaseActivityPageSharePopupBtnClick', {
// activity_id
// });
},
async
getShareData
()
{
const
{
...
...
@@ -201,18 +196,6 @@ export default {
shareIconUrl
,
img
}
=
this
.
goodsTemp
;
// let link = `${config.localHost}/groupBuy/list?h=0&activityId=${this.activityId}`;
// if (isWxMp) {
// link = `/pages/webview/webview?url=${encodeURIComponent(JSON.stringify(link))}`;
// }
// console.log(link);
// return Promise.resolve({
// title: shareTitle,
// desc: shareSubTitle,
// link, // 页面地址
// imgUrl: shareIconUrl || img, // 图片地
// posterUrl: sharePosterTemplateUrl
// });
const
{
activityId
}
=
this
;
return
Promise
.
resolve
({
skuName
:
shareTitle
,
...
...
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