Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
c03517f0
Commit
c03517f0
authored
Oct 29, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
7aa5295c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
174 additions
and
179 deletions
+174
-179
CanEatAnswerPopup.vue
components/CanEatAnswerPopup.vue
+13
-1
index.vue
pages/index/index.vue
+1
-1
addressEdit.vue
v3/addressList/addressEdit.vue
+108
-153
addressList.vue
v3/addressList/addressList.vue
+4
-4
orderDetail.vue
v3/orderDetail/orderDetail.vue
+47
-19
My.vue
views/My.vue
+1
-1
No files found.
components/CanEatAnswerPopup.vue
View file @
c03517f0
<
template
>
<uni-popup
ref=
"answerPopup"
type=
"bottom"
:maskClick=
"false"
:safe-area=
"true"
>
<uni-popup
ref=
"answerPopup"
type=
"bottom"
:maskClick=
"false"
:safe-area=
"true"
:backgroundColor=
"'rgba(0, 0, 0, 0.5)'"
>
<view
class=
"answer-popup-container"
>
<view
class=
"answer-popup"
>
<!-- 关闭按钮 -->
...
...
@@ -151,9 +151,21 @@ export default {
},
methods
:
{
openPopup
()
{
// 禁止背景页面滚动(小程序原生方式)
wx
.
setPageStyle
({
style
:
{
overflow
:
'hidden'
}
});
this
.
$refs
.
answerPopup
.
open
();
},
closePopup
()
{
// 恢复背景页面滚动(小程序原生方式)
wx
.
setPageStyle
({
style
:
{
overflow
:
'auto'
}
});
if
(
this
.
$refs
.
answerPopup
)
{
this
.
$refs
.
answerPopup
.
close
();
}
...
...
pages/index/index.vue
View file @
c03517f0
...
...
@@ -75,7 +75,7 @@
<!-- 悬浮授权手机号模块 -->
<view
class=
"auth-phone-module"
v-if=
"
true ||
!userStore.memberInfo?.mobile"
>
<view
class=
"auth-phone-module"
v-if=
"!userStore.memberInfo?.mobile"
>
<image
class=
"auth-phone-bg"
:src=
"$baseUrl + 'homepage/Q3Res/accessBg3.png'"
></image>
<view
class=
"auth-phone-btn-container"
>
<image
class=
"auth-phone-btn"
:src=
"$baseUrl + 'homepage/Q3Res/accessBtn3.png'"
@
tap=
"handleAuthPhoneClick"
>
...
...
v3/addressList/addressEdit.vue
View file @
c03517f0
...
...
@@ -3,7 +3,8 @@
<view
class=
"form-container"
>
<view
class=
"form-item"
>
<text
class=
"label"
>
收货人
</text>
<input
class=
"input"
v-model=
"formData.name"
placeholder=
"请输入收货人姓名"
maxlength=
"30"
@
input=
"limitNameInput"
/>
<input
class=
"input"
v-model=
"formData.name"
placeholder=
"请输入收货人姓名"
maxlength=
"30"
@
input=
"limitNameInput"
/>
<view
class=
"wechat-import"
@
tap=
"importFromWechat"
>
<image
class=
"wechat-icon"
:src=
"$baseUrl + 'homepage/Q3Res/wechatIcon.png'"
mode=
"aspectFit"
>
</image>
...
...
@@ -60,23 +61,18 @@
<!-- 面包屑导航 -->
<view
class=
"breadcrumb-container"
>
<view
class=
"breadcrumb-item"
:class=
"
{ 'active': currentLevel === 0 }"
@tap="switchToLevel(0)">
<view
class=
"breadcrumb-item"
:class=
"
{ 'active': currentLevel === 0 }" @tap="switchToLevel(0)">
{{
selectedProvince
?
selectedProvince
.
name
:
'请选择'
}}
</view>
<view
v-if=
"showCityLevel"
class=
"breadcrumb-item"
:class=
"
{ 'active': currentLevel === 1 }"
<view
v-if=
"showCityLevel"
class=
"breadcrumb-item"
:class=
"
{ 'active': currentLevel === 1 }"
@tap="switchToLevel(1)">
{{
selectedCity
?
selectedCity
.
name
:
'请选择'
}}
</view>
<view
v-if=
"showDistrictLevel"
class=
"breadcrumb-item"
:class=
"
{ 'active': currentLevel === 2 }"
<view
v-if=
"showDistrictLevel"
class=
"breadcrumb-item"
:class=
"
{ 'active': currentLevel === 2 }"
@tap="switchToLevel(2)">
{{
selectedDistrict
?
selectedDistrict
.
name
:
'请选择'
}}
</view>
<view
v-if=
"showStreetLevel"
class=
"breadcrumb-item"
:class=
"
{ 'active': currentLevel === 3 }"
<view
v-if=
"showStreetLevel"
class=
"breadcrumb-item"
:class=
"
{ 'active': currentLevel === 3 }"
@tap="switchToLevel(3)">
{{
selectedStreet
?
selectedStreet
.
name
:
'请选择'
}}
</view>
...
...
@@ -86,11 +82,8 @@
<text
class=
"loading-text"
>
加载中...
</text>
</view>
<view
v-else
class=
"picker-list"
>
<view
v-for=
"(item, index) in currentLevelData"
:key=
"index"
class=
"picker-item"
:class=
"
{ 'selected': isItemSelected(item, index) }"
@tap="selectItem(item, index)">
<view
v-for=
"(item, index) in currentLevelData"
:key=
"index"
class=
"picker-item"
:class=
"
{ 'selected': isItemSelected(item, index) }" @tap="selectItem(item, index)">
<text
class=
"item-text"
>
{{
item
.
name
}}
</text>
<text
v-if=
"isItemSelected(item, index)"
class=
"check-icon"
>
✓
</text>
</view>
...
...
@@ -670,8 +663,7 @@ export default {
// 设置为默认地址
async
setAsDefault
()
{
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
this
.
isSubmitting
=
true
;
try
{
// 先获取当前地址列表,检查是否已有默认地址
const
response
=
await
getAddressList
();
...
...
@@ -699,7 +691,7 @@ export default {
icon
:
'none'
});
}
finally
{
this
.
isSubmitting
=
false
;
}
},
...
...
@@ -732,7 +724,12 @@ export default {
handleSave
()
{
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
if
(
!
this
.
validateForm
())
return
;
this
.
isSubmitting
=
true
console
.
warn
(
"保存"
)
if
(
!
this
.
validateForm
())
{
this
.
isSubmitting
=
false
return
};
// 构建完整地址
const
addressInfo
=
{
...
...
@@ -751,8 +748,7 @@ export default {
// 保存地址(新增)
async
saveAddress
(
addressInfo
)
{
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
this
.
isSubmitting
=
true
;
this
.
isLoading
=
true
;
try
{
// 如果要设为默认地址,先处理其他默认地址
...
...
@@ -780,18 +776,20 @@ export default {
if
(
response
.
ok
&&
response
.
success
)
{
uni
.
showToast
({
title
:
'添加成功'
,
icon
:
'
success
'
,
icon
:
'
none
'
,
success
:
()
=>
{
setTimeout
(()
=>
{
this
.
isSubmitting
=
false
;
uni
.
navigateBack
();
},
1500
);
}
});
}
else
{
uni
.
showToast
({
title
:
response
.
m
sg
||
'保存失败'
,
title
:
response
.
m
essage
||
'保存失败'
,
icon
:
'none'
});
this
.
isSubmitting
=
false
;
}
}
catch
(
error
)
{
console
.
error
(
'保存地址失败:'
,
error
);
...
...
@@ -799,17 +797,17 @@ export default {
title
:
'网络错误,请重试'
,
icon
:
'none'
});
this
.
isSubmitting
=
false
;
}
finally
{
this
.
isLoading
=
false
;
this
.
isSubmitting
=
false
;
}
},
// 更新地址(编辑)
async
updateAddress
(
addressInfo
)
{
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
this
.
isSubmitting
=
true
;
this
.
isLoading
=
true
;
try
{
// 如果要设为默认地址,先处理其他默认地址
...
...
@@ -838,18 +836,20 @@ export default {
if
(
response
.
ok
&&
response
.
success
)
{
uni
.
showToast
({
title
:
'更新成功'
,
icon
:
'
success
'
,
icon
:
'
none
'
,
success
:
()
=>
{
setTimeout
(()
=>
{
this
.
isSubmitting
=
false
;
uni
.
navigateBack
();
},
1500
);
}
});
}
else
{
uni
.
showToast
({
title
:
response
.
m
sg
||
'更新失败'
,
title
:
response
.
m
essage
||
'更新失败'
,
icon
:
'none'
});
this
.
isSubmitting
=
false
;
}
}
catch
(
error
)
{
console
.
error
(
'更新地址失败:'
,
error
);
...
...
@@ -857,9 +857,9 @@ export default {
title
:
'网络错误,请重试'
,
icon
:
'none'
});
this
.
isSubmitting
=
false
;
}
finally
{
this
.
isLoading
=
false
;
this
.
isSubmitting
=
false
;
}
},
...
...
@@ -881,53 +881,7 @@ export default {
}
},
// 删除地址
deleteAddress
()
{
// 防连点检查
if
(
this
.
isSubmitting
)
return
;
uni
.
showModal
({
title
:
'确认删除'
,
content
:
'确定要删除这个地址吗?'
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
success
:
async
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
.
isSubmitting
=
true
;
this
.
isLoading
=
true
;
try
{
const
response
=
await
deleteAddress
({
id
:
this
.
addressId
});
console
.
log
(
'删除地址接口返回:'
,
response
);
if
(
response
.
ok
&&
response
.
success
)
{
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'success'
,
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
navigateBack
();
},
1500
);
}
});
}
else
{
uni
.
showToast
({
title
:
response
.
msg
||
'删除失败'
,
icon
:
'none'
});
}
}
catch
(
error
)
{
console
.
error
(
'删除地址失败:'
,
error
);
uni
.
showToast
({
title
:
'网络错误,请重试'
,
icon
:
'none'
});
}
finally
{
this
.
isLoading
=
false
;
this
.
isSubmitting
=
false
;
}
}
}
});
},
// 返回上一页
goBack
()
{
...
...
@@ -1190,6 +1144,7 @@ export default {
from
{
transform
:
translateY
(
100%
);
}
to
{
transform
:
translateY
(
0
);
}
...
...
v3/addressList/addressList.vue
View file @
c03517f0
...
...
@@ -239,7 +239,7 @@ export default {
this
.
addressList
.
splice
(
this
.
currentDeleteIndex
,
1
);
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'
success
'
icon
:
'
none
'
});
}
else
{
uni
.
showToast
({
...
...
v3/orderDetail/orderDetail.vue
View file @
c03517f0
...
...
@@ -65,13 +65,15 @@
<text
class=
"copy-btn"
@
click=
"copyCouponCode(orderData.coupon.cards[0].code)"
>
复制
</text>
</view>
<!-- 卡密展示 - 如果存在pwd字段 -->
<text
v-if=
"orderData.coupon.cards[0].pwd"
class=
"coupon-label"
>
卡密
</text>
<view
v-if=
"orderData.coupon.cards[0].pwd"
class=
"coupon-code-content"
>
<!-- 卡密展示 - 如果存在pwd字段,换行显示 -->
<view
v-if=
"orderData.coupon.cards[0].pwd"
class=
"pwd-section"
>
<text
class=
"coupon-label"
>
卡密
</text>
<view
class=
"coupon-code-content"
>
<text
class=
"coupon-code"
>
{{
orderData
.
coupon
.
cards
[
0
].
pwd
}}
</text>
<text
class=
"copy-btn"
@
click=
"copyCouponCode(orderData.coupon.cards[0].pwd)"
>
复制
</text>
</view>
</view>
</view>
<!-- 过期时间 -->
<view
v-if=
"orderData.expireTime"
class=
"expire-time-item"
>
...
...
@@ -159,9 +161,11 @@
<!-- 操作按钮 - 实物订单退货按钮在右下角 -->
<view
v-if=
"showActionButton"
class=
"action-container"
>
<button
class=
"action-btn"
:class=
"{
<view
v-if=
"orderData.productType === 'virtual' && orderData.virtualType === 'coupon'"
class=
"action-btn btn-use"
@
click=
"handleAction"
>
<image
:src=
"$baseUrl + 'homepage/Q3Res/orderDetailToUseBtn.png'"
mode=
"aspectFill"
></image>
</view>
<button
v-else
class=
"action-btn"
:class=
"{
'btn-refund': orderData.productType === 'physical',
'btn-use': orderData.productType === 'virtual',
'corner-btn': orderData.productType === 'physical'
}"
@
click=
"handleAction"
>
{{ actionButtonText }}
</button>
</view>
...
...
@@ -391,7 +395,7 @@ export default {
// 页面跳转
navigateToCoupon
:
()
=>
{
const
url
=
'subPackages/
xmhMainProcess/mine/index
'
;
const
url
=
'subPackages/
shopMainProcess/coupons/couponList
'
;
const
type
=
JumpType
.
MINI
;
const
extra
=
{
appId
:
'wx4205ec55b793245e'
,
//星妈优选小程序
...
...
@@ -1108,8 +1112,13 @@ export default {
padding
:
80
rpx
30
rpx
;
box-shadow
:
0
-2
rpx
10
rpx
rgba
(
0
,
0
,
0
,
0.1
);
z-index
:
100
;
/*
实物商品按钮使用flex布局,将
按钮推到右侧 */
/*
虚拟商品按钮居中显示,实物商品
按钮推到右侧 */
display
:
flex
;
justify-content
:
center
;
}
/* 实物商品按钮容器特殊样式 */
.action-container
:has
(
.btn-refund
)
{
justify-content
:
flex-end
;
}
...
...
@@ -1120,6 +1129,7 @@ export default {
border-radius
:
44
rpx
;
font-size
:
32
rpx
;
font-weight
:
bold
;
text-align
:
center
;
}
/* 实物商品申请退货按钮样式 - 右下角 */
...
...
@@ -1139,20 +1149,38 @@ export default {
z-index
:
101
;
}
/* 去使用图片按钮样式 */
.action-btn.btn-use
{
background-color
:
#d3a458
;
color
:
#fff
;
background-color
:
transparent
;
/* 虚拟商品按钮保持在容器中 */
position
:
static
;
box-shadow
:
none
;
/* 确保图片充满按钮 */
overflow
:
hidden
;
/* 调整按钮尺寸为484*90 */
width
:
484
rpx
;
height
:
90
rpx
;
border-radius
:
45
rpx
;
}
/* 去使用按钮内的图片样式 */
.action-btn.btn-use
image
{
width
:
100%
;
height
:
100%
;
border-radius
:
45
rpx
;
}
/* 券码和过期时间样式 - 现在是模块1的一部分 */
.coupon-section
{
/* 已迁移到module-card-code */
margin-top
:
30
rpx
;
padding-top
:
30
rpx
;
border-top
:
1
rpx
solid
#f0f0f0
;
}
.coupon-code-item
{
margin-bottom
:
20
rpx
;
}
.coupon-code-item
,
.expire-time-item
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -1160,6 +1188,11 @@ export default {
margin-bottom
:
20
rpx
;
}
/* 卡号和卡密之间的间距 */
.pwd-section
{
margin-top
:
20
rpx
;
}
.coupon-label
{
font-size
:
28
rpx
;
color
:
#666
;
...
...
@@ -1219,12 +1252,7 @@ export default {
border-radius
:
20
rpx
;
}
/* 券码和过期时间样式 */
.coupon-section
{
margin-top
:
30
rpx
;
padding-top
:
30
rpx
;
border-top
:
1
rpx
solid
#f0f0f0
;
}
/* 券码和过期时间样式 - 已在上方定义 */
/* 使用说明样式 - 现在是模块3 */
.usage-instructions
{
...
...
views/My.vue
View file @
c03517f0
...
...
@@ -352,7 +352,7 @@ function clickRegisterShield() {
// 页面跳转
const
navigateToCoupon
=
()
=>
{
const
url
=
'subPackages/
xmhMainProcess/mine/index
'
;
const
url
=
'subPackages/
shopMainProcess/coupons/couponList
'
;
const
type
=
JumpType
.
MINI
;
const
extra
=
{
appId
:
'wx4205ec55b793245e'
,
//星妈优选小程序
...
...
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