Commit 95b8953b by 前端

Merge branch 'SAAS+V4.44.1' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.44.1

2 parents 7b016cc0 799127fe
......@@ -306,6 +306,7 @@ export default {
const res = await uni.$api.customerApi[targetApi](params),
_this = this
if (res) {
/**1:成功,2:重复 */
if (res == '1') {
this.$refs.successRef.open()
setTimeout(() => {
......@@ -362,7 +363,7 @@ export default {
height: 96rpx;
z-index: 9;
text-align: center;
font-weight: 500;
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
line-height: 96rpx;
......
......@@ -119,7 +119,7 @@
</view>
<view class="tabel-container">
<table class="tabel-box" cellspacing="0" border="0" cellpadding="0">
<tr v-for="i in goodsList">
<tr v-for="i in goodsList" :key="i.id">
<td>{{ i.goodsName }}</td>
<td>{{ i.goodsPositionName || "-" }}</td>
<td>{{ i.number }}</td>
......@@ -248,7 +248,7 @@ export default {
}
.nav-title {
font-weight: 600;
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
text-align: center;
......
......@@ -224,7 +224,7 @@ export default {
justify-content: center;
}
.nav-title {
font-weight: 600;
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
text-align: center;
......
......@@ -257,6 +257,7 @@ export default {
.title {
width: 100%;
text-align: center;
font-weight: 700;
}
}
.bg {
......
......@@ -82,6 +82,7 @@ export default {
color: #fff;
flex: 1;
font-size: 32rpx;
font-weight: 700;
text-align: center;
}
}
......
<template>
<view style="font-size: 0;">
<!-- :src="require('@/assets/images/boutique/detail.webp')" -->
<!-- :src="require('@/assets/images/boutique/detail.webp')" -->
<image
class="detail-img"
:src="detailUrl"
mode="widthFix"
/>
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="32"></uni-icons>
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="32"
></uni-icons>
</view>
</view>
</view>
......@@ -17,7 +23,7 @@
<script type="text/ecmascript-6">
export default {
name: '',
data() {
data () {
return {
detailUrl: ''
}
......@@ -27,7 +33,7 @@ export default {
this.detailUrl = options.detailUrl
},
methods: {
back() {
back () {
uni.navigateBack({
delta: 1
})
......@@ -56,6 +62,7 @@ export default {
.title {
width: 100%;
text-align: center;
font-weight: 700;
}
}
.detail-img {
......
......@@ -34,7 +34,7 @@
</view>
</scroll-view>
</view>
<scroll-view class="right-content" scroll-y :scroll-into-view="`case-${contentId}`" @scroll="contentScroll" scroll-with-animation>
<scroll-view class="right-content" scroll-y :scroll-into-view="`case-${contentId}`" @scroll="contentScroll" scroll-with-animation enable-flex>
<template v-for="(item, index) in detailInfo">
<view class="detail-item" :key="item.id">
<view class="item-title" :id="`case-${item.id}`">{{ item.headings }}</view>
......@@ -82,124 +82,14 @@ export default {
},
data () {
return {
detailInfo: [
{
headings: '方案一',
id: '1',
audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_17248148280491724813557101.mp3',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg',
'https://img01.glsx.com.cn/group1/M00/3B/E6/wKgFDWbDXvWARW83AAB7oRJhZUc138.jpg'
],
content: '在佳士得纽约拍场,今年81岁的<span style="color:#FF8D1A;font-weight:500;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。',
children: [{
headings: '子方案一',
id: '1-1',
content: '在佳士得纽约拍场,今年81岁的<span style="color:#FF8D1A;font-weight:500;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。',
}, {
headings: '子方案二',
id: '1-2',
content: '在佳士得纽约拍场,今年81岁的<span style="color:#FF8D1A;font-weight:500;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。',
}, {
headings: '子方案三',
id: '1-3',
content: '在佳士得纽约拍场,今年81岁的<span style="color:#FF8D1A;font-weight:500;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。',
audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_17248124922141724811525712.mp3',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg',
'https://pic4.zhimg.com/80/v2-2a6bb9b3a75656ff434088c068dabd7d_720w.webp'
],
}]
}, {
headings: '方案二',
id: '2',
pictureList: [
'//scpic.chinaz.net/files/pic/pic9/201812/zzpic15923.jpg',
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案三',
id: '3',
audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_172474678798417247418500824.mp3',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg',
'https://img01.glsx.com.cn/group1/M00/3B/E6/wKgFDWbDXomAadw2AAB-pGTMW-A904.jpg',
'https://pic4.zhimg.com/80/v2-2ea62b9f9a222efac64e71514da7c395_720w.webp'
],
}, {
headings: '方案四',
id: '4',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/3B/E6/wKgFDWbDXomAadw2AAB-pGTMW-A904.jpg',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案五',
id: '5',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案六',
id: '6',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案七',
id: '7',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案八',
id: '8',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案九',
id: '9',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案十',
id: '10',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案十一',
id: '11',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}, {
headings: '方案十二',
id: '12',
pictureList: [
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
],
}],
detailInfo: [],
currentId: '',
blockTop: '',
menuScrollTop: 0,
topList: [],
itemList: [],
contentId: '',
caseObject:{
caseObject: {
}
}
......@@ -251,8 +141,42 @@ export default {
const res = await uni.$api.customerApi.getMaterialDetail({
id
})
let detailInfo = []
this.caseObject = res
console.log(res)
res.richTextInfoList?.map(e => {
e.content = this.highlightText(e.content)
if (e.level == 1) detailInfo.push({
...e,
children: []
})
if (e.level == 2) {
let index = detailInfo.findIndex(item => item.id == e.parentId)
detailInfo[index].children.push(e)
}
})
this.detailInfo = detailInfo
this.$nextTick(() => this.initScrollListTop())
},
highlightText (text) {
text = text.replace(/<\/?br\s*\/?>|\n/g, '<div></div>')
const matches = text.match(/#/g)
if (!matches) return text
const spanCount = matches.length
let lastSpan = spanCount % 2 === 1,
parts = [],
currentIndex = 0
for (let i = 0; i < spanCount; i++) {
const matchIndex = text.indexOf('#', currentIndex)
parts.push(text.substring(currentIndex, matchIndex))
if (i === spanCount - 1 && lastSpan) parts.push('')
else {
if (i % 2 === 0) parts.push('<span style="color:#FF8D1A;font-weight: 500;">')
else parts.push('</span>')
}
currentIndex = matchIndex + 1
}
parts.push(text.substring(currentIndex))
return parts.join('')
},
back () {
uni.navigateBack({
......@@ -347,7 +271,7 @@ export default {
top: 48rpx;
z-index: 9;
text-align: center;
font-weight: 500;
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
line-height: 96rpx;
......@@ -455,6 +379,11 @@ export default {
width: calc(100% - 624rpx);
height: 100%;
margin-left: 624rpx;
/deep/.uni-scroll-view-content {
display: flex;
flex-direction: column;
}
.detail-item {
padding-right: 64rpx;
.item-title {
......@@ -498,6 +427,7 @@ export default {
text-align: center;
padding: 24rpx 64rpx 24rpx 0;
font-size: 24rpx;
margin-top: auto;
}
}
}
......
......@@ -26,7 +26,7 @@
<template v-for="i in list">
<template v-for="item in i">
<view class="case-item" :key="item.id" @click="jumpDetail(item)">
<image class="img" :src="item.cover || ''"></image>
<image class="img" :src="item.cover"></image>
<view class="case-info">
<view class="case-name text-hide">{{ item.title }}</view>
<template v-for="(j, ind) in caseInfo">
......@@ -212,6 +212,7 @@ export default {
})
e.tags = tags.join('、')
e.goods = goods.join('、')
if (!e.cover) e.cover = 'https://img02.glsx.com.cn/weapp/resource/app-tape/common/default-cover.webp'
})
this.list[currentPage - 1] = list
this.flag = true
......@@ -272,7 +273,7 @@ export default {
top: 48rpx;
z-index: 9;
text-align: center;
font-weight: 500;
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
line-height: 96rpx;
......
......@@ -206,7 +206,7 @@ export default {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 500;
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
}
......
......@@ -228,16 +228,16 @@ export default {
this.moduleList[index].showAlt = true;
},
async start () {
// const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO"
// );
// if (result !== 1) {
// uni.showToast({
// title: "为了记录语音通话,请打开录音权限",
// icon: "none",
// });
// return;
// }
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "为了记录语音通话,请打开录音权限",
icon: "none",
});
return;
}
this.getSoure();
this.clearHistory();
this.$refs.home.startAudio();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!