1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"version":3,"sources":["webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/components/bottomkf.vue?076e","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/components/bottomkf.vue?99a2","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/components/bottomkf.vue?df26","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/components/bottomkf.vue?eef5","uni-app:///components/bottomkf.vue"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAqH;AACrH;AAC4D;AACL;;;AAGvD;AACgL;AAChL,gBAAgB,uLAAU;AAC1B,EAAE,8EAAM;AACR,EAAE,mFAAM;AACR,EAAE,4FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,uFAAU;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;;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAsqB,CAAgB,oqBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACsE1rB;AACA;AACA;AACA,kBADA;AAEA;AACA;AACA,OAJA,EADA;;AAOA;AACA,kBADA;AAEA,iBAFA,EAPA,EADA;;;AAaA,MAbA,kBAaA;AACA;AACA,iBADA;AAEA,oBAFA;AAGA,YAHA;AAIA,kBAJA;AAKA,kBALA;AAMA,gBANA;AAOA,gBAPA;AAQA,mBARA;AASA,kBATA;AAUA,gDAVA,CAUA;AAVA;AAYA,GA1BA;AA2BA;AACA;AACA;AACA,KAHA,EA3BA;;AAgCA,SAhCA,qBAgCA;AACA;AACA;AACA;AACA,GApCA;AAqCA;AACA,QADA,kBACA;AACA;AACA,KAHA;AAIA,UAJA,oBAIA,4DAJA;AAKA,SALA,mBAKA;AACA;AACA;AACA;AACA;AACA,SAFA,EAEA,IAFA;AAGA;AACA,KAZA;AAaA,SAbA,mBAaA;AACA;AACA;AACA;AACA;AACA,SAFA,EAEA,IAFA;AAGA,OALA,MAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCADA;AAEA,4BAFA;;AAIA;AACA;AACA;AACA,SAVA;AAWA;AACA,KApCA;AAqCA,WArCA,qBAqCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAPA,EAOA,mBAPA;AAQA,KAlDA;AAmDA,OAnDA,iBAmDA;AACA;AACA;AACA;AACA,gCADA;AAEA,wCAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,oDADA;;AAGA;AACA,OARA,EAQA,mBARA;AASA,KApEA;AAqEA,cArEA,sBAqEA,EArEA,EAqEA,KArEA,EAqEA;AACA,0BADA,CACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DADA;AAEA,qBAFA;;AAIA;AACA,KAjFA;AAkFA,YAlFA,sBAkFA;AACA;AACA;AACA;AACA,KAtFA;AAuFA,YAvFA,sBAuFA;AACA;AACA;AACA;AACA,KA3FA;AA4FA,cA5FA,wBA4FA;AACA;AACA,KA9FA,EArCA,E","file":"components/bottomkf.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./bottomkf.vue?vue&type=template&id=4e8aea01&\"\nvar renderjs\nimport script from \"./bottomkf.vue?vue&type=script&lang=js&\"\nexport * from \"./bottomkf.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../HbuilderX/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 = \"components/bottomkf.vue\"\nexport default component.exports","export * from \"-!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./bottomkf.vue?vue&type=template&id=4e8aea01&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n if (!_vm._isMounted) {\n _vm.e0 = function($event) {\n _vm.isBtn = false\n }\n }\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./bottomkf.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./bottomkf.vue?vue&type=script&lang=js&\"","<template>\n <view>\n <view class=\"bacb disba padding20 posi-bzy\" style=\"border-top: 1rpx solid #eeeeee;\">\r\n \t<view class=\"disba\" style=\"width: 24%;\">\r\n \t\t<view @tap=\"goHome\" class=\"discc margin-z20\">\r\n \t\t\t<image class=\"bottosimg\" src=\"/static/img/public/home.png\" mode=\"\"></image>\r\n \t\t\t<view class=\"fon24 bottoc\">首页</view>\r\n \t\t</view>\r\n \t\t<view @tap=\"goKef\" class=\"discc posir\">\r\n \t\t\t<image class=\"bottokimg\" src=\"/static/img/public/xkef.png\" mode=\"\"></image>\r\n \t\t\t<view class=\"fon24 bottoc\">客服</view>\r\n\t\t\t\t\t<button v-if=\"showKf\" class=\"fon24 bottoc posia\" style=\"opacity: 0;\" open-type=\"contact\" bindcontact=\"huik\">客服</button>\r\n \t\t</view>\r\n \t</view>\r\n \t<view v-if=\"user_type!='personal'\" class=\"disac\">\r\n \t\t<view @tap=\"diaoq\" class=\"margin-y20 textc bottoj\">加入购物车</view>\r\n \t\t<view @tap=\"diaoq\" class=\"textc bottol\">立即购买</view>\r\n \t</view>\r\n\t\t\t<view v-if=\"user_type=='personal'\" class=\"disac\">\r\n\t\t\t\t<view @tap=\"diaoq\" class=\"textc bottol\">点击查看</view>\r\n\t\t\t</view>\r\n </view>\r\n <!-- 底部弹框 -->\r\n <view @touchmove.stop.prevent=\"moveHandle\" v-if=\"isBtn\" class=\"posiall zIn5\" style=\"background-color: rgba(0,0,0,.6);\">\r\n <view class=\"posi-bzy padding20\" style=\"border-top-left-radius: 30rpx;border-top-right-radius: 30rpx;background-color: #FFFFFF;z-index: 6;\">\r\n <view class=\"margin-s20 dis\">\r\n <image class=\"flexs\" style=\"width: 201rpx;height: 201rpx;border-radius: 10rpx;\" :src=\"srcImg\"></image>\r\n <view class=\"margin-z20 width100\">\r\n <view class=\"colorf6 fon24 bold\">¥<text class=\"fon28\">{{detail.sku_list[sku_index].cur_price/100}}</text>.0</view>\r\n <view class=\"fon28 color33\">{{detail.name}}</view>\r\n </view>\r\n <view @tap=\"isBtn=false\" style=\"flex-shrink: 0; width: 38rpx;height: 38rpx;border-radius: 100%;background-color: rgba(0,0,0,.15);position: relative;display: flex;justify-content: center;align-items: center;top: -10rpx;\">\r\n <view style=\"width: 2rpx;height: 20rpx;background-color: #666666;position: absolute;transform: rotate(45deg);\"></view>\r\n <view style=\"width: 2rpx;height: 20rpx;background-color: #666666;position: absolute;transform: rotate(-45deg);\"></view>\r\n </view>\r\n </view>\r\n <view class=\"bold color33 margin-s30\" style=\"font-size: 30rpx;\">规格选择</view>\r\n <view class=\"disac flw\">\r\n <view @tap=\"chooseguig(item.id,indexg)\" \r\n :class=\"guigCurrent==indexg?'guigactive':'guigmo'\" \r\n class=\"fon24 margin-s20 margin-y10 padding-sx10 padding-zy30\" \r\n v-for=\"(item,indexg) in guigArr\" :key=\"indexg\"\r\n style=\"background-color: #f3f3f3;border-radius: 30rpx;min-width: 60rpx;text-align: center;max-width: 100%;\"><view class=\"clips1\">{{item.title}}</view></view>\r\n </view>\r\n <view class=\"borbot margin-x20 margin-s30\"></view>\r\n <view v-if=\"user_type!='personal'\" class=\"disba\">\r\n <view class=\"width100\">数量</view>\r\n <view class=\"disac\" style=\"justify-content:flex-end;\">\r\n \t<!-- 递减 -->\r\n\t\t\t\t\t\t<view @tap=\"delEvent(0)\" class=\"disbcac padding-sx30\">\r\n\t\t\t\t\t\t\t<image class=\"margin-y20\" style=\"width: 18rpx;height: 4rpx;\" src=\"../static/img/product/del.png\"></image>\r\n\t\t\t\t\t\t</view>\r\n \t<!-- 数量框 -->\r\n \t<input type=\"text\" disabled v-model=\"num\" style=\"width: 40%;background-color: #F5F5F5;text-align: center;padding: 4rpx 0;border-radius: 4rpx;\"/>\r\n \t<!-- 递增 -->\r\n\t\t\t\t\t\t<view @tap=\"addEvent(1)\" class=\"disbcac padding-sx30\">\r\n\t\t\t\t\t\t\t<image class=\"margin-zy20\" style=\"width: 18rpx;height: 18rpx;\" src=\"../static/img/product/add.png\"></image>\r\n\t\t\t\t\t\t</view>\r\n </view>\r\n </view>\r\n <view v-if=\"user_type!='personal'\" class=\"disbcac padding-sx40\">\r\n <view @tap=\"addGowc\" class=\"bold padding-sx20 padding-zy40 colorf78 margin-y10\" style=\"font-size: 30rpx;border: 1rpx solid #FF7800;border-radius: 60rpx;width: 30%;text-align: center;\">加入购物车</view>\r\n <view @tap=\"buy\" class=\"bold padding-sx20 padding-zy40 colorb margin-z20\" style=\"font-size: 30rpx;background-color: #ff7800;border-radius: 60rpx;width: 30%;text-align: center;\">立即购买</view>\r\n </view>\r\n </view>\r\n </view>\n </view>\n</template>\n\n<script>\n export default {\r\n\t\tprops:{\r\n\t\t\tdetail:{\r\n\t\t\t\ttype:Object,\r\n\t\t\t\tdefault:function(){\r\n\t\t\t\t\treturn {}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tsku_img:{\r\n\t\t\t\ttype:String,\r\n\t\t\t\tdefault:''\r\n\t\t\t}\r\n\t\t},\n data() {\n return {\r\n guigArr:[],\r\n guigCurrent:0,\r\n num:1,\n isBtn:false,\r\n\t\t\t\tsku_index:0,\r\n\t\t\t\tsku_id:'',\r\n\t\t\t\tsrcImg:'',\r\n\t\t\t\torderList:[],\r\n\t\t\t\tshowKf:true,\r\n\t\t\t\tuser_type:uni.getStorageSync('user_type')//权限\r\n };\n },\r\n\t\twatch:{\r\n\t\t\tsku_img:function(newImg,oldImg){\r\n\t\t\t\tthis.srcImg = newImg\r\n\t\t\t}\r\n\t\t},\r\n\t\tmounted() {\r\n\t\t\tif(uni.getStorageSync('is_active')==0) {\r\n\t\t\t\tthis.showKf = false\r\n\t\t\t}\r\n\t\t},\r\n methods:{\r\n\t\t\thuik(){\r\n\t\t\t\t// console.log('萨拉丁开发');\r\n\t\t\t},\r\n goHome(){uni.switchTab({url:'/pages/tabbar/homePage/homePage'})},\r\n goKef(){\r\n\t\t\t\tif(uni.getStorageSync('is_active')==0) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('您目前是游客,请授权登录')\r\n\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\tuni.navigateTo({url:'/pages/login/login'})\r\n\t\t\t\t\t},1500)\r\n\t\t\t\t}\r\n\t\t\t},\r\n diaoq(){\r\n\t\t\t\tif(uni.getStorageSync('is_active')==0) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('您目前是游客,请授权登录')\r\n\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\tuni.navigateTo({url:'/pages/login/login'})\r\n\t\t\t\t\t},1500)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.$emit('diaoq');\r\n\t\t\t\t\tthis.isBtn = true\r\n\t\t\t\t\tthis.guigArr = []\r\n\t\t\t\t\tthis.orderList = []\r\n\t\t\t\t\tthis.detail.sku_list.forEach(item=>{\r\n\t\t\t\t\t\tthis.guigArr.push(item)\r\n\t\t\t\t\t\tif(item.is_main==1){\r\n\t\t\t\t\t\t\tlet buyObj = {\r\n\t\t\t\t\t\t\t\tsku_coding:item.coding,\r\n\t\t\t\t\t\t\t\tnum:this.num\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.orderList.push(buyObj)\r\n\t\t\t\t\t\t\t// console.log(this.orderList);\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 addGowc(){//添加购物车事件\r\n this.isBtn = false\r\n\t\t\t\tif(this.sku_id==''){\r\n\t\t\t\t\tthis.sku_id = this.guigArr[0].id\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('order/shopping-cart-add',{sku_id:this.sku_id,num:this.num}).then(res=>{\r\n\t\t\t\t\t// console.log(res);\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tthis.num = 1\r\n\t\t\t\t\t\tthis.sku_id = ''\r\n\t\t\t\t\t\tthis.$toolAll.tools.showToast('加入购物车成功(*^▽^*)')\r\n\t\t\t\t\t}\r\n\t\t\t\t},error=>{})\r\n },\r\n buy(){//立即购买事件\r\n this.isBtn = false\r\n\t\t\t\tlet storageAddress = uni.getStorageSync('storageAddress')\r\n\t\t\t\tlet buyParma = {\r\n\t\t\t\t\tsku_list: this.orderList,\r\n\t\t\t\t\taddress_id: storageAddress || '' \r\n\t\t\t\t}\r\n\t\t\t\tconsole.log('参数',buyParma);\r\n\t\t\t\tthis.$requst.post('order/prepare-info',buyParma).then(res=>{\r\n\t\t\t\t\t// console.log(res);\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tuni.setStorageSync('orderInfo',res.data)\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t url:'/pagesA/confirmOrder/confirmOrder'\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t},error=>{})\r\n },\r\n chooseguig(id,index){\r\n\t\t\t\tthis.orderList = []//清空coding、num参数\r\n this.guigCurrent = index\r\n\t\t\t\tlet ob = this.guigArr.findIndex((item)=>item.id==id)\r\n\t\t\t\tthis.sku_index = ob\r\n\t\t\t\tthis.srcImg = this.$http + this.guigArr[ob].main_image\r\n\t\t\t\tthis.sku_id = id\r\n\t\t\t\tlet chooseBuyObj = {\r\n\t\t\t\t\tsku_coding:this.detail.sku_list[this.sku_index].coding,\r\n\t\t\t\t\tnum:this.num\r\n\t\t\t\t}\r\n\t\t\t\tthis.orderList.push(chooseBuyObj)\r\n },\r\n delEvent(){\r\n // this.num==1 ? this.num=1 : this.num--\r\n this.num==1 ? this.num=1 : this.num--\r\n\t\t\t\tthis.orderList[0].num = this.num\r\n },\r\n addEvent(){\r\n // this.num==10 ? this.num=10 : this.num++\r\n this.num++\r\n\t\t\t\tthis.orderList[0].num = this.num\r\n },\r\n moveHandle(){\r\n return\r\n }\r\n }\n }\n</script>\n\n<style>\n\n</style>\n"],"sourceRoot":""} |