This commit is contained in:
Vinjor 2025-04-07 16:46:35 +08:00
parent 591c4788e3
commit ca619c5f5a
4 changed files with 104 additions and 72 deletions

View File

@ -21,7 +21,10 @@ module.exports = {
}, {
title: "会员协议",
code: "member_agreement"
},
}, {
title: "新人手册",
code: "new_people_text"
}
]
}
}

View File

@ -1,62 +1,74 @@
<template>
<view class="container">
<div class="body">
<rich-text style="width: 100%" :nodes="richTextHtml" />
</div>
</view>
<view class="container">
<navigation-bar-vue :title="title" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<div class="body">
<rich-text style="width: 100%" :nodes="richTextHtml" />
</div>
</view>
</template>
<script>
import { getSiteConfig } from '@/api/system/config'
import parser from 'rich-text-parser'
export default {
filters: {
formatRichText(html) { //
// console.log(html)
const nodes = parser.getRichTextJson(html)
return nodes.children
}
},
data() {
return {
richTextHtml: '',
}
},
onLoad(options) {
uni.setNavigationBarTitle({
title: options.title
})
this.getRichTextHtml(options.code)
},
methods:{
async getRichTextHtml(code){
let that = this
getSiteConfig({code:code}).then(res => {
let json = JSON.parse(res.data)
that.richTextHtml = json[0].value
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
}
}
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {
getSiteConfig
} from '@/api/system/config'
import parser from 'rich-text-parser'
export default {
components: {
navigationBarVue
},
filters: {
formatRichText(html) { //
// console.log(html)
const nodes = parser.getRichTextJson(html)
return nodes.children
}
},
data() {
return {
title: "",
richTextHtml: '',
}
},
onLoad(options) {
this.title = options.title
this.getRichTextHtml(options.code)
},
methods: {
async getRichTextHtml(code) {
let that = this
getSiteConfig({
code: code
}).then(res => {
let json = JSON.parse(res.data)
that.richTextHtml = json[0].value
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
}
}
</script>
<style scoped lang="scss">
.container {
height: 100%;
padding: 20rpx;
background: white;
display: flex;
flex-direction: column;
.body{
flex: 1;
height: 0;
overflow: auto;
}
}
.container {
padding-top: calc(90rpx + var(--status-bar-height));
height: 100%;
padding-left: 20rpx;
padding-right: 20rpx;
background: white;
display: flex;
flex-direction: column;
.body {
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll;
overflow: auto;
}
}
</style>

View File

@ -122,12 +122,6 @@
<view class="text-dom">名片</view>
<uni-icons type="right" color="#623109" size="12"></uni-icons>
</view>
<view class="menu-item" v-if="'02'==localUserType" @click="goBlackList()">
<!-- <image src="@/static/mine/mingpian.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/mingpian.png" mode="aspectFit"></image>
<view class="text-dom">名片</view>
<uni-icons type="right" color="#623109" size="12"></uni-icons>
</view>
</view>
</view>
</view>
@ -135,22 +129,22 @@
<view class="box-room">
<view class="detail-title">其他信息</view>
<view class="menu-box">
<view class="menu-item">
<view class="menu-item" @click="viewNewPeople()">
<!-- <image src="@/static/mine/xinrenshouce.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/shouce.png" mode="aspectFit"></image>
<view>新人手册</view>
</view>
<view class="menu-item">
<view class="menu-item" @click="toggle('center')">
<!-- <image src="@/static/mine/kefu.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/kefu.png" mode="aspectFit"></image>
<view>联系客服</view>
</view>
<view class="menu-item">
<view class="menu-item" @click="toggle('center')">
<!-- <image src="@/static/mine/gognzhonghao.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/weixin.png" mode="aspectFit"></image>
<view>公众号</view>
</view>
<view class="menu-item">
<view class="menu-item" @click="toggle('center')">
<!-- <image src="@/static/mine/jairushequ.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/shequ.png" mode="aspectFit"></image>
<view>加入社区</view>
@ -163,6 +157,12 @@
</view>
</view>
</view>
<!-- 普通弹窗 -->
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
<image src="@/static/mine/erweima.jpg" mode="aspectFit"></image>
</view>
</uni-popup>
</view>
</template>
@ -200,6 +200,7 @@
data() {
return {
localUserType: this.nowUserType,
globalConfig: getApp().globalData.config,
//
ifHasCard: false,
userInfo: {}
@ -224,6 +225,11 @@
}
},
methods: {
toggle(type) {
this.type = type
// open uni-popup type
this.$refs.popup.open(type)
},
getBloggerDetail() {
bloggerDetail(this.userInfo.userId).then(res => {
this.userInfo.tfansNum = res.data.tfansNum.toString()
@ -249,12 +255,6 @@
goMyCard() {
this.$tab.navigateTo('/pages/mine/card/my-card')
},
/**
* 跳转黑名单列表
*/
goBlackList() {
this.$tab.navigateTo('/pages/mine/set/black-list')
},
/**
* 跳转建议列表
*/
@ -275,12 +275,29 @@
*/
goEdit() {
this.$tab.navigateTo('/pages/mine/set/my-info')
},
viewNewPeople() {
this.$tab.navigateTo(
`/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[3].title}&code=${this.globalConfig.appInfo.agreements[3].code}`
)
}
}
}
</script>
<style lang="scss">
.uni-popup {
top: 0 !important;
}
.vue-ref {
top: 0 !important;
}
.popup-content {
height: 100% !important;
}
.mine-container {
width: 100%;
color: #363636;

BIN
static/mine/erweima.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB