1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/鲁班家具小程序/luban-mall/pagesA/cart/settlement.vue?4418","webpack:///D:/鲁班家具小程序/luban-mall/pagesA/cart/settlement.vue?573d","webpack:///D:/鲁班家具小程序/luban-mall/pagesA/cart/settlement.vue?525a","webpack:///D:/鲁班家具小程序/luban-mall/pagesA/cart/settlement.vue?85cb","uni-app:///pagesA/cart/settlement.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,sG,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,mBAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAuH;AACvH;AAC8D;AACL;;;AAGzD;AACoL;AACpL,gBAAgB,2LAAU;AAC1B,EAAE,gFAAM;AACR,EAAE,qFAAM;AACR,EAAE,8FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,yFAAU;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;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAA4rB,CAAgB,0rBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC+ChtB;AACA,gD,uUAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAFA,MAEA;AACA;AACA;AACA;AACA;AACA;AACA,C;AACA;AACA;AACA,wBADA,EADA;;AAIA,MAJA,kBAIA;AACA;AACA,gBADA;AAEA,iBAFA,EAEA;AACA,cAHA,EAGA;AACA,eAJA,EAIA;AACA,gBALA;AAMA;AACA;AACA,oBADA,GAPA;;AAUA,iCAVA;AAWA,6BAXA;AAYA,yBAZA,CAYA;AAZA;AAcA,GAnBA;AAoBA,QApBA,kBAoBA,EApBA,EAoBA;AACA;AACA;AACA;AACA,GAxBA;AAyBA,QAzBA,oBAyBA;AACA;AACA;AACA;AACA;AACA;AACA,OAJA;AAKA,KANA,MAMA;AACA;AACA;AACA,GAnCA;AAoCA;AACA;AACA,eAFA,yBAEA;AACA;AACA;AACA;AACA,kDAFA,CAEA;AACA,+CAHA,CAGA;AACA,8CAJA,CAIA;AACA;AACA,OAPA;AAQA,KAXA;AAYA;AACA,UAbA,oBAaA;AACA;AACA;AACA;AACA,iDADA;AAEA,iCAFA;AAGA,kCAHA;AAIA,qCAJA;AAKA,iCALA;;AAOA;AACA;AACA;AACA,oGADA;;AAGA;AACA;AACA,aAFA,EAEA,IAFA;AAGA,WAPA,MAOA;AACA;AACA;AACA;AACA;AACA,aAFA,EAEA,IAFA;AAGA;AACA,SAfA;AAgBA;AACA,KAxCA;AAyCA,cAzCA,wBAyCA;AACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KAvDA;AAwDA,YAxDA,oBAwDA,KAxDA,EAwDA;AACA;AACA,KA1DA;AA2DA,cA3DA,sBA2DA,KA3DA,EA2DA,CA3DA,EA2DA;AACA;AACA,KA7DA,EApCA,E","file":"pagesA/cart/settlement.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesA/cart/settlement.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./settlement.vue?vue&type=template&id=3adaca74&\"\nvar renderjs\nimport script from \"./settlement.vue?vue&type=script&lang=js&\"\nexport * from \"./settlement.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 null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pagesA/cart/settlement.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!./settlement.vue?vue&type=template&id=3adaca74&\"","var components\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!./settlement.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!./settlement.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"pad-b150\">\r\n\t\t<status-nav :ifReturn=\"true\" navBarTitle=\"订单提交\" :marginBottom=\"0\"></status-nav>\r\n\t\t<view class=\"settlement-content\">\r\n\t\t\t<view class=\"settlement-title\">联系方式</view>\r\n\t\t\t<view class=\"settlement-tips\">请输入您的联系方式,我们将尽快与您联系并确认订单信息!</view>\r\n\t\t\t<view class=\"settlement-list\">\r\n\t\t\t\t<view class=\"settlement-item\">\r\n\t\t\t\t\t<view class=\"name\">联系人</view>\r\n\t\t\t\t\t<view class=\"txt flex\">\r\n\t\t\t\t\t\t<text>称呼</text>\r\n\t\t\t\t\t\t<input type=\"text\" v-model=\"name\" @tap=\"chooseEv(0)\" :class=\"current==0 ? 'focusc' : ''\" placeholder=\"请输入您的称呼\" placeholder-style=\"color:#999999\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"settlement-item\">\r\n\t\t\t\t\t<view class=\"name\">联系方式</view>\r\n\t\t\t\t\t<view class=\"txt flex\">\r\n\t\t\t\t\t\t<text>电话</text>\r\n\t\t\t\t\t\t<input type=\"text\" v-model=\"phone\" @tap=\"chooseEv(1)\" :class=\"current==1 ? 'focusc' : ''\" placeholder=\"请输入手机号码\" placeholder-style=\"color:#999999\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"settlement-item\">\r\n\t\t\t\t\t<view class=\"name\">联系地址</view>\r\n\t\t\t\t\t<view class=\"txt flex\">\r\n\t\t\t\t\t\t<text>地址</text>\r\n\t\t\t\t\t\t<input type=\"text\" v-model=\"address\" @tap=\"chooseEv(2)\" :class=\"current==2 ? 'focusc' : ''\" placeholder=\"请输入地址\" placeholder-style=\"color:#999999\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"settlement-item\">\r\n\t\t\t\t\t<view class=\"name\">送货时间</view>\r\n\t\t\t\t\t<view class=\"txt flex\">\r\n\t\t\t\t\t\t<text>日期</text>\r\n\t\t\t\t\t\t<picker mode=\"date\" :start=\"startDate\" :end=\"endDate\" @change=\"chooseTime(3,$event)\">\r\n\t\t\t\t\t\t\t<input type=\"text\" v-model=\"toTime\" disabled @tap=\"chooseEv(0)\" :class=\"current==0 ? 'focusc' : ''\" placeholder=\"请选择送货日期\" placeholder-style=\"color:#999999\">\r\n\t\t\t\t\t\t</picker>\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</view>\r\n\t\t<view class=\"settlement-btn flex\">\r\n\t\t\t<view class=\"btn\" @tap=\"submit\">提交订单</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport statusNav from '@/components/status-navs/status-nav';\r\n\timport {getCartNum,userInfoEv} from '@/jsFile/public-api.js';\r\n\timport {mapState} from 'vuex'//引入mapState\r\n\tfunction getDate(type) {\r\n\t\tconst date = new Date();\r\n\t\tlet year = date.getFullYear();\r\n\t\tlet month = date.getMonth() + 1;\r\n\t\tlet day = date.getDate();\r\n\t\tif (type === 'start') {\r\n\t\t\tyear = year;\r\n\t\t} else if (type === 'end') {\r\n\t\t\tyear = year + 10;\r\n\t\t}\r\n\t\tmonth = month > 9 ? month : '0' + month;\r\n\t\tday = day > 9 ? day : '0' + day;\r\n\t\treturn `${year}-${month}-${day}`;\r\n\t}\r\n\texport default {\r\n\t\tcomponents:{\r\n\t\t\tstatusNav\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tcurrent:6,\r\n\t\t\t\taddress:'',// 地址\r\n\t\t\t\tname:'',// 称呼\r\n\t\t\t\tphone:'',// 电话\r\n\t\t\t\tflag:true,\r\n\t\t\t\t// 日期\r\n\t\t\t\ttoTime: getDate({\r\n\t\t\t\t\tformat: true\r\n\t\t\t\t}),\r\n\t\t\t\tstartDate: getDate('start'),\r\n\t\t\t\tendDate: getDate('end'),\r\n\t\t\t\tcacheBusinessId:-1, //商户id\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad(op) {\r\n\t\t\tif(op.business_id){\r\n\t\t\t\tthis.cacheBusinessId = op.business_id;\r\n\t\t\t}\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\tif(this.cacheBusinessId !== -1){\r\n\t\t\t\tthis.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{\r\n\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\tthis.getUserInfo()\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}else{\r\n\t\t\t\tthis.getUserInfo()\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 获取默认信息\r\n\t\t\tgetUserInfo(){\r\n\t\t\t\tthis.$requst.get('/api/user/info').then(res=>{\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\tuni.setStorageSync('business_id',res.data.business_id);\r\n\t\t\t\t\t\tthis.address = res.data.order_address; //地址\r\n\t\t\t\t\t\tthis.name = res.data.order_contact; //联系人\r\n\t\t\t\t\t\tthis.phone = res.data.order_phone; //电话\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\tsubmit(){\r\n\t\t\t\tif(this.checkEmpty() && this.flag){\r\n\t\t\t\t\tthis.flag = false;\r\n\t\t\t\t\tlet params = {\r\n\t\t\t\t\t\tsku_list: uni.getStorageSync('buyList'),\r\n\t\t\t\t\t\torder_phone: this.phone,\r\n\t\t\t\t\t\torder_contact: this.name,\r\n\t\t\t\t\t\torder_address: this.address,\r\n\t\t\t\t\t\torder_date: this.toTime,\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.$requst.post('/api/order/create',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\t\turl:`/pagesA/cart/finish?id=${res.data.id}&coding=${res.data.coding}`\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\t\t\tthis.flag = true;\r\n\t\t\t\t\t\t\t},1200)\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconsole.log(res.msg,'提示信息')\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg);\r\n\t\t\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\t\t\tthis.flag = true;\r\n\t\t\t\t\t\t\t},1200)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tcheckEmpty(){\r\n\t\t\t\tlet result = false;\r\n\t\t\t\tif(!this.name) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请填写联系人');\r\n\t\t\t\t} else if(this.$toolAll.tools.isPhone(this.phone)) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请正确填写联系电话');\r\n\t\t\t\t} else if(!this.address) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请填写收货地址');\r\n\t\t\t\t} else if(!this.toTime) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请选择送货时间');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult = true;\r\n\t\t\t\t}\r\n\t\t\t\treturn result;\r\n\t\t\t},\r\n\t\t\tchooseEv(index) {\r\n\t\t\t\tthis.current = index;\r\n\t\t\t},\r\n\t\t\tchooseTime(index,e) {\r\n\t\t\t\tthis.toTime = e.detail.value;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t\r\n</style>\r\n"],"sourceRoot":""} |