Browse Source

修复健康档案页面的闪烁问题

master
kola-web 2 weeks ago
parent
commit
8910ffefdf
  1. 6
      src/pages/qaFormDetail/index.ts
  2. 4
      src/pages/qaFormDetail/index.wxml

6
src/pages/qaFormDetail/index.ts

@ -33,11 +33,12 @@ Page({ @@ -33,11 +33,12 @@ Page({
data: {
questions: [] as IQuestion[],
hasData: false,
showPage: false,
},
onLoad() {},
onShow() {
this.setData({ questions: [], hasData: false })
this.setData({ questions: [], hasData: false, showPage: false })
app.waitLogin({}).then(() => {
this.loadData()
})
@ -77,7 +78,7 @@ Page({ @@ -77,7 +78,7 @@ Page({
Images: [],
Condition: condition,
visible: !condition,
displayNo: 0,
displayNo: '',
answerText: '',
}
})
@ -175,6 +176,7 @@ Page({ @@ -175,6 +176,7 @@ Page({
}
})
if (Object.keys(updates).length) {
updates.showPage = true
this.setData(updates)
}
},

4
src/pages/qaFormDetail/index.wxml

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
<wxs src="../../utils/tools.wxs" module="tools" />
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<view class="page-container">
<view class="page-container" wx:if="{{showPage}}">
<block wx:for="{{questions}}" wx:for-index="qIndex" wx:key="QuestionNo">
<view class="card" wx:if="{{item.visible}}">
<view class="c-title">{{item.displayNo}}. {{item.QuestionContent}}</view>
<view class="c-title"><block wx:if="{{item.displayNo}}">{{item.displayNo}}.</block> {{item.QuestionContent}}</view>
<view wx:if="{{item.QuestionType === 1 && item.answerText}}" class="answer-text">
<view class="answer-tag">{{item.answerText}}</view>

Loading…
Cancel
Save