Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
1e34222d0b
2 changed files with 9 additions and 4 deletions
  1. 6
      pages/setting/paper-detial/index.js
  2. 7
      pages/setting/paper-select/index.js

6
pages/setting/paper-detial/index.js

@ -47,9 +47,9 @@ Scene({
this.setData({ visible: true }) this.setData({ visible: true })
}, },
onSelect: function({detail}){ onSelect: function({detail}){
this.data.form.categoryId = detail.categoryId
this.data.form.categoryName = detail.categoryName
this.setData({ ['form.productName']: detail.categoryName, ['form.categoryName']: detail.categoryName })
this.data.form.categoryId = detail.id
this.data.form.categoryName = detail.name
this.setData({ ['form.productName']: detail.name, ['form.categoryName']: detail.name })
}, },
bindInput: function(e){ bindInput: function(e){
this.data.form[e.currentTarget.id] = e.detail this.data.form[e.currentTarget.id] = e.detail

7
pages/setting/paper-select/index.js

@ -37,7 +37,12 @@ Component({
}, },
onConfirm: function(e){ onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index this.data.cIndex = e.currentTarget.dataset.index
var item = this.data.paperList[this.data.activeIndex].smallProductCategoryInfoList[this.data.cIndex]
var item = null
if(this.data.singleList && this.data.singleList.length){
item = this.data.singleList[this.data.cIndex]
} else {
item = this.data.paperList[this.data.activeIndex].smallProductCategoryInfoList[this.data.cIndex]
}
wx.nextTick(() => { wx.nextTick(() => {
this.setData({ visible: false, cIndex: this.data.cIndex }) this.setData({ visible: false, cIndex: this.data.cIndex })
this.triggerEvent('select', item) this.triggerEvent('select', item)

Loading…
Cancel
Save