Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-shop-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-shop-show-h5
Commits
d26bd316
提交
d26bd316
authored
7月 11, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
eb4ce641
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
28 行增加
和
9 行删除
+28
-9
BuyPopup.vue
src/pages/buy/components/BuyPopup.vue
+15
-4
index.vue
src/pages/buy/index.vue
+13
-5
没有找到文件。
src/pages/buy/components/BuyPopup.vue
浏览文件 @
d26bd316
...
...
@@ -13,7 +13,12 @@
</div>
<van-field
:label=
"spec_title"
class=
"tag-item is-vertical"
>
<template
#
input
>
<tag-selection
v-model=
"spec"
:data=
"specList"
:options=
"
{ label: 'spec_values', value: 'sku_id' }" @currentSelected="handleTagSelected" />
<tag-selection
v-model=
"spec"
:data=
"specList"
:options=
"
{ label: 'spec_values', value: 'sku_id' }"
@currentSelected="handleTagSelected"
/>
</
template
>
<!-- 提示 -->
<
template
#
extra
v-if=
"options.spare"
>
...
...
@@ -51,7 +56,13 @@
<van-button
type=
"primary"
round
block
color=
"#C01540"
size=
"small"
>
下一步
</van-button>
</div>
</van-form>
<van-dialog
v-model=
"dialogVisiable"
title=
"请选择支付方式"
show-cancel-button
getContainer=
"body"
@
confirm=
"handleDialogConfirm"
>
<van-dialog
v-model=
"dialogVisiable"
title=
"请选择支付方式"
show-cancel-button
getContainer=
"body"
@
confirm=
"handleDialogConfirm"
>
<van-radio-group
v-model=
"payType"
>
<van-radio
name=
"12"
>
支付宝支付
</van-radio>
<van-radio
name=
"4"
>
微信支付
</van-radio>
...
...
@@ -242,8 +253,8 @@ export default {
spu_id
:
this
.
spu_id
}
getGoodsSpecs
(
params
).
then
(
res
=>
{
this
.
specList
=
res
.
data
const
[
first
=
{}]
=
res
.
data
this
.
specList
=
res
.
data
||
[]
const
[
first
=
{}]
=
res
.
data
||
[]
this
.
spec_title
=
first
.
spec_names
this
.
spec
=
first
.
sku_id
this
.
price
=
first
.
price
...
...
src/pages/buy/index.vue
浏览文件 @
d26bd316
...
...
@@ -2,11 +2,16 @@
<div
class=
"buy-container"
>
<van-swipe
class=
"my-swipe"
indicator-color=
"white"
@
change=
"index => (swipeAcitve = index)"
>
<van-swipe-item
class=
"video"
v-if=
"details.main_chart_oss"
@
click=
"handleVideoClick"
>
<video
:src=
"details.main_chart_oss"
playsinline
:poster=
"`$
{details.main_chart_oss}?x-oss-process=video/snapshot,t_10,f_jpg,w_0,h_0,m_fast`" ref="video">
</video>
<video
:src=
"details.main_chart_oss"
playsinline
:poster=
"`$
{details.main_chart_oss}?x-oss-process=video/snapshot,t_10,f_jpg,w_0,h_0,m_fast`"
ref="video"
>
</video>
<van-icon
:name=
"videoPlay ? 'pause-circle-o' : 'play-circle-o'"
/>
</van-swipe-item>
<van-swipe-item
v-for=
"(item, index) in imgList"
:key=
"item.url"
>
<img
v-if=
"swipeAcitve ===
index + 1
"
:src=
"item.url"
/>
<img
v-if=
"swipeAcitve ===
(details.main_chart_oss ? index + 1 : index)
"
:src=
"item.url"
/>
</van-swipe-item>
</van-swipe>
<div
class=
"item price-item"
>
...
...
@@ -42,7 +47,9 @@
<div
v-html=
"details.spu_context"
></div>
</div>
<div
class=
"bottom-bar"
v-if=
"details.status === '2'"
>
<van-button
type=
"primary"
round
block
color=
"#C01540"
size=
"small"
@
click=
"handleBuy"
>
{{ details.buy_button_text || '立即购买' }}
</van-button>
<van-button
type=
"primary"
round
block
color=
"#C01540"
size=
"small"
@
click=
"handleBuy"
>
{{
details.buy_button_text || '立即购买'
}}
</van-button>
</div>
<buy-popup
v-model=
"popupVisiable"
:options=
"popupOptions"
@
placeOrder=
"handlePlaceOrder"
/>
<phone-code-login-popup
v-model=
"loginPopupVisiable"
@
loginSuccess=
"popupVisiable = true"
/>
...
...
@@ -167,7 +174,9 @@ export default {
this
.
fetchPlaceOrder
(
params
)
},
getCode
()
{
const
redirectURI
=
`https://pages.ezijing.com/given/auth.html?redirect_uri=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
const
redirectURI
=
`https://pages.ezijing.com/given/auth.html?redirect_uri=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
window
.
location
.
href
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx451c01d40d090d7a&redirect_uri=
${
redirectURI
}
&response_type=code&scope=snsapi_base#wechat_redirect`
},
// 获取微信openid
...
...
@@ -196,7 +205,6 @@ export default {
if
(
typeof
imgsJson
===
'string'
&&
Array
.
isArray
(
JSON
.
parse
(
imgsJson
)))
{
this
.
imgList
=
JSON
.
parse
(
imgsJson
)
}
this
.
swipeAcitve
=
first
.
main_chart_oss
?
0
:
1
this
.
popupOptions
=
{
spare
:
this
.
spare
,
goods
:
first
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论