第一次上传

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,24 @@
import { Service } from '@/Service/Service';
class vpLoginService {
private static GetOpenIdByWeixinPath: string = '/Login/GetOpenIdByWeixin';
/*****获取openid*****/
static GetOpenIdByWeixin(code: string,type:number) {
var result = Service.Request(this.GetOpenIdByWeixinPath, 'GET', {code,type});
return result;
}
private static WxLoginPath: string = '/Login/WxLogin';
/*****微信登录*****/
static WxLogin(code: string,type:number,lon:number,lat:number,remNo:string) {
var result = Service.Request(this.WxLoginPath, 'GET', {code,type,lon,lat,remNo});
return result;
}
}
export { vpLoginService }

View File

@@ -0,0 +1,400 @@
<template>
<view class="coupon-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>
<!-- Tab 切换 - 简约文字Tab -->
<view class="tab-bar">
<view
v-for="(tab, index) in tabs"
:key="index"
class="tab-item"
:class="{ active: currentTab === tab.value }"
@click="switchTab(tab.value)"
>
<text class="tab-text">{{ tab.label }}</text>
<text v-if="tab.count > 0" class="tab-count">({{ tab.count }})</text>
</view>
</view>
<!-- 优惠券列表 - 简约卡片 -->
<view class="coupon-list">
<view
v-for="coupon in coupons"
:key="coupon.id"
class="coupon-card"
:class="`coupon-${coupon.status}`"
>
<!-- 左侧金额 -->
<view class="coupon-left">
<view v-if="coupon.type === 'discount'" class="coupon-amount">
<text class="amount-number">{{ coupon.discount }}</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 v-else 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.title }}</view>
<view class="coupon-condition">
<text v-if="coupon.minAmount > 0">满{{ coupon.minAmount }}元可用</text>
<text v-else>无门槛</text>
</view>
<view class="coupon-expire">有效期至 {{ coupon.expireDate }}</view>
<!-- 状态标识 -->
<view v-if="coupon.status === 'used'" class="coupon-status used">
<text>已使用</text>
</view>
<view v-else-if="coupon.status === 'expired'" class="coupon-status expired">
<text>已过期</text>
</view>
</view>
</view>
<!-- 空状态 -->
<view v-if="coupons.length === 0" class="empty">
<text class="empty-text">{{ emptyText }}</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { Service } from "@/Service/Service"
import { ref } from "vue";
// import { getCouponList } from '@/api/index.js'
// 数据
const currentTab = ref('unused')
const coupons = ref([])
const tabs = ref([
{ label: '未使用', value: 'unused', count: 0 },
{ label: '已使用', value: 'used', count: 0 },
{ label: '已过期', value: 'expired', count: 0 }
])
// 空状态文本
const emptyText = computed(() => {
const textMap = {
unused: '暂无可用优惠券',
used: '暂无已使用的优惠券',
expired: '暂无已过期的优惠券'
}
return textMap[currentTab.value]
})
// 获取优惠券列表
const fetchCoupons = async () => {
// const res = await getCouponList(currentTab.value)
// if (res.code === 200) {
// coupons.value = res.data
// }
}
// 更新各状态数量
const updateCounts = async () => {
// const statuses = ['unused', 'used', 'expired']
// for (const status of statuses) {
// const res = await getCouponList(status)
// if (res.code === 200) {
// const tab = tabs.value.find(t => t.value === status)
// if (tab) {
// tab.count = res.data.length
// }
// }
// }
}
// 切换Tab
const switchTab = (value) => {
currentTab.value = value
fetchCoupons()
}
// 返回我的页面
const goBack = () => {
Service.GoPage()
}
</script>
<style lang="scss" scoped>
.coupon-page {
min-height: 100vh;
background-color: #F5F5F5;
}
/* 状态栏 */
.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;
}
/* Tab栏 - 简约文字Tab */
.tab-bar {
display: flex;
background: #FFFFFF;
padding: 20rpx 20rpx 0;
border-bottom: 1rpx solid #E5E5E5;
}
.tab-item {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding-bottom: 20rpx;
position: relative;
}
.tab-item.active .tab-text {
color: #222;
font-weight: 600;
}
.tab-item.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 32rpx;
height: 4rpx;
background: #FF6B00;
border-radius: 2rpx;
}
.tab-text {
font-size: 28rpx;
color: #666;
}
.tab-count {
font-size: 24rpx;
color: inherit;
margin-left: 4rpx;
}
/* 优惠券列表 */
.coupon-list {
padding: 20rpx;
}
.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;
}
/* 空状态 */
.empty {
display: flex;
align-items: center;
justify-content: center;
padding: 120rpx 0;
}
.empty-text {
font-size: 26rpx;
color: #999;
}
</style>

