first commit
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 195 B |
@@ -0,0 +1,21 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
@@ -0,0 +1,328 @@
|
||||
<template>
|
||||
<view class="review-management-page">
|
||||
<!-- 全新方案:纯 CSS 手动构建的骨架屏 -->
|
||||
<view v-if="loading" class="skeleton-wrapper">
|
||||
<view class="skeleton-card" style="height: 150rpx;"></view>
|
||||
<view class="skeleton-tabs">
|
||||
<view class="skeleton-item skeleton-text" style="width: 100%; height: 44rpx;"></view>
|
||||
</view>
|
||||
<view v-for="i in 3" :key="i" class="skeleton-card">
|
||||
<view class="skeleton-item skeleton-text" style="width: 100%; height: 300rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 页面实际内容 -->
|
||||
<view v-else class="page-content" :class="{'height-pre':showReview}">
|
||||
|
||||
<!-- 1. 数据看板 -->
|
||||
<view class="summary-card">
|
||||
<view class="data-item">
|
||||
<view class="value"><text class="score">11111</text><up-icon name="star-fill"
|
||||
color="#ff9900" size="20"></up-icon></view>
|
||||
<text class="label">平均评分</text>
|
||||
</view>
|
||||
<view class="data-item">
|
||||
<text class="value">11111</text>
|
||||
<text class="label">总评价数</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 2. Tabs 切换 -->
|
||||
<view class="sticky-tabs-wrapper">
|
||||
<up-tabs :list="reviewTabs" :current="currentTab" @change="onTabChange" lineColor="#fa6400"
|
||||
:activeStyle="{ color: '#fa6400', fontWeight: 'bold' }" :inactiveStyle="{ color: '#666' }">
|
||||
</up-tabs>
|
||||
</view>
|
||||
|
||||
<view class="review-list">
|
||||
<view class="review-card" v-for="review in 3" :key="review">
|
||||
<view class="reviewer-info">
|
||||
<text class="name">小李子</text>
|
||||
<up-rate v-model="total" readonly activeColor="#ff9900" size="16"></up-rate>
|
||||
<text class="time">2025=12-15</text>
|
||||
</view>
|
||||
<text class="review-text">你给我送嫩家了?</text>
|
||||
<view class="review-images">
|
||||
<!-- <view class="image-placeholder" style="border: none;"
|
||||
v-for="(img, index) in JSON.parse(review.img)" :key="index">
|
||||
<image :src="Service.GetMateUrlByImg(img.url)" style="width: 100%; height: 100%;" mode="">
|
||||
</image>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<up-loadmore status="nomore" nomoreText="没有更多评价了"></up-loadmore>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { Service } from "@/Service/Service";
|
||||
|
||||
|
||||
|
||||
const loading = ref<boolean>(false);
|
||||
const currentTab = ref<number>(0);
|
||||
|
||||
|
||||
|
||||
let status = ref('nomore')
|
||||
let page = ref(1)
|
||||
|
||||
let showReview = ref(false)
|
||||
let review = ref('')
|
||||
|
||||
let storeInfo = ref<any>()
|
||||
let total = ref(0)
|
||||
const reviewTabs = ref([
|
||||
{ name: '全部' }, { name: '好评' }, { name: '差评' }
|
||||
]);
|
||||
|
||||
const reviewList = ref<Array<any>>([]);
|
||||
|
||||
let currentId = ref('')
|
||||
|
||||
onLoad(() => {
|
||||
});
|
||||
onShow(() => { });
|
||||
|
||||
|
||||
|
||||
// 获取数据
|
||||
const getData = () => {
|
||||
status.value = 'loadmore'
|
||||
page.value = 1
|
||||
reviewList.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
|
||||
const getList = () => {
|
||||
if (status.value == 'loading' || status.value == 'nomore') {
|
||||
return
|
||||
}
|
||||
status.value = 'loading'
|
||||
|
||||
}
|
||||
|
||||
|
||||
const onTabChange = (e : { index : number }) => {
|
||||
currentTab.value = e.index;
|
||||
getData()
|
||||
};
|
||||
|
||||
const replyTo = () => {
|
||||
|
||||
if (review.value == '') {
|
||||
return
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.height-pre {
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
@keyframes skeleton-blink {
|
||||
0% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 0 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-item {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-blink 1.5s infinite linear;
|
||||
}
|
||||
|
||||
.skeleton-rect {
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.skeleton-text {
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-wrapper {
|
||||
padding: 24rpx;
|
||||
background-color: #f7f7f7;
|
||||
|
||||
.skeleton-tabs {
|
||||
padding: 20rpx 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.skeleton-card {
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.review-management-page {
|
||||
background-color: #f7f7f7;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
text-align: center;
|
||||
background-color: #fff8f5;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin: 24rpx;
|
||||
|
||||
.data-item {
|
||||
.value {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4rpx;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 8rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.text-red {
|
||||
color: #fa5151;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sticky-tabs-wrapper {
|
||||
position: sticky;
|
||||
top: calc(var(--status-bar-height) + 44px);
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
|
||||
:deep(.up-tabs__wrapper__nav__item) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:deep(.up-tabs__wrapper__nav) {
|
||||
position: relative;
|
||||
|
||||
.unread-badge {
|
||||
position: absolute;
|
||||
top: 16rpx;
|
||||
right: 20rpx;
|
||||
background-color: #fa5151;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
min-width: 32rpx;
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
padding: 0 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.review-list {
|
||||
padding: 24rpx;
|
||||
|
||||
.review-card {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
&.bad-review {
|
||||
border: 1rpx solid #fef0f0;
|
||||
}
|
||||
|
||||
.reviewer-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
|
||||
.name {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.review-text {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin: 20rpx 0;
|
||||
display: block;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.review-images {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
|
||||
.image-placeholder {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.merchant-reply {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 12rpx;
|
||||
padding: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 26rpx;
|
||||
|
||||
.reply-label {
|
||||
color: #fa6400;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.reply-text {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.reply-action {
|
||||
text-align: right;
|
||||
margin-top: 20rpx;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
border: 1rpx solid #fa6400;
|
||||
color: #fa6400;
|
||||
font-size: 26rpx;
|
||||
padding: 8rpx 24rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<view class="home">
|
||||
<view class=""
|
||||
style=" margin-top: 200rpx; display: flex; flex-direction: column; justify-content: center; align-items: center;">
|
||||
<image :src="Service.GetIconImg('/static/index/logo/logo.png')" style="width: 150rpx; height: 150rpx; "
|
||||
mode="">
|
||||
</image>
|
||||
<view class="" style="font-size: 36rpx; font-weight: 800; margin-top: 20rpx;">
|
||||
确菜农·骑手端
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="margin: 30rpx 30rpx; margin-top: 150rpx;">
|
||||
|
||||
<view class="" style="font-size: 34rpx; font-weight: 600; ">
|
||||
欢迎登陆
|
||||
</view>
|
||||
|
||||
<view class="" style="font-size: 28rpx; margin-top: 20rpx; ">
|
||||
手机号登录,安全又便捷
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<view class="" style="margin-top: 30rpx;">
|
||||
<up-input v-model="login.phone" type="number" shape='circle'
|
||||
:customStyle="{'padding':'20rpx 30rpx','font-size':'32rpx'}" placeholder="请输入手机号"
|
||||
clearable='true' border="surround"></up-input>
|
||||
</view>
|
||||
|
||||
<view v-if="!type" class="" style="margin-top: 30rpx;">
|
||||
<up-input v-model="login.password" type="password" shape='circle'
|
||||
:customStyle="{'padding':'20rpx 30rpx','font-size':'32rpx'}" placeholder="请输入密码"
|
||||
clearable='true' border="surround"></up-input>
|
||||
</view>
|
||||
<view v-else class=""
|
||||
style=" display: flex; align-items: center; justify-content: space-between; margin-top: 30rpx; border: 1rpx solid #dadbde; box-sizing: border-box; padding: 20rpx 30rpx; border-radius: 200rpx; ">
|
||||
<view class="" style="">
|
||||
<up-code-input v-model="login.code" :maxlength="4" mode="line" size='24'></up-code-input>
|
||||
</view>
|
||||
<view class="wrap">
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
<up-code :seconds="seconds" @end="end" @start="start" ref="uCodeRef"
|
||||
@change="codeChange"></up-code>
|
||||
<view @click="getCode">{{tips}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<view class=""
|
||||
style="margin-top: 40rpx; width: 100%; height: 80rpx; line-height: 80rpx; border-radius: 40rpx; background-color: #FFD700; color: #000; font-weight: bold; font-size: 30rpx; text-align: center;"
|
||||
@click="loginshop()">
|
||||
登录
|
||||
|
||||
</view>
|
||||
|
||||
<view class="" style="text-align: center; color: #637aff; margin: 50rpx 0; ">
|
||||
<text @click="type=!type,login.password='',login.code=''">{{ !type?'使用验证码登录':'使用密码登录' }}</text>
|
||||
</view>
|
||||
|
||||
<view class=""
|
||||
style="display: flex; justify-content: center; align-items: center;color: black; margin-top: 50rpx; "
|
||||
@click="isuser= !isuser">
|
||||
<view class="" style="margin-right: 10rpx;">
|
||||
<up-icon :name="!isuser?'checkmark-circle':'checkmark-circle-fill'"
|
||||
:color="!isuser?'#999':'var(--nav-mian)'" size="20"></up-icon>
|
||||
</view>
|
||||
我同意
|
||||
<a @click.stop style="color: #FF6B23; text-decoration: none; " :href="userUrl">《用户协议》</a>
|
||||
和
|
||||
<a @click.stop style="color: #FF6B23; text-decoration: none; " :href="userUrl">《隐私政策》</a>
|
||||
</view>
|
||||
<view class="" style="text-align: center; margin-top: 20rpx;">
|
||||
新用户?系统将自动为您注册
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { Service, CNRiderLoginService } from "@/Service/CN/CNRiderLoginService"
|
||||
import { ref } from "vue";
|
||||
import { WebSocket } from '@/Service/Comm/TwWebSocket';
|
||||
let qudPow = ref<string>('')
|
||||
|
||||
let login = ref({
|
||||
phone: '',
|
||||
code: '',
|
||||
password: ''
|
||||
})
|
||||
|
||||
const tips = ref('');
|
||||
const seconds = ref(60);
|
||||
const uCodeRef = ref(null);
|
||||
|
||||
let type = ref(false)
|
||||
|
||||
let isLogin = ref<boolean>(true)//登录注册状态
|
||||
|
||||
let isuser = ref<boolean>(false)//用户同意协议
|
||||
|
||||
let userUrl = ref('')
|
||||
let other = ref('')
|
||||
|
||||
|
||||
|
||||
onLoad(() => {
|
||||
getData()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
const getData = () => {
|
||||
CNRiderLoginService.GetPrivacy(1).then(res => {
|
||||
userUrl.value = res.data.url
|
||||
})
|
||||
|
||||
CNRiderLoginService.GetPrivacy(4).then(res => {
|
||||
other.value = res.data.url
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
//登录
|
||||
const loginshop = () => {
|
||||
if (login.value.phone == '') {
|
||||
return Service.Msg('请输入手机号/账号!')
|
||||
}
|
||||
|
||||
if (login.value.password == '' && !type.value) {
|
||||
return Service.Msg('请输入密码!')
|
||||
}
|
||||
|
||||
if (login.value.code == '' && type.value) {
|
||||
return Service.Msg('请输入验证码!')
|
||||
}
|
||||
|
||||
if (!isuser.value) {
|
||||
return Service.Msg('请勾选同意用户协议!')
|
||||
}
|
||||
|
||||
|
||||
|
||||
CNRiderLoginService.RiderLogin(login.value).then(res => {
|
||||
if (res.code == 0) {
|
||||
Service.Msg('登录成功!')
|
||||
Service.SetUserToken(res.data.accToken)
|
||||
WebSocket.ConnectSocketInit();
|
||||
setTimeout(() => {
|
||||
isuser.value = false
|
||||
Service.GoPageTab('/pages/index/index')
|
||||
}, 1000)
|
||||
|
||||
|
||||
} else {
|
||||
Service.Msg(res.msg)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
const codeChange = (text) => {
|
||||
tips.value = text;
|
||||
};
|
||||
|
||||
|
||||
const getCode = () => {
|
||||
if (!login.value.phone) {
|
||||
Service.Msg('请输入手机号')
|
||||
return
|
||||
}
|
||||
if (uCodeRef.value.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
CNRiderLoginService.SendUserSms(login.value.phone, 'RiderReg').then(res => {
|
||||
|
||||
})
|
||||
uCodeRef.value.start();
|
||||
}, 2000);
|
||||
} else {
|
||||
Service.Msg('倒计时结束后再发送')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const end = () => {
|
||||
console.log('倒计时结束');
|
||||
};
|
||||
|
||||
const start = () => {
|
||||
console.log('倒计时开始');
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.home {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: linear-gradient(to bottom, #FFD700, #fff 40%);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chen {}
|
||||
</style>
|
||||
Reference in New Issue
Block a user