Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yimu
h5-front
Commits
9cc52dd6
Commit
9cc52dd6
authored
Mar 17, 2022
by
verestrasz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
58970361
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
309 additions
and
245 deletions
+309
-245
App.vue
src/App.vue
+6
-3
clocks-and-watches.svg
src/assets/icon/clocks-and-watches.svg
+21
-0
clocks-and-watches.png
src/assets/img/clocks-and-watches.png
+0
-0
goods.js
src/enums/goods.js
+13
-0
global.js
src/mixins/global.js
+8
-1
index.js
src/store/index.js
+6
-2
common.js
src/utils/common.js
+16
-1
blind-sku.vue
src/views/blind-box/blind-sku.vue
+72
-4
index.vue
src/views/blind-box/index.vue
+4
-1
goods-footer.vue
src/views/goods/goods-footer.vue
+32
-6
goods-sku-popup.vue
src/views/goods/goods-sku-popup.vue
+20
-1
index.vue
src/views/goods/index.vue
+16
-3
index.vue
src/views/tab-bar/classification/index.vue
+3
-3
blind-goods.vue
src/views/tab-bar/home/goods-list/blind-goods.vue
+45
-8
blind-goods11.vue
src/views/tab-bar/home/goods-list/blind-goods11.vue
+0
-201
digital-collection-goods.vue
...iews/tab-bar/home/goods-list/digital-collection-goods.vue
+46
-10
index.vue
src/views/tab-bar/user-center/index.vue
+1
-1
No files found.
src/App.vue
View file @
9cc52dd6
...
@@ -30,12 +30,15 @@ export default {
...
@@ -30,12 +30,15 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
...
mapActions
([
"getShoppingCart"
]),
//
...mapActions(["getShoppingCart"]),
...
mapMutations
([
'setAppVersion'
]),
...
mapMutations
([
'setAppVersion'
,
"setCurrentTime"
]),
},
},
mounted
()
{
mounted
()
{
var
local
=
window
.
location
.
href
// 获取页面url
var
local
=
window
.
location
.
href
// 获取页面url
var
appid
=
'wxbdddd81913c795e9'
var
appid
=
'wxbdddd81913c795e9'
this
.
timeTask
=
setInterval
(()
=>
{
this
.
setCurrentTime
(
+
new
Date
())
},
1000
);
this
.
code
=
getUrlParam
(
'code'
)
// 截取code
this
.
code
=
getUrlParam
(
'code'
)
// 截取code
if
(
this
.
code
==
null
||
this
.
code
===
''
){
if
(
this
.
code
==
null
||
this
.
code
===
''
){
// 没有code去拿code;
// 没有code去拿code;
...
@@ -55,7 +58,7 @@ export default {
...
@@ -55,7 +58,7 @@ export default {
})
})
}
}
}
}
this
.
hasLogin
&&
this
.
getShoppingCart
();
//
this.hasLogin && this.getShoppingCart();
this
.
getVersionCode
(
e
=>
{
this
.
getVersionCode
(
e
=>
{
this
.
setAppVersion
(
e
)
this
.
setAppVersion
(
e
)
})
})
...
...
src/assets/icon/clocks-and-watches.svg
0 → 100644
View file @
9cc52dd6
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"10px"
height=
"10px"
viewBox=
"0 0 10 10"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
编组
</title>
<g
id=
"页面-1"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"首页备份-5"
transform=
"translate(-43.000000, -680.000000)"
>
<g
id=
"1备份"
transform=
"translate(16.000000, 549.000000)"
>
<g
id=
"角标"
transform=
"translate(20.000000, 126.000000)"
>
<g
id=
"编组"
transform=
"translate(7.000000, 5.000000)"
>
<rect
id=
"矩形"
fill=
"#D8D8D8"
opacity=
"0"
x=
"0"
y=
"0"
width=
"10"
height=
"10"
></rect>
<g
transform=
"translate(0.500000, 0.500000)"
fill=
"#FFFFFF"
fill-rule=
"nonzero"
>
<path
d=
"M0.496073972,2.67073559 C0.406436461,2.67073559 0.315791786,2.64656368 0.234211579,2.59620553 C0.00155691407,2.45117405 -0.0699516626,2.14600364 0.0750798168,1.91334898 C0.335935047,1.49336199 0.66024155,1.11869733 1.03893486,0.799426645 C1.41762816,0.480155957 1.84164381,0.224336542 2.299903,0.0370042148 C2.55370809,-0.0667335795 2.84276388,0.0551331497 2.94650168,0.308938239 C3.05023947,0.562743328 2.92837274,0.851799123 2.67456765,0.955536918 C1.94236011,1.25365718 1.33504079,1.76630317 0.918075291,2.43707377 C0.824409127,2.58814822 0.662255876,2.67073559 0.496073972,2.67073559 Z"
id=
"路径"
></path>
<path
d=
"M8.5312208,2.67073559 C8.36503889,2.67073559 8.2038928,2.58814822 8.10921948,2.43707377 C7.69225397,1.76630317 7.08493465,1.25365718 6.35272712,0.955536918 C6.09892203,0.851799123 5.9770553,0.562743328 6.08079309,0.308938239 C6.18453089,0.0551331497 6.47358668,-0.0667335795 6.72739177,0.0370042148 C7.18565096,0.223329379 7.6096666,0.480155957 7.98835991,0.799426645 C8.36705322,1.11869733 8.69135972,1.49336199 8.95221495,1.91334898 C9.09724643,2.14600364 9.02573785,2.45218121 8.79308319,2.59620553 C8.71049582,2.64656368 8.61985114,2.67073559 8.5312208,2.67073559 L8.5312208,2.67073559 Z"
id=
"路径"
></path>
<path
d=
"M2.13573542,2.06945925 C3.66763042,0.752089981 5.9770553,0.925322026 7.29442457,2.45721703 C8.612801,3.98911203 8.4385618,6.29853691 6.90666679,7.61691334 L6.90666679,7.61691334 L7.56232994,8.26250486 C7.7325405,8.43472974 7.73052617,8.70666376 7.56232994,8.87284566 C7.39111222,9.04104189 7.11716387,9.04104189 6.94695332,8.87284566 L6.94695332,8.87284566 L6.16740911,8.10135877 C5.11693805,8.62609072 3.87913466,8.61803341 2.83571374,8.08020834 L2.83571374,8.08020834 L2.03501911,8.87385283 C1.86480856,9.04204906 1.59086021,9.04204906 1.42064965,8.87385283 L1.42064965,8.87385283 C1.2504391,8.70162795 1.25245342,8.42969392 1.42064965,8.26351202 L1.42064965,8.26351202 L2.10249904,7.58770561 C1.97559649,7.47691768 1.85775842,7.35706527 1.74797765,7.22915556 C0.430608374,5.69726056 0.603840419,3.38682852 2.13573542,2.06945925 Z M4.69695106,3.09475124 L3.59914333,5.0365616 L4.23969903,5.00533955 L4.26991393,6.52817008 L5.44225172,4.69815482 L4.79061722,4.6659256 L4.69695106,3.09475124 Z"
id=
"形状结合"
></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
src/assets/img/clocks-and-watches.png
0 → 100644
View file @
9cc52dd6
22.5 KB
src/enums/goods.js
View file @
9cc52dd6
...
@@ -58,4 +58,16 @@ export const GoodsTypeObj = {
...
@@ -58,4 +58,16 @@ export const GoodsTypeObj = {
skuAndAddr
:
true
skuAndAddr
:
true
}
}
},
},
}
export
const
GoodsStatus
=
{
DELETE
:
0
,
ON_SHELF
:
1
,
OFF_SHELF
:
2
,
RELEASING
:
3
,
FAIL
:
4
,
UN_REVIEW
:
5
,
REVIEW_REJECT
:
6
,
REVIEW_SUCCESS
:
7
,
CANCEL
:
8
,
WARM_UP
:
10
}
}
\ No newline at end of file
src/mixins/global.js
View file @
9cc52dd6
...
@@ -6,7 +6,7 @@ import Clipboard from 'clipboard'
...
@@ -6,7 +6,7 @@ import Clipboard from 'clipboard'
Vue
.
mixin
({
Vue
.
mixin
({
computed
:
{
computed
:
{
...
mapState
([
"appPlatform"
]),
...
mapState
([
"appPlatform"
,
"currentTime"
]),
...
mapGetters
([
'hasLogin'
])
...
mapGetters
([
'hasLogin'
])
},
},
methods
:
{
methods
:
{
...
@@ -80,6 +80,13 @@ Vue.mixin({
...
@@ -80,6 +80,13 @@ Vue.mixin({
c
.
destroy
()
c
.
destroy
()
})
})
},
},
genEnumMap
(
status
,
statusEnum
)
{
let
map
=
{};
Object
.
keys
(
statusEnum
).
forEach
((
key
)
=>
{
map
[
key
]
=
status
==
statusEnum
[
key
];
});
return
map
;
},
getVideoBase64
(
url
,
width
=
400
,
height
=
240
)
{
getVideoBase64
(
url
,
width
=
400
,
height
=
240
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
let
dataURL
=
""
let
dataURL
=
""
...
...
src/store/index.js
View file @
9cc52dd6
...
@@ -52,7 +52,8 @@ export default new Vuex.Store({
...
@@ -52,7 +52,8 @@ export default new Vuex.Store({
shoppingCart
:
[],
shoppingCart
:
[],
shoppingCartCheckedList
:
getShoppingCartCheckedList
(),
shoppingCartCheckedList
:
getShoppingCartCheckedList
(),
withdrawGoodsInfo
:
getWithdrawGoodsInfo
()
withdrawGoodsInfo
:
getWithdrawGoodsInfo
(),
currentTime
:
+
new
Date
(),
},
},
getters
:
{
getters
:
{
hasLogin
:
(
state
)
=>
{
hasLogin
:
(
state
)
=>
{
...
@@ -161,7 +162,10 @@ export default new Vuex.Store({
...
@@ -161,7 +162,10 @@ export default new Vuex.Store({
setWithdrawGoodsInfo
(
val
)
setWithdrawGoodsInfo
(
val
)
},
},
setCurrentTime
(
state
,
val
){
state
.
currentTime
=
val
return
1
},
// =====clear======
// =====clear======
...
...
src/utils/common.js
View file @
9cc52dd6
...
@@ -90,7 +90,22 @@ const getDate = (timeStamp, startType) => {
...
@@ -90,7 +90,22 @@ const getDate = (timeStamp, startType) => {
else
resStr
=
month
+
'-'
+
date
+
' '
+
hours
+
':'
+
minutes
else
resStr
=
month
+
'-'
+
date
+
' '
+
hours
+
':'
+
minutes
return
resStr
return
resStr
}
}
export
function
formatTimeDuring
(
time
)
{
var
day
=
parseInt
(
time
/
(
1000
*
60
*
60
*
24
))
+
""
var
hour
=
parseInt
((
time
%
(
1000
*
60
*
60
*
24
))
/
(
1000
*
60
*
60
))
+
""
;
var
min
=
parseInt
((
time
%
(
1000
*
60
*
60
))
/
(
1000
*
60
))
+
""
;
var
sec
=
parseInt
((
time
%
(
1000
*
60
))
/
1000
)
+
""
if
(
hour
.
length
==
1
)
{
hour
=
"0"
+
hour
}
if
(
min
.
length
==
1
)
{
min
=
"0"
+
min
}
if
(
sec
.
length
==
1
)
{
sec
=
"0"
+
sec
}
return
{
day
,
hour
,
min
,
sec
}
}
/**
/**
* @param {String|Number} timeStamp 时间戳
* @param {String|Number} timeStamp 时间戳
* @returns {String} 相对时间字符串
* @returns {String} 相对时间字符串
...
...
src/views/blind-box/blind-sku.vue
View file @
9cc52dd6
...
@@ -11,8 +11,10 @@
...
@@ -11,8 +11,10 @@
</div>
</div>
</div>
</div>
<div
class=
"blind-buy"
>
<div
class=
"blind-buy"
>
<img
@
click=
"handleConfirm"
v-if=
"isHasStock"
src=
"@/assets/img/buy.png"
class=
"buy-btn"
alt=
""
>
<div
class=
"buy-btn"
>
<img
v-else
src=
"@/assets/img/sell-out.png"
class=
"buy-btn"
alt=
""
>
<img
:src=
"goodStatus.img"
class=
"buy-btn"
alt=
""
@
click=
"handleConfirm"
>
<p
class=
"p"
>
{{
goodStatus
.
label
}}
</p>
</div>
</div>
</div>
<van-popup
v-model=
"showPopup"
round
>
<van-popup
v-model=
"showPopup"
round
>
<div
class=
"blind-large-con"
>
<div
class=
"blind-large-con"
>
...
@@ -31,6 +33,7 @@
...
@@ -31,6 +33,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Icon
}
from
'vant'
;
import
{
Icon
}
from
'vant'
;
import
{
formatTimeDuring
}
from
"@/utils"
;
export
default
{
export
default
{
props
:
{
props
:
{
value
:
{
value
:
{
...
@@ -53,6 +56,12 @@ export default {
...
@@ -53,6 +56,12 @@ export default {
type
:
Array
,
type
:
Array
,
defualt
:
()
=>
[],
defualt
:
()
=>
[],
},
},
data
:
{
type
:
Object
,
default
:
()
=>
{
return
{};
},
},
// isHasStock: Boolean
// isHasStock: Boolean
},
},
components
:{
components
:{
...
@@ -69,7 +78,44 @@ export default {
...
@@ -69,7 +78,44 @@ export default {
return
this
.
skus
&&
this
.
skus
.
some
((
item
)
=>
{
return
this
.
skus
&&
this
.
skus
.
some
((
item
)
=>
{
return
item
.
stock
return
item
.
stock
})
})
}
},
goodStatus
(){
let
obj
=
{
disable
:
false
,
label
:
""
,
img
:
""
}
if
(
this
.
data
.
preheatEndTime
&&
this
.
data
.
preheatEndTime
>
this
.
currentTime
){
let
time
=
formatTimeDuring
(
this
.
data
.
preheatEndTime
-
this
.
currentTime
)
let
dayhours
=
parseInt
(
time
.
day
)
*
24
+
parseInt
(
time
.
hour
)
if
(
dayhours
<
9
){
dayhours
=
'0'
+
dayhours
}
if
(
dayhours
<
1
){
dayhours
=
"00"
}
obj
=
{
disable
:
true
,
label
:
`
${
dayhours
}
:
${
time
.
min
}
:
${
time
.
sec
}
`
,
img
:
require
(
'@/assets/img/clocks-and-watches.png'
)
}
}
else
{
if
(
this
.
isHasStock
){
obj
=
{
disable
:
false
,
label
:
""
,
img
:
require
(
'@/assets/img/buy.png'
)
}
}
else
{
obj
=
{
disable
:
true
,
label
:
""
,
img
:
require
(
'@/assets/img/sell-out.png'
)
}
}
}
return
obj
},
},
},
methods
:
{
methods
:
{
showDetail
(
prop
)
{
showDetail
(
prop
)
{
...
@@ -77,7 +123,10 @@ export default {
...
@@ -77,7 +123,10 @@ export default {
this
.
selectBlind
=
prop
this
.
selectBlind
=
prop
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$emit
(
"buy"
);
if
(
!
this
.
goodStatus
.
disable
){
this
.
$emit
(
"buy"
);
}
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -147,6 +196,25 @@ export default {
...
@@ -147,6 +196,25 @@ export default {
.buy-btn {
.buy-btn {
width:191px ;
width:191px ;
height: 75px;
height: 75px;
margin: 0 auto;
position: relative;
img{
width: 100%;
height: 100%;
}
.p{
position: absolute;
width: 100%;
top: 25px;
left: 0;
text-align: center;
height: 22px;
font-size: 17px;
// font-family: YouSheBiaoTiHei;
font-weight: bold;
color: #FFFFFF;
line-height: 22px;
}
}
}
}
}
.blind-large-con{
.blind-large-con{
...
...
src/views/blind-box/index.vue
View file @
9cc52dd6
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
:skuList=
"goodsDetail.skuList"
:skuList=
"goodsDetail.skuList"
:skuMap=
"goodsDetail.skuMap"
:skuMap=
"goodsDetail.skuMap"
:skus=
"goodsDetail.skus"
:skus=
"goodsDetail.skus"
:data=
"goodsDetail.desc"
@
buy=
"confirmBuy"
@
buy=
"confirmBuy"
/>
/>
<blind-detail
ref=
"goodsDetail"
:data=
"goodsDetail.details"
/>
<blind-detail
ref=
"goodsDetail"
:data=
"goodsDetail.details"
/>
...
@@ -174,7 +175,8 @@ export default {
...
@@ -174,7 +175,8 @@ export default {
circulation
,
circulation
,
sales
,
sales
,
salesType
,
salesType
,
blindBoxRule
blindBoxRule
,
preheatEndTime
}
=
goodsVo
;
}
=
goodsVo
;
imgListJson
=
JSON
.
parse
(
imgList
);
imgListJson
=
JSON
.
parse
(
imgList
);
...
@@ -205,6 +207,7 @@ export default {
...
@@ -205,6 +207,7 @@ export default {
name
,
name
,
description
,
description
,
nftFile
,
nftFile
,
preheatEndTime
};
};
let
merchant
=
{
let
merchant
=
{
merchantId
,
merchantId
,
...
...
src/views/goods/goods-footer.vue
View file @
9cc52dd6
...
@@ -16,8 +16,17 @@
...
@@ -16,8 +16,17 @@
</div>
-->
</div>
-->
<!--
</div>
-->
<!--
</div>
-->
<div
class=
"btn-con flex-default"
>
<div
class=
"btn-con flex-default"
>
<van-button
v-if=
"warmUp"
disabled
type=
"primary"
class=
"warm-up-btn"
>
即将开售
{{
warmUpTimeLabel
}}
</van-button>
<!-- 普通商品 -->
<!-- 普通商品 -->
<template
v-if=
"goodsTypeMap.NORMAL || goodsTypeMap.NFT"
>
<template
v-
else-
if=
"goodsTypeMap.NORMAL || goodsTypeMap.NFT"
>
<!--
<van-button
type=
"primary"
class=
"cart"
@
click=
"$emit('cart')"
>
<!--
<van-button
type=
"primary"
class=
"cart"
@
click=
"$emit('cart')"
>
加入购物车
加入购物车
</van-button>
-->
</van-button>
-->
...
@@ -25,9 +34,10 @@
...
@@ -25,9 +34,10 @@
立即购买
立即购买
</van-button>
</van-button>
</
template
>
</
template
>
<!-- 预热状态 -->
<!-- 预购商品 -->
<!-- 预购商品 -->
<
template
v-else-if=
"goodsTypeMap.PRE_SALE"
>
<
!-- <
template v-else-if="goodsTypeMap.PRE_SALE">
<div class="num">
<div class="num">
<span class="label">定金:</span>
<span class="label">定金:</span>
<span>500.00</span>
<span>500.00</span>
...
@@ -35,10 +45,10 @@
...
@@ -35,10 +45,10 @@
<van-button color="linear-gradient(295deg, #F07C5B 0%, #DD2E41 100%)">
<van-button color="linear-gradient(295deg, #F07C5B 0%, #DD2E41 100%)">
立即预定
立即预定
</van-button>
</van-button>
</
template
>
</template>
-->
<!-- 转让商品 -->
<!-- 转让商品 -->
<
template
v-else-if=
"goodsTypeMap.TRANSFER"
>
<
!-- <
template v-else-if="goodsTypeMap.TRANSFER">
<van-button
<van-button
type="primary"
type="primary"
style="width: 246px"
style="width: 246px"
...
@@ -47,7 +57,7 @@
...
@@ -47,7 +57,7 @@
>
>
立即购买
立即购买
</van-button>
</van-button>
</
template
>
</template>
-->
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -55,12 +65,15 @@
...
@@ -55,12 +65,15 @@
<
script
>
<
script
>
import
{
mapState
}
from
"vuex"
;
import
{
mapState
}
from
"vuex"
;
import
{
GoodsType
}
from
"@/enums"
;
import
{
GoodsType
}
from
"@/enums"
;
import
{
formatTimeDuring
}
from
"@/utils"
;
export
default
{
export
default
{
props
:
{
props
:
{
merchant
:
Object
,
merchant
:
Object
,
goodsType
:
[
Number
,
String
],
goodsType
:
[
Number
,
String
],
goodsTypeMap
:
Object
,
goodsTypeMap
:
Object
,
transferData
:
Object
,
transferData
:
Object
,
goodsDesc
:
Object
,
goodsStatusMap
:
Object
},
},
data
()
{
data
()
{
return
{};
return
{};
...
@@ -77,6 +90,19 @@ export default {
...
@@ -77,6 +90,19 @@ export default {
}
}
return
false
;
return
false
;
},
},
warmUp
()
{
return
(
this
.
goodsStatusMap
.
WARM_UP
&&
this
.
goodsDesc
.
preheatEndTime
>=
this
.
currentTime
);
},
warmUpTimeLabel
()
{
let
time
=
formatTimeDuring
(
this
.
goodsDesc
.
preheatEndTime
-
this
.
currentTime
);
return
`
${
parseInt
(
time
.
day
)
*
24
+
parseInt
(
time
.
hour
)}
:
${
time
.
min
}
:
${
time
.
sec
}
`
;
},
},
},
methods
:
{
methods
:
{
goShoppingCart
()
{
goShoppingCart
()
{
...
...
src/views/goods/goods-sku-popup.vue
View file @
9cc52dd6
...
@@ -55,7 +55,12 @@
...
@@ -55,7 +55,12 @@
<!--
底部按钮
-->
<!--
底部按钮
-->
<
div
class
=
"bottom flex-default"
>
<
div
class
=
"bottom flex-default"
>
<
template
v
-
if
=
"selectSkuStockType != 1"
>
<
template
v
-
if
=
"warmUp"
>
<
van
-
button
type
=
"primary"
block
round
disabled
>
即将开售
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;{{
warmUpTimeLabel
}}
<
/van-button
>
<
/template
>
<
template
v
-
else
-
if
=
"selectSkuStockType != 1"
>
<
van
-
button
disabled
block
round
color
=
"#DBDBDB"
>
暂时无货
<
/van-button
>
<
van
-
button
disabled
block
round
color
=
"#DBDBDB"
>
暂时无货
<
/van-button
>
<
/template
>
<
/template
>
...
@@ -110,6 +115,7 @@
...
@@ -110,6 +115,7 @@
<
script
>
<
script
>
import
{
TransferType
}
from
"@/enums"
;
import
{
TransferType
}
from
"@/enums"
;
import
{
formatTimeDuring
}
from
"@/utils"
;
export
default
{
export
default
{
props
:
{
props
:
{
value
:
{
value
:
{
...
@@ -143,6 +149,7 @@ export default {
...
@@ -143,6 +149,7 @@ export default {
desc
:
Object
,
desc
:
Object
,
goodsTypeMap
:
Object
,
goodsTypeMap
:
Object
,
transferData
:
Object
,
transferData
:
Object
,
goodsStatusMap
:
Object
,
}
,
}
,
computed
:
{
computed
:
{
skuLabel
()
{
skuLabel
()
{
...
@@ -175,6 +182,18 @@ export default {
...
@@ -175,6 +182,18 @@ export default {
pricePrefixLabel
()
{
pricePrefixLabel
()
{
return
""
;
return
""
;
}
,
}
,
warmUp
()
{
return
(
this
.
goodsStatusMap
.
WARM_UP
&&
this
.
desc
.
preheatEndTime
>=
this
.
currentTime
);
}
,
warmUpTimeLabel
()
{
let
time
=
formatTimeDuring
(
this
.
desc
.
preheatEndTime
-
this
.
currentTime
);
return
`${time.day
}
天${time.hour
}
时${time.min
}
分${time.sec
}
秒`
;
}
,
}
,
}
,
watch
:
{
watch
:
{
value
(
val
)
{
value
(
val
)
{
...
...
src/views/goods/index.vue
View file @
9cc52dd6
...
@@ -64,6 +64,8 @@
...
@@ -64,6 +64,8 @@
:goodsType=
"goodsType"
:goodsType=
"goodsType"
:goodsTypeMap=
"goodsTypeMap"
:goodsTypeMap=
"goodsTypeMap"
:transferData=
"transferData"
:transferData=
"transferData"
:goodsDesc=
"goodsDetail.desc"
:goodsStatusMap=
"goodsStatusMap"
/>
/>
<goods-sku-popup
<goods-sku-popup
...
@@ -75,6 +77,7 @@
...
@@ -75,6 +77,7 @@
:goodsTypeMap=
"goodsTypeMap"
:goodsTypeMap=
"goodsTypeMap"
:transferData=
"transferData"
:transferData=
"transferData"
:details=
"goodsDetail.details"
:details=
"goodsDetail.details"
:goodsStatusMap=
"goodsStatusMap"
@
skuChange=
"handleSkuChange"
@
skuChange=
"handleSkuChange"
@
cart=
"confirmCart"
@
cart=
"confirmCart"
@
buy=
"confirmBuy"
@
buy=
"confirmBuy"
...
@@ -123,6 +126,7 @@ import {
...
@@ -123,6 +126,7 @@ import {
GoodsTypeObj
,
GoodsTypeObj
,
OrderConfirmType
,
OrderConfirmType
,
TransferType
,
TransferType
,
GoodsStatus
}
from
"@/enums"
;
}
from
"@/enums"
;
export
default
{
export
default
{
mixins
:
[
MescrollMixin
],
mixins
:
[
MescrollMixin
],
...
@@ -160,6 +164,9 @@ export default {
...
@@ -160,6 +164,9 @@ export default {
goodsTypeObj
()
{
goodsTypeObj
()
{
return
GoodsTypeObj
[
this
.
goodsType
]
||
GoodsTypeObj
[
GoodsType
.
NORMAL
];
return
GoodsTypeObj
[
this
.
goodsType
]
||
GoodsTypeObj
[
GoodsType
.
NORMAL
];
},
},
goodsStatusMap
()
{
return
this
.
genEnumMap
(
this
.
goodsStatus
,
GoodsStatus
);
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -193,6 +200,7 @@ export default {
...
@@ -193,6 +200,7 @@ export default {
showAddr
:
false
,
showAddr
:
false
,
showDiscount
:
false
,
showDiscount
:
false
,
goodsStatus
:
GoodsStatus
.
ON_SHELF
,
};
};
},
},
watch
:
{
watch
:
{
...
@@ -272,6 +280,7 @@ export default {
...
@@ -272,6 +280,7 @@ export default {
goodsVo
=
res
;
goodsVo
=
res
;
}
}
let
{
let
{
status
,
thumb
,
thumb
,
imgList
,
imgList
,
imgListJson
,
imgListJson
,
...
@@ -293,10 +302,12 @@ export default {
...
@@ -293,10 +302,12 @@ export default {
comment
,
comment
,
shopImage
,
shopImage
,
circulation
,
circulation
,
sales
sales
,
preheatStartTime
,
preheatEndTime
}
=
goodsVo
;
}
=
goodsVo
;
imgListJson
=
JSON
.
parse
(
imgList
);
imgListJson
=
JSON
.
parse
(
imgList
);
this
.
goodsStatus
=
status
;
if
(
this
.
goodsTypeMap
.
TRANSFER
)
{
if
(
this
.
goodsTypeMap
.
TRANSFER
)
{
let
transferSku
=
skus
.
find
((
item
)
=>
item
.
skuId
==
this
.
skuId
);
let
transferSku
=
skus
.
find
((
item
)
=>
item
.
skuId
==
this
.
skuId
);
skus
=
transferSku
?
[
transferSku
]
:
[];
skus
=
transferSku
?
[
transferSku
]
:
[];
...
@@ -329,7 +340,9 @@ export default {
...
@@ -329,7 +340,9 @@ export default {
maxPrice
,
maxPrice
,
name
,
name
,
description
,
description
,
nftFile
nftFile
,
preheatStartTime
,
preheatEndTime
};
};
let
merchant
=
{
let
merchant
=
{
...
...
src/views/tab-bar/classification/index.vue
View file @
9cc52dd6
...
@@ -44,9 +44,9 @@ export default {
...
@@ -44,9 +44,9 @@ export default {
};
};
},
},
onShow
()
{
onShow
()
{
if
(
this
.
hasLogin
)
{
//
if (this.hasLogin) {
this
.
$store
.
dispatch
(
"getShoppingCart"
);
//
this.$store.dispatch("getShoppingCart");
}
//
}
},
},
computed
:
{
computed
:
{
...
mapGetters
([
"hasLogin"
]),
...
mapGetters
([
"hasLogin"
]),
...
...
src/views/tab-bar/home/goods-list/blind-goods.vue
View file @
9cc52dd6
...
@@ -6,13 +6,9 @@
...
@@ -6,13 +6,9 @@
<div
class=
"con-wrapper flex-default"
>
<div
class=
"con-wrapper flex-default"
>
<div
class=
"left-img"
>
<div
class=
"left-img"
>
<img
class=
"thumb"
:src=
"data.thumb"
/>
<img
class=
"thumb"
:src=
"data.thumb"
/>
<div
class=
"goods-stock"
v-if=
"data.stockCount"
>
<div
class=
"goods-stock"
:style=
"
{'background':goodStatus.bgColor}">
<m-icon
icon=
"icon-hot-goods"
:size=
"10"
/>
<m-icon
:icon=
"goodStatus.icon"
:size=
"10"
/>
<span>
热销中
</span>
<span>
{{
goodStatus
.
name
}}
</span>
</div>
<div
class=
"goods-stock"
v-else
>
<m-icon
icon=
"icon-sell-out"
:size=
"10"
/>
<span>
已售罄
</span>
</div>
</div>
</div>
</div>
<div
class=
"right-con flex-default"
>
<div
class=
"right-con flex-default"
>
...
@@ -31,6 +27,7 @@
...
@@ -31,6 +27,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
formatTimeDuring
}
from
"@/utils"
;
export
default
{
export
default
{
props
:
{
props
:
{
data
:
{
data
:
{
...
@@ -40,6 +37,46 @@ export default {
...
@@ -40,6 +37,46 @@ export default {
},
},
},
},
},
},
computed
:{
goodStatus
(){
let
obj
=
{
name
:
""
,
icon
:
""
,
bgColor
:
""
}
if
(
this
.
data
.
preheatEndTime
&&
this
.
data
.
preheatEndTime
>
this
.
currentTime
){
let
time
=
formatTimeDuring
(
this
.
data
.
preheatEndTime
-
this
.
currentTime
)
let
dayhours
=
parseInt
(
time
.
day
)
*
24
+
parseInt
(
time
.
hour
)
if
(
dayhours
<
9
){
dayhours
=
'0'
+
dayhours
}
if
(
dayhours
<
1
){
dayhours
=
"00"
}
obj
=
{
name
:
`即将开始
${
dayhours
}
:
${
time
.
min
}
:
${
time
.
sec
}
`
,
icon
:
"icon-clocks-and-watches"
,
bgColor
:
"#4CC16D"
}
}
else
{
if
(
this
.
data
.
stockCount
){
obj
=
{
name
:
"热销中"
,
icon
:
"icon-hot-goods"
,
bgColor
:
"rgba(0, 0, 0, 0.2)"
}
}
else
{
obj
=
{
name
:
"已售罄"
,
icon
:
"icon-sell-out"
,
bgColor
:
"rgba(0, 0, 0, 0.2)"
}
}
}
return
obj
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
@@ -78,7 +115,7 @@ export default {
...
@@ -78,7 +115,7 @@ export default {
span {
span {
font-size: 11px;
font-size: 11px;
color: #ffffff;
color: #ffffff;
margin-left:
1
px;
margin-left:
2
px;
}
}
}
}
}
}
...
...
src/views/tab-bar/home/goods-list/blind-goods11.vue
deleted
100644 → 0
View file @
58970361
<
template
>
<div
class=
"goods-list-template-con"
>
<div
class=
"blind-goods-item-con"
>
<div
class=
"header"
>
<div
class=
"title"
>
盲盒
</div>
</div>
<div
class=
"item-list-con flex-default"
v-for=
"(item, index) of list"
:key=
"'goods-item-' + index"
@
click=
"goGoods(item.goodsId, item.type,item.salesType)"
>
<div
class=
"left-img"
>
<img
class=
"thumb"
:src=
"item.thumb"
/>
<div
class=
"goods-stock"
v-if=
"item.stockCount"
>
<m-icon
icon=
"icon-hot-goods"
:size=
"10"
/>
<span>
热销中
</span>
</div>
<div
class=
"goods-stock"
v-else
>
<m-icon
icon=
"icon-sell-out"
:size=
"10"
/>
<span>
已售罄
</span>
</div>
</div>
<div
class=
"right-con flex-default"
>
<div
class=
"title"
>
{{
item
.
name
}}
</div>
<div
class=
"circulationCount flex-default"
>
<div
class=
"label"
>
限量
</div>
<div
class=
"num"
>
{{
item
.
circulationCount
}}
份
</div>
</div>
<div
class=
"value"
>
<span
class=
"yen"
>
¥
</span>
{{
item
.
defaultPrice
||
0
}}
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
GoodsItem
from
"./goods-item.vue"
;
export
default
{
components
:
{
GoodsItem
,
},
props
:
{
title
:
{
type
:
String
,
default
:
"电影专区"
,
},
line
:
{
type
:
Number
,
default
:
1
,
},
floorId
:
String
,
},
data
()
{
return
{
loading
:
true
,
list
:
[],
};
},
computed
:
{},
methods
:
{
requestData
()
{
this
.
loading
=
true
;
let
param
=
this
.
floorId
;
this
.
$api
({
apiName
:
"getFloorGoods"
,
postData
:
{
param
,
page
:
1
,
size
:
this
.
line
*
3
,
},
success
:
(
res
)
=>
{
this
.
list
=
res
.
list
;
setTimeout
(()
=>
{
this
.
loading
=
false
;
this
.
$emit
(
"loadSuccess"
);
},
500
);
},
});
},
},
};
</
script
>
<
style
lang=
"less"
>
.goods-list-template-con {
padding: 18px 11px;
background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
.blind-goods-item-con {
.header {
justify-content: space-between;
align-items: center;
color: #140603;
height: 50px;
line-height: 20px;
padding: 0 16px;
// margin-bottom: 20px;
.title {
font-weight: bold;
font-size: 16px;
align-items: flex-start;
line-height: 20px;
height: 15px;
}
}
.item-list-con {
background: url(~@/assets/img/blind-card.png) no-repeat;
background-size: 100% 100%;
margin-bottom: 45px;
padding: 28px;
height: 160px;
.left-img {
position: relative;
width: 120px;
height: 146px;
border-radius: 10px;
// overflow: hidden;
.thumb {
width: 120px;
height: 146px;
border-radius: 10px;
object-fit: cover;
margin-top: -25px;
}
.goods-stock {
position: absolute;
background: rgba(0, 0, 0, 0.2);
border-radius: 0 0 10px 10px;
width: 120px;
height: 18px;
bottom: 25px;
left: 0;
line-height: 18px;
text-align: center;
span {
font-size: 11px;
color: #ffffff;
margin-left: 1px;
}
}
}
.right-con {
flex-direction: column;
align-items: flex-start;
justify-content: space-around;
height: 130px;
padding:5px 10px 10px;
.title {
width: 170px;
font-size: 15px;
font-weight: 500;
color: #030711;
line-height: 21px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.circulationCount {
width: 86px;
height: 16px;
line-height: 16px;
font-size: 10px;
overflow: hidden;
border-radius: 2px;
margin-bottom: 22px;
.label {
width: 35px;
height: 16px;
text-align: center;
background: #f3e0bc;
color: #030711;
}
.num {
width: 51px;
height: 16px;
background: #4b4b4c;
color: #f3e0bc;
text-align: center;
}
}
.value {
font-size: 22px;
color: #f78706;
.yen {
display: inline-block;
font-size: 14px;
transform: scale(0.8);
font-weight: normal;
width: 14px;
}
}
}
}
}
}
</
style
>
\ No newline at end of file
src/views/tab-bar/home/goods-list/digital-collection-goods.vue
View file @
9cc52dd6
...
@@ -5,14 +5,10 @@
...
@@ -5,14 +5,10 @@
>
>
<div
class=
"img-box"
>
<div
class=
"img-box"
>
<img
class=
"thumb"
:src=
"data.thumb"
/>
<img
class=
"thumb"
:src=
"data.thumb"
/>
<div
class=
"goods-stock"
v-if=
"data.stockCount"
>
<div
class=
"goods-stock"
:style=
"
{'background':goodStatus.bgColor}">
<m-icon
icon=
"icon-hot-goods"
:size=
"10"
/>
<m-icon
:icon=
"goodStatus.icon"
:size=
"10"
/>
<span>
热销中
</span>
<span>
{{
goodStatus
.
name
}}
</span>
</div>
</div>
<div
class=
"goods-stock"
v-else
>
<m-icon
icon=
"icon-sell-out"
:size=
"10"
/>
<span>
已售罄
</span>
</div>
</div>
</div>
<div
class=
"goods-desc"
>
<div
class=
"goods-desc"
>
<div
class=
"name"
>
{{
data
.
name
}}
</div>
<div
class=
"name"
>
{{
data
.
name
}}
</div>
...
@@ -29,6 +25,7 @@
...
@@ -29,6 +25,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
formatTimeDuring
}
from
"@/utils"
;
export
default
{
export
default
{
props
:
{
props
:
{
data
:
{
data
:
{
...
@@ -38,6 +35,45 @@ export default {
...
@@ -38,6 +35,45 @@ export default {
},
},
},
},
},
},
computed
:{
goodStatus
(){
let
obj
=
{
name
:
""
,
icon
:
""
,
bgColor
:
""
}
if
(
this
.
data
.
preheatEndTime
&&
this
.
data
.
preheatEndTime
>
this
.
currentTime
){
let
time
=
formatTimeDuring
(
this
.
data
.
preheatEndTime
-
this
.
currentTime
)
let
dayhours
=
parseInt
(
time
.
day
)
*
24
+
parseInt
(
time
.
hour
)
if
(
dayhours
<
9
){
dayhours
=
'0'
+
dayhours
}
if
(
dayhours
<
1
){
dayhours
=
"00"
}
obj
=
{
name
:
`即将开始
${
dayhours
}
:
${
time
.
min
}
:
${
time
.
sec
}
`
,
icon
:
"icon-clocks-and-watches"
,
bgColor
:
"#4CC16D"
}
}
else
{
if
(
this
.
data
.
stockCount
){
obj
=
{
name
:
"热销中"
,
icon
:
"icon-hot-goods"
,
bgColor
:
"rgba(0, 0, 0, 0.2)"
}
}
else
{
obj
=
{
name
:
"已售罄"
,
icon
:
"icon-sell-out"
,
bgColor
:
"rgba(0, 0, 0, 0.2)"
}
}
}
return
obj
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
@@ -61,7 +97,7 @@ export default {
...
@@ -61,7 +97,7 @@ export default {
top: 14px;
top: 14px;
left: 12px;
left: 12px;
background: rgba(0, 0, 0, 0.2);
background: rgba(0, 0, 0, 0.2);
border-radius:
0 0
2px 2px;
border-radius:2px 2px;
// width: 120px;
// width: 120px;
height: 18px;
height: 18px;
line-height: 18px;
line-height: 18px;
...
@@ -70,7 +106,7 @@ export default {
...
@@ -70,7 +106,7 @@ export default {
span {
span {
font-size: 11px;
font-size: 11px;
color: #ffffff;
color: #ffffff;
margin-left:
1
px;
margin-left:
2
px;
margin-right: 1px;
margin-right: 1px;
}
}
}
}
...
...
src/views/tab-bar/user-center/index.vue
View file @
9cc52dd6
...
@@ -194,7 +194,7 @@ export default {
...
@@ -194,7 +194,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
if
(
this
.
hasLogin
)
{
if
(
this
.
hasLogin
)
{
this
.
$store
.
dispatch
(
"getShoppingCart"
);
//
this.$store.dispatch("getShoppingCart");
if
(
this
.
isShow
>
0
)
{
if
(
this
.
isShow
>
0
)
{
this
.
getUserCount
();
this
.
getUserCount
();
}
}
...
...
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