View File

@@ -0,0 +1,198 @@
<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">星巴克 · 北京国贸店</text>
</view>
<image :src="Service.GetMateUrlByImg('/static/dele/dele4.jpg')" 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;">
<up-input prefixIcon='rmb' :prefixIconStyle="{ 'color':'#000','font-weight': 600,'font-size':'60rpx' }"
fontSize='50rpx'
:auto-blur="false"
:customStyle="{'color':'#000', height: '90rpx', 'padding-left': 0, 'font-weight': 600,'padding-bottom':'20rpx' }"
border="bottom" v-model="account"></up-input>
</view>
<view class="" style="font-size: 24rpx; color: #6B6B6B; ">
<text>我的积分 1,250 积分</text>
<text style="margin-left: 10rpx;">可抵扣 ¥12.50</text>
</view>
<view class="" style="font-size: 28rpx; margin-top: 10rpx; ">
<text :style="{'margin-right':!des?'':'15rpx'}">{{des}}</text>
<text @click="showDes=true" style="font-weight: 600; color: #586B95;">添加备注</text>
</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>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { Service } from "@/Service/Service"
import { ref } from "vue";
let account = ref('')
let showDes = ref(false)
let des = ref()
onLoad(() => {
});
onShow(() => {
});
const input=(val)=>{
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 deleInput=()=>{
let arr=account.value.split('')
arr.pop()
account.value=arr.join('')
}
const save=()=>{
}
</script>
<style lang="scss">
page {
background-color: #f5f5f5;
}
// 按键
.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: 10rpx;
margin-right: 20rpx;
}
</style>

View File

