第一次上传

This commit is contained in:
Ls
2026-03-09 16:39:03 +08:00
commit 3d9efaf15c
924 changed files with 326227 additions and 0 deletions

View File

@@ -0,0 +1,529 @@
<template>
<view class="order-detail-page">
<view class="detail-container">
<!-- 沉浸式状态栏 -->
<view v-if="!isZFB" class="status-bar"></view>
<!-- 顶部导航栏 -->
<view v-if="!isZFB" class="nav-bar">
<image class="back-icon" src="/static/icons/back.svg" @click="goBack" mode="aspectFit" />
<text class="nav-title">订单详情</text>
<view class="nav-placeholder"></view>
</view>
<!-- 店铺信息卡片 -->
<view class="shop-info-card" >
<view @click="Service.GoPage('/pages/community/merchantDetail?merchId='+merchInfo.merchId)"
class="shop-header">
<image class="shop-avatar" :src="Service.GetMateUrlByImg(merchInfo.logo)" mode="aspectFill" />
<view class="shop-info">
<text class="shop-name">{{ merchInfo.name }}</text>
<view class="">
<text v-if="merchInfo.code=='Discounts'" class="badge-partner">联盟商家</text>
<text v-else class="badge-coop">合作商家</text>
</view>
</view>
<up-icon name="arrow-right" bold="true" size="22"></up-icon>
</view>
</view>
<!-- 订单信息卡片 -->
<view class="order-info-card">
<view class="card-title">
<text class="title-icon">📋</text>
<text class="title-text">订单信息</text>
</view>
<view class="info-section">
<view class="info-row">
<text class="info-label">订单号</text>
<text class="info-value">{{ orderInfo.orderId }}</text>
</view>
<view class="info-row">
<text class="info-label">订单金额</text>
<text class="info-value amount">¥{{ orderInfo.amount }}</text>
</view>
<view class="info-row">
<text class="info-label">订单状态</text>
<view class="status-tag .status-completed">
<text class="status-tag-text">已完成</text>
</view>
</view>
<view v-if="orderInfo.getIntegral > 0" class="info-row">
<text class="info-label">获得积分</text>
<view class="points-badge earned">
<text class="ri-coin-line points-icon"></text>
<text class="points-text">+{{ orderInfo.getIntegral }}分</text>
</view>
</view>
<view v-if="orderInfo.useIntegral > 0" class="info-row">
<text class="info-label">使用积分</text>
<view class="points-badge used">
<text class="ri-wallet-3-line points-icon"></text>
<text class="points-text">-{{ orderInfo.useIntegral }}分</text>
</view>
</view>
<view v-if="orderInfo.discount" class="info-row">
<text class="info-label">优惠券</text>
<view class="coupon-badge">
<text
class="coupon-text">{{ '满'+JSON.parse(orderInfo.discount).needMoney+'减'+JSON.parse(orderInfo.discount).deductMoney }}</text>
</view>
</view>
<view class="info-row">
<text class="info-label">付款金额</text>
<text class="info-value amount">¥{{ orderInfo.payAmount }}</text>
</view>
<view class="info-row">
<text class="info-label">支付方式</text>
<text class="info-value">{{ orderInfo.payway=='wx'?'微信':'支付宝' }}</text>
</view>
<view class="info-row">
<text class="info-label">订单时间</text>
<text class="info-value">{{ orderInfo.payTime }}</text>
</view>
</view>
</view>
<!-- 底部操作栏 -->
<!-- <view v-if="order.statusType === 'completed'" class="bottom-actions">
<button class="action-btn secondary" @click="contactService">
<text class="ri-customer-service-2-line btn-icon"></text>
<text class="btn-text">联系客服</text>
</button>
<button class="action-btn primary" @click="writeReview">
<text class="ri-edit-line btn-icon"></text>
<text class="btn-text">评价订单</text>
</button>
</view>
<view v-else-if="order.statusType === 'pending'" class="bottom-actions">
<button class="action-btn secondary" @click="contactService">
<text class="ri-customer-service-2-line btn-icon"></text>
<text class="btn-text">联系客服</text>
</button>
<button class="action-btn primary" @click="writeReview">
<text class="ri-star-line btn-icon"></text>
<text class="btn-text">评价订单</text>
</button>
</view>
<view v-else-if="order.statusType === 'refunding'" class="bottom-actions">
<button class="action-btn warning" @click="checkRefundStatus">
<text class="ri-time-line btn-icon"></text>
<text class="btn-text">查看退款进度</text>
</button>
</view> -->
</view>
<!-- 加载状态 -->
<!-- <view v-else class="loading">
<text class="loading-text">加载中...</text>
</view> -->
</view>
</template>
<script lang="ts" setup>
import {
ref
} from 'vue'
import {
onLoad
} from '@dcloudio/uni-app'
import {
vpOrderService,
Service
} from '@/Service/vp/vpOrderService'
import { inject } from 'vue';
const isZFB = inject('isZFB');
let merchInfo = ref<any>({})
let orderInfo = ref<any>({})
let orderId = ref('')
// 页面加载
onLoad((options) => {
if (options.orderId) {
orderId.value = options.orderId
getData()
}
})
const getData = () => {
vpOrderService.GetOrderInfo(orderId.value).then(res => {
if (res.code == 0) {
merchInfo.value = res.data.merchInfo
orderInfo.value = res.data.orderInfo
} else {
Service.Msg(res.msg)
}
})
}
// 返回
const goBack = () => {
uni.navigateBack({
delta: 1
})
}
// 联系客服
const contactService = () => {
uni.showToast({
title: '正在联系客服...',
icon: 'none'
})
}
// 评价订单
const writeReview = () => {
uni.showToast({
title: '跳转到评价页面',
icon: 'none'
})
}
// 查看退款进度
const checkRefundStatus = () => {
uni.showToast({
title: '退款处理中,请耐心等待',
icon: 'none'
})
}
</script>
<style lang="scss" scoped>
.order-detail-page {
min-height: 100vh;
background: #F5F5F5;
}
.detail-container {
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
}
/* 状态栏 */
.status-bar {
background: linear-gradient(135deg, #FF6B00, #FF9500);
height: var(--status-bar-height);
width: 100%;
}
/* 导航栏 */
.nav-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 50rpx 24rpx 20rpx;
background: linear-gradient(135deg, #FF6B00, #FF9500);
}
.back-icon {
width: 48rpx;
height: 48rpx;
padding: 8rpx;
}
.nav-title {
font-size: 36rpx;
font-weight: 600;
color: #FFFFFF;
}
.nav-placeholder {
width: 48rpx;
}
/* 店铺信息卡片 */
.shop-info-card {
background: #FFFFFF;
margin: 20rpx;
border-radius: 16rpx;
padding: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
cursor: pointer;
transition: all 0.3s ease;
}
.shop-info-card:active {
transform: scale(0.98);
opacity: 0.9;
}
.shop-header {
display: flex;
align-items: center;
position: relative;
}
.shop-arrow {
font-size: 32rpx;
color: #CCCCCC;
margin-left: auto;
position: absolute;
right: 0;
}
.shop-avatar {
width: 96rpx;
height: 96rpx;
border-radius: 16rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.shop-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
}
.shop-name {
font-size: 32rpx;
font-weight: 700;
color: #222222;
}
.order-time {
font-size: 24rpx;
color: #999999;
}
.order-status-badge {
padding: 12rpx 24rpx;
border-radius: 24rpx;
font-size: 24rpx;
font-weight: 600;
}
.order-status-badge.status-completed {
background: #E8F5E9;
color: #4CAF50;
}
.order-status-badge.status-pending {
background: #FFF4E6;
color: #FF6B00;
}
.order-status-badge.status-refunding {
background: #E3F2FD;
color: #2196F3;
}
.order-status-badge.status-refunded {
background: #FFEBEE;
color: #F44336;
}
/* 订单信息卡片 */
.order-info-card {
background: #FFFFFF;
margin: 0 20rpx 20rpx;
border-radius: 16rpx;
padding: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.card-title {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 24rpx;
padding-bottom: 16rpx;
border-bottom: 1rpx solid #F5F5F5;
}
.title-icon {
font-size: 32rpx;
}
.title-text {
font-size: 28rpx;
font-weight: 600;
color: #222222;
}
.info-section {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.info-label {
font-size: 26rpx;
color: #666666;
}
.info-value {
font-size: 26rpx;
color: #222222;
font-weight: 500;
}
.info-value.amount {
font-size: 36rpx;
color: #FF6B00;
font-weight: 700;
}
.status-tag {
padding: 8rpx 20rpx;
border-radius: 20rpx;
font-size: 22rpx;
font-weight: 500;
}
.status-tag.status-completed {
background: #E8F5E9;
color: #4CAF50;
}
.status-tag.status-pending {
background: #FFF4E6;
color: #FF6B00;
}
.status-tag.status-refunding {
background: #E3F2FD;
color: #2196F3;
}
.status-tag.status-refunded {
background: #FFEBEE;
color: #F44336;
}
/* 积分徽章 */
.points-badge {
display: flex;
align-items: center;
gap: 6rpx;
padding: 8rpx 16rpx;
border-radius: 20rpx;
font-size: 24rpx;
font-weight: 600;
}
.points-badge.earned {
background: #E8F5E9;
color: #4CAF50;
}
.points-badge.used {
background: #FFF4E6;
color: #FF6B00;
}
.points-icon {
font-size: 20rpx;
}
.points-text {
font-size: 24rpx;
}
/* 优惠券徽章 */
.coupon-badge {
display: flex;
align-items: center;
gap: 6rpx;
padding: 8rpx 16rpx;
background: linear-gradient(135deg, #FFF4E6, #FFE0B2);
border-radius: 20rpx;
}
.coupon-icon {
font-size: 20rpx;
color: #FF6B00;
}
.coupon-text {
font-size: 24rpx;
color: #FF6B00;
font-weight: 600;
}
/* 底部操作栏 */
.bottom-actions {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 20rpx;
padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.04);
gap: 12rpx;
}
.action-btn {
flex: 1;
height: 80rpx;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
font-size: 26rpx;
font-weight: 500;
border: none;
}
.action-btn.secondary {
background: linear-gradient(135deg, #F5F5F5, #EEEEEE);
color: #666666;
}
.action-btn.primary {
background: linear-gradient(135deg, #FF6B00, #FF9500);
color: #FFFFFF;
}
.action-btn.warning {
background: linear-gradient(135deg, #2196F3, #42A5F5);
color: #FFFFFF;
flex: 1;
}
.btn-icon {
font-size: 28rpx;
}
.btn-text {
font-size: 26rpx;
}
/* 加载状态 */
.loading {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
}
.loading-text {
font-size: 26rpx;
color: #999999;
}
</style>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,563 @@
<template>
<view class="alliance-card-page">
<!-- 沉浸式状态栏 -->
<view v-if="!isZFB" class="status-bar"></view>
<!-- 顶部导航 -->
<view v-if="!isZFB" class="nav-bar">
<image class="back-icon" src="/static/icons/back.svg" @click="goBack" mode="aspectFit" />
<text class="nav-title">我的联盟卡</text>
<view class="nav-placeholder"></view>
</view>
<!-- 主要内容区域 -->
<view class="content">
<!-- 兑换表单区域 -->
<view class="bind-section">
<view class="bind-title">
<text class="ri-ticket-line title-icon"></text>
<text class="title-text">使用联盟卡</text>
</view>
<view class="bind-form">
<!-- 卡号输入框 -->
<view class="form-item">
<text class="form-label">联盟卡号</text>
<view class="input-wrapper">
<input class="form-input" type="number" placeholder="请输入联盟卡号"
placeholder-class="input-placeholder" v-model="cardNumber" @input="formatCardNumber" />
</view>
<text class="form-label">联盟卡密码</text>
<view class="input-wrapper">
<input class="form-input" type="text" placeholder="联盟卡密码"
placeholder-class="input-placeholder" v-model="pow" />
</view>
</view>
<!-- 兑换按钮 -->
<view class="bind-btn" @click="bindCard">
<text class="bind-btn-text">立即使用</text>
</view>
<!-- 温馨提示 -->
<view class="tips-box">
<view class="tips-header">
<text class="ri-lightbulb-line tips-icon"></text>
<text class="tips-title">温馨提示</text>
</view>
<view class="tips-list">
<text class="tips-item">• 联盟卡可获得优惠券或积分,可在付款时选择使用</text>
<text class="tips-item">• 兑换的优惠券有效期从兑换开始计</text>
<text class="tips-item">• 每张联盟卡仅可使用一次</text>
<text class="tips-item">• 如有疑问请联系客服</text>
</view>
</view>
</view>
</view>
</view>
<!-- <up-popup :show="show" mode="center" @close="show = false" closeable>
<view class="" style="width: 80vw; ">
<view class=""
style="width: 100%; text-align: center; font-size: 28rpx; flex-wrap: 600; height: 80rpx; line-height: 80rpx; text-align: center; font-weight: 600;">
联盟卡兑换成功
</view>
<view class="tips-box" style="width: 90%; margin: 0 auto; margin-top: 20rpx;">
<view class="tips-header">
<text class="ri-lightbulb-line tips-icon"></text>
<text class="tips-title">恭喜获得</text>
</view>
<view class="tips-list">
<text class="tips-item" v-for="item in data">• {{item.name}}
{{item.code == 'Discount'?'x'+item.count:''}}</text>
</view>
</view>
<view class=""
style="width: 90%; margin: 0 auto; margin-top: 20rpx; height: 80rpx; background-color: var(--nav-mian); color: #fff; text-align: center; border-radius: 40rpx; line-height: 80rpx;"
@click="show = false">
我知道了
</view>
</view>
</up-popup> -->
<up-popup :show="showCoupon" round='10' mode="center" :safeAreaInsetBottom=false bgColor='#f6f6f6'
@close="showCoupon=false">
<view class="" style="text-align: center; margin: 24rpx 0 26rpx; font-weight: bold; ">
使用优惠券
</view>
<scroll-view v-if="data.length>0" scroll-y="true"
style="margin: 0 auto; width: 94vw; height: 50vh; overflow-y: auto; padding: 0 20rpx ; ">
<view v-for="(coupon,index) in data" :key="index" class="coupon-card">
<!-- 左侧金额 -->
<view class="coupon-left">
<view class="coupon-amount">
<text class="amount-number">{{coupon.count}}</text>
<text class="amount-unit">张</text>
</view>
</view>
<!-- 分割线 -->
<view class="coupon-divider">
<view class="divider-circle top"></view>
<view class="divider-line"></view>
<view class="divider-circle bottom"></view>
</view>
<!-- 右侧信息 -->
<view class="coupon-right">
<view class="coupon-title">{{ coupon.name }}</view>
<view class="coupon-condition">
<text>联盟券</text>
</view>
<!-- <view class="coupon-expire">有效期至{{ Service.formatDate(coupon.endTime,2) }}
</view> -->
</view>
</view>
</scroll-view>
<view v-else class=""
style=" margin: 0 30rpx; border-radius: 20rpx; padding: 40rpx 0; border: 1rpx solid #e2e2e2; font-weight: bold; font-size: 32rpx; height: 20vh; text-align: center; display: flex; align-items: center; justify-content: center;">
暂无优惠券
</view>
<view class=""
style="width: 90%; margin: 0 auto; margin-top: 20rpx; margin-bottom: 20rpx; height: 80rpx; background-color: var(--nav-mian); color: #fff; text-align: center; border-radius: 40rpx; line-height: 80rpx;"
@click="showCoupon = false">
我已领取
</view>
</up-popup>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { vpUserService, Service } from "@/Service/vp/vpUserService"
import { inject } from 'vue';
const isZFB = inject('isZFB');
let show = ref<boolean>(false)
// 卡号输入
const cardNumber = ref('')
const pow = ref('')
let data = ref<Array<any>>([
])
let showCoupon = ref(false)
// 格式化卡号输入
const formatCardNumber = (e:any) => {
// 只允许输入数字
let value = e.detail.value.replace(/\D/g, '')
cardNumber.value = value
}
// 兑换卡号
const bindCard = () => {
// 验证卡号
if (!cardNumber.value) {
uni.showToast({
title: '请输入联盟卡号',
icon: 'none'
})
return
}
if (pow.value == '') {
uni.showToast({
title: '请输入联盟卡密码',
icon: 'none'
})
return
}
vpUserService.ExchangeCard(cardNumber.value, pow.value).then(res => {
if (res.code == 0) {
data.value = res.data.data
// show.value = true
showCoupon.value = true
} else {
Service.Msg(res.msg)
}
})
}
// 返回我的页面
const goBack = () => {
uni.navigateBack({
delta: 1
})
}
</script>
<style lang="scss" scoped>
.alliance-card-page {
min-height: 100vh;
background: #F5F5F5;
display: flex;
flex-direction: column;
}
/* 状态栏 */
.status-bar {
background: linear-gradient(135deg, #FF6B00, #FF9500);
height: var(--status-bar-height);
width: 100%;
}
/* 导航栏 */
.nav-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 60rpx 24rpx 20rpx 24rpx;
background: linear-gradient(135deg, #FF6B00, #FF9500);
}
.back-icon {
width: 48rpx;
height: 48rpx;
padding: 8rpx;
}
.nav-title {
font-size: 36rpx;
font-weight: 600;
color: #FFFFFF;
}
.nav-placeholder {
width: 48rpx;
}
/* 内容区域 */
.content {
flex: 1;
padding: 32rpx 24rpx;
}
/* 兑换表单区域 */
.bind-section {
background: #FFFFFF;
border-radius: 24rpx;
padding: 32rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
}
.bind-title {
display: flex;
align-items: center;
gap: 12rpx;
margin-bottom: 32rpx;
}
.title-icon {
font-size: 36rpx;
color: #FF6B00;
}
.title-text {
font-size: 32rpx;
font-weight: 600;
color: #222222;
}
.bind-form {
display: flex;
flex-direction: column;
gap: 32rpx;
}
/* 表单项 */
.form-item {
display: flex;
flex-direction: column;
gap: 16rpx;
}
.form-label {
font-size: 28rpx;
font-weight: 500;
color: #333333;
}
.input-wrapper {
display: flex;
align-items: center;
background: #F5F5F5;
border-radius: 12rpx;
padding: 0 24rpx;
height: 88rpx;
border: 2rpx solid transparent;
transition: all 0.3s ease;
}
.input-wrapper:focus-within {
background: #FFFFFF;
border-color: #FF6B00;
box-shadow: 0 0 0 4rpx rgba(255, 107, 0, 0.1);
}
.form-input {
flex: 1;
font-size: 28rpx;
color: #222222;
height: 88rpx;
background-color: #f5f5f5;
}
.input-placeholder {
color: #999999;
}
.scan-btn {
width: 72rpx;
height: 72rpx;
background: linear-gradient(135deg, #FF6B00, #FF9500);
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 16rpx;
flex-shrink: 0;
}
.scan-icon {
font-size: 36rpx;
color: #FFFFFF;
}
.form-tip {
font-size: 22rpx;
color: #999999;
padding-left: 4rpx;
}
/* 兑换按钮 */
.bind-btn {
background: linear-gradient(135deg, #FF6B00, #FF9500);
border-radius: 16rpx;
height: 96rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 6rpx 20rpx rgba(255, 107, 0, 0.3);
transition: all 0.3s ease;
}
.bind-btn:active {
transform: scale(0.98);
box-shadow: 0 4rpx 12rpx rgba(255, 107, 0, 0.3);
}
.bind-btn-text {
font-size: 32rpx;
font-weight: 600;
color: #FFFFFF;
}
/* 温馨提示 */
.tips-box {
background: #FFF9F0;
border-radius: 16rpx;
padding: 24rpx;
border-left: 4rpx solid #FF9800;
}
.tips-header {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 16rpx;
}
.tips-icon {
font-size: 28rpx;
color: #FF9800;
}
.tips-title {
font-size: 26rpx;
font-weight: 600;
color: #FF9800;
}
.tips-list {
display: flex;
flex-direction: column;
gap: 8rpx;
}
.tips-item {
font-size: 22rpx;
color: #666666;
line-height: 1.6;
}
// 优惠券
.coupon-card {
background: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
display: flex;
overflow: hidden;
}
/* 未使用 - 橙色边框 */
.coupon-unused {
border: 2rpx solid #FF6B00;
}
/* 已使用 - 灰色 */
.coupon-used {
opacity: 0.5;
}
/* 已过期 - 灰色 */
.coupon-expired {
opacity: 0.5;
}
/* 左侧金额区 */
.coupon-left {
flex-shrink: 0;
width: 200rpx;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #FFF4E6, #FFE0B2);
padding: 32rpx 20rpx;
}
.coupon-amount {
display: flex;
align-items: baseline;
}
.amount-symbol {
font-size: 28rpx;
font-weight: 600;
color: #FF6B00;
}
.amount-number {
font-size: 56rpx;
font-weight: 600;
color: #FF6B00;
line-height: 1;
}
.amount-unit {
font-size: 24rpx;
font-weight: 500;
color: #FF6B00;
margin-left: 4rpx;
}
.amount-gift {
font-size: 28rpx;
font-weight: 600;
color: #FF6B00;
}
/* 分割线 */
.coupon-divider {
position: relative;
width: 4rpx;
background: #F5F5F5;
}
.divider-circle {
position: absolute;
width: 20rpx;
height: 20rpx;
background: #F5F5F5;
border-radius: 50%;
left: 50%;
transform: translateX(-50%);
}
.divider-circle.top {
top: -10rpx;
}
.divider-circle.bottom {
bottom: -10rpx;
}
.divider-line {
position: absolute;
top: 10rpx;
bottom: 10rpx;
left: 50%;
width: 2rpx;
background: repeating-linear-gradient(to bottom,
#F5F5F5 0rpx,
#F5F5F5 6rpx,
transparent 6rpx,
transparent 12rpx);
transform: translateX(-50%);
}
/* 右侧信息 */
.coupon-right {
flex: 1;
padding: 24rpx 20rpx;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.coupon-title {
font-size: 30rpx;
font-weight: 600;
color: #222;
margin-bottom: 12rpx;
}
.coupon-condition {
font-size: 22rpx;
color: #999;
margin-bottom: 8rpx;
}
.coupon-expire {
font-size: 22rpx;
color: #999;
}
/* 状态标识 */
.coupon-status {
position: absolute;
top: 50%;
right: 20rpx;
transform: translateY(-50%);
}
.coupon-status text {
font-size: 24rpx;
font-weight: 600;
}
.coupon-status.used text {
color: #999;
}
.coupon-status.expired text {
color: #999;
}
</style>