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.
39 lines
778 B
39 lines
778 B
var config = require('../../data/skinList.js');
|
|
Page({
|
|
data:{
|
|
skinList: config.postList,
|
|
nowSkin: ''
|
|
},
|
|
onLoad:function(options){
|
|
var that = this
|
|
wx.getStorage({
|
|
key: 'skin',
|
|
success: function(res){
|
|
if (res.data == "") {
|
|
that.setData({
|
|
nowSkin: config.skinList[0].imgUrl
|
|
})
|
|
} else {
|
|
that.setData({
|
|
nowSkin: res.data
|
|
})
|
|
}
|
|
}
|
|
})
|
|
},
|
|
chooseSkin: function(e) {
|
|
var url = e.currentTarget.dataset.url
|
|
wx.setStorage({
|
|
key: 'skin',
|
|
data: url,
|
|
success: function(res){
|
|
wx.navigateBack({
|
|
delta: 1,
|
|
success: function(res){
|
|
console.log('success')
|
|
}
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}) |