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.
hunjianghu/江可飞/小程序开发/pages/wode/wode.js

52 lines
1.0 KiB

6 years ago
// 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/fahuo.png',
},
{
typeId: 2,
name: '待收货',
url: 'bill',
imageurl: '/pages/index/image/shouhuo.png'
},
{
typeId: 3,
name: '待评价',
url: 'bill',
imageurl: '/pages/index/image/pingjia.png'
}
],
},
//事件处理函数
toOrder: function () {
wx.navigateTo({
url: '../order/order'
})
},
onLoad: function () {
console.log('onLoad')
var that = this
//调用应用实例的方法获取全局数据
app.getUserInfo(function (userInfo) {
//更新数据
that.setData({
userInfo: userInfo
})
})
}
})