1 |
- {"version":3,"sources":["uni-app:///main.js","webpack:///D:/2022/10/hmd/pages/index/index.vue?2a52","webpack:///D:/2022/10/hmd/pages/index/index.vue?2abe","webpack:///D:/2022/10/hmd/pages/index/index.vue?a1b4","webpack:///D:/2022/10/hmd/pages/index/index.vue?835f","uni-app:///pages/index/index.vue","webpack:///D:/2022/10/hmd/pages/index/index.vue?5a14","webpack:///D:/2022/10/hmd/pages/index/index.vue?aa25"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,4F,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;AACqK;AACrK,gBAAgB,+KAAU;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,8LAEN;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;AAA+lB,CAAgB,ynBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACsEnnB;;;AAGA;;;;AAIA;;;;;;AAMA;;;AAGA,+C;;;;;;;;;;A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;;;;ACA9pC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/index/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/index/index.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./index.vue?vue&type=template&id=57280228&\"\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 \"!E:\\\\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/index/index.vue\"\nexport default component.exports","export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=template&id=57280228&\"","var components\ntry {\n components = {\n uniPopup: function() {\n return import(\n /* webpackChunkName: \"components/uni-popup/uni-popup\" */ \"@/components/uni-popup/uni-popup.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 \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\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 \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\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 class=\"container\">\r\n\t\t<view class=\"carousel-section\">\r\n\t\t\t<image src=\"../../static/img/home-top.png\" mode=\"widthFix\" class=\"home-top\"></image>\r\n\t\t\t<view class=\"search flex\">\r\n\t\t\t\t<view class=\"input-box flex\" @click.stop=\"clickSearch\">\r\n\t\t\t\t\t<view class=\" input-content flex\">\r\n\t\t\t\t\t\t<view class=\"iconfont iconsearch\"></view>\r\n\t\t\t\t\t\t<view class=\"input\"><input type=\"text\" disabled value=\"输入关键字搜索\" /></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<swiper class=\"carousel\" autoplay=\"true\" duration=\"400\" interval=\"5000\" @change=\"swiperChange\"\r\n\t\t\t\t:indicator-dots=\"true\" indicator-active-color=\"#FFFFFF\">\r\n\t\t\t\t<swiper-item v-for=\"(item, index) in carouselList\" :key=\"index\" class=\"carousel-item\">\r\n\t\t\t\t\t<image :src=\"item.pic\" mode=\"aspectFill\" @click=\"bannerNavToUrl(item)\"></image>\r\n\t\t\t\t</swiper-item>\r\n\t\t\t</swiper>\r\n\t\t</view>\r\n\t\t<view class=\"top-tit\">\r\n\t\t\t\r\n\t\t\t<image src=\"../../static/icon/fgq.png\" mode=\"widthFix\" v-if=\"userInfo && userInfo.pay_count >0\"></image>\r\n\t\t\t<image src=\"../../static/icon/bdq.png\" mode=\"widthFix\" v-else></image>\r\n\t\t</view>\r\n\t\t<view class=\"good-wrap\">\r\n\t\t\t<view class=\"good-img\">\r\n\t\t\t\t<image :src=\"goodList.image\" mode=\"\"></image>\r\n\t\t\t\t<image src=\"../../static/img/goog-bg.png\" mode=\"\"></image>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"good-tit clamp2\">\r\n\t\t\t\t{{goodList.store_name}}\r\n\t\t\t</view>\r\n\t\t\t<view class=\"price-btn flex\">\r\n\t\t\t\t<view class=\"price flex\">\r\n\t\t\t\t\t<view class=\"old-price\">\r\n\t\t\t\t\t\t原价¥{{goodList.ot_price*1 || '0'}}\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"new-price\" v-if=\"userInfo && userInfo.identity == 1\">\r\n\t\t\t\t\t\t{{goodList.vip_repurchase*1 || '0'}}\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"new-price\" v-if=\"userInfo && userInfo.identity == 2\">\r\n\t\t\t\t\t\t{{goodList.agent_repurchase*1 || '0'}}\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"new-price\" v-if=\"(!hasLogin || userInfo.identity == 0)\">\r\n\t\t\t\t\t\t{{goodList.price*1 || '0'}}\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"btn flex\">\r\n\t\t\t\t\t<view class=\"gobuy\" @click=\"navTo('/pages/product/product?id=' + goodList.id)\">\r\n\t\t\t\t\t\t去抢购\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"goshare\" @click=\"getShow(goodList.id)\">\r\n\t\t\t\t\t\t去分享\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<view class=\"\" style=\"height: 25rpx;\">\r\n\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 分享弹出窗 -->\r\n\t\t<uni-popup ref=\"popupshare\" type=\"center\">\r\n\t\t\t<view class=\"share-box\">\r\n\t\t\t\t<image :src=\"shareImage\" mode=\"\" class=\"box-img\" @longpress=\"saveImg()\"></image>\r\n\t\t\t</view>\r\n\t\t</uni-popup>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport {\r\n\t\tloadIndexs\r\n\t} from '@/api/index.js';\r\n\timport {\r\n\t\tgetUserInfo,\r\n\t\tspread\r\n\t} from '@/api/user.js';\r\n\timport {\r\n\t\tgetBargainList,\r\n\t\tgetProducts,\r\n\t\tgoodsDetail,\r\n\t\tposter\r\n\t} from '@/api/product.js';\r\n\timport {\r\n\t\tinterceptor\r\n\t} from '@/utils/loginUtils';\r\n\timport {\r\n\t\tmapState,\r\n\t\tmapMutations\r\n\t} from 'vuex';\r\n\t// #ifdef H5\r\n\timport {\r\n\t\tweixindata,\r\n\t\tshareLoad\r\n\t} from '@/utils/wxAuthorized';\r\n\t// #endif\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tpage: 1,\r\n\t\t\t\tlimitt: 20,\r\n\t\t\t\tloadingType: 'more',\r\n\t\t\t\tcurrent: 0,\r\n\t\t\t\tshareShow: false, //分享海报\r\n\t\t\t\tpageProportion: 0, //保存页面基于750宽度的比例\r\n\t\t\t\tswiperHeight: 0,\r\n\t\t\t\tcheckid: 0,\r\n\t\t\t\ttitleNViewBackground: '',\r\n\t\t\t\tswiperCurrent: 0,\r\n\t\t\t\tswiperLength: 0,\r\n\t\t\t\tcarouselList: [], //轮播列表\r\n\t\t\t\tpage: 1,\r\n\t\t\t\tlimit: 5,\r\n\t\t\t\tfirstList: [],\r\n\t\t\t\tgoodList: {},\r\n\t\t\t\tshopList: [],\r\n\t\t\t\tperiod: 1,\r\n\t\t\t\tshareImage: '',\r\n\t\t\t};\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\t...mapState('user', ['hasLogin', 'userInfo'])\r\n\t\t},\r\n\t\tonShareAppMessage(options) {\r\n\t\t\t// 设置菜单中的转发按钮触发转发事件时的转发内容\r\n\t\t\tlet pages = getCurrentPages(); //获取加载的页面\r\n\t\t\tlet currentPage = pages[pages.length - 1]; //获取当前页面的对象\r\n\t\t\tlet url = currentPage.route; //当前页面url\r\n\t\t\tlet item = currentPage.options; //如果要获取url中所带的参数可以查看options\r\n\t\t\tlet shareObj = {}\r\n\t\t\tif(this.userInfo.uid) {\r\n\t\t\t\tshareObj = {\r\n\t\t\t\t\ttitle: this.userInfo.nickname + '邀请您加入北京鸿蒙德', // 默认是小程序的名称(可以写slogan等)\r\n\t\t\t\t\tpath: url + '?scene=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径\r\n\t\t\t\t\timageUrl: '',\r\n\t\t\t\t\tsuccess: function(res) {\r\n\t\t\t\t\t\t// 转发成功之后的回调\r\n\t\t\t\t\t\tif (res.errMsg == 'shareAppMessage:ok') {}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfail: function() {\r\n\t\t\t\t\t\t// 转发失败之后的回调\r\n\t\t\t\t\t\tif (res.errMsg == 'shareAppMessage:fail cancel') {\r\n\t\t\t\t\t\t\t// 用户取消转发\r\n\t\t\t\t\t\t} else if (res.errMsg == 'shareAppMessage:fail') {\r\n\t\t\t\t\t\t\t// 转发失败,其中 detail message 为详细失败信息\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}else {\r\n\t\t\t\tshareObj = {\r\n\t\t\t\t\ttitle: '北京鸿蒙德', // 默认是小程序的名称(可以写slogan等)\r\n\t\t\t\t\tpath: url, // 默认是当前页面,必须是以‘/’开头的完整路径\r\n\t\t\t\t\timageUrl: '',\r\n\t\t\t\t\tsuccess: function(res) {\r\n\t\t\t\t\t\t// 转发成功之后的回调\r\n\t\t\t\t\t\tif (res.errMsg == 'shareAppMessage:ok') {}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfail: function() {\r\n\t\t\t\t\t\t// 转发失败之后的回调\r\n\t\t\t\t\t\tif (res.errMsg == 'shareAppMessage:fail cancel') {\r\n\t\t\t\t\t\t\t// 用户取消转发\r\n\t\t\t\t\t\t} else if (res.errMsg == 'shareAppMessage:fail') {\r\n\t\t\t\t\t\t\t// 转发失败,其中 detail message 为详细失败信息\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\treturn shareObj;\r\n\t\t},\r\n\t\tonReachBottom() {},\r\n\t\tonLoad: function(option) {\r\n\t\t\t// #ifdef MP\r\n\t\t\tif (option.scene) {\r\n\t\t\t\t// 存储小程序邀请人\r\n\t\t\t\tuni.setStorage({\r\n\t\t\t\t\tkey: 'spread_code',\r\n\t\t\t\t\tdata: option.scene\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t// #endif\r\n\t\t},\r\n\t\twatch: {\r\n\t\t\t// PXType(val, old) {\r\n\t\t\t// \tconsole.log('切换显示')\r\n\t\t\t// \tthis.getStoreList()\r\n\t\t\t// },\r\n\t\t\t// chooseDistrict(val,old) {\r\n\t\t\t// \tthis.reGetStoreList()\r\n\t\t\t// }\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\tthis.getGoodList()\r\n\t\t\tthis.loadData();\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tgetShow(id) {\r\n\t\t\t\tlet obj = this;\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\ttitle: 'Loading...',\r\n\t\t\t\t\tmask: true\r\n\t\t\t\t});\r\n\t\t\t\t// // #ifdef H5\r\n\t\t\t\t// let fromname = 'wechat';\r\n\t\t\t\t// // #endif\r\n\t\t\t\t// // #ifdef MP\r\n\t\t\t\tlet fromname = 'routine';\r\n\t\t\t\t////#endif\r\n\t\t\t\tposter({\r\n\t\t\t\t\tproductId: id,\r\n\t\t\t\t\tfrom: 'routine'\r\n\t\t\t\t}).then(({data}) => {\r\n\t\t\t\t\tobj.shareImage = data.url;\r\n\t\t\t\t\tconsole.log(obj.shareImage, '123456');\r\n\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\tthis.$refs.popupshare.open();\r\n\t\t\t\t}).catch(err => {\r\n\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\tgetGoodList() {\r\n\t\t\t\tlet obj = this\r\n\t\t\t\tgetProducts({\r\n\t\t\t\t\tpage: 1,\r\n\t\t\t\t\tlimit: 50,\r\n\t\t\t\t\tcid: 1\r\n\t\t\t\t}).then(res => {\r\n\t\t\t\t\tconsole.log(res, 'libao')\r\n\t\t\t\t\tobj.goodList = res.data[0]\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\tnavto(url) {\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl,\r\n\t\t\t\t\tfail() {\r\n\t\t\t\t\t\tuni.switchTab({\r\n\t\t\t\t\t\t\turl\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\tnavTo(url) {\r\n\t\t\t\tif (url == '') {\r\n\t\t\t\t\tthis.$api.msg('暂未开通,敬请期待');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl\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\tclickSearch() {\r\n\t\t\t\tuni.navigateTo({\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\tonImageError(key, index) {\r\n\t\t\t\tthis[key][index].image = '/static/error/errorImage.jpg';\r\n\t\t\t},\r\n\t\t\t// 请求载入数据\r\n\t\t\tasync loadData() {\r\n\t\t\t\tloadIndexs({})\r\n\t\t\t\t\t.then(({\r\n\t\t\t\t\t\tdata\r\n\t\t\t\t\t}) => {\r\n\t\t\t\t\t\tlet goods = data.info;\r\n\t\t\t\t\t\tconsole.log(goods, '商品信息');\r\n\t\t\t\t\t\tthis.carouselList = data.banner;\r\n\t\t\t\t\t\tthis.swiperLength = this.carouselList.length;\r\n\t\t\t\t\t\tthis.bastList = data.giftInfo; //会员礼包\r\n\t\t\t\t\t\tdata.info.firstList.forEach(e => {\r\n\t\t\t\t\t\t\te.isVip = e.store_type ? \"3\" : \"0\"\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tthis.firstList = data.info.firstList //首页商品\r\n\t\t\t\t\t\tuni.stopPullDownRefresh();\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.catch(e => {\r\n\t\t\t\t\t\tuni.stopPullDownRefresh();\r\n\t\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t//轮播图切换修改背景色\r\n\t\t\tswiperChange(e) {\r\n\t\t\t\tconst index = e.detail.current;\r\n\t\t\t\tthis.swiperCurrent = index;\r\n\t\t\t\tthis.titleNViewBackground = this.carouselList[index].background;\r\n\t\t\t},\r\n\t\t\t// 轮播图跳转\r\n\t\t\tbannerNavToUrl(item) {\r\n\t\t\t\t// #ifdef H5\r\n\t\t\t\tconsole.log(item.wap_url.indexOf('http'), 'banner');\r\n\t\t\t\tif (item.wap_url.indexOf('http') >= 0) {\r\n\t\t\t\t\twindow.location.href = item.wap_url;\r\n\t\t\t\t}\r\n\t\t\t\t// #endif\r\n\t\t\t\t//测试数据没有写id,用title代替\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl: item.wap_url\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t// 根据指定个数分割数组\r\n\t\t\tchunkArr(arr, size) {\r\n\t\t\t\tconsole.log(arr, 'arr+++++')\r\n\t\t\t\t//判断如果不是数组(就没有length),或者size没有传值,size小于1,就返回空数组\r\n\t\t\t\tif (!arr.length || !size || size < 1) return []\r\n\t\t\t\tlet [start, end, result] = [null, null, []]\r\n\t\t\t\tfor (let i = 0; i < Math.ceil(arr.length / size); i++) {\r\n\t\t\t\t\tstart = i * size\r\n\t\t\t\t\tend = start + size\r\n\t\t\t\t\tresult.push(arr.slice(start, end))\r\n\t\t\t\t}\r\n\t\t\t\treturn result\r\n\t\t\t},\r\n\t\t\t// 长按保存图片\r\n\t\t\tsaveImg(w) {\r\n\t\t\t\tconsole.log(w);\r\n\t\t\t\tlet obj = this;\r\n\t\t\t\tuni.downloadFile({\r\n\t\t\t\t\t//下载图片\r\n\t\t\t\t\turl: obj.shareImage,\r\n\t\t\t\t\tsuccess: res => {\r\n\t\t\t\t\t\tconsole.log(res.tempFilePath);\r\n\t\t\t\t\t\tuni.saveImageToPhotosAlbum({\r\n\t\t\t\t\t\t\t//将图片保存在手机\r\n\t\t\t\t\t\t\tfilePath: res.tempFilePath, //保存的位置\r\n\t\t\t\t\t\t\tsuccess: res => {\r\n\t\t\t\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\t\t\t\ttitle: '保存成功',\r\n\t\t\t\t\t\t\t\t\ticon: 'none'\r\n\t\t\t\t\t\t\t\t});\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}\r\n\t};\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\tpage {\r\n\t\tbackground: #ffff;\r\n\t\tmin-height: 100%;\r\n\t\theight: auto;\r\n\t}\r\n\r\n\t.carousel-section {\r\n\t\tposition: relative;\r\n\r\n\t\t// padding-top: 10px;\r\n\t\t.home-top {\r\n\t\t\twidth: 750rpx;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t}\r\n\r\n\t\t.bg {\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\tleft: 0;\r\n\t\t\twidth: 750rpx;\r\n\t\t\theight: 378rpx;\r\n\r\n\t\t\timage {\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\theight: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.titleNview-placing {\r\n\t\t\theight: var(--status-bar-height);\r\n\t\t\tbox-sizing: content-box;\r\n\t\t}\r\n\r\n\t\t.search {\r\n\t\t\tjustify-content: space-between;\r\n\t\t\tpadding: 10rpx 32rpx 20rpx;\r\n\t\t\talign-items: center;\r\n\t\t\t// background-color: #ff5246;\r\n\r\n\t\t\t.address {\r\n\t\t\t\twidth: 32rpx;\r\n\t\t\t\theight: 38rpx;\r\n\t\t\t}\r\n\r\n\t\t\t.shop-name {\r\n\t\t\t\theight: 38rpx;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\ttop: -4rpx;\r\n\t\t\t\tz-index: 100;\r\n\t\t\t\tfont-size: 30rpx;\r\n\t\t\t\tfont-family: PingFang SC;\r\n\t\t\t\tfont-weight: 500;\r\n\t\t\t\tpadding-left: 10rpx;\r\n\t\t\t}\r\n\r\n\t\t\t.shop-jt {\r\n\t\t\t\tmargin-left: 8rpx;\r\n\t\t\t\twidth: 16rpx;\r\n\t\t\t\theight: 10rpx;\r\n\t\t\t}\r\n\r\n\t\t\t.input-box {\r\n\t\t\t\tmargin-left: 10rpx;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tz-index: 99;\r\n\t\t\t\twidth: 650rpx;\r\n\t\t\t\theight: 60rpx;\r\n\t\t\t\tbackground: #EEEEEE;\r\n\t\t\t\tborder-radius: 30rpx;\r\n\r\n\t\t\t\t.input-content {\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t\tz-index: 11;\r\n\t\t\t\t\tborder-radius: 99rpx;\r\n\t\t\t\t\tflex-grow: 1;\r\n\t\t\t\t\tpadding: 5rpx 30rpx;\r\n\t\t\t\t\tbackground: #fff;\r\n\r\n\t\t\t\t\t.iconsearch {\r\n\t\t\t\t\t\tfont-size: 50rpx;\r\n\t\t\t\t\t\tcolor: #CBCBCB;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.input {\r\n\t\t\t\t\t\tmargin-left: 19rpx;\r\n\t\t\t\t\t\tflex-grow: 1;\r\n\t\t\t\t\t\tcolor: #CBCBCB;\r\n\r\n\t\t\t\t\t\tinput {\r\n\t\t\t\t\t\t\tfont-size: 28rpx;\r\n\r\n\t\t\t\t\t\t\tcolor: #CBCBCB;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.input-button {\r\n\t\t\t\t\tpadding-left: 20rpx;\r\n\t\t\t\t\tfont-size: $font-base;\r\n\t\t\t\t\theight: 100%;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.carousel {\r\n\t\tposition: relative;\r\n\t\tz-index: 3;\r\n\t\twidth: 100%;\r\n\t\theight: 360rpx;\r\n\t\t// background-color: #fff;\r\n\r\n\t\t.carousel-item {\r\n\t\t\twidth: 100%;\r\n\t\t\theight: 100%;\r\n\t\t\tpadding: 0 28rpx;\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\timage {\r\n\t\t\twidth: 100%;\r\n\t\t\theight: 100%;\r\n\t\t\tborder-radius: $border-radius-sm;\r\n\t\t}\r\n\t}\r\n\r\n\t.top-tit {\r\n\t\twidth: 332rpx;\r\n\t\theight: 32rpx;\r\n\t\tmargin: 36rpx auto 23rpx;\r\n\r\n\t\timage {\r\n\t\t\twidth: 332rpx;\r\n\t\t}\r\n\t}\r\n\r\n\t.good-wrap {\r\n\t\twidth: 700rpx;\r\n\t\tmargin: auto;\r\n\t\tbackground: #FFFFFF;\r\n\t\tbox-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);\r\n\t\tborder-radius: 20px 20px 20px 20px;\r\n\r\n\t\t.good-img {\r\n\t\t\twidth: 700rpx;\r\n\t\t\theight: 300rpx;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\timage {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop: 0;\r\n\t\t\t\twidth: 700rpx;\r\n\t\t\t\theight: 300rpx;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.good-tit {\r\n\t\t\tpadding: 15rpx 22rpx;\r\n\t\t\tfont-size: 32rpx;\r\n\t\t\tfont-weight: 500;\r\n\t\t\tcolor: #333333;\r\n\t\t}\r\n\r\n\t\t.price-btn {\r\n\t\t\tpadding: 0 22rpx;\r\n\r\n\t\t\t.price {\r\n\t\t\t\t.old-price {\r\n\t\t\t\t\tfont-size: 26rpx;\r\n\t\t\t\t\tfont-weight: 500;\r\n\t\t\t\t\ttext-decoration: line-through;\r\n\t\t\t\t\tcolor: #999999;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.new-price {\r\n\t\t\t\t\tfont-size: 55rpx;\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tcolor: #FF4C4C;\r\n\r\n\t\t\t\t\t&::before {\r\n\t\t\t\t\t\tcontent: '¥';\r\n\t\t\t\t\t\tfont-size: 32rpx;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.btn {\r\n\t\t\t\ttext-align: center;\r\n\t\t\t\tline-height: 53rpx;\r\n\t\t\t\tfont-size: 28rpx;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tcolor: #FFFFFF;\r\n\r\n\t\t\t\t.gobuy {\r\n\t\t\t\t\twidth: 170rpx;\r\n\t\t\t\t\theight: 53rpx;\r\n\t\t\t\t\tbackground: #ff5346;\r\n\t\t\t\t\tborder-radius: 27rpx;\r\n\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t\tmargin-right: 15rpx;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.goshare {\r\n\t\t\t\t\twidth: 129rpx;\r\n\t\t\t\t\theight: 53rpx;\r\n\t\t\t\t\tborder: 2rpx solid #ff5346;\r\n\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\tcolor: #ff5346;\r\n\t\t\t\t\tborder-radius: 27rpx;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.share-box {\r\n\t\twidth: 600rpx;\r\n\t\theight: 1000rpx;\r\n\t\tbackground: red;\r\n\r\n\t\t.box-img {\r\n\t\t\twidth: 600rpx;\r\n\t\t\theight: 1000rpx;\r\n\t\t}\r\n\t}\r\n</style>\n","import mod from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\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 \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\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 // 1666316405628\n var cssReload = require(\"E:/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":""}
|