@@ -0,0 +1,340 @@
{
"easycom": {
// 注意一定要放在custom里否则无效https://ask.dcloud.net.cn/question/131175
"custom": {
"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
}
},
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationBarBackgroundColor": "#36394D",
"navigationStyle": "custom",
"backgroundColor": "#F8F8F8"
}
},
{
"path": "pages/index/community",
"style": {
"navigationBarTitleText": "社区",
"navigationStyle": "custom"
}
},
{
"path": "pages/index/user",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path" : "pages/index/shop",
"style" :
{
"navigationBarTitleText" : "积分商城"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "v派商家",
"navigationBarBackgroundColor": "#fff",
"backgroundColor": "#F8F8F8"
},
"subPackages": [{
"root": "pages/community",
"pages": [{
"path": "noticeList",
"style": {
"navigationBarTitleText": "社区公告"
}
},
{
"path": "merchantCom",
"style": {
"navigationBarTitleText": "社区商家"
}
},
{
"path" : "merchantDetail",
"style" :
{
"navigationBarTitleText" : "美食小店"
}
}
]
},
{
"root": "pages/goods",
"pages": [
{
"path": "integralGoods",
"style": {
"navigationBarTitleText": "积分商品"
}
},
{
"path": "merchant",
"style": {
"navigationBarTitleText": "热门商家"
}
},
{
"path" : "goodsDetail",
"style" :
{
"navigationBarTitleText" : "商品详情"
}
},
{
"path" : "goodsContro",
"style" :
{
"navigationBarTitleText" : "商品管理"
}
},
{
"path" : "addGoods",
"style" :
{
"navigationBarTitleText" : "添加商品"
}
},
{
"path" : "Pay",
"style" :
{
"navigationBarTitleText" : "付款"
}
},
{
"path": "goodsPay",
"style": {
"navigationBarTitleText": "积分订单"
}
},
{
"path" : "search",
"style" :
{
"navigationBarTitleText" : "搜索",
"navigationStyle": "custom"
}
}
]
},
{
"root": "pages/article",
"pages": [{
"path": "articleCom",
"style": {
"navigationBarTitleText": "社区公告"
}
},
{
"path": "newsList",
"style": {
"navigationBarTitleText": "新闻公告"
}
},
{
"path": "news",
"style": {
"navigationBarTitleText": "新闻详情"
}
}
]
}, {
"root": "pages/userFunc",
"pages": [{
"path" : "setData",
"style" :
{
"navigationBarTitleText" : "编辑资料"
}
},
{
"path" : "integration",
"style" :
{
"navigationBarTitleText" : "积分明细"
}
},
{
"path" : "trade",
"style" :
{
"navigationBarTitleText" : "交易记录"
}
},
{
"path" : "editStore",
"style" :
{
"navigationBarTitleText" : "编辑店铺"
}
},
{
"path" : "statistics",
"style" :
{
"navigationBarTitleText" : "数据统计"
}
},
{
"path" : "set",
"style" :
{
"navigationBarTitleText" : "设置"
}
},
{
"path" : "bind",
"style" :
{
"navigationBarTitleText" : "绑定手机号"
}
},
{
"path" : "password",
"style" :
{
"navigationBarTitleText" : "修改支付密码"
}
},
{
"path" : "storeInter",
"style" :
{
"navigationBarTitleText" : "积分明细"
}
},
{
"path" : "withdrow",
"style" :
{
"navigationBarTitleText" : "提现"
}
},
{
"path" : "vip",
"style" :
{
"navigationBarTitleText" : "会员码"
}
},
{
"path" : "promoteCode",
"style" :
{
"navigationBarTitleText" : "推广码"
}
},
{
"path" : "addressList",
"style" :
{
"navigationBarTitleText" : "收货地址"
}
},
{
"path" : "addAddress",
"style" :
{
"navigationBarTitleText" : "添加地址"
}
},
{
"path": "alliance-card",
"style": {
"navigationBarTitleText": "我的联盟卡",
"navigationStyle": "custom"
}
},
{
"path": "member-benefits",
"style": {
"navigationBarTitleText": "会员权益",
"navigationStyle": "custom"
}
},
{
"path": "promotion",
"style": {
"navigationBarTitleText": "我的推广",
"navigationStyle": "custom"
}
},
{
"path": "invite",
"style": {
"navigationBarTitleText": "邀请好友",
"navigationStyle": "custom"
}
},
{
"path": "feedback",
"style": {
"navigationBarTitleText": "意见反馈",
"navigationStyle": "custom"
}
},
{
"path": "about-us",
"style": {
"navigationBarTitleText": "关于我们",
"navigationStyle": "custom"
}
},
{
"path": "coupon",
"style": {
"navigationBarTitleText": "优惠券",
"navigationStyle": "custom"
}
}
]
}
],
"tabBar": {
"color": "#8a8a8a",
"selectedColor": "#EC754B",
"backgroundColor": "#ffffff",
"list": [{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "/static/tabBar/home.png",
"selectedIconPath": "/static/tabBar/homed.png"
},
// {
// "text": "社区",
// "pagePath": "pages/index/community",
// "iconPath": "/static/tabBar/community.png",
// "selectedIconPath": "/static/tabBar/communityed.png"
// }
// ,
{
"text": "积分商城",
"pagePath": "pages/index/shop",
"iconPath": "/static/tabBar/shop.png",
"selectedIconPath": "/static/tabBar/shoped.png"
},
{
"text": "个人中心",
"pagePath": "pages/index/user",
"iconPath": "/static/tabBar/user.png",
"selectedIconPath": "/static/tabBar/usered.png"
}]
}
}