12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004 |
- <template>
- <view class="home">
- <zs-skeleton :loading="loading"></zs-skeleton>
- <zs-banner :city="city" :background="background" position @handlePosition="chooseCity" @search="handleSearch"></zs-banner>
- <view class="login-home">
- <!-- 登录显示的套餐列表 -->
- <view class="discount-list">
- <view class="discount-item" v-for="(item,index) in discountsList" :key="index" @click="goDetail(item.domainUrl,item.id,item.secondaryImg,item.menuName)">
- <image class="icon" :src="item.imgUrl" mode=""></image>
- <view class="title">{{item.menuName}}</view>
- <view class="tag" v-if="item.labelAbove">
- {{item.labelAbove}}
- </view>
- <view class="desc">
- {{item.labelBelow || ''}}
- </view>
- </view>
- </view>
-
-
- <!-- 广告位 -->
- <!-- <view class="advertise-box">
- <view class="item" v-for="item in advList" :key="item.id">
- <zs-img
- :src="item.advertsImg"
- width="335rpx" height="188rpx" radius="full" mode=""></zs-img>
- </view>
- </view> -->
- <view class="content">
- <!-- 列表 -->
- <zs-list class="store-box" mt="0" @load="loadMore" :status="status">
- <view class="left">
- <!-- <view class="swiper-box">
- <swiper class="swiper" @change="swiperChange" skip-hidden-item-layout indicator-dots indicator-color="#fff" indicator-active-color="#FF4D3A" circular :autoplay="true"
- :interval="3000" :duration="1000">
- <swiper-item v-for="(item,index) in advList" :key="item.id" @click="jump(item.jumpUrl)">
- <image class="swiper-item" mode="" :src="item.advertsImg">
- </image>
- </swiper-item>
-
- </swiper>
- </view> -->
-
- <view class="store-item" v-for="(item,index) in list" :key="index">
- <view @click="goGoodsDetail(item)">
- <zs-img :src="item.cover[0]" width="344rpx" height="344rpx" :radius="item.productType=='Web'?'full':'half'" mode="widthFix"></zs-img>
- <!-- <zs-img :src="item.goodsVos[0].goodsImg" width="344rpx" height="344rpx" mode=""></zs-img> -->
- <view class="info" v-if="item.productType!='Web'">
- <view class="title">
- <!-- <view class="tag">
- 今日特惠
- </view> -->
- <view class="text">
- {{item.title}}
- </view>
- </view>
- <!-- <view class="desc">
- {{item.goodsVos[0].goodsDescribe}}
- </view> -->
- <!-- <view class="discount-tag" v-if="item.salePrice&&item.originalPrice">
- {{(item.salePrice/item.originalPrice)*10}}
- </view> -->
- <view class="price-box">
- <view class="left">
- <text class="price" v-if="item.salePrice">
- ¥{{(item.salePrice/100).toFixed(2)}} {{item.productType=='PetrolStation'?'/L':''}}
- </text>
- <text class="label" v-if="(item.productType=='Scenic'||item.productType=='Hotel'||item.productType=='Cinema'||item.productType=='MovieTicket'||item.productType=='Restaurant'||item.productType=='Shop')&&item.salePrice">
- 起
- </text>
- <text class="old-price" v-if="item.originalPrice">
- ¥{{(item.originalPrice/100).toFixed(2)}}
- </text>
- </view>
-
- <!-- <view class="right" v-if="item.salesCount">
- 销量{{item.salesCount}}
- </view> -->
- </view>
-
- <view class="address-box">
- <view class="address">
- {{item.address || ''}}
- </view>
- <view class="distance" v-if="item.distance">
- {{item.distance | filterDis}}
- </view>
- </view>
- </view>
- </view>
-
- </view>
- </view>
- <view class="right">
-
- <view class="store-item" v-for="(item,index) in list1" :key="index">
-
- <view @click="goGoodsDetail(item)">
- <zs-img :src="item.cover[0]" width="344rpx" height="344rpx" :radius="item.productType=='Web'?'full':'half'" mode="widthFix"></zs-img>
- <view class="info" v-if="item.productType!='Web'">
- <view class="title">
- <!-- <view class="tag">
- 今日特惠
- </view> -->
- <view class="text">
- {{item.title}}
- </view>
- </view>
- <!-- <view class="discount-tag">
- {{(item.salePrice/item.originalPrice)*10}}
- </view> -->
- <!-- <view class="desc">
- {{item.goodsVos[0].goodsDescribe}}
- </view> -->
- <view class="price-box">
- <view class="left">
- <text class="price" v-if="item.salePrice">
- ¥{{(item.salePrice/100).toFixed(2)}} {{item.productType=='PetrolStation'?'/L':''}}
- </text>
- <text class="label" v-if="(item.productType=='Scenic'||item.productType=='Hotel'||item.productType=='Cinema'||item.productType=='MovieTicket'||item.productType=='Restaurant'||item.productType=='Shop')&&item.salePrice">
- 起
- </text>
- <text class="old-price" v-if="item.originalPrice">
- ¥{{(item.originalPrice/100).toFixed(2)}}
- </text>
- </view>
-
- <!-- <view class="right" v-if="item.salesCount">
- 销量{{item.salesCount}}
- </view> -->
- </view>
-
- <view class="address-box">
- <view class="address">
- {{item.address || ''}}
- </view>
- <view class="distance" v-if="item.distance">
- {{item.distance |filterDis}}
- </view>
- </view>
- </view>
-
- </view>
- </view>
- </view>
- </zs-list>
- </view>
- </view>
- <!-- 广告弹窗 -->
- <zs-adv-dialog :list="dialogAdvList"></zs-adv-dialog>
- </view>
- </template>
- <script>
- import {
- getUserDetail,
- getMenu,
- getAdv,
- homeSearch,
- queryFromLocation,
- getDistrict
- } from '@/api/common.js'
- import {cityList} from '@/api/movie.js'
- import {getCityList,refreshVip} from '@/api/common'
- import { search } from '@/api/shop.js';
- // 腾讯地图
- var QQMapWX = require('../../libs/qqmap-wx-jssdk.min.js');
- var qqmapsdk = new QQMapWX({key:'KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF'});
- export default {
- data() {
- return {
- background:false,
- loading: false,
- userId: '',
- city:'定位中',
- status: 'more',
- current:0,
- discountsList: [],//菜单
- advList:[],
- advList1:[],
- dialogAdvList:[],
- list: [],
- copyList: [],
- list1: [],
- copyList1: [],
- query:{
- distance:1000000000,
- latitude:0,
- longitude:0,
- regionCode:'',
- page:0,
- size:10
- },
- imgUrl:{
- Kfc:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/xgJrwD0vChsW012ac1e138a0aa5a970e8f8c59dab926.png/1.png',
- MDL:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/K64jffEqRIDr487e8cab971c3b890d4066a26f5856d2.png/1.png',
- XBK:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/xMwtPkICBcam5513c4ac644054e60009cb8b1eb52e8f.png/1.png',
- NXDC:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/U9j6fgVmKeAt522ed50aa1a72f798260e0e30138d4c6.png/1.png',
- RXKF:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/zS5Q8sC9AAQca76eef36da2bd5a2ec234d75d8dcc044.png/1.png',
- XC:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/fA95my16Qunf967a9d992fc41134332926bcb5665881.png/1.png',
- KD:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/wk5eyuvhighG206a7ea081e3f0b783ff2a9555375e85.png/1.png',
- }
- // query:{
- // queryName:'',
- // 'location.lat':0,
- // 'location.lon':0,
- // pageCurrent:1,
- // pageSize:100
- // },
-
- }
- },
- filters: {
- filterDis: function(value) {
- if(value<1000){
- return value.toFixed(0) +'m';
- }else{
- return (value/1000).toFixed(0)+'km'
- }
- }
- },
- methods: {
- formatImg(item){
- if(item.productType == 'Kfc'){
- // if(){
-
- // }
- }else{
- return item.cover[0]
- }
- },
- chooseCity(){
- uni.navigateTo({
- url:`/hotel/cityList?backUrl=/pages/index/index`
- })
- },
- // swiper变动
- swiperChange(val) {
- this.current = val.target.current
- },
- jump(url){
- uni.reLaunch({
- url
- })
- },
- // 点击搜索
- handleSearch(){
- if(!uni.getStorageSync('token')){
- return uni.showModal({
- title:'请登录',
- confirmText:'去登录',
- success(res){
- if(res.confirm){
- uni.navigateTo({
- url:'/login/login/login?redirect=/pages/index/index'
- })
- }
- }
- })
- }
- uni.reLaunch({
- url:'./search'
- })
- // if(!val) return
- // this.query.queryName = val
- // this.query.pageCurrent = 1
- // this.list = []
- // this.list1 = []
- // this.status = 'more'
- // this.search()
- },
- // 获取当前城市
- getCity(){
- let that = this
- this.city = '定位中'
- return new Promise((resolve,reject)=>{
- uni.getLocation({
- type: 'gcj02',
- success: (res) => {
- // 解析地址
- that.query.latitude = res.latitude.toFixed(5)
- that.query.longitude = res.longitude.toFixed(5)
- // that.query['location.lat'] = res.latitude
- // that.query['location.lon'] = res.longitude
- // 存储经纬度
- uni.setStorageSync('location',JSON.stringify({latitude:res.latitude.toFixed(5),longitude:res.longitude.toFixed(5)}))
- if(that.query.regionCode){//选择了城市
- uni.setStorageSync('regionCode',that.query.regionCode)
- console.log('选择了城市',that.city);
- that.city = uni.getStorageSync('HomeCity') || uni.getStorageSync('city')
- getDistrict({boundary:1,keyword:that.city,sub_admin:1,extensions_code:1}).then(r=>{
- console.log('区域',r);
- let data = []
- r.content.districts&&r.content.districts[0].districts.map((item,index)=>{
- data.push({
- label:item.name,
- id:index
- })
- })
- uni.setStorageSync('districtList',JSON.stringify(data))
- resolve()
- })
- }else{//没选择城市
- console.log('没选择城市',that.city);
- uni.setStorageSync('HomeCity','')
-
- queryFromLocation({
- coordType:'gcj02ll',
- lat: that.query.latitude,
- lng: that.query.longitude
- }).then(res=>{
- console.log('解析结果',res);
- if(res.content.status&&res.content.status == 302){
- that.query.regionCode = '520100'
- that.city = '贵阳'
- uni.setStorageSync('regionCode','520100')
- uni.setStorageSync('city','贵阳')
- resolve()
- }
- if(res.state == 'Success'){
- that.query.regionCode = res.content.geoAddressComponent.adcode.substr(0,4) +'00'
- uni.setStorageSync('regionCode',that.query.regionCode)
- that.city = res.content.geoAddressComponent.city
- uni.setStorageSync('city',res.content.geoAddressComponent.city)
- getDistrict({boundary:1,keyword:that.city,sub_admin:1,extensions_code:1}).then(r=>{
- console.log('区域',r);
- let data = []
- r.content.districts&&r.content.districts[0].districts.map((item,index)=>{
- data.push({
- label:item.name,
- id:index
- })
- })
- uni.setStorageSync('districtList',JSON.stringify(data))
- resolve()
- })
- }
- })
- // qqmapsdk.reverseGeocoder({
- // location: {
- // latitude: res.latitude,
- // longitude: res.longitude
- // },
- // success: function(res) {
- // // 市
- // that.city = res.result.address_component.city
-
- // if(uni.setStorageSync('districtList')&&uni.getStorageSync('city')==that.city) return
- // uni.setStorageSync('city',res.result.address_component.city)
- // // 获取市区的行政区
- // qqmapsdk.getDistrictByCityId({
- // // 传入对应省份ID获得城市数据,传入城市ID获得区县数据,依次类推
- // id: res.result.ad_info.city_code.substr(3), //对应接口getCityList返回数据的Id,如:北京是'110000'
- // success: function(res) {//成功后的回调
- // console.log('对应城市ID下的区县数据:', res.result[0]);
- // let data = res.result[0]
- // data.map(item=>{
- // item.label = item.fullname
- // })
- // uni.setStorageSync('districtList',JSON.stringify(data))
- // },
- // fail: function(error) {
- // console.error(error);
- // },
- // complete: function(res) {
- // console.log(res);
- // }
- // });
- // resolve()
- // },
- // fail: function(res) {
- // that.city = '定位失败'
- // },
- // })
- }
-
- },
- fail: () => {
- console.log("获取经纬度失败");
- },
- })
- })
- },
- // 跳转优惠详情
- goDetail(url,id,banner,title) {
- uni.navigateTo({
- url: `${url}?id=${id}&title=${title}`,
- success(res) {
- res.eventChannel.emit('banner', banner)
- }
- })
- },
- goGoodsDetail(item) {
- // uni.setStorageSync('shopInfo', JSON.stringify(item))
- let url = ''
- let cateName = '' //大牌点餐类型名
- let id = item.pid
- let epId = item.id
- if (item.productType === 'Web') {
- url = item.meta.url
- console.log('链接');
- } else if (item.productType === 'Recharge') {
- url = '/detail/virtualGoods/index'
- console.log('充值类');
- } else if (item.productType === 'Scenic') {
- url = '/scenic/detail'
- console.log('景区');
- } else if (item.productType === 'ScenicTicket') {
- console.log('景区门票');
- } else if (item.productType === 'StudyTour') {
- url = '/detail/virtualGoods/index'
- console.log('StudyTour');
- } else if (item.productType === 'Hotel') {
- url = '/hotel/hotelDetail'
- console.log('酒店');
- } else if (item.productType === 'HotelRoom') {
- url = '/hotel/hotelDetail'
- console.log('酒店房型');
- } else if (item.productType === 'Cinema') {
- url = '/movie/movieList'
- console.log('电影院');
- } else if (item.productType === 'MovieTicket') {
- url = '/movie/movieDetail'
- console.log('电影票');
- } else if (item.productType === 'Restaurant') {
- url = '/detail/virtualGoods/index'
- console.log('餐厅');
- } else if (item.productType === 'RestaurantFood') {
- url = '/orderFood/shopDetail'
- id = item.meta.menus.shop.id
- cateName = item.meta.menus.cate_name
- uni.setStorageSync('ot',item.meta.ot)
- console.log('大牌点餐');
- } else if (item.productType === 'CarMaintain') {
- url = '/detail/discountsDetail/index'
- console.log('汽车保养门店');
- } else if (item.productType === 'CarMaintainGoods') {
- url = '/detail/detail/discountsDetail/index/index'
- console.log('汽车保养商品');
- } else if (item.productType === 'CarMaintainService') {
- url = '/detail/detail/discountsDetail/index/index'
- console.log('汽车保养服务');
- } else if (item.productType === 'Shop') {
- url = '/detail/shopDetail/shopDetail'
- console.log('店铺');
- } else if (item.productType === 'ShopGoods') {
- url = '/detail/goodsDetail/index'
- console.log('店铺商品');
- } else if (item.productType === 'ShopService') {
- url = '/detail/goodsDetail/index'
- console.log('店铺服务');
- } else if (item.productType === 'Coupon') {
- url = '/detail/goodsDetail/index'
- console.log('优惠券');
- }
- else if (item.productType === 'PetrolStation') {
- url = '/refuel/refuelDetail'
- console.log('加油站');
- }
-
- else {
- // 处理未知或未定义的产品类型
- console.log('未知产品类型');
- }
-
-
- uni.navigateTo({
- // url: `../../detail/goodsDetail/index?id=${item.goodsVos[0].goodsId}`
- url: `${url}?id=${id}&epId=${epId}&cateName=${cateName}`
- })
-
- },
- // 更多套餐
- handleMore() {
- uni.reLaunch({
- // url:'../../login/login/login'
- url: '../../combo/combo/combo'
- })
- },
- // 获取用户详情
- getUserDetail() {
- getUserDetail().then(res => {
- uni.setStorageSync('userInfo', JSON.stringify(res.content))
- })
- },
- loadMore() {
- // if(this.query['location.lat']&&this.query['location.lon']){
- if(this.query.latitude&&this.query.longitude&&this.query.regionCode){
- this.search()
- }
- },
- search() {
- if(this.status == 'noMore' || this.status == 'loading') return
- this.status = 'loading'
- homeSearch(this.query).then(res=>{
- this.loading = false
- if(res.state == 'Success'){
- let list = []
- let list1 = []
- let data = res.content.content
- data.map((item,index)=>{
- if(item.productType == 'Cinema'){
- delete item.meta
- }
- if(index%2 == 0){
- list.push(item)
- }else{
- list1.push(item)
- }
- })
-
- // 存储原始数据
- this.list = this.list.concat(list)
- this.list1 = this.list1.concat(list1)
- let total = this.list.length + this.list1.length
- if(total >= res.content.totalElements){
- this.status = 'noMore'
- }else{
- this.status = 'more'
- this.query.page++
- }
- }
- })
- },
- // 金刚区
- getMenu(){
- return new Promise((resolve,reject)=>{
- getMenu({currentPage:1,pageSize:10,status:2,belongType:2}).then(res=>{
- if(res.state == 'Success'){
- this.discountsList = res.content.records
- resolve(1)
- }
- })
- })
- },
- // 广告位
- getAdv(){
- return new Promise((resolve,reject)=>{
- getAdv({currentPage:1,pageSize:10,advertsType:1,status:1,belongType:2}).then(res=>{
- if(res.state == 'Success'){
- this.advList = res.content.records
- // this.advList = res.content.records.filter((item,index)=>index<2)
- // this.advList1 = res.content.records.filter((item,index)=>index>=2)
- resolve(2)
- }
- })
- })
- },
- // 弹窗广告
- getDialogAdv() {
- let loginShow
- if(uni.getStorageSync('token')){
- loginShow = 2
- }else{
- loginShow = 1
- }
- getAdv({
- currentPage: 1,
- pageSize: 99,
- status:1,
- belongType: 2,
- loginShow,
- advertsType: 6,
- }).then((res) => {
- if (res.state == "Success") {
- this.dialogAdvList = res.content.records
- }
- });
- },
- // 获取商品列表内广告位
- getGoodsAdv(){
- return new Promise((resolve,reject)=>{
- getAdv({currentPage:1,pageSize:99,advertsType:2,status:1,belongType:2}).then(res=>{
- if(res.state == 'Success'){
- this.advList1 = res.content.records
- resolve(2)
- }
- })
- })
- },
- // 获取电影票城市id
- cityList(){
- return new Promise((resolve,reject)=>{
- cityList().then(res=>{
- if(res.state == 'Success'){
- let city = uni.getStorageSync('city').replace('市','')
- let cityId = res.content.data.filter(item=>item.name == city)[0].cityId
- uni.setStorageSync('movieCityId',cityId)
- resolve()
- }
- })
- })
- },
- getCityList() {
- return new Promise((resolve,reject)=>{
- getCityList({name:'',page:0,size:999}).then(res=>{
- if(res.state == 'Success'){
- let city = this.city.replace('市','')
- res.content.content.forEach(item=>{
- if(item.name.indexOf(city) != -1){
- // this.query.regionCode = item.code
- resolve()
- }
- })
- resolve()
- }
- })
- })
- }
- },
- onPageScroll(e) {
- if(e.scrollTop >= 50){
- this.background = true
- }else{
- this.background = false
- }
- },
- onShow() {
- if (uni.getStorageSync('token')&&!uni.getStorageSync('userInfo')) {
- this.getUserDetail()
-
- }
- if(uni.getStorageSync('token')){
- refreshVip().then(res=>{
- if(res.state == 'Success'){
- this.getUserDetail()
- }
- })
- }
- },
- onHide() {
- },
- onLoad(query){
- console.log(444,query);
- this.loading = true
- const token = uni.getStorageSync('token')
- console.log(!!token)
- if(query.scene){
- // const token = uni.getStorageSync('token')
- if(token){
- uni.showToast({
- title: '已经是平台用户',
- icon: 'none'
- });
- // return
- }else{
- uni.setStorageSync('inviteCode',decodeURIComponent(query.scene))
- }
- // uni.setStorageSync('inviteCode',decodeURIComponent(query.scene))
- }
-
- this.query.regionCode = query.regionCode || ''
- this.getDialogAdv()
- this.status = 'more'
- this.list = []
- this.list1 = []
- this.query.page = 0
- Promise.all([this.getMenu(),this.getCity()]).then(res=>{
- this.search()
- // if(query.regionCode){
- // this.search()
- // }else{
- // this.getCityList().then(()=>{
- // this.search()
- // })
- // }
- this.cityList()
- })
- },
- onShareTimeline() {
- return {
- title: "慧研学惠生活",
- query: "id=1",
- imageUrl: "https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/XHBjBiMRhVYG8f1a30bbbd80c2346197b81470444c9a.png/1.png",
- };
- },
- onShareAppMessage() {
- return {
- title: "慧研学惠生活",
- path: "/pages/index/index",
- };
- },
- onPullDownRefresh() {
- this.status = 'more'
- this.list = []
- this.list1 = []
- this.query.page = 0
- Promise.all([this.getMenu(),this.getCity()]).then(res=>{
- this.getCityList().then(()=>{
- this.search()
- })
- // this.cityList()
- uni.stopPullDownRefresh()
- })
- },
- created() {
- // this.loading = true
- // this.getDialogAdv()
- // Promise.all([this.getMenu(),this.getCity()]).then(res=>{
- // this.getCityList().then(()=>{
- // this.search()
- // })
- // this.cityList()
- // })
-
- }
- }
- </script>
- <style lang="scss">
- .home {
- // padding-bottom:120rpx;
- // background: linear-gradient(180deg, #FFFFFF 0%, #DCE8FF 100%);
- background: #F9F9F9;
- .card-title {
- display: flex;
- justify-content: center;
- .title {
- font-size: 32rpx;
- text-align: center;
- color: #fff;
- width: 210rpx;
- line-height: 64rpx;
- background: linear-gradient(360deg, #3074F8 0%, #568FFF 100%);
- border-radius: 0rpx 0rpx 24rpx 24rpx;
- }
- }
- .login-home {
- // background: linear-gradient(178deg, #FFFFFF 0%, #F9F9F9 100%);
- // background: #FFF;
- .discount-list {
- display: flex;
- flex-wrap: wrap;
- // padding: 30rpx 0;
- margin: 0 24rpx 20rpx;
- // background: #fff;
- border-radius: 16rpx;
- position: relative;
- top: 20rpx;
- padding-top: 20rpx;
- .discount-item {
- width: 20%;
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-top: 20rpx;
- margin-bottom: 20rpx;
- position: relative;
- .icon {
- width: 80rpx;
- height: 80rpx;
- }
- .title {
- font-size: 24rpx;
- margin-top: 10rpx;
- font-weight: 300;
- color: #222222;
- }
- .tag {
- position: absolute;
- top: -20rpx;
- left: 50%;
- background: #FF0615;
- box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
- border-radius: 14rpx 14rpx 14rpx 0rpx;
- color: #fff;
- white-space: nowrap;
- font-size: 18rpx;
- line-height: 24rpx;
- height: 24rpx;
- padding: 0 10rpx;
- // width: fit-content;
- // background-size: 100% 34rpx;
- }
- .desc {
- color: #FF0817;
- font-size: 16rpx;
- text-align: center;
- margin-top: 4rpx;
- }
- }
- }
- .title-img {
- width: 686rpx;
- height: 166rpx;
- margin: 24rpx 32rpx;
- }
- .swiper-box{
- position: relative;
- width: 344rpx;
- height: 462rpx;
- border-radius: 16rpx;
- margin-bottom: 20rpx;
- .progress{
- position: absolute;
- top: 38rpx;
- right: 20rpx;
- z-index: 2;
- color: #FFFFFF;
- font-size: 16rpx;
- background: rgba(255, 255, 255, 0.3);
- padding: 2rpx 10rpx;
- border-radius: 14rpx;
- }
- .swiper {
- position: relative;
- height: 100%;
- .swiper-item {
- width: 344rpx;
- height: 462rpx;
- border-radius: 16rpx;
- object-fit: cover;
- }
- }
- }
- .advertise-box {
- display: flex;
- justify-content: space-between;
- margin: 0 24rpx;
- padding: 20rpx 0;
-
- }
- .content {
- border-radius: 16rpx 16rpx 0 0;
- }
- .zs-list {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- padding: 0 24rpx;
- .left {
- .adv-swiper{
- width: 340rpx;
- height: 444rpx;
- margin-bottom: 25rpx;
- .adv-item{
- width: 340rpx;
- height: 444rpx;
- }
- }
- }
- .ad{
- width: 340rpx;
- border-radius: 16rpx;
- }
- .store-item {
- width: 344rpx;
- margin-bottom: 20rpx;
- // box-shadow: 0rpx 0rpx 24rpx 2rpx rgba(0, 0, 0, 0.08);
- border-radius: 16rpx;
- background: #fff;
- .icon {
- width: 100%;
- height: 300rpx;
- border-radius: 16rpx 16rpx 0 0;
- }
- .info{
- flex: 1;
- padding: 16rpx;
- position: relative;
- .title{
- margin-top: 10rpx;
- display: flex;
- align-items: center;
- .tag{
- display: inline-block;
- text-align: center;
- font-size: 20rpx;
- color: #FFFFFF;
- background: $uni-color-primary;
- padding: 2rpx 10rpx;
- border-radius: 8rpx;
- }
- .text{
- font-size: 28rpx;
- font-weight: bold;
- flex: 1;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
-
- .desc{
- font-size: 24rpx;
- color: #AAAAAA;
- overflow: hidden;
- text-overflow: ellipsis;
- /* 弹性伸缩盒子模型显示 */
- display: -webkit-box;
- /* 限制在一个块元素显示的文本的行数 */
- -webkit-line-clamp: 2;
- /* 设置或检索伸缩盒对象的子元素的排列方式 */
- -webkit-box-orient: vertical;
- margin-top: 12rpx;
- }
- .discount-tag{
- display: inline-block;
- padding: 0 10rpx;
- font-size: 20rpx;
- color: #EE4320;
- line-height: 28rpx;
- background: #FFF6F5;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- margin-top: 10rpx;
- }
- .price-box{
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 12rpx;
- .left{
- display: flex;
- align-items: flex-end;
- vertical-align: bottom;
- .unit{
- font-size: 20rpx;
- color: $uni-color-primary;
- font-weight: bold;
- }
- .price{
- font-size: 32rpx;
- line-height: 32rpx;
- color: $uni-color-primary;
- font-weight: bold;
- }
- .label{
- font-size: 20rpx;
- color: #AAAAAA;
- margin-left: 6rpx;
- }
- .old-price{
- font-size: 20rpx;
- color: #AAAAAA;
- text-decoration: line-through;
- margin-left: 12rpx;
- }
- }
- .right{
- font-size: 24rpx;
- color: #AAAAAA;
- }
- }
-
- .address-box{
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 20rpx;
- color: #AAAAAA;
- margin-top: 15rpx;
- .address{
- width: 200rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- /* 弹性伸缩盒子模型显示 */
- display: -webkit-box;
- /* 限制在一个块元素显示的文本的行数 */
- -webkit-line-clamp: 1;
- /* 设置或检索伸缩盒对象的子元素的排列方式 */
- -webkit-box-orient: vertical;
-
- }
- .distance{
-
- }
- }
-
- }
- }
- }
- }
- }
- </style>
|