合并初始化
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<view class="error-page">
|
||||
<s-empty
|
||||
v-if="errCode === 'NetworkError'"
|
||||
icon="/static/internet-empty.png"
|
||||
text="网络连接失败"
|
||||
showAction
|
||||
actionText="重新连接"
|
||||
@clickAction="onReconnect"
|
||||
buttonColor="#ff3000"
|
||||
></s-empty>
|
||||
<s-empty
|
||||
v-else-if="errCode === 'TemplateError'"
|
||||
icon="/static/internet-empty.png"
|
||||
text="未找到模板"
|
||||
showAction
|
||||
actionText="重新加载"
|
||||
@clickAction="onReconnect"
|
||||
buttonColor="#ff3000"
|
||||
></s-empty>
|
||||
<s-empty
|
||||
v-else-if="errCode !== ''"
|
||||
icon="/static/internet-empty.png"
|
||||
:text="errMsg"
|
||||
showAction
|
||||
actionText="重新加载"
|
||||
@clickAction="onReconnect"
|
||||
buttonColor="#ff3000"
|
||||
></s-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref } from 'vue';
|
||||
import { ShoproInit } from '@/sheep';
|
||||
|
||||
const errCode = ref('');
|
||||
const errMsg = ref('');
|
||||
onLoad((options) => {
|
||||
errCode.value = options.errCode;
|
||||
errMsg.value = options.errMsg;
|
||||
});
|
||||
// 重新连接
|
||||
async function onReconnect() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
});
|
||||
ShoproInit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.error-page {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<s-layout class="set-wrap" title="常见问题" :bgStyle="{ color: '#FFF' }">
|
||||
<uni-collapse>
|
||||
<uni-collapse-item v-for="(item, index) in state.list" :key="item">
|
||||
<template v-slot:title>
|
||||
<view class="ss-flex ss-col-center header">
|
||||
<view class="ss-m-l-20 ss-m-r-20 icon">
|
||||
<view class="rectangle">
|
||||
<view class="num ss-flex ss-row-center ss-col-center">
|
||||
{{ index + 1 < 10 ? '0' + (index + 1) : index + 1 }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="triangle"> </view>
|
||||
</view>
|
||||
<view class="title ss-m-t-36 ss-m-b-36">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="content ss-p-l-78 ss-p-r-40 ss-p-b-50 ss-p-t-20">
|
||||
<text class="text">{{ item.content }}</text>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
<s-empty
|
||||
v-if="state.list.length === 0 && !state.loading"
|
||||
text="暂无常见问题"
|
||||
icon="/static/collect-empty.png"
|
||||
/>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { reactive } from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
|
||||
const state = reactive({
|
||||
list: [],
|
||||
loading: true,
|
||||
});
|
||||
|
||||
async function getFaqList() {
|
||||
const { error, data } = await sheep.$api.data.faq();
|
||||
if (error === 0) {
|
||||
state.list = data;
|
||||
state.loading = false;
|
||||
}
|
||||
}
|
||||
onLoad(() => {
|
||||
getFaqList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header {
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 30rpx;
|
||||
max-width: 688rpx;
|
||||
}
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
.rectangle {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 40rpx;
|
||||
height: 36rpx;
|
||||
background: var(--ui-BG-Main);
|
||||
border-radius: 4px;
|
||||
|
||||
.num {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: var(--ui-BG);
|
||||
line-height: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.triangle {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 4rpx solid transparent;
|
||||
border-right: 4rpx solid transparent;
|
||||
border-top: 8rpx solid var(--ui-BG-Main);
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
bottom: -4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
border-bottom: 1rpx solid #dfdfdf;
|
||||
|
||||
.text {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<s-layout class="set-wrap" title="问题反馈">
|
||||
<uni-forms ref="form" :modelValue="state.formData" border>
|
||||
<view class="bg-white type-box ss-p-x-20 ss-p-y-30">
|
||||
<view class="title ss-m-b-44">请选择类型</view>
|
||||
<view class="ss-m-l-12">
|
||||
<radio-group @change="radioChange">
|
||||
<label
|
||||
class="ss-flex ss-col-center ss-m-b-40"
|
||||
v-for="item in state.radioList"
|
||||
:key="item.type"
|
||||
>
|
||||
<radio :value="item.type" color="var(--ui-BG-Main)" style="transform: scale(0.8)" />
|
||||
<view class="radio-subtitle">{{ item.type }}</view>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white ss-p-x-20 ss-p-y-30 ss-m-t-20">
|
||||
<view class="title ss-m-b-30"> 相关描述 </view>
|
||||
<view class="textarea">
|
||||
<uni-easyinput
|
||||
:inputBorder="false"
|
||||
type="textarea"
|
||||
v-model="state.formData.content"
|
||||
placeholderStyle="color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
|
||||
placeholder="客官~请描述您遇到的问题,建议上传照片"
|
||||
clearable
|
||||
></uni-easyinput>
|
||||
<s-uploader
|
||||
v-model:url="state.formData.images"
|
||||
fileMediatype="image"
|
||||
limit="9"
|
||||
mode="grid"
|
||||
:imageStyles="{ width: '168rpx', height: '168rpx' }"
|
||||
></s-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white ss-p-x-20 ss-p-y-30 ss-m-t-20">
|
||||
<view class="title ss-m-b-30"> 联系方式 </view>
|
||||
<view class="mobile-box">
|
||||
<uni-easyinput
|
||||
:inputBorder="false"
|
||||
type="number"
|
||||
v-model="state.formData.phone"
|
||||
paddingLeft="10"
|
||||
placeholder="请输入您的联系电话"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms>
|
||||
<su-fixed bottom placeholder>
|
||||
<view class="ss-flex ss-row-between ss-p-x-30 ss-p-y-10">
|
||||
<button class="kefu-btn ss-reset-button" @tap="sheep.$router.go('/pages/chat/index')">
|
||||
联系客服
|
||||
</button>
|
||||
<button class="submit-btn ss-reset-button ui-BG-Main ui-Shadow-Main" @tap="onSubmit">
|
||||
提交
|
||||
</button>
|
||||
</view>
|
||||
</su-fixed>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { computed, reactive, ref, unref } from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
|
||||
const filesRef = ref(null);
|
||||
const state = reactive({
|
||||
radioList: [
|
||||
{
|
||||
type: '产品功能问题反馈',
|
||||
},
|
||||
{
|
||||
type: '建议及意见反馈',
|
||||
},
|
||||
{
|
||||
type: '投诉客服其他问题',
|
||||
},
|
||||
],
|
||||
formData: {
|
||||
content: '',
|
||||
phone: '',
|
||||
images: [],
|
||||
type: '',
|
||||
},
|
||||
imageFiles: [],
|
||||
current: 0,
|
||||
});
|
||||
|
||||
async function onSubmit() {
|
||||
if (!state.formData.type) {
|
||||
sheep.$helper.toast('请选择类型');
|
||||
return;
|
||||
}
|
||||
if (!state.formData.content) {
|
||||
sheep.$helper.toast('请描述您遇到的问题');
|
||||
return;
|
||||
}
|
||||
if (!state.formData.phone) {
|
||||
sheep.$helper.toast('请输入您的联系方式');
|
||||
return;
|
||||
}
|
||||
|
||||
const { error } = await sheep.$api.app.feedback(state.formData);
|
||||
if (error === 0) {
|
||||
sheep.$router.back();
|
||||
}
|
||||
}
|
||||
|
||||
function radioChange(e) {
|
||||
state.formData.type = e.detail.value;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.type-box {
|
||||
border-top: 2rpx solid #f9fafb;
|
||||
}
|
||||
|
||||
.uni-forms {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
:deep() {
|
||||
.uni-easyinput__placeholder-class {
|
||||
color: #bbbbbb !important;
|
||||
font-size: 28rpx !important;
|
||||
font-weight: 400 !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
|
||||
.uni-forms-item__label .label-text {
|
||||
font-size: 28rpx !important;
|
||||
color: #333333 !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
|
||||
.uni-list-item__content-title {
|
||||
font-size: 28rpx !important;
|
||||
color: #333333 !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
|
||||
.uni-easyinput__content-textarea {
|
||||
font-size: 28rpx !important;
|
||||
color: #333333 !important;
|
||||
line-height: normal !important;
|
||||
margin-top: 4rpx !important;
|
||||
padding-left: 20rpx !important;
|
||||
}
|
||||
|
||||
.uni-icons {
|
||||
font-size: 40rpx !important;
|
||||
}
|
||||
|
||||
.icon-del-box {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
||||
.icon-del {
|
||||
width: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.radio-subtitle {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
|
||||
.textarea {
|
||||
min-height: 322rpx;
|
||||
background: #f9fafb;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
margin: 30rpx 20rpx 46rpx 0;
|
||||
|
||||
.area {
|
||||
height: 238rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 50rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pl-style {
|
||||
font-size: 24rpx;
|
||||
color: #b1b3c7;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-box {
|
||||
background: #f9fafb;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
width: 334rpx;
|
||||
height: 74rpx;
|
||||
border-radius: 37rpx;
|
||||
}
|
||||
|
||||
.kefu-btn {
|
||||
width: 334rpx;
|
||||
height: 74rpx;
|
||||
border-radius: 37rpx;
|
||||
background: #eeeeee;
|
||||
color: #333333;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<s-layout class="set-wrap" :title="state.title" :bgStyle="{ color: '#FFF' }">
|
||||
<view class="ss-p-30"><mp-html class="richtext" :content="state.content"></mp-html></view>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { reactive } from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
|
||||
const state = reactive({
|
||||
title: '',
|
||||
content: '',
|
||||
});
|
||||
|
||||
async function getRichTextContent(id) {
|
||||
const { error, data } = await sheep.$api.data.richtext(id);
|
||||
if (error === 0) {
|
||||
state.content = data.content;
|
||||
if (state.title === '') {
|
||||
state.title = data.title;
|
||||
uni.setNavigationBarTitle({
|
||||
title: state.title,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
onLoad((options) => {
|
||||
if (options.title) {
|
||||
state.title = options.title;
|
||||
uni.setNavigationBarTitle({
|
||||
title: state.title,
|
||||
});
|
||||
}
|
||||
getRichTextContent(options.id);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.set-title {
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
|
||||
.richtext {
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<s-layout class="set-wrap" title="系统设置" :bgStyle="{ color: '#fff' }">
|
||||
<view class="header-box ss-flex-col ss-row-center ss-col-center">
|
||||
<image
|
||||
class="logo-img ss-m-b-46"
|
||||
:src="sheep.$url.cdn(appInfo.logo)"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<view class="name ss-m-b-24">{{ appInfo.name }}</view>
|
||||
</view>
|
||||
|
||||
<view class="container-list">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item
|
||||
title="当前版本"
|
||||
:rightText="appInfo.version"
|
||||
showArrow
|
||||
clickable
|
||||
:border="false"
|
||||
class="list-border"
|
||||
@tap="onCheckUpdate"
|
||||
></uni-list-item>
|
||||
<uni-list-item
|
||||
title="本地缓存"
|
||||
:rightText="storageSize"
|
||||
showArrow
|
||||
:border="false"
|
||||
class="list-border"
|
||||
></uni-list-item>
|
||||
<uni-list-item
|
||||
title="意见反馈"
|
||||
showArrow
|
||||
clickable
|
||||
:border="false"
|
||||
class="list-border"
|
||||
@tap="sheep.$router.go('/pages/public/feedback')"
|
||||
></uni-list-item>
|
||||
<uni-list-item
|
||||
title="关于我们"
|
||||
showArrow
|
||||
clickable
|
||||
:border="false"
|
||||
class="list-border"
|
||||
@tap="
|
||||
sheep.$router.go('/pages/public/richtext', {
|
||||
id: appInfo.about_us.id,
|
||||
title: appInfo.about_us.title,
|
||||
})
|
||||
"
|
||||
></uni-list-item>
|
||||
<!-- 为了过审 只有iOS-App有注销账号功能 -->
|
||||
<uni-list-item
|
||||
v-if="isLogin && sheep.$platform.os === 'ios' && sheep.$platform.name === 'App'"
|
||||
title="注销账号"
|
||||
rightText=""
|
||||
showArrow
|
||||
clickable
|
||||
:border="false"
|
||||
class="list-border"
|
||||
@click="onLogoff"
|
||||
></uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
|
||||
<view class="set-footer ss-flex-col ss-row-center ss-col-center">
|
||||
<view class="agreement-box ss-flex ss-col-center ss-m-b-40">
|
||||
<view class="ss-flex ss-col-center ss-m-b-10">
|
||||
<view
|
||||
class="tcp-text"
|
||||
@tap="
|
||||
sheep.$router.go('/pages/public/richtext', {
|
||||
id: appInfo.user_protocol.id,
|
||||
title: appInfo.user_protocol.title,
|
||||
})
|
||||
"
|
||||
>
|
||||
《{{ appInfo.user_protocol.title }}》
|
||||
</view>
|
||||
<view class="agreement-text">与</view>
|
||||
<view
|
||||
class="tcp-text"
|
||||
@tap="
|
||||
sheep.$router.go('/pages/public/richtext', {
|
||||
id: appInfo.privacy_protocol.id,
|
||||
title: appInfo.privacy_protocol.title,
|
||||
})
|
||||
"
|
||||
>
|
||||
《{{ appInfo.privacy_protocol.title }}》
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="copyright-text ss-m-b-10">{{ appInfo.copyright }}</view>
|
||||
<view class="copyright-text">{{ appInfo.copytime }}</view>
|
||||
</view>
|
||||
<su-fixed bottom placeholder>
|
||||
<view class="ss-p-x-20 ss-p-b-40">
|
||||
<button
|
||||
class="loginout-btn ss-reset-button ui-BG-Main ui-Shadow-Main"
|
||||
@tap="onLogout"
|
||||
v-if="isLogin"
|
||||
>
|
||||
退出登录
|
||||
</button>
|
||||
</view>
|
||||
</su-fixed>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sheep from '@/sheep';
|
||||
import { computed, reactive } from 'vue';
|
||||
|
||||
const appInfo = computed(() => sheep.$store('app').info);
|
||||
const isLogin = computed(() => sheep.$store('user').isLogin);
|
||||
const storageSize = uni.getStorageInfoSync().currentSize + 'Kb';
|
||||
const state = reactive({
|
||||
showModal: false,
|
||||
});
|
||||
|
||||
function onCheckUpdate() {
|
||||
sheep.$platform.checkUpdate();
|
||||
// 小程序初始化时已检查更新
|
||||
// H5实时更新无需检查
|
||||
// App 1.跳转应用市场更新 2.手动热更新 3.整包更新
|
||||
}
|
||||
function onLogoff() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认注销账号?',
|
||||
success: async function (res) {
|
||||
if (res.confirm) {
|
||||
const { error } = await sheep.$api.user.logoff();
|
||||
if (error === 0) {
|
||||
sheep.$store('user').logout();
|
||||
sheep.$router.go('/pages/index/user');
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function onLogout() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认退出账号?',
|
||||
success: async function (res) {
|
||||
if (res.confirm) {
|
||||
const result = await sheep.$store('user').logout();
|
||||
if (result) {
|
||||
sheep.$router.go('/pages/index/user');
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container-list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.set-title {
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
|
||||
.header-box {
|
||||
padding: 100rpx 0;
|
||||
|
||||
.logo-img {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 42rpx;
|
||||
font-weight: 400;
|
||||
color: $dark-3;
|
||||
}
|
||||
|
||||
.version {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
color: $gray-b;
|
||||
}
|
||||
}
|
||||
|
||||
.set-footer {
|
||||
margin: 100rpx 0 0 0;
|
||||
|
||||
.copyright-text {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: $gray-c;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
||||
.agreement-box {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
|
||||
.tcp-text {
|
||||
color: var(--ui-BG-Main);
|
||||
}
|
||||
|
||||
.agreement-text {
|
||||
color: $dark-9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loginout-btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.list-border {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
border-bottom: 2rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
:deep(.uni-list-item__content-title) {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
:deep(.uni-list-item__extra-text) {
|
||||
color: #bbbbbb;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<view><web-view :src="url"></web-view></view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const url = ref('');
|
||||
onLoad((options) => {
|
||||
url.value = decodeURIComponent(options.url);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user