第一次上传

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,244 @@
<template>
<view class="page">
<!-- 时间筛选标签 -->
<view class="time-filter">
<text class="filter-item" @click="currentIndex=0" :class="{active:currentIndex==0}">今日</text>
<text class="filter-item" @click="currentIndex=1" :class="{active:currentIndex==1}">本周</text>
<text class="filter-item" @click="currentIndex=2" :class="{active:currentIndex==2}">本月</text>
</view>
<!-- 关键数据卡片 -->
<view class="data-cards">
<view class="data-card">
<text class="data-label">销售额</text>
<text class="data-value">¥12,345</text>
<text class="data-growth">+12.5%</text>
</view>
<view class="data-card">
<text class="data-label">订单数</text>
<text class="data-value">128单</text>
<text class="data-growth">+8.3%</text>
</view>
<view class="data-card">
<text class="data-label">访客数</text>
<text class="data-value">1,024人</text>
<text class="data-growth">+15.2%</text>
</view>
<view class="data-card">
<text class="data-label">人均消费</text>
<text class="data-value">¥96.4</text>
<text class="data-growth">+4.8%</text>
</view>
</view>
<!-- 销售趋势图表 -->
<!-- <view class="chart-section">
<text class="section-title">销售趋势</text>
<view class="chart-container">
</view>
</view> -->
<!-- 商品销量排行 -->
<!-- <view class="ranking-section">
<text class="section-title">商品销量排行</text>
<view class="ranking-list">
<view class="ranking-item" v-for="(item, index) in salesRanking" :key="index">
<view class="ranking-number">{{ index + 1 }}</view>
<text class="ranking-product">{{ item.name }}</text>
<view class="ranking-info">
<text class="ranking-sales">{{ item.sales }}份</text>
<u-icon :name="item.trend === 'up' ? 'arrow-up' : 'arrow-down'" size="24rpx"
:color="item.trend === 'up' ? '#4CD964' : '#FF3B30'" class="trend-icon"></u-icon>
</view>
</view>
</view>
</view> -->
<!-- 客流高峰时段 -->
<!-- <view class="flow-section">
<text class="section-title">客流高峰时段</text>
</view> -->
</view>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
// 商品销量排行数据类型
interface RankingItem {
name : string;
sales : number;
trend : 'up' | 'down';
}
let currentIndex = ref(0)
// 商品销量排行数据
const salesRanking = ref<RankingItem[]>([
{ name: '招牌牛肉面', sales: 245, trend: 'up' },
{ name: '香菇三明治', sales: 189, trend: 'down' },
{ name: '水果沙拉', sales: 156, trend: 'up' },
{ name: '红烧排骨', sales: 134, trend: 'up' },
{ name: '糖醋里脊', sales: 112, trend: 'down' }
]);
// 切换时间筛选
const changeTimeFilter = (index : number) => {
// 实际项目中这里应该有切换时间筛选的逻辑
console.log('切换时间筛选', index);
};
</script>
<style scoped lang="scss">
.page {
background-color: #F5F5F5;
min-height: 100vh;
padding-bottom: 40rpx;
}
/* 时间筛选标签 */
.time-filter {
display: flex;
justify-content: space-around;
padding: 30rpx;
background-color: #FFFFFF;
margin-bottom: 30rpx;
}
.filter-item {
font-size: 32rpx;
color: #666666;
padding: 10rpx 40rpx;
border-radius: 30rpx;
}
.filter-item.active {
background-color: #FF6600;
color: #FFFFFF;
}
/* 关键数据卡片 */
.data-cards {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20rpx;
padding: 0 30rpx;
margin-bottom: 30rpx;
}
.data-card {
background-color: #FFFFFF;
padding: 30rpx;
border-radius: 20rpx;
}
.data-label {
font-size: 28rpx;
color: #999999;
display: block;
margin-bottom: 20rpx;
}
.data-value {
font-size: 40rpx;
color: #333333;
font-weight: bold;
display: block;
margin-bottom: 10rpx;
}
.data-growth {
font-size: 28rpx;
color: #4CD964;
}
/* 图表区域 */
.chart-section,
.ranking-section,
.flow-section {
background-color: #FFFFFF;
padding: 30rpx;
border-radius: 20rpx;
margin: 0 30rpx 30rpx;
}
.section-title {
font-size: 36rpx;
color: #333333;
font-weight: bold;
display: block;
margin-bottom: 30rpx;
}
.chart-container {
width: 100%;
height: 320rpx;
}
.sales-trend-chart,
.customer-flow-chart {
width: 100%;
height: 100%;
}
/* 商品销量排行 */
.ranking-list {
gap: 20rpx;
}
.ranking-item {
display: flex;
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #F0F0F0;
}
.ranking-item:last-child {
border-bottom: none;
}
.ranking-number {
width: 60rpx;
height: 60rpx;
background-color: #FF6600;
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10rpx;
margin-right: 24rpx;
}
.ranking-product {
flex: 1;
font-size: 32rpx;
color: #333333;
}
.ranking-info {
display: flex;
align-items: center;
}
.ranking-sales {
font-size: 32rpx;
color: #333333;
margin-right: 16rpx;
}
.trend-icon {
margin-left: 8rpx;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

View File

@@ -0,0 +1,197 @@
<template>
<view style=" padding: 60rpx 40rpx 20rpx; ">
<view class="" style="font-size: 26rpx;">
提现金额
</view>
<view class="" style="margin-bottom: 20rpx;">
<up-input v-model="account" type="digit" :customStyle="{'padding':'12rpx 0','height':'100rpx'}"
fontSize='18' prefixIconStyle="font-size: 28px;color: #000;font-weight:bold" placeholder="请输入金额"
border="bottom" prefixIcon="rmb"></up-input>
</view>
<view class="" style="font-size: 26rpx; display: flex; align-items: center; ">
<view class="" style="color: #999; ">
当前剩余 {{ userData.integral }} 元
</view>
</view>
</view>
<view class="" style="margin: 40rpx 20rpx; ">
<u-button type="primary" @click="save" :custom-style="contactButtonStyle">立即提现</u-button>
</view>
<view class="" style="margin: 20rpx; padding: 20rpx 30rpx; background-color: #f6f6f6; border-radius: 20rpx; ">
<view class="" style="font-weight: bold; font-size: 30rpx;">
提示
</view>
<view class="" style="font-size: 28rpx;">
<view class="" style="text-indent: 1em; margin-top: 10rpx; ">
1.单笔最小提现1元
</view>
<view class="" style="text-indent: 1em; margin-top: 10rpx; ">
2.单笔最多可提现200元
</view>
<view class="" style="text-indent: 1em; margin-top: 10rpx; ">
3.每次最多一次申请提现
</view>
</view>
</view>
<view class="" style="margin: 20rpx; padding: 20rpx 30rpx; background-color: #f6f6f6; border-radius: 10rpx; ">
<view class="" style="font-weight: bold; font-size: 30rpx; text-align: center; ">
<img :src="Service.GetIconImg('/static/index/pay/light.png')" style="width: 65rpx; height: 65rpx;" alt="" />
</view>
<view class="" style="font-size: 30rpx; margin: 30rpx 0; text-align: center;">
您有一笔金额待确认收款
</view>
<view class="" style=" width: 100%; display: flex; align-items: center; justify-content: space-between; " >
<view class="" style="width: 48%;" >
<button style="font-size: 26rpx; padding: 6rpx 24rpx;">撤销提现</button>
</view>
<view class="" style="width: 48%;" >
<button style="font-size: 26rpx; padding: 6rpx 24rpx;" >确认收款</button>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import { Service, vpMerchService } from '@/Service/vp/vpMerchService'
import { vpLoginService } from '@/Service/vp/vpLoginService'
import { vpUserService } from '@/Service/vp/vpUserService'
let name = ref('')
let account = ref<number>()
let userData = ref({
integral: 0,
merchId: ''
})
// 按钮样式
const contactButtonStyle = ref({
backgroundColor: '#FF6600',
borderColor: '#FF6600',
color: '#FFFFFF',
fontSize: '28rpx',
height: '90rpx',
borderRadius: '45rpx',
marginRight: '20rpx'
});
onLoad(() => {
getData()
});
onShow(() => {
});
const getData = () => {
vpMerchService.GetMerchAccInfo('', 1).then(res => {
if (res.code == 0) {
userData.value = res.data.merchAcc
} else {
Service.Msg(res.msg)
}
})
}
const save = () => {
if (account.value === 0 || !account.value) {
Service.Msg('请输入金额')
return
}
if (account.value < 1) {
Service.Msg('单笔最小提现1元')
return
}
if (account.value > 200) {
Service.Msg('单笔最多可提现200元')
return
}
Service.LoadIng('提现中')
uni.getProvider({
service: 'oauth',
success: function (res : any) {
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) {
vpUserService.WxWith(content.data, account.value, '').then(wxres => {
Service.LoadClose()
if (wxres.code == 0) {
if (wx.canIUse('requestMerchantTransfer')) {
wx.requestMerchantTransfer({
mchId: wxres.data.mchId,
appId: wxres.data.appId,
package: wxres.data.packInfo,
success: () => {
Service.Msg('提现成功!')
setTimeout(() => {
Service.GoPageBack()
}, 1000)
},
fail: (res) => {
console.log('fail:', res);
},
});
} else {
wx.showModal({
content: '你的微信版本过低,请更新至最新版本。',
showCancel: false,
});
}
} else {
Service.Msg(wxres.msg)
}
})
} else {
Service.Msg(content.msg)
}
})
}
})
}
});
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.action-buttons {
display: flex;
padding: 30rpx 30rpx;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #ffffff;
border-top: 1rpx solid #f0f0f0;
}
.button-withdrow{
font-size: 24rpx;
width: 100%;
}
</style>

