路径和页面调整

This commit is contained in:
weiwei committed 2025-05-21 09:47:33 +08:00
1 parent 9b4614a5cc
commit c44b5b56d8
10 files changed
+192 -373

No files matched your search

+11 -16
View File
@@ -246,12 +246,19 @@
]
},
{
"root": "pages/test",
"root": "pages/user",
"pages": [
{
"path": "login",
"style": {
"navigationBarTitleText": "",
"navigationBarTitleText": "密码登录",
"disableScroll": true
}
},
{
"path": "userRole",
"style": {
"navigationBarTitleText": "用户身份",
"disableScroll": true
}
}
@@ -302,18 +309,6 @@
}
]
},
{
"root": "pages/user",
"pages": [
{
"path": "userRole",
"style": {
"navigationBarTitleText": "用户身份",
"disableScroll": true
}
}
]
},
{
"root": "pages/pay",
"pages": [
@@ -428,7 +423,7 @@
"root": "pages/integrated",
"pages": [
{
"path": "feedback/index",
"path": "feedback",
"style": {
"navigationBarTitleText": "意见反馈"
}
@@ -438,7 +433,7 @@
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "浦江小程序",
"navigationBarTitleText": "浦江智慧后勤h5",
"navigationBarBackgroundColor": "#1777FF",
"backgroundColor": "#ecf4f9",
"navigationStyle": "custom"
+151
View File
@@ -0,0 +1,151 @@
<template>
<view class="min-h-screen bg-white px-30rpx pb-30rpx">
<!-- 顶部导航 -->
<view class="flex items-center h-88rpx relative">
<view class="absolute left-0 h-88rpx flex items-center pr-20rpx" @tap="goBack">
<text class="text-36rpx text-gray-800">&lt;</text>
<text class="text-28rpx text-gray-800 ml-4rpx">返回</text>
</view>
<view class="flex-1 text-center text-34rpx font-500">问题反馈</view>
</view>
<!-- 问题分类 -->
<view class="mt-40rpx">
<view class="text-32rpx font-500 mb-24rpx">问题分类</view>
<view class="flex flex-wrap gap-24rpx">
<view
v-for="(item, index) in categories"
:key="index"
:class="[
'px-32rpx py-12rpx rounded-20rpx text-28rpx transition-colors duration-200',
selectedCategory === item ? 'bg-blue-200 text-blue-600' : 'bg-gray-100',
]"
@tap="selectedCategory = item"
>
{{ item }}
</view>
</view>
</view>
<!-- 详细描述 -->
<view class="mt-40rpx">
<view class="text-32rpx font-500 mb-24rpx">
详细描述
<text class="text-red-500 ml-8rpx">*</text>
</view>
<view class="w-full bg-gray-50 rounded-16rpx p-20rpx box-border">
<textarea
v-model="description"
placeholder="您在哪个页面,遇到了什么问题,详细描述有助于帮您快速解决"
placeholder-style="color: #999999;"
:maxlength="200"
class="w-full h-240rpx bg-gray-50 text-28rpx leading-40rpx p-0 box-border"
/>
<view class="text-right text-gray-400 text-24rpx mt-8rpx">{{ description.length }}/200</view>
</view>
</view>
<!-- 图片上传 -->
<view class="mt-40rpx">
<view class="text-32rpx font-500 mb-24rpx">上传图片 ({{ images.length }}/3)</view>
<view class="flex flex-wrap gap-24rpx">
<view v-for="(img, index) in images" :key="index" class="relative w-160rpx h-160rpx">
<image :src="img" mode="aspectFill" class="w-full h-full rounded-16rpx" />
<view
class="absolute -right-12rpx -top-12rpx w-40rpx h-40rpx bg-black bg-opacity-60 text-white rounded-full flex items-center justify-center active:bg-opacity-80"
@tap="deleteImage(index)"
>
×
</view>
</view>
<view
v-if="images.length < 3"
class="w-160rpx h-160rpx rounded-16rpx border border-dashed border-gray-200 flex items-center justify-center active:bg-gray-50"
@tap="handleUpload"
>
<view class="text-48rpx text-gray-400">+</view>
</view>
</view>
</view>
<!-- 联系方式 -->
<view class="mt-40rpx">
<view class="text-32rpx font-500 mb-24rpx">联系方式</view>
<view class="w-full bg-gray-50 rounded-16rpx px-20rpx box-border">
<input
v-model="contact"
placeholder="手机号/邮箱/微信号"
placeholder-style="color: #999999;"
class="w-full h-88rpx text-28rpx bg-gray-50"
/>
</view>
</view>
<!-- 邮箱联系我们 -->
<view class="mt-48rpx flex items-center justify-between text-28rpx">
<view class="text-gray-800">邮箱联系我们</view>
<view class="flex items-center gap-16rpx">
<text class="text-gray-600">user_service@36kr.com</text>
<view class="px-24rpx py-8rpx bg-gray-100 rounded-8rpx text-28rpx active:bg-gray-200" @tap="copyEmail"> 复制 </view>
</view>
</view>
<!-- 提交按钮 -->
<view
class="my-64rpx h-88rpx bg-blue-500 text-white rounded-20rpx flex items-center justify-center text-32rpx active:bg-blue-600 transition-colors duration-200"
@tap="handleSubmit"
>
提 交
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from "vue"
const categories = ["产品建议", "功能Bug", "内容订正", "其他"]
const selectedCategory = ref("产品建议")
const description = ref("")
const images = ref<string[]>([])
const contact = ref("")
const goBack = () => {
uni.navigateBack()
}
const handleUpload = () => {
uni.chooseImage({
count: 3 - images.value.length,
success: (res) => {
images.value = [...images.value, ...res.tempFilePaths]
},
})
}
const deleteImage = (index: number) => {
images.value.splice(index, 1)
}
const copyEmail = () => {
uni.setClipboardData({
data: "user_service@36kr.com",
success: () => {
uni.showToast({
title: "复制成功",
icon: "none",
})
},
})
}
const handleSubmit = () => {
if (!description.value) {
uni.showToast({
title: "请填写详细描述",
icon: "none",
})
return
}
// 实现提交逻辑
}
</script>
-337
View File
@@ -1,337 +0,0 @@
<template>
<view class="feedback-page">
<!-- 顶部导航 -->
<view class="header">
<view class="back-btn" @tap="goBack">
<text class="back-icon">&lt;</text>
<text class="back-text">返回</text>
</view>
<view class="title">其它问题</view>
</view>
<!-- 问题分类 -->
<view class="category-section">
<view class="section-title">问题分类</view>
<view class="category-list">
<view
v-for="(item, index) in categories"
:key="index"
:class="['category-item', { active: selectedCategory === item }]"
@tap="selectedCategory = item"
>
{{ item }}
</view>
</view>
</view>
<!-- 详细描述 -->
<view class="description-section">
<view class="section-title">
详细描述
<text class="required">*</text>
</view>
<view class="textarea-wrap">
<textarea
v-model="description"
placeholder="您在哪个页面,遇到了什么问题,详细描述有助于帮您快速解决"
placeholder-style="color: #999999;"
:maxlength="200"
class="feedback-textarea"
></textarea>
<view class="word-count">{{ description.length }}/200</view>
</view>
</view>
<!-- 图片上传 -->
<view class="upload-section">
<view class="section-title">上传图片 ({{ images.length }}/3)</view>
<view class="upload-area">
<view
v-for="(img, index) in images"
:key="index"
class="image-item"
>
<image :src="img" mode="aspectFill"/>
<view class="delete-btn" @tap="deleteImage(index)">×</view>
</view>
<view
v-if="images.length < 3"
class="upload-btn"
@tap="handleUpload"
>
<view class="plus">+</view>
</view>
</view>
</view>
<!-- 联系方式 -->
<!-- <view class="contact-section">-->
<!-- <view class="section-title">联系方式</view>-->
<!-- <view class="input-wrap">-->
<!-- <input -->
<!-- v-model="contact"-->
<!-- placeholder="手机号/邮箱/微信号"-->
<!-- placeholder-style="color: #999999;"-->
<!-- class="contact-input"-->
<!-- />-->
<!-- </view>-->
<!-- </view>-->
<!-- &lt;!&ndash; 邮箱联系 &ndash;&gt;-->
<!-- <view class="email-contact">-->
<!-- <view class="contact-text">联系我们</view>-->
<!-- <view class="email">-->
<!-- user_service@36kr.com-->
<!-- <view class="copy-btn" @tap="copyEmail">复制</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- 提交按钮 -->
<view class="submit-btn" @tap="handleSubmit">提交</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const categories = ['产品建议', '功能Bug', '内容订正', '其他']
const selectedCategory = ref('产品建议')
const description = ref('')
const images = ref([])
const contact = ref('')
const goBack = () => {
uni.navigateBack()
}
const handleUpload = () => {
uni.chooseImage({
count: 3 - images.value.length,
success: (res) => {
images.value = [...images.value, ...res.tempFilePaths]
}
})
}
const deleteImage = (index: number) => {
images.value.splice(index, 1)
}
const copyEmail = () => {
uni.setClipboardData({
data: 'user_service@36kr.com',
success: () => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
})
}
const handleSubmit = () => {
if (!description.value) {
uni.showToast({
title: '请填写详细描述',
icon: 'none'
})
return
}
// 实现提交逻辑
}
</script>
<style lang="scss" scoped>
.feedback-page {
padding: 0 30rpx;
min-height: 100vh;
background: #fff;
}
.header {
display: flex;
align-items: center;
height: 88rpx;
position: relative;
}
.back-btn {
position: absolute;
left: 0;
height: 88rpx;
display: flex;
align-items: center;
padding-right: 20rpx;
}
.back-icon {
font-size: 36rpx;
color: #333;
}
.back-text {
font-size: 28rpx;
color: #333;
margin-left: 4rpx;
}
.title {
flex: 1;
text-align: center;
font-size: 34rpx;
font-weight: 500;
}
.section-title {
margin: 40rpx 0 24rpx;
font-size: 32rpx;
font-weight: 500;
}
.required {
color: #ff4d4f;
margin-left: 8rpx;
}
.category-list {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.category-item {
padding: 12rpx 32rpx;
border-radius: 32rpx;
background: #f5f5f5;
font-size: 28rpx;
}
.category-item.active {
background: #e6f4ff;
color: #1677ff;
}
.textarea-wrap {
width: 100%;
background-color: #F8F8F8;
border-radius: 16rpx;
padding: 20rpx;
box-sizing: border-box;
}
.feedback-textarea {
width: 100%;
height: 240rpx;
background-color: #F8F8F8;
font-size: 28rpx;
line-height: 40rpx;
padding: 0;
box-sizing: border-box;
}
.word-count {
text-align: right;
color: #999;
font-size: 24rpx;
margin-top: 8rpx;
}
.upload-area {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.image-item, .upload-btn {
width: 160rpx;
height: 160rpx;
border-radius: 16rpx;
border: 1rpx dashed #e5e5e5;
position: relative;
}
.image-item image {
width: 100%;
height: 100%;
border-radius: 16rpx;
}
.upload-btn {
display: flex;
align-items: center;
justify-content: center;
}
.plus {
font-size: 48rpx;
color: #999;
}
.delete-btn {
position: absolute;
right: -12rpx;
top: -12rpx;
width: 40rpx;
height: 40rpx;
background: rgba(0, 0, 0, 0.6);
color: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.input-wrap {
width: 100%;
background-color: #F8F8F8;
border-radius: 16rpx;
padding: 0 20rpx;
box-sizing: border-box;
}
.contact-input {
width: 100%;
height: 88rpx;
font-size: 28rpx;
background-color: #F8F8F8;
}
.email-contact {
margin: 48rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
}
.email {
display: flex;
align-items: center;
gap: 16rpx;
}
.copy-btn {
padding: 8rpx 24rpx;
background: #f5f5f5;
border-radius: 8rpx;
font-size: 28rpx;
}
.submit-btn {
margin: 64rpx 0;
height: 88rpx;
background: #1677ff;
color: #fff;
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
}
/* 修改输入框的placeholder样式 */
::-webkit-input-placeholder {
color: #999999;
font-size: 28rpx;
}
</style>
+13 -8
View File
@@ -28,7 +28,7 @@
</view>
</tm-sheet>
<tm-button class="mt-1" :block="true" @click="disabled ? '' : handlePay()" :disabled="disabled">支付</tm-button>
<tm-button class="mt-1" :block="true" @click="disabled ? '' : handlePay()" :disabled="disabled">支 付</tm-button>
<numberKeyboard v-model="amount" />
</view>
@@ -38,15 +38,15 @@
<script setup lang="ts">
import { ref, computed, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { usePayStore } from "@/sheep/stores/pay"
import payApi from "@@/api/pay"
import { storePrice } from "@/sheep/utils/formatMoney"
import { router } from "@/sheep"
import { merchantApi, walletApi } from "@/sheep/api"
import numberKeyboard from "@/sheep/components/numberKeyboard.vue"
import { filePath } from "@/sheep/utils/file"
import { hooks } from "@@/index"
import { router } from "@/sheep"
import { filePath } from "@/sheep/utils/file"
import { storePrice } from "@/sheep/utils/formatMoney"
import { usePayStore } from "@/sheep/stores/pay"
import { isEmpty } from "radash"
import numberKeyboard from "@/sheep/components/numberKeyboard.vue"
const scanCodeData = reactive({
id: "",
@@ -69,8 +69,13 @@ onShow(async () => {
uni.showLoading({ title: "加载中...", mask: true })
if (scanCodeData.id) {
const { data } = await merchantApi.detail({ id: scanCodeData.id })
scanCodeData.name = data.name
disabled.value = false
if (data) {
scanCodeData.name = data.name
disabled.value = false
} else {
disabled.value = true
return uni.showToast({ title: "商户id错误", icon: "none" })
}
} else {
uni.showToast({ title: "参数不存在", icon: "none" })
disabled.value = true
+7 -3
View File
@@ -83,7 +83,6 @@ const state = reactive<{
// { text: "跨单位就餐", icon: "/static/icon/service_1.png", router: "/pages/apply/stride-list" },
{ text: "人脸管理", icon: "/static/icon/service_5.png", router: "/pages/human-face/list" },
{ text: "清除缓存", icon: "/static/icon/clear-storage.png", router: "" },
// { text: "意见反馈", icon: "/static/icon/service_5.png", router: "/pages/integrated/feedback/index" },
],
appInfo: "",
})
@@ -366,7 +365,7 @@ const scanCode = {
},
}
const onTabLogin = () => (isDevEnv() ? router.jump("/pages/test/login") : login.checkAppInfo())
const onTabLogin = () => (isDevEnv() ? router.jump("/pages/user/login") : login.checkAppInfo())
const onTabMenu = async (item: any, index: number) => {
const isLogin = await hooks.useCheckLogin()
@@ -400,13 +399,18 @@ const initMenuConfig = () => {
state.menuList.push({
text: "测试-登录",
icon: "/static/icon/login.png",
router: "/pages/test/login",
router: "/pages/user/login",
})
state.menuList.push({
text: "测试-角色选择",
icon: "/static/icon/login.png",
router: "/pages/user/userRole",
})
state.menuList.push({
text: "测试-意见反馈",
icon: "/static/icon/service_5.png",
router: "/pages/integrated/feedback",
})
}
}
File renamed without changes.
+2 -2
View File
@@ -7,7 +7,7 @@ import { hooks, router } from "@@/index"
import { walletApi } from "@@/api"
import { filePath } from "@@/utils/file"
import { useTransferMoney } from "@/sheep/stores/transferMoney"
import { usePayStore } from "@/sheep/stores/pay"
const state = reactive<any>({
showBindDialog: false,
@@ -129,7 +129,7 @@ const doFreeze = async () => {
// 转账
const doTransferMoney = (v: any) => {
if (v.walletTypeId) {
useTransferMoney().setSourceWalletType(v)
usePayStore().setSourceWalletData(v)
router.jump("/pages/pay/transferMoney")
return
}
+1 -1
View File
@@ -41,7 +41,7 @@ export const useCheckLogin = async (): Promise<boolean> => {
confirmText: "去登录",
success: async (res) => {
if (res.confirm) {
jump("/pages/test/login", {}, 3)
jump("/pages/user/login", {}, 3)
return
}
if (!res.confirm) {
-5
View File
@@ -1,8 +1,3 @@
// https://pinia.vuejs.org/
import { createPinia } from "pinia"
// 创建
const pinia = createPinia()
// 导出
export default pinia
+7 -1
View File
@@ -1,14 +1,20 @@
import { defineStore } from "pinia"
export const usePayStore = defineStore("pay", {
state: (): { payData: { id?: string; name?: string; customPrice?: number } } => {
state: (): { payData: { id?: string; name?: string; customPrice?: number }; sourceWalletData: any } => {
return {
payData: {},
sourceWalletData: {},
}
},
actions: {
// 支付
setPayData(data: any) {
this.payData = data
},
// 转账
setSourceWalletData(data: any) {
this.sourceWalletData = data
},
},
})