Commit 09b4f040 by 李伟康

修复BUG

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