|
@@ -2,6 +2,7 @@
|
|
|
<view class="content">
|
|
|
|
|
|
<!-- 导航 -->
|
|
|
+
|
|
|
<view class="nav">
|
|
|
<view class="leftView" @click="back">
|
|
|
<image src="../../static/mobile/backBtn.png" mode=""
|
|
@@ -25,7 +26,7 @@
|
|
|
|
|
|
<view class="html" v-html="detailData.contents"></view>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
<!-- item -->
|
|
|
|
|
|
<view class="itemBg" v-if="itemArr.length != 0">
|
|
@@ -33,13 +34,13 @@
|
|
|
:class="{grayLine:index < itemArr.length-1}">
|
|
|
<view class="itemLeftView">
|
|
|
<image src="../../static/mobile/icon_fujian.png" mode="" class="img2"></image>
|
|
|
- <view class="title" @click="goUrl(item.fileUrl)" >{{item.fileName}}</view>
|
|
|
+ <view class="title" @click="goUrl(item)">{{item.fileName}}</view>
|
|
|
<!-- <a class="title" :href='item.fileUrl'>{{item.fileName}}</a> -->
|
|
|
</view>
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -55,17 +56,16 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
-
|
|
|
+<script>
|
|
|
export default {
|
|
|
-
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
id: '',
|
|
|
detailData: {},
|
|
|
couContent: '',
|
|
|
- itemArr: [],
|
|
|
-
|
|
|
+ itemArr: [],
|
|
|
+ userType: '',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -75,25 +75,35 @@
|
|
|
this.getDetailData()
|
|
|
// uni.setNavigationBarTitle({
|
|
|
// title: this.topName
|
|
|
- // })
|
|
|
-
|
|
|
+ // })
|
|
|
+
|
|
|
+ this.userType = uni.getStorageSync("userType");
|
|
|
+ console.log('userType', this.userType);
|
|
|
},
|
|
|
- methods: {
|
|
|
- goUrl(url){
|
|
|
- console.log('url',url);
|
|
|
- window.location.href = url
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
+ methods: {
|
|
|
+ goUrl(item) {
|
|
|
+ // console.log('item',item);
|
|
|
+
|
|
|
+ if (this.userType == 'app') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: 'accessory_app?fileName=' + item.fileName + '&fileUrl=' + item.fileUrl
|
|
|
+
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ window.location.href = item.fileUrl
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
gotoTop() {
|
|
|
uni.pageScrollTo({
|
|
|
scrollTop: 0,
|
|
|
duration: 300
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
getDetailData() {
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
@@ -116,13 +126,13 @@
|
|
|
|
|
|
this.detailData = data
|
|
|
|
|
|
-
|
|
|
- console.log('contents1111',this.detailData.contents);
|
|
|
-
|
|
|
+
|
|
|
+ console.log('contents1111', this.detailData.contents);
|
|
|
+
|
|
|
if (this.detailData.contents) {
|
|
|
-
|
|
|
-
|
|
|
- this.detailData.contents = this.detailData.contents.replace(/<iframe([\s\w"-=\/\.:;]+)/ig,
|
|
|
+
|
|
|
+
|
|
|
+ this.detailData.contents = this.detailData.contents.replace(/<iframe([\s\w"-=\/\.:;]+)/ig,
|
|
|
'<iframe style="width: 100%;height:300px;" $1');
|
|
|
|
|
|
}
|
|
@@ -137,8 +147,8 @@
|
|
|
.replace(/<img([\s\w"-=\/\.:;]+)((?:(alt="[^"]+")))/ig, '<img$1')
|
|
|
.replace(/<img([\s\w"-=\/\.:;]+)/ig, '<img style="width: 100%;" $1');
|
|
|
}
|
|
|
-
|
|
|
- console.log('contents',this.detailData.contents);
|
|
|
+
|
|
|
+ console.log('contents', this.detailData.contents);
|
|
|
this.itemArr = this.detailData.fileList
|
|
|
|
|
|
})
|
|
@@ -173,7 +183,7 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style scoped>
|
|
|
.content {
|
|
|
min-height: 100vh;
|
|
|
background-color: #FFFFFF;
|
|
@@ -287,7 +297,9 @@
|
|
|
font-size: 28rpx;
|
|
|
color: #333333;
|
|
|
width: 100%;
|
|
|
- word-break: break-all;
|
|
|
+ word-break: break-all;
|
|
|
+ text-decoration:underline;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.title2 {
|