绿满眶商城微信小程序-uniapp
peng
2 天以前 d50a3ed44e2edab2a7a661c43491c3aa42c57794
pages/order/afterSales/afterSalesDetail.vue
@@ -108,6 +108,7 @@
import { upload } from "@/api/common.js";
import { checkBankno } from "@/utils/Foundation";
import storage from "@/utils/storage.js";
import { getSessionId, userAction } from "@/api/userAction.js";
export default {
  component: {
    city,
@@ -169,13 +170,47 @@
        refundWay: "",
        serviceType: "", //申请类型
      },
     pageSessionNo:"",
    sendOnShow:false,
     actionParam:{
              sessionId:'',
              actionType:"PAGE",
              joinType:"SELF",
              pageCode:"REFUND_ORDER",
              pageParams:"{}",
              pageStatus:"JOIN",
              pageType:"DETAIL"
           }
    };
  },
  onUnload() {
    let   param = this.actionParam;
    if (this.sendOnShow)return
    param.pageStatus = "LEAVE"
    userAction(param)
  },
  onHide() {
    this.startHidenTime = Date.now()
    let   param = this.actionParam;
    this.sendOnShow = true;
    param.pageStatus = "LEAVE"
    userAction(param)
  },
   onShow() {
      getSessionId().then(res=>{
            this.pageSessionNo = res.data.data
            if(this.pageSessionNo){
            let   param = this.actionParam;
               param.sessionId = this.pageSessionNo
               userAction(param)
            }
      })
   },
  /**
   * 判断当前内容并生成数据
   */
  onLoad(options) {
   this.actionParam.pageParams = JSON.stringify(options)
    let navTitle = "申请售后";
    this.form.serviceType = "RETURN_GOODS";
    if (options.value == 1) {