You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
384 B
20 lines
384 B
8 years ago
|
const product = require('../../utils/product.js')
|
||
|
|
||
|
Page({
|
||
|
data: {
|
||
|
items: []
|
||
|
},
|
||
|
|
||
|
onLoad: function(params) {
|
||
|
var that = this
|
||
|
product.getCategories(params.type).then(function(result) {
|
||
|
var data = getApp().store.sync(result.data)
|
||
|
that.setData({'items': data})
|
||
|
wx.setStorage({
|
||
|
key:`cate_${params.type}`,
|
||
|
data:data
|
||
|
})
|
||
|
})
|
||
|
}
|
||
|
})
|