✨ 关于我们:接入 100%
parent
6a19833044
commit
1bd12a1a3b
|
@ -1,31 +1,37 @@
|
||||||
|
<!-- 文章展示 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout class="set-wrap" :title="state.title" :bgStyle="{ color: '#FFF' }">
|
<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>
|
<view class="ss-p-30">
|
||||||
|
<mp-html class="richtext" :content="state.content" />
|
||||||
|
</view>
|
||||||
</s-layout>
|
</s-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import sheep from '@/sheep';
|
import ArticleApi from '@/sheep/api/promotion/article';
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
title: '',
|
title: '',
|
||||||
content: '',
|
content: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getRichTextContent(id) {
|
async function getRichTextContent(id, title) {
|
||||||
const { error, data } = await sheep.$api.data.richtext(id);
|
const { code, data } = await ArticleApi.getArticle(id, title);
|
||||||
if (error === 0) {
|
if (code !== 0) {
|
||||||
state.content = data.content;
|
return;
|
||||||
if (state.title === '') {
|
}
|
||||||
state.title = data.title;
|
state.content = data.content;
|
||||||
uni.setNavigationBarTitle({
|
// 标题不一致时,修改标题
|
||||||
title: state.title,
|
if (state.title !== data.title) {
|
||||||
});
|
state.title = data.title;
|
||||||
}
|
uni.setNavigationBarTitle({
|
||||||
|
title: state.title,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
if (options.title) {
|
if (options.title) {
|
||||||
state.title = options.title;
|
state.title = options.title;
|
||||||
|
@ -33,8 +39,9 @@
|
||||||
title: state.title,
|
title: state.title,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getRichTextContent(options.id);
|
getRichTextContent(options.id, options.title);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
:border="false"
|
:border="false"
|
||||||
class="list-border"
|
class="list-border"
|
||||||
/>
|
/>
|
||||||
<!-- TODO 芋艿:统一的配置界面 -->
|
|
||||||
<uni-list-item
|
<uni-list-item
|
||||||
title="关于我们"
|
title="关于我们"
|
||||||
showArrow
|
showArrow
|
||||||
|
@ -36,8 +35,7 @@
|
||||||
class="list-border"
|
class="list-border"
|
||||||
@tap="
|
@tap="
|
||||||
sheep.$router.go('/pages/public/richtext', {
|
sheep.$router.go('/pages/public/richtext', {
|
||||||
id: appInfo.about_us.id,
|
title: '关于我们'
|
||||||
title: appInfo.about_us.title,
|
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
@ -62,24 +60,22 @@
|
||||||
class="tcp-text"
|
class="tcp-text"
|
||||||
@tap="
|
@tap="
|
||||||
sheep.$router.go('/pages/public/richtext', {
|
sheep.$router.go('/pages/public/richtext', {
|
||||||
id: appInfo.user_protocol.id,
|
title: '用户协议'
|
||||||
title: appInfo.user_protocol.title,
|
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
《{{ appInfo.user_protocol.title }}》
|
《用户协议》
|
||||||
</view>
|
</view>
|
||||||
<view class="agreement-text">与</view>
|
<view class="agreement-text">与</view>
|
||||||
<view
|
<view
|
||||||
class="tcp-text"
|
class="tcp-text"
|
||||||
@tap="
|
@tap="
|
||||||
sheep.$router.go('/pages/public/richtext', {
|
sheep.$router.go('/pages/public/richtext', {
|
||||||
id: appInfo.privacy_protocol.id,
|
title: '隐私协议'
|
||||||
title: appInfo.privacy_protocol.title,
|
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
《{{ appInfo.privacy_protocol.title }}》
|
《隐私协议》
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -2,24 +2,9 @@ import request from '@/sheep/request';
|
||||||
import request2 from '@/sheep/request2';
|
import request2 from '@/sheep/request2';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
area: () =>
|
|
||||||
request2({
|
|
||||||
url: 'system/area/tree',
|
|
||||||
method: 'GET',
|
|
||||||
}),
|
|
||||||
// area: () =>
|
|
||||||
// request({
|
|
||||||
// url: 'data/area',
|
|
||||||
// method: 'GET',
|
|
||||||
// }),
|
|
||||||
faq: () =>
|
faq: () =>
|
||||||
request({
|
request({
|
||||||
url: 'data/faq',
|
url: 'data/faq',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
}),
|
}),
|
||||||
richtext: (id) =>
|
|
||||||
request({
|
|
||||||
url: 'data/richtext/' + id,
|
|
||||||
method: 'GET',
|
|
||||||
}),
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,11 +2,11 @@ import request from '@/sheep/request';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// 获得文章详情
|
// 获得文章详情
|
||||||
getArticle: (id) => {
|
getArticle: (id, title) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/app-api/promotion/article/get',
|
url: '/app-api/promotion/article/get',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: { id }
|
params: { id, title }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,18 +81,12 @@
|
||||||
/>
|
/>
|
||||||
<view class="agreement-text ss-flex ss-col-center ss-m-l-8">
|
<view class="agreement-text ss-flex ss-col-center ss-m-l-8">
|
||||||
我已阅读并遵守
|
我已阅读并遵守
|
||||||
<view
|
<view class="tcp-text" @tap.stop="onProtocol('用户协议')">
|
||||||
class="tcp-text"
|
《用户协议》
|
||||||
@tap.stop="onProtocol(appInfo.user_protocol.id, appInfo.user_protocol.title)"
|
|
||||||
>
|
|
||||||
《{{ appInfo.user_protocol.title }}》
|
|
||||||
</view>
|
</view>
|
||||||
<view class="agreement-text">与</view>
|
<view class="agreement-text">与</view>
|
||||||
<view
|
<view class="tcp-text" @tap.stop="onProtocol('隐私协议')">
|
||||||
class="tcp-text"
|
《隐私协议》
|
||||||
@tap.stop="onProtocol(appInfo.privacy_protocol.id, appInfo.privacy_protocol.title)"
|
|
||||||
>
|
|
||||||
《{{ appInfo.privacy_protocol.title }}》
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</label>
|
</label>
|
||||||
|
@ -130,11 +124,10 @@
|
||||||
state.protocol = !state.protocol;
|
state.protocol = !state.protocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查看协议 TODO 芋艿:协议
|
// 查看协议
|
||||||
function onProtocol(id, title) {
|
function onProtocol(title) {
|
||||||
closeAuthModal();
|
closeAuthModal();
|
||||||
sheep.$router.go('/pages/public/richtext', {
|
sheep.$router.go('/pages/public/richtext', {
|
||||||
id,
|
|
||||||
title,
|
title,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,17 +14,13 @@ const app = defineStore({
|
||||||
name: '', // 商城名称
|
name: '', // 商城名称
|
||||||
logo: '', // logo
|
logo: '', // logo
|
||||||
version: '', // 版本号
|
version: '', // 版本号
|
||||||
cdnurl: '', // 云存储域名
|
|
||||||
filesystem: '', // 云存储平台
|
|
||||||
user_protocol: {}, // 用户协议
|
|
||||||
privacy_protocol: {}, // 隐私协议
|
|
||||||
about_us: {}, // 关于我们
|
|
||||||
copyright: '', // 版权信息 I
|
copyright: '', // 版权信息 I
|
||||||
copytime: '', // 版权信息 II
|
copytime: '', // 版权信息 II
|
||||||
|
|
||||||
|
cdnurl: '', // 云存储域名
|
||||||
|
filesystem: '', // 云存储平台
|
||||||
},
|
},
|
||||||
platform: {
|
platform: {
|
||||||
payment: [], // 支持的支付方式
|
|
||||||
recharge_payment: [], // 支持的充值支付方式
|
|
||||||
share: {
|
share: {
|
||||||
methods: [], // 支持的分享方式
|
methods: [], // 支持的分享方式
|
||||||
forwardInfo: {}, // 默认转发信息
|
forwardInfo: {}, // 默认转发信息
|
||||||
|
|
Loading…
Reference in New Issue