123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- var app = getApp()
- Page({
- data: {
- userId : '',
- userInfo: {},
- phone:'',
- orderList:{
- label:'我的采购订单',
- summary:"全部",
- state:"",
- icon:"icon-left",
- data:[
- {
- label:"待付款",
- state:"1",
- icon:"icon-icon-test",
- num:0,
- },
- {
- label: "待发货",
- state: "3",
- icon: "icon-daifahuo1",
- num: 0,
- },
- {
- label: "待收货",
- state: "4",
- icon: "icon-daishouhuo",
- num: 0,
- }
- ]
- },
- madeList: {
- label: '我的定制订单',
- summary: "全部",
- state: "",
- icon: "icon-left",
- data: [
- {
- label: "待付款",
- state: "",
- icon: "icon-icon-test",
- num: 0,
- },
- {
- label: "待发货",
- state: "",
- icon: "icon-daifahuo1",
- num: 0,
- },
- {
- label: "待收货",
- state: "",
- icon: "icon-daishouhuo",
- num: 0,
- }
- ]
- },
- },
- onLoad: function () {
- var that = this;
- var openid = getApp().globalData.openid;
- var un_id = getApp().globalData.un_id;
- var host = getApp().globalData.servsers;
- wx.showNavigationBarLoading();
- wx.request({
- url: host + "phoneapi/phoneall",
- data: {},
- method: 'GET',
- header: {
- 'Accept': 'application/json'
- },
- success: function (res) {
- that.setData({
- phone: res.data.rows[0].phone,
- });
- if (res == null || res.data == null) {
- console.error('网络请求失败');
- return;
- }
- wx:wx.hideNavigationBarLoading(
- that.setData({
- hidden : ''
- })
- )
- }
- });
- that.setData({
- userInfo: getApp().globalData.userInfo,
- userId: getApp().globalData.un_id
- })
-
- },
-
- onShow: function () {
- var that = this;
- var host = getApp().globalData.servsers;
- var un_id = getApp().globalData.un_id;
- var openid = getApp().globalData.openid;
- var userInfo = getApp().globalData.userInfo;
- var userRole = getApp().globalData.userRole;
-
-
-
-
-
- userInfo = getApp().globalData.userInfo;
-
-
-
-
-
- that.setData({
- userInfo: userInfo,
- userId: un_id,
- userRole: userRole
- })
- },
- orderList(e){
- console.log(e,"orderList")
- let state = e.currentTarget.dataset.state
- wx.navigateTo({
- url: '/newsShop/pages/orderList/orderList?state' + state,
- })
- }
- })
|