1 |
- {"version":3,"sources":["uni-app:///main.js","webpack:///D:/yzm/worknew/wardrobe/pages/gouwuche/index.vue?b418","webpack:///D:/yzm/worknew/wardrobe/pages/gouwuche/index.vue?ba2d","webpack:///D:/yzm/worknew/wardrobe/pages/gouwuche/index.vue?b6ec","webpack:///D:/yzm/worknew/wardrobe/pages/gouwuche/index.vue?d50a","uni-app:///pages/gouwuche/index.vue","webpack:///D:/yzm/worknew/wardrobe/pages/gouwuche/index.vue?3fda","webpack:///D:/yzm/worknew/wardrobe/pages/gouwuche/index.vue?77f5"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,gG,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,cAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkH;AAClH;AACyD;AACL;AACc;;;AAGlE;AACgM;AAChM,gBAAgB,0MAAU;AAC1B,EAAE,2EAAM;AACR,EAAE,gFAAM;AACR,EAAE,yFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA,aAAa,2OAEN;AACP,KAAK;AACL;AACA,aAAa,yNAEN;AACP,KAAK;AACL;AACA,aAAa,2OAEN;AACP,KAAK;AACL;AACA,aAAa,2RAEN;AACP,KAAK;AACL;AACA,aAAa,2OAEN;AACP,KAAK;AACL;AACA,aAAa,+NAEN;AACP,KAAK;AACL;AACA,aAAa,2RAEN;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,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACxEA;AAAA;AAAA;AAAA;AAAmvB,CAAgB,gwBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmCvwB,+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAGA,EACA,IADA,kBACA,CACA,SACA,UADA,EAEA,QAFA,EAGA,YAHA,EAGA;AACA;AACA,oBALA,EAMA;AACA,eAPA,EAQA;AACA,iBATA,GAWA,CAbA,EAcA,MAdA,oBAcA,CAEA,CAhBA,EAiBA,OAjBA,qBAiBA,CACA,mCACA,iBACA,yBADA,IAGA,CACA,mCACA,eACA,CAzBA,EA0BA,WACA;AACA,aAFA,uBAEA,CACA,mBACA,mCACA,oBACA,CAFA,EAGA,CAJA,MAIA,CACA,iBACA,qBACA,CAFA,MAEA;AACA;AACA;AACA,WAFA;AAGA;;AAEA;AACA;AACA,KAlBA;AAmBA;AACA,UApBA,oBAoBA;AACA;AACA;AACA;AACA,OAFA;AAGA;AACA;AACA;AACA;AACA,OAHA,MAGA;AACA;AACA;AACA;AACA;AACA,KAlCA;AAmCA;AACA,YApCA,sBAoCA;AACA;AACA;AACA,2CADA;AAEA,sBAFA;AAGA,gBAHA;AAIA,UAJA,CAIA;AACA;AACA;AACA;AACA,4BADA;AAEA,+BAFA;;AAIA;AACA,SAPA,MAOA;AACA;AACA,0BADA;AAEA,+BAFA;;AAIA;AACA,OAlBA;AAmBA,KAzDA;AA0DA,SA1DA,mBA0DA;AACA;AACA,sBADA;AAEA,gBAFA;AAGA,gBAHA;AAIA;AACA;AACA;AACA;AACA,4BADA;AAEA,oDAFA;AAGA,kDAHA;AAIA,gCAJA;AAKA,sCALA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA,uBADA;AAEA,wBAFA;;AAIA;AACA,OANA,MAMA;AACA;AACA,oCADA;AAEA,wBAFA;AAGA;AACA,wBADA;AAEA,uBAFA,EAHA;;AAOA,YAPA,CAOA;AACA;AACA;AACA,8BADA;AAEA,iCAFA;;AAIA;AACA,WANA,MAMA;AACA;AACA,4BADA;AAEA,iCAFA;;AAIA;AACA,SApBA;AAqBA;AACA,KA1GA;AA2GA;AACA,WA5GA,qBA4GA;AACA;AACA,sBADA;AAEA,cAFA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBADA;AAEA,wBAFA;;AAIA;AACA;AACA;AACA,2CADA;AAEA,sBAFA;AAGA;AACA,iBADA,EAHA;;AAMA,UANA,CAMA;AACA;AACA;AACA,4BADA;AAEA,+BAFA;;AAIA;AACA,SANA,MAMA;AACA;AACA,0BADA;AAEA,+BAFA;;AAIA;AACA,OAnBA;AAoBA,KAtJA;AAuJA;AACA,QAxJA,gBAwJA,IAxJA,EAwJA;AACA;AACA;AACA;AACA,uBADA;AAEA,6BAFA;;AAIA;AACA;;AAEA;AACA,KAnKA;AAoKA;AACA,OArKA,iBAqKA;AACA;AACA,KAvKA;;AAyKA;AACA,eA1KA,uBA0KA,GA1KA,EA0KA;AACA;AACA;AACA,wCADA;AAEA,sBAFA;AAGA;AACA,gCADA;AAEA,gCAFA,EAHA;;AAOA,UAPA,CAOA;AACA;AACA;AACA,0BADA;AAEA,+BAFA;;AAIA;AACA,OAdA;AAeA;AACA,KA5LA;;AA8LA;AACA,SA/LA,mBA+LA;AACA;AACA,eADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA1MA;AA2MA;AACA,WA5MA,qBA4MA;AACA;AACA;AACA,yCADA;AAEA,sBAFA;AAGA,gBAHA;AAIA,UAJA,CAIA;AACA;AACA;AACA;AACA;AACA,+CADA;AAEA,gDAFA;AAGA;AACA;AACA,iDALA;AAMA,qCANA;AAOA,6CAPA;AAQA,yCARA;AASA,4BATA;AAUA,iDAVA;;AAYA;AACA;AACA;AACA,SAlBA,MAkBA;AACA;AACA;AACA,OA1BA;AA2BA,KAzOA,EA1BA,E;;;;;;;;;;;;;ACtCA;AAAA;AAAA;AAAA;AAAk5C,CAAgB,m2CAAG,EAAC,C;;;;;;;;;;;ACAt6C;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/gouwuche/index.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/gouwuche/index.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./index.vue?vue&type=template&id=1b349b91&\"\nvar renderjs\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../exe/HBuilderX.3.4.7.20220422/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/gouwuche/index.vue\"\nexport default component.exports","export * from \"-!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=template&id=1b349b91&\"","var components\ntry {\n components = {\n tmMenubars: function() {\n return import(\n /* webpackChunkName: \"tm-vuetify/components/tm-menubars/tm-menubars\" */ \"@/tm-vuetify/components/tm-menubars/tm-menubars.vue\"\n )\n },\n tmSheet: function() {\n return import(\n /* webpackChunkName: \"tm-vuetify/components/tm-sheet/tm-sheet\" */ \"@/tm-vuetify/components/tm-sheet/tm-sheet.vue\"\n )\n },\n tmCheckbox: function() {\n return import(\n /* webpackChunkName: \"tm-vuetify/components/tm-checkbox/tm-checkbox\" */ \"@/tm-vuetify/components/tm-checkbox/tm-checkbox.vue\"\n )\n },\n tmCartCellListFood: function() {\n return import(\n /* webpackChunkName: \"tm-vuetify/components/tm-cartCellListFood/tm-cartCellListFood\" */ \"@/tm-vuetify/components/tm-cartCellListFood/tm-cartCellListFood.vue\"\n )\n },\n tmListitem: function() {\n return import(\n /* webpackChunkName: \"tm-vuetify/components/tm-listitem/tm-listitem\" */ \"@/tm-vuetify/components/tm-listitem/tm-listitem.vue\"\n )\n },\n tmButton: function() {\n return import(\n /* webpackChunkName: \"tm-vuetify/components/tm-button/tm-button\" */ \"@/tm-vuetify/components/tm-button/tm-button.vue\"\n )\n },\n tmMessage: function() {\n return import(\n /* webpackChunkName: \"tm-vuetify/components/tm-message/tm-message\" */ \"@/tm-vuetify/components/tm-message/tm-message.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 var g0 = _vm.$tm.vx.state()\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0\n }\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view :style=\"{ minHeight: sys.windowHeight + 'px' }\" :class=\"[$tm.vx.state().tmVuetify.black ? 'black' : ' ']\">\r\n\t\t<tm-menubars title=\"购物车列表\" :shadow=\"0\" :showback=\"true\"></tm-menubars>\r\n\t\t<view class=\"zhuti shangpin\" v-if=\"test.length>0\">\r\n\t\t\t<tm-sheet :padding=\"[0, 0]\" class=\"jiaoxi xiao\">\r\n\t\t\t\t<view class=\"\" style=\"width:100%;\">\r\n\t\t\t\t\t<tm-checkbox @change=\"chooseAll\" v-model=\"checked\"></tm-checkbox>{{checked?'取消全选':'全选'}}\r\n\t\t\t\t</view>\r\n\t\t\t\t<view v-for=\"item in test\">\r\n\t\t\t\t\t<tm-checkbox @change=\"choose\" style=\"float: left;padding:2px !important;margin-top:9%;\"\r\n\t\t\t\t\t\tv-model=\"item.checked\" label=\"\"></tm-checkbox>\r\n\t\t\t\t\t<tm-cartCellListFood @change=\"shuliangjia(item)\" v-on:jian=\"jian(item)\" v-on:jia=\"jia(item)\"\r\n\t\t\t\t\t\tclass=\"shuliang\" :typeclick=\"typeclick\" :mdata=\"item\" :cart-num.sync=\"item.buy\">\r\n\t\t\t\t\t</tm-cartCellListFood>\r\n\t\t\t\t</view>\r\n\t\t\t</tm-sheet>\r\n\t\t\t\r\n\t\t</view>\r\n\t\t<view class=\"dibu\">\r\n\t\t\t<tm-listitem class=\"liebiao\" value=\"免费\" :round=\"24\" :shadow=\"12\" title=\"邮费\" :show-right-icon=\"false\">\r\n\t\t\t</tm-listitem>\r\n\t\t\t<tm-listitem class=\"liebiao jiageList\" :value=\"'¥'+zongjia\" :round=\"24\" :shadow=\"12\" title=\"价格\"\r\n\t\t\t\t:show-right-icon=\"false\"></tm-listitem>\r\n\t\t\t<view class=\"text-align-center\">\r\n\t\t\t\t<!-- <tm-button theme=\"red\" @click=\"qingkong()\" :round=\"24\" class=\"mt-50 logincla\">清空</tm-button> -->\r\n\r\n\t\t\t\t<tm-button theme=\"red\" @click=\"shanchu\" :round=\"24\" class=\"mt-50 logincla\">删除</tm-button>\r\n\t\t\t\t<tm-button theme=\"primary\" :round=\"24\" class=\"mt-50 logincla\" @click=\"goPay\">立即付款</tm-button>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 弹出层消息 -->\r\n\t\t<tm-message ref=\"toast\"></tm-message>\r\n\t</view>\r\n</template>\r\n<script>\r\n\timport {\r\n\t\tmyRequest\r\n\t} from '@/api/request.js'\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tzongjia: 0,\r\n\t\t\t\ttest: [],\r\n\t\t\t\ttypeclick: 2, //1加入购物车,2购物车\r\n\t\t\t\t// 全选状态\r\n\t\t\t\tchecked: false,\r\n\t\t\t\t// 数量默认为1\r\n\t\t\t\tnumber: 1,\r\n\t\t\t\t// 是否全选\r\n\t\t\t\tisAll: true\r\n\t\t\t};\r\n\t\t},\r\n\t\tonLoad() {\r\n\r\n\t\t},\r\n\t\tcreated() {\r\n\t\t\tif (!uni.getStorageSync(\"token\")) {\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl: \"/pages/login/index\",\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\tthis.sys = uni.getSystemInfoSync();\r\n\t\t\tthis.getList()\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 全选\r\n\t\t\tchooseAll() {\r\n\t\t\t\tif (this.checked) {\r\n\t\t\t\t\tthis.test.forEach(item => {\r\n\t\t\t\t\t\titem.checked = true\r\n\t\t\t\t\t})\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (this.isAll) {\r\n\t\t\t\t\t\tthis.checked = false\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.test.forEach(item => {\r\n\t\t\t\t\t\t\titem.checked = false\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tthis.jiage()\r\n\t\t\t},\r\n\t\t\t// 单选\r\n\t\t\tchoose() {\r\n\t\t\t\tlet status = []\r\n\t\t\t\tthis.test.forEach(item => {\r\n\t\t\t\t\tstatus.push(item.checked)\r\n\t\t\t\t})\r\n\t\t\t\t// console.log(status, '单选状态数组');\r\n\t\t\t\tif (status.includes(false)) {\r\n\t\t\t\t\tthis.checked = false;\r\n\t\t\t\t\tthis.isAll = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.checked = true;\r\n\t\t\t\t\tthis.isAll = false;\r\n\t\t\t\t}\r\n\t\t\t\tthis.jiage()\r\n\t\t\t},\r\n\t\t\t// 清空\r\n\t\t\tqingkong() {\r\n\t\t\t\tlet that = this;\r\n\t\t\t\tmyRequest({\r\n\t\t\t\t\turl: '/api/ShopCart/deleteAllGoods',\r\n\t\t\t\t\tmethod: 'post',\r\n\t\t\t\t\tdata: {}\r\n\t\t\t\t}).then(res => {\r\n\t\t\t\t\tif (res.data.code == 200) {\r\n\t\t\t\t\t\tconsole.log(res.data.data, '33');\r\n\t\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\t\tmodel: 'success',\r\n\t\t\t\t\t\t\tlabel: res.data.msg\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tthis.getList()\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\t\tmodel: 'error',\r\n\t\t\t\t\t\t\tlabel: res.data.msg\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\tgoPay() {\r\n\t\t\t\tvar that = this,\r\n\t\t\t\t\tdata = this.test,\r\n\t\t\t\t\tgoods = [],\r\n\t\t\t\t\tgw_id = [];\r\n\t\t\t\tfor (let i = 0; i < data.length; i++) {\r\n\t\t\t\t\tif (data[i].checked) {\r\n\t\t\t\t\t\tconsole.log(that.zongjia, 'ss');\r\n\t\t\t\t\t\tgoods.push({\r\n\t\t\t\t\t\t\torder_remark: '',\r\n\t\t\t\t\t\t\torder_money: data[i].buy * data[i].price,\r\n\t\t\t\t\t\t\tpay_money: data[i].buy * data[i].price,\r\n\t\t\t\t\t\t\tbuy_num: data[i].buy,\r\n\t\t\t\t\t\t\tgoods_id: data[i].goods_id,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tgw_id.push(data[i].id)\r\n\t\t\t\t\t\tconsole.log(goods, gw_id, '下单数据');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (goods.length == 0) {\r\n\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\tmodel: 'warn',\r\n\t\t\t\t\t\tlabel: '请选择商品'\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmyRequest({\r\n\t\t\t\t\t\turl: \"/api/Order/addOrder\",\r\n\t\t\t\t\t\tmethod: 'post',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tgw_id: gw_id,\r\n\t\t\t\t\t\t\tgood: goods\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).then(res => {\r\n\t\t\t\t\t\tif (res.data.code == 200) {\r\n\t\t\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\t\t\tmodel: 'success',\r\n\t\t\t\t\t\t\t\tlabel: res.data.msg\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tthis.getList()\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\t\t\tmodel: 'error',\r\n\t\t\t\t\t\t\t\tlabel: res.data.msg\r\n\t\t\t\t\t\t\t})\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\t// /删除\r\n\t\t\tshanchu() {\r\n\t\t\t\tvar that = this,\r\n\t\t\t\t\tdata = this.test,\r\n\t\t\t\t\tids = [];\r\n\t\t\t\tfor (let i = 0; i < data.length; i++) {\r\n\t\t\t\t\tif (data[i].checked) {\r\n\t\t\t\t\t\tids.push(data[i].id)\r\n\t\t\t\t\t\tconsole.log(ids);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (ids.length == data.length) {\r\n\t\t\t\t\tconsole.log(ids.length, data.length);\r\n\t\t\t\t\tthis.checked = true;\r\n\t\t\t\t}\r\n\t\t\t\tconsole.log(data, '数据');\r\n\t\t\t\tif (ids.length == 0) {\r\n\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\tmodel: 'warn',\r\n\t\t\t\t\t\tlabel: '请选择商品'\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\tmyRequest({\r\n\t\t\t\t\turl: \"/api/ShopCart/deleteOneGoods\",\r\n\t\t\t\t\tmethod: 'post',\r\n\t\t\t\t\tdata: {\r\n\t\t\t\t\t\tid: ids\r\n\t\t\t\t\t}\r\n\t\t\t\t}).then(res => {\r\n\t\t\t\t\tif (res.data.code == 200) {\r\n\t\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\t\tmodel: 'success',\r\n\t\t\t\t\t\t\tlabel: res.data.msg\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tthis.getList()\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\t\tmodel: 'error',\r\n\t\t\t\t\t\t\tlabel: res.data.msg\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\t// 按钮减\r\n\t\t\tjian(data) {\r\n\t\t\t\tconsole.log(data);\r\n\t\t\t\tif (data.buy <= 1) {\r\n\t\t\t\t\tthis.$refs.toast.show({\r\n\t\t\t\t\t\tmodel: 'warn',\r\n\t\t\t\t\t\tlabel: '该商品不能减少了哟~'\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.number = -1;\r\n\t\t\t},\r\n\t\t\t// 按钮加\r\n\t\t\tjia() {\r\n\t\t\t\tthis.number = 1;\r\n\t\t\t},\r\n\r\n\t\t\t// 数量增减\r\n\t\t\tshuliangjia(num) {\r\n\t\t\t\tvar that = this;\r\n\t\t\t\tmyRequest({\r\n\t\t\t\t\turl: \"/api/ShopCart/addShopCart\",\r\n\t\t\t\t\tmethod: 'post',\r\n\t\t\t\t\tdata: {\r\n\t\t\t\t\t\tgoods_id: num.goods_id,\r\n\t\t\t\t\t\tgoods_num: that.number\r\n\t\t\t\t\t}\r\n\t\t\t\t}).then(res => {\r\n\t\t\t\t\tif (res.data.code == 200) {} else {\r\n\t\t\t\t\t\tthat.$refs.toast.show({\r\n\t\t\t\t\t\t\tmodel: 'error',\r\n\t\t\t\t\t\t\tlabel: res.data.msg\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\tthis.jiage();\r\n\t\t\t},\r\n\r\n\t\t\t// 总价\r\n\t\t\tjiage() {\r\n\t\t\t\tvar data = this.test,\r\n\t\t\t\t\tjiage = 0;\r\n\t\t\t\tfor (let i = 0; i < data.length; i++) {\r\n\t\t\t\t\tif (data[i].checked) {\r\n\t\t\t\t\t\tvar danjia = JSON.parse(data[i].price);\r\n\t\t\t\t\t\tvar shuliang = data[i].buy;\r\n\t\t\t\t\t\tjiage = jiage + (danjia * shuliang);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.zongjia = jiage;\r\n\t\t\t},\r\n\t\t\t// /获取购物车列表\r\n\t\t\tgetList() {\r\n\t\t\t\tvar that = this;\r\n\t\t\t\tmyRequest({\r\n\t\t\t\t\turl: \"/api/ShopCart/shopCartList\",\r\n\t\t\t\t\tmethod: 'post',\r\n\t\t\t\t\tdata: {}\r\n\t\t\t\t}).then(res => {\r\n\t\t\t\t\tif (res.data.code == 200) {\r\n\t\t\t\t\t\tthat.test = [];\r\n\t\t\t\t\t\tfor (let i = 0; i < res.data.data.length; i++) {\r\n\t\t\t\t\t\t\tvar obj = {\r\n\t\t\t\t\t\t\t\timg: res.data.data[i].goods_image,\r\n\t\t\t\t\t\t\t\ttitle: res.data.data[i].goods_name,\r\n\t\t\t\t\t\t\t\t// label: '黑色 - 6518/320',\r\n\t\t\t\t\t\t\t\t// size:'S',\r\n\t\t\t\t\t\t\t\tprice: res.data.data[i].goods_price,\r\n\t\t\t\t\t\t\t\tid: res.data.data[i].id,\r\n\t\t\t\t\t\t\t\tbuy: res.data.data[i].goods_num,\r\n\t\t\t\t\t\t\t\titemId: res.data.data[i].id,\r\n\t\t\t\t\t\t\t\tchecked: false,\r\n\t\t\t\t\t\t\t\tgoods_id: res.data.data[i].goods_id\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tthat.test.push(obj)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthat.jiage()\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthat.test = [];\r\n\t\t\t\t\t}\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<style lang=\"scss\">\r\n\t/deep/ .tm-menubars .body {\r\n\t\tbackground-color: #1b1b1b !important;\r\n\t}\r\n\r\n\t/deep/ .jiaoxi {\r\n\t\tmargin: 0 !important;\r\n\t\tpadding: 8px !important;\r\n\t\tmargin-bottom: 200px !important;\r\n\t}\r\n\r\n\t/deep/ .shangpin .white.bk {\r\n\t\tbackground-color: #1b1b1b !important;\r\n\t}\r\n\r\n\t/deep/ .shangpin .tm-cartCellListFood {\r\n\t\tpadding: 0px 0px 15px 0px !important;\r\n\t\tmargin-top: 5px !important;\r\n\t\tmargin-bottom: 20px !important;\r\n\t\tborder-bottom: 1px solid #303030;\r\n\t}\r\n\r\n\t/deep/ .shangpin .border-t-1.bk {\r\n\t\tborder-top: 1px solid #1b1b1b !important;\r\n\t}\r\n\r\n\t/deep/ .shangpin .title {\r\n\t\tcolor: white !important;\r\n\t}\r\n\r\n\t/deep/ .shangpin .text-red {\r\n\t\tcolor: white !important;\r\n\t}\r\n\r\n\t/deep/ .shangpin .round-3 {\r\n\t\twidth: 90px !important;\r\n\t\theight: 90px !important;\r\n\t}\r\n\r\n\t/deep/ .shangpin .tm-cartCellListFood-img {\r\n\t\twidth: 90px !important;\r\n\t\theight: 90px !important;\r\n\t}\r\n\r\n\t/deep/ .shuliang .text-size-n {\r\n\t\tcolor: white !important;\r\n\t}\r\n\r\n\t.dibu {\r\n\t\tbackground: #0D0D0D;\r\n\t\tposition: fixed;\r\n\t\tbottom: 0px;\r\n\t\twidth: 100%;\r\n\t}\r\n\r\n\t/deep/ .liebiao .grey-darken-4.bk {\r\n\t\tbackground: #0D0D0D !important;\r\n\t\tpadding: 0px;\r\n\t\tmargin: 0px;\r\n\t\twidth: 100%;\r\n\t\tborder-radius: 0px !important;\r\n\t}\r\n\r\n\t.logincla {\r\n\t\twidth: 40%;\r\n\t\tmargin: 0 auto;\r\n\t\tmargin-top: 20px;\r\n\t\tmargin-bottom: 30px;\r\n\t}\r\n\r\n\t/deep/ .jiageList .d-inline-block {\r\n\t\tfont-size: 18px !important;\r\n\t\tcolor: white !important;\r\n\t}\r\n</style>\r\n","import mod from \"-!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1678780469876\n var cssReload = require(\"D:/yzm/exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}
|