Commit 09b4f040 by 李伟康

修复BUG

1 parent 175e6e7b
......@@ -180,6 +180,5 @@
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"plugins": {},
"__usePrivacyCheck__": false
"plugins": {}
}
\ No newline at end of file
......@@ -6,6 +6,7 @@
position: relative;
height: 100%;
}
.textarea-box .textarea {
position: absolute;
top: 0;
......@@ -16,17 +17,22 @@
line-height: 32rpx;
word-break: break-all;
}
._textarea_ {
width: 100%;
height: calc(100% - 40rpx);
height: 100%;
}
.textarea-box.showWordLimit .textarea {
height: calc(100% - 40rpx);
padding-bottom: 32rpx;
box-sizing: border-box;
}
.wordLimit {
position: absolute;
bottom: 0;
right: 0;
color: #999;
}
font-size: 24rpx;
color: #C6C6C6;
background-color: #fff;
}
\ No newline at end of file
......@@ -85,23 +85,23 @@ Page({
for (let i = 0; i < childrenDepth; i++) {
const text = levels[i],
value = text,
existingOption = currentLevel.find((option) => option.text === text)
existingOption = currentLevel && currentLevel.find((option) => option.text === text)
if (existingOption) {
if (i === childrenDepth - 1) {
continue
}
currentLevel = existingOption.children
if (existingOption.children) currentLevel = existingOption.children
} else {
const newOption = {
text,
value,
children: []
}
if (text && value) currentLevel.push(newOption)
if (i === childrenDepth - 1) {
delete newOption.children
if (text && value) {
const newOption = {
text,
value,
}
if (levels[i + 1]) newOption.children = []
currentLevel.push(newOption)
if (i === childrenDepth - 1) delete newOption.children
currentLevel = newOption.children
}
currentLevel = newOption.children
}
}
})
......@@ -129,7 +129,7 @@ Page({
questions.push({
userFormId: e.userFormId,
num: e.num,
answer: answerList[e.num]
answer: answerList[e.num] || ''
})
})
let params = {
......
......@@ -16,7 +16,7 @@
<gl-checkbox data="{{item.data}}" num="{{item.num}}" bindchange="change" />
</block>
<block wx:elif="{{item.type == 3}}">
<gl-textarea placeholder="请输入" maxlength="{{item.maxLength}}" data-num="{{item.num}}" bindblur="blur"></gl-textarea>
<gl-textarea placeholder="请输入" maxlength="{{item.maxLength}}" data-num="{{item.num}}" bindblur="blur" showWordLimit></gl-textarea>
</block>
<block wx:elif="{{item.type == 4}}">
<gl-select data="{{item.data}}" title="{{item.text}}" num="{{item.num}}" bindchange="change" />
......
......@@ -18,16 +18,24 @@ Page({
nickName: info.nickName,
avatarUrl: info.avatarUrl
}),
userInfo = wx.p.storage.get('userInfo')
userInfo.nickName = info.nickName
userInfo.headImgUrl = info.avatarUrl
wx.p.storage.set('userInfo', userInfo)
/**重新获取sessionId */
{
code,
data,
} = await wx.p.api.userApi.login()
if (data && code == '0') {
wx.p.storage.set('merchant_info', {
merchantId: data.merchantId,
merchantName: data.merchantName
})
wx.p.storage.set('userInfo', data)
wx.p.storage.set('sessionId', data.sessionId)
}
wx.p.router.back(res => {
res.setData({
nickName: info.nickName,
headImgUrl: info.avatarUrl,
hasUserInfo: true,
userInfo
hasUserInfo: true
})
res.toCheckMember && res.toCheckMember()
let item = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!