Browse Source

Merge branch 'master' into dev

dev
kola-web 4 weeks ago
parent
commit
ba13598135
  1. 2
      project.config.json
  2. 12
      src/app.ts
  3. 1
      src/pages/home/index.ts
  4. 10
      src/pages/information/index.ts
  5. 5
      src/pages/informationDetail/index.ts
  6. 2
      src/pages/informationDetail/index.wxml

2
project.config.json

@ -71,5 +71,5 @@
} }
] ]
}, },
"appid": "wxf9ce8010f1ad24aa" "appid": "wx71ac9c27c3c3e3f4"
} }

12
src/app.ts

@ -16,15 +16,15 @@ App<IAppOption>({
// 测试号 wx2b0bb13edf717c1d // 测试号 wx2b0bb13edf717c1d
// dev // dev
// appid:wxf9ce8010f1ad24aa // appid:wxf9ce8010f1ad24aa
url: 'https://m.xd.hbraas.com', // url: 'https://m.xd.hbraas.com',
upFileUrl: 'https://m.xd.hbraas.com/', // upFileUrl: 'https://m.xd.hbraas.com/',
imageUrl: 'https://m.xd.hbraas.com/xd/', // imageUrl: 'https://m.xd.hbraas.com/xd/',
// pro // pro
// appid:wx71ac9c27c3c3e3f4 // appid:wx71ac9c27c3c3e3f4
// url: 'https://m.xd.hbsaas.com', url: 'https://m.xd.hbsaas.com',
// upFileUrl: 'https://m.xd.hbsaas.com/', upFileUrl: 'https://m.xd.hbsaas.com/',
// imageUrl: 'https://m.xd.hbsaas.com/api/xd/', imageUrl: 'https://m.xd.hbsaas.com/api/xd/',
loginState: '', loginState: '',
isLogin: 0, isLogin: 0,

1
src/pages/home/index.ts

@ -234,6 +234,7 @@ Page({
const { id, index } = e.currentTarget.dataset; const { id, index } = e.currentTarget.dataset;
const params = this.data.list[index]; const params = this.data.list[index];
if (params.ContentType === '5' && params.FileList[0]) { if (params.ContentType === '5' && params.FileList[0]) {
app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string });
this.handleFile(params.FileList[0]); this.handleFile(params.FileList[0]);
} else { } else {
wx.navigateTo({ wx.navigateTo({

10
src/pages/information/index.ts

@ -10,6 +10,15 @@ Page({
pages: 1, pages: 1,
count: 1, count: 1,
}, },
fileLabelIcon: {
pdf: 'file-label1',
doc: 'file-label2',
docx: 'file-label3',
pptx: 'file-label4',
xls: 'file-label5',
xlsx: 'file-label6',
ppt: 'file-label7',
},
}, },
onShow() { onShow() {
app.waitLogin({ type: 2 }).then(() => { app.waitLogin({ type: 2 }).then(() => {
@ -51,6 +60,7 @@ Page({
const { id, index } = e.currentTarget.dataset; const { id, index } = e.currentTarget.dataset;
const params = this.data.list[index]; const params = this.data.list[index];
if (params.ContentType === '5' && params.FileList[0]) { if (params.ContentType === '5' && params.FileList[0]) {
app.mpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string });
this.handleFile(params.FileList[0]); this.handleFile(params.FileList[0]);
} else { } else {
wx.navigateTo({ wx.navigateTo({

5
src/pages/informationDetail/index.ts

@ -13,6 +13,7 @@ Page({
pageShow: false, pageShow: false,
empty1: false, empty1: false,
empty2: false, empty2: false,
empty3: false,
errorMsg: '', errorMsg: '',
Timestamp: '', Timestamp: '',
@ -57,7 +58,7 @@ Page({
wx.hideShareMenu(); wx.hideShareMenu();
wx.offCopyUrl(); wx.offCopyUrl();
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '通知详情', title: '通知详情',
}); });
} }
this.setData({ this.setData({
@ -70,7 +71,6 @@ Page({
}); });
}) })
.catch((err) => { .catch((err) => {
console.log(err);
const { errorCode, errorMsg } = err.data.data; const { errorCode, errorMsg } = err.data.data;
const empty1 = errorCode === '1'; const empty1 = errorCode === '1';
const empty2 = errorCode === '2'; const empty2 = errorCode === '2';
@ -79,6 +79,7 @@ Page({
errorMsg, errorMsg,
empty1, empty1,
empty2, empty2,
empty3: !empty1 && !empty2,
}); });
}); });
}, },

2
src/pages/informationDetail/index.wxml

@ -39,7 +39,7 @@
<view class="tip">内容不存在</view> <view class="tip">内容不存在</view>
<view class="back-home" bind:tap="handleBackHome">回首页</view> <view class="back-home" bind:tap="handleBackHome">回首页</view>
</view> </view>
<view class="empty2" wx:elif="{{!pageShow}}"> <view class="empty2" wx:elif="{{empty3}}">
<image class="empty" src="{{imageUrl}}empty2.png?t={{Timestamp}}"></image> <image class="empty" src="{{imageUrl}}empty2.png?t={{Timestamp}}"></image>
<view class="tip">{{errorMsg}}</view> <view class="tip">{{errorMsg}}</view>
<view class="back-home" bind:tap="handleBackHome">回首页</view> <view class="back-home" bind:tap="handleBackHome">回首页</view>

Loading…
Cancel
Save