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.
1 lines
21 KiB
1 lines
21 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/18634/Desktop/项目/xxdj1/pages/order.vue?9bd2","webpack:///C:/Users/18634/Desktop/项目/xxdj1/pages/order.vue?5e03","webpack:///C:/Users/18634/Desktop/项目/xxdj1/pages/order.vue?d81d","webpack:///C:/Users/18634/Desktop/项目/xxdj1/pages/order.vue?b6ca","uni-app:///pages/order.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","options","statusType","loading","popupInfo","lockTap","computed","pageActive","activeIndex","tabList","param","list","primaryColor","subColor","configInfo","userInfo","onLoad","tab","key","val","onPullDownRefresh","uni","onReachBottom","methods","initIndex","refresh","bg","initRefresh","getList","page","oldList","handerTabChange","scrollTop","goShop","cap_id","id","url","toCancel","order_code","order_goods","pay_type","image","goods_cover","name","index","refs_key","confirmCancel","title","confirmDel","toPay","pay_list","setTimeout","toHx","goDetail","toAgain","order_id","coach_id"],"mappings":";;;;;;;;;;;;;AAAA;AAE2D;AAC3D;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,cAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAkH;AAClH;AACyD;AACL;;;AAGpD;AACqK;AACrK,gBAAgB,+KAAU;AAC1B,EAAE,2EAAM;AACR,EAAE,gFAAM;AACR,EAAE,yFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;A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AAA;gBACA;kBACAH;gBACA;gBACA;kBACA;gBACA;kBACA;gBACA;gBACA;gBAAA;gBAAA;cAAA;gBAAA;gBAAA;gBAEA;gBAAA;cAAA;gBAAA;gBAAA;cAAA;gBAAA;gBAAA;gBAKAI;kBACA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IAEA;IACA;IACAC;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA,wBAIA,yBAFAjB,+BACAM;gBAEA;kBACAN;kBACAM;gBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACA;IACAY;MACA,IACAlB,KACA,sBADAA;MAEA;MACA;QACAC;MACA;IACA;IACA;IACAkB;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA,wBAIA,0BAFAC,qCACAC;gBAAA;gBAAA,OAGA;kBACAD;gBACA;cAAA;gBACA;kBACAnB;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;EAAA;AAEA;AAAA,2B","file":"pages/order.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;import '@dcloudio/uni-stat/dist/uni-stat.es.js';\nimport Vue from 'vue'\nimport Page from './pages/order.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./order.vue?vue&type=template&id=42e2fba5&\"\nvar renderjs\nimport script from \"./order.vue?vue&type=script&lang=js&\"\nexport * from \"./order.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/order.vue\"\nexport default component.exports","export * from \"-!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--17-0!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./order.vue?vue&type=template&id=42e2fba5&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var g0 = _vm.tabList.length\n var l0 = _vm.__map(_vm.list.data, function (item, index) {\n var $orig = _vm.__get_orig(item)\n var g1 = !(item.pay_type == 1)\n ? [2, 3, 4, 5, 6].includes(item.pay_type)\n : null\n return {\n $orig: $orig,\n g1: g1,\n }\n })\n var g2 = _vm.loading\n ? _vm.list.current_page >= _vm.list.last_page && _vm.list.data.length > 0\n : null\n var g3 =\n !_vm.loading && _vm.list.data.length <= 0 && _vm.list.current_page == 1\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n l0: l0,\n g2: g2,\n g3: g3,\n },\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./order.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./order.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"order-pages\">\r\n\t\t<fixed>\r\n\t\t\t<tab @change=\"handerTabChange\" :list=\"tabList\" :activeIndex=\"activeIndex*1\" :activeColor=\"primaryColor\"\r\n\t\t\t\t:width=\"100/tabList.length + '%'\" height=\"100rpx\"></tab>\r\n\t\t\t<view class=\"b-1px-b\"></view>\r\n\t\t</fixed>\r\n\r\n\t\t<view @tap.stop=\"goDetail(index,'detail')\" class=\"item-child mt-md ml-md mr-md pd-lg fill-base radius-16\"\r\n\t\t\tv-for=\"(item,index) in list.data\" :key=\"index\">\r\n\t\t\t<view @tap.stop=\"goShop(index)\" class=\"flex-between pb-lg b-1px-b\">\r\n\t\t\t\t<view class=\"f-paragraph c-title max-500 ellipsis\">订单号:{{item.order_code}}</view>\r\n\t\t\t\t<!-- // pay_type 1待支付,2待服务,3技师接单,4技师出发,5技师到达,6服务中,7服务完成 -->\r\n\t\t\t\t<view class=\"f-caption text-bold\"\r\n\t\t\t\t\t:style=\"{color:item.pay_type==1?primaryColor: [2,3,4,5,6].includes(item.pay_type)?subColor: item.pay_type == 7 ? '#11C95E' : '#333'}\">\r\n\t\t\t\t\t{{statusType[item.pay_type]}}\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"flex-center mt-lg\" v-for=\"(aitem,aindex) in item.order_goods\" :key=\"aindex\">\r\n\t\t\t\t<image mode=\"aspectFill\" class=\"cover radius-16\" :src=\"aitem.goods_cover\"></image>\r\n\t\t\t\t<view class=\"flex-1 ml-md\">\r\n\t\t\t\t\t<view class=\"flex-between\">\r\n\t\t\t\t\t\t<view class=\"f-title c-title text-bold max-400 ellipsis\">\r\n\t\t\t\t\t\t\t{{aitem.goods_name}}\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"f-desc c-desc\">x{{aitem.num}}</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"flex-center\" style=\"margin-bottom: 5rpx;\">\r\n\t\t\t\t\t\t<view class=\"flex-1 flex-y-center f-caption c-caption mt-md\"> 服务技师<view class=\"ml-md\">\r\n\t\t\t\t\t\t\t\t{{item.coach_info.coach_name}}\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"f-caption c-warning\" v-if=\"aitem.refund_num>0\">已退x{{aitem.refund_num}}\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"flex-y-center f-caption c-caption\">预约时间<view class=\"ml-md\">{{item.start_time}}</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"flex-between pt-lg\">\r\n\t\t\t\t<view class=\"flex-y-center f-desc c-title\">总计:\r\n\t\t\t\t\t<view class=\"f-paragraph c-title text-bold\">¥{{item.pay_price}}</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-warp\">\r\n\t\t\t\t\t<!-- // pay_type 1待支付,2待服务,3技师接单,4技师出发,5技师到达,6服务中,7服务完成,8待评价 -->\r\n\t\t\t\t\t<!-- 待支付 -->\r\n\t\t\t\t\t<block v-if=\"item.pay_type == 1\">\r\n\t\t\t\t\t\t<button @tap.stop=\"toCancel(index)\" class=\"clear-btn order\">取消订单</button>\r\n\t\t\t\t\t\t<button @tap.stop=\"toPay(index)\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\t:style=\"{color:'#fff',background:primaryColor,borderColor:primaryColor}\">去支付</button>\r\n\t\t\t\t\t</block>\r\n\t\t\t\t\t<!-- 支付超时 -->\r\n\t\t\t\t\t<block v-if=\"item.pay_type == -1\">\r\n\t\t\t\t\t\t<button @tap.stop=\"toCancel(index)\" class=\"clear-btn order\">删除</button>\r\n\t\t\t\t\t</block>\r\n\t\t\t\t\t<!-- 待服务 -->\r\n\t\t\t\t\t<button @tap.stop=\"goDetail(index,'refund')\" class=\"clear-btn order\"\r\n\t\t\t\t\t\tv-if=\"item.can_refund > 0\">申请退款</button>\r\n\t\t\t\t\t<!-- 已完成 -->\r\n\t\t\t\t\t<block v-if=\"item.pay_type == 7\">\r\n\t\t\t\t\t\t<!-- <button @tap.stop=\"goDetail(index,'evaluate')\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\tv-if=\"!item.is_comment\">去评价</button> -->\r\n\t\t\t\t\t\t<button @tap.stop=\"toAgain(index)\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\t:style=\"{color:'#fff',background:primaryColor,borderColor:primaryColor}\">再来一单</button>\r\n\t\t\t\t\t</block>\r\n\t\t\t\t\t<block v-if=\"item.pay_type == 8\">\r\n\t\t\t\t\t\t<button @tap.stop=\"goDetail(index,'evaluate')\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\tv-if=\"!item.is_comment\">去评价</button>\r\n\t\t\t\t\t\t<!-- <button @tap.stop=\"toAgain(index)\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\t:style=\"{color:'#fff',background:primaryColor,borderColor:primaryColor}\">再来一单</button> -->\r\n\t\t\t\t\t</block>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\r\n\t\t<load-more :noMore=\"list.current_page>=list.last_page&&list.data.length>0\" :loading=\"loading\" v-if=\"loading\">\r\n\t\t</load-more>\r\n\t\t<abnor v-if=\"!loading&&list.data.length<=0&&list.current_page==1\"></abnor>\r\n\r\n\t\t<view class=\"space-footer\"></view>\r\n\r\n\t\t<common-popup @confirm=\"confirmCancel\" ref=\"cancel_item\" type=\"CANCEL_ORDER\" :info=\"popupInfo\"></common-popup>\r\n\t\t<common-popup @confirm=\"confirmDel\" ref=\"del_item\" type=\"DELETE_ORDER\" :info=\"popupInfo\"></common-popup>\r\n\r\n\t\t<!-- <view :style=\"{height: `${configInfo.tabbarHeight}px`}\"></view> -->\r\n\t\t<!-- <tabbar :cur=\"2\"></tabbar> -->\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport {\r\n\t\tmapState,\r\n\t\tmapActions,\r\n\t\tmapMutations\r\n\t} from \"vuex\"\r\n\t// import tabbar from \"@/components/tabbar.vue\"\r\n\texport default {\r\n\t\t// components: {\r\n\t\t// \ttabbar\r\n\t\t// },\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\toptions: {},\r\n\t\t\t\tstatusType: {\r\n\t\t\t\t\t'-1': '已取消',\r\n\t\t\t\t\t1: '待支付',\r\n\t\t\t\t\t2: '待服务',\r\n\t\t\t\t\t3: '技师接单',\r\n\t\t\t\t\t4: '技师出发',\r\n\t\t\t\t\t5: '技师到达',\r\n\t\t\t\t\t6: '服务中',\r\n\t\t\t\t\t7: '已完成',\r\n\t\t\t\t},\r\n\t\t\t\tloading: true,\r\n\t\t\t\tpopupInfo: {},\r\n\t\t\t\tlockTap: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: mapState({\r\n\t\t\tpageActive: state => state.order.pageActive,\r\n\t\t\tactiveIndex: state => state.order.activeIndex,\r\n\t\t\ttabList: state => state.order.tabList,\r\n\t\t\tparam: state => state.order.param,\r\n\t\t\tlist: state => state.order.list,\r\n\t\t\tprimaryColor: state => state.config.configInfo.primaryColor,\r\n\t\t\tsubColor: state => state.config.configInfo.subColor,\r\n\t\t\tconfigInfo: state => state.config.configInfo,\r\n\t\t\tuserInfo: state => state.user.userInfo,\r\n\t\t}),\r\n\t\tasync onLoad(options) {\r\n\t\t\tlet {\r\n\t\t\t\ttab = 0\r\n\t\t\t} = options\r\n\t\t\tthis.updateOrderItem({\r\n\t\t\t\tkey: 'activeIndex',\r\n\t\t\t\tval: tab\r\n\t\t\t})\r\n\t\t\tawait this.initIndex()\r\n\t\t\tthis.updateOrderItem({\r\n\t\t\t\tkey: 'pageActive',\r\n\t\t\t\tval: true\r\n\t\t\t})\r\n\t\t},\r\n\t\tonPullDownRefresh() {\r\n\t\t\t// #ifndef APP-PLUS\r\n\t\t\tuni.showNavigationBarLoading()\r\n\t\t\t// #endif\r\n\t\t\tthis.initRefresh();\r\n\t\t\tuni.stopPullDownRefresh()\r\n\t\t},\r\n\t\tonReachBottom() {\r\n\t\t\tif (this.list.current_page >= this.list.last_page || this.loading) return;\r\n\t\t\tthis.loading = true;\r\n\t\t\tthis.getList(this.param.page + 1);\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t...mapActions(['getConfigInfo', 'getOrderList']),\r\n\t\t\t...mapMutations(['updateOrderItem']),\r\n\t\t\tasync initIndex(refresh = false) {\r\n\t\t\t\t// #ifdef H5\r\n\t\t\t\tif (!refresh && this.$jweixin.isWechat()) {\r\n\t\t\t\t\tawait this.$jweixin.initJssdk();\r\n\t\t\t\t\tthis.$jweixin.wxReady(() => {\r\n\t\t\t\t\t\tthis.$jweixin.hideOptionMenu()\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\t// #endif\r\n\t\t\t\tif (!this.configInfo.id || refresh) {\r\n\t\t\t\t\tawait this.getConfigInfo()\r\n\t\t\t\t}\r\n\t\t\t\tawait this.getList(1)\r\n\t\t\t\tthis.$util.setNavigationBarColor({\r\n\t\t\t\t\tbg: this.primaryColor\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\tinitRefresh() {\r\n\t\t\t\tthis.initIndex(true)\r\n\t\t\t},\r\n\t\t\tasync getList(page = 0) {\r\n\t\t\t\tif (page) {\r\n\t\t\t\t\tlet param = this.$util.deepCopy(this.param)\r\n\t\t\t\t\tparam.page = page\r\n\t\t\t\t\tthis.updateOrderItem({\r\n\t\t\t\t\t\tkey: 'param',\r\n\t\t\t\t\t\tval: param\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlist: oldList,\r\n\t\t\t\t\tparam,\r\n\t\t\t\t\ttabList,\r\n\t\t\t\t\tactiveIndex\r\n\t\t\t\t} = this\r\n\t\t\t\tparam.pay_type = tabList[activeIndex].id\r\n\t\t\t\tawait this.getOrderList(param)\r\n\t\t\t\tthis.loading = false\r\n\t\t\t\tthis.$util.hideAll()\r\n\t\t\t},\r\n\t\t\thanderTabChange(index) {\r\n\t\t\t\tthis.updateOrderItem({\r\n\t\t\t\t\tkey: 'activeIndex',\r\n\t\t\t\t\tval: index\r\n\t\t\t\t})\r\n\t\t\t\tuni.pageScrollTo({\r\n\t\t\t\t\tscrollTop: 0\r\n\t\t\t\t})\r\n\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\tthis.getList(1)\r\n\t\t\t},\r\n\t\t\t// 门店\r\n\t\t\tasync goShop(index) {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid: cap_id\r\n\t\t\t\t} = this.list.data[index].cap_info\r\n\t\t\t\tawait this.$api.order.selectCap({\r\n\t\t\t\t\tcap_id\r\n\t\t\t\t})\r\n\t\t\t\tthis.$util.goUrl({\r\n\t\t\t\t\turl: `/pages/index?key=2`\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 取消/删除订单\r\n\t\t\tasync toCancel(index) {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid,\r\n\t\t\t\t\torder_code,\r\n\t\t\t\t\torder_goods,\r\n\t\t\t\t\tpay_type,\r\n\t\t\t\t} = this.list.data[index]\r\n\t\t\t\tlet {\r\n\t\t\t\t\tgoods_cover: image,\r\n\t\t\t\t} = order_goods[0]\r\n\t\t\t\tthis.popupInfo = {\r\n\t\t\t\t\tid,\r\n\t\t\t\t\tname: `系统单号:${order_code}`,\r\n\t\t\t\t\timage,\r\n\t\t\t\t\tindex,\r\n\t\t\t\t}\r\n\t\t\t\tlet refs_key = pay_type == -1 ? 'del_item' : 'cancel_item'\r\n\t\t\t\tthis.$refs[refs_key].open()\r\n\t\t\t},\r\n\t\t\t// 确认:取消订单\r\n\t\t\tasync confirmCancel() {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid,\r\n\t\t\t\t\tindex,\r\n\t\t\t\t} = this.popupInfo\r\n\t\t\t\tawait this.$api.order.cancelOrder({\r\n\t\t\t\t\tid\r\n\t\t\t\t})\r\n\t\t\t\tif (this.activeIndex == 0) {\r\n\t\t\t\t\tthis.list.data[index].pay_type = -1\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.list.data.splice(index, 1)\r\n\t\t\t\t}\r\n\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\ttitle: `取消成功`\r\n\t\t\t\t})\r\n\t\t\t\tthis.$refs.cancel_item.close()\r\n\t\t\t},\r\n\t\t\t// 确认:删除订单\r\n\t\t\tasync confirmDel() {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid,\r\n\t\t\t\t\tindex,\r\n\t\t\t\t} = this.popupInfo\r\n\t\t\t\tawait this.$api.order.delOrder({\r\n\t\t\t\t\tid\r\n\t\t\t\t})\r\n\t\t\t\tthis.list.data.splice(index, 1)\r\n\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\ttitle: `删除成功`\r\n\t\t\t\t})\r\n\t\t\t\tthis.$refs.del_item.close()\r\n\t\t\t},\r\n\t\t\t// 去支付\r\n\t\t\tasync toPay(index) {\r\n\t\t\t\tif (this.lockTap) return;\r\n\t\t\t\tthis.lockTap = true;\r\n\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid\r\n\t\t\t\t} = this.list.data[index]\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlet {\r\n\t\t\t\t\t\tpay_list\r\n\t\t\t\t\t} = await this.$api.order.rePayOrder({\r\n\t\t\t\t\t\tid\r\n\t\t\t\t\t})\r\n\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\tif (pay_list) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tawait this.$util.pay(pay_list)\r\n\t\t\t\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\t\t\t\ttitle: `支付成功`\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tif (this.activeIndex == 0) {\r\n\t\t\t\t\t\t\t\tthis.list.data[index].pay_type = 2\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.list.data.splice(index, 1)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.lockTap = false;\r\n\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\tthis.lockTap = false;\r\n\t\t\t\t\t\t\treturn\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tthis.lockTap = false\r\n\t\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\t}, 2000)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 去核销\r\n\t\t\tasync toHx(index) {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid,\r\n\t\t\t\t\tqr: image\r\n\t\t\t\t} = this.list.data[index]\r\n\t\t\t\tthis.popupInfo = {\r\n\t\t\t\t\tid,\r\n\t\t\t\t\timage\r\n\t\t\t\t}\r\n\t\t\t\tthis.$refs.hx_item.open()\r\n\t\t\t},\r\n\t\t\t// 订单详情/申请退款/去评价\r\n\t\t\tgoDetail(index, page) {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid\r\n\t\t\t\t} = this.list.data[index]\r\n\t\t\t\tlet url = `/user/pages/order/${page}?id=${id}`\r\n\t\t\t\tthis.$util.goUrl({\r\n\t\t\t\t\turl\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 再来一单\r\n\t\t\tasync toAgain(index) {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid: order_id,\r\n\t\t\t\t\tcoach_id\r\n\t\t\t\t} = this.list.data[index]\r\n\r\n\t\t\t\tawait this.$api.order.onceMoreOrder({\r\n\t\t\t\t\torder_id\r\n\t\t\t\t})\r\n\t\t\t\tthis.$util.goUrl({\r\n\t\t\t\t\turl: `/user/pages/order?id=${coach_id}`\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n\r\n<style lang=\"scss\">\r\n</style>\r\n"],"sourceRoot":""} |