Browse Source

'修改四个BUG,改用uvparse组件'

hfll
hflllll 1 month ago
parent
commit
6c40f5d7ca
15 changed files with 76 additions and 71 deletions
  1. +1
    -1
      config/index.js
  2. +1
    -1
      pages.json
  3. +5
    -6
      pages/index/desk.vue
  4. +6
    -4
      pages/index/home.vue
  5. +9
    -3
      pages/index/member.vue
  6. +2
    -3
      pages/index/test.vue
  7. +5
    -7
      subPages/home/directory.vue
  8. +3
    -1
      subPages/home/plan.vue
  9. +24
    -24
      subPages/home/search.vue
  10. +7
    -9
      subPages/home/submit.vue
  11. +3
    -5
      subPages/login/login.vue
  12. +5
    -1
      subPages/member/recharge.vue
  13. +1
    -1
      subPages/user/introduce.vue
  14. +1
    -1
      subPages/user/policy.vue
  15. +3
    -4
      utils/common.js

+ 1
- 1
config/index.js View File

@ -12,7 +12,7 @@ const envParam = {
prod: 'production',
}
const env = envParam['dev']
const env = envParam['test']
// 全局配置
const config = {


+ 1
- 1
pages.json View File

@ -55,7 +55,7 @@
{
"path": "home/search",
"style": {
"navigationStyle": "custom"
"navigationBarTitleText": "搜索"
}
},
{


+ 5
- 6
pages/index/desk.vue View File

@ -114,7 +114,7 @@ export default {
})
const res = await this.$api.book.delStand({
id: book.id
id: book.bookId
})
uni.hideLoading()
@ -228,15 +228,14 @@ export default {
.book-grid-info {
padding: 6rpx;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.book-grid-title {
font-size: 28rpx;
font-weight: 700;
color: $primary-text-color;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.book-grid-meta {


+ 6
- 4
pages/index/home.vue View File

@ -601,7 +601,7 @@ export default {
width: 208rpx;
display: flex;
flex-direction: column;
// backdrop-filter: red;
.book-grid-cover {
box-shadow: 0px 4px 4px 0px #C0BCBA75;
@ -618,15 +618,17 @@ export default {
}
.book-grid-info {
width: 208rpx;
padding: 6rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.book-grid-title {
font-size: 28rpx;
font-weight: 700;
color: $primary-text-color;
margin-bottom: 14rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.book-grid-meta {


+ 9
- 3
pages/index/member.vue View File

@ -120,6 +120,7 @@
<view class="study-plan-section" v-else>
<view class="section-title">学习计划</view>
<view class="plan-books">
<view
v-for="(book, index) in studyPlanBooks"
@ -137,9 +138,9 @@
</view>
</view>
<view class="plan-book-info">
<text class="plan-book-title" :class="{ 'highlight-title': index === 1 }">{{ book.book.booksName }}</text>
<text class="plan-book-title" :class="{ 'highlight-title': index === 1 }">{{ book.book.booksName || '暂无课程' }}</text>
<view class="plan-book-meta" >
<text class="plan-book-grade" :class="{ 'highlight-title': index === 1 }">{{ book.book.categoryName }}/</text>
<text class="plan-book-grade" :class="{ 'highlight-title': index === 1 }">{{ book.book.categoryName || '--' }}/</text>
<image v-if="index !== 1" src="/static/播放图标.png" class="plan-book-duration-icon" />
<image v-else src="/static/播放图标高亮.png" class="plan-book-duration-icon" />
<text class="plan-book-duration" :class="{ 'highlight-title': index === 1 }">{{ book.book.duration }}</text>
@ -560,13 +561,18 @@ export default{
.plan-book-info {
text-align: center;
width: 180rpx;
.plan-book-title {
// width: 100%;
font-size: 28rpx;
font-weight: 700;
color: #333;
margin-bottom: 8rpx;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&.highlight-title {
color: $primary-color;
}


+ 2
- 3
pages/index/test.vue View File

@ -12,13 +12,12 @@
<template v-slot:page-content="{ page }">
<view class="page-content">
<!-- 对于非富文本页直接显示文本对于富文本页使用 rich-text -->
<rich-text :nodes="formatContent(pageContent[page])" />
<uv-parse :content="formatContent(pageContent[page])" />
</view>
</template>
<template v-slot:next-page-content="{ page }">
<view class="page-content">
<rich-text :nodes="formatContent(pageContent[page])" />
<!-- <uv-parse :content="pageContent[page]" /> -->
<uv-parse :content="formatContent(pageContent[page])" />
</view>
</template>
</nx-turn>


+ 5
- 7
subPages/home/directory.vue View File

@ -26,8 +26,7 @@
<view class="book-knowledge-detail-title">
知识收获
</view>
<rich-text :nodes="bookInfo.knowledgePoints">
</rich-text>
<uv-parse :content="bookInfo.knowledgePoints"></uv-parse>
</view>
</view>
</view>
@ -63,8 +62,7 @@
<!-- 简介部分 -->
<view class="intro-section">
<view class="intro-title">简介</view>
<rich-text :nodes="bookInfo.booksIntro" class="intro-content">
</rich-text>
<uv-parse :content="bookInfo.booksIntro" class="intro-content"></uv-parse>
</view>
<!-- 作者部分 -->
@ -256,7 +254,7 @@ export default {
right: 0;
top: 0;
padding: 30rpx;
z-index: 1;
}
.book-info {
display: flex;
@ -358,7 +356,7 @@ export default {
gap: 24rpx;
flex-direction: column;
position: relative;
z-index: 100;
z-index: 9999;
}
/* 课程部分 */
@ -613,7 +611,7 @@ padding: 32rpx;
background: #fff;
padding: 24rpx 32rpx 0;
box-shadow: 0rpx -2rpx 0rpx 0rpx #0000001A;
z-index: 999;
z-index: 10000;
.bottom-action-container{
display: flex;


+ 3
- 1
subPages/home/plan.vue View File

@ -15,7 +15,7 @@
</view>
<!-- 底部固定报名栏 -->
<view class="bottom-bar" v-if="type === 1 || '-1'">
<view class="bottom-bar" v-if="type === 1 || type === '1'">
<uv-button
type="primary"
text="报名"
@ -83,11 +83,13 @@ export default {
})
if (askRes.code === 200){
this.richTextContent = askRes.result.content
this.type = askRes.result.type
}
} catch (error) {
console.log('error', error)
}
},
onLoad(options) {
this.id = options.id
this.type = options.type


+ 24
- 24
subPages/home/search.vue View File

@ -1,7 +1,5 @@
<template>
<view class="search-container">
<!-- 状态栏安全区域 -->
<uv-status-bar></uv-status-bar>
<!-- 顶部搜索栏 -->
<view class="search-header">
@ -12,7 +10,7 @@
action-text="搜索"
:action-style="{
color: '#fff',
backgroundColor: '#FFA500',
backgroundColor: '#06DADC',
borderRadius: '198rpx',
width: '100rpx',
height: '64rpx',
@ -20,32 +18,29 @@
fontSize: '26rpx',
lineHeight: '64rpx',
}"
:customStyle="{
width: '500rpx',
}"
@search="handleSearch"
@custom="handleSearch"
@clear="handleSearch"
></uv-search>
</view>
<!-- 分类标签栏 -->
<view class="category-tabs">
<scroll-view scroll-x class="tab-scroll">
<view class="tab-list">
<view
v-for="(tab, index) in categoryTabs"
:key="index"
class="tab-item"
:class="{ active: currentTab === index }"
@click="switchTab(index)"
>
{{ tab.title }}
<!-- 分类标签栏 -->
<view class="category-tabs">
<scroll-view scroll-x class="tab-scroll">
<view class="tab-list">
<view
v-for="(tab, index) in categoryTabs"
:key="index"
class="tab-item"
:class="{ active: currentTab === index }"
@click="switchTab(index)"
>
{{ tab.title }}
</view>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
<!-- 搜索结果列表 -->
<view class="search-results">
<view
@ -168,10 +163,14 @@ export default {
}
.search-header {
padding: 10rpx 32rpx 20rpx;
padding: 10rpx 32rpx 6rpx;
background: #fff;
}
position: sticky;
top: 0;
left: 0;
right: 0;
}
.category-tabs {
background: #fff;
// border-bottom: 1rpx solid #f0f0f0;
@ -211,6 +210,7 @@ export default {
}
}
.search-results {
padding: 32rpx;
display: flex;


+ 7
- 9
subPages/home/submit.vue View File

@ -103,7 +103,8 @@ export default {
name: '',
phone: '',
looking: '',
background: ''
background: '',
id: this.id
}
}
},
@ -138,10 +139,8 @@ export default {
icon: 'success'
})
setTimeout(() => {
uni.navigateBack({
delta: 2
})
}, 1000)
uni.navigateBack()
}, 800)
} else {
uni.showToast({
title: subRes.msg,
@ -155,11 +154,10 @@ export default {
})
}
// uni.showToast({
// title: '',
// icon: 'success'
// })
}
},
onLoad(options) {
this.linkId = options.id
}
}
</script>


+ 3
- 5
subPages/login/login.vue View File

@ -8,7 +8,7 @@
<!-- Logo和标题区域 -->
<view class="logo-section">
<image class="logo" :src="configParamContent('login_logo')" mode="aspectFit"></image>
<text class="title-text">展品维保报修小程序</text>
<text class="title-text">{{ configParamContent('app_name') }}</text>
</view>
<!-- 登录按钮区域 -->
@ -43,8 +43,7 @@
<uv-modal ref="serviceModal" title="《服务协议与隐私条款》" :show-cancel-button="false" confirm-text="我知道了" confirm-color="#06DADC" @confirm="isAgreed = true">
<view class="privacy-content">
<!-- 如果是富文本 -->
<rich-text :nodes="configParamContent('privacy_policy')">
</rich-text>
<uv-parse :content="configParamContent('privacy_policy')"></uv-parse>
</view>
</uv-modal>
@ -52,8 +51,7 @@
<uv-modal ref="guideModal" title="《个人信息保护指引》" :show-cancel-button="false" confirm-text="我知道了" confirm-color="#06DADC" @confirm="isAgreed = true">
<view class="privacy-content">
<!-- 如果是富文本 -->
<rich-text :nodes="configParamContent('user_agreement ')">
</rich-text>
<uv-parse :content="configParamContent('user_agreement')"></uv-parse>
</view>
</uv-modal>
</view>


+ 5
- 1
subPages/member/recharge.vue View File

@ -207,7 +207,11 @@
this.goBack()
}else {
//
this.$utils.wxPay(res.result)
this.$utils.wxPay(res.result, (res) => {
setTimeout(() => {
this.goBack()
}, 1000)
})
}
}
},


+ 1
- 1
subPages/user/introduce.vue View File

@ -3,7 +3,7 @@
<view class="sub-container">
<view class="rich-text">
<rich-text :nodes="this.configParamContent('production_desc')"></rich-text>
<uv-parse :content="this.configParamContent('production_desc')"></uv-parse>
</view>
</view>
</view>


+ 1
- 1
subPages/user/policy.vue View File

@ -1,7 +1,7 @@
<template>
<view class="container">
<view class="body">
<rich-text :nodes="configParamContent('privacy_policy')"></rich-text>
<uv-parse :content="configParamContent('privacy_policy')"></uv-parse>
</view>
</view>
</template>


+ 3
- 4
utils/common.js View File

@ -116,10 +116,9 @@ const wxPay = (paymentData, successCallback, failCallback) => {
title: '支付成功',
icon: 'success'
})
// 支付成功后返回上一页
setTimeout(() => {
this.goBack()
}, 1500)
if (successCallback) {
successCallback(res)
}
},
fail: (err) => {
console.log('支付失败:', err)


Loading…
Cancel
Save