This commit is contained in:
2026-03-27 10:15:51 +08:00
parent 230bb76f63
commit 2c00299634
19 changed files with 1001 additions and 1172 deletions

View File

@ -158,35 +158,13 @@ export const createOrder = ({
// 创建购物车订单 // 创建购物车订单
export const createCartOrder = ({ export const createCartOrder = ({
type = "" , product_pic= "",
original_price = "",
actual_price = "",
reduction_amount = 0,
pay_amount = "",
pay_type = "",
address_id = "",
address = "",
name = "",
phone = "",
note = "",
items = []
}) => { }) => {
return request({ return request({
url: CREATE_CART_ORDER, url: CREATE_CART_ORDER,
method: "post", method: "post",
data: { data: {
type, product_pic
original_price,
actual_price,
reduction_amount,
pay_amount,
pay_type,
address_id,
address,
name,
phone,
note,
items
}, },
}); });
}; };

View File

@ -3,9 +3,8 @@
<!-- <view :style="{ height: ststuaBarHeight + 'px' }"></view> --> <!-- <view :style="{ height: ststuaBarHeight + 'px' }"></view> -->
<view <view
class="flex-row-center nav-title ali-puhui-bold" class="flex-row-center nav-title ali-puhui-bold"
style="height:120px;"
> >
<text style="margin-top:35px;">{{ title }}</text> <text style="margin-bottom:35px;">{{ title }}</text>
</view> </view>
</view> </view>
</template> </template>

View File

@ -31,27 +31,27 @@
text: "首页", text: "首页",
isSpecial: false, isSpecial: false,
}, },
{ // {
pageId: "filesPage", // pageId: "filesPage",
iconPath: `${imgPrefix}tabBar-record.png`, // iconPath: `${imgPrefix}tabBar-record.png`,
selectedIconPath: `${imgPrefix}tabBar-selectedRecord.png`, // selectedIconPath: `${imgPrefix}tabBar-selectedRecord.png`,
text: "档案", // text: "档案",
isSpecial: false, // isSpecial: false,
}, // },
{ // {
pageId: "reservationPage", // pageId: "reservationPage",
iconPath: `${imgPrefix}tabbar-reservation.gif`, // iconPath: `${imgPrefix}tabbar-reservation.gif`,
selectedIconPath: `${imgPrefix}tabbar-bath.png`, // selectedIconPath: `${imgPrefix}tabbar-bath.png`,
text: "立即预约", // text: "立即预约",
isSpecial: true, // 特殊样式标记(中间突出的按钮) // isSpecial: true, // 特殊样式标记(中间突出的按钮)
}, // },
{ // {
pageId: "shopPage", // pageId: "shopPage",
iconPath: `${imgPrefix}tabBar-mall.png`, // iconPath: `${imgPrefix}tabBar-mall.png`,
selectedIconPath: `${imgPrefix}tabBar-selectdMall.png`, // selectedIconPath: `${imgPrefix}tabBar-selectdMall.png`,
text: "商城", // text: "分类",
isSpecial: false, // isSpecial: false,
}, // },
{ {
pageId: "minePage", pageId: "minePage",
iconPath: `${imgPrefix}tabBar-mine.png`, iconPath: `${imgPrefix}tabBar-mine.png`,

View File

@ -69,7 +69,7 @@
<image class="right-icon" :src="`${imgPrefix}right-arrow.png`" mode="widthFix"></image> <image class="right-icon" :src="`${imgPrefix}right-arrow.png`" mode="widthFix"></image>
</view> </view>
<text class="nightFee">以下区域需收取调度费奉贤区嘉定区青浦区松江区崇明区金山区</text> <!-- <text class="nightFee">以下区域需收取调度费奉贤区嘉定区青浦区松江区崇明区金山区</text> -->
</template> </template>
<!-- 价格--> <!-- 价格-->

View File

@ -4,7 +4,7 @@
<view class="body-container"> <view class="body-container">
<scroll-view class="scroll-view" :scroll-y="true"> <scroll-view class="scroll-view" :scroll-y="true">
<view class="form-content"> <view class="form-content">
<view class="order-tab-list"> <!-- <view class="order-tab-list">
<view :class="orderType === ORDER_TYPE_RESERVATION ? 'activeItem' : 'tabItem'" <view :class="orderType === ORDER_TYPE_RESERVATION ? 'activeItem' : 'tabItem'"
@click.stop="selectOrderType(ORDER_TYPE_RESERVATION)"> @click.stop="selectOrderType(ORDER_TYPE_RESERVATION)">
预约单 预约单
@ -13,13 +13,13 @@
@click.stop="selectOrderType(ORDER_TYPE_SITE)"> @click.stop="selectOrderType(ORDER_TYPE_SITE)">
现场单 现场单
</view> </view>
</view> </view> -->
<view class="reservation-info-container"> <view class="reservation-info-container">
<!-- 其他内容 --> <!-- 其他内容 -->
<view class="formWrapper"> <view class="formWrapper">
<view class="info-top-view" v-if="orderType != ORDER_TYPE_RESERVATION"> <!-- <view class="info-top-view" v-if="orderType != ORDER_TYPE_RESERVATION">
<view class="top"> <view class="top">
<view class="title-view"> <view class="title-view">
<text class="required">*</text> <text class="required">*</text>
@ -32,9 +32,9 @@
@click="scanCode" /> @click="scanCode" />
</view> </view>
</view> </view>
</view> </view> -->
<view class="form-section form-section-pet"> <!-- <view class="form-section form-section-pet">
<view class="form-label-row"> <view class="form-label-row">
<text class="required">*</text> <text class="required">*</text>
<text class="form-label">选择宠物</text> <text class="form-label">选择宠物</text>
@ -55,7 +55,7 @@
<text class="add-pet-text">添加宠物</text> <text class="add-pet-text">添加宠物</text>
</view> </view>
</view> </view>
</view> </view> -->
<!-- <info-cell key="weight" cell-type="text" title="宠物重量区间" :info="petInfo.weight_name" <!-- <info-cell key="weight" cell-type="text" title="宠物重量区间" :info="petInfo.weight_name"
placeholder='先选择宠物' :is-can-click="false" /> placeholder='先选择宠物' :is-can-click="false" />
<info-cell v-if="selectedPetType === PET_TYPE_CAT" key="mofa" cell-type="text" title="宠物毛发" <info-cell v-if="selectedPetType === PET_TYPE_CAT" key="mofa" cell-type="text" title="宠物毛发"
@ -79,12 +79,12 @@
</view> </view>
<view class="payFooter"> <view class="payFooter">
<view class="leftPay"> <view class="leftPay">
<view class="priceWrapper"> <!-- <view class="priceWrapper">
<text class="text">预估</text> <text class="text">预估</text>
<text class="unitText"> <text class="unitText">
¥<text class="price">{{ totalDisplayPrice }}</text> ¥<text class="price">{{ totalDisplayPrice }}</text>
</text> </text>
</view> </view> -->
<!-- <view class="vipPrice" v-if="discount === 0"> <!-- <view class="vipPrice" v-if="discount === 0">
<view> <view>
<image :src="`${imgPrefix}vipPrice.png`" mode="widthFix" <image :src="`${imgPrefix}vipPrice.png`" mode="widthFix"
@ -95,8 +95,8 @@
</view> </view>
</view> --> </view> -->
</view> </view>
<view class="payBtn" @click.stop="paymentConfirm"> <view class="payBtn" @click.stop="writeOff">
下一步 预约
</view> </view>
</view> </view>
</view> </view>
@ -185,6 +185,65 @@ export default {
} }
}, },
methods: { methods: {
// 核销按钮点击处理
async writeOff () {
try {
// 调用核销 API
const result = await tt.verifyCertificates({
// 唯一标识,防止重复提交(重要!)
verifyToken: `${Date.now()}_${Math.random()}`,
// 当前核销的门店ID
poiId: this.data.currentPoiId,
// 要核销的订单和券列表
orderList: [
{
orderId: '100238388744094', // 订单ID
certificateList: [ // 本次要核销的券
'724375050697789', // 普通团购券
// 次卡需要特殊格式
{
code: '723733187837987',
times: 2 // 本次核销2次
}
]
}
],
// 【必填】核销成功后跳转的页面
orderEntrySchema: {
path: 'pages/order/detail', // 你的订单详情页路径
params: JSON.stringify({ orderId: 'xxx' })
},
// 成功回调仅代表API调用成功
success: (res) => {
console.log('API调用成功', res);
// 需要遍历确认每个券的核销结果
const verifyResults = res.orderVerifyResults;
const allSuccess = verifyResults.every(item => item.resultCode === 0);
if (allSuccess) {
tt.showToast({ title: '核销成功' });
// 刷新页面或跳转
} else {
tt.showToast({ title: '部分核销失败', icon: 'none' });
}
},
// 失败回调
fail: (err) => {
console.error('核销失败', err);
tt.showToast({ title: '核销失败,请重试', icon: 'none' });
}
});
} catch (error) {
console.error('调用异常', error);
}
},
getPetShortName(pet) { getPetShortName(pet) {
const n = pet.name || pet.pet_name || pet.pet_nickname || ''; const n = pet.name || pet.pet_name || pet.pet_nickname || '';
return n.length > 2 ? n.slice(0, 2) + '…' : n.slice(0, 2); return n.length > 2 ? n.slice(0, 2) + '…' : n.slice(0, 2);

View File

@ -118,7 +118,7 @@
</view> </view>
<image class="right-icon" :src="imgPrefix + 'right-arrow.png'" mode="widthFix" /> <image class="right-icon" :src="imgPrefix + 'right-arrow.png'" mode="widthFix" />
</view> </view>
<text class="nightFee">以下区域需收取调度费奉贤区嘉定区青浦区松江区崇明县金山区</text> <!-- <text class="nightFee">以下区域需收取调度费奉贤区嘉定区青浦区松江区崇明县金山区</text> -->
</view> </view>

View File

@ -44,6 +44,12 @@
"navigationBarTitleText": "我的公益" "navigationBarTitleText": "我的公益"
} }
}, },
{
"path": "pages/client/mine/qualification",
"style": {
"navigationBarTitleText": "服务资质"
}
},
{ {
"path": "pages/client/category/index", "path": "pages/client/category/index",
"style": { "style": {

View File

@ -5,28 +5,25 @@
<view class="text-multi-ellipse fs-28 app-fc-main app-font-bold goods-name"> <view class="text-multi-ellipse fs-28 app-fc-main app-font-bold goods-name">
{{ data.product_name || "" }} {{ data.product_name || "" }}
</view> </view>
<view class="flex-row-start label"> <!-- <view class="flex-row-start label">
<image class="hot-icon" :src="`${imgPrefix}mall-hot.png`"></image> <image class="hot-icon" :src="`${imgPrefix}mall-hot.png`"></image>
<view class="fs-20 app-fc-main label-name">{{data.sales}}人买过</view> <view class="fs-20 app-fc-main label-name">{{data.sales}}人买过</view>
</view> </view> -->
<view class="price-row"> <view class="price-row">
<view class="flex-row-start"> <view class="flex-row-start">
<text class="fs-28 price-text"> <text class="fs-28 price-text">
¥ ¥
<text class="fs-28">{{data.prices[0].original_price || 0 }}</text> <text class="fs-28">{{data.prices[0].original_price || 0 }}</text>
</text> </text>
<text class="fs-20 price-label">到手价</text> <!-- <text class="fs-20 price-label">到手价</text> -->
</view> </view>
<text class="fs-24 origin-price" v-if="minPrice.price_shichang"> <text class="fs-24 origin-price" v-if="minPrice.price_shichang">
¥{{ minPrice.price_shichang || 0 }} ¥{{ minPrice.price_shichang || 0 }}
</text> </text>
</view> </view>
<image <view class="buy-now-btn-wrapper" @click.stop="handleBuyNow">
class="add-cart-icon" <text class="buy-now-btn">立即购买</text>
:class="{ 'add-cart-icon-animate': isAnimating }" </view>
:src="`${imgPrefix}mall-addCar.png`"
@click.stop="$emit('addToCar', data)"
/>
</view> </view>
</view> </view>
</template> </template>
@ -76,6 +73,10 @@ export default {
this.isAnimating = false; this.isAnimating = false;
}, 600); }, 600);
}, },
// 立即购买
handleBuyNow() {
this.$emit('buyNow', this.data);
},
}, },
}; };
</script> </script>
@ -158,6 +159,21 @@ export default {
animation: addCartBounce 0.6s ease; animation: addCartBounce 0.6s ease;
} }
} }
.buy-now-btn-wrapper {
margin-top: 16rpx;
display: flex;
justify-content: flex-end;
.buy-now-btn {
background: linear-gradient(90deg, #FF19A0, #FF4DB8);
color: #FFFFFF;
font-size: 24rpx;
padding: 12rpx 32rpx;
border-radius: 24rpx;
font-weight: 500;
}
}
} }
@keyframes addCartBounce { @keyframes addCartBounce {

View File

@ -3,6 +3,9 @@
<!-- 微信复制弹窗 --> <!-- 微信复制弹窗 -->
<WeChatCopyModal ref="wechatCopyModal" /> <WeChatCopyModal ref="wechatCopyModal" />
<!-- 可拖动联系客服组件 -->
<DraggableContact ref="draggableContact" :onClick="handleContactClick" />
<scroll-view class="homeContainer" scroll-y :show-scrollbar="false" :enhanced="true"> <scroll-view class="homeContainer" scroll-y :show-scrollbar="false" :enhanced="true">
<view class="swiperWrapper"> <view class="swiperWrapper">
<swiper indicator-dots="true" autoplay="true" interval="3000" duration="500" circular="true" <swiper indicator-dots="true" autoplay="true" interval="3000" duration="500" circular="true"
@ -15,17 +18,18 @@
<view class="userInfoWrapper"> <view class="userInfoWrapper">
<view class="userInfo" @click="handleUserInfo"> <view class="userInfo" @click="handleUserInfo">
<view class="userContent"> <view class="userContent">
<image
:src=" userInfo.avatar ? userInfo.avatar : `${imgPrefix}home-head.png`"
class="userAvatar" mode="aspectFill" />
<view class="user-info-wrapper">
<view class="userName"> <view class="userName">
{{ userInfo.username ? userInfo.username : "嗨,你好呀" }} {{ userInfo.username ? userInfo.username : "嗨,你好呀" }}
</view> </view>
<view class="userTips" v-if="!userInfo.userID"> <view class="userTips" v-if="!userInfo.userID">
登陆享受更多精彩内容 登陆享受更多精彩内容
</view> </view>
<view v-else class="user-membership-row"> <!-- <view v-else class="user-membership-row">
<view class="vipWrapper">
<image class="lableImg" :src="`${imgPrefix}home-vipLabel.png`" />
v{{ userInfo.vipLevel ? userInfo.vipLevel : 0 }}会员
</view>
<view <view
v-if="userInfo.membershipTier && userInfo.membershipTier > 0" v-if="userInfo.membershipTier && userInfo.membershipTier > 0"
class="membership-tier-badge" class="membership-tier-badge"
@ -37,98 +41,38 @@
> >
<text class="membership-tier-text">{{ getMembershipTierText(userInfo.membershipTier) }}</text> <text class="membership-tier-text">{{ getMembershipTierText(userInfo.membershipTier) }}</text>
</view> </view>
</view> -->
</view> </view>
</view> </view>
</view> </view>
<view class="loginBtn" @click="toLogin" v-if="!userInfo.userID"> <view class="loginBtn" @click="toLogin" v-if="!userInfo.userID">
注册/登陆 注册/登陆
</view> </view>
<view class="loginBtn flexClass" v-else @click="toCouponList">
<view class="couponText">{{ userInfo.couponCount ? userInfo.couponCount : 0 }}张优惠券</view>
<image :src="`${imgPrefix}home-rightWhite Arrow.png`" class="discountCoupon" />
</view>
</view> </view>
<view class="shadowBackground" /> <view class="shadowBackground" />
</view> </view>
<view class="menuBody"> <view class="recommand-goods-wrapper">
<view class="firstMenu"> <!-- <view class="fs-36 app-font-bold app-fc-main recommand-title">
<view class="itemWrapper" @click="toReservation"> 推荐商品
<text class="titlWrapper" style="transform: translateY(-4rpx);">你们在哪我们去哪</text> </view> -->
<view class="content">预约洗护</view> <view class="goods-list">
<view class="tips">随时随地上车洗澡</view> <view class="goods-list-item left">
<view class="itemImg"> <good-item v-for="(good, i) in leftColumnGoods" :index="2 * i" :key="2 * i" :data="good"
<image class="menu-img-lg" :src="`${imgPrefix}home-menuBath.png`" mode="aspectFill" /> @addToCar="addToCar" />
</view>
<view class="goods-list-item">
<good-item v-for="(good, i) in rightColumnGoods" :index="2 * i + 1" :key="2 * i + 1"
:data="good" @addToCar="addToCar" />
</view> </view>
</view> </view>
<view class="line" /> <view v-if="isLoadingGoods" class="loading-wrapper flex-center">
<view class="itemWrapper" @click="toPublicBenefit" > <uni-load-more status="loading" :show-text="false" />
<text class="titlWrapper">关爱宠物,传递恩情</text>
<view class="content">公益助理</view>
<view class="tips">帮我找个家</view>
<view class="itemImg">
<image class="menu-img-sm" :src="`${imgPrefix}h-public.png`" mode="aspectFill" />
</view>
</view>
</view>
<view class="secondMenu">
<scroll-view class="scrollWrapper" :scroll-x="secondMenuItemList.length > 4" enable-flex
:scroll-with-animation="false"
@scroll="onSecondMenuScroll">
<view class="secondMenuInner" :class="{ 'no-scroll': secondMenuItemList.length <= 4 }">
<view class="itemWrapper" v-for="(item, i) in secondMenuItemList" :key="i"
@click="handleNav(item)">
<view class="imgWrapper">
<image class="second-icon" :src="item.img" mode="aspectFill" />
</view>
<view class="itemTitle">
{{ item.title }}
</view>
<view class="itemTips">
{{ item.tips }}
</view>
</view>
</view>
</scroll-view>
<view class="custom-indicator" v-if="secondMenuItemList.length > 4">
<view class="itemLine" :class="{ active: secondMenuIndicatorIndex === 0 }"></view>
<view class="itemLine" :class="{ active: secondMenuIndicatorIndex === 1 }"></view>
</view> </view>
</view> </view>
<view class="thirdMenu">
<view class="itemWrapper" @click="toDogTraining">
<view>
<view class="title">上门服务</view>
<view class="tips">邀请好友得好礼</view>
</view>
<image class="third-icon" :src="`${imgPrefix}h-door.png`" mode="aspectFill" />
</view>
<view class="itemWrapper" @click="toJoin">
<view>
<view class="title">加盟咨询</view>
<view class="tips">立即加盟咨询</view>
</view>
<image class="third-icon" :src="`${imgPrefix}home-joinIn.png`" mode="aspectFill" />
</view>
</view>
<view class="serviceMenu" @click="jumpToWeChat">
<view class="left">
<image class="service-icon" :src="`${imgPrefix}supportStaff.png`" mode="aspectFill" />
<view class="content">
<view class="title">在线客服</view>
<view class="tips">遇到什么问题您尽管说哦~</view>
</view>
</view>
<view>
<image :src="`${imgPrefix}right-arrow.png`" class="rightArrow" />
</view>
</view>
</view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
@ -142,16 +86,30 @@ import {
userWllet userWllet
} from "../../../api/login"; } from "../../../api/login";
import WeChatCopyModal from "@/components/WeChatCopyModal.vue"; import WeChatCopyModal from "@/components/WeChatCopyModal.vue";
import GoodItem from "../shop/components/GoodItem.vue";
import DraggableContact from "@/components/DraggableContact.vue";
import {
getGoodsClassify,
getGoodsListData
} from "@/api/shop";
export default { export default {
name: "HomePage", name: "HomePage",
components: { components: {
WeChatCopyModal GoodItem,
WeChatCopyModal,
DraggableContact
}, },
data() { data() {
return { return {
imgPrefix, imgPrefix,
couponCount: 1, couponCount: 1,
goodsList: [], // 商品列表
goodsTotal: 0, // 商品总数
goodPage: 1, // 当前页码
isLoadingGoods: false, // 是否正在加载商品
refreshTriggered: false, // 刷新是否已触发
cartCount: 0, // 购物车数量
swiperDataList: [ swiperDataList: [
{ {
image: `${imgPrefix}banner1.png` image: `${imgPrefix}banner1.png`
@ -202,13 +160,39 @@ export default {
}, },
userInfo() { userInfo() {
return this.$store.state?.user?.userInfo || {}; return this.$store.state?.user?.userInfo || {};
},
leftColumnGoods() {
return this.goodsList.filter((v, i) => i % 2 === 0);
},
rightColumnGoods() {
return this.goodsList.filter((v, i) => i % 2 === 1);
},
cartShowCount() {
return this.cartCount > 9 ? "9+" : this.cartCount;
} }
}, },
created() { created() {
this.buyService() this.getGoodsList()
}, },
methods: { methods: {
getGoodsList() {
if (this.isLoadingGoods) return;
this.isLoadingGoods = true;
const params = {
type: 0
}
getGoodsListData(params)
.then((res) => {
const list = res?.data || [];
this.goodsList =
this.goodPage === 1 ? list : [...this.goodsList, ...list];
this.goodsTotal = res?.count || 0;
})
.finally(() => {
this.isLoadingGoods = false;
this.refreshTriggered = false;
});
},
toLogin() { toLogin() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/client/auth/index", url: "/pages/client/auth/index",
@ -258,24 +242,6 @@ export default {
// url: '/pageHome/service/index' // url: '/pageHome/service/index'
// }); // });
}, },
// 我的钱包
buyService() {
const value = JSON.parse(uni.getStorageSync('vuex'));
console.log(value, '??')
this.userId = value.user.userInfo.userID
this.nick_name = value.user.userInfo.username
// this.yaoqing_code = value.user.userInfo.yaoqing_code
// console.log(value,'--')
userWllet(value.user.userInfo.userID).then((res) => {
uni.setStorage({ //存入Storage
key: 'userInfo',
data: { //存的数据(可以是多条)
'user_id': res.data.user_id,
'wallet_id': res.data.id
}
})
});
},
onSecondMenuScroll(e) { onSecondMenuScroll(e) {
const scrollLeft = e.detail.scrollLeft || 0; const scrollLeft = e.detail.scrollLeft || 0;
const sysInfo = uni.getSystemInfoSync(); const sysInfo = uni.getSystemInfoSync();
@ -352,6 +318,30 @@ export default {
}); });
}, },
// 立即购买
addToCar(goodsData) {
console.log(goodsData,'--=')
uni.navigateTo({
url: `/pages/client/order/create`,
success: (res) => {
// 通过eventChannel向被打开页面传送数据
res.eventChannel.emit("createOrder", {
goodList: [{
...this.goodsData,
goods_id:goodsData.product_id,
price_id:goodsData.prices[0].price_id,
number:1,
goods_name: goodsData.product_name,
price_name: goodsData?.product_name,
goods_price: goodsData.prices[0].actual_price,
product_pic:goodsData.product_pic
}, ],
});
},
});
},
// 跳转微信客服 - 使用自定义弹窗 // 跳转微信客服 - 使用自定义弹窗
jumpToWeChat() { jumpToWeChat() {
if (this.$refs.wechatCopyModal) { if (this.$refs.wechatCopyModal) {
@ -361,6 +351,16 @@ export default {
}); });
} }
}, },
// 可拖动联系客服组件点击回调
handleContactClick() {
if (this.$refs.wechatCopyModal) {
this.$refs.wechatCopyModal.show({
title: '请添加客服号',
weChatCode: 'Wagoo2025'
});
}
},
}, },
}; };
</script> </script>
@ -371,6 +371,33 @@ export default {
background-color: #ffecf3; background-color: #ffecf3;
} }
.recommand-goods-wrapper {
.recommand-title {
margin-bottom: 10rpx;
}
.goods-list {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
margin-top: 16rpx;
.goods-list-item {
flex: 1;
min-width: 0;
&.left {
margin-right: 20rpx;
}
}
}
.loading-wrapper {
padding: 10rpx 0;
}
}
.homeContainer { .homeContainer {
height: calc(100vh - #{$app_tabbar_height + 36}); height: calc(100vh - #{$app_tabbar_height + 36});
background-color: #ffecf3; background-color: #ffecf3;
@ -431,7 +458,22 @@ export default {
align-items: center; align-items: center;
.userContent { .userContent {
margin-left: 16rpx; display: flex;
align-items: center;
gap: 16rpx;
.userAvatar {
width: 92rpx;
height: 92rpx;
border-radius: 50%;
flex-shrink: 0;
}
.user-info-wrapper {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.userName { .userName {
font-weight: 500; font-weight: 500;

View File

@ -14,13 +14,13 @@
{{ userInfo.userID && userInfo.username ? userInfo.username : '嗨,你好呀' }} {{ userInfo.userID && userInfo.username ? userInfo.username : '嗨,你好呀' }}
</view> </view>
</view> </view>
<view class="vipWrapper"> <!-- <view class="vipWrapper">
<image class="lableImg" :src="`${imgPrefix}home-vipLabel.png`" mode=""></image> <image class="lableImg" :src="`${imgPrefix}home-vipLabel.png`" mode=""></image>
v{{ userInfo.vipLevel || 1 }}会员 v{{ userInfo.vipLevel || 1 }}会员
</view> -->
</view> </view>
</view> </view>
</view> <!-- <view class="userRight">
<view class="userRight">
<view class="userRgihtItemView" @click="jumpTo('/pages/client/recharge/index?tab=points')"> <view class="userRgihtItemView" @click="jumpTo('/pages/client/recharge/index?tab=points')">
<view class="num"> <view class="num">
{{ displayTotalPoints }} {{ displayTotalPoints }}
@ -45,11 +45,11 @@
券包 券包
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
<view class="myPriceView"> <!-- <view class="myPriceView">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image :src="`${imgPrefix}accountPrice.png`" class="priceImg"></image> <image :src="`${imgPrefix}accountPrice.png`" class="priceImg"></image>
<text class="fs-24">我的余额{{ displayWalletBalance !== '' ? displayWalletBalance : 0 }}</text> <text class="fs-24">我的余额{{ displayWalletBalance !== '' ? displayWalletBalance : 0 }}</text>
@ -60,9 +60,9 @@
去充值 去充值
<image :src="`${imgPrefix}right-arrow.png`" class="arrowImg"></image> <image :src="`${imgPrefix}right-arrow.png`" class="arrowImg"></image>
</view> </view>
</view> </view> -->
<view class="menuView"> <!-- <view class="menuView">
<view class="menuItem" @click="jumpTo('/pages/client/petOrder/index')"> <view class="menuItem" @click="jumpTo('/pages/client/petOrder/index')">
<image class="menuImg" :src="`${imgPrefix}mine-resaOrder.png`"></image> <image class="menuImg" :src="`${imgPrefix}mine-resaOrder.png`"></image>
<view class="menuTitle"> <view class="menuTitle">
@ -82,7 +82,7 @@
邀请有礼 邀请有礼
</view> </view>
</view> </view>
</view> </view> -->
<!-- <view class="mine-slide"> <!-- <view class="mine-slide">
<view class="recharge-slide"> <view class="recharge-slide">
<view class="scroll"> <view class="scroll">
@ -123,55 +123,48 @@
<image class="meb-im" :src="`${imgPrefix}member-vip.png`" /> <image class="meb-im" :src="`${imgPrefix}member-vip.png`" />
</view> --> </view> -->
<view class="navView"> <view class="navView">
<view class="navItem" @click="jumpTo('/pageHome/selectPet/index')"> <view class="navItem" @click="jumpTo('/pages/client/order/list')">
<view class="navTitle">
商城订单
</view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view>
<!-- <view class="navItem" @click="jumpTo('/pageHome/selectPet/index')">
<view class="navTitle"> <view class="navTitle">
我的宠物 我的宠物
</view> </view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image> <image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view> </view> -->
<view class="navItem" @click="jumpTo('/pageHome/selectAddress/index')"> <view class="navItem" @click="jumpTo('/pageHome/selectAddress/index')">
<view class="navTitle"> <view class="navTitle">
收货地址 收货地址
</view> </view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image> <image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view> </view>
<view class="navItem" @click="jumpTo('/pages/client/mine/welfare')">
<view class="navTitle">
我的公益
</view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view>
<view class="navItem" @click="jumpTo(`/pages/richText/exchange-coupons?userId=${userInfo.id}`)">
<view class="navTitle">
兑换码
</view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view>
<view class="navItem" @click="jumpTo(`/pages/client/butler/edit`)">
<view class="navTitle">
成为小哇
</view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view>
<view class="navItem" @click="showContact"> <view class="navItem" @click="showContact">
<view class="navTitle"> <view class="navTitle">
反馈建议 反馈建议
</view> </view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image> <image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view> </view>
<!-- <view class="navItem" @click="jumpTo(`/pages/client/mine/help`)">
<view class="navTitle">
使用帮助
</view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view> -->
<view class="navItem" @click="jumpTo('/pages/client/news/index')"> <view class="navItem" @click="jumpTo('/pages/client/news/index')">
<view class="navTitle"> <view class="navTitle">
系统消息 系统消息
</view> </view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image> <image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view> </view>
<view class="navItem" @click="jumpTo('/pages/client/mine/qualification')">
<view class="navTitle">
服务资质
</view>
<image class="navArrow" :src="`${imgPrefix}right-arrow.png`"></image>
</view>
<!-- <view class="navItem" @click="jumpTo(`/pages/client/mine/aboutus`)"> <!-- <view class="navItem" @click="jumpTo(`/pages/client/mine/aboutus`)">
<view class="navTitle"> <view class="navTitle">
关于平台 关于平台
@ -365,6 +358,7 @@ title: '请添加客服号',
.userLeft { .userLeft {
display: flex; display: flex;
flex: 1; flex: 1;
align-items: center;
.userAvatar { .userAvatar {
width: 92rpx; width: 92rpx;

View File

@ -0,0 +1,42 @@
<template>
<view class="qualification-container">
<image
src="/static/images/yyzz.png"
mode="widthFix"
class="qualification-image"
></image>
</view>
</template>
<script>
export default {
data() {
return {};
},
methods: {
jumpTo(url) {
uni.navigateTo({
url,
});
},
},
};
</script>
<style lang="scss" scoped>
.qualification-container {
display: flex;
justify-content: center;
align-items: center;
padding: 40rpx;
background: rgba(0, 0, 0, 0.5);
min-height: 100vh;
box-sizing: border-box;
.qualification-image {
width: 100%;
max-width: 600rpx;
height: auto;
}
}
</style>

View File

@ -67,9 +67,6 @@
<!-- 待发货 --> <!-- 待发货 -->
<template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)"> <template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)">
<view class="flex-center fs-24 app-fc-main cancel-order-btn" @click.stop="$emit('cancelOrder', data)">
取消订单
</view>
<view class="order-btns-right"> <view class="order-btns-right">
<!-- <view class="flex-center fs-24 app-fc-main status-btn" @click.stop="$emit('concactService', data)"> <!-- <view class="flex-center fs-24 app-fc-main status-btn" @click.stop="$emit('concactService', data)">
联系客服 联系客服
@ -80,9 +77,12 @@
> >
申请售后 申请售后
</view> --> </view> -->
<view class="flex-center fs-24 app-fc-main status-btn" @click.stop="$emit('refund', data)">
退款
</view>
<view class="flex-center fs-24 app-fc-white status-btn confirm" <view class="flex-center fs-24 app-fc-white status-btn confirm"
@click.stop="$emit('remindSilver', data)"> @click.stop="jumpToReservation">
提醒发货 立即预约
</view> </view>
</view> </view>
</template> </template>
@ -278,6 +278,11 @@
jumpToDetails() { jumpToDetails() {
this.$emit('jumpToDetails', this.data) this.$emit('jumpToDetails', this.data)
}, },
jumpToReservation() {
uni.reLaunch({
url: '/pages/client/index/index?activePageId=reservationPage'
});
},
}, },
}; };
</script> </script>
@ -356,7 +361,7 @@
.order-btns { .order-btns {
padding-top: 20rpx; padding-top: 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: flex-end;
align-items: center; align-items: center;
.cancel-order-btn { .cancel-order-btn {
@ -371,9 +376,11 @@
} }
.status-btn { .status-btn {
padding: 16rpx 20rpx; width: 70px;
height: 34px;
// padding: 16rpx 20rpx;
border-radius: 64rpx; border-radius: 64rpx;
border: 1px solid #9b939a; border: 1px solid #FF19A0;;
margin-left: 20rpx; margin-left: 20rpx;
&.confirm { &.confirm {

View File

@ -1,41 +1,5 @@
<template> <template>
<view class="order-create-container"> <view class="order-create-container">
<view class="info-cell address-info-cell" @click="jumpToAddress">
<view class="address-content">
<view class="address-row-first">
<image class="address-icon" src="@/static/images/address.png" />
<text v-if="!addressInfo.id" class="address-placeholder">
添加收货地址
</text>
<template v-else>
<text class="address-name">
{{ addressInfo.recipient_name || "" }}
<text class="address-phone">
{{ addressInfo.phone || "" }}
</text>
</text>
</template>
</view>
<view v-if="addressInfo" class="address-row-second">
<text class="address-details">
{{ addressInfo.full_address || "" }}
</text>
</view>
<image v-if="!petOrderAddressId" class="arrow-icon" :src="`${imgPrefix}right-arrow.png`"
mode="widthFix" />
</view>
</view>
<view v-if="!petOrderId" class="info-cell sliver-info-cell" @click="openSliverModal">
<view class="flex-row-start sliver-content">
<image class="sliver-icon" src="./static/sliver-icon.png" mode="widthFix" />
<view class="sliver-text">
{{ !sliverInfo.id ? "请选择配送方式" : sliverInfo.name }}
</view>
<image class="arrow-icon" :src="`${imgPrefix}right-arrow.png`" mode="widthFix" />
</view>
</view>
<!-- 商品信息 --> <!-- 商品信息 -->
<view class="info-cell goods-info-cell"> <view class="info-cell goods-info-cell">
<template> <template>
@ -68,17 +32,17 @@
<image class="arrow-icon" src="@/static/images/arrow_right_black.png" mode="widthFix" /> <image class="arrow-icon" src="@/static/images/arrow_right_black.png" mode="widthFix" />
</view> </view>
</view> </view>
<view class="flex-row-between pay-info"> <!-- <view class="flex-row-between pay-info">
<text class="pay-label">运费</text> <text class="pay-label">运费</text>
<text class="pay-value">{{ sliverFee ? `${sliverFee}` : "包邮" }}</text> <text class="pay-value">{{ sliverFee ? `${sliverFee}` : "包邮" }}</text>
</view> </view> -->
<view class="flex-row-between pay-price"> <view class="flex-row-between pay-price">
<text class="pay-label">需付款</text> <text class="pay-label">需付款</text>
<text class="pay-total">{{ payPrice }}</text> <text class="pay-total">{{ payPrice }}</text>
</view> </view>
</view> </view>
<view class="info-cell payment-method-cell"> <!-- <view class="info-cell payment-method-cell">
<view class="payment-item" @click.stop="selectOption1('1')"> <view class="payment-item" @click.stop="selectOption1('1')">
<view class="payment-left"> <view class="payment-left">
<image class="payment-icon" src="@/static/images/douy.png" mode="widthFix" /> <image class="payment-icon" src="@/static/images/douy.png" mode="widthFix" />
@ -88,16 +52,7 @@
:src="selected2 ? require('@/static/images/cart_checked.png') : require('@/static/images/unchecked.png')" :src="selected2 ? require('@/static/images/cart_checked.png') : require('@/static/images/unchecked.png')"
mode="widthFix" /> mode="widthFix" />
</view> </view>
<view class="payment-item" @click.stop="selectOption2('2')"> </view> -->
<view class="payment-left">
<image class="payment-icon" src="@/static/images/wallet.png" mode="widthFix" />
<text class="payment-text">钱包支付</text>
</view>
<image class="payment-check"
:src="selected4 ? require('@/static/images/cart_checked.png') : require('@/static/images/unchecked.png')"
mode="widthFix" />
</view>
</view>
<!-- 可拖动联系客服组件 --> <!-- 可拖动联系客服组件 -->
<DraggableContact ref="draggableContact" :onClick="handleContactBtnClick" /> <DraggableContact ref="draggableContact" :onClick="handleContactBtnClick" />
@ -105,31 +60,14 @@
<view class="place-view"></view> <view class="place-view"></view>
<view class="order-create-bottom"> <view class="order-create-bottom">
<view class="cancel-btn" @click="cancelOrder"> <!-- <view class="cancel-btn" @click="cancelOrder">
<text class="cancel-btn-text">取消订单</text> <text class="cancel-btn-text">取消订单</text>
</view> </view> -->
<view class="pay-btn" @click="confirmPay"> <view class="pay-btn" @click="confirmPay">
<text class="pay-btn-text">立即支付</text> <text class="pay-btn-text">立即支付</text>
</view> </view>
</view> </view>
<select-modal v-if="showSliverModal" title="请选择配送方式" @close="showSliverModal = false">
<view class="sliver-content">
<view class="flex-row-between sliver-item" v-for="item in sliverTypeList" :key="item.id"
@click="changeSliverType(item)">
<text class="fs-32 app-fc-main">{{ item.name }}</text>
<image class="select-icon" :src="
item.id === selectSliverInfo.id
? require('@/static/images/cart_checked.png')
: require('@/static/images/unchecked.png')
" />
</view>
<view class="flex-center fs-30 app-fc-white sliver-btn" @click="confirmSliverType">
确定
</view>
</view>
</select-modal>
<good-info-modal v-if="showGoodInfoModal" :goods="orderData" @close="showGoodInfoModal = false" /> <good-info-modal v-if="showGoodInfoModal" :goods="orderData" @close="showGoodInfoModal = false" />
<recharge-coupon-modal v-if="showCouponModal" :couponList="usefullCouponList" :price="orderPrice" <recharge-coupon-modal v-if="showCouponModal" :couponList="usefullCouponList" :price="orderPrice"
@ -301,50 +239,32 @@
createOrder(isPrePay) { createOrder(isPrePay) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!isPrePay) { if (!isPrePay) {
if (!this.addressInfo?.id) {
uni.showToast({
title: "请选择收货地址",
icon: "none",
});
return reject();
}
if (!this.sliverInfo?.id) {
uni.showToast({
title: "请选择配送方式",
icon: "none",
});
return reject();
}
uni.showLoading({ uni.showLoading({
title: "处理中", title: "处理中",
mask: true, mask: true,
}); });
} }
console.log(this.orderData,'???')
const item = {
product_id:this.orderData[0].id,
price_id:this.orderData[0].prices[0].id,
price_desc:this.orderData[0].product_desc,
product_name:this.orderData[0].product_name,
product_pic:this.orderData[0].product_pic,
number:this.orderData[0].number,
product_price:this.orderData[0].prices[0].actual_price
}
createCartOrder({ createCartOrder({
type:this.sliverInfo.id, // product_id:this.orderData[0].price_id,
original_price:this.orderData[0].original_price, // price_id:this.orderData[0].price_id,
actual_price:this.payPrice + '', // // price_desc:this.orderData[0].product_desc,
reduction_amount:'0', // product_name:this.orderData[0].goods_name,
pay_amount:this.payPrice +'', // // product_pic:this.orderData[0].product_pic,
pay_type: Number(this.WeChat) || Number(this.wallet), // // number:this.orderData[0].number,
address_id:this.addressInfo.id, // product_price:this.orderData[0].goods_price
address:this.addressInfo.full_address, // type:this.sliverInfo.id,
name:this.addressInfo.recipient_name, // original_price:this.orderData[0].original_price,
phone:this.addressInfo.phone, // actual_price:this.payPrice + '',
note:'', // reduction_amount:'0',
items:item // pay_amount:this.payPrice +'',
// pay_type: Number(this.WeChat) || Number(this.wallet),
// address_id:this.addressInfo.id,
// address:this.addressInfo.full_address,
// name:this.addressInfo.recipient_name,
// phone:this.addressInfo.phone,
// note:'',
}) })
.then((res) => { .then((res) => {
if (isPrePay) { if (isPrePay) {
@ -352,11 +272,7 @@
this.orderPrice = +(res?.info?.price || 0).toFixed(2); this.orderPrice = +(res?.info?.price || 0).toFixed(2);
!this.useCouponInfo && this.setDefaultCoupon(); !this.useCouponInfo && this.setDefaultCoupon();
} else { } else {
if (this.WeChat == 1) { this.pay(res?.data)
this.pay(res?.data);
} else if (this.wallet == 2) {
this.buyService(res?.data);
}
} }
resolve(); resolve();
}) })
@ -370,128 +286,128 @@
}); });
}); });
}, },
buyService(order) { // buyService(order) {
uni.showLoading({ // uni.showLoading({
title: "处理中", // title: "处理中",
mask: true, // mask: true,
}); // });
const value = (this.$store.state && this.$store.state.user && this.$store.state.user.userInfo) || {}; // const value = (this.$store.state && this.$store.state.user && this.$store.state.user.userInfo) || {};
const data = { // const data = {
wallet_id: value.wallet_id, // wallet_id: value.wallet_id,
total_fee: this.payPrice, // total_fee: this.payPrice,
type: 4, // type: 4,
order_id: order.order_id, // order_id: order.order_id,
order_no: order.order_no // order_no: order.order_no
} // }
walletTransaction(data).then((res) => { // walletTransaction(data).then((res) => {
if (res.code == 0) { // if (res.code == 0) {
uni.showToast({ // uni.showToast({
title: '支付成功', // title: '支付成功',
icon: 'none' // icon: 'none'
}) // })
uni.requestSubscribeMessage({ // uni.requestSubscribeMessage({
tmplIds: ['QoTeQwj4xw2UQMK5jI67MzAVOo6og76oqZ7BDIJW7cE', // tmplIds: ['QoTeQwj4xw2UQMK5jI67MzAVOo6og76oqZ7BDIJW7cE',
'GPWlTkaNbi7JqvxltLKuZZMtKedSZfEKlirV7yOUu-0' // 'GPWlTkaNbi7JqvxltLKuZZMtKedSZfEKlirV7yOUu-0'
], // ],
success(res) { // success(res) {
uni.hideLoading() // uni.hideLoading()
if (res['QoTeQwj4xw2UQMK5jI67MzAVOo6og76oqZ7BDIJW7cE'] === 'accept') { // if (res['QoTeQwj4xw2UQMK5jI67MzAVOo6og76oqZ7BDIJW7cE'] === 'accept') {
uni.showToast({ // uni.showToast({
title: '订阅成功', // title: '订阅成功',
icon: 'success', // icon: 'success',
}) // })
} // }
if (res['GPWlTkaNbi7JqvxltLKuZZMtKedSZfEKlirV7yOUu-0'] === 'accept') { // if (res['GPWlTkaNbi7JqvxltLKuZZMtKedSZfEKlirV7yOUu-0'] === 'accept') {
uni.showToast({ // uni.showToast({
title: '订阅成功', // title: '订阅成功',
icon: 'success', // icon: 'success',
}) // })
} // }
}, // },
fail() { // fail() {
uni.showToast({ // uni.showToast({
title: '订阅失败', // title: '订阅失败',
icon: 'error', // icon: 'error',
}) // })
}, // },
complete: () => { // complete: () => {
}, // },
}) // })
if (this.petOrderId) { // if (this.petOrderId) {
this.jumpToPetOrder(); // this.jumpToPetOrder();
return; // return;
} // }
uni.redirectTo({ // uni.redirectTo({
url: `/pages/client/order/details?id=${order.order_id}`, // url: `/pages/client/order/details?id=${order.order_id}`,
}); // });
} else if (res.code == 400) { // } else if (res.code == 400) {
uni.showToast({ // uni.showToast({
title: '支付失败', // title: '支付失败',
icon: 'none' // icon: 'none'
}) // })
} // }
}); // });
}, // },
creatCartOrder(isPrePay) { // creatCartOrder(isPrePay) {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
if (!isPrePay) { // if (!isPrePay) {
if (!this.petOrderId) { // if (!this.petOrderId) {
if (!this.addressInfo?.id) { // if (!this.addressInfo?.id) {
uni.showToast({ // uni.showToast({
title: "请选择收货地址", // title: "请选择收货地址",
icon: "none", // icon: "none",
}); // });
return reject(); // return reject();
} // }
if (!this.sliverInfo?.id) { // if (!this.sliverInfo?.id) {
uni.showToast({ // uni.showToast({
title: "请选择配送方式", // title: "请选择配送方式",
icon: "none", // icon: "none",
}); // });
return reject(); // return reject();
} // }
} // }
uni.showLoading({ // uni.showLoading({
title: "处理中", // title: "处理中",
mask: true, // mask: true,
}); // });
} // }
createCartOrder({ // createCartOrder({
type:this.sliverInfo.id, // type:this.sliverInfo.id,
original_price:this.orderData[0].original_price, // original_price:this.orderData[0].original_price,
actual_price:this.payPrice + '', // actual_price:this.payPrice + '',
reduction_amount:'0', // reduction_amount:'0',
pay_amount:this.payPrice + '', // pay_amount:this.payPrice + '',
pay_type: Number(this.WeChat) || Number(this.wallet), // pay_type: Number(this.WeChat) || Number(this.wallet),
address_id:this.addressInfo.id, // address_id:this.addressInfo.id,
address:this.addressInfo.full_address, // address:this.addressInfo.full_address,
name:this.addressInfo.recipient_name, // name:this.addressInfo.recipient_name,
phone:this.addressInfo.phone, // phone:this.addressInfo.phone,
note:'', // note:'',
items:this.orderData // items:this.orderData
}) // })
.then((res) => { // .then((res) => {
if (isPrePay) { // if (isPrePay) {
this.confirmPrice = +(res?.data?.pay_amount || 0).toFixed(2); // this.confirmPrice = +(res?.data?.pay_amount || 0).toFixed(2);
this.orderPrice = +(res?.data?.original_price || 0).toFixed(2); // this.orderPrice = +(res?.data?.original_price || 0).toFixed(2);
!this.useCouponInfo && this.setDefaultCoupon(); // !this.useCouponInfo && this.setDefaultCoupon();
} else { // } else {
if (this.WeChat == 1) { // if (this.WeChat == 1) {
this.pay(res?.data); // this.pay(res?.data);
} else if (this.wallet == 2) { // } else if (this.wallet == 2) {
this.buyService(res?.data); // this.buyService(res?.data);
} // }
} // }
return resolve(); // return resolve();
}) // })
.catch(() => { // .catch(() => {
return reject(); // return reject();
}); // });
}); // });
}, // },
pay(orderId) { pay(orderId) {
payOrder({ payOrder({
type:4, type:4,
@ -514,25 +430,8 @@
icon: "none", icon: "none",
}); });
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: ['QoTeQwj4xw2UQMK5jI67MzAVOo6og76oqZ7BDIJW7cE',
'GPWlTkaNbi7JqvxltLKuZZMtKedSZfEKlirV7yOUu-0'
],
success(res) { success(res) {
uni.hideLoading() uni.hideLoading()
if (res['QoTeQwj4xw2UQMK5jI67MzAVOo6og76oqZ7BDIJW7cE'] ===
'accept') {
uni.showToast({
title: '订阅成功',
icon: 'success',
})
}
if (res['GPWlTkaNbi7JqvxltLKuZZMtKedSZfEKlirV7yOUu-0'] ===
'accept') {
uni.showToast({
title: '订阅成功',
icon: 'success',
})
}
}, },
fail() { fail() {
uni.showToast({ uni.showToast({
@ -689,7 +588,7 @@
}); });
return return
} }
this.type === "cart" ? this.creatCartOrder() : this.createOrder(); this.createOrder()
}, },
changeSliverType(item) { changeSliverType(item) {
this.selectSliverInfo = { this.selectSliverInfo = {

View File

@ -19,10 +19,10 @@
<template v-if="orderData.status === SHOP_ORDER_UNSLIVER && !orderData.tui_status"> <template v-if="orderData.status === SHOP_ORDER_UNSLIVER && !orderData.tui_status">
<view class="flex-row-center"> <view class="flex-row-center">
<image class="status-icon" src="./static/order_ungo.png" mode="widthFix" /> <image class="status-icon" src="./static/order_ungo.png" mode="widthFix" />
<text class="fs-36 app-fc-main app-font-bold">发货</text> <text class="fs-36 app-fc-main app-font-bold">预约</text>
</view> </view>
<view class="fs-24 app-fc-main status-tips"> <view class="fs-24 app-fc-main status-tips">
已付款等待商家发货 已付款待预约
</view> </view>
</template> </template>
@ -117,17 +117,17 @@
</view> </view>
</view> </view>
<view class="info-cell sliver-info-cell"> <!-- <view class="info-cell sliver-info-cell">
<view class="flex-row-start sliver-content"> <view class="flex-row-start sliver-content">
<image class="sliver-icon" src="./static/sliver-icon.png" mode="widthFix" /> <image class="sliver-icon" src="./static/sliver-icon.png" mode="widthFix" />
<view class="sliver-text"> <view class="sliver-text">
{{ orderData.type === 1 ? "快递配送" : "随车订单" }} {{ orderData.type === 1 ? "快递配送" : "随车订单" }}
</view> </view>
</view> </view>
</view> </view> -->
<!-- 随车订单待收货状态显示 --> <!-- 随车订单待收货状态显示 -->
<view <!-- <view
v-if="orderData.order_type === ORDER_TYPE_BYCAR && orderData.status === SHOP_ORDER_UNRECEIVE && !orderData.tui_status"> v-if="orderData.order_type === ORDER_TYPE_BYCAR && orderData.status === SHOP_ORDER_UNRECEIVE && !orderData.tui_status">
<view class="info-cell info-cell-guanjia" v-if="carNumber || managerPhoneNum || managerName"> <view class="info-cell info-cell-guanjia" v-if="carNumber || managerPhoneNum || managerName">
<image :src="guanjiaPic || require('@/static/images/head.png')" mode="aspectFit" class="head-icon" /> <image :src="guanjiaPic || require('@/static/images/head.png')" mode="aspectFit" class="head-icon" />
@ -140,7 +140,7 @@
<text class="app-fc-main fs-24">电话</text> <text class="app-fc-main fs-24">电话</text>
</view> </view>
</view> </view>
</view> </view> -->
<!-- 商品信息 --> <!-- 商品信息 -->
<view class="info-cell goods-info-cell"> <view class="info-cell goods-info-cell">
@ -164,19 +164,6 @@
</view> </view>
<view class="info-cell pay-cell"> <view class="info-cell pay-cell">
<view class="flex-row-between pay-info">
<text class="pay-label">运费</text>
<text class="pay-value">{{ sliverFee ? `¥${sliverFee}` : "包邮" }}</text>
</view>
<view v-if="orderData.dikou_id" class="flex-row-between pay-info coupon-row">
<text class="pay-label">优惠券</text>
<view class="flex-row-end">
<text class="coupon-price">
-¥{{ couponFee }}
</text>
<image class="arrow-icon" src="@/static/images/arrow_right_black.png" mode="widthFix" />
</view>
</view>
<view class="flex-row-between pay-price"> <view class="flex-row-between pay-price">
<text class="pay-label"> <text class="pay-label">
商品总价 商品总价
@ -224,7 +211,7 @@
</view> </view>
<!-- 只有待支付显示 --> <!-- 只有待支付显示 -->
<view class="info-cell payment-method-cell" v-if="orderData.status === SHOP_ORDER_UNPAY"> <!-- <view class="info-cell payment-method-cell" v-if="orderData.status === SHOP_ORDER_UNPAY">
<view class="payment-item" @click.stop="selectOption1('1')"> <view class="payment-item" @click.stop="selectOption1('1')">
<view class="payment-left"> <view class="payment-left">
<image class="payment-icon" src="@/static/images/douy.png" mode="widthFix" /> <image class="payment-icon" src="@/static/images/douy.png" mode="widthFix" />
@ -234,16 +221,8 @@
:src="selected2 ? require('@/static/images/cart_checked.png') : require('@/static/images/unchecked.png')" :src="selected2 ? require('@/static/images/cart_checked.png') : require('@/static/images/unchecked.png')"
mode="widthFix" /> mode="widthFix" />
</view> </view>
<view class="payment-item" @click.stop="selectOption2('2')">
<view class="payment-left"> </view> -->
<image class="payment-icon" src="@/static/images/wallet.png" mode="widthFix" />
<text class="payment-text">钱包支付</text>
</view>
<image class="payment-check"
:src="selected4 ? require('@/static/images/cart_checked.png') : require('@/static/images/unchecked.png')"
mode="widthFix" />
</view>
</view>
<!-- <view <!-- <view
v-if="orderData.status === SHOP_ORDER_UNPAY" v-if="orderData.status === SHOP_ORDER_UNPAY"
class="flex-row-start info-cell pay-type" class="flex-row-start info-cell pay-type"
@ -285,10 +264,10 @@
<!-- 待发货 --> <!-- 待发货 -->
<template v-if="[SHOP_ORDER_UNSLIVER].includes(orderData.status)"> <template v-if="[SHOP_ORDER_UNSLIVER].includes(orderData.status)">
<view class="handle-btn" @click.stop="showCancelModal = true"> <view class="handle-btn" @click.stop="showCancelModal = true">
<text class="fs-32 btnColor" style="color: #FF19A0;">取消订单</text> <text class="fs-32 btnColor" style="color: #FF19A0;">退款</text>
</view> </view>
<view class="handle-btn" @click.stop="remindSliver"> <view class="handle-btn" @click.stop="remindSliver">
<text class="fs-32 btnColor">提醒发货</text> <text class="fs-32 btnColor">立即预约</text>
</view> </view>
</template> </template>
@ -329,7 +308,7 @@
<contact-modal v-if="showContact" :data="configInfo" @close="showContact = false" /> <contact-modal v-if="showContact" :data="configInfo" @close="showContact = false" />
<pop-up-modal v-if="showCancelModal" content="确定要取消该订单吗?" @confirm="orderCancel" <pop-up-modal v-if="showCancelModal" content="确定要退款吗?" @confirm="orderCancel"
@cancel="showCancelModal = false" /> @cancel="showCancelModal = false" />
<success-modal v-if="showRemindSliver" title="提醒成功" message="已通知商家,请耐心等待商家发货" @close="showRemindSliver = false" <success-modal v-if="showRemindSliver" title="提醒成功" message="已通知商家,请耐心等待商家发货" @close="showRemindSliver = false"
@ -594,14 +573,13 @@ import {
}, },
// 立即支付 // 立即支付
pay() { pay() {
if (this.WeChat === undefined && this.wallet === undefined) { // if (this.WeChat === undefined && this.wallet === undefined) {
uni.showToast({ // uni.showToast({
title: '请选择支付方式', // title: '请选择支付方式',
icon: "none", // icon: "none",
}); // });
return // return
} // }
if (this.WeChat == 1) {
uni.showLoading({ uni.showLoading({
icon: "none", icon: "none",
title: "支付中", title: "支付中",
@ -637,45 +615,6 @@ import {
}); });
}); });
} else if (this.wallet == 2) {
uni.showLoading({
title: "处理中",
mask: true,
});
const value = (this.$store.state && this.$store.state.user && this.$store.state.user.userInfo) || {};
// console.log(this.selectService,'---')
const data = {
wallet_id: value.wallet_id,
total_fee: this.orderData.actual_price,
type: 4,
order_id: this.orderData.order_id,
order_no: this.orderData.order_no
// business_type: 2,
// wallet_id: value.wallet_id,
// user_id: value.user_id,
// amount: this.payPrice,
// business_id: this.orderId
}
walletTransaction(data).then((res) => {
if (res.code == 0) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
uni.hideLoading();
this.getOrderDetail();
} else if (res.code == 100) {
uni.showToast({
title: '支付失败',
icon: 'none'
})
}
});
}
}, },
// 提醒发货 // 提醒发货

View File

@ -9,7 +9,7 @@
<view v-for="(data, index) in list" :key="data.order_id" :class="{ left: index % 2 === 0 }" <view v-for="(data, index) in list" :key="data.order_id" :class="{ left: index % 2 === 0 }"
class="flex-column-start news-item"> class="flex-column-start news-item">
<order-item :data="data" @disableScroll="disableScrollAction" @cancelOrder="cancelOrderAction" <order-item :data="data" @disableScroll="disableScrollAction" @cancelOrder="cancelOrderAction"
@concactService="jumpToWeChat" @confirmSliver="confirmSliver" @remindSilver="remindSliver" @pay="pay" @refund="refundAction" @concactService="jumpToWeChat" @confirmSliver="confirmSliver" @remindSilver="remindSliver" @pay="pay"
@afterSale="afterSale" @checkSliver="checkSliver" @remark="remark" @remarkDetails="remarkDetails" @afterSale="afterSale" @checkSliver="checkSliver" @remark="remark" @remarkDetails="remarkDetails"
@jumpToDetails="jumpToDetails" /> @jumpToDetails="jumpToDetails" />
</view> </view>
@ -74,7 +74,7 @@
</view> </view>
</view> </view>
<pop-up-modal v-if="showCancelModal" content="确定要取消该订单吗?" @confirm="orderCancel" <pop-up-modal v-if="showCancelModal" :content="cancelModalContent" @confirm="orderCancel"
@cancel="showCancelModal = false" /> @cancel="showCancelModal = false" />
<contact-modal v-if="showConcact" @close="showConcact = false" /> <contact-modal v-if="showConcact" @close="showConcact = false" />
@ -149,6 +149,7 @@ export default {
elasticLayer: false, elasticLayer: false,
disableScroll: false, disableScroll: false,
showCancelModal: false, showCancelModal: false,
cancelModalContent: "确定要取消该订单吗?",
showConcact: false, showConcact: false,
showRemindSliver: false, showRemindSliver: false,
showSliverModal: false, showSliverModal: false,
@ -175,17 +176,17 @@ export default {
id: SHOP_ORDER_UNPAY, id: SHOP_ORDER_UNPAY,
}, },
{ {
name: "待发货", name: "待预约",
id: SHOP_ORDER_UNSLIVER, id: SHOP_ORDER_UNSLIVER,
}, },
{ // {
name: "待收货", // name: "待收货",
id: SHOP_ORDER_UNRECEIVE, // id: SHOP_ORDER_UNRECEIVE,
}, // },
{ // {
name: "待评价", // name: "待评价",
id: SHOP_ORDER_UNREMARK, // id: SHOP_ORDER_UNREMARK,
}, // },
{ {
name: "已取消", name: "已取消",
id: SHOP_ORDER_CANCEL, id: SHOP_ORDER_CANCEL,
@ -296,10 +297,46 @@ export default {
}, },
// 支付 // 支付
pay(data) { pay(data) {
uni.showLoading({
icon: "none",
title: "支付中",
mask: true,
});
payOrder({
type: 4,
total_fee: Number(data.actual_price),
order_id: data.order_id,
order_no: data.order_no
}).then((res) => {
tt.pay({
orderInfo: {
order_id:res.data.orderInfo.order_id,
order_token:res.data.orderInfo.order_token,
},
service:5,
success: (res) => {
uni.hideLoading();
uni.showToast({
title: "支付成功",
icon: "none",
});
this.additionalBom = false,
this.elasticLayer = false,
this.reloadData();
},
fail: (err) => {
uni.hideLoading();
uni.showToast({
title: err?.msg || "支付失败",
icon: "none",
});
},
});
});
// this.additionalBom = true;
// this.elasticLayer = true;
this.additionalBom = true;
this.elasticLayer = true;
this.dataList = data;
}, },
async rechargeNow() { async rechargeNow() {
// console.log(this.wallet, "???"); // console.log(this.wallet, "???");
@ -447,6 +484,13 @@ export default {
// 取消订单 // 取消订单
cancelOrderAction(data) { cancelOrderAction(data) {
this.showCancelModal = true; this.showCancelModal = true;
this.cancelModalContent = "确定要取消该订单吗?";
this.orderInfo = data;
},
// 退款
refundAction(data) {
this.showCancelModal = true;
this.cancelModalContent = "确定要退款吗?";
this.orderInfo = data; this.orderInfo = data;
}, },
// 联系客服按钮点击 - 使用自定义弹窗(与首页在线客服功能一致) // 联系客服按钮点击 - 使用自定义弹窗(与首页在线客服功能一致)

View File

@ -1,14 +1,15 @@
<template> <template>
<view class="goods-item" @click.stop="jumpToDetails"> <view class="goods-item" >
<image class="goods-img" :src="data.product_pic" mode="aspectFill" /> <image class="goods-img" :src="data.product_pic" mode="aspectFill" />
<view class=" fs-24 app-fc-main goods-name"> <view class=" fs-24 app-fc-main goods-name">
{{ data.product_name || "" }} {{ data.product_name || "" }}
</view> </view>
<view class="flex-row-start label"> <!-- <view class="flex-row-start label">
<image class="hot-icon" :src="`${imgPrefix}mall-hot.png`"></image> <image class="hot-icon" :src="`${imgPrefix}mall-hot.png`"></image>
<view class="fs-20 app-fc-main label-name">{{data.sales}}人买过</view> <view class="fs-20 app-fc-main label-name">{{data.sales}}人买过</view>
</view> </view> -->
<view class="flex-row-start" style="margin-top: 12rpx;"> <view class="flex-row-between" style="margin-top: 12rpx; align-items: baseline;">
<view class="price-wrapper">
<text class="fs-28" style="color: #3D3D3D;"> <text class="fs-28" style="color: #3D3D3D;">
¥ ¥
<text class="fs-28">{{ <text class="fs-28">{{
@ -19,8 +20,11 @@
¥{{ minPrice.price_shichang || 0 }} ¥{{ minPrice.price_shichang || 0 }}
</text> --> </text> -->
</view> </view>
<view class="buy-now-btn" @click.stop="handleBuyNow">
立即购买
</view>
</view>
<!-- <text class="fs-20 good-salenum">已售{{ data.xiaoliang || 0 }}</text> --> <!-- <text class="fs-20 good-salenum">已售{{ data.xiaoliang || 0 }}</text> -->
<!-- <image class="add-cart-icon" src="@/static/images/cart-icon.png" @click.stop="$emit('addToCar', data)" /> -->
</view> </view>
</template> </template>
@ -46,29 +50,20 @@
}; };
}, },
computed: { computed: {
// minPrice() {
// let minPrice = {};
// let minPriceValue = 0;
// this.data.price_list.map((v) => {
// if (!minPriceValue || minPriceValue > +v.price) {
// minPriceValue = +v.price;
// minPrice = {
// ...v
// };
// }
// });
// return minPrice;
// },
labelList() { labelList() {
return (this.data?.label || "").split(",").filter((v) => !!v); return (this.data?.label || "").split(",").filter((v) => !!v);
}, },
}, },
mounted() {}, mounted() {},
methods: { methods: {
jumpToDetails() { // jumpToDetails() {
uni.navigateTo({ // uni.navigateTo({
url: `/pages/client/shop/details?product_id=${this.data.product_id}`, // url: `/pages/client/shop/details?product_id=${this.data.product_id}`,
}); // });
// },
handleBuyNow() {
// 触发购买事件,通知父组件
this.$emit('addToCar', this.data);
}, },
}, },
}; };
@ -153,6 +148,26 @@
right: 20rpx; right: 20rpx;
} }
.flex-row-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.price-wrapper {
display: flex;
align-items: baseline;
}
.buy-now-btn {
background: #FF19A0;
color: #fff;
font-size: 20rpx;
padding: 12rpx 24rpx;
border-radius:30rpx;
font-weight: 500;
flex-shrink: 0;
}
} }
</style> </style>

