首页介绍&各个页面增加投诉和纠纷

main
Lufaneng 4 months ago
parent 090619ece2
commit 02e74fad12

@ -0,0 +1,119 @@
<template>
<view>
<!-- 悬浮按钮 -->
<view class="floating-btn" @click="openComplaintModal">
<view class="floating-text">投诉与</view>
<view class="floating-text">纠纷</view>
</view>
<!-- 客户投诉与纠纷处理机制弹窗 -->
<uv-modal
ref="complaintModalRef"
title="客户投诉与纠纷处理机制说明"
confirmText="我知道了"
@confirm="closeComplaintModal"
>
<scroll-view scroll-y class="complaint-content">
<view class="complaint-text">
<view class="p">为规范平台交易秩序保障用户合法权益结合我司图纸生成电子图纸设计方案等虚拟数字类产品的业务特性特建立完善的客户投诉及纠纷处理机制具体如下</view>
<view class="h3">业务及退款规则说明</view>
<view class="p">我司提供的图纸生成服务为虚拟数字类产品具有可复制易传播交付即生效的属性产品一经生成并交付用户无法进行回收撤回或二次销售</view>
<view class="p">因此在产品正常交付内容符合约定无质量问题的情况下不支持无理由退款相关规则已在商品详情页订单页支付确认环节进行显著提示用户完成支付即视为已充分知晓并同意</view>
<view class="h3">投诉受理渠道</view>
<view class="p">用户可通过以下渠道提交投诉与售后申请确保问题及时反馈</view>
<view class="p">客服电话<text class="phone-link" @click="callService">13666500395</text></view>
<view class="h3">投诉响应时效</view>
<view class="p">收到用户投诉后工作日2小时内响应非工作日当天内响应<br/>一般投诉问题24小时内处理完毕并反馈结果<br/>复杂争议类问题48小时内给出解决方案</view>
<view class="h3">客诉分类处理方案</view>
<view class="p">支付异常类针对重复扣款支付成功未到账订单异常等情况经核实后立即原路全额退款或补发对应服务确保用户资金不受损失</view>
<view class="p">产品质量类若图纸生成错误内容缺失未达到服务标准优先为用户重新生成修改完善或补发保障用户正常使用</view>
<view class="p">服务争议类对已正常交付无质量问题的退款申请将依据订单记录交付凭证用户协议耐心解释沟通如确属特殊情况将在核实后按公司流程审慎处理</view>
<view class="p">恶意投诉类对已使用产品后恶意申请退款的行为将留存完整凭证按支付平台规则合理举证维护正常经营秩序</view>
<view class="h3">退款执行规范</view>
<view class="p">确需退款的场景一律按原支付渠道原路退回退款时限遵循支付平台规定不设置不合理门槛不拖延不拒付</view>
<view class="h3">长效管理机制</view>
<view class="p">我司将持续完善售前提示服务说明及售后流程主动降低投诉发生率积极配合支付平台监督管理妥善处理各类交易纠纷保障交易安全与用户体验</view>
</view>
</scroll-view>
</uv-modal>
</view>
</template>
<script setup>
import { ref } from 'vue';
const complaintModalRef = ref(null);
const openComplaintModal = () => {
complaintModalRef.value.open();
};
const closeComplaintModal = () => {
complaintModalRef.value.close();
};
const callService = () => {
uni.makePhoneCall({
phoneNumber: '13666500395'
});
};
</script>
<style lang="scss" scoped>
.floating-btn {
position: fixed;
right: 16px;
bottom: 120px;
/* #ifdef H5 */
bottom: 170px;
/* #endif */
width: 56px;
height: 56px;
background: linear-gradient(135deg, #3f70ff, #5c8aff);
border-radius: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: white;
box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
z-index: 999;
font-size: 12px;
.floating-text {
line-height: 1.2;
}
}
.complaint-content {
max-height: 60vh;
padding: 0 10px 10px;
.complaint-text {
font-size: 14px;
color: #333;
line-height: 1.6;
.h3 {
font-size: 15px;
font-weight: bold;
margin-top: 16px;
margin-bottom: 8px;
color: #111;
}
.p {
margin-bottom: 8px;
text-align: justify;
color: #666;
}
.phone-link {
color: #3f70ff;
text-decoration: underline;
display: inline-block;
padding: 0 4px;
}
}
}
</style>

@ -17,7 +17,7 @@
//pageshttps://uniapp.dcloud.io/collocation/pages //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"needLogin": true, "needLogin": false,
"style": { "style": {
"navigationBarTitleText": "电梯图纸生成平台", "navigationBarTitleText": "电梯图纸生成平台",
"enablePullDownRefresh":true "enablePullDownRefresh":true

@ -3,7 +3,7 @@
<!-- 顶部筛选标签 --> <!-- 顶部筛选标签 -->
<uv-sticky bgColor="#fff" :offsetTop="isWeChatH5 ? -50 : 0"> <uv-sticky bgColor="#fff" :offsetTop="isWeChatH5 ? -50 : 0">
<div class="tabBox"> <div class="tabBox">
<div class="tabItem" :class="{selected:active==='全部'}" @click="switchTab('全部')"></div> <div class="tabItem" :class="{selected:active==='全部'}" @click="switchTab('全部')"></div>
<div class="tabItem" :class="{selected:active==='生成'}" @click="switchTab('生成')"></div> <div class="tabItem" :class="{selected:active==='生成'}" @click="switchTab('生成')"></div>
<div class="tabItem" :class="{selected:active==='充值'}" @click="switchTab('充值')"></div> <div class="tabItem" :class="{selected:active==='充值'}" @click="switchTab('充值')"></div>
<div class="tabItem" :class="{selected:active==='会员'}" @click="switchTab('会员')"></div> <div class="tabItem" :class="{selected:active==='会员'}" @click="switchTab('会员')"></div>
@ -57,9 +57,11 @@
<view v-if="list.length === 0 && loadingStatus !== 'loading'" class="empty-state"> <view v-if="list.length === 0 && loadingStatus !== 'loading'" class="empty-state">
<u-icon name="file-text" size="60" color="#ccc"></u-icon> <u-icon name="file-text" size="60" color="#ccc"></u-icon>
<text class="empty-text">暂无消费记录</text> <text class="empty-text">暂无消费记录</text>
</view> </view>
<uv-load-more v-else :status="loadingStatus" /> <uv-load-more v-else :status="loadingStatus" />
<!-- 投诉与纠纷 -->
<ComplaintFooter />
</view> </view>
</template> </template>
@ -70,7 +72,7 @@
ref ref
} from "vue"; } from "vue";
import { import {
onShow, onShow,
onReachBottom onReachBottom
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import { import {
@ -78,19 +80,20 @@
useUserStore useUserStore
} from "@/store"; } from "@/store";
import HeaderCustom from "/components/HeaderCustom/HeaderCustom.vue"; import HeaderCustom from "/components/HeaderCustom/HeaderCustom.vue";
import RPC from "@/utils/request"; import ComplaintFooter from "/components/ComplaintFooter/ComplaintFooter.vue";
import dayjs from "dayjs"; import RPC from "@/utils/request";
import dayjs from "dayjs";
const isWeChatH5 = ref(false)
// #ifdef H5 const isWeChatH5 = ref(false)
if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { // #ifdef H5
isWeChatH5.value = true if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) {
} isWeChatH5.value = true
}
// #endif // #endif
const authStore = useAuthStore(); const authStore = useAuthStore();
const userStore = useUserStore(); const userStore = useUserStore();
const active = ref('全部') const active = ref('全部')
const list = ref([{ const list = ref([{
@ -134,64 +137,64 @@
type: "other", type: "other",
}, },
]); ]);
const switchTab = (tab) => { const switchTab = (tab) => {
list.value = [] list.value = []
active.value = tab active.value = tab
page.value = 1 page.value = 1
if(tab === '全部') { if(tab === '全部') {
typeParams.value = '' typeParams.value = ''
}else { }else {
typeParams.value = tab typeParams.value = tab
} }
getList() getList()
} }
const page = ref(1) const page = ref(1)
const typeParams = ref('') const typeParams = ref('')
const loadingStatus = ref('loadmore') const loadingStatus = ref('loadmore')
const count = ref(0); const count = ref(0);
// //
const getList = () => { const getList = () => {
uni.showLoading(); uni.showLoading();
RPC.post('/wallet/txns/list', { RPC.post('/wallet/txns/list', {
user_id: userStore.userInfo.id, user_id: userStore.userInfo.id,
page:page.value, page:page.value,
size:20, size:20,
type:typeParams.value type:typeParams.value
}).then(res => { }).then(res => {
list.value = [...list.value, ...res.list]; list.value = [...list.value, ...res.list];
count.value = res.total; count.value = res.total;
if (list.value.length >= count.value) { if (list.value.length >= count.value) {
loadingStatus.value = "nomore"; loadingStatus.value = "nomore";
} else { } else {
loadingStatus.value = "loadmore"; loadingStatus.value = "loadmore";
} }
}).catch(() => { }).catch(() => {
loadingStatus.value = "loadmore"; loadingStatus.value = "loadmore";
}).finally(() => { }).finally(() => {
uni.hideLoading(); uni.hideLoading();
}) })
} }
onMounted(() => { onMounted(() => {
}); });
onReachBottom(() => { onReachBottom(() => {
if (list.value.length >= count.value || loadingStatus.value === "loading") if (list.value.length >= count.value || loadingStatus.value === "loading")
return; return;
console.log("上拉加载:"); console.log("上拉加载:");
loadingStatus.value = "loading"; loadingStatus.value = "loading";
page.value = ++page.value; page.value = ++page.value;
getList(); getList();
}); });
onShow(() => { onShow(() => {
// //
list.value = [] list.value = []
page.value = 1 page.value = 1
active.value = '全部' active.value = '全部'
typeParams.value = '' typeParams.value = ''
getList(); getList();
}); });
@ -202,26 +205,26 @@
font-size: 14px; font-size: 14px;
min-height: 100vh; min-height: 100vh;
background-color: #f8f8f8; background-color: #f8f8f8;
} }
.tabBox { .tabBox {
height: 50px; height: 50px;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
.tabItem { .tabItem {
height: 100%; height: 100%;
font-weight: 600; font-weight: 600;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex: 1; flex: 1;
&.selected { &.selected {
color: #5479ED; color: #5479ED;
border-bottom: 1px solid #5479ED; border-bottom: 1px solid #5479ED;
} }
} }
} }
.consumption-list { .consumption-list {

@ -1,5 +1,17 @@
<template> <template>
<view class="container"> <view class="container" :class="{ 'logged-in': authStore.isLoggedIn }">
<!-- 服务价值展示 -->
<view class="service-intro">
<view class="intro-title">电梯图纸在线生成平台</view>
<view class="intro-subtitle">
专注电梯土建图电气原理图一键自动生成填写参数即可快速导出标准 PDF 图纸为工程设计现场施工提供高效出图服务登录即可使用完整出图功能
</view>
<view class="demo-btn" @click="viewDemo">
<text class="demo-icon">📄</text>
<text class="demo-text">查看演示图纸</text>
</view>
</view>
<!-- 顶部图片和标题 --> <!-- 顶部图片和标题 -->
<view class="header-section"> <view class="header-section">
<image <image
@ -18,8 +30,22 @@
<!-- 选择图纸模板 --> <!-- 选择图纸模板 -->
<view class="section"> <view class="section">
<view class="section-title">选择图纸模板</view> <view class="section-title">选择图纸模板</view>
<!-- 未登录提示 -->
<view v-if="!authStore.isLoggedIn" class="login-prompt">
<view class="prompt-icon">🔒</view>
<view class="prompt-text">请先登录以使用完整功能</view>
<uv-button
size="small"
@click="goToLogin"
text="立即登录"
color="#3F70FF"
customStyle="margin-top: 12px;"
></uv-button>
</view>
<uv-skeletons <uv-skeletons
v-if="loading" v-else-if="loading"
:loading="loading" :loading="loading"
:skeleton="[ :skeleton="[
{ {
@ -151,7 +177,7 @@
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="bottom-actions"> <view class="bottom-actions" v-if="authStore.isLoggedIn">
<uv-button <uv-button
:loading="generating" :loading="generating"
@click="modalRefOpen" @click="modalRefOpen"
@ -184,42 +210,10 @@
></uv-textarea> ></uv-textarea>
</view> </view>
</uv-modal> </uv-modal>
<!-- 悬浮窗 -->
<view class="floating-btn" @click="openComplaintModal">
<view class="floating-text">投诉与</view>
<view class="floating-text">纠纷</view>
</view>
<!-- 客户投诉与纠纷处理机制弹窗 -->
<uv-modal
ref="complaintModalRef"
title="客户投诉与纠纷处理机制说明"
confirmText="我知道了"
@confirm="closeComplaintModal"
>
<scroll-view scroll-y class="complaint-content">
<view class="complaint-text">
<view class="p">为规范平台交易秩序保障用户合法权益结合我司图纸生成电子图纸设计方案等虚拟数字类产品的业务特性特建立完善的客户投诉及纠纷处理机制具体如下</view>
<view class="h3">业务及退款规则说明</view>
<view class="p">我司提供的图纸生成服务为虚拟数字类产品具有可复制易传播交付即生效的属性产品一经生成并交付用户无法进行回收撤回或二次销售</view>
<view class="p">因此在产品正常交付内容符合约定无质量问题的情况下不支持无理由退款相关规则已在商品详情页订单页支付确认环节进行显著提示用户完成支付即视为已充分知晓并同意</view>
<view class="h3">投诉受理渠道</view>
<view class="p">用户可通过以下渠道提交投诉与售后申请确保问题及时反馈</view>
<view class="p">客服电话<text class="phone-link" @click="callService">13666500395</text></view>
<view class="h3">投诉响应时效</view>
<view class="p">收到用户投诉后工作日2小时内响应非工作日当天内响应<br/>一般投诉问题24小时内处理完毕并反馈结果<br/>复杂争议类问题48小时内给出解决方案</view>
<view class="h3">客诉分类处理方案</view>
<view class="p">支付异常类针对重复扣款支付成功未到账订单异常等情况经核实后立即原路全额退款或补发对应服务确保用户资金不受损失</view>
<view class="p">产品质量类若图纸生成错误内容缺失未达到服务标准优先为用户重新生成修改完善或补发保障用户正常使用</view>
<view class="p">服务争议类对已正常交付无质量问题的退款申请将依据订单记录交付凭证用户协议耐心解释沟通如确属特殊情况将在核实后按公司流程审慎处理</view>
<view class="p">恶意投诉类对已使用产品后恶意申请退款的行为将留存完整凭证按支付平台规则合理举证维护正常经营秩序</view>
<view class="h3">退款执行规范</view>
<view class="p">确需退款的场景一律按原支付渠道原路退回退款时限遵循支付平台规定不设置不合理门槛不拖延不拒付</view>
<view class="h3">长效管理机制</view>
<view class="p">我司将持续完善售前提示服务说明及售后流程主动降低投诉发生率积极配合支付平台监督管理妥善处理各类交易纠纷保障交易安全与用户体验</view>
</view>
</scroll-view>
</uv-modal>
<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker> <uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
<!-- 投诉与纠纷悬浮按钮 -->
<ComplaintFooter />
</view> </view>
</template> </template>
@ -235,7 +229,7 @@ import {
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import { useAuthStore, useUserStore } from "@/store"; import { useAuthStore, useUserStore } from "@/store";
import RPC from "@/utils/request"; import RPC from "@/utils/request";
import { usePermission } from "@/hooks/usePermission"; import ComplaintFooter from "@/components/ComplaintFooter/ComplaintFooter.vue";
import dayjs from 'dayjs' import dayjs from 'dayjs'
const authStore = useAuthStore(); const authStore = useAuthStore();
@ -248,17 +242,18 @@ const applyModalRef = ref(null);
const applyReason = ref(""); const applyReason = ref("");
const applyLoading = ref(false); const applyLoading = ref(false);
const complaintModalRef = ref(null); //
const openComplaintModal = () => { const viewDemo = () => {
complaintModalRef.value.open(); uni.previewImage({
}; urls: ['/static/imgs/demo.jpg'],
const closeComplaintModal = () => { current: 0
complaintModalRef.value.close(); });
}; };
const callService = () => { //
uni.makePhoneCall({ const goToLogin = () => {
phoneNumber: '13666500395' uni.navigateTo({
url: '/pages/login/login?redirect=' + encodeURIComponent('/pages/index/index')
}); });
}; };
@ -613,19 +608,28 @@ onShareTimeline((data) => {
onLoad(() => { onLoad(() => {
console.log("index-onLoad"); console.log("index-onLoad");
}); });
onShow(async () => { onShow(() => {
getList();
console.log("test page onShow"); console.log("test page onShow");
const hasPermission = await usePermission();
console.log(hasPermission ? "已登录" : "跳转登录"); // 使usePermission
// ... const isLoggedIn = authStore.isLoggedIn;
if (!hasPermission) { console.log(isLoggedIn ? "已登录" : "未登录");
authStore.signOut();
uni.$uv.route("/pages/login/login"); //
if (isLoggedIn) {
//
getList();
} else {
//
templateList.value = [];
currentTemplate.value = {};
} }
}); });
onPullDownRefresh(() => { onPullDownRefresh(() => {
getList(); //
if (authStore.isLoggedIn) {
getList();
}
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}); });
</script> </script>
@ -639,8 +643,57 @@ onPullDownRefresh(() => {
/* #ifdef H5 */ /* #ifdef H5 */
padding-bottom: 102px; padding-bottom: 102px;
/* H5环境下需要更多空间 (50px按钮 + 50px tabBar + 2px间距) */
/* #endif */ /* #endif */
&.logged-in {
padding-bottom: 102px;
/* #ifdef H5 */
padding-bottom: 152px;
/* #endif */
}
}
.service-intro {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 24px 20px;
color: white;
.intro-title {
font-size: 20px;
font-weight: bold;
margin-bottom: 12px;
text-align: center;
}
.intro-subtitle {
font-size: 13px;
line-height: 1.6;
margin-bottom: 16px;
opacity: 0.95;
text-align: justify;
}
.demo-btn {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.4);
border-radius: 20px;
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(10px);
.demo-icon {
font-size: 18px;
margin-right: 8px;
}
.demo-text {
font-size: 14px;
font-weight: 500;
}
}
} }
.header-section { .header-section {
@ -692,6 +745,22 @@ onPullDownRefresh(() => {
.status { .status {
margin-bottom: 20px; margin-bottom: 20px;
} }
.login-prompt {
text-align: center;
padding: 40px 20px;
.prompt-icon {
font-size: 48px;
margin-bottom: 12px;
}
.prompt-text {
font-size: 15px;
color: #666;
margin-bottom: 8px;
}
}
} }
.template-grid { .template-grid {
@ -742,7 +811,6 @@ onPullDownRefresh(() => {
.bottom-actions { .bottom-actions {
z-index: 999; z-index: 999;
position: fixed; position: fixed;
bottom: 0;
left: 0; left: 0;
background: #fff; background: #fff;
height: 50px; height: 50px;
@ -757,7 +825,7 @@ onPullDownRefresh(() => {
/* #ifdef H5 */ /* #ifdef H5 */
bottom: 50px; bottom: 50px;
/* H5环境下给tabBar留出空间 */ /* H5环境下给底部和tabBar留出空间 */
/* #endif */ /* #endif */
} }
@ -806,62 +874,6 @@ onPullDownRefresh(() => {
} }
} }
} }
.floating-btn {
position: fixed;
right: 16px;
bottom: 120px;
/* #ifdef H5 */
bottom: 170px;
/* #endif */
width: 56px;
height: 56px;
background: linear-gradient(135deg, #3f70ff, #5c8aff);
border-radius: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: white;
box-shadow: 0 4px 12px rgba(63, 112, 255, 0.4);
z-index: 99;
font-size: 12px;
.floating-text {
line-height: 1.2;
}
}
.complaint-content {
max-height: 60vh;
padding: 0 10px 10px;
.complaint-text {
font-size: 14px;
color: #333;
line-height: 1.6;
.h3 {
font-size: 15px;
font-weight: bold;
margin-top: 16px;
margin-bottom: 8px;
color: #111;
}
.p {
margin-bottom: 8px;
text-align: justify;
color: #666;
}
.phone-link {
color: #3f70ff;
text-decoration: underline;
display: inline-block;
padding: 0 4px;
}
}
}
</style> </style>
<style lang="scss"> <style lang="scss">

@ -89,6 +89,9 @@
href="weixin://dl/business/?appid=wxc504638e03981812&path=pages/login/login?from=h5ToWechat"> href="weixin://dl/business/?appid=wxc504638e03981812&path=pages/login/login?from=h5ToWechat">
打开小程序并登录 打开小程序并登录
</a> --> </a> -->
<!-- 投诉与纠纷悬浮按钮 -->
<ComplaintFooter />
</view> </view>
</template> </template>
@ -150,6 +153,8 @@
}); });
const ToLoginRef = ref(null) const ToLoginRef = ref(null)
import ComplaintFooter from "@/components/ComplaintFooter/ComplaintFooter.vue";
const tips = ref("获取验证码"); const tips = ref("获取验证码");
const codeChange = (text) => { const codeChange = (text) => {
@ -226,7 +231,7 @@
}); });
let redirect = HOME_PATH; let redirect = HOME_PATH;
onLoad((options) => { onLoad((options) => {
if (options.redirect && removeQueryString(options.redirect) !== LOGIN_PATH) { if (options.redirect && removeQueryString(options.redirect) !== LOGIN_PATH) {
if(decodeURIComponent(options.redirect) && decodeURIComponent(options.redirect) != 'undefined') if(decodeURIComponent(options.redirect) && decodeURIComponent(options.redirect) != 'undefined')
redirect = decodeURIComponent(options.redirect); redirect = decodeURIComponent(options.redirect);
} }
@ -569,19 +574,19 @@
const login = async () => { const login = async () => {
await form.value.validate(); await form.value.validate();
console.log(userInfo.value); console.log(userInfo.value);
if(userInfo.value.phone.startsWith('test-')) { if(userInfo.value.phone.startsWith('test-')) {
RPC.post('/login', { RPC.post('/login', {
username: userInfo.value.phone, username: userInfo.value.phone,
password: userInfo.value.password, password: userInfo.value.password,
}, { }, {
custom: { custom: {
loading: true, loading: true,
loadingText: '正在登录...' loadingText: '正在登录...'
}, },
}).then(res => { }).then(res => {
authStore.setAccessToken(res.token) authStore.setAccessToken(res.token)
RPC.post('/user/info', { RPC.post('/user/info', {
token: res.token, token: res.token,
}) })
@ -594,9 +599,9 @@
}) })
.finally(() => { .finally(() => {
loading.value = false loading.value = false
}) })
}) })
return return
} }
RPC.post('/login/phone', { RPC.post('/login/phone', {
phone: userInfo.value.phone, phone: userInfo.value.phone,

@ -170,6 +170,9 @@
退出登录 退出登录
</uv-button> </uv-button>
</view> --> </view> -->
<!-- 投诉与纠纷 -->
<ComplaintFooter />
</view> </view>
</template> </template>
@ -177,6 +180,7 @@
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { onShow, onPullDownRefresh } from "@dcloudio/uni-app"; import { onShow, onPullDownRefresh } from "@dcloudio/uni-app";
import HeaderCustom from "/components/HeaderCustom/HeaderCustom.vue"; import HeaderCustom from "/components/HeaderCustom/HeaderCustom.vue";
import ComplaintFooter from "/components/ComplaintFooter/ComplaintFooter.vue";
import { useAuthStore, useUserStore } from "@/store"; import { useAuthStore, useUserStore } from "@/store";
import RPC from "@/utils/request"; import RPC from "@/utils/request";
import dayjs from "dayjs"; import dayjs from "dayjs";
@ -354,11 +358,10 @@ const logout = () => {
font-size: 14px; font-size: 14px;
background: linear-gradient(180deg, #7b9cdb 0%, #f8f8f8 40%); background: linear-gradient(180deg, #7b9cdb 0%, #f8f8f8 40%);
min-height: 100vh; min-height: 100vh;
// padding-bottom: 120px;
/* #ifdef H5 */ /* #ifdef H5 */
// padding-bottom: 170px; padding-bottom: 50px;
/* H5环境下需要更多空间 (底部按钮高度 + tabBar高度 + 间距) */ /* H5环境下给tabBar留出空间 */
/* #endif */ /* #endif */
} }

@ -12,7 +12,7 @@
<view class="order-list"> <view class="order-list">
<view class="order-item" v-for="order in list" :key="order.id"> <view class="order-item" v-for="order in list" :key="order.id">
<!-- 订单头部 --> <!-- 订单头部 -->
<div class="order-title">智能电梯图纸生成平台</div> <div class="order-title">智能电梯图纸生成平台</div>
<view class="order-header"> <view class="order-header">
<view class="order-info"> <view class="order-info">
<text class="order-number">订单编号: {{ order.order_no }}</text> <text class="order-number">订单编号: {{ order.order_no }}</text>
@ -105,6 +105,9 @@
<text class="empty-text">暂无订单记录</text> <text class="empty-text">暂无订单记录</text>
</view> </view>
<uv-load-more v-else :status="loadingStatus" /> <uv-load-more v-else :status="loadingStatus" />
<!-- 投诉与纠纷 -->
<ComplaintFooter />
</view> </view>
</template> </template>
@ -123,6 +126,7 @@
useUserStore useUserStore
} from "@/store"; } from "@/store";
import HeaderCustom from '/components/HeaderCustom/HeaderCustom.vue' import HeaderCustom from '/components/HeaderCustom/HeaderCustom.vue'
import ComplaintFooter from '/components/ComplaintFooter/ComplaintFooter.vue'
import RPC from "@/utils/request"; import RPC from "@/utils/request";
import dayjs from "dayjs"; import dayjs from "dayjs";
@ -362,13 +366,13 @@
// //
let paymentResult; let paymentResult;
if (order.pay_channel === "wxpay") { if (order.pay_channel === "wxpay") {
// #ifdef H5 // #ifdef H5
uni.showToast({ uni.showToast({
icon:"none", icon:"none",
title:'请在小程序端使用微信支付' title:'请在小程序端使用微信支付'
}) })
return return
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
const res = await uni.login({ const res = await uni.login({
@ -391,13 +395,13 @@
}); });
console.log('orderResult', orderResult) console.log('orderResult', orderResult)
paymentResult = await wechatPay(orderResult); paymentResult = await wechatPay(orderResult);
} else if (order.pay_channel === "alipay") { } else if (order.pay_channel === "alipay") {
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
uni.showToast({ uni.showToast({
icon:"none", icon:"none",
title:'请在h5端使用支付宝支付' title:'请在h5端使用支付宝支付'
}) })
return return
// #endif // #endif
const orderResult = await RPC.post('/membership/order/pay_by_alipay', { const orderResult = await RPC.post('/membership/order/pay_by_alipay', {
order_no: order.order_no order_no: order.order_no
@ -561,10 +565,10 @@
background: white; background: white;
border-radius: 12px; border-radius: 12px;
margin-bottom: 16px; margin-bottom: 16px;
overflow: hidden; overflow: hidden;
.order-title { .order-title {
padding: 16px 16px 0; padding: 16px 16px 0;
} }
.order-header { .order-header {

@ -23,11 +23,11 @@
<!-- 状态标签 --> <!-- 状态标签 -->
<view class="status-tag" :class="{ <view class="status-tag" :class="{
completed: record.status == 4, completed: record.status == 4,
failed: record.status == 5, failed: record.status == 5,
waitting:record.status == 1 waitting:record.status == 1
}"> }">
<span v-if="record.status == 4"></span> <span v-if="record.status == 4"></span>
<span v-else-if="record.status == 5">生成失败</span> <span v-else-if="record.status == 5">生成失败</span>
<span v-else-if="record.status == 1">等待生成</span> <span v-else-if="record.status == 1">等待生成</span>
<span v-else></span> <span v-else></span>
</view> </view>
@ -72,6 +72,9 @@
</view> </view>
</view> </view>
</uv-modal> </uv-modal>
<!-- 投诉与纠纷 -->
<ComplaintFooter />
</view> </view>
</template> </template>
@ -80,6 +83,7 @@
ref, ref,
onMounted onMounted
} from "vue"; } from "vue";
import ComplaintFooter from "/components/ComplaintFooter/ComplaintFooter.vue";
import RPC from "@/utils/request"; import RPC from "@/utils/request";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { import {
@ -376,7 +380,7 @@
&.processing { &.processing {
background: #fff7e6; background: #fff7e6;
color: #fa8c16; color: #fa8c16;
} }
&.waitting { &.waitting {
background: #fff7e6; background: #fff7e6;
color: #4ad6f1; color: #4ad6f1;

@ -123,12 +123,16 @@
<text class="link" @click="showAgreement"></text> <text class="link" @click="showAgreement"></text>
</view> </view>
</view> </view>
<!-- 投诉与纠纷 -->
<ComplaintFooter />
</view> </view>
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app"; import { onLoad, onShow } from "@dcloudio/uni-app";
import ComplaintFooter from "/components/ComplaintFooter/ComplaintFooter.vue";
import { useAuthStore, useUserStore } from "@/store"; import { useAuthStore, useUserStore } from "@/store";
import RPC from "@/utils/request"; import RPC from "@/utils/request";

@ -66,26 +66,26 @@
</view> </view>
<uv-icon name="checkmark-circle-fill" :color="selectedPayment === 'alipay' ? '#4285f4' : '#ccc'" <uv-icon name="checkmark-circle-fill" :color="selectedPayment === 'alipay' ? '#4285f4' : '#ccc'"
size="20"></uv-icon> size="20"></uv-icon>
</view> </view>
<view <view
v-if="showAlipay" v-if="showAlipay"
class="payment-item" class="payment-item"
:class="{ active: selectedPayment === 'wxpay' }" :class="{ active: selectedPayment === 'wxpay' }"
@click="selectPayment('wxpay')" @click="selectPayment('wxpay')"
> >
<view class="payment-info"> <view class="payment-info">
<uv-icon name="weixin-fill" color="#07c160" size="24"></uv-icon> <uv-icon name="weixin-fill" color="#07c160" size="24"></uv-icon>
<view class="payment-details"> <view class="payment-details">
<view class="payment-name">微信支付</view> <view class="payment-name">微信支付</view>
<view class="payment-desc">推荐使用微信支付</view> <view class="payment-desc">推荐使用微信支付</view>
</view> </view>
</view> </view>
<uv-icon <uv-icon
name="checkmark-circle-fill" name="checkmark-circle-fill"
:color="selectedPayment === 'wxpay' ? '#ff3333' : '#ccc'" :color="selectedPayment === 'wxpay' ? '#ff3333' : '#ccc'"
size="20" size="20"
></uv-icon> ></uv-icon>
</view> </view>
</view> </view>
</view> </view>
@ -120,6 +120,9 @@
立即充值 立即充值
</uv-button> </uv-button>
</view> </view>
<!-- 投诉与纠纷 -->
<ComplaintFooter />
</view> </view>
</template> </template>
@ -132,6 +135,7 @@
import { import {
onShow onShow
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import ComplaintFooter from "/components/ComplaintFooter/ComplaintFooter.vue";
import { import {
useAuthStore, useAuthStore,
useUserStore useUserStore
@ -380,7 +384,7 @@
// //
let paymentResult; let paymentResult;
let orderResult = {}; let orderResult = {};
if (selectedPayment.value === 'wxpay') { if (selectedPayment.value === 'wxpay') {
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
const res = await uni.login({ const res = await uni.login({
provider: 'weixin' provider: 'weixin'
@ -389,14 +393,14 @@
code: res.code, code: res.code,
"order_no": orderNum.order_no "order_no": orderNum.order_no
}) })
// #endif // #endif
// #ifdef H5 // #ifdef H5
orderResult = await RPC.post("/membership/order/pay_by_wechat_h5", { orderResult = await RPC.post("/membership/order/pay_by_wechat_h5", {
order_no: orderNum.order_no, order_no: orderNum.order_no,
}); });
// #endif // #endif
uni.showLoading({ uni.showLoading({
title: "正在跳转微信支付...", title: "正在跳转微信支付...",
}); });
console.log('orderResult', orderResult) console.log('orderResult', orderResult)
paymentResult = await wechatPay(orderResult); paymentResult = await wechatPay(orderResult);
@ -443,7 +447,7 @@
} }
} catch (error) { } catch (error) {
uni.hideLoading(); uni.hideLoading();
console.log(error) console.log(error)
console.error('充值失败:', error); console.error('充值失败:', error);

@ -15,12 +15,17 @@ routes.forEach((item) => {
} }
}); });
// 调试:打印白名单
console.log("权限白名单:", whiteList);
/** /**
* 权限校验 * 权限校验
* @param {String} path * @param {String} path
* @returns * @returns
*/ */
export function hasPerm(path = "") { export function hasPerm(path = "") {
console.log("hasPerm检查路径:", path);
if (!isPathExists(path) && path !== '/') { if (!isPathExists(path) && path !== '/') {
uni.redirectTo({ uni.redirectTo({
url: ERROR404_PATH, url: ERROR404_PATH,
@ -28,11 +33,17 @@ export function hasPerm(path = "") {
return false; return false;
} }
const authStore = useAuthStore(); const authStore = useAuthStore();
const cleanPath = removeQueryString(path);
// 在白名单中或有token直接放行 // 在白名单中或有token直接放行
const hasPermission = const inWhiteList = whiteList.includes(cleanPath);
whiteList.includes(removeQueryString(path)) || authStore.isLoggedIn; const hasPermission = inWhiteList || authStore.isLoggedIn;
console.log("路径:", cleanPath, "在白名单:", inWhiteList, "已登录:", authStore.isLoggedIn, "有权限:", hasPermission);
if (!hasPermission) { if (!hasPermission) {
// 将用户的目标路径传递过去,这样可以实现用户登录之后,直接跳转到目标页面 // 将用户的目标路径传递过去,这样可以实现用户登录之后,直接跳转到目标页面
console.log("无权限,跳转登录页");
uni.redirectTo({ uni.redirectTo({
url: `${LOGIN_PATH}?redirect=${encodeURIComponent(path)}`, url: `${LOGIN_PATH}?redirect=${encodeURIComponent(path)}`,
}); });

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 KiB

@ -28,14 +28,14 @@ export default defineConfig(({ mode }) => {
proxy: { proxy: {
['/jsonrpc']: { ['/jsonrpc']: {
changeOrigin: true, changeOrigin: true,
target: 'https://lift-drawing-h5.ruixininfo.com', // target: 'https://lift-drawing-h5.ruixininfo.com',
// target: 'https://lift-h5.shulinelev.com', target: 'https://lift-h5.shulinelev.com',
// target: 'https://lift-drawing.ruixininfo.com', // target: 'https://lift-drawing.ruixininfo.com',
}, },
['/api/proxyDownload']: { ['/api/proxyDownload']: {
changeOrigin: true, changeOrigin: true,
target: 'https://lift-drawing-h5.ruixininfo.com', // target: 'https://lift-drawing-h5.ruixininfo.com',
// target: 'https://lift-h5.shulinelev.com', target: 'https://lift-h5.shulinelev.com',
// target: 'https://lift-drawing.ruixininfo.com', // target: 'https://lift-drawing.ruixininfo.com',
}, },
}, },

Loading…
Cancel
Save