第一次上传

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,173 @@
<template>
<view style="padding: 20rpx;">
<!-- 当前积分区域 -->
<view class="points-detail-section" style="margin-bottom: 20rpx;" >
<view class="" style="display: flex; align-items: center; justify-content: space-between;" >
<view class="" style="font-size: 28rpx; color: #999;" >
钱包余额
</view>
<view class="" style="color: red; font-weight: bold; " >
200
</view>
</view>
<view class="" style="margin-top: 20rpx;" >
<u-button type="primary" :custom-style="contactButtonStyle">立即提现</u-button>
</view>
<view class="" style="font-size: 26rpx; color: #999; text-align: center; margin-top: 20rpx; " >
提现到账时间:T+1工作日
</view>
</view>
<!-- 积分明细 -->
<view class="points-detail-section">
<text class="section-title">积分明细</text>
<view class="points-list">
<view class="points-item" v-for="(item, index) in pointsList" :key="index">
<text :class="['points-number', item.code=='收入' ? 'positive' : 'negative']">
{{ item.code=='收入' ? '+' : '-' }}{{ item.amount }}
</text>
<view class="" style="margin-left: 20rpx;">
<view class="points-type">{{ item.name }}</view>
<view class="points-date">{{ Service.formatDate(item.addTime,1) }}</view>
</view>
</view>
</view>
</view>
<up-loadmore :status="status" />
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { Service } from "@/Service/Service"
import { vpUserService } from '@/Service/vp/vpUserService'
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
// 积分明细数据类型
interface PointsItem {
amount:number
code:string
name:string
addTime:string
}
interface accInfo{
account:number
integral:number
userId:string
}
// 按钮样式
const contactButtonStyle = ref({
backgroundColor: '#FF6600',
borderColor: '#FF6600',
color: '#FFFFFF',
fontSize: '28rpx',
height: '75rpx',
borderRadius: '45rpx',
marginRight: '20rpx'
});
let accInfo=ref<accInfo>()
let status=ref('loadmore')
let page=ref(1)
// 积分明细数据
const pointsList = ref<PointsItem[]>([
]);
onLoad(() => {
getUseraccInfo()
})
onReachBottom(()=>{
getList()
})
const getUseraccInfo = () => {
status.value = 'loadmore'
page.value = 1
pointsList.value=[]
getList()
}
const getList=()=>{
if (status.value !== 'loadmore') {
return
}
status.value = 'loading'
vpUserService.GetUserAccInfo(page.value).then(res => {
accInfo.value = res.data.accInfo
pointsList.value=[...pointsList.value,...res.data.logList]
status.value = res.data.logList.length == 10 ? 'loadmore' : 'nomore'
page.value++
})
}
</script>
<style lang="scss">
page {
background-color: #f6f6f6;
}
/* 积分明细 */
.points-detail-section {
background-color: #ffffff;
padding: 30rpx;
border-radius: 20rpx;
}
.points-list {
gap: 36rpx;
}
.points-item {
display: flex;
align-items: center;
margin: 20rpx 0;
}
.points-item:last-child {
border-bottom: none;
padding-bottom: 0;
}
.points-type {
font-size: 32rpx;
color: #333333;
flex: 1;
}
.points-number {
font-size: 32rpx;
font-weight: bold;
margin-right: 24rpx;
min-width: 80rpx;
text-align: right;
}
.points-number.positive {
color: #4CD964;
}
.points-number.negative {
color: #FF4D4F;
}
.points-date {
font-size: 28rpx;
color: #999999;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

View File

@@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title></title>
<style type="text/css">
html,
body,
canvas {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
overflow-y: hidden;
background-color: transparent;
}
</style>
</head>
<body>
<canvas id="lime-painter"></canvas>
<script type="text/javascript" src="./uni.webview.1.5.3.js"></script>
<script type="text/javascript" src="./painter.js"></script>
<script>
var cache = [];
var painter = null;
var canvas = null;
var context = null;
var timer = null;
var pixelRatio = 1;
console.log = function (...args) {
postMessage(args);
};
// function stringify(key, value) {
// if (typeof value === 'object' && value !== null) {
// if (cache.indexOf(value) !== -1) {
// return;
// }
// cache.push(value);
// }
// return value;
// };
function emit(event, data) {
postMessage({
event,
data: (typeof data !== 'object' && data !== null ? data : JSON.stringify(data))
});
cache = [];
};
function postMessage(data) {
uni.postMessage({
data
});
};
function init(dpr) {
canvas = document.querySelector('#lime-painter');
context = canvas.getContext('2d');
pixelRatio = dpr || window.devicePixelRatio;
painter = new Painter({
id: 'lime-painter',
context,
canvas,
pixelRatio,
width: canvas.offsetWidth,
height: canvas.offsetHeight,
listen: {
onProgress(v) {
emit('progressChange', v);
},
onEffectFail(err) {
//console.error(err)
emit('fail', err);
}
}
});
emit('inited', true);
};
function save(args) {
delete args.success;
delete args.fail;
clearTimeout(timer);
timer = setTimeout(() => {
const path = painter.save(args);
if (typeof path == 'string') {
const index = Math.ceil(path.length / 8);
for (var i = 0; i < 8; i++) {
if (i == 7) {
emit('success', path.substr(i * index, index));
} else {
emit('file', path.substr(i * index, index));
}
};
} else {
// console.log('canvas no data')
emit('fail', 'canvas no data');
};
}, 30);
};
async function source(args) {
let size = await painter.source(args);
emit('layoutChange', size);
if(!canvas.height) {
console.log('canvas no size')
emit('fail', 'canvas no size');
}
painter.render().catch(err => {
// console.error(err)
emit('fail', err);
});
};
</script>
</body>
</html>

View File

@@ -0,0 +1,254 @@
<template>
<view>
<view class="" style=" width: 100%; height: 310rpx; background: linear-gradient(45deg,#FF6B35,#FF8B65);">
</view>
<view class=""
style=" margin: 0 30rpx; margin-top: -110rpx; padding: 30rpx; background-color: #fff; border-radius: 20rpx; ">
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
<view class="" style="font-size: 36rpx; font-weight: 600;">
{{userInfo?.nick}}
</view>
<view @click="Service.GoPage('/pages/userFunc/setData')" class="">
<up-icon name="arrow-right" size="18" color='#333333' :bold='true'></up-icon>
</view>
</view>
<view class=""
style="display: flex; align-items: center; margin-top: 40rpx; justify-content: space-between; ">
<view @click="Service.GoPage('/pages/userFunc/integration')" class=""
style=" width: 48%; display: flex;align-items: center;">
<view class=""
style=" display: flex;align-items: center;justify-content: center; width: 80rpx; height: 80rpx; background-color: #FF6B35; border-radius: 50%; ">
<img :src="Service.GetIconImg('/static/index/user/code.png')"
style="width: 50rpx; height: 50rpx; " alt="" />
</view>
<view class=""
style=" margin-left: -20rpx; flex: 1; text-align: center; font-size: 28rpx; font-weight: 600;">
{{accInfo?.integral}}积分
</view>
<view class="">
<up-icon name="arrow-right" size="14" color='#9CA3AF' :bold='true'></up-icon>
</view>
</view>
<view class="" @click="Service.GoPage('/pages/userFunc/trade?type='+1)"
style=" width: 48%; display: flex;align-items: center;">
<view class=""
style=" display: flex;align-items: center;justify-content: center; width: 80rpx; height: 80rpx; background-color: #FF6B35; border-radius: 50%; ">
<img :src="Service.GetIconImg('/static/index/user/list.png')"
style="width: 50rpx; height: 50rpx; " alt="" />
</view>
<view class=""
style=" margin-left: -20rpx; flex: 1; text-align: center; font-size: 28rpx; font-weight: 600;">
交易记录
</view>
<view class="">
<up-icon name="arrow-right" size="14" color='#9CA3AF' :bold='true'></up-icon>
</view>
</view>
</view>
</view>
<!-- 管理中心 -->
<view class="service-section" style="margin: 40rpx 30rpx 0; border-radius: 20rpx; ">
<text class="section-title" style="font-weight: 600;">商家管理中心</text>
<view class="service-grid">
<view class="service-item" @click="gotopage(controItem)" v-for="(controItem,serviceIndex) in controList"
:key="serviceIndex">
<view class="flex-center" style=" border-radius: 50%; padding: 20rpx; background-color: #FFF5F0; ">
<image :src="Service.GetIconImg(controItem.img)" class="service-icon"></image>
</view>
<text class="service-text">{{controItem.name}}</text>
</view>
</view>
</view>
<!-- 个人服务 -->
<view class="service-section" style="margin: 40rpx 30rpx 0; border-radius: 20rpx; ">
<text class="section-title" style="font-weight: 600;">我的服务</text>
<view class="" style=" margin-top: 40rpx; display: grid; grid-template-columns: repeat(2,1fr); ">
<view style=" margin-bottom: 20rpx; display: flex; align-items: center;" @click="serviceFunc(myServiceItem,serviceIndex)"
v-for="(myServiceItem,serviceIndex) in myServiceList" :key="serviceIndex">
<view class="flex-center" style=" border-radius: 50%; padding: 20rpx; background-color: #FFF5F0; ">
<image :src="Service.GetIconImg(myServiceItem.img)" class="service-icon"></image>
</view>
<text
style=" flex: 1; margin-left: 30rpx; font-size: 28rpx; font-weight: 600; ">{{myServiceItem.name}}</text>
</view>
</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 { vpUserService } from '@/Service/vp/vpUserService'
interface accInfo {
account : number
integral : number
userId : string
}
interface userInfo {
nick : string
integral : number
}
let controList = ref([
{
img: '/static/index/user/analysis.png',
name: '数据统计',
path: '/pages/userFunc/statistics'
},
{
img: '/static/index/user/trad.png',
name: '订单记录',
path: '/pages/userFunc/trade?type=' + 0
},
{
img: '/static/index/user/shop.png',
name: '商品管理',
path: '/pages/goods/goodsContro'
},
{
img: '/static/index/user/store.png',
name: '编辑店铺',
path: '/pages/userFunc/editStore'
},
{
img: '/static/index/user/store.png',
name: '积分明细',
path: '/pages/userFunc/storeInter'
}
])
let myServiceList = ref([
{
img: '/static/index/user/request.png',
name: '客服咨询',
path: ''
},
{
img: '/static/index/user/set.png',
name: '系统设置',
path: '/pages/userFunc/set'
},
{
img: '/static/index/user/set.png',
name: '会员码',
path: '/pages/userFunc/vip'
},
{
img: '/static/index/user/set.png',
name: '推广码',
path: '/pages/userFunc/promoteCode'
},
{
img: '/static/index/user/set.png',
name: '收货地址',
path: '/pages/userFunc/addressList'
}
])
let page = ref(1)
let accInfo = ref<accInfo>()
let userInfo = ref<userInfo>()
onLoad(() => {
});
onShow(() => {
getUserinfo()
getUseraccInfo()
});
const gotopage = (item : any) => {
if (item.path) {
Service.GoPage(item.path)
}
}
const serviceFunc = (item : any, index : any) => {
if (index == 0) {
wx.openCustomerServiceChat({
extInfo: { url: 'https://work.weixin.qq.com/kfid/kfc959c128ce7801256' },
corpId: 'wwb1123fbb286554ab',
success(res) { },
fail(err) {
console.log(err, '失败')
// 失败回调
}
})
} else {
Service.GoPage(item.path)
}
}
const getUserinfo = () => {
vpUserService.GetUserInfo().then(res => {
userInfo.value = res.data.userInfo
})
}
const getUseraccInfo = () => {
vpUserService.GetUserAccInfo(page.value).then(res => {
accInfo.value = res.data.accInfo
})
}
</script>
<style lang="scss">
page {
background-color: #f6f6f6;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
/* 服务区域通用样式 */
.service-section,
.value-added-section {
background-color: #fff;
margin: 20rpx 0rpx;
overflow: hidden;
padding: 20rpx;
}
/* 服务网格 */
.service-grid {
display: flex;
flex-wrap: wrap;
padding: 10rpx 20rpx 30rpx;
}
.service-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx 0;
}
.service-icon {
width: 40rpx;
height: 40rpx;
}
.service-text {
font-size: 24rpx;
color: #666;
margin-top: 16rpx;
text-align: center;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB