1 line
24 KiB
Plaintext
1 line
24 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/homePage/homePage.vue?9eb2","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/homePage/homePage.vue?b9c2","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/homePage/homePage.vue?eb84","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/homePage/homePage.vue?647a","uni-app:///pages/tabbar/homePage/homePage.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;kDAAA;AACA;AACA,4G,6FAFmBA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC;AAGnBC,UAAU,CAACC,iBAAD,CAAV,C;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAqH;AACrH;AAC4D;AACL;;;AAGvD;AACsL;AACtL,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;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAosB,CAAgB,oqBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACyGxtB;AACA;AACA,4BADA;AAEA,oBAFA;AAGA,sBAHA;AAIA,oBAJA,EADA;;AAOA,M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IA,aAxIA,uBAwIA;AACA;AACA,sCADA;;AAGA,KA5IA;AA6IA,cA7IA,wBA6IA;AACA;AACA;AACA,0CADA;;AAGA,KAlJA,EAjHA,E","file":"pages/tabbar/homePage/homePage.js","sourcesContent":["import 'uni-pages';wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/tabbar/homePage/homePage.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./homePage.vue?vue&type=template&id=613d2df7&\"\nvar renderjs\nimport script from \"./homePage.vue?vue&type=script&lang=js&\"\nexport * from \"./homePage.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 = \"pages/tabbar/homePage/homePage.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!./homePage.vue?vue&type=template&id=613d2df7&\"","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/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!./homePage.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!./homePage.vue?vue&type=script&lang=js&\"","<template>\r\n <view>\r\n <view class=\"posir\">\r\n <image class=\"posia\" src=\"/static/img/pageh/headb.png\" style=\"width: 100%;\"></image>\r\n <!-- 使用标题栏 -->\r\n\t\t\t<!-- <status-nav :statusTitle=\"true\" :title-val=\"'登锐商城'\" :tabcolor=\"'#ffffff'\"></status-nav> -->\r\n\t\t\t<view class=\"posi-tzy zIn5 statusHNH\" style=\"background: url(https://s3.jpg.cm/2021/07/22/I6PtxL.png) fixed top;background-size: 100%;\">\r\n\t\t\t <view :style=\"{height:statusBarHeight+'px'}\"></view>\r\n\t\t\t <view class=\"padding-z20 disac width100 navBarH\" :style=\"{background:backgroudColor}\">\r\n\t\t\t <!-- 标题 -->\r\n\t\t\t\t\t<view class=\"tab-title titlec\" style=\"color:#ffffff;\">登锐商城</view>\r\n\t\t\t </view>\r\n\t\t\t</view>\r\n <!-- 搜索框、消息 -->\r\n <view class=\"margin-zy20 disba\" :style=\"{paddingTop:statusHNH+'px'}\">\r\n <view class=\"searchRadius disac ptwo-input-box\">\r\n <image class=\"searcht margin-z20\" src=\"/static/img/pageh/sousuo.png\"></image>\r\n <input @tap=\"inputFocus\" disabled class=\"margin-z10 fon26 colorh width100\" placeholder=\"搜索的内容\" placeholder-class=\"searchpla\" type=\"text\" />\r\n </view>\r\n <!-- <image @tap=\"goNotices\" class=\"xiaox margin-y10 flexs\" src=\"/static/img/pageh/xiaoxi.png\"></image> -->\r\n </view>\r\n <view class=\"margin20\">\r\n <!-- banner轮播 -->\r\n <view class=\"radius10\">\r\n <swiper class=\"banner-box\" :indicator-color=\"'#f9f9f9'\" :indicator-active-color=\"'#1c4593'\"\r\n :indicator-dots=\"true\" :easing-function=\"'easeOutCubic'\" :autoplay=\"true\" :interval=\"3000\"\r\n :circular=\"true\" :duration=\"1000\">\r\n <swiper-item v-if=\"bannerList.length!=0\" v-for=\"(item,index) in bannerList\" :key=\"index\">\r\n <view class=\"swiper-item\">\r\n <image class=\"width100 banner-box radius10\" :src=\"item.src\" mode=\"aspectFill\"></image>\r\n </view>\r\n </swiper-item>\r\n </swiper>\r\n </view>\r\n <!-- 公告 -->\r\n <view v-if=\"user_type!='personal'\" class=\"margin-sx20 disac zIn4\" style=\"position: relative;\">\r\n <view class=\"disac flexs\">\r\n <image class=\"gimg\" src=\"/static/img/pageh/gonggao.png\" mode=\"\"></image>\r\n <view class=\"fon26 gtitle margin-z10\"><i>小程序公告:</i></view>\r\n </view>\r\n <view class=\"disba width100\">\r\n <view class=\"fon24 color6 margin-zy20 width100\">\r\n <!-- <marquee direction=\"left\" align=\"absmiddle\" scrollamount=\"5\">新品上市百雀明媚羚眼霜限时促销霜限时促销霜限时促销</marquee> -->\r\n <lwNotice @dangGao=\"dangGao\" :list=\"advanceListTwo\"></lwNotice>\r\n </view>\r\n <view @tap=\"goNotices\" class=\"fon24 color9 margin-y20 flexs\">更多</view>\r\n </view>\r\n </view>\r\n </view>\r\n <!-- 热门产品,限时补贴 -->\r\n <view class=\"discc width100 textc\" style=\"background: url(https://s3.jpg.cm/2021/07/22/I6P1IW.png) no-repeat;background-size: 100% 100%;\">\r\n <view v-if=\"user_type!='personal'\" class=\"fon36 colorb bold margin-s40 disbcac\">\r\n <image class=\"reba\" src=\"/static/img/pageh/rebefore.png\"></image>\r\n <view class=\"margin-zy20\">厂家送红包 购100送70</view>\r\n <image class=\"reba\" src=\"/static/img/pageh/reaffter.png\"></image>\r\n </view>\r\n <view v-if=\"user_type!='personal'\" class=\"fon24 colorb margin-s20 discc\">\r\n <view class=\"zIn1\">红包可提现,也可分次购货</view>\r\n <view class=\"tiao\"></view>\r\n </view>\r\n\t\t\t\t<view v-if=\"user_type!='personal'\" class=\"fon24 margin-sx20\" style=\"color: rgba(255,255,255,.7);\">商城产品低于市场价70%,红包可选择长期分红更划算</view>\r\n\t\t\t\t<view class=\"reboxre margin-zy20 margin-sx20\" style=\"width: 94%;\" v-for=\"(itemre,indexre) in zanReArrImg\" :key=\"indexre\">\r\n\t\t\t\t\t<image class=\"radius10\" @tap=\"goReDetail(itemre.link)\" style=\"width: 100%;height: 342rpx;\" mode=\"aspectFill\" :src=\"itemre.src\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<!-- <view class=\"radius10 disba rebox margin-zy20 margin-x20\" v-for=\"(itemre,indexre) in reArr\" :key=\"indexre\">\r\n\t\t\t\t\t<image v-if=\"indexre%2==0\" class=\"flexs reimg\" :src=\"itemre.src\"></image>\r\n\t\t\t\t\t<view class=\"disbc width100 flw margin-sf30\">\r\n\t\t\t\t\t\t<view class=\"fon26 color26\">{{itemre.title}}</view>\r\n\t\t\t\t\t\t<view class=\"fon36 color26 bold margin-sx10\">{{itemre.miaoone}}</view>\r\n\t\t\t\t\t\t<view class=\"fon24 color26\">{{itemre.miaotwo}}</view>\r\n\t\t\t\t\t\t<view class=\"btnradius fon24 colorb rebtn margin-s20\">\r\n\t\t\t\t\t\t\t惊喜价:¥<span class=\"fon36 blod\">{{itemre.price}}</span>.00\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<image v-if=\"indexre%2!=0\" class=\"flexs reimg\" :src=\"itemre.src\"></image>\r\n\t\t\t\t</view> -->\r\n </view>\r\n <!-- 分类列表 -->\r\n <view class=\"width100 padding-x120\">\r\n <!-- 分类 -->\r\n <scroll-view scroll-x=\"true\" style=\"height: 80rpx;\">\r\n <view class=\"disba margin20 catebox\">\r\n <view @tap=\"chooseCate(item.id,index)\" :class=\"current==index?'pactive':'pmo'\" class=\"disac flexs\"\r\n v-for=\"(item,index) in cateList\" :key=\"index\">{{item.name}}<view class=\"pxian\"></view>\r\n </view>\r\n </view>\r\n </scroll-view>\r\n <!-- 列表 -->\r\n\t\t\t\t <!-- @addChe=\"addChe\" -->\r\n\t\t\t\t<twocoluList v-if=\"dataList.length!=0\" :dataList=\"dataList\"></twocoluList>\r\n <!-- 更多 -->\r\n <view v-if=\"gisok\" class=\"margin-sx26 textc color9 fon26\">{{gcontent}}</view>\r\n </view>\r\n <backTop :showTop=\"showTop\" @backTop=\"backTop\"></backTop>\r\n <!-- <footTab></footTab> -->\r\n </view>\r\n\t\t<foot-tab :userType=\"user_type\"></foot-tab>\r\n </view>\r\n</template>\r\n\r\n<script>\r\n\timport twocoluList from '@/components/twocoluList.vue';\r\n import backTop from '@/components/backTop.vue';\r\n import lwNotice from '@/components/lw-notice/lw-notice.vue';\r\n import footTab from '@/components/footTab.vue';\r\n export default {\r\n\t\tcomponents:{\r\n\t\t\ttwocoluList,\r\n backTop,\r\n lwNotice,\r\n footTab\r\n\t\t},\r\n data() {\r\n return {\r\n\t\t\t\tstatusBarHeight:uni.getSystemInfoSync().statusBarHeight,\r\n bannerList: [],\r\n // cateList:['轮胎轮毂','车载电器','雨刮器','机油养护','汽车配件'],\r\n cateList:[{\r\n\t\t\t\t\tid:'',\r\n\t\t\t\t\tname:'全部',\r\n\t\t\t\t\tpid:'',\r\n\t\t\t\t\thasChildren:''\r\n\t\t\t\t}],\r\n current:0,\r\n dataList:[],\r\n gcontent:'暂无更多',//更多文本\r\n gisok:false,//判断更多是否出现\r\n showTop:false,\r\n advanceListTwo:[],//公告内容列表\r\n\t\t\t\tadvanceListInfo:[],//公告所有信息\r\n\t\t\t\t// reArr:[\r\n\t\t\t\t// \t{src:'/static/img/pageh/reone.jpg',title:'/凌度BLACKVIEW/',miaoone:'行车记录仪前后双录',miaotwo:'全屏流媒体后视镜倒车影像',price:'459'},\r\n\t\t\t\t// \t{src:'/static/img/pageh/retwo.jpg',title:'/凌度BLACKVIEW/',miaoone:'行车记录仪前后双录',miaotwo:'全屏流媒体后视镜倒车影像',price:'459'},\r\n\t\t\t\t// ],\r\n\t\t\t\tzanReArrImg:[],\r\n\t\t\t\tcid:0,\r\n\t\t\t\tpage:1,\r\n\t\t\t\tsize:10,\r\n\t\t\t\ttotal:'',\r\n\t\t\t\tisZanw:true,\r\n\t\t\t\tstatusHNH:uni.getStorageSync('statusHNH'),\r\n\t\t\t\tpageShow:false,\r\n\t\t\t\tuser_type:uni.getStorageSync('user_type'),\r\n\t\t\t\tisHave:false\r\n };\r\n },\r\n\t\tonReachBottom() {\r\n\t\t\tif(this.dataList.length!=0){\r\n\t\t\t\tif(this.total!=this.dataList.length){\r\n\t\t\t\t\tthis.page++\r\n\t\t\t\t\tthis.checkList()//调用自主预约列表事件\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(this.isZanw) this.$toolAll.tools.showToast('暂无更多商品列表','none',1000)\r\n\t\t\t\t\tthis.isZanw = false\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n onPageScroll(e) {\r\n e.scrollTop > 360 ? this.showTop = true : this.showTop = false\r\n },\r\n onShow() {\r\n uni.showTabBar()\r\n\t\t\tuni.login({\r\n\t\t\t\tprovider: 'weixin',\r\n\t\t\t\tsuccess: (res)=> {\r\n\t\t\t\t\tif (res.code) {\r\n\t\t\t\t\t\tvar params = {code:res.code}\r\n\t\t\t\t\t\tthis.$requst.post('user/wxAppletsLogin',params).then(res=>{\r\n\t\t\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\t\t\tif(res.data.token!=''){\r\n\t\t\t\t\t\t\t\t\tuni.setStorageSync('token',res.data.token)//缓存token\r\n\t\t\t\t\t\t\t\t\tuni.setStorageSync('openid',res.data.openid)//缓存Openid\r\n\t\t\t\t\t\t\t\t\tuni.setStorageSync('expire',res.data.expire)//缓存失效时间(时间戳格式)\r\n\t\t\t\t\t\t\t\t\tuni.setStorageSync('is_active',res.data.is_active)//是否第一次授权\r\n\t\t\t\t\t\t\t\t\tuni.setStorageSync('user_type',res.data.user_type)//权限\r\n\t\t\t\t\t\t\t\t\tthis.user_type = res.data.user_type\r\n\t\t\t\t\t\t\t\t\tthis.checkList()//商品列表查询事件\r\n\t\t\t\t\t\t\t\t\tthis.isHave = true\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},error=>{})\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t});\r\n },\r\n onLoad(options) {\r\n\t\t\tconst query = wx.createSelectorQuery().in(this)\r\n\t\t\tquery.select('.statusHNH').boundingClientRect((rect) => {\r\n\t\t\t // console.log('rect.height',rect)\r\n\t\t\t\tuni.setStorageSync('statusHNH',rect.height)\r\n\t\t\t\tthis.statusHNH = rect.height\r\n\t\t\t}).exec()\r\n\t\t\tvar _this = this;\r\n\t\t\t// 微信扫码后会自动编码,所以需要解码\r\n\t\t\tif (options && options.q) {\r\n\t\t\t\tlet arr = decodeURIComponent(options.q).split('?')[1].split('&')\r\n\t\t\t\tlet obj = {}\r\n\t\t\t\tarr.forEach(item => {\r\n\t\t\t\t\tlet brr = item.split('=')\r\n\t\t\t\t\tobj[brr[0]] = brr[1]\r\n\t\t\t\t})\r\n\t\t\t\t// console.log(obj) //得到参数组成的对象\r\n\t\t\t\tuni.setStorageSync('invite_code',obj.invite_code)\r\n\t\t\t}\r\n this.title = this.dengrui\r\n\t\t\tlet timer = setInterval(()=>{\r\n\t\t\t\tif(this.isHave){\r\n\t\t\t\t\tclearInterval(timer)\r\n\t\t\t\t\tthis.bannerEv()//查询轮播\r\n\t\t\t\t\tthis.requestGao()//查询公告\r\n\t\t\t\t\tthis.reMen()//查询热门产品\r\n\t\t\t\t\tthis.shaiEv()//查询商品分类\r\n\t\t\t\t}\r\n\t\t\t},100)\r\n\t\t\t\r\n },\r\n methods: {\r\n\t\t\tshaiEv(){//商品分类查询事件\r\n\t\t\t\tthis.$requst.post('product/spu/category').then(res=>{\r\n\t\t\t\t\t// console.log('筛选',res);\r\n\t\t\t\t\tif(res.data.length!=0){\r\n\t\t\t\t\t\tres.data.forEach(item=>{\r\n\t\t\t\t\t\t\tlet obj = {\r\n\t\t\t\t\t\t\t\tid:item.id,\r\n\t\t\t\t\t\t\t\tname:item.name,\r\n\t\t\t\t\t\t\t\tpid:item.pid,\r\n\t\t\t\t\t\t\t\thasChildren:item.hasChildren\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.cateList.push(obj)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t},error=>{})\r\n\t\t\t},\r\n\t\t\tbannerEv(){// 查询轮播图片事件\r\n\t\t\t\tlet paramsBanner = {\r\n\t\t\t\t\tposition:'home_banner'\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('slide/index',paramsBanner).then(res => {\r\n\t\t\t\t\t// console.log('轮播图===>',res);\r\n\t\t\t\t\tif(res.data.length!=0){\r\n\t\t\t\t\t\tthis.pageShow = true\r\n\t\t\t\t\t\tres.data.forEach(item=>{\r\n\t\t\t\t\t\t\tlet obj = {\r\n\t\t\t\t\t\t\t\tsrc:this.$http+item.src,\r\n\t\t\t\t\t\t\t\talt:item.alt,\r\n\t\t\t\t\t\t\t\tlink:item.link,\r\n\t\t\t\t\t\t\t\ttime:item.time\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.bannerList.push(obj)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t},error => {})\r\n\t\t\t},\r\n\t\t\tgoReDetail(urlre){// 去热门详情\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:urlre\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\treMen(){//查询热门\r\n\t\t\t\tthis.$requst.post('slide/index',{position:'home_promote'}).then(res => {\r\n\t\t\t\t\t// console.log('热门===>',res);\r\n\t\t\t\t\tif(res.data.length!=0){\r\n\t\t\t\t\t\tres.data.forEach(item=>{\r\n\t\t\t\t\t\t\tlet zanObj = {\r\n\t\t\t\t\t\t\t\talt: item.alt,\r\n\t\t\t\t\t\t\t\tdesc: item.desc,\r\n\t\t\t\t\t\t\t\tlink: item.link,\r\n\t\t\t\t\t\t\t\tsrc: this.$http+item.src,\r\n\t\t\t\t\t\t\t\ttime: item.time\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.zanReArrImg.push(zanObj)\r\n\t\t\t\t\t\t\t// let obj = {\r\n\t\t\t\t\t\t\t// \tsrc:this.$http+item.src,\r\n\t\t\t\t\t\t\t// \ttitle:item.alt,\r\n\t\t\t\t\t\t\t// \tmiaoone:item.link,\r\n\t\t\t\t\t\t\t// \tmiaotwo:item.time,\r\n\t\t\t\t\t\t\t// \tprice:item.price\r\n\t\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\t// this.reArr.push(obj)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t},error => {})\r\n\t\t\t},\r\n\t\t\trequestGao(){//查询公告列表\r\n\t\t\t\tvar paramsGao = {\r\n\t\t\t\t\tsize:0\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('article/announcement/topList',paramsGao).then(res => {\r\n\t\t\t\t\t// console.log(res);\r\n\t\t\t\t\tif(res.data.list.length!=0){\r\n\t\t\t\t\t\tres.data.list.forEach(item=>{\r\n\t\t\t\t\t\t\tthis.advanceListTwo.push(item.title)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tthis.advanceListInfo = res.data.list\r\n\t\t\t\t\t}\r\n\t\t\t\t},error => {})\r\n\t\t\t},\r\n backTop(){\r\n uni.pageScrollTo({\r\n scrollTop: 0,\r\n duration: 300\r\n });\r\n },\r\n chooseCate(id,e){\r\n this.current = e\r\n\t\t\t\tif(id=='') this.cid = 0\r\n\t\t\t\telse this.cid = id\r\n\t\t\t\tthis.page = 1\r\n\t\t\t\tthis.isZanw = true\r\n\t\t\t\tthis.checkList()\r\n },\r\n\t\t\tcheckList(){\r\n\t\t\t\tlet paramCate ={\r\n\t\t\t\t\tcategory_id:this.cid,\r\n\t\t\t\t\tpage:this.page,\r\n\t\t\t\t\tsize:this.size,\r\n\t\t\t\t\tsort_filed:'synthetical',//排序字段。“synthetical”综合推荐\r\n\t\t\t\t\tsort_direction:'down'//排序方向。【down 由大到小|up 由小到大】\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('product/spu/list',paramCate).then(res=>{\r\n\t\t\t\t\t// console.log('产品',res);\r\n\t\t\t\t\tif(this.page==1) this.dataList = []\r\n\t\t\t\t\tif(res.data.list.length!=0){\r\n\t\t\t\t\t\tthis.total = res.data.total\r\n\t\t\t\t\t\t// this.cid = res.data.list[0].cid//获取分类ID,以便加载更多使用\r\n\t\t\t\t\t\tthis.zanList = res.data.list\r\n\t\t\t\t\t\tres.data.list.forEach(item=>{\r\n\t\t\t\t\t\t\tlet cateObj = {\r\n\t\t\t\t\t\t\t\tid:item.main_sku.id,//商品ID\r\n\t\t\t\t\t\t\t\tspu_id:item.id,\r\n\t\t\t\t\t\t\t\tsrc:this.$http + item.main_sku.main_image,//商品图片\r\n\t\t\t\t\t\t\t\ttitle:item.name,//商品名称\r\n\t\t\t\t\t\t\t\tcontent:item.sub_title,//商品标题\r\n\t\t\t\t\t\t\t\tcate:item.tag_list,//标签列表\r\n\t\t\t\t\t\t\t\tprice:item.main_sku.cur_price/100//商品原价\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.dataList.push(cateObj)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// this.$toolAll.tools.showToast('没找到相关产品o(╥﹏╥)o')\r\n\t\t\t\t\t}\r\n\t\t\t\t},error=>{})\r\n\t\t\t},\r\n // addChe(e){//加入购物车事件\r\n // console.log('加入购物车:'+e)\r\n // },\r\n\t\t\tdangGao(e){//跳转到公告详情\r\n\t\t\t\tuni.setStorageSync('noticeInfo',this.advanceListInfo[e])\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t url:'/pagesB/noticesDetail/noticesDetail?index=2'\r\n\t\t\t\t})\r\n\t\t\t},\r\n goNotices(){//跳转到公告列表\r\n uni.navigateTo({\r\n url:'/pagesB/notices/notices'\r\n })\r\n },\r\n\t\t\tinputFocus(){//搜索框获取焦点跳转产品页\r\n\t\t\t\twx.hideKeyboard()\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:'/pagesB/keySearch/keySearch'\r\n\t\t\t\t})\r\n\t\t\t}\r\n },\r\n };\r\n</script>\r\n\r\n<style>\r\n \r\n</style>\n"],"sourceRoot":""} |