|
|
|
@ -65,7 +65,7 @@ import myOrder from "../../commponent/user/my-order";
|
|
|
|
|
import myFootprint from "../../commponent/user/my-footprint";
|
|
|
|
|
import myServer from "../../commponent/user/my-server";
|
|
|
|
|
import { ORDER_NAVS } from '../../../config/order.js'
|
|
|
|
|
|
|
|
|
|
import { getStatusList } from '@/api/index.js'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -134,7 +134,9 @@ export default {
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
|
*/
|
|
|
|
|
onLoad: function (options) {},
|
|
|
|
|
onLoad: function (options) {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
@ -154,6 +156,7 @@ export default {
|
|
|
|
|
let colors = app.globalData.newColor;
|
|
|
|
|
let oldcolor = this.colors;
|
|
|
|
|
let userdata = getUserInfo() || {};
|
|
|
|
|
this.getOrderStatus()
|
|
|
|
|
this.setData({
|
|
|
|
|
colors: colors,
|
|
|
|
|
userdata: userdata
|
|
|
|
@ -203,6 +206,25 @@ export default {
|
|
|
|
|
*/
|
|
|
|
|
onShareAppMessage: function () {},
|
|
|
|
|
methods: {
|
|
|
|
|
getOrderStatus() {
|
|
|
|
|
getStatusList({userId: getUserInfo().id}).then(res => {
|
|
|
|
|
const result = res.result
|
|
|
|
|
const obj = {
|
|
|
|
|
state0: result.unpaid,
|
|
|
|
|
state1: result.notSend,
|
|
|
|
|
state2: result.send,
|
|
|
|
|
// state3: result.complete,
|
|
|
|
|
// state4: result.other,
|
|
|
|
|
// state5: result.cancel,
|
|
|
|
|
}
|
|
|
|
|
const navs = ORDER_NAVS.slice(1).map((v, index) => {
|
|
|
|
|
v._num = obj['state' + v.id] || 0
|
|
|
|
|
return v
|
|
|
|
|
})
|
|
|
|
|
this.orderText = navs
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onLogin(){
|
|
|
|
|
let token = getToken()
|
|
|
|
|
if(getToken()){
|
|
|
|
|