1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/老农商城/mall-laonong/pagesA/order/detail.vue?0236","webpack:///D:/老农商城/mall-laonong/pagesA/order/detail.vue?1420","webpack:///D:/老农商城/mall-laonong/pagesA/order/detail.vue?f30c","webpack:///D:/老农商城/mall-laonong/pagesA/order/detail.vue?a84a","uni-app:///pagesA/order/detail.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,+F,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,eAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAA+H;AAC/H;AAC0D;AACL;;;AAGrD;AACoL;AACpL,gBAAgB,2LAAU;AAC1B,EAAE,4EAAM;AACR,EAAE,6FAAM;AACR,EAAE,sGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,iGAAU;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,aAAa,oMAEN;AACP;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjCA;AAAA;AAAA;AAAA;AAAwrB,CAAgB,srBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACiG5sB;AACA,gD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;eACA,EACA,IADA,kBACA,CACA,SACA,eADA,EACA;AACA,gBAFA,EAGA,gBAHA,EAIA,KAJA,EAIA;AACA,0BALA,EAKA;AACA,kBANA,EAMA;AACA,iBAPA,GASA,CAXA,EAYA,MAZA,kBAYA,EAZA,EAYA,CACA,6BACA,4CACA,sBACA,CAhBA,EAiBA,WACA;AACA,kBAFA,4BAEA,kBACA,kBACA,YADA,IAGA,iFACA,oBACA,yBACA,6BACA,kIACA,6GACA,CACA,kBACA,uBACA,CATA,EAUA,CAhBA,EAkBA;AACA,YAnBA,oBAmBA,MAnBA,EAmBA,mBACA,eACA,oBADA,CACA;AADA,QAGA,oEACA,oBACA,iDACA,iBACA,0BADA,IAGA,CALA,MAKA,CACA,yCACA,CACA,CATA,EAUA,CAjCA,EAkCA;AACA,YAnCA,oBAmCA,EAnCA,EAmCA,mBACA,eACA,YADA,CACA;AADA,QAGA,sEACA,oBACA,iDACA,iBACA,0BADA,IAGA,CALA,MAKA,CACA,yCACA,CACA,CATA,EAUA,CAjDA,EAkDA;AACA,YAnDA,oBAmDA,KAnDA,EAmDA,CACA,iBACA,8BACA,qCACA,YACA,uBADA,EAEA,aAFA,GAIA,kBACA,CANA,EAOA,uCACA,iBACA,6BADA,IAGA,CAjEA,EAkEA;AACA,UAnEA,oBAmEA,CACA,+DACA,CArEA,EAjBA,E","file":"pagesA/order/detail.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesA/order/detail.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./detail.vue?vue&type=template&id=35bf19e6&scoped=true&\"\nvar renderjs\nimport script from \"./detail.vue?vue&type=script&lang=js&\"\nexport * from \"./detail.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../HBuilderX-app开发版/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 \"35bf19e6\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pagesA/order/detail.vue\"\nexport default component.exports","export * from \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./detail.vue?vue&type=template&id=35bf19e6&scoped=true&\"","var components\ntry {\n components = {\n statusNav: function() {\n return import(\n /* webpackChunkName: \"components/status-nav/status-nav\" */ \"@/components/status-nav/status-nav.vue\"\n )\n }\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./detail.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./detail.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"pad-x170\" v-if=\"isLoading\">\r\n\t\t<status-nav :ifReturn=\"true\" navBarTitle=\"订单详情\" :marginBottom=\"0\" :backTag=\"backTag\"></status-nav>\r\n\t\t<!-- 收件人信息 -->\r\n\t\t<view class=\"settlement-content pad-zy20 border-box\">\r\n\t\t\t<!-- 订单简介 -->\r\n\t\t\t<view class=\"section background-white radius30 mar-x40 pad-all25 border-box font30\">\r\n\t\t\t\t<view class=\"order-info pad-zy20 border-box\">\r\n\t\t\t\t\t<view class=\"flex mar-s20\">\r\n\t\t\t\t\t\t<text>订单编号</text>\r\n\t\t\t\t\t\t<text>{{orderDetail.coding}}</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"flex mar-s20\">\r\n\t\t\t\t\t\t<text>下单时间</text>\r\n\t\t\t\t\t\t<text>{{orderDetail.created_at}}</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"flex mar-s20\">\r\n\t\t\t\t\t\t<text>订单状态</text>\r\n\t\t\t\t\t\t<text>{{orderDetail.status_text}}</text>\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<!-- 订单信息 -->\r\n\t\t\t<view class=\"section background-white radius30 mar-x40 pad-all25 border-box font30\">\r\n\t\t\t\t<view class=\"title\">订单信息</view>\r\n\t\t\t\t<view class=\"shop-slide-list\">\r\n\t\t\t\t\t<view class=\"shop-slide-item\">\r\n\t\t\t\t\t\t<view class=\"item border-box background-white flex\" v-for=\"(item,index) in orderDetail.skus\" :key=\"index\">\r\n\t\t\t\t\t\t\t<view class=\"shop-img radius30\">\r\n\t\t\t\t\t\t\t\t<image :src=\"item.spu_cover\" mode=\"widthFix\"></image> \r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"shop-txt\">\r\n\t\t\t\t\t\t\t\t<view class=\"shop-txt-top\">\r\n\t\t\t\t\t\t\t\t\t<view class=\"title font30 clips1\">{{item.spu_name}}</view>\r\n\t\t\t\t\t\t\t\t\t<view class=\"specs font24 color-66 mar-sx10 clips2\">规格:{{item.sku_name}}</view>\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t<view class=\"shop-txt-bottom flex\">\r\n\t\t\t\t\t\t\t\t\t<!-- 商品价格 -->\r\n\t\t\t\t\t\t\t\t\t<view class=\"price font30 color-red\">¥{{item.price}}<text class=\"font24 color-66\">x{{item.num}}</text></view>\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</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<!-- 收货信息 -->\r\n\t\t\t<view class=\"section background-white radius30 mar-x40 pad-all25 border-box font30\">\r\n\t\t\t\t<view class=\"title\">收货信息</view>\r\n\t\t\t\t<view class=\"addressee-info mar-s20 flex\">\r\n\t\t\t\t\t<view class=\"txt\">\r\n\t\t\t\t\t\t<view class=\"font30 mar-x10\">{{orderDetail.address_info.name}}<text>{{orderDetail.address_info.phone}}</text></view>\r\n\t\t\t\t\t\t<text class=\"font24 color-8c\">{{orderDetail.address_info.province_str}}{{orderDetail.address_info.city_str}}{{orderDetail.address_info.county_str}}{{orderDetail.address_info.address}}</text>\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<!-- 物流信息 -->\r\n\t\t\t<view class=\"section background-white radius30 mar-x40 pad-all25 border-box font30\" v-if=\"orderDetail.express_name!==''\">\r\n\t\t\t\t<view class=\"title\">物流信息</view>\r\n\t\t\t\t<view class=\"addressee-info mar-s20 flex\">\r\n\t\t\t\t\t<view class=\"txt\" style=\"width: 100%;\">\r\n\t\t\t\t\t\t<view class=\"font30 mar-x10\">{{orderDetail.express_name}}</view>\r\n\t\t\t\t\t\t<view class=\"txt-coding font24 flex\" style=\"margin-top: 10rpx;\">\r\n\t\t\t\t\t\t\t<text class=\"color-8c\">快递单号:{{orderDetail.express_number}}</text>\r\n\t\t\t\t\t\t\t<view class=\"copy_btn\" @tap=\"copyEV\">复制查询</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</view>\r\n\t\t\t<!-- 付款信息 -->\r\n\t\t\t<view class=\"section background-white radius30 mar-x40 pad-all25 border-box font30\" v-if=\"orderDetail.status!=='waiting'\">\r\n\t\t\t\t<view class=\"pay-info\">\r\n\t\t\t\t\t<view class=\"flex\">\r\n\t\t\t\t\t\t<text>商品总金额</text>\r\n\t\t\t\t\t\t<text class=\"color-red\">{{orderDetail.original_price}}</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"flex mar-s20\">\r\n\t\t\t\t\t\t<text>折扣优惠</text>\r\n\t\t\t\t\t\t<text class=\"color-red\">{{coupon_vip_price>0?coupon_vip_price:0}}</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"flex mar-s20\">\r\n\t\t\t\t\t\t<text>积分抵扣</text>\r\n\t\t\t\t\t\t<text class=\"color-red\">{{orderDetail.score_deduction_money>0?orderDetail.score_deduction_money:0}}</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"pay-actual mar-s30 flex\">实付款:<text class=\"color-red font36\">{{priceAll>0?'¥'+ priceAll:0}}</text></view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 尾部 -->\r\n\t\t<view class=\"pull-btn background-white border-box\" style=\"box-shadow: 0 -9rpx 21rpx rgba(0,0,0,.1);\">\r\n\t\t\t<view class=\"btn border-btn border-box color-8c font36 radius30 flex\" @tap=\"cancleEv(orderDetail.coding)\" v-if=\"orderDetail.status == 'waiting' || orderDetail.status == 'paid'\">取消订单</view>\r\n\t\t\t<view class=\"btn border-box background-orange color-ff font36 radius30 flex\" @tap=\"affirmEv(orderDetail.id)\" v-if=\"orderDetail.status == 'shipped'\">确认收货</view>\r\n\t\t\t<view class=\"btn border-btn border-box color-8c font36 radius30 flex\" @tap=\"buyAgain\" v-if=\"orderDetail.status == 'completed' || orderDetail.status == 'closed'\">再次购买</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport {getCartInfo} from '@/jsFile/public-api.js';\r\n\timport {mapState} from 'vuex'//引入mapState\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\torderDetail:{}, //订单详情\r\n\t\t\t\tflag:true,\r\n\t\t\t\tisLoading:false,\r\n\t\t\t\tid:0, //订单id\r\n\t\t\t\tcoupon_vip_price:'', //折扣优惠\r\n\t\t\t\tpriceAll:'', //实际付款\r\n\t\t\t\tbackTag:'',\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad(op) {\r\n\t\t\tif(op.id){this.id = op.id;}\r\n\t\t\tif(op.backTag){this.backTag = op.backTag;}\r\n\t\t\tthis.getOrderDetail();\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 查询订单详情\r\n\t\t\tgetOrderDetail(){\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\ttitle:'加载中'\r\n\t\t\t\t});\r\n\t\t\t\tthis.$requst.get('/api/user/order-detail',{id:this.id}).then(res=>{\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tconsole.log(res,'订单详情')\r\n\t\t\t\t\t\tthis.orderDetail = res.data;\r\n\t\t\t\t\t\tthis.coupon_vip_price = this.$toolAll.tools.addXiaoShu(parseFloat(res.data.discount_money) + parseFloat(res.data.coupon_price));\r\n\t\t\t\t\t\tthis.priceAll = this.$toolAll.tools.addXiaoShu(parseFloat(res.data.balance) + parseFloat(res.data.wechat));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\tthis.isLoading = true;\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 取消订单\r\n\t\t\tcancleEv(coding){\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\torder_coding: coding //订单号\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('/api/order/cancel',params).then(res=>{\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\tthis.$toolAll.tools.showToast('取消订单成功(*^▽^*)');\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\turl:'/pagesA/order/order'\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg)\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 确认收货\r\n\t\t\taffirmEv(id){\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\torder_id: id //订单号\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('/api/order/accepted',params).then(res=>{\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\tthis.$toolAll.tools.showToast('确认收货成功(*^▽^*)');\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\turl:'/pagesA/order/order'\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg)\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 再次购买\r\n\t\t\tbuyAgain(index){\r\n\t\t\t\tlet buyList = [];\r\n\t\t\t\tlet newArr = this.orderDetail;\r\n\t\t\t\tnewArr.skus.forEach(item=>{\r\n\t\t\t\t\tlet obj = {\r\n\t\t\t\t\t\tsku_coding: item.coding,\r\n\t\t\t\t\t\tnum: item.num\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbuyList.push(obj);\r\n\t\t\t\t})\r\n\t\t\t\tuni.setStorageSync('buyList',buyList);\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:'/pages/cart/settlement'\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 复制查询\r\n\t\t\tcopyEV(){\r\n\t\t\t\tthis.$toolAll.tools.clickCopy(this.orderDetail.express_number);\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style scoped>\r\n\t\r\n</style>"],"sourceRoot":""} |