View File

@@ -0,0 +1,166 @@
<template>
<view class="address-manager">
<!-- 提示信息 -->
<view class="tip-bar">
<u-icon name="info-circle" size="24rpx" class="info-icon"></u-icon>
<text class="tip-text">最多可添加10个收货地址</text>
</view>
<!-- 地址列表 -->
<view class="address-list">
<!-- 地址项1 - 默认地址 -->
<view class="address-item">
<view class="address-content">
<view class="name-phone">
<text class="name">张三</text>
<text class="phone">138****1314</text>
<view class="default-tag">默认</view>
</view>
<text class="address">北京市海淀区中关村科技园区8号楼3单元502室</text>
</view>
<up-icon name="trash" color="#999" size="24"></up-icon>
</view>
</view>
<!-- 新增地址按钮 -->
<view class=""
style=" border-top: 1rpx solid #e2e2e2; position: fixed; bottom: 0; width: 100%; padding: 30rpx 20rpx; background-color: #fff; ">
<up-button @click="Service.GoPage('/pages/userFunc/addAddress')" color='var(--nav-mian)' shape='circle'
style="width: 90%; margin: 15rpx auto 0; " text="新增地址"></up-button>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { Service } from "@/Service/Service"
import { onShow, onLoad } from "@dcloudio/uni-app";
// 地址数据
const addresses = ref([
]);
onLoad(() => {
});
onShow(() => {
});
</script>
<style scoped lang="scss">
.address-manager {
background-color: #f6f6f6;
height: 100vh;
}
/* 提示信息样式 */
.tip-bar {
background-color: #fff8e6;
padding: 20rpx 30rpx;
display: flex;
align-items: center;
.info-icon {
color: #ff9c07;
margin-right: 10rpx;
}
.tip-text {
font-size: 26rpx;
color: #ff9c07;
flex: 1;
}
}
/* 地址列表样式 */
.address-list {
background-color: #fff;
padding: 0 30rpx;
border-top: 1rpx solid #e2e2e2;
border-bottom: 1rpx solid #e2e2e2;
.address-item {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 30rpx 0;
border-bottom: 1rpx solid #fff;
&:last-child {
border-bottom: none;
}
.address-content {
flex: 1;
.name-phone {
display: flex;
align-items: center;
margin-bottom: 10rpx;
.name {
font-size: 28rpx;
color: #333;
font-weight: 500;
margin-right: 20rpx;
}
.phone {
font-size: 26rpx;
color: #666;
margin-right: 15rpx;
}
.default-tag {
background-color: #ff6b00;
color: #fff;
font-size: 20rpx;
padding: 2rpx 15rpx;
border-radius: 20rpx;
}
}
.address {
font-size: 26rpx;
color: #666;
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
margin-top: 20rpx;
}
}
.edit-icon {
width: 30rpx;
height: 30rpx;
color: #999;
margin-top: 5rpx;
}
}
}
/* 新增地址按钮样式 */
.add-btn {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
background-color: #ff6b00;
color: #fff;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0;
}
</style>