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
24 KiB
1 lines
24 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/pages/order.vue?07c9","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/pages/order.vue?9543","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/pages/order.vue?3aa3","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/pages/order.vue?faab","uni-app:///pages/order.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","components","tabbar","data","options","statusType","loading","popupInfo","lockTap","computed","activeIndex","tabList","param","list","primaryColor","subColor","configInfo","userInfo","onLoad","tab","key","val","onPullDownRefresh","uni","onReachBottom","methods","initIndex","refresh","initRefresh","getList","page","oldList","handerTabChange","scrollTop","toCancel","id","order_code","order_goods","pay_type","image","goods_cover","name","index","refs_key","confirmCancel","title","confirmDel","toPay","console","pm","pay_model","pay_list","orderInfo","provider","setTimeout","toHx","goDetail","url","toAgain","order_id","coach_id"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,cAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAkH;AAClH;AACyD;AACL;;;AAGpD;AACuM;AACvM,gBAAgB,iNAAU;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;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjEA;AAAA;AAAA;AAAA;AAAsxB,CAAgB,myBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;AC6H1yB;AAIA;AAAA;AAAA;EAAA;IAAA;EAAA;AAAA;AAAA,eAEA;EACAC;IACAC;EACA;EACAC;IACA;MACAC;MACAC;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACA;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;EACA;EACAC;IAAA;IAAA;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA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","file":"pages/order.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\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 \"!../../../../Downloads/HBuilderX.3.99.2023122611/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 \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/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 var g2 = item.order_goods.length\n var m0 = _vm.$t(\"action.attendantName\")\n var g3 = item.order_goods.length\n return {\n $orig: $orig,\n g1: g1,\n g2: g2,\n m0: m0,\n g3: g3,\n }\n })\n var g4 = _vm.loading\n ? _vm.list.current_page >= _vm.list.last_page && _vm.list.data.length > 0\n : null\n var g5 =\n !_vm.loading && _vm.list.data.length <= 0 && _vm.list.current_page == 1\n if (!_vm._isMounted) {\n _vm.e0 = function ($event, item) {\n var _temp = arguments[arguments.length - 1].currentTarget.dataset,\n _temp2 = _temp.eventParams || _temp[\"event-params\"],\n item = _temp2.item\n var _temp, _temp2\n $event.stopPropagation()\n return _vm.$util.goUrl({\n openType: \"copy\",\n url: item.order_code,\n })\n }\n _vm.e1 = function ($event, item) {\n var _temp3 = arguments[arguments.length - 1].currentTarget.dataset,\n _temp4 = _temp3.eventParams || _temp3[\"event-params\"],\n item = _temp4.item\n var _temp3, _temp4\n $event.stopPropagation()\n return _vm.$util.goUrl({\n url:\n \"/user/pages/bell/list?id=\" + item.id + \"&coach_id=\" + item.coach_id,\n })\n }\n }\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n l0: l0,\n g4: g4,\n g5: g5,\n },\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/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 \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/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<!-- #ifndef H5 -->\r\n\t\t<uni-nav-bar :fixed=\"true\" :shadow=\"false\" :statusBar=\"true\" title=\"订单\" color=\"#ffffff\"\r\n\t\t\t:backgroundColor=\"primaryColor\">\r\n\t\t</uni-nav-bar>\r\n\t\t<view :style=\"{height:`${configInfo.navBarHeight}px`}\"></view>\r\n\t\t<fixed :top=\"configInfo.navBarHeight\">\r\n\t\t\t<!-- #endif -->\r\n\t\t\t<!-- #ifdef H5 -->\r\n\t\t\t<fixed>\r\n\t\t\t\t<!-- #endif -->\r\n\t\t\t\t<tab @change=\"handerTabChange\" :list=\"tabList\" :activeIndex=\"activeIndex*1\" :activeColor=\"primaryColor\"\r\n\t\t\t\t\t:width=\"100/tabList.length + '%'\" height=\"100rpx\"></tab>\r\n\t\t\t\t<view class=\"b-1px-b\"></view>\r\n\t\t\t</fixed>\r\n\r\n\t\t\t<view @tap.stop=\"goDetail(index,'detail')\"\r\n\t\t\t\tclass=\"item-child mt-md ml-md mr-md pd-lg fill-base radius-16 rel\" v-for=\"(item,index) in list.data\"\r\n\t\t\t\t:key=\"index\">\r\n\t\t\t\t<view v-if=\"item.is_add\">\r\n\t\t\t\t\t<view class=\"bell-tag flex-center f-icontext c-base abs\" :style=\"{background:primaryColor}\">加钟服务\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"space-md\"></view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pb-lg b-1px-b\">\r\n\t\t\t\t\t<view class=\"f-paragraph c-title max-450 ellipsis\"\r\n\t\t\t\t\t\t@tap.stop=\"$util.goUrl({openType:'copy',url:item.order_code})\">订单号:{{item.order_code}}\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- // pay_type 1待支付,2待服务,3技-师接单,4技-师出发,5技-师到达,6服务中,7服务完成 -->\r\n\t\t\t\t\t<view class=\"f-caption text-bold\"\r\n\t\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\t{{statusType[item.pay_type]}}\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\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\t<!-- #ifdef H5 -->\r\n\t\t\t\t\t<view class=\"cover radius-16\">\r\n\t\t\t\t\t\t<view class=\"h5-image cover radius-16\"\r\n\t\t\t\t\t\t\t:style=\"{ backgroundImage : `url('${aitem.goods_cover}')`}\">\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- #endif -->\r\n\t\t\t\t\t<!-- #ifndef H5 -->\r\n\t\t\t\t\t<image mode=\"aspectFill\" class=\"cover radius-16\" :src=\"aitem.goods_cover\"></image>\r\n\t\t\t\t\t<!-- #endif -->\r\n\t\t\t\t\t<view class=\"flex-1 ml-md\">\r\n\t\t\t\t\t\t<view class=\"flex-between\">\r\n\t\t\t\t\t\t\t<view class=\"f-mini-title c-title text-bold max-400 ellipsis\">\r\n\t\t\t\t\t\t\t\t{{aitem.goods_name}}\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"f-desc c-desc\">x{{aitem.num}}</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"flex-center\" :style=\"{marginTop:aindex==item.order_goods.length-1?'6rpx':'20rpx'}\">\r\n\t\t\t\t\t\t\t<view class=\"flex-1 flex-y-center f-caption c-caption\">服务{{$t('action.attendantName')}}\r\n\t\t\t\t\t\t\t\t<view class=\"ml-md max-280 ellipsis\">\r\n\t\t\t\t\t\t\t\t\t{{item.coach_info ? item.coach_info.coach_name : '-'}}\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</view>\r\n\t\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\t</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"flex-y-center f-caption c-caption\">预约时间<view class=\"ml-md\">{{item.start_time}}\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=\"flex-y-center f-caption c-caption\" v-if=\"aindex==item.order_goods.length-1\">总计:\r\n\t\t\t\t\t\t\t<view class=\"flex-y-baseline c-warning text-bold\">¥\r\n\t\t\t\t\t\t\t\t<view class=\"f-title\">{{item.pay_price}}</view>\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</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pt-lg\">\r\n\t\t\t\t\t<view></view>\r\n\t\t\t\t\t<view class=\"flex-warp\">\r\n\t\t\t\t\t\t<!-- 待支付 -->\r\n\t\t\t\t\t\t<block v-if=\"item.pay_type == 1\">\r\n\t\t\t\t\t\t\t<button @tap.stop=\"toCancel(index)\" class=\"clear-btn order\">取消订单</button>\r\n\t\t\t\t\t\t\t<button @tap.stop=\"toPay(index)\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\t\t:style=\"{color:'#fff',background:primaryColor,borderColor:primaryColor}\">去支付</button>\r\n\t\t\t\t\t\t</block>\r\n\t\t\t\t\t\t<!-- 支付超时 -->\r\n\t\t\t\t\t\t<block v-if=\"item.pay_type == -1 || item.pay_type == 7\">\r\n\t\t\t\t\t\t\t<button @tap.stop=\"toCancel(index)\" class=\"clear-btn order\">删除</button>\r\n\t\t\t\t\t\t</block>\r\n\t\t\t\t\t\t<!-- 待服务 -->\r\n\t\t\t\t\t\t<button @tap.stop=\"goDetail(index,'refund')\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\tv-if=\"item.can_refund > 0\">申请退款</button>\r\n\t\t\t\t\t\t<!-- 服务中 -->\r\n\t\t\t\t\t\t<!-- is_add 加钟订单 -->\r\n\t\t\t\t\t\t<block v-if=\"item.pay_type == 6 && (item.is_add || (!item.is_add && item.can_add_order))\">\r\n\t\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\t\t@tap.stop=\"$util.goUrl({url:`/user/pages/bell/list?id=${item.id}&coach_id=${item.coach_id}`})\"\r\n\t\t\t\t\t\t\t\tclass=\"clear-btn order\"\r\n\t\t\t\t\t\t\t\t:style=\"{color:'#fff',background:primaryColor,borderColor:primaryColor}\"\r\n\t\t\t\t\t\t\t\tv-if=\"\">{{item.is_add?'升级项目':'升级/加钟'}}</button>\r\n\t\t\t\t\t\t</block>\r\n\t\t\t\t\t\t<!-- 已完成 -->\r\n\t\t\t\t\t\t<block v-if=\"item.coach_id && item.pay_type == 7 && !item.is_add\">\r\n\t\t\t\t\t\t\t<button @tap.stop=\"goDetail(index,'evaluate')\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\t\tv-if=\"!item.is_comment\">去评价</button>\r\n\t\t\t\t\t\t\t<button @tap.stop=\"toAgain(index)\" class=\"clear-btn order\"\r\n\t\t\t\t\t\t\t\t:style=\"{color:'#fff',background:primaryColor,borderColor:primaryColor}\"\r\n\t\t\t\t\t\t\t\tv-if=\"item.can_again\">再来一单</button>\r\n\t\t\t\t\t\t</block>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\r\n\t\t\t<load-more :noMore=\"list.current_page>=list.last_page&&list.data.length>0\" :loading=\"loading\"\r\n\t\t\t\tv-if=\"loading\">\r\n\t\t\t</load-more>\r\n\t\t\t<abnor v-if=\"!loading&&list.data.length<=0&&list.current_page==1\"></abnor>\r\n\t\t\t<view class=\"space-footer\"></view>\r\n\r\n\t\t\t<common-popup @confirm=\"confirmCancel\" ref=\"cancel_item\" type=\"CANCEL_ORDER\" :info=\"popupInfo\">\r\n\t\t\t</common-popup>\r\n\t\t\t<common-popup @confirm=\"confirmDel\" ref=\"del_item\" type=\"DELETE_ORDER\" :info=\"popupInfo\"></common-popup>\r\n\r\n\t\t\t<view :style=\"{height: `${configInfo.tabbarHeight}px`}\"></view>\r\n\t\t\t<tabbar :cur=\"4\"></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\timport tabbar from \"@/components/tabbar.vue\"\r\n\texport default {\r\n\t\tcomponents: {\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: this.$t('action.attendantName') + '接单',\r\n\t\t\t\t\t4: this.$t('action.attendantName') + '出发',\r\n\t\t\t\t\t5: this.$t('action.attendantName') + '到达',\r\n\t\t\t\t\t6: '服务中',\r\n\t\t\t\t\t7: '已完成',\r\n\t\t\t\t\t8: '待转单'\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\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\t// 支付后需刷新页面\r\n\t\t\tawait this.initIndex()\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},\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\ttry {\r\n\t\t\t\t\tawait this.getOrderList(param)\r\n\t\t\t\t\tthis.loading = false\r\n\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tthis.loading = false\r\n\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t}\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 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 ? 'cancel_item' : 'del_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\tconsole.log('index',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\tpm\r\n\t\t\t\t} = this.list.data[index]\r\n\t\t\t let pay_model=pm\r\n\t\t\t\tconsole.log('pay_model',pay_model);\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\tif (pay_model == 3) {\r\n\t\t\t\t\t\t\tpay_list = {\r\n\t\t\t\t\t\t\t\torderInfo: pay_list,\r\n\t\t\t\t\t\t\t\tprovider: 'alipay'\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// #ifdef H5\r\n\r\n\t\t\t\t\t\tif (pay_model == 3) {\r\n\t\t\t\t\t\t\tpay_list = Object.assign({}, pay_list, {\r\n\t\t\t\t\t\t\t\torder_id: id,\r\n\t\t\t\t\t\t\t\tpage_url: `/pages/order?tab=2`\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tthis.updateOrderItem({\r\n\t\t\t\t\t\t\t\tkey: 'alipayOrderParams',\r\n\t\t\t\t\t\t\t\tval: pay_list\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tthis.$util.goUrl({\r\n\t\t\t\t\t\t\t\turl: '/user/pages/alipay-result'\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\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\tthis.initRefresh()\r\n\t\t\t\t\t\t\t}, 3000)\r\n\t\t\t\t\t\t\treturn\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// #endif\r\n\t\t\t\t\t\t\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\tconsole.log('zhifu');\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\tconsole.log('zhifu',e);\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\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\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>\n"],"sourceRoot":""} |