Compare commits
3 Commits
0a8c876ba8
...
6edc620509
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6edc620509 | ||
|
|
6f300f50fe | ||
|
|
0b7d4dbc47 |
10
api/pointShop.js
Normal file
10
api/pointShop.js
Normal file
@ -0,0 +1,10 @@
|
||||
export const apiArr = {
|
||||
pointShopTab: "/api/v2/wechat/points-mall/tab", //积分商城tab
|
||||
pointShopPage: "/api/v2/wechat/points-mall/page", //积分商城列表分页
|
||||
platformPointsRule: "/api/v2/wechat/points-mall/platform-points-rule", //平台积分规则
|
||||
pointShopRecord: "/api/v2/wechat/points-mall/order/record", //积分商城兑换记录
|
||||
pointShopPay: "/api/v2/wechat/points-mall/order/pay", //积分商城订单支付
|
||||
pointOrderInfo: "/api/v2/wechat/points-mall/order/info", //积分商城订单详情
|
||||
pointShopAdd: "/api/v2/wechat/points-mall/order/add", //积分商城创建订单
|
||||
pointGoodInfo: "/api/v2/wechat/points-mall/info", //积分商城商品详情
|
||||
};
|
||||
@ -1,6 +1,6 @@
|
||||
export const apiArr = {
|
||||
getUserInfo: '/api/v2/wechat/mpuser-crud/info', // 获取城市列表
|
||||
userInfoUpdate: '/api/v2/wechat/mpuser-crud/update', // 会员信息更新
|
||||
getAccumulationFund: '/api/v2/wechat/government-housing-fund-flow-crud/page', // 物业费
|
||||
getAccumulationFund: '/api/v2/wechat/government-housing-fund-flow-crud/page', // 岁银
|
||||
getPoints: '/api/v2/wechat/member-points-flow-crud/page', // 积分
|
||||
}
|
||||
@ -10,7 +10,7 @@
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"category_name": "物业费"
|
||||
"category_name": "岁银"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
@ -30,7 +30,7 @@
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "物业费",
|
||||
"title": "岁银",
|
||||
"pic": "https://static.hshuishang.com/Group_3679.png"
|
||||
},
|
||||
{
|
||||
@ -43,17 +43,17 @@
|
||||
{
|
||||
"id": 1,
|
||||
"title": "物业介绍",
|
||||
"content": "您好!\n 物业服务中心是小区专属服务团队,核心服务包括:物业费收缴、公共区域清洁维护、设施设备(电梯/水电/绿化)检修、秩序安全管理,及应急事件响应、活动组织等日常事务。\n 我们始终以\"用心服务、共建美好\"为宗旨,欢迎大家监督并提出改进建议。感谢您的理解与配合,让我们携手维护舒心的园区环境!"
|
||||
"content": "您好!\n 物业服务中心是小区专属服务团队,核心服务包括:岁银收缴、公共区域清洁维护、设施设备(电梯/水电/绿化)检修、秩序安全管理,及应急事件响应、活动组织等日常事务。\n 我们始终以\"用心服务、共建美好\"为宗旨,欢迎大家监督并提出改进建议。感谢您的理解与配合,让我们携手维护舒心的园区环境!"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "物业缴费",
|
||||
"content": "各位业主:\n 为简化缴费流程,提升服务效率,物业已上线\"线上+线下\"一体化缴费功能,支持物业费、车位费、公共能耗费等各类费用便捷缴纳,具体使用说明如下:\n一、线上缴费(推荐)\n 1. 小程序端操作:打开物业专属小程序,进入\"我的-物业缴费\"页面,系统将自动展示您需缴纳的费用账单(含费用类型、金额、缴费周期等明细);确认账单无误后,选择微信支付,点击\"确认缴费\"即可完成。\n 2. 账单查询:在缴费页面点击\"缴费记录\",可查看缴费明细(含缴费时间、金额、凭证号)。\n二、线下缴费(备用)\n若您偏好线下办理,可前往物业前台,通过现金、银行卡、移动支付(微信/支付宝扫码)完成缴费。"
|
||||
"content": "各位业主:\n 为简化缴费流程,提升服务效率,物业已上线\"线上+线下\"一体化缴费功能,支持岁银、车位费、公共能耗费等各类费用便捷缴纳,具体使用说明如下:\n一、线上缴费(推荐)\n 1. 小程序端操作:打开物业专属小程序,进入\"我的-物业缴费\"页面,系统将自动展示您需缴纳的费用账单(含费用类型、金额、缴费周期等明细);确认账单无误后,选择微信支付,点击\"确认缴费\"即可完成。\n 2. 账单查询:在缴费页面点击\"缴费记录\",可查看缴费明细(含缴费时间、金额、凭证号)。\n二、线下缴费(备用)\n若您偏好线下办理,可前往物业前台,通过现金、银行卡、移动支付(微信/支付宝扫码)完成缴费。"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "物业费",
|
||||
"content": "各位业主:\n 上线\"物业费\"功能,其核心规则与使用方式如下,覆盖所有房产通用场景:\n一、物业费的获取方式\n 通过周边合作门店消费,即可获得物业费;\n二、跨房产通用:一份公积金,多房产可用\n 您的个人物业费不绑定单一房产,可通用至您已加入的所有房产。例如:您的个人公积金,既可抵扣A小区的物业费,也可抵扣您加入的B小区的水电费、C小区的燃气费,无需额外转移或申请。\n三、查询与透明化\n 在物业平台\"我的-物业费\"页面,可实时查看:个人公积金余额、所属房产的总额、抵扣记录(含抵扣房产、金额、个人扣除份额),确保每笔使用清晰可溯。"
|
||||
"title": "岁银",
|
||||
"content": "各位业主:\n 上线\"岁银\"功能,其核心规则与使用方式如下,覆盖所有房产通用场景:\n一、岁银的获取方式\n 通过周边合作门店消费,即可获得岁银;\n二、跨房产通用:一份公积金,多房产可用\n 您的个人岁银不绑定单一房产,可通用至您已加入的所有房产。例如:您的个人公积金,既可抵扣A小区的岁银,也可抵扣您加入的B小区的水电费、C小区的燃气费,无需额外转移或申请。\n三、查询与透明化\n 在物业平台\"我的-岁银\"页面,可实时查看:个人公积金余额、所属房产的总额、抵扣记录(含抵扣房产、金额、个人扣除份额),确保每笔使用清晰可溯。"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
|
||||
@ -247,7 +247,7 @@ export default {
|
||||
},
|
||||
{
|
||||
nav_icon: 'https://static.hshuishang.com/noValFunction3.png',
|
||||
nav_name: "物业费",
|
||||
nav_name: "岁银",
|
||||
},
|
||||
{
|
||||
nav_icon: 'https://static.hshuishang.com/noValFunction1.png',
|
||||
@ -366,7 +366,7 @@ export default {
|
||||
jump_target: 1,
|
||||
mini_program_url: "/packages/community/providentFund/index",
|
||||
nav_icon: "https://static.hshuishang.com/noValFunction3.png",
|
||||
nav_name: "物业费",
|
||||
nav_name: "岁银",
|
||||
other_appid: "",
|
||||
other_path: "",
|
||||
sort: 2,
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<view class="homeMoney" v-if="active == 0">
|
||||
<view class="homeMoney_box">
|
||||
<view class="homeMoney_box_left">
|
||||
<view class="homeMoney_box_left1">物业费</view>
|
||||
<view class="homeMoney_box_left1">岁银</view>
|
||||
<view class="homeMoney_box_left2">可抵扣账户金额</view>
|
||||
</view>
|
||||
<view class="homeMoney_box_right">
|
||||
@ -122,7 +122,7 @@
|
||||
src="https://static.hshuishang.com/property-img-file/com_homeMoney.png" alt="" />
|
||||
</view>
|
||||
<view class="PayTypeItem_con">
|
||||
<view class="PayTypeItem_con_tit">物业费支付</view>
|
||||
<view class="PayTypeItem_con_tit">岁银支付</view>
|
||||
<view class="PayTypeItem_con_msg">
|
||||
可用公积金:<span>¥</span>{{ balanceMoney }}
|
||||
<view class="PayTypeItem_con_msg2" @click="changeShow2">
|
||||
@ -174,7 +174,7 @@
|
||||
</view>
|
||||
|
||||
<view class="row">
|
||||
<view class="row_label">物业费抵扣金额</view>
|
||||
<view class="row_label">岁银抵扣金额</view>
|
||||
<view class="row_con4">-¥{{ item.property_housing_fund }}</view>
|
||||
</view>
|
||||
|
||||
@ -240,7 +240,7 @@
|
||||
<view class="banlenceItem_left">
|
||||
<image mode="aspectFill"
|
||||
src="https://static.hshuishang.com/property-img-file/com_homeMoney.png" alt="" />
|
||||
物业费支付
|
||||
岁银支付
|
||||
</view>
|
||||
<view class="banlenceItem_right">
|
||||
<span>¥</span>{{ balanceMoney > currentMoney ? currentMoney : balanceMoney }}
|
||||
@ -249,7 +249,7 @@
|
||||
</view>
|
||||
|
||||
<view class="btn" @click="createPay">
|
||||
物业费+微信支付 <span>¥</span>{{ currentMoney }}
|
||||
岁银+微信支付 <span>¥</span>{{ currentMoney }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -611,9 +611,9 @@ export default {
|
||||
if (this.payType == 1) {
|
||||
name_mini = "微信";
|
||||
} else if (this.payType == 2) {
|
||||
name_mini = "物业费";
|
||||
name_mini = "岁银";
|
||||
} else {
|
||||
name_mini = "微信 + 物业费";
|
||||
name_mini = "微信 + 岁银";
|
||||
}
|
||||
if (!this.currentMoney) {
|
||||
return uni.showToast({
|
||||
@ -674,7 +674,7 @@ export default {
|
||||
// 组合支付
|
||||
if (isComboPay && (payParams.money != 0.00 || payParams.money != 0)) {
|
||||
this.payType = 3;
|
||||
name_mini = "微信 + 物业费";
|
||||
name_mini = "微信 + 岁银";
|
||||
}
|
||||
|
||||
payParams.name_mini = name_mini;
|
||||
@ -682,7 +682,7 @@ export default {
|
||||
if (this.payType == 2) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定使用物业费支付?',
|
||||
content: '确定使用岁银支付?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
await request(apiArr.createPayOrder, "POST", payParams).then((res) => {
|
||||
@ -799,7 +799,7 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
//物业费详情
|
||||
//岁银详情
|
||||
more(item) {
|
||||
NavgateTo(`../providentFund/index?item=${JSON.stringify(item)}`);
|
||||
},
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
:autoBack="true"
|
||||
/>
|
||||
<view class="container_body" :style="{ paddingTop: top + 'px' }">
|
||||
<view class="title">物业费</view>
|
||||
<view class="title">岁银</view>
|
||||
<view class="title_bottom">
|
||||
<view>¥{{ getTotal(list.owners) }}</view>
|
||||
<u-icon
|
||||
@ -49,7 +49,7 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label fix">
|
||||
<text>物业费总余额</text>
|
||||
<text>岁银总余额</text>
|
||||
<u-icon
|
||||
name="info-circle-fill"
|
||||
size="30rpx"
|
||||
@ -124,8 +124,8 @@ export default {
|
||||
moeny: "0.00",
|
||||
show: false,
|
||||
ownerDesc:
|
||||
"本房产的物业费为该房产的所有成员物业费总和。无需经过成员同意便可用于本房产的物业费抵扣,一旦成功抵扣,成员所拥有的物业费将自动进行扣除。",
|
||||
desc: "物业费可通用至您加入的所有房产,任一房产的物业相关费用均可用该物业费抵扣。",
|
||||
"本房产的岁银为该房产的所有成员岁银总和。无需经过成员同意便可用于本房产的岁银抵扣,一旦成功抵扣,成员所拥有的岁银将自动进行扣除。",
|
||||
desc: "岁银可通用至您加入的所有房产,任一房产的物业相关费用均可用该岁银抵扣。",
|
||||
defaultName: "",
|
||||
list: [],
|
||||
houseList: [],
|
||||
|
||||
@ -96,7 +96,7 @@ export default {
|
||||
},
|
||||
{
|
||||
icon: "https://static.hshuishang.com/property-img-file/com_serverIcon5.png",
|
||||
name: "物业费",
|
||||
name: "岁银",
|
||||
url: ""
|
||||
},
|
||||
{
|
||||
@ -106,7 +106,7 @@ export default {
|
||||
},
|
||||
{
|
||||
icon: "https://static.hshuishang.com/property-img-file/com_serverIcon7.png",
|
||||
name: "物业费",
|
||||
name: "岁银",
|
||||
url: ""
|
||||
},
|
||||
{
|
||||
|
||||
362
packages/jfShop/detail/index.css
Normal file
362
packages/jfShop/detail/index.css
Normal file
@ -0,0 +1,362 @@
|
||||
/* 全局样式重置 */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 商品详情页容器 */
|
||||
.detail-container {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
padding-bottom: 100rpx;
|
||||
}
|
||||
|
||||
/* 轮播图容器 */
|
||||
.swiper-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 600rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.swiper-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.swiper-indicator {
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
right: 20rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
color: #fff;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
/* 商品信息 */
|
||||
.product-info {
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.product-price {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
margin-bottom: 20rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.price-number {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4d4f;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.price-unit {
|
||||
font-size: 28rpx;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
.product-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 48rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.exchange-info {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 商品详情 */
|
||||
.product-details {
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #e8e8e8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.line {
|
||||
flex: 1;
|
||||
height: 1rpx;
|
||||
background-color: #000000;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.detail-image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 底部操作栏 */
|
||||
.bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
background-color: #fff;
|
||||
border-top: 1rpx solid #e8e8e8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 30rpx;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.points-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.points-label {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.points-number {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #ff6262;
|
||||
}
|
||||
|
||||
.insufficient-points {
|
||||
width: 60%;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
background-color: #f0f0f0;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
border-radius: 35rpx;
|
||||
font-size: 28rpx;
|
||||
margin-left: 10%;
|
||||
}
|
||||
|
||||
.exchange-btn {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
background-color: #ff4d4f;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 25rpx;
|
||||
font-size: 32rpx;
|
||||
border: none;
|
||||
position: absolute;
|
||||
right: 100rpx;
|
||||
}
|
||||
|
||||
/* 规格选择弹窗 */
|
||||
.spec-popup {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
padding: 30rpx;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.spec-price {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.spec-price-number {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4d4f;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.spec-price-unit {
|
||||
font-size: 28rpx;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
.spec-selected {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
font-size: 48rpx;
|
||||
color: #999;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
right: 30rpx;
|
||||
}
|
||||
|
||||
.spec-image {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.spec-image-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.spec-section {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.spec-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.spec-options {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.spec-option {
|
||||
padding: 20rpx 30rpx;
|
||||
border: 1rpx solid #e8e8e8;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.spec-option.active {
|
||||
border-color: #ff4d4f;
|
||||
color: #ff4d4f;
|
||||
background-color: #fff2f0;
|
||||
}
|
||||
|
||||
.quantity-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 50rpx 30rpx;
|
||||
}
|
||||
|
||||
.quantity-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.quantity-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.quantity-btn {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
border: 1rpx solid #e8e8e8;
|
||||
background-color: #fafafa;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.quantity-btn:disabled {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.quantity-input {
|
||||
width: 80rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-top: 1rpx solid #e8e8e8;
|
||||
border-bottom: 1rpx solid #e8e8e8;
|
||||
}
|
||||
|
||||
.popup-footer {
|
||||
margin: 30rpx;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background-color: #ff4d4f;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 40rpx;
|
||||
font-size: 32rpx;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 适配不同屏幕尺寸 */
|
||||
@media screen and (max-width: 375px) {
|
||||
|
||||
.price-number,
|
||||
.spec-price-number {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.product-name {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.exchange-btn,
|
||||
.confirm-btn {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
208
packages/jfShop/detail/index.vue
Normal file
208
packages/jfShop/detail/index.vue
Normal file
@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<view class="detail-container">
|
||||
<!-- 商品轮播图 -->
|
||||
<view class="swiper-container">
|
||||
<swiper indicator-dots :autoplay="false" :interval="3000" :duration="1000" indicator-active-color="#ff4d4f"
|
||||
style="height: 100%;">
|
||||
<swiper-item v-for="(item, index) in carouselImages" :key="index" style="height: 100%;">
|
||||
<image :src="item" mode="aspectFill" class="swiper-image"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="swiper-indicator">{{ currentImageIndex + 1 }}/{{ carouselImages.length }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品信息 -->
|
||||
<view class="product-info">
|
||||
<view class="product-price">
|
||||
<view>
|
||||
<text class="price-number">{{ selectedGoodsInfo.points }}</text>
|
||||
<text class="price-unit">积分</text>
|
||||
</view>
|
||||
<view class="exchange-info">已兑{{ productInfo.exchange_count }}件</view>
|
||||
</view>
|
||||
<view class="product-name">{{ productInfo.commodity_name }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情 -->
|
||||
<view class="product-details">
|
||||
<view class="detail-title">
|
||||
<view class="line"></view>
|
||||
<view>商品详情</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<image v-for="(item, index) in detailImages" :key="index" :src="item" mode="widthFix"
|
||||
class="detail-image" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作栏 -->
|
||||
<view class="bottom-bar">
|
||||
<view class="points-info">
|
||||
<text class="points-number">{{ selectedGoodsInfo.points }}积分</text>
|
||||
<text class="points-label">当前积分{{ userPoints }}</text>
|
||||
</view>
|
||||
<view v-if="userPoints < selectedGoodsInfo.points" class="insufficient-points">
|
||||
积分不足,还差{{ selectedGoodsInfo.points - userPoints }}积分哦
|
||||
</view>
|
||||
<button v-else class="exchange-btn" @click="showSpecPopup = true">立即兑换</button>
|
||||
<!-- <button class="exchange-btn" @click="showSpecPopup = true">立即兑换</button> -->
|
||||
</view>
|
||||
|
||||
<!-- 规格选择弹窗 -->
|
||||
<view v-if="showSpecPopup" class="spec-popup" @click.self="showSpecPopup = false">
|
||||
<view class="popup-content">
|
||||
<view class="close-btn" @click="showSpecPopup = false">×</view>
|
||||
<view class="popup-header">
|
||||
<view class="spec-image">
|
||||
<image :src="selectedGoodsInfo.goods_info.commodity_pic" class="spec-image-item">
|
||||
</image>
|
||||
</view>
|
||||
<view class="spec-info">
|
||||
<view class="spec-price">
|
||||
<text class="spec-price-number">{{ selectedGoodsInfo.points }}</text>
|
||||
<text class="spec-price-unit">积分</text>
|
||||
</view>
|
||||
<view class="spec-change">
|
||||
<view class="spec-selected">已选:{{ selectedGoodsInfo.goods_info.goods_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="spec-section">
|
||||
<view class="spec-title">规格</view>
|
||||
<view class="spec-options">
|
||||
<view v-for="(spec, index) in productInfo.goods_info_list" :key="index"
|
||||
:class="['spec-option', { active: selectedSpecId === spec.id }]" @click="selectSpec(spec)">
|
||||
{{ spec.goods_info.goods_name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="quantity-section">
|
||||
<view class="quantity-title">数量</view>
|
||||
<view class="quantity-control">
|
||||
<button class="quantity-btn" @click="decreaseQuantity" :disabled="quantity <= 1">-</button>
|
||||
<view class="quantity-input">{{ quantity }}</view>
|
||||
<button class="quantity-btn" @click="increaseQuantity">+</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="popup-footer">
|
||||
<button class="confirm-btn" @click="confirmExchange">立即兑换</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request, picUrl, NavgateTo } from "../../../utils";
|
||||
import { apiArr } from "../../../api/pointShop";
|
||||
import { apiArr as apiArr2 } from '../../../api/v2User';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
productInfo: {},
|
||||
userPoints: 0,
|
||||
currentImageIndex: 0,
|
||||
showSpecPopup: false,
|
||||
selectedSpecId: 1,
|
||||
selectedSpec: '',
|
||||
quantity: 1,
|
||||
selectedGoodsInfo: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 处理轮播图数据
|
||||
carouselImages() {
|
||||
if (this.productInfo.commodity_carousel) {
|
||||
return this.productInfo.commodity_carousel.split(',').map(item => picUrl + item);
|
||||
}
|
||||
return [];
|
||||
},
|
||||
// 处理详情图片数据
|
||||
detailImages() {
|
||||
if (this.productInfo.commodity_detail_pic) {
|
||||
return this.productInfo.commodity_detail_pic.split(',').map(item => picUrl + item);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选择规格
|
||||
selectSpec(spec) {
|
||||
this.selectedSpecId = spec.id;
|
||||
this.selectedSpec = spec.goods_info.goods_name;
|
||||
this.selectedGoodsInfo = {
|
||||
...spec,
|
||||
goods_info: {
|
||||
...spec.goods_info,
|
||||
commodity_pic: picUrl + spec.goods_info.commodity_pic
|
||||
}
|
||||
};
|
||||
this.quantity = 1;
|
||||
},
|
||||
// 减少数量
|
||||
decreaseQuantity() {
|
||||
if (this.quantity > 1) {
|
||||
this.quantity--;
|
||||
}
|
||||
},
|
||||
// 增加数量
|
||||
increaseQuantity() {
|
||||
if (this.quantity < this.selectedGoodsInfo.goods_info.stock && this.quantity < this.selectedGoodsInfo.goods_info.limit_buy) {
|
||||
this.quantity++;
|
||||
}
|
||||
},
|
||||
// 确认兑换
|
||||
confirmExchange() {
|
||||
const orderInfo = {
|
||||
productId: this.productInfo.id,
|
||||
specId: this.selectedSpecId,
|
||||
specName: this.selectedSpec,
|
||||
quantity: this.quantity,
|
||||
price: this.selectedGoodsInfo.points,
|
||||
goodsInfo: this.selectedGoodsInfo,
|
||||
}
|
||||
this.showSpecPopup = false;
|
||||
NavgateTo('/packages/jfShop/submitOrder/index?orderInfo=' + JSON.stringify(orderInfo));
|
||||
},
|
||||
// 获取用户积分
|
||||
getPointNum() {
|
||||
request(apiArr2.getUserInfo, 'POST', {}, { silent: false }).then(res => {
|
||||
this.userPoints = res.points;
|
||||
});
|
||||
},
|
||||
},
|
||||
onshow() {
|
||||
this.getPointNum();
|
||||
},
|
||||
onLoad(options) {
|
||||
this.getPointNum();
|
||||
const orderInfo = JSON.parse(options.product);
|
||||
const params = {
|
||||
id: orderInfo.id
|
||||
}
|
||||
request(apiArr.pointGoodInfo, 'POST', params, { silent: false }, false).then(res => {
|
||||
this.productInfo = res;
|
||||
// 默认选择第一个规格
|
||||
if (res.goods_info_list && res.goods_info_list.length > 0) {
|
||||
this.selectedSpecId = res.goods_info_list[0].id;
|
||||
this.selectedSpec = res.goods_info_list[0].goods_info.goods_name;
|
||||
this.selectedGoodsInfo = {
|
||||
...res.goods_info_list[0],
|
||||
goods_info: {
|
||||
...res.goods_info_list[0].goods_info,
|
||||
commodity_pic: picUrl + res.goods_info_list[0].goods_info.commodity_pic
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import url('./index.css');
|
||||
</style>
|
||||
169
packages/jfShop/index/index.css
Normal file
169
packages/jfShop/index/index.css
Normal file
@ -0,0 +1,169 @@
|
||||
.header {
|
||||
padding: 20rpx 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header_top {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.header_sum {
|
||||
font-size: 55rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.header_dec {
|
||||
font-size: 20rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.center{
|
||||
padding: 20rpx 70rpx;
|
||||
display: flex;
|
||||
justify-content: space-between ;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.center_item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.image_item{
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background-color: #f0f7ff;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.image_item image{
|
||||
width: 45rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
|
||||
/* 分类导航样式 */
|
||||
.category-nav {
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.category-scroll {
|
||||
white-space: nowrap;
|
||||
padding: 0 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.category-item {
|
||||
display: inline-block;
|
||||
padding: 20rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.category-item.active {
|
||||
color: #1e88e5;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.category-item.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100rpx;
|
||||
height: 4rpx;
|
||||
background-color: #1e88e5;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
|
||||
/* 商品列表样式 */
|
||||
.product-list {
|
||||
padding: 20rpx;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.product-item {
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.product-image {
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.product-title {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
margin-bottom: 12rpx;
|
||||
width: 100%;
|
||||
line-height: 32rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.product-info {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.product-points {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4444;
|
||||
}
|
||||
|
||||
.product-sold {
|
||||
font-size: 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.exchange-btn {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
background-color: #ff4444;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 30rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 加载状态样式 */
|
||||
.loading, .no-more {
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
164
packages/jfShop/index/index.vue
Normal file
164
packages/jfShop/index/index.vue
Normal file
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="header">
|
||||
<image class="header_top" src="https://static.hshuishang.com/point_top.png" mode="" />
|
||||
<view class="header_sum">{{ pointsNum }}</view>
|
||||
<view class="header_dec">当前可用积分</view>
|
||||
</view>
|
||||
<view class="center">
|
||||
<view class="center_item" @click="toPage('mx')">
|
||||
<view class="image_item">
|
||||
<image class="header_top" src="https://static.hshuishang.com/point_mx.png" mode="" />
|
||||
</view>
|
||||
<view>积分明细</view>
|
||||
</view>
|
||||
<view class="center_item">
|
||||
<view class="image_item" @click="toPage('gz')">
|
||||
<image class="header_top" src="https://static.hshuishang.com/point_gz.png" mode="" />
|
||||
</view>
|
||||
<view>积分规则</view>
|
||||
</view>
|
||||
<view class="center_item">
|
||||
<view class="image_item" @click="toPage('jl')">
|
||||
<image class="header_top" src="https://static.hshuishang.com/point_jl.png" mode="" />
|
||||
</view>
|
||||
<view>兑换记录</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分类导航 -->
|
||||
<view class="category-nav">
|
||||
<scroll-view scroll-x="true" class="category-scroll">
|
||||
<view v-for="(category, index) in categories" :key="index" class="category-item"
|
||||
:class="{ active: activeCategory === category.id }" @click="activeCategory = category.id">
|
||||
{{ category.category_name }}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 商品列表 -->
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" style="height: calc(100vh - 300rpx);">
|
||||
<view class="product-list">
|
||||
<view v-for="(product, index) in products" :key="index" class="product-item">
|
||||
<image class="product-image" :src="product.commodity_pic" mode="aspectFill"></image>
|
||||
<view class="product-title">{{ product.commodity_name }}</view>
|
||||
<view class="product-info">
|
||||
<view class="product-points">{{ product.goods_info_list[0].points }} 积分</view>
|
||||
<view class="product-sold">已兑换{{ product.exchange_count }}件</view>
|
||||
</view>
|
||||
<view class="exchange-btn" @click="toDetail(product)">立即兑换</view>
|
||||
</view>
|
||||
<!-- 加载更多提示 -->
|
||||
<view v-if="loading" class="loading">加载中...</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request, picUrl, NavgateTo } from "../../../utils";
|
||||
import { apiArr } from "../../../api/pointShop";
|
||||
import { apiArr as apiArr2 } from '../../../api/v2User';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pointsNum: 0,
|
||||
activeCategory: '',
|
||||
categories: [],
|
||||
products: [],
|
||||
page_num: 1,
|
||||
page_size: 20,
|
||||
loading: false,
|
||||
noMore: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
activeCategory(newVal) {
|
||||
// 切换分类时重置数据
|
||||
this.page_num = 1;
|
||||
this.products = [];
|
||||
this.noMore = false;
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getNum()
|
||||
this.getTab()
|
||||
this.page_num = 1;
|
||||
this.products = [];
|
||||
this.noMore = false;
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getNum() {
|
||||
request(apiArr2.getUserInfo, 'POST', {}, { silent: false }).then(res => {
|
||||
this.pointsNum = res.points;
|
||||
});
|
||||
},
|
||||
getTab() {
|
||||
request(apiArr.pointShopTab, 'POST', {}, { silent: false }, false).then(res => {
|
||||
this.categories = [{ id: '', category_name: '全部' }, ...res.tabs];
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
if (this.loading || this.noMore) return;
|
||||
|
||||
this.loading = true;
|
||||
const params = {
|
||||
category_id: this.activeCategory,
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size
|
||||
}
|
||||
request(apiArr.pointShopPage, 'POST', params, { silent: false }, false).then(res => {
|
||||
this.loading = false;
|
||||
|
||||
const newProducts = res.row.map(item => {
|
||||
return {
|
||||
...item,
|
||||
commodity_pic: picUrl + item.commodity_pic,
|
||||
}
|
||||
});
|
||||
|
||||
// 如果是第一页,直接替换数据,否则追加
|
||||
if (this.page_num === 1) {
|
||||
this.products = newProducts;
|
||||
} else {
|
||||
this.products = [...this.products, ...newProducts];
|
||||
}
|
||||
|
||||
// 判断是否还有更多数据
|
||||
if (newProducts.length < this.page_size) {
|
||||
this.noMore = true;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
loadMore() {
|
||||
if (!this.loading && !this.noMore) {
|
||||
this.page_num++;
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
toPage(data) {
|
||||
if (data == 'mx') {
|
||||
request(apiArr2.getUserInfo, 'POST', {}, { silent: false }).then(res => {
|
||||
NavgateTo('/packages/user/wallet/index?type=1&item=' + JSON.stringify(res));
|
||||
});
|
||||
} else if (data == 'gz') {
|
||||
uni.navigateTo({
|
||||
url: '/packages/jfShop/rule/index'
|
||||
})
|
||||
} else if (data == 'jl') {
|
||||
NavgateTo('/packages/jfShop/record/index');
|
||||
}
|
||||
},
|
||||
toDetail(product) {
|
||||
NavgateTo('/packages/jfShop/detail/index?product=' + JSON.stringify(product) + '&pointNum=' + this.pointsNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
223
packages/jfShop/myOrder/index.css
Normal file
223
packages/jfShop/myOrder/index.css
Normal file
@ -0,0 +1,223 @@
|
||||
page {
|
||||
background-color: #F5F7FA;
|
||||
}
|
||||
|
||||
/* 订单详情页面样式 */
|
||||
.order-detail-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 通用区块样式 */
|
||||
.section {
|
||||
background-color: #ffffff;
|
||||
border-radius: 12rpx;
|
||||
margin: 10rpx 20rpx;
|
||||
padding: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 商品信息 */
|
||||
.goods-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.goods-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.goods-quantity {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
/* 价格信息 */
|
||||
.price-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1rpx solid #F0F0F0;
|
||||
}
|
||||
|
||||
.price-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.price-label {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.price-value {
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.total-price .price-label {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.total-price .price-value {
|
||||
font-weight: 600;
|
||||
color: #FF5000;
|
||||
}
|
||||
|
||||
/* 收货地址 */
|
||||
.address-info {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.consignee {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.address-detail {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
/* 订单信息 */
|
||||
.order-info-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1rpx solid #F0F0F0;
|
||||
}
|
||||
|
||||
.order-info-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #4A6CF7;
|
||||
font-size: 24rpx;
|
||||
margin-left: 16rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 门店信息卡片 */
|
||||
.store-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.store-info {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.store-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.store-address {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #ff4d4f;
|
||||
font-size: 24rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.nav-image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 375px) {
|
||||
.section {
|
||||
margin: 16rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.price-item,
|
||||
.order-info-item {
|
||||
padding: 14rpx 0;
|
||||
}
|
||||
|
||||
.price-label,
|
||||
.price-value,
|
||||
.info-label,
|
||||
.info-value {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
160
packages/jfShop/myOrder/index.vue
Normal file
160
packages/jfShop/myOrder/index.vue
Normal file
@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<view class="order-detail-container">
|
||||
<!-- 商品信息 -->
|
||||
<view class="section">
|
||||
<h2 class="section-title">兑换商品</h2>
|
||||
<view class="goods-item" @click="viewGoodsDetail">
|
||||
<img :src="orderInfo.commodity_order_item_list[0].commodity_pic" alt="商品图片" class="goods-image">
|
||||
<view class="goods-info">
|
||||
<h3 class="goods-name">{{ orderInfo.commodity_order_item_list[0].goods_name }}</h3>
|
||||
<p class="goods-quantity">共{{ orderInfo.commodity_order_item_list[0].count }}件</p>
|
||||
</view>
|
||||
<uni-icons type="arrowright" size="24rpx" color="#999999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 价格信息 -->
|
||||
<view class="section">
|
||||
<view class="price-item">
|
||||
<span class="price-label">商品总价</span>
|
||||
<span class="price-value">{{ orderInfo.total_amount }}积分</span>
|
||||
</view>
|
||||
<view class="price-item">
|
||||
<span class="price-label">运费</span>
|
||||
<span class="price-value">{{ orderInfo.freight }}积分</span>
|
||||
</view>
|
||||
<view class="price-item total-price">
|
||||
<span class="price-label">商品实付</span>
|
||||
<span class="price-value">{{ orderInfo.total_amount + orderInfo.freight }}积分</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收货地址 -->
|
||||
<view class="section">
|
||||
<h2 class="section-title">收货地址</h2>
|
||||
<view class="address-info">
|
||||
<p class="consignee">{{ orderInfo.receiving_name }},{{ orderInfo.receiving_phone }}</p>
|
||||
<p class="address-detail">{{ orderInfo.receiving_address }}</p>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息 -->
|
||||
<view class="section">
|
||||
<view class="order-info-item">
|
||||
<span class="info-label">订单编号</span>
|
||||
<view class="info-value">
|
||||
<span>{{ orderInfo.order_no }}</span>
|
||||
<view class="copy-btn" @click="copyOrderNo">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-info-item">
|
||||
<span class="info-label">提交时间</span>
|
||||
<span class="info-value">{{ orderInfo.order_time }}</span>
|
||||
</view>
|
||||
<view class="order-info-item">
|
||||
<span class="info-label">成交时间</span>
|
||||
<span class="info-value">{{ orderInfo.order_time }}</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 门店信息 -->
|
||||
<view class="section">
|
||||
<view class="store-card">
|
||||
<view class="store-info">
|
||||
<h2 class="store-name">{{ orderInfo.merchant_info.merchant_name }}</h2>
|
||||
<p class="store-address">{{ orderInfo.merchant_info.address }}</p>
|
||||
</view>
|
||||
<view class="nav-btn" @click="navigateToStore">
|
||||
<image class="nav-image" src="https://static.hshuishang.com/jfNav.png" mode="" />
|
||||
<span>导航</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request, NavgateTo, picUrl } from "../../../utils";
|
||||
import { apiArr } from "../../../api/pointShop";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderInfo: {}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.order_id) {
|
||||
this.order_id = options.order_id;
|
||||
const params = {
|
||||
order_id: this.order_id
|
||||
}
|
||||
request(apiArr.pointOrderInfo, "POST", params).then(res => {
|
||||
// 处理商品图片路径
|
||||
if (res.commodity_order_item_list && res.commodity_order_item_list.length > 0) {
|
||||
res.commodity_order_item_list.forEach(item => {
|
||||
if (item.commodity_pic) {
|
||||
item.commodity_pic = picUrl + item.commodity_pic;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.orderInfo = res;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查看商品详情
|
||||
viewGoodsDetail() {
|
||||
const product = {
|
||||
id: this.orderInfo.commodity_order_item_list[0].commodity_id,
|
||||
}
|
||||
NavgateTo(`/packages/jfShop/detail/index?product=${JSON.stringify(product)}`);
|
||||
},
|
||||
|
||||
// 复制订单编号
|
||||
copyOrderNo() {
|
||||
uni.setClipboardData({
|
||||
data: this.orderInfo.order_no,
|
||||
success: function () {
|
||||
uni.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'success'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 导航到门店
|
||||
navigateToStore() {
|
||||
const store = this.orderInfo.merchant_info;
|
||||
if (store && store.latitude && store.longitude) {
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(store.latitude),
|
||||
longitude: parseFloat(store.longitude),
|
||||
name: store.merchant_name,
|
||||
address: store.address,
|
||||
success: function () {
|
||||
console.log('打开地图成功');
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log('打开地图失败', err);
|
||||
uni.showToast({
|
||||
title: '打开地图失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '门店位置信息不完整',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url('./index.css');
|
||||
</style>
|
||||
160
packages/jfShop/orderDetail/index.css
Normal file
160
packages/jfShop/orderDetail/index.css
Normal file
@ -0,0 +1,160 @@
|
||||
/* 兑换成功页面样式 */
|
||||
.success-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 40rpx 20rpx;
|
||||
min-height: 100vh;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
/* 成功图标和标题 */
|
||||
.success-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.success-icon {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #E6F7EF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.success-icon image {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.success-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.points-consumed {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
/* 门店信息卡片 */
|
||||
.store-card {
|
||||
width: 90%;
|
||||
background-color: #f7f8fa;
|
||||
border-radius: 12rpx;
|
||||
padding: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.store-info {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.store-name {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.store-address {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #ff4d4f;
|
||||
font-size: 24rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.nav-image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
/* 提示信息 */
|
||||
.reminder {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 操作按钮 */
|
||||
.action-buttons {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.primary-btn {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background-color: #ff4d4f;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.secondary-btn {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
border: 1rpx solid #E5E7EB;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 375px) {
|
||||
.success-icon {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.success-title {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.store-name {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.primary-btn,
|
||||
.secondary-btn {
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
101
packages/jfShop/orderDetail/index.vue
Normal file
101
packages/jfShop/orderDetail/index.vue
Normal file
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<view class="success-container">
|
||||
<!-- 成功图标和标题 -->
|
||||
<view class="success-header">
|
||||
<view class="success-icon">
|
||||
<image class="header_top" src="https://static.hshuishang.com/jf_order_sucess.png" mode="" />
|
||||
</view>
|
||||
<h1 class="success-title">兑换成功</h1>
|
||||
<p class="points-consumed">消耗 {{ storeInfo.total_amount }} 积分</p>
|
||||
</view>
|
||||
|
||||
<!-- 门店信息卡片 -->
|
||||
<view class="store-card">
|
||||
<view class="store-info">
|
||||
<h2 class="store-name">{{ storeInfo.merchant_info.merchant_name }}</h2>
|
||||
<p class="store-address">{{ storeInfo.receiving_address }}</p>
|
||||
</view>
|
||||
<view class="nav-btn" @click="navigateToStore">
|
||||
<image class="nav-image" src="https://static.hshuishang.com/jfNav.png" mode="" />
|
||||
<span>导航</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<p class="reminder">请前往线下门店兑换商品</p>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="action-buttons">
|
||||
<button class="primary-btn" @click="viewOrder">查看订单</button>
|
||||
<button class="secondary-btn" @click="backToHome">返回首页</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request, NavgateTo } from "../../../utils";
|
||||
import { apiArr } from "../../../api/pointShop";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
storeInfo: {},
|
||||
order_id: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.order_id) {
|
||||
this.order_id = options.order_id;
|
||||
const params = {
|
||||
order_id: this.order_id
|
||||
}
|
||||
request(apiArr.pointOrderInfo, "POST", params).then(res => {
|
||||
this.storeInfo = res;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 导航到门店
|
||||
navigateToStore() {
|
||||
// 检查是否有经纬度信息
|
||||
if (this.storeInfo.merchant_info.latitude && this.storeInfo.merchant_info.longitude) {
|
||||
uni.openLocation({
|
||||
latitude: Number(this.storeInfo.merchant_info.latitude),
|
||||
longitude: Number(this.storeInfo.merchant_info.longitude),
|
||||
name: this.storeInfo.merchant_info.merchant_name,
|
||||
address: this.storeInfo.receiving_address,
|
||||
success: (res) => {
|
||||
console.log('导航成功', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('导航失败', err);
|
||||
uni.showToast({
|
||||
title: '导航失败,请检查位置权限',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无门店位置信息',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 查看订单
|
||||
viewOrder() {
|
||||
NavgateTo(`/packages/jfShop/myOrder/index?order_id=${this.order_id}`);
|
||||
},
|
||||
|
||||
// 返回首页
|
||||
backToHome() {
|
||||
NavgateTo('/pages/index/index');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url('./index.css');
|
||||
</style>
|
||||
99
packages/jfShop/record/index.css
Normal file
99
packages/jfShop/record/index.css
Normal file
@ -0,0 +1,99 @@
|
||||
page {
|
||||
background-color: #f6f7fbbe;
|
||||
}
|
||||
|
||||
/* 积分兑换记录页面样式 */
|
||||
.record-container {
|
||||
padding: 16rpx;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* 月份分组 */
|
||||
.month-group {
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
/* 月份头部 */
|
||||
.month-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.month-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.month-count {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
/* 记录项 */
|
||||
.record-item {
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
margin-bottom: 16rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.item-left {
|
||||
display: flex;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.item-image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.item-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.item-data {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
margin-bottom: 8rpx;
|
||||
line-height: 36rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
font-weight: bold;
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
width: 150rpx;
|
||||
padding: 0 30rpx;
|
||||
border: 1rpx solid #ddddddc7;
|
||||
border-radius: 40rpx;
|
||||
background-color: #ffffff;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
right: -250rpx;
|
||||
}
|
||||
|
||||
.nav-btn:active {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
105
packages/jfShop/record/index.vue
Normal file
105
packages/jfShop/record/index.vue
Normal file
@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<view class="record-container">
|
||||
<!-- 动态渲染月份分组 -->
|
||||
<view v-for="group in records" :key="group.time" class="month-group">
|
||||
<view class="month-header">
|
||||
<text class="month-title">{{ group.time }}</text>
|
||||
<text class="month-count">{{ group.total }}单兑换商品</text>
|
||||
</view>
|
||||
|
||||
<!-- 动态渲染每个记录项 -->
|
||||
<view v-for="item in group.orders" :key="item.id" class="record-item">
|
||||
<view class="item-left">
|
||||
<image class="item-image" :src="item.commodity_order_item_list[0].commodity_pic" mode="aspectFill">
|
||||
</image>
|
||||
<view class="item-info">
|
||||
<text class="item-name">{{ item.commodity_order_item_list[0].goods_name }}</text>
|
||||
<view class="item-data">
|
||||
<view class="item-label">订单号:</view>
|
||||
<view>{{ item.order_no }}</view>
|
||||
</view>
|
||||
<view class="item-data">
|
||||
<view class="item-label">积分变动:</view>
|
||||
<view>{{ item.total_amount }}积分</view>
|
||||
</view>
|
||||
<view class="item-data">
|
||||
<view class="item-label">交易日期:</view>
|
||||
<view>{{ item.order_time }}</view>
|
||||
</view>
|
||||
<view class="item-data">
|
||||
<view class="item-label">交易地点:</view>
|
||||
<view>{{ item.receiving_address }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<button class="nav-btn" @click="navigateToStore(item)">导航</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request, picUrl, NavgateTo } from "../../../utils";
|
||||
import { apiArr } from "../../../api/pointShop";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
records: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
request(apiArr.pointShopRecord, 'POST', {}, { silent: false }).then(res => {
|
||||
// 处理商品图片路径
|
||||
res.rows.forEach(item => {
|
||||
item.orders.forEach(ite => {
|
||||
if (ite.commodity_order_item_list && ite.commodity_order_item_list.length > 0) {
|
||||
ite.commodity_order_item_list.forEach(parm => {
|
||||
if (parm.commodity_pic) {
|
||||
parm.commodity_pic = picUrl + parm.commodity_pic;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
this.records = res.rows;
|
||||
});
|
||||
},
|
||||
navigateToStore(item) {
|
||||
// 检查是否有经纬度信息
|
||||
if (item.merchant_info.latitude && item.merchant_info.longitude) {
|
||||
uni.openLocation({
|
||||
latitude: Number(item.merchant_info.latitude),
|
||||
longitude: Number(item.merchant_info.longitude),
|
||||
name: item.merchant_info.merchant_name,
|
||||
address: item.receiving_address,
|
||||
success: (res) => {
|
||||
console.log('导航成功', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('导航失败', err);
|
||||
uni.showToast({
|
||||
title: '导航失败,请检查位置权限',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无门店位置信息',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getList();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import url('./index.css');
|
||||
</style>
|
||||
55
packages/jfShop/rule/index.css
Normal file
55
packages/jfShop/rule/index.css
Normal file
@ -0,0 +1,55 @@
|
||||
page{
|
||||
background-color: #f6f6fa;
|
||||
}
|
||||
|
||||
.rule-container {
|
||||
margin: 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.rule-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.rule-tip {
|
||||
font-size: 24rpx;
|
||||
color: #ff4444;
|
||||
text-align: center;
|
||||
margin-bottom: 20rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.rule-details {
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
}
|
||||
|
||||
.rule-item {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.rule-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.rule-item-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.rule-item-content {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
line-height: 36rpx;
|
||||
text-align: justify;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
47
packages/jfShop/rule/index.vue
Normal file
47
packages/jfShop/rule/index.vue
Normal file
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<view class="rule-container">
|
||||
<!-- 标题 -->
|
||||
<view class="rule-title">{{ ruleData.title }}</view>
|
||||
|
||||
<!-- 核心提示语 -->
|
||||
<view class="rule-tip">{{ ruleData.tip }}</view>
|
||||
|
||||
<!-- 详情列表 -->
|
||||
<view class="rule-details">
|
||||
<view v-for="(item, index) in ruleData.detail" :key="index" class="rule-item">
|
||||
<view class="rule-item-title">{{ index + 1 }}.{{ item.sub_title }}</view>
|
||||
<view class="rule-item-content">{{ item.sub_detail }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request, picUrl, NavgateTo } from "../../../utils";
|
||||
import { apiArr } from "../../../api/pointShop";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ruleData: {
|
||||
title: '',
|
||||
tip: '',
|
||||
detail: []
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getContent()
|
||||
},
|
||||
methods: {
|
||||
getContent() {
|
||||
request(apiArr.platformPointsRule, 'POST', {}, { silent: false }, false).then(res => {
|
||||
this.ruleData = res;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
@import url('./index.css');
|
||||
</style>
|
||||
244
packages/jfShop/submitOrder/index.css
Normal file
244
packages/jfShop/submitOrder/index.css
Normal file
@ -0,0 +1,244 @@
|
||||
page{
|
||||
background-color: #F6F6FA;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 收货地址部分 */
|
||||
.address-section {
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
margin: 15rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.address-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.address-main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.address-name-phone {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.phone {
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.address-detail {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.address-arrow {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 分隔线 */
|
||||
.divider {
|
||||
height: 10rpx;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
/* 兑换商品部分 */
|
||||
.exchange-section {
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
margin: 15rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
margin-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.goods-item {
|
||||
display: flex;
|
||||
margin-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin-right: 20rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.goods-image image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 15rpx;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.goods-quantity {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.goods-points {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.total-section {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.total-points {
|
||||
font-size: 32rpx;
|
||||
color: #f03d0e;
|
||||
font-weight: 600;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
/* 积分计算部分 */
|
||||
.points-calculation {
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
margin: 15rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.calculation-item {
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.calculation-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* 底部确认兑换部分 */
|
||||
.bottom-section {
|
||||
height: 100rpx;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-top: 1rpx solid #e5e5e5;
|
||||
}
|
||||
|
||||
.points-consumption {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.consumption-points {
|
||||
font-size: 34rpx;
|
||||
color: #f03d0e;
|
||||
font-weight: 600;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
width: 280rpx;
|
||||
height: 80rpx;
|
||||
background-color: #f03d0e;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 768px) {
|
||||
.name {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.phone {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.address-detail {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.goods-quantity {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.goods-points {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.total-section {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.total-points {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.calculation-item {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.points-consumption {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.consumption-points {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
width: 260rpx;
|
||||
height: 76rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
142
packages/jfShop/submitOrder/index.vue
Normal file
142
packages/jfShop/submitOrder/index.vue
Normal file
@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 收货地址部分 -->
|
||||
<view class="address-section">
|
||||
<view class="address-info" @click="chooseAddress">
|
||||
<view class="address-main">
|
||||
<view class="address-name-phone">
|
||||
<text class="name">{{ defAddress.name }}</text>
|
||||
<text class="phone">{{ defAddress.phone }}</text>
|
||||
</view>
|
||||
<view class="address-detail">
|
||||
{{ defAddress.address }}{{ defAddress.house_number }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="address-arrow"><u-icon name="arrow-right" size="25"></u-icon></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 兑换商品信息 -->
|
||||
<view class="exchange-section">
|
||||
<view class="section-title">兑换商品</view>
|
||||
<view class="goods-item">
|
||||
<view class="goods-image">
|
||||
<image :src="goodsInfo.goodsInfo.goods_info.commodity_pic" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="goods-name">{{ goodsInfo.specName }}</view>
|
||||
<view class="goods-quantity">{{ goodsInfo.quantity }}件</view>
|
||||
</view>
|
||||
<view class="goods-points">{{ goodsInfo.price }}积分</view>
|
||||
</view>
|
||||
<view class="total-section">
|
||||
<text>共{{ goodsInfo.quantity }}件商品 共计:</text>
|
||||
<text class="total-points">{{ goodsInfo.price * goodsInfo.quantity }}积分</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 积分计算部分 -->
|
||||
<view class="points-calculation">
|
||||
<view class="calculation-item">
|
||||
<text>商品小计</text>
|
||||
<text>{{ goodsInfo.price * goodsInfo.quantity }}积分</text>
|
||||
</view>
|
||||
<view class="calculation-item">
|
||||
<text>运费抵扣</text>
|
||||
<text>0积分</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部确认兑换按钮 -->
|
||||
<view class="bottom-section">
|
||||
<view class="points-consumption">
|
||||
<text>消耗积分:</text>
|
||||
<text class="consumption-points">{{ goodsInfo.price * goodsInfo.quantity }}积分</text>
|
||||
</view>
|
||||
<button class="confirm-btn" @click="confirmExchange">确认兑换</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request, NavgateTo } from "../../../utils";
|
||||
import { apiArr } from "../../../api/shop";
|
||||
import { apiArr as apiArr2 } from "../../../api/pointShop";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
defAddress: {},
|
||||
goodsInfo: {}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.orderInfo) {
|
||||
this.goodsInfo = JSON.parse(options.orderInfo);
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// 检查是否有选中的地址
|
||||
const selectedAddress = uni.getStorageSync('selectedAddress');
|
||||
if (selectedAddress && Object.keys(selectedAddress).length > 0) {
|
||||
this.defAddress = selectedAddress;
|
||||
// 清除选中状态,避免重复应用
|
||||
uni.removeStorageSync('selectedAddress');
|
||||
} else {
|
||||
// 如果没有选中的地址,则获取默认地址
|
||||
this.getUserAddress();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取用户默认地址
|
||||
getUserAddress() {
|
||||
request(apiArr.getUserDefAddress, "POST", {}).then(res => {
|
||||
this.defAddress = res.default_address;
|
||||
});
|
||||
},
|
||||
// 选择地址
|
||||
chooseAddress() {
|
||||
NavgateTo('/packages/shop/address/index');
|
||||
},
|
||||
// 确认兑换
|
||||
confirmExchange() {
|
||||
// 检查是否有收货地址
|
||||
if (!this.defAddress || Object.keys(this.defAddress).length === 0) {
|
||||
uni.showToast({
|
||||
title: '请选择收货地址',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const params = {
|
||||
user_id: uni.getStorageSync('userId'),
|
||||
mch_id: this.goodsInfo.goodsInfo.mch_id,
|
||||
receiving_name: this.defAddress.name,
|
||||
receiving_phone: this.defAddress.phone,
|
||||
receiving_address: this.defAddress.address + this.defAddress.house_number,
|
||||
goods_item: {
|
||||
goods_id: this.goodsInfo.goodsInfo.goods_id,
|
||||
count: this.goodsInfo.quantity,
|
||||
price: this.goodsInfo.price,
|
||||
freight: this.goodsInfo.goodsInfo.freight || 0
|
||||
}
|
||||
}
|
||||
request(apiArr2.pointShopAdd, "POST", params).then(res => {
|
||||
const params = {
|
||||
order_id: res.order_id
|
||||
}
|
||||
request(apiArr2.pointShopPay, "POST", params).then(res => {
|
||||
setTimeout(() => {
|
||||
NavgateTo('/packages/jfShop/orderDetail/index?order_id=' + params.order_id);
|
||||
}, 300);
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url('./index.css');
|
||||
</style>
|
||||
@ -45,7 +45,7 @@
|
||||
" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="merchangtItem_tag" v-if="item.refund_property_fee_ratio">
|
||||
买单返物业费
|
||||
买单返岁银
|
||||
</view>
|
||||
<view class="merchangtItem_tag" v-if="item.refund_user_points_ratio">
|
||||
买单返积分
|
||||
|
||||
@ -5,12 +5,12 @@
|
||||
<u-icon bold color="#fff" size="40" name="arrow-left" @click="back"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<div class="text1">物业费</div>
|
||||
<div class="text1">岁银</div>
|
||||
<div class="text2">¥{{banlance}}</div>
|
||||
<div class="total">全部房源合计</div>
|
||||
<div class="text3">
|
||||
<span>全部房源</span>
|
||||
物业费流水
|
||||
岁银流水
|
||||
</div>
|
||||
|
||||
<div class="orderList">
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
mode="aspectFill"></image>
|
||||
<image v-show="checkedItems[index]" src="https://static.hshuishang.com/property-img-file/local-check.png"
|
||||
mode="aspectFill"></image>
|
||||
买单返物业费
|
||||
买单返岁银
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
@ -77,7 +77,7 @@
|
||||
" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="merchangtItem_tag" v-if="item.refund_property_fee_ratio">
|
||||
买单返物业费
|
||||
买单返岁银
|
||||
</view>
|
||||
<view class="merchangtItem_tag" v-if="item.refund_user_points_ratio">
|
||||
买单返积分
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
<view class="Msg2">
|
||||
<view class="Msg2_tit">
|
||||
<view class="Msg2_tit_left">获得物业费</view>
|
||||
<view class="Msg2_tit_left">获得岁银</view>
|
||||
<!-- <view class="Msg2_tit_right" @click="choseComminty">
|
||||
绑定房源
|
||||
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
<view class="btnList">
|
||||
<view class="btnItem" @click="payList">付款记录</view>
|
||||
<!-- <view class="btnItem" @click="homeMoneList">物业费</view> -->
|
||||
<!-- <view class="btnItem" @click="homeMoneList">岁银</view> -->
|
||||
<view class="line"></view>
|
||||
<view class="btnItem" @click="home">首页</view>
|
||||
<view class="line"></view>
|
||||
@ -239,7 +239,7 @@ export default {
|
||||
request(apiArr.createPay, "POST", {
|
||||
merchant_id: that.info.id,
|
||||
order_amount: Number((that.Money)), //金额
|
||||
refund_property_fee: that.homeMoney, //物业费
|
||||
refund_property_fee: that.homeMoney, //岁银
|
||||
refund_member_points: that.integral, //积分
|
||||
remark: that.remarks,
|
||||
room_id: that.room_id
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<!-- <view class="line"></view>
|
||||
|
||||
<view class="row3">
|
||||
<view class="label">返物业费</view>
|
||||
<view class="label">返岁银</view>
|
||||
<view class="con3" @click="houseProvident">¥{{item.refund_property_fee}}
|
||||
<u-icon name="arrow-right" color="#999999" size="40" style="max-lines: 10rpx;"></u-icon>
|
||||
</view>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
<div class="msg">
|
||||
<div class="msgItem">
|
||||
<div class="msgItem_left">获得物业费</div>
|
||||
<div class="msgItem_left">获得岁银</div>
|
||||
<div class="msgItem_right">
|
||||
¥53.1
|
||||
<u-icon name="arrow-right" color="#999999" size="40" style="max-lines: 10rpx;"></u-icon>
|
||||
|
||||
@ -50,7 +50,7 @@ export default {
|
||||
{
|
||||
title: "李氏济世堂",
|
||||
pic: "https://static.hshuishang.com/property-img-file/index_Mask_group.png",
|
||||
desc: ["到家服务", "买单返物业费", "买单返物业费"],
|
||||
desc: ["到家服务", "买单返岁银", "买单返岁银"],
|
||||
address: "苏州市太仓市城厢镇桃园三村11幢105市",
|
||||
distance: "898km",
|
||||
discuss: "1334",
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
{
|
||||
title: "美容美发",
|
||||
pic: "https://static.hshuishang.com/property-img-file/index_Mask_group.png",
|
||||
desc: [ "买单返物业费"],
|
||||
desc: [ "买单返岁银"],
|
||||
address: "苏州市太仓市城厢镇桃园三村11幢105市",
|
||||
distance: "898km",
|
||||
discuss: "1334",
|
||||
|
||||
@ -144,6 +144,10 @@ page {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.order-footer-text view {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
@ -47,8 +47,11 @@
|
||||
|
||||
<!-- 订单底部信息 -->
|
||||
<view class="order-footer">
|
||||
<view class="order-footer-text" @click="toDetails(item)">共{{ item.total_count }}件商品,共计
|
||||
<view class="order-footer-text" @click="toDetails(item)">
|
||||
共{{ item.total_count }}件商品,共计
|
||||
<text> {{ item.total_amount }}</text>
|
||||
<view v-if="item.order_cate === 1"> 元</view>
|
||||
<view v-if="item.order_cate === 4"> 积分</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="btn-group" v-if="item.order_status === 1">
|
||||
@ -67,7 +70,8 @@
|
||||
</view>
|
||||
<view class="btn-group" v-if="item.order_status === 5">
|
||||
<!-- <text class="afterSaleNum">{{ item.commodity_order_item_list.length }}笔售后</text> -->
|
||||
<button class="cancel-btn" @click="afterSale(item)" v-if="item.after_sales_status === 2">退换/售后</button>
|
||||
<button class="cancel-btn" @click="afterSale(item)"
|
||||
v-if="item.after_sales_status === 2 && item.order_cate === 1">退换/售后</button>
|
||||
<button class="pay-btn" @click="orderEvaluate(item)" :disabled="item.evauate_status === 1">评价</button>
|
||||
</view>
|
||||
<view class="btn-group" v-if="item.order_status === 6">
|
||||
@ -323,6 +327,10 @@ export default {
|
||||
NavgateTo(`/packages/shop/goodsSubmit/index?shopCarList=${JSON.stringify(transformedItems)}`)
|
||||
},
|
||||
toDetails(item) {
|
||||
if (item.order_cate == 4) {
|
||||
NavgateTo(`/packages/jfShop/myOrder/index?order_id=${item.id}`);
|
||||
return
|
||||
}
|
||||
NavgateTo(
|
||||
`/packages/myOrders/orderDetails/index?item=${JSON.stringify(item)}`
|
||||
);
|
||||
@ -369,7 +377,7 @@ export default {
|
||||
good.commodity_pic = picUrl + good.commodity_pic;
|
||||
})
|
||||
})
|
||||
this.orderData = res.order_list.filter(item => item.order_cate == 1);
|
||||
this.orderData = res.order_list.filter(item => item.order_cate == 1 || item.order_cate == 4);
|
||||
this.getAfterSaleList();
|
||||
});
|
||||
},
|
||||
|
||||
@ -37,9 +37,17 @@
|
||||
<view class="overlay" v-if="isDropdownOpen" />
|
||||
<!-- 车辆选择区域 -->
|
||||
<view class="changeCar">
|
||||
<view class="car-selector" @tap="toggleCarDropdown">
|
||||
<text class="selected-car-text">{{ selectedCar || '选择车辆' }}</text>
|
||||
<u-icon :name="isCarDropdownOpen ? 'arrow-up' : 'arrow-down'" size="28"></u-icon>
|
||||
<view v-if="!isLogin" class="car-selector" @tap="goLogin">
|
||||
<text class="selected-car-text">请登录后查看</text>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view v-if="cars.length > 0" class="car-selector" @tap="toggleCarDropdown">
|
||||
<text class="selected-car-text">{{ selectedCar || '选择车辆' }}</text>
|
||||
<u-icon :name="isCarDropdownOpen ? 'arrow-up' : 'arrow-down'" size="28"></u-icon>
|
||||
</view>
|
||||
<view v-else class="car-selector" @tap="goAddCar">
|
||||
<text class="selected-car-text">请先添加车辆</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 车辆下拉列表 -->
|
||||
@ -70,8 +78,7 @@
|
||||
<view v-if="showCost1">
|
||||
<view v-if="payStatus === 1" class="cost-container">
|
||||
<view>
|
||||
<image class="cost-image"
|
||||
src="https://static.hshuishang.com/park/park_orderLoading.png"
|
||||
<image class="cost-image" src="https://static.hshuishang.com/park/park_orderLoading.png"
|
||||
mode="aspectFit" />
|
||||
</view>
|
||||
<view class="cost-header">
|
||||
@ -103,8 +110,7 @@
|
||||
<view class="payment-item" :class="{ 'selected': paymentMethod === 'wechat' }"
|
||||
@tap="selectPayment('wechat')">
|
||||
<view class="payment-item-content">
|
||||
<image
|
||||
src="https://static.hshuishang.com/property-img-file/com_wechat.png"
|
||||
<image src="https://static.hshuishang.com/property-img-file/com_wechat.png"
|
||||
mode="aspectFit" class="payment-icon"></image>
|
||||
<text class="payment-name">微信支付</text>
|
||||
</view>
|
||||
@ -115,8 +121,7 @@
|
||||
</view>
|
||||
<view v-else class="cost-container notice-text2">
|
||||
<view>
|
||||
<image class="cost-image"
|
||||
src="https://static.hshuishang.com/park/park_orderLoading.png"
|
||||
<image class="cost-image" src="https://static.hshuishang.com/park/park_orderLoading.png"
|
||||
mode="aspectFit" />
|
||||
</view>
|
||||
<span v-if="!isTimeout">⚠️ 支付成功,请于{{ countdownTime }}内离场否则将加收停车费</span>
|
||||
@ -196,11 +201,21 @@ export default {
|
||||
payStatus: 0,
|
||||
payTime: '',
|
||||
countdownTime: '',
|
||||
isTimeout: false
|
||||
isTimeout: false,
|
||||
isLogin: uni.getStorageSync('ctoken') ? true : false
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.getParkList();
|
||||
if (this.isLogin) {
|
||||
this.getParkList();
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (this.isLogin) {
|
||||
this.getParkList();
|
||||
}
|
||||
},
|
||||
|
||||
// 在组件卸载时清除定时器
|
||||
@ -211,6 +226,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goLogin() {
|
||||
NavgateTo(`/pages/login/login`);
|
||||
},
|
||||
// 切换下拉列表显示状态
|
||||
toggleDropdown() {
|
||||
this.isCarDropdownOpen = false
|
||||
@ -330,6 +348,11 @@ export default {
|
||||
this.isCarDropdownOpen = !this.isCarDropdownOpen;
|
||||
},
|
||||
|
||||
// 去添加车辆
|
||||
goAddCar() {
|
||||
NavgateTo('/packages/park/addCar/index')
|
||||
},
|
||||
|
||||
// 选择车辆
|
||||
selectCar(car) {
|
||||
this.selectedCar = car.car_number;
|
||||
@ -533,7 +556,7 @@ export default {
|
||||
},
|
||||
// 获取停车场列表
|
||||
getParkList() {
|
||||
request(apiArr.parkList, "POST", {}).then((res) => {
|
||||
request(apiArr.parkList, "POST", {}, {}, false).then((res) => {
|
||||
// 计算每个停车场的距离并添加到对象中
|
||||
this.parkingLots = res.parking_list.map(park => {
|
||||
try {
|
||||
@ -577,9 +600,6 @@ export default {
|
||||
});
|
||||
})
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.getCarList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -29,7 +29,7 @@ export default {
|
||||
methods: {
|
||||
handleButtonClick(val) {
|
||||
if(val == 1){
|
||||
NavgateTo(`/packages/park/temporaryOrder/index`);
|
||||
NavgateTo(`/packages/park/temporaryOrder/index`, { isLogin: false });
|
||||
}else if(val == 2){
|
||||
NavgateTo(`/packages/park/parkOrder/index`);
|
||||
}else if(val == 3){
|
||||
|
||||
@ -87,7 +87,7 @@ export default {
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.top;
|
||||
this.localHeight = meun.height;
|
||||
this.topVal = options.type == 1 ? '积分' : (options.type == 2 ? '物业费' : '红包卡券');
|
||||
this.topVal = options.type == 1 ? '积分' : (options.type == 2 ? '岁银' : '红包卡券');
|
||||
this.photoVal = options.type == 1 ? 'https://static.hshuishang.com//user_wallet1.png' : (options.type == 2 ? 'https://static.hshuishang.com//user_wallet2.png' : 'https://static.hshuishang.com//user_wallet3.png');
|
||||
this.itemObj = JSON.parse(options.item);
|
||||
this.itemType = options.type;
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<view class="walletBox_item"
|
||||
@click="goWallet(3, walletInfo.pending ? walletInfo.pending.toFixed(2) : '0.00')">
|
||||
<view>{{ walletInfo.pending ? walletInfo.pending.toFixed(2) : "0.00" }}元</view>
|
||||
<view class="walletBox_item_text">待收物业费</view>
|
||||
<view class="walletBox_item_text">待收岁银</view>
|
||||
</view>
|
||||
<!-- <view class="walletBox_item" @click="goWallet(4, walletInfo.handling_fee.toFixed(2))">
|
||||
<view>{{ walletInfo.handling_fee ? walletInfo.handling_fee.toFixed(2) : "0.00" }}元</view>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
<!-- 余额变动记录 -->
|
||||
<view class="records-container">
|
||||
<view class="records-title" v-if="topVal == '待收物业费'">物业费变动记录</view>
|
||||
<view class="records-title" v-if="topVal == '待收岁银'">岁银变动记录</view>
|
||||
<view v-if="records.length == 0">
|
||||
<view class="records-list">暂无变动记录</view>
|
||||
</view>
|
||||
@ -39,7 +39,7 @@
|
||||
<view class="record-balance" v-if="topVal == '应收' || topVal == '已收'">{{ record.change_reason ==
|
||||
1 ? '收款' :
|
||||
'退款' }}</view>
|
||||
<view class="record-balance" v-else-if="topVal == '待收物业费'">待收</view>
|
||||
<view class="record-balance" v-else-if="topVal == '待收岁银'">待收</view>
|
||||
<view class="record-balance" v-else-if="topVal == '手续费'">手续费</view>
|
||||
<view>
|
||||
<text :class="['amount-sign', record.change_reason == 1 ? 'positive' : 'negative']">{{
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
this.topVal = '已收';
|
||||
break;
|
||||
case 3:
|
||||
this.topVal = '待收物业费';
|
||||
this.topVal = '待收岁银';
|
||||
break;
|
||||
case 4:
|
||||
this.topVal = '手续费';
|
||||
@ -112,7 +112,7 @@ export default {
|
||||
filteredRows = res.rows.filter(item => item.change_category == 2);
|
||||
} else if (this.topVal == '已收') {
|
||||
filteredRows = res.rows.filter(item => item.change_category == 1);
|
||||
} else if (this.topVal == '待收物业费') {
|
||||
} else if (this.topVal == '待收岁银') {
|
||||
filteredRows = res.rows.filter(item => item.change_category == 4);
|
||||
} else {
|
||||
filteredRows = res.rows.filter(item => item.change_category == 3);
|
||||
|
||||
54
pages.json
54
pages.json
@ -1160,6 +1160,60 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "packages/jfShop",
|
||||
"pages": [
|
||||
{
|
||||
"path": "index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分商城",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "rule/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分规则",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "record/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "兑换记录",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分兑换详情页",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "submitOrder/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提交订单",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "orderDetail/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "兑换详情",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "myOrder/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@ -119,10 +119,11 @@ page {
|
||||
}
|
||||
|
||||
.search2 {
|
||||
padding: 10rpx 0;
|
||||
width: 55%;
|
||||
position: relative;
|
||||
left: -190rpx;
|
||||
padding: 20rpx;
|
||||
/* width: 100%; */
|
||||
/* position: relative;
|
||||
left: -190rpx; */
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.function-nav {
|
||||
@ -189,7 +190,7 @@ page {
|
||||
width: 710rpx;
|
||||
height: 300rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 10rpx;
|
||||
/* margin-top: 10rpx; */
|
||||
position: relative;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user