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
a74f227f
Commit
a74f227f
authored
Sep 24, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy
parents
f1eaf31a
760d2df7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
32 deletions
+55
-32
groupShare.vue
src/components/groupShare.vue
+1
-0
env.config.js
src/config/env.config.js
+2
-0
prod.config.js
src/config/prod.config.js
+2
-1
goodsCard.vue
src/views/goodsList/components/goodsCard.vue
+3
-2
index.vue
src/views/goodsList/index.vue
+14
-11
index.vue
src/views/orderList/index.vue
+33
-18
No files found.
src/components/groupShare.vue
View file @
a74f227f
...
@@ -64,6 +64,7 @@ export default {
...
@@ -64,6 +64,7 @@ export default {
});
});
},
},
shareDialogConfirm
()
{
shareDialogConfirm
()
{
this
.
$store
.
dispatch
(
'
goods_share_close
'
);
this
.
$dialog
({
this
.
$dialog
({
message
:
'
请点击小程序右上角更多进行分享~
'
,
message
:
'
请点击小程序右上角更多进行分享~
'
,
showCancelButton
:
false
,
showCancelButton
:
false
,
...
...
src/config/env.config.js
View file @
a74f227f
...
@@ -10,6 +10,7 @@ const shenceHost = 'https://bn.xyqb.com/sa?project=default'; // 测试地址
...
@@ -10,6 +10,7 @@ const shenceHost = 'https://bn.xyqb.com/sa?project=default'; // 测试地址
const
talosHost
=
'
https://talos-vcc3.liangkebang.net
'
;
const
talosHost
=
'
https://talos-vcc3.liangkebang.net
'
;
const
faceHost
=
'
https://auth-vcc3.liangkebang.net
'
;
const
faceHost
=
'
https://auth-vcc3.liangkebang.net
'
;
const
kdspHost
=
'
https://kdsp-api-vcc3.liangkebang.net
'
;
const
kdspHost
=
'
https://kdsp-api-vcc3.liangkebang.net
'
;
const
localHost
=
'
https://group-buy-vcc3.liangkebang.net
'
;
// 测试环境页面地址
// const talosHost = 'http://192.168.29.89:8098'; // 唐峰
// const talosHost = 'http://192.168.29.89:8098'; // 唐峰
// const talosHost = 'http://192.168.25.210:8080'; // 张超
// const talosHost = 'http://192.168.25.210:8080'; // 张超
// const talosHost = 'http://192.168.28.83:80'; // 董彪
// const talosHost = 'http://192.168.28.83:80'; // 董彪
...
@@ -21,6 +22,7 @@ const TERMINAL = 'H5';
...
@@ -21,6 +22,7 @@ const TERMINAL = 'H5';
const
VERSION
=
'
7.9.00
'
;
const
VERSION
=
'
7.9.00
'
;
// const talosHost = protocol + '//talos.xyqb.com';
// const talosHost = protocol + '//talos.xyqb.com';
export
default
{
export
default
{
localHost
,
faceHost
,
faceHost
,
talosHost
,
talosHost
,
test
:
true
,
test
:
true
,
...
...
src/config/prod.config.js
View file @
a74f227f
...
@@ -8,8 +8,9 @@ const TERMINAL = 'H5';
...
@@ -8,8 +8,9 @@ const TERMINAL = 'H5';
const
VERSION
=
'
7.9.00
'
;
const
VERSION
=
'
7.9.00
'
;
const
kdspHost
=
'
https://kdsp-api.q-gp.com
'
;
const
kdspHost
=
'
https://kdsp-api.q-gp.com
'
;
const
opapiHost
=
`
${
protocol
}
//opapi.xyqb.com`
;
const
opapiHost
=
`
${
protocol
}
//opapi.xyqb.com`
;
const
localHost
=
'
https://mall.q-gp.com/group-buying
'
;
// 正式环境页面地址
export
default
{
export
default
{
localHost
,
// apiHost,
// apiHost,
faceHost
,
faceHost
,
test
:
false
,
test
:
false
,
...
...
src/views/goodsList/components/goodsCard.vue
View file @
a74f227f
...
@@ -88,8 +88,9 @@ export default {
...
@@ -88,8 +88,9 @@ export default {
handleProgressByStatus
(
item
)
{
handleProgressByStatus
(
item
)
{
if
(
!
item
)
return
0
;
if
(
!
item
)
return
0
;
let
percentage
=
0
;
let
percentage
=
0
;
const
{
goodsCount
,
activitySkuTotalCount
}
=
item
;
// saleCount / activitySkuTotalCount
percentage
=
(
goodsCount
/
activitySkuTotalCount
)
*
100
;
const
{
saleCount
,
activitySkuTotalCount
}
=
item
;
percentage
=
(
saleCount
/
activitySkuTotalCount
)
*
100
;
percentage
=
percentage
<
0
?
0
:
percentage
;
percentage
=
percentage
<
0
?
0
:
percentage
;
percentage
=
this
.
btnByStatus
.
d
?
0
:
percentage
;
percentage
=
this
.
btnByStatus
.
d
?
0
:
percentage
;
return
Math
.
round
(
percentage
*
100
)
/
100
;
return
Math
.
round
(
percentage
*
100
)
/
100
;
...
...
src/views/goodsList/index.vue
View file @
a74f227f
...
@@ -84,7 +84,8 @@ import localStorage from '@/service/localStorage.service';
...
@@ -84,7 +84,8 @@ import localStorage from '@/service/localStorage.service';
import
goodsCheckMixin
from
'
@/mixins/goodsCheck.mixin
'
;
import
goodsCheckMixin
from
'
@/mixins/goodsCheck.mixin
'
;
import
{
setAppTitleColor
,
EventBus
}
from
'
@/service/utils.service
'
;
import
{
setAppTitleColor
,
EventBus
}
from
'
@/service/utils.service
'
;
import
{
registeredEvents
}
from
'
@/service/sa.service
'
;
import
{
registeredEvents
}
from
'
@/service/sa.service
'
;
console
.
log
(
EventBus
);
import
config
from
'
@/config
'
;
console
.
log
(
config
.
localHost
);
export
default
{
export
default
{
// eslint-disable-next-line vue/name-property-casing
// eslint-disable-next-line vue/name-property-casing
name
:
'
groupBuyList
'
,
name
:
'
groupBuyList
'
,
...
@@ -151,7 +152,7 @@ export default {
...
@@ -151,7 +152,7 @@ export default {
deactivated
()
{
deactivated
()
{
clearTimeout
((
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
timer
)
||
null
);
clearTimeout
((
this
.
$refs
.
swipeRota
&&
this
.
$refs
.
swipeRota
.
timer
)
||
null
);
this
.
showLoops
=
false
;
this
.
showLoops
=
false
;
// EventBus.$off(
);
EventBus
.
$off
(
'
shareClickItem
'
);
},
},
activated
()
{
activated
()
{
this
.
showLoops
=
true
;
this
.
showLoops
=
true
;
...
@@ -188,8 +189,9 @@ export default {
...
@@ -188,8 +189,9 @@ export default {
});
});
},
},
onShareEventChange
()
{
onShareEventChange
()
{
const
vm
=
this
;
EventBus
.
$on
(
'
shareClickItem
'
,
async
function
({
ev
,
nativeBridge
})
{
EventBus
.
$on
(
'
shareClickItem
'
,
async
function
({
ev
,
nativeBridge
})
{
let
shareDic
=
await
this
.
getShareData
();
let
shareDic
=
await
vm
.
getShareData
();
if
(
ev
===
'
pic
'
)
{
if
(
ev
===
'
pic
'
)
{
// 分享海报跳转小程序海报分享页面
// 分享海报跳转小程序海报分享页面
nativeBridge
.
openNewUrl
({
nativeBridge
.
openNewUrl
({
...
@@ -199,6 +201,7 @@ export default {
...
@@ -199,6 +201,7 @@ export default {
});
});
}
}
if
(
ev
===
'
weixin
'
)
{
if
(
ev
===
'
weixin
'
)
{
console
.
log
(
shareDic
);
// 分享朋友派发微信postMessage事件
// 分享朋友派发微信postMessage事件
nativeBridge
.
run
({
nativeBridge
.
run
({
event
:
'
showShareView
'
,
event
:
'
showShareView
'
,
...
@@ -211,13 +214,13 @@ export default {
...
@@ -211,13 +214,13 @@ export default {
},
},
async
getShareData
()
{
async
getShareData
()
{
const
{
title
,
sharePosterTemplateUrl
,
img
}
=
this
.
goodsTemp
;
const
{
sharePosterTemplateUrl
,
shareTitle
,
shareSubTitle
,
shareIconUrl
}
=
this
.
goodsTemp
;
const
link
=
window
.
location
.
href
;
const
link
=
`
${
config
.
localHost
}
/groupBuy/list?activityId=
${
this
.
activityId
}
`
;
return
Promise
.
resolve
({
return
Promise
.
resolve
({
title
,
title
:
shareTitle
,
desc
:
'
我正在免费拿商品,请你帮帮我
'
,
desc
:
shareSubTitle
,
link
:
`pages/webview/webview?url=
${
link
}
/
`
,
// 页面地址
link
:
`pages/webview/webview?url=
${
encodeURIComponent
(
JSON
.
stringify
(
link
))}
`
,
// 页面地址
imgUrl
:
img
,
// 图片地
imgUrl
:
shareIconUrl
,
// 图片地
posterUrl
:
sharePosterTemplateUrl
posterUrl
:
sharePosterTemplateUrl
});
});
},
},
...
@@ -297,8 +300,8 @@ async function getActivityList(urlQuery, next) {
...
@@ -297,8 +300,8 @@ async function getActivityList(urlQuery, next) {
if
(
result
?.
templateInfo
)
{
if
(
result
?.
templateInfo
)
{
let
t
=
result
.
templateInfo
;
let
t
=
result
.
templateInfo
;
// 即将开始
// 即将开始
t
.
startTime
=
'
2021-09-23 20:00:00
'
;
//
t.startTime = '2021-09-23 20:00:00';
t
.
endTime
=
'
2021-09-23 20:02:00
'
;
//
t.endTime = '2021-09-23 20:02:00';
// 正在活动中
// 正在活动中
// t.startTime = '2021-09-23 00:00:00';
// t.startTime = '2021-09-23 00:00:00';
// t.endTime = '2021-09-25 00:00:00';
// t.endTime = '2021-09-25 00:00:00';
...
...
src/views/orderList/index.vue
View file @
a74f227f
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
/>
/>
</cr-tab>
</cr-tab>
</cr-tabs>
</cr-tabs>
<share-pic
ref=
"sharePic"
:share-pic-data=
"sharePicData"
@
outputPicUrl=
"outputPicUrl"
/>
<!--
<cr-action-sheet
<!--
<cr-action-sheet
v-model=
"showExpressPopup"
v-model=
"showExpressPopup"
title=
"请选择物流单号"
title=
"请选择物流单号"
...
@@ -35,7 +35,9 @@ import List from './components/List';
...
@@ -35,7 +35,9 @@ import List from './components/List';
import
{
isApp
}
from
'
@/service/validation.service
'
;
import
{
isApp
}
from
'
@/service/validation.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
{
EventBus
}
from
'
@/service/utils.service
'
;
import
{
EventBus
}
from
'
@/service/utils.service
'
;
import
sharePic
from
'
@/components/sharePic
'
;
import
qs
from
'
qs
'
;
import
qs
from
'
qs
'
;
import
MpBridge
from
'
@/service/mp
'
;
const
commonParams
=
{
const
commonParams
=
{
loading
:
false
,
loading
:
false
,
finished
:
false
,
finished
:
false
,
...
@@ -46,11 +48,14 @@ const commonParams = {
...
@@ -46,11 +48,14 @@ const commonParams = {
export
default
{
export
default
{
name
:
'
OrderList
'
,
name
:
'
OrderList
'
,
components
:
{
components
:
{
List
List
,
sharePic
},
},
data
()
{
data
()
{
return
{
return
{
isApp
,
isApp
,
nativeBridge
:
null
,
sharePicData
:
{},
showCancelPopup
:
false
,
showCancelPopup
:
false
,
showExpressPopup
:
false
,
showExpressPopup
:
false
,
currentTab
:
0
,
currentTab
:
0
,
...
@@ -81,9 +86,19 @@ export default {
...
@@ -81,9 +86,19 @@ export default {
this
.
getstatusQuery
();
this
.
getstatusQuery
();
this
.
getList
();
this
.
getList
();
this
.
onShareEventChange
();
this
.
onShareEventChange
();
// this.$track.registeredEvents('H5_2B_MyOrderPageExposure');
},
beforeDestroy
()
{
EventBus
.
$off
(
'
shareClickItem
'
);
},
created
()
{
this
.
nativeBridge
=
new
MpBridge
();
},
},
methods
:
{
methods
:
{
outputPicUrl
(
posterUrl
)
{
this
.
nativeBridge
.
openNewUrl
({
newUrl
:
`/pages/goodshare/index?url=
${
encodeURIComponent
(
JSON
.
stringify
(
posterUrl
))}
`
});
},
async
getShareData
(
shareInfo
)
{
async
getShareData
(
shareInfo
)
{
const
linkPath
=
qs
.
stringify
({
const
linkPath
=
qs
.
stringify
({
h
:
0
,
h
:
0
,
...
@@ -94,32 +109,24 @@ export default {
...
@@ -94,32 +109,24 @@ export default {
templateId
:
shareInfo
.
templateId
,
templateId
:
shareInfo
.
templateId
,
templateDetailId
:
shareInfo
.
templateId
templateDetailId
:
shareInfo
.
templateId
});
});
const
detailUrl
=
`
${
window
.
location
.
origin
}
/groupBuy/skuInfoSmallPic?
${
linkPath
}
`
;
return
Promise
.
resolve
({
return
Promise
.
resolve
({
title
:
shareInfo
.
skuName
,
title
:
shareInfo
.
skuName
,
link
:
`pages/webview/webview?url=
${
window
.
location
.
origin
}
?url=
${
encodeURIComponent
(
link
:
`pages/webview/webview?url=
${
encodeURIComponent
(
JSON
.
stringify
(
detailUrl
))}
`
,
// 页面地址
JSON
.
stringify
(
linkPath
)
)}
`
,
// 页面地址
imgUrl
:
shareInfo
.
skuImg
// 图片地
imgUrl
:
shareInfo
.
skuImg
// 图片地
});
});
},
},
onShareEventChange
()
{
onShareEventChange
()
{
const
vm
=
this
;
const
vm
=
this
;
console
.
log
(
'
update
'
);
EventBus
.
$on
(
'
shareClickItem
'
,
async
function
({
ev
,
nativeBridge
})
{
EventBus
.
$on
(
'
shareClickItem
'
,
async
function
({
ev
,
nativeBridge
})
{
console
.
log
(
ev
);
const
shareDic
=
await
vm
.
getShareData
(
vm
.
sharePicData
);
console
.
log
(
shareDic
);
if
(
ev
===
'
pic
'
)
{
if
(
ev
===
'
pic
'
)
{
vm
.
$refs
.
sharePic
.
createAndUploadPic
();
// 分享海报跳转小程序海报分享页面
// 分享海报跳转小程序海报分享页面
// nativeBridge.openNewUrl({
// newUrl: `/pages/goodshare/index?url=${encodeURIComponent(
// JSON.stringify(shareDic.posterUrl)
// )}`
// });
}
}
if
(
ev
===
'
weixin
'
)
{
if
(
ev
===
'
weixin
'
)
{
console
.
log
(
'
监听事件
'
);
// const res = await groupBuyApi.getGroupShareInfo(this.shareInfo.order);
// const res = await groupBuyApi.getGroupShareInfo(this.shareInfo.order);
const
[
res
]
=
await
groupBuyApi
.
getGroupShareInfo
(
'
1440884214932389888
'
);
const
shareDic
=
await
vm
.
getShareData
(
res
);
// 分享朋友派发微信postMessage事件
// 分享朋友派发微信postMessage事件
nativeBridge
.
run
({
nativeBridge
.
run
({
event
:
'
showShareView
'
,
event
:
'
showShareView
'
,
...
@@ -142,10 +149,18 @@ export default {
...
@@ -142,10 +149,18 @@ export default {
handleLoad
()
{
handleLoad
()
{
this
.
getList
();
this
.
getList
();
},
},
openShareEvent
()
{
async
openShareEvent
()
{
this
.
$store
.
dispatch
(
'
goods_share_open
'
);
try
{
const
[
res
]
=
await
groupBuyApi
.
getGroupShareInfo
(
'
1440884214932389888
'
);
console
.
log
(
res
);
this
.
sharePicData
=
res
;
this
.
$store
.
dispatch
(
'
goods_share_open
'
);
}
catch
(
err
)
{
console
.
log
(
err
);
}
},
},
handleOptionClick
(
info
)
{
handleOptionClick
(
info
)
{
console
.
log
(
info
);
this
.
currentOrder
=
info
;
this
.
currentOrder
=
info
;
switch
(
info
.
eventType
)
{
switch
(
info
.
eventType
)
{
case
'
share
'
:
case
'
share
'
:
...
...
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