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.
|
|
|
// pages/wode/wode.js
|
|
|
|
var app = getApp()
|
|
|
|
Page({
|
|
|
|
data: {
|
|
|
|
userInfo: {},
|
|
|
|
motto: 'Hello World',
|
|
|
|
// orderItems
|
|
|
|
orderItems: [{
|
|
|
|
typeId: 0,
|
|
|
|
name: '待付款',
|
|
|
|
url: 'bill',
|
|
|
|
imageurl: '/pages/index/image/fukuan.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
typeId: 1,
|
|
|
|
name: '待收货',
|
|
|
|
url: 'bill',
|
|
|
|
imageurl: '/pages/index/image/shouhuo.png'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
typeId: 2,
|
|
|
|
name: '待发货',
|
|
|
|
url: 'bill',
|
|
|
|
imageurl: '/pages/index/image/fahuo.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
typeId: 3,
|
|
|
|
name: '待评价',
|
|
|
|
url: 'bill',
|
|
|
|
imageurl: '/pages/index/image/pingjia.png'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
//事件处理函数
|
|
|
|
toOrder: function(event) {
|
|
|
|
var typeId = event.currentTarget.dataset.typeid
|
|
|
|
// console.log(typeId);
|
|
|
|
wx.navigateTo({
|
|
|
|
url: '../order/order?typeId=' + typeId
|
|
|
|
})
|
|
|
|
},
|
|
|
|
onLoad: function() {
|
|
|
|
console.log('onLoad')
|
|
|
|
var that = this
|
|
|
|
//调用应用实例的方法获取全局数据
|
|
|
|
app.getUserInfo(function(userInfo) {
|
|
|
|
//更新数据
|
|
|
|
that.setData({
|
|
|
|
userInfo: userInfo
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getUserInfo: function(e) {
|
|
|
|
console.log(e)
|
|
|
|
app.globalData.userInfo = e.detail.userInfo
|
|
|
|
this.setData({
|
|
|
|
userInfo: e.detail.userInfo,
|
|
|
|
hasUserInfo: true
|
|
|
|
})
|
|
|
|
},
|
|
|
|
address: function() {
|
|
|
|
wx.navigateTo({
|
|
|
|
url: "/pages/shdz/shdz"
|
|
|
|
})
|
|
|
|
},
|
|
|
|
})
|