|
|
@ -65,7 +65,7 @@ import myOrder from "../../commponent/user/my-order";
|
|
|
|
import myFootprint from "../../commponent/user/my-footprint";
|
|
|
|
import myFootprint from "../../commponent/user/my-footprint";
|
|
|
|
import myServer from "../../commponent/user/my-server";
|
|
|
|
import myServer from "../../commponent/user/my-server";
|
|
|
|
import { ORDER_NAVS } from '../../../config/order.js'
|
|
|
|
import { ORDER_NAVS } from '../../../config/order.js'
|
|
|
|
|
|
|
|
import { getStatusList } from '@/api/index.js'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
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 colors = app.globalData.newColor;
|
|
|
|
let oldcolor = this.colors;
|
|
|
|
let oldcolor = this.colors;
|
|
|
|
let userdata = getUserInfo() || {};
|
|
|
|
let userdata = getUserInfo() || {};
|
|
|
|
|
|
|
|
this.getOrderStatus()
|
|
|
|
this.setData({
|
|
|
|
this.setData({
|
|
|
|
colors: colors,
|
|
|
|
colors: colors,
|
|
|
|
userdata: userdata
|
|
|
|
userdata: userdata
|
|
|
@ -203,6 +206,25 @@ export default {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onShareAppMessage: function () {},
|
|
|
|
onShareAppMessage: function () {},
|
|
|
|
methods: {
|
|
|
|
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(){
|
|
|
|
onLogin(){
|
|
|
|
let token = getToken()
|
|
|
|
let token = getToken()
|
|
|
|
if(getToken()){
|
|
|
|
if(getToken()){
|
|
|
|