View File

@ -14,10 +14,10 @@
<view class="good-info"> <view class="good-info">
<view class="info-cell"> <view class="info-cell">
<view class="flex-row-start label"> <!-- <view class="flex-row-start label">
<image class="hot-icon" :src="`${imgPrefix}mall-hot.png`"></image> <image class="hot-icon" :src="`${imgPrefix}mall-hot.png`"></image>
<view class="fs-20 app-fc-main label-name">{{details.sales}}人买过</view> <view class="fs-20 app-fc-main label-name">{{details.sales}}人买过</view>
</view> </view> -->
<view class="flex-row-between" style="margin-top: 20rpx"> <view class="flex-row-between" style="margin-top: 20rpx">
<view class=""> <view class="">
<text class="app-fc-mark fs-28"></text> <text class="app-fc-mark fs-28"></text>
@ -46,10 +46,6 @@
<text class="selected-value">{{ selectedSpec || "请选择规格" }}</text> <text class="selected-value">{{ selectedSpec || "请选择规格" }}</text>
<image class="arrow-right-icon" :src="require('./static/arrow_right.png')" /> <image class="arrow-right-icon" :src="require('./static/arrow_right.png')" />
</view> </view>
<view class="shipping-row">
<text class="shipping-label">运费</text>
<text class="shipping-value">{{ sliverFee ? `¥${sliverFee}` : "待下单时候确认" }}</text>
</view>
<view class="service-features"> <view class="service-features">
<view class="feature-item"> <view class="feature-item">
<image :src="`${imgPrefix}mall-detailTips.png`" class="mallPng"></image> <image :src="`${imgPrefix}mall-detailTips.png`" class="mallPng"></image>
@ -398,16 +394,6 @@
price_id, price_id,
number number
}) { }) {
// console.log(this.details,'--?')
// const petList = {
// original_price:this.details.prices[0].actual_price,
// actual_price:this.details.prices[0].original_price,
// reduction_amount:0,
// // pay_amount:, //数量乘实际单价
// // note:''
// }
// console.log(petList,'=-=')
console.log(number, 'number')
uni.navigateTo({ uni.navigateTo({
url: `/pages/client/order/create`, url: `/pages/client/order/create`,
success: (res) => { success: (res) => {

File diff suppressed because it is too large Load Diff

BIN
src/static/images/yyzz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 KiB