feat:问题反馈页
This commit is contained in:
1 parent
46ba18a899
commit
2d4e7db772
5 files changed
+78
-1
No files matched your search
@@ -29,6 +29,7 @@ export function createApp() {
|
||||
const i18n = createI18n({
|
||||
// 使用localStorage存储语言状态是为了保证页面刷新之后还是保持原来选择的语言状态
|
||||
locale: getItem('lang') ? getItem('lang') : 'zh-CN', // 定义默认语言为中文
|
||||
// allowComposition: true,
|
||||
messages: {
|
||||
'zh-CN': zhCNLang,
|
||||
'zh-TW': zhTWLang,
|
||||
|
||||
@@ -237,6 +237,13 @@
|
||||
"navigationBarTitleText": "开通VIP",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "feedback",
|
||||
"style": {
|
||||
"navigationBarTitleText": "问题反馈",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<wd-config-provider theme="dark" :theme-vars="themeVars">
|
||||
<wd-navbar title="发布动态" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
<view class="text-base mx-4 my-2">问题描述</view>
|
||||
<view class="mx-4 rounded-3">
|
||||
<wd-textarea v-model="params.content" :maxlength="1000" clearable show-word-limit />
|
||||
</view>
|
||||
<view class="text-base mx-4 my-2">图片</view>
|
||||
<view class="px-4">
|
||||
<s-uploader v-model:url="params.pic" fileMediatype="image" limit="1" mode="grid" />
|
||||
</view>
|
||||
<view
|
||||
v-if="!isSubmit"
|
||||
class="mt-80rpx w-1/3 mx-auto rounded-full bg-color-theme-dark text-base text-center py-2 active:bg-color-theme"
|
||||
@click="submitFeedback"
|
||||
>
|
||||
提交反馈
|
||||
</view>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { reactive, ref } from 'vue';
|
||||
|
||||
const themeVars = reactive({
|
||||
darkBackground2: '#333',
|
||||
});
|
||||
|
||||
const params = reactive({
|
||||
content: '',
|
||||
pic: '',
|
||||
});
|
||||
const isSubmit = ref(false);
|
||||
|
||||
const submitFeedback = async () => {
|
||||
if (!params.content || !params.pic)
|
||||
return uni.showToast({ title: '请填写内容', icon: 'error' });
|
||||
await RecentApi.feedback(params);
|
||||
uni.showToast({ title: '提交成功', icon: 'success' });
|
||||
isSubmit.value = true;
|
||||
};
|
||||
</script>
|
||||
@@ -194,6 +194,13 @@
|
||||
curtainShow.value = true;
|
||||
};
|
||||
|
||||
// 问题反馈
|
||||
const goFeedback = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/feedback',
|
||||
});
|
||||
};
|
||||
|
||||
// 退出登录
|
||||
const handleLogout = () => {
|
||||
message
|
||||
@@ -215,7 +222,7 @@
|
||||
{ title: '认证中心', value: '', icon: 'user', to: '' },
|
||||
{ title: '我的动态√', value: '', icon: 'star', to: '/pages/profile/my-moment' },
|
||||
{ title: '我的评价√', value: '', icon: 'view-module', to: '', click: lookMyEvaluation },
|
||||
{ title: '问题反馈', value: '', icon: 'backtop-rectangle', to: '' },
|
||||
{ title: '问题反馈√', value: '', icon: 'backtop-rectangle', to: '', click: goFeedback },
|
||||
{ title: '客服助手', value: '', icon: 'service', to: '' },
|
||||
{ title: '关注公众号√', value: '获取最新消息', icon: 'qrcode', to: '', click: subOfficial },
|
||||
{ title: '设置', value: '', icon: 'setting1', to: '' },
|
||||
|
||||
@@ -167,6 +167,18 @@ const RecentApi = {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 提交反馈
|
||||
feedback: (data: any) => {
|
||||
return request({
|
||||
url: '/member/feedback/create',
|
||||
method: 'POST',
|
||||
data,
|
||||
custom: {
|
||||
showLoading: true,
|
||||
loadingMsg: '提交中',
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default RecentApi;
|
||||
Reference in new issue
Block a user