第一次上传

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,335 @@
<template>
<view class="page">
<!-- 商品图片展示 -->
<view class="product-image-section">
<image :src="Service.GetMateUrlByImg('/static/dele/dele4.jpg')" mode="aspectFill" class="product-image">
</image>
</view>
<!-- 商品信息 -->
<view class="product-info-section">
<text class="product-name">招牌红烧牛肉面</text>
<text class="product-price">¥38</text>
<text class="product-description">特色红烧牛肉,搭配劲道面条,汤汁浓郁,回味无穷</text>
</view>
<!-- 商家信息卡片 -->
<view class="shop-card-section">
<view class="shop-header">
<text class="shop-name">美食小铺</text>
<view class="shop-tags">
<text class="tag new-shop">新店</text>
<text class="tag popular">人气店</text>
</view>
</view>
<view class="shop-info">
<view class="info-item">
<u-icon name="map" size="22" color="#999999" class="info-icon"></u-icon>
<text class="info-text">朝阳区美食街123号</text>
</view>
<view class="info-item">
<u-icon name="phone" size="22" color="#999999" class="info-icon"></u-icon>
<text class="info-text">010-12345678</text>
</view>
<view class="info-item">
<u-icon name="home" size="22" color="#999999" class="info-icon"></u-icon>
<text class="info-text">朝阳美食社区</text>
</view>
</view>
</view>
<!-- 同店推荐 -->
<view class="recommendations-section">
<text class="section-title">同店推荐</text>
<view class="recommendations-list">
<view @click="Service.GoPage('/pages/goods/goodsDetail')" class="recommendation-item"
v-for="(item, index) in recommendations" :key="index">
<image :src="item.image" mode="aspectFill" class="recommendation-image"></image>
<view class="recommendation-info">
<text class="recommendation-name">{{ item.name }}</text>
<text class="recommendation-price">{{ item.price }}</text>
</view>
<u-icon name="arrow-right" size="28rpx" color="#999999" class="arrow-icon"></u-icon>
</view>
</view>
</view>
<view class="" style="width: 100%; height: 150rpx;">
</view>
<!-- 底部操作按钮 -->
<view class="action-buttons">
<u-button type="primary" @click="handleContactShop()" :custom-style="contactButtonStyle">联系商家</u-button>
<u-button type="primary" @click="handleViewLocation()" :custom-style="locationButtonStyle">查看位置</u-button>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { Service } from "@/Service/Service"
// 推荐商品数据类型
interface Recommendation {
id : number;
name : string;
price : string;
image : string;
}
// 同店推荐商品数据
const recommendations = ref<Recommendation[]>([
{
id: 1,
name: '招牌卤肉饭',
price: '¥26',
image: '/static/dele/dele4.jpg'
},
{
id: 2,
name: '红烧牛肉面',
price: '¥32',
image: '/static/dele/dele4.jpg'
},
{
id: 3,
name: '香菇三明治',
price: '¥28',
image: '/static/dele/dele4.jpg'
}
]);
// 联系商家按钮样式
const contactButtonStyle = ref({
backgroundColor: '#FF6600',
borderColor: '#FF6600',
color: '#FFFFFF',
fontSize: '28rpx',
height: '75rpx',
borderRadius: '45rpx',
marginRight: '20rpx'
});
// 查看位置按钮样式
const locationButtonStyle = ref({
backgroundColor: '#FF6600',
borderColor: '#FF6600',
color: '#FFFFFF',
fontSize: '28rpx',
height: '75rpx',
borderRadius: '45rpx',
marginLeft: '20rpx'
});
// 处理联系商家
const handleContactShop = () => {
uni.makePhoneCall({
phoneNumber: '10086', // 要拨打的电话号码
success: function () {
console.log('拨打电话成功');
},
fail: function (err) {
console.error('拨打电话失败', err);
}
});
};
// 处理查看位置
const handleViewLocation = () => {
wx.openLocation({
latitude:34.03,
longitude:113.85,
name:'万达广场',
address:"许昌市",
success:function(e){
console.log(e);
},
fail:function(e){
console.log(e);
}
})
};
</script>
<style scoped lang="scss">
/* 商品图片展示 */
.product-image-section {
width: 100%;
height: 500rpx;
margin-bottom: 30rpx;
}
.product-image {
width: 100%;
height: 100%;
}
/* 商品信息 */
.product-info-section {
padding: 30rpx;
margin: 30rpx;
box-shadow: 0 0 10rpx 4rpx #E2e2e2;
border-radius: 20rpx;
}
.product-name {
font-size: 36rpx;
color: #333333;
font-weight: bold;
display: block;
margin-bottom: 20rpx;
}
.product-price {
font-size: 40rpx;
color: #FF6600;
font-weight: bold;
display: block;
margin-bottom: 20rpx;
}
.product-description {
font-size: 28rpx;
color: #666666;
line-height: 40rpx;
}
/* 商家信息卡片 */
.shop-card-section {
padding: 30rpx;
margin: 30rpx;
box-shadow: 0 0 10rpx 4rpx #E2e2e2;
border-radius: 20rpx;
}
.shop-header {
display: flex;
align-items: center;
margin-bottom: 24rpx;
}
.shop-name {
font-size: 32rpx;
color: #333333;
font-weight: bold;
margin-right: 20rpx;
}
.shop-tags {
display: flex;
gap: 12rpx;
}
.tag {
font-size: 24rpx;
color: #FFFFFF;
padding: 4rpx 16rpx;
border-radius: 16rpx;
}
.tag.new-shop {
background-color: #4CD964;
}
.tag.popular {
background-color: #FF9500;
}
.shop-info {
gap: 20rpx;
}
.info-item {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.info-item:last-child {
margin-bottom: 0;
}
.info-icon {
margin-right: 16rpx;
}
.info-text {
font-size: 28rpx;
margin-left: 15rpx;
color: #666666;
}
/* 同店推荐 */
.recommendations-section {
padding: 0 30rpx;
margin-bottom: 30rpx;
}
.section-title {
font-size: 36rpx;
color: #333333;
font-weight: bold;
display: block;
margin-bottom: 30rpx;
}
.recommendations-list {
gap: 30rpx;
}
.recommendation-item {
display: flex;
align-items: center;
padding: 30rpx;
margin: 20rpx 0;
box-shadow: 0 0 10rpx 4rpx #E2e2e2;
border-radius: 20rpx;
}
.recommendation-item:last-child {
border-bottom: none;
}
.recommendation-image {
width: 120rpx;
height: 120rpx;
border-radius: 16rpx;
margin-right: 24rpx;
}
.recommendation-info {
flex: 1;
}
.recommendation-name {
font-size: 32rpx;
color: #333333;
display: block;
margin-bottom: 12rpx;
}
.recommendation-price {
font-size: 30rpx;
color: #FF6600;
}
.arrow-icon {
margin-left: 16rpx;
}
/* 底部操作按钮 */
.action-buttons {
display: flex;
padding: 30rpx 30rpx;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #ffffff;
border-top: 1rpx solid #f0f0f0;
}
</style>

View File

@@ -0,0 +1,659 @@
<template>
<view style="display: flex; flex-direction: column; height: 100vh; ">
<view class="merchant-info">
<view class="">
<text class="section-title">付款给商户</text>
<text class="merchant-name">{{ storeInfo.name }}</text>
</view>
<image :src="Service.GetMateUrlByImg(storeInfo.logo)" mode="aspectFill" class="merchant-icon">
</image>
</view>
<view class=""
style=" padding: 30rpx 40rpx; flex: 1; background-color: #fff; width: 100%; border-top-right-radius: 30rpx; border-top-left-radius: 30rpx; ">
<view class="" style="font-size: 24rpx; font-weight: 600;">
余额
</view>
<view class="" style="margin: 20rpx 0; padding: 20rpx 0; border-bottom: 1rpx solid #e2e2e2; ">
<!-- <up-input prefixIcon='rmb' :prefixIconStyle="{ 'color':'#000','font-weight': 600,'font-size':'60rpx' }"
fontSize='50rpx'
auto-blur="false"
@focus="focusFunc"
:customStyle="{'color':'#000', height: '90rpx', 'padding-left': 0, 'font-weight': 600,'padding-bottom':'20rpx' }"
border="bottom" v-model="account"></up-input> -->
<view class="" style="display: flex; align-items: center; width: 100%; ">
<view class="" style="height: 70rpx; display: flex; align-items: center; ">
<up-icon name="rmb" :bold='true' size='50rpx' color="#000"></up-icon>
</view>
<view class="" style=" height: 70rpx; line-height: 70rpx; font-weight: 600;font-size: 70rpx; ">
{{account}}
</view>
<view class="" v-if="isShow"
style="margin: 0 10rpx; width: 4rpx; height: 70rpx; background-color: var(--nav-mian); ">
</view>
</view>
</view>
<view v-if="storeInfo.code=='Discounts' && userInfo.integral>0 " class=""
style="font-size: 24rpx; color: #6B6B6B; ">
<text>当前拥有{{ userInfo.integral }}积分</text>
<text style="margin-left: 10rpx;">可抵扣 ¥{{ userInfo.integral }}元</text>
</view>
<view v-else class="">
<view v-if="account>0 " class="" style="font-size: 24rpx; color: #6B6B6B; ">
本次消费可得 {{ computePoints( account ) }} 积分
</view>
</view>
<view class="card" style="padding: 0;" >
<up-cell @click="showCoupon=true" title="优惠券"
:value="currentCouponId!==''?'满'+currentCoupon.needMoney+'减'+currentCoupon.deductMoney: (couponList.length==0?'暂无可用优惠券':couponList.length+'张可用') " isLink>
<template #icon>
<up-icon name="coupon-fill" color="#999" size="22"></up-icon>
</template>
</up-cell>
</view>
<view class=""
style="background-color: #f5f5f5; padding: 20rpx; position: fixed; bottom: 0; left: 0; width: 100%; padding-top: 25rpx; padding-bottom: 20rpx; ">
<view class="" style="display: grid; grid-template-columns: repeat(4,1fr); ">
<view class="button" @click="input(item)" v-for="(item,index) in 3" :key="index">
{{item}}
</view>
<view @click="deleInput()" class="button">
<up-icon name="backspace" :bold='true' size="26"></up-icon>
</view>
</view>
<view class="" style="display: grid; grid-template-columns: 3fr 1fr; ">
<view class="">
<view class="" style="display: grid; grid-template-columns: repeat(3,1fr); ">
<view class="button" @click="input(item+3)" v-for="(item,index) in 3" :key="index">
{{item+3}}
</view>
</view>
<view class="" style="display: grid; grid-template-columns: repeat(3,1fr); ">
<view class="button" @click="input(item+6)" v-for="(item,index) in 3" :key="index">
{{item+6}}
</view>
</view>
<view class="" style="display: grid; grid-template-columns: 2fr 1fr; ">
<view @click="input(0)" class="button">
0
</view>
<view @click="input('.')" class="button">
.
</view>
</view>
</view>
<view @click="save()" class="button" style="background-color: var(--nav-mian); color: #fff; ">
付款
</view>
</view>
</view>
</view>
</view>
<!-- <up-popup :show="showDes">
<view style="width: 100%; padding: 50rpx 30rpx; ">
<view class="">
<text style="font-size: 28rpx; font-weight: 600;">添加备注</text>
</view>
<view class=""
style=" margin-top: 30rpx; padding: 20rpx 0; border-bottom: 1rpx solid #e2e2e2; border-top: 1rpx solid #e2e2e2; ">
<up-input placeholder="请输入内容" border="none" v-model="des"></up-input>
</view>
<view class=""
style=" margin: 0 110rpx; margin-top: 50rpx; display: flex; align-items: center; justify-content: space-between; ">
<view class="" @click="showDes=false,des=''"
style=" background-color: #f2f2f2; color: #000; padding: 20rpx 80rpx;border-radius: 20rpx; display: flex; align-items: center; justify-content: center; ">
取消
</view>
<view class="" @click="showDes=false"
style=" background-color: #07c160; color: #fff; padding: 20rpx 80rpx;border-radius: 20rpx; display: flex; align-items: center; justify-content: center; ">
确定
</view>
</view>
</view>
</up-popup> -->
<up-popup :show="showCoupon" round='10' bgColor='#f6f6f6' @close="showCoupon=false" :closeable="true"
:safeAreaInsetTop='true'>
<scroll-view v-if="couponList.length>0" scroll-y="true" style="margin: 0 auto; width: 96%; height: 50vh; overflow-y: auto; ">
<view v-for="(coupon,index) in couponList" @click=" userCoupon(coupon)" :key="index" class="coupon-card">
<!-- 左侧金额 -->
<view class="coupon-left">
<view class="coupon-amount">
<text class="amount-number">{{coupon.deductMoney}}</text>
<text class="amount-unit">元</text>
</view>
<!-- <view v-else-if="coupon.type === 'reduction'" class="coupon-amount">
<text class="amount-symbol">¥</text>
<text class="amount-number">{{ coupon.discount }}</text>
</view> -->
<!-- <view class="coupon-amount">
<text class="amount-gift">礼品</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.needMoney }}减{{ coupon.deductMoney }}优惠券</view>
<view class="coupon-condition">
<!-- <text v-if="coupon.minAmount > 0">满{{ coupon.minAmount }}元可用</text> -->
<text>无门槛</text>
</view>
<view class="coupon-expire">有效期至{{ Service.formatDate(coupon.endTime,2) }}
</view>
</view>
<view class="" style="margin: 0 20rpx;display: flex; align-items: center;">
<view class="radio" :class="{active: currentCouponId === coupon.udId}">
<view class="dot"></view>
</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>
</up-popup>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { Service } from "@/Service/Service"
import { onUnmounted, ref } from "vue";
import { vpMerchService } from "@/Service/vp/vpMerchService";
import { vpUserService } from "@/Service/vp/vpUserService";
import { vpLoginService } from "@/Service/vp/vpLoginService";
let account = ref('')
// let showDes = ref(false)
let des = ref()
let isShow = ref(false)
let timeOut = ref()
let payway = ref('')
let par = ref('')
let openId = ref('')
let storeInfo = ref<any>({})
let userInfo = ref<any>({})
let radio = ref(0)
let points = ref('')
let couponList = ref<Array<any>>([])
let currentCouponId = ref('')
let currentCoupon = ref<any>({})
let showCoupon = ref(false)
onLoad((data : any) => {
focusFunc()
getOpid()
// 支付宝
// #ifdef MP-ALIPAY
let querdata = Service.GetStorageCache('quer')
payway.value = 'zfb'
par.value = decodeURIComponent(querdata.query.qrCode).split('?')[1].split('=')[1]
// #endif
// #ifdef MP-WEIXIN
payway.value = 'wx'
if (data.q) {
par.value = decodeURIComponent(data.q).split('?')[1].split('=')[1]
}
// #endif
if (!Service.GetUserIsLogin()) {
login()
return
}
getData()
});
onShow(() => {
});
onUnmounted(() => {
clearInterval(timeOut.value)
})
const getData = () => {
vpMerchService.GetUnitMerchInfo(par.value).then(res => {
if (res.code == 0) {
storeInfo.value = res.data.merchInfo
userInfo.value = res.data.accInfo
radio.value = res.data.radio
couponList.value = res.data.discount
} else {
Service.Msg('商家获取失败,请重新扫码')
}
})
}
// 使用优惠券
const userCoupon = (coupon : any) => {
if (account.value == '') {
Service.Msg('请输入金额')
return
}
if (account.value < coupon.needMoney) {
Service.Msg('当前金额不支持')
return
}
currentCouponId.value = coupon.udId,
currentCoupon.value = coupon
}
const input = (val : any) => {
if (account.value.split('').length > 8) {
return
}
if (val == '.') {
let arr = account.value.split('').filter((item => item == val))
if (arr.length > 0) {
return
}
if (!account.value) {
account.value = '0.'
return
}
}
account.value = account.value + val
}
const computePoints = (e : any) => {
if (e <= 0.1) {
return 0
}
if (storeInfo.value.code == 'Discounts') {
return Number(e * radio.value).toFixed(2)
} else {
return Number(e * radio.value - e * 0.003).toFixed(2)
}
}
const deleInput = () => {
let arr = account.value.split('')
arr.pop()
account.value = arr.join('')
}
const save = () => {
if (!account.value) {
Service.Msg('请输入金额')
return
}
Service.LoadIng('支付中')
vpUserService.PayMerch(storeInfo.value.merchId, Number(account.value), payway.value, openId.value, currentCouponId.value).then(res => {
if (res.data.code == 1) {
// #ifdef MP-WEIXIN
wx.requestPayment({
timeStamp: res.data.resdata.timeStamp,
nonceStr: res.data.resdata.nonceStr,
package: res.data.resdata.package,
signType: res.data.resdata.signType,
paySign: res.data.resdata.paySign,
success(payRes) {
Service.LoadClose()
//支付完成处理逻辑
Service.Msg("支付成功");
setTimeout(()=>{
Service.GoPageTab('/pages/index/order')
},1000)
},
fail(err) {
Service.Msg("支付失败");
Service.LoadClose()
console.error('pay fail', err)
}
})
// #endif
// 支付宝
// #ifdef MP-ALIPAY
uni.requestPayment({
provider: 'alipay',
orderInfo: res.data.resdata.tradeNO,
success: function (res) {
if (res.resultCode == 9000) {
Service.Msg('支付成功')
Service.LoadClose()
setTimeout(()=>{
Service.GoPageTab('/pages/index/order')
},1000)
} else {
Service.LoadClose()
}
},
fail: function (err) {
Service.LoadClose()
console.error('pay fail', err)
},
complete: function (data) {
// console.log('支付完成:', data)
}
});
// #endif
} else if (res.data.code == 2) {
Service.Msg("支付成功");
setTimeout(()=>{
Service.GoPageTab('/pages/index/order')
},1000)
} else {
Service.Msg(res.msg)
}
})
}
const focusFunc = () => {
timeOut.value = setInterval(() => {
isShow.value = !isShow.value
}, 1000)
}
const getOpid = () => {
uni.getProvider({
service: 'oauth',
success: function (res : any) {
console.log(res.provider);
uni.login({
onlyAuthorize: true,
provider: res.provider,
success: function (loginRes) {
vpLoginService.GetOpenIdByWeixin(loginRes.code, res.provider == 'weixin' ? 1 : 3).then(content => {
if (content.code == 0) {
openId.value = content.data
} else {
Service.Msg(content.msg)
}
})
}
})
}
});
}
const login = () => {
uni.getProvider({
service: 'oauth',
success: function (res : any) {
uni.login({
onlyAuthorize: true,
provider: res.provider,
success: function (loginRes) {
vpLoginService.WxLogin(loginRes.code, res.provider == 'weixin' ? 1 : 3, 0, 0, '').then(content => {
if (content.code == 0) {
Service.SetUserToken(content.data.accToken)
getData()
} else {
Service.Msg(content.msg)
}
})
}
})
}
});
}
</script>
<style lang="scss">
page {
background-color: #f5f5f5;
}
// 选中
.radio {
width: 36rpx;
height: 36rpx;
border-radius: 50%;
border: 1rpx solid #ccc;
display: flex;
justify-content: center;
align-items: center;
.dot {
width: 18rpx;
height: 18rpx;
border-radius: 50%;
background-color: transparent;
}
&.active {
border-color: #fa6400;
.dot {
background-color: #fa6400;
}
}
}
// 优惠券
.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;
}
// 按键
.button {
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
padding: 18rpx 0;
border-radius: 10rpx;
font-weight: 700;
margin: 8rpx;
font-size: 38rpx;
}
.button:active {
background-color: #ababab;
}
/* 商户信息 */
.merchant-info {
padding: 30rpx 40rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.merchant-name {
font-size: 24rpx;
color: #999999;
display: block;
margin-top: 20rpx;
}
.section-title {
font-size: 32rpx;
font-weight: 700;
}
.merchant-icon {
width: 95rpx;
height: 95rpx;
border-radius: 50%;
margin-right: 20rpx;
}
</style>

View File

@@ -0,0 +1,103 @@
<template>
<view>
<view class="" style=" margin: 25rpx 0; padding: 0 20rpx; display: flex; align-items: center; justify-content: space-between;">
<view @click="changetab(index)" v-for="(item,index) in tag" :key="index"
:class="{active:index!=currentIndex,actived:index==currentIndex}" class="tag"
style=" padding: 14rpx 36rpx; border-radius: 14rpx; ">
{{item}}
</view>
</view>
<view v-if="type==0"class="" style=" margin:20rpx; margin-top: 30rpx; " >
<view class="" style="display: flex; align-items: center; padding: 40rpx 30rpx; margin-top: 20rpx; justify-content: space-between; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
<view class="">
<view class="" style="display: flex; align-items: center;" >
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" style=" border-radius: 10rpx; width: 60rpx; height: 60rpx;" alt="" />
<text style="margin-left: 10rpx;" >星巴克咖啡</text>
</view>
<view class="" style="margin-top: 15rpx; color: #999999; " >
今天 14:30
</view>
</view>
<view class="" style="font-weight: 600; color: #666666;" >
¥-38.00
</view>
</view>
<up-loadmore :status="status" />
</view>
<view v-else class="" style=" margin:20rpx; margin-top: 30rpx; " >
<view class="" style="display: flex; align-items: center; padding: 40rpx 30rpx; margin-top: 20rpx; justify-content: space-between; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
<view class="">
<view class="" style="display: flex; align-items: center;" >
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" style=" border-radius: 10rpx; width: 60rpx; height: 60rpx;" alt="" />
<text style="margin-left: 10rpx;" >星巴克咖啡</text>
</view>
<view class="" style="margin-top: 15rpx; color: #999999; " >
今天 14:30
</view>
</view>
<view class="" style="font-weight: 600; color: #666666;" >
¥-38.00
</view>
</view>
<up-loadmore :status="status" />
</view>
</view>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import { Service } from '@/Service/Service'
let status=ref('nomore')
let currentIndex=ref(0)
let tag = ref([
'全部',
'今日',
'本周',
'本月'
])
let type=ref(null)
onLoad((data:any) => {
type.value=data.type
if(data.type==0){
uni.setNavigationBarTitle({
title:'交易明细'
})
}else{
uni.setNavigationBarTitle({
title:'交易记录'
})
}
});
onShow(() => {
});
const changetab=(e:number)=>{
currentIndex.value=e
}
</script>
<style lang="scss">
.active{
background-color: #F3F4F6;
color: #4B5563;
}
.actived{
background-color: #FF6B35;
color: #fff;
}
.tag{
display: flex;
align-items: center;
justify-content: center;
width: fit-content;
font-size: 28rpx;
}
</style>

View File

@@ -0,0 +1,328 @@
<template>
<view class="feedback-page">
<!-- 沉浸式状态栏 -->
<view class="status-bar"></view>
<!-- 顶部导航 -->
<view 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="feedback-type-card">
<view class="card-title">
<text class="ri-edit-line title-icon"></text>
<text class="title-text">反馈类型</text>
</view>
<view class="type-list">
<view
v-for="(type, index) in feedbackTypes"
:key="index"
class="type-item"
:class="{ active: selectedType === index }"
@click="selectType(index)"
>
<text class="type-text">{{ type }}</text>
<text v-if="selectedType === index" class="ri-checkbox-circle-fill type-check"></text>
</view>
</view>
</view>
<!-- 反馈内容 -->
<view class="feedback-content-card">
<view class="card-title">
<text class="ri-message-2-line title-icon"></text>
<text class="title-text">反馈内容</text>
</view>
<textarea
class="feedback-textarea"
v-model="feedbackContent"
placeholder="请详细描述您遇到的问题或建议,我们会认真对待每一条反馈..."
maxlength="500"
/>
<view class="textarea-footer">
<text class="char-count">{{ feedbackContent.length }}/500</text>
</view>
</view>
<!-- 提交按钮 -->
<view class="submit-section">
<button class="submit-btn" @click="submitFeedback">
<text class="btn-text">提交反馈</text>
</button>
</view>
<!-- 温馨提示 -->
<view class="tips-box">
<view class="tips-header">
<text class="ri-error-warning-line tips-icon"></text>
<text class="tips-title">温馨提示</text>
</view>
<view class="tips-content">
<text class="tips-item">• 我们会认真对待每一条反馈,并尽快处理</text>
<text class="tips-item">• 如需紧急处理,建议直接拨打客服电话</text>
<text class="tips-item">• 提交反馈后我们会在1-3个工作日内回复</text>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { Service } from "@/Service/Service"
// 反馈类型
const feedbackTypes = [
'功能建议',
'问题反馈',
'投诉建议',
'其他'
]
// 选中的反馈类型
const selectedType = ref(0)
// 反馈内容
const feedbackContent = ref('')
// 返回
const goBack = () => {
Service.GoPageBack()
}
// 选择反馈类型
const selectType = (index) => {
selectedType.value = index
}
// 提交反馈
const submitFeedback = () => {
if (!feedbackContent.value.trim()) {
uni.showToast({
title: '请输入反馈内容',
icon: 'none'
})
return
}
// 模拟提交
uni.showLoading({
title: '提交中...'
})
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '提交成功',
icon: 'success'
})
// 清空表单
feedbackContent.value = ''
selectedType.value = 0
}, 1500)
}
</script>
<style lang="scss" scoped>
.feedback-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;
}
/* 反馈类型卡片 */
.feedback-type-card {
background: #FFFFFF;
border-radius: 24rpx;
padding: 32rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
margin-bottom: 20rpx;
}
.card-title {
display: flex;
align-items: center;
gap: 12rpx;
margin-bottom: 20rpx;
}
.title-icon {
font-size: 32rpx;
color: #FF6B00;
}
.title-text {
font-size: 28rpx;
font-weight: 600;
color: #222222;
}
.type-list {
display: flex;
flex-direction: column;
gap: 12rpx;
}
.type-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 20rpx;
background: #F5F5F5;
border-radius: 12rpx;
border: 2rpx solid transparent;
}
.type-item.active {
background: #FFF4E6;
border-color: #FF6B00;
}
.type-text {
font-size: 26rpx;
color: #222222;
}
.type-check {
font-size: 32rpx;
color: #FF6B00;
}
/* 反馈内容卡片 */
.feedback-content-card {
background: #FFFFFF;
border-radius: 24rpx;
padding: 32rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
margin-bottom: 20rpx;
}
.feedback-textarea {
width: 100%;
min-height: 200rpx;
padding: 20rpx;
background: #F5F5F5;
border-radius: 12rpx;
font-size: 26rpx;
color: #222222;
line-height: 1.6;
}
.textarea-footer {
display: flex;
justify-content: flex-end;
margin-top: 12rpx;
}
.char-count {
font-size: 22rpx;
color: #999999;
}
/* 提交按钮 */
.submit-section {
margin-bottom: 20rpx;
}
.submit-btn {
width: 100%;
height: 88rpx;
background: linear-gradient(135deg, #FF6B00, #FF9500);
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
border: none;
box-shadow: 0 4rpx 16rpx rgba(255, 107, 0, 0.3);
}
.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-content {
display: flex;
flex-direction: column;
gap: 12rpx;
}
.tips-item {
font-size: 22rpx;
color: #666666;
line-height: 1.6;
}
</style>