Browse Source

阻止pc端目录详情 图片预览

master
kola-web 1 month ago
parent
commit
75804675e2
  1. 2
      project.config.json
  2. 12
      src/app.ts
  3. 6
      src/pages/article/index.ts
  4. 7
      src/pages/article/index.wxml

2
project.config.json

@ -61,5 +61,5 @@ @@ -61,5 +61,5 @@
}
]
},
"appid": "wxa4a28b299df7d921"
"appid": "wxbdf6f933281b1eb4"
}

12
src/app.ts

@ -17,14 +17,14 @@ App<IAppOption>({ @@ -17,14 +17,14 @@ App<IAppOption>({
// 测试号 wx2b0bb13edf717c1d
// dev
// appid:wxbdf6f933281b1eb4
// url: 'https://m.shizhong.hbraas.com',
// upFileUrl: 'https://m.shizhong.hbraas.com/',
// imageUrl: 'https://m.shizhong.hbraas.com/api/shizhong/',
url: 'https://m.shizhong.hbraas.com',
upFileUrl: 'https://m.shizhong.hbraas.com/',
imageUrl: 'https://m.shizhong.hbraas.com/api/shizhong/',
// pro
// appid:wxa4a28b299df7d921
url: 'https://m.shizhong.hbsaas.com',
upFileUrl: 'https://m.shizhong.hbsaas.com/',
imageUrl: 'https://m.shizhong.hbsaas.com/api/shizhong/',
// url: 'https://m.shizhong.hbsaas.com',
// upFileUrl: 'https://m.shizhong.hbsaas.com/',
// imageUrl: 'https://m.shizhong.hbsaas.com/api/shizhong/',
loginState: '',
isLogin: 0,

6
src/pages/article/index.ts

@ -23,6 +23,7 @@ Page({ @@ -23,6 +23,7 @@ Page({
toastShow: false,
toastType: 3,
previewImg: true,
},
innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null,
onLoad(options) {
@ -35,6 +36,11 @@ Page({ @@ -35,6 +36,11 @@ Page({
ChapterId: options.cid,
});
}
const previewImg = !['mac', 'windows'].includes(wx.getDeviceInfo().platform);
this.setData({
previewImg,
});
app.waitLogin(false, true).then(() => {
this.getChapterList();
this.getDetail();

7
src/pages/article/index.wxml

@ -39,7 +39,12 @@ @@ -39,7 +39,12 @@
</van-slider>
</view>
<view class="rich">
<mp-html content="{{chapter.Content}}" scroll-table="{{true}}" show-img-menu="{{false}}"></mp-html>
<mp-html
content="{{chapter.Content}}"
scroll-table="{{true}}"
preview-img="{{previewImg}}"
show-img-menu="{{false}}"
></mp-html>
</view>
<view
class="quick-article"

Loading…
Cancel
Save