Skip to content

Commit 8ec74c1

Browse files
author
sanfordsun
committed
fix: chattool
1 parent bda8ed7 commit 8ec74c1

File tree

5 files changed

+42
-5
lines changed

5 files changed

+42
-5
lines changed

miniprogram/packageAPI/pages/chattool/activity_assist/activity_assist.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ Page({
4343
this.setData({ theme })
4444
})
4545
}
46+
},
4647

47-
this.fetchActivityList()
48+
onShow() {
49+
this.refresh()
4850
},
4951

5052
refresh() {

miniprogram/packageAPI/pages/chattool/material_open/material_open.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ let templateId = '4A68CBB88A92B0A9311848DBA1E94A199B166463' // 完成
99
const fileUrl = 'https://res.wx.qq.com/open/js/jweixin-1.6.0.js'
1010
const videoUrl = 'https://res.wx.qq.com/op_res/o3RWIC_o--wNf_qA3B4ghHbL_qKRRwsUM39dGTzltCR2__61DnEANInj5AJJmVXsHvx9FyHlDftU3KhcGCukDA'
1111

12+
const {envVersion} = wx.getAccountInfoSync().miniProgram
13+
14+
const getVersionType = () => {
15+
if (envVersion === 'release') {
16+
return 0
17+
} else if (envVersion === 'develop') {
18+
return 1
19+
} else if (envVersion === 'trial') {
20+
return 2
21+
}
22+
23+
return 0
24+
}
25+
1226
Page({
1327
data: {
1428
members: [],
@@ -121,7 +135,7 @@ Page({
121135
templateId,
122136
targetState: targetState || 1,
123137
parameterList: parameterList || [],
124-
versionType: 1
138+
versionType: getVersionType()
125139
}
126140
}).then(resp => {
127141
console.info('updateChatToolMsg: ', resp)

miniprogram/packageChatTool/pages/activity_detail/index.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ const roleType = ['unkown', 'owner', 'participant', 'nonParticipant']
55

66
const activityStatus = ['未开始', '进行中', '已结束']
77

8+
const {envVersion} = wx.getAccountInfoSync().miniProgram
9+
10+
const getVersionType = () => {
11+
if (envVersion === 'release') {
12+
return 0
13+
} else if (envVersion === 'develop') {
14+
return 1
15+
} else if (envVersion === 'trial') {
16+
return 2
17+
}
18+
19+
return 0
20+
}
21+
822
Page({
923

1024
data: {
@@ -240,7 +254,7 @@ Page({
240254
targetState: targetState || 1,
241255
templateId: templateId,
242256
parameterList: parameterList || [],
243-
versionType: 1
257+
versionType: getVersionType()
244258
}
245259
}).then(resp => {
246260
console.info('updateChatToolMsg: ', resp)
@@ -278,7 +292,7 @@ Page({
278292
},
279293

280294
sendProgress() {
281-
const { progressImage, activityId } = this.data
295+
const { progressImage, activityId} = this.data
282296
const entrancePath = `packageChatTool/pages/activity_detail/index?activityId=${activityId}`
283297
wx.shareImageToGroup({
284298
imagePath: progressImage,

miniprogram/packageChatTool/pages/activity_detail/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
</t-button>
9494
</view>
9595

96-
<view class="card">
96+
<view class="card" wx:if="{{participant.length}}">
9797
<t-button
9898
class="btn"
9999
bind:tap="sendProgress"

project.private.config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
"condition": {
1212
"miniprogram": {
1313
"list": [
14+
{
15+
"name": "packageChatTool/pages/activity_create/index",
16+
"pathName": "packageChatTool/pages/activity_create/index",
17+
"query": "",
18+
"launchMode": "default",
19+
"scene": null
20+
},
1421
{
1522
"name": "聊天工具-签到助手",
1623
"pathName": "packageAPI/pages/chattool/activity_assist/activity_assist",

0 commit comments

Comments
 (0)