<template>
  <view class="Circle_friends">
    <view class="circle_friends_wrapper">
      <view v-if="isFshow">
        <view
          class="site-box flex_a_c_j_sb"
          :style="{ 'background-color': backColor }"
        >
          <view
            :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']"
            @click="selectLocation"
          >
            <view
              :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']"
              style="color: #000; margin-left: 20rpx"
            >
            </view>
            <view class="town_name" style="color: #000">{{ street }}</view>
          </view>
          <navigator
            url="/pages/chat/customer_list/index?type=0"
            hover-class="none"
          >
            <view
              :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"
              style="color: #000"
            ></view>
          </navigator>
        </view>
        <!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
					<view class="bg-img">
						<img :src="bgColor" alt="">
					</view>
				</view> -->
      </view>

      <zbpSwiper
        ref="list"
        :isSelectPlace="true"
        :town="street"
        :show="show"
        :location_Arr="locationArr"
        @kkchange="kkchange"
        @change="dchange"
      >
      </zbpSwiper>

      <view class="tabs_wrapper">
        <u-tabs
          :list="tabsData.list"
          @click="tabsChange"
          lineColor="#F84221"
          keyName="cate_name"
          :activeStyle="activeStyle"
          itemStyle="padding-left: 0px;  height: 33px;"
        ></u-tabs>
      </view>
      <view class=""> </view>
      <view class="goodslist">
        <WaterfallsFlow :wfList="cateGoods" />
      </view>
      <view class="empty_wrapper" v-if="emptyShow">
        <u-empty
          :show="emptyShow"
          mode="list"
          icon="http://cdn.uviewui.com/uview/empty/list.png"
        ></u-empty>
      </view>
    </view>

    <u-picker
      :defaultIndex="[0, 0]"
      :show="showPicker"
      ref="uPicker"
      :columns="columnData"
      @confirm="confirm"
      @cancel="showPicker = false"
      @change="changeHandler"
      keyName="name"
    ></u-picker>
    <u-loadmore :status="status" v-if="cateGoods.length >= where.limit" />
    <!-- <view class="bg_color"></view> -->

    <!-- <m-tabbar native>
      <template v-slot:tabbar_index_2>
        <view class="custom_style">
          <view class="custom_style_icon"></view>
        </view>
      </template>
    </m-tabbar> -->
    <view class="location" v-if="isshow">
      <view class="locationa"> 位置权限使用说明 </view>
      <view class="locationb"> 用于向你推荐最近门店 </view>
    </view>
  </view>
</template>

<script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'

import {
  getSlideAPI
} from '@/api/lihai.js'
import {
  graphicLstApi,
  getTopicList,
  graphicStartApi
} from '@/api/community.js'
import {
  getIndexData,
  getDiy,
  getArticleList,
  getArticleCategoryLists
} from '@/api/api.js'
import {
  getGeocoder,
  merClassifly
} from '@/api/store.js';
import {
  getArea,
  getStreet
} from '@/api/article.js';
import {
  Toast
} from '@/libs/uniApi'
export default {
  components: {
    mTabbar,
    zbpSwiper,
    easyLoadimage,
    WaterfallsFlow
  },
  data () {
    return {
      activeStyle: {

        color: '#333333',
        fontWeight: 'bold',
        transform: 'scale(1.04)'
      },
      isshow: false,
      locationArr: ({}),
      status: 'loadmore',
      bgColor: '',
      showPicker: false,
      columnData: [],
      show: false,
      tabsData: {
        list: [],
        tabsActive: 0
      },
      tabsData1: {
        list: [],
        tabsActive: 0
      },
      where: {
        category_id: 0,
        page: 1,
        limit: 6
      },
      currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
      keyword: '',
      location: '',
      emptyShow: false,
      street: '',
      cateGoods: [],
      recoList: [],
      articleList: [],
      streeta_id: '',
      street: '',
      bgColor: '',
      backColor: 'rgba(252, 252, 252, 0)',
      isFshow: false,
      scrollTop: 0,
      show: true
    }
  },

  onPullDownRefresh () {
    this.getCateList()
    this.cateGoods = []
    this.getGoods()
    this.Area()
    uni.stopPullDownRefresh()
  },

  onLoad () {



    this.getCateList()
    // this.getArticle()
    this.getGoods()
    this.Area()
    //this.setPermissions()




    // this.openTongZhi()
    uni.$on('connectstatusChange', (connectstatus) => {
      var connectstr = ''
      if (connectstatus == true) {
        connectstr = '已连接'
        this.getRegistrationID()
      } else {
        connectstr = '未连接'
      }
      this.connectstatus = connectStr
    })

  },
  onTabItemTap (e) {
    if (e.text.length >= 4) {
      uni.pageScrollTo({
        selector: ".Circle_friends",
        scrollTop: 0
      })

    }
  },
  onReachBottom () {
    if (this.status == 'nomore') return;
    this.status = 'loading';
    this.where.page = ++this.where.page;
    this.getGoods()
  },
  mounted () {
    this.selfLocation()
    // #ifdef  H5
    // 监听页面滚动事件
    window.addEventListener("scroll", this.scrolling);
    // #endif

    this.$bus.$on('value-updated', (newValue) => {
      // 更新父组件的值 
      this.street = newValue.split(',')[0]

    });
  },
  // #ifdef APP-PLUS
  onPageScroll (e) {

    const scrollTop = e.scrollTop;

    // 导航条颜色透明渐变

    if (scrollTop <= 20) {
      this.backColor = 'rgba(252, 252, 252, 0.0)'
      this.isFshow = false
      this.show = true
      uni.setTabBarItem({
        index: 0,
        text: "泸州",
        iconPath: '/static/tabbar_icon/a.png',
        selectedIconPath: '/static/tabbar_icon/a-a.png'
      });
    } else if (20 < scrollTop && scrollTop <= 100) {
      this.backColor = 'rgba(255, 255, 255, 0.5)'
      this.isFshow = true
      this.show = false
    } else if (scrollTop > 100) {
      this.backColor = 'rgba(252, 252, 252, 1.0)'
      this.isFshow = true
      this.show = false
      uni.setTabBarItem({
        index: 0,
        text: '返回顶部',
        iconPath: '/static/tabbar_icon/top.png',
        selectedIconPath: '/static/tabbar_icon/top.png'
      });
    }


  },
  // #endif
  beforeDestroy () {
    // 销毁监听事件
    this.$bus.$off('value-updated')
  },
  methods: {

    scrolling () {
      // 滚动条距文档顶部的距离
      let scrollTop =
        window.pageYOffset ||
        document.documentElement.scrollTop ||
        document.body.scrollTop;
      // 滚动条滚动的距离
      let scrollStep = scrollTop - this.oldScrollTop;
      // console.log("header 滚动距离 ", scrollTop);
      // 更新——滚动前,滚动条距文档顶部的距离
      this.oldScrollTop = scrollTop;
      //变量windowHeight是可视区的高度
      let windowHeight =
        document.documentElement.clientHeight || document.body.clientHeight;
      //变量scrollHeight是滚动条的总高度
      let scrollHeight =
        document.documentElement.scrollHeight || document.body.scrollHeight;

      //滚动条到底部的条件
      if (scrollTop + windowHeight == scrollHeight) {
        //你想做的事情
        // console.log("header  你已经到底部了");
      }
      if (scrollTop <= 20) {
        this.backColor = 'rgba(252, 252, 252, 0.0)'
        this.isFshow = false
        uni.setTabBarItem({
          index: 0,
          text: "泸州",
          iconPath: '/static/tabbar_icon/a.png',
          selectedIconPath: '/static/tabbar_icon/a-a.png'
        });
      } else if (20 < scrollTop && scrollTop <= 100) {
        this.backColor = 'rgba(255, 255, 255, 0.5)'
        this.isFshow = true
      } else if (scrollTop > 100) {
        this.backColor = 'rgba(252, 252, 252, 1.0)'
        this.isFshow = true

        uni.setTabBarItem({
          index: 0,
          text: '返回顶部',
          iconPath: '/static/tabbar_icon/top.png',
          selectedIconPath: '/static/tabbar_icon/top.png'
        });
      }


    },

    kkchange (e) {
      this.bgColor = e
    },


    tabsChange1 (item) {
      this.getArticleList(item.article_category_id)
      this.streeta_id = item.id
      this.tabsData1.tabsActive = item.index
    },
    async getArticle () {
      let list = []

      const {
        data
      } = await getArticleCategoryLists()
      data.map((item, index) => {
        if (item.title !== '首页推荐') {
          list.push(item)
        } else {
          getArticleList(item.article_category_id).then(res => {
            this.recoList = res.data.list
          })
        }
      })

      this.tabsData1.list = list
      this.getArticleList(list[0].article_category_id)
    },
    async getArticleList (id) {
      let obj = {
        is_home: 1
      }
      const {
        data
      } = await getArticleList(id)
      this.articleList = data.list
    },
    article (item) {
      uni.navigateTo({
        url: '/pages/news_details/index?id=' + item.article_id
      })
    },
    selectPlce (e) {
      this.street_id = e.value[1].code
      this.town = e.value[1].name
      this.getCloudShopMerId(e.value[1].code)
    },
    getCloudShopMerId (id) {
      get_cloud_shop(id).then(res => {
        res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
      })
    },
    selectLocation () {
      this.showPicker = true
    },
    confirm (e) {

      this.street = e.value[1].name

      this.$nextTick(() => {
        this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);

      })
      this.showPicker = false
    },
    changeHandler (e) {
      const {
        columnIndex,
        value,
        values,
        index,
        picker = this.$refs.uPicker
      } = e;
      if (columnIndex === 0) {
        getStreet({
          area_code: value[0]['code']
        }).then(res => {
          this.$refs.uPicker.setColumnValues(1, res.data);
        });
      }
    },
    Area () {
      getArea({
        city_code: 510500
      }).then(res => {
        this.$refs.uPicker.setColumnValues(0, res.data);
        this.Street(res.data[0]['code']);
      });
    },
    Street (code) {
      getStreet({
        area_code: code
      }).then(res => {
        this.$refs.uPicker.setColumnValues(1, res.data);
      });
    },
    dchange (e) {

      this.$refs.list.street = e.value[1].name
      this.street = e.value[1].name
    },
    gogogo (item) {
      if (item.video_link.length > 0) {
        uni.navigateTo({
          // #ifdef MP || H5
          url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}`
						// #endif
						// #ifdef APP
						url: `/pages/short_video/appSwiper/index?id=${item.community_id}`
          // #endif
        })

      } else {
        uni.navigateTo({

          url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
        })
      }
    },
    giveStart (item) {
      let status = item.relevance_id ? 0 : 1
      graphicStartApi(item.community_id, {
        status: status
      }).then(res => {
        if (item.relevance_id) {
          item.count_start--;
          item.count_start = item.count_start == 0 ? 0 : item.count_start
          item.relevance_id = false
        } else {
          item.count_start++;
          item.relevance_id = true
        }
      })
    },
    getGoods: function (item) {

      graphicLstApi(this.where).then(res => {
        this.cateGoods.push(...res.data.list)

        if (res.data.list.length < this.where.limit) this.status = 'nomore'

        if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true

        // if (item) {

        // 	if (item.index == 1 && this.cateGoods[0]) {
        // 		uni.navigateTo({
        // 			// #ifdef MP || H5
        // 			url: `/pages/short_video/nvueSwiper/index?id=${this.cateGoods[0].community_id}`
        // 			// #endif
        // 			// #ifdef APP
        // 			url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
        // 			// #endif
        // 		})
        // 	}
        // }

      })
    },
    /*获取分类列表*/
    async getCateList () {
      const {
        data
      } = await getTopicList()
      this.tabsData.list = [{
        cate_name: "推荐",
        category_id: 0
      }, ...data]
    },
    tabsChange (item) {
      this.cateGoods = []
      this.where.category_id = item.category_id
      this.emptyShow = false
      this.status = 'loadmore'
      this.where.page = 1
      this.getGoods(item)
      this.street_id = item.id
      this.tabsData.tabsActive = item.index

    },
    selfLocation () {
      if (uni.getStorageSync('loction') == true) {
        this.isshow = false
      } else {
        this.isshow = true
        uni.setStorageSync('loction', true);
      }
      uni.getLocation({
        type: 'wgs84',
        timeout: '10',
        success: (res) => {
          this.isshow = false
          let latitude, longitude;
          latitude = res.latitude.toString();
          longitude = res.longitude.toString();
          getGeocoder({
            lat: latitude,
            long: longitude
          }).then(res => {
            let town = res.data.address_reference.town.title
            let street_id = res.data.address_reference.town.id
            this.street = res.data.address_component.street

            this.$nextTick(() => {
              this.$bus.$emit('value-updated', this.street + ',' +
                street_id);

            })
          }).catch(err => {
            uni.showToast({
              title: err,
              icon: 'none'
            })
          })
        },
        fail: (err) => {
          this.isshow = false
          uni.showToast({
            title: "获取定位超时",
            icon: 'none',
            duration: 2000
          });
        }
      });
    },

    /**
     * 设置手机通知权限
     */
    setPermissions () {
      // #ifdef APP-PLUS  
      if (plus.os.name == 'Android') { // 判断是Android
        var main = plus.android.runtimeMainActivity();
        var pkName = main.getPackageName();
        var uid = main.getApplicationInfo().plusGetAttribute("uid");
        var NotificationManagerCompat = plus.android.importClass(
          "android.support.v4.app.NotificationManagerCompat");
        //android.support.v4升级为androidx
        if (NotificationManagerCompat == null) {
          NotificationManagerCompat = plus.android.importClass(
            "androidx.core.app.NotificationManagerCompat");
        }
        var areNotificationsEnabled = NotificationManagerCompat.from(main).areNotificationsEnabled();
        // 未开通‘允许通知’权限,则弹窗提醒开通,并点击确认后,跳转到系统设置页面进行设置  
        if (!areNotificationsEnabled) {
          uni.showModal({
            title: '通知权限开启提醒',
            content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
            showCancel: false,
            confirmText: '去设置',
            success: function (res) {
              if (res.confirm) {
                var Intent = plus.android.importClass('android.content.Intent');
                var Build = plus.android.importClass("android.os.Build");
                //android 8.0引导  
                if (Build.VERSION.SDK_INT >= 26) {
                  var intent = new Intent(
                    'android.settings.APP_NOTIFICATION_SETTINGS');
                  intent.putExtra('android.provider.extra.APP_PACKAGE', pkName);
                } else if (Build.VERSION.SDK_INT >= 21) { //android 5.0-7.0  
                  var intent = new Intent(
                    'android.settings.APP_NOTIFICATION_SETTINGS');
                  intent.putExtra("app_package", pkName);
                  intent.putExtra("app_uid", uid);
                } else { //(<21)其他--跳转到该应用管理的详情页  
                  intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
                  var uri = Uri.fromParts("package", mainActivity
                    .getPackageName(),
                    null);
                  intent.setData(uri);
                }
                // 跳转到该应用的系统通知设置页  
                main.startActivity(intent);
              }
            }
          });
        }
      } else if (plus.os.name == 'iOS') { // 判断是ISO
        var isOn = undefined;
        var types = 0;
        var app = plus.ios.invoke('UIApplication', 'sharedApplication');
        var settings = plus.ios.invoke(app, 'currentUserNotificationSettings');
        if (settings) {
          types = settings.plusGetAttribute('types');
          plus.ios.deleteObject(settings);
        } else {
          types = plus.ios.invoke(app, 'enabledRemoteNotificationTypes');
        }
        plus.ios.deleteObject(app);
        isOn = (0 != types);
        if (isOn == false) {
          uni.showModal({
            title: '通知权限开启提醒',
            content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
            showCancel: false,
            confirmText: '去设置',
            success: function (res) {
              if (res.confirm) {
                var app = plus.ios.invoke('UIApplication', 'sharedApplication');
                var setting = plus.ios.invoke('NSURL', 'URLWithString:',
                  'app-settings:');
                plus.ios.invoke(app, 'openURL:', setting);
                plus.ios.deleteObject(setting);
                plus.ios.deleteObject(app);
              }
            }
          });
        }
      }
      // #endif  
    }
  }
}
</script>

<style lang="scss" scoped>
page {
  background-color: #f4f7fe;

  // background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}

.location {
  background-color: #f6f6f6;
  width: 680rpx;
  height: 150rpx;
  position: absolute;
  top: 0;
  z-index: 9999;
  border-radius: 20rpx;
  left: 50%;
  margin-left: -340rpx;
  margin-top: 80rpx;
  padding-left: 20rpx;

  .locationa {
    font-size: 28rpx;
    color: #000;
    font-weight: 500;
    margin-top: 30rpx;
    margin-bottom: 15rpx;
  }

  .locationb {
    font-size: 20rpx;
    color: #5a5a5a;
  }
}

.Circle_friends {
  position: relative;
  padding: 0 0 87.72rpx 0;

  background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
}

// .bg-img {
// 	position: absolute;
// 	width: 100%;
// 	height: 100%;

// 	top: 0;
// 	/* #ifdef MP || APP-PLUS */
// 	z-index: -100;
// 	/* #endif */
// 	/* #ifdef H5 */
// 	z-index: -100;
// 	/* #endif */
// 	z-index: -100;
// 	filter: blur(0);
// 	overflow: hidden;

// 	img {
// 		width: 100%;
// 		height: 100%;
// 		filter: blur(30rpx);
// 		transform: scale(1.5);
// 	}
// }

.sitebox {
  animation-name: fadeIn;
  animation-duration: 3s;
  animation-fill-mode: forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.site-box {
  width: 100%;
  /* #ifdef MP || APP-PLUS */
  height: 160rpx;
  /* #endif */
  /* #ifdef H5 */
  height: 120rpx;
  /* #endif */
  margin-bottom: 26.32rpx;
  position: absolute;
  top: 0rpx;
  position: fixed;
  z-index: 999;
  /* #ifdef MP || APP-PLUS */
  padding-top: 75rpx;
  /* #endif */
  /* #ifdef H5 */
  padding-top: 25rpx;
  /* #endif */
  // background-color: #e5e5e5;

  padding-right: 20rpx;

  // 位置
  .place_wrapper {
    color: #fff;
    margin-right: 24.56rpx;
    font-size: 30rpx;

    opacity: 0;

    .town_name {
      margin-left: 21rpx;
    }
  }

  .iconfont {
    opacity: 0;
    font-size: 30rpx;
    font-size: 35.09rpx;
  }
}

.circle_friends_wrapper {
  position: relative;

  z-index: 2;
}

/deep/.u-tabs__wrapper__nav__line {
  width: 46rpx;
  margin-left: -2rpx;
}

/deep/.u-tabs__wrapper__nav__item {
  padding: 0 0px;
  padding-right: 10rpx;
}

.search_wrapper {
  width: 694.74rpx;
  margin: 0 auto;
}

.tabs_wrapper {
  width: 720rpx;
  margin: 0 auto;
  margin-bottom: 21.05rpx;
  // margin-left: -20rpx;
}

.empty_wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.article_box {
  height: 100%;
  width: 694.74rpx;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 16rpx;
  padding: 0 24.56rpx;
  box-sizing: border-box;

  .title-box {
    height: 87.72rpx;

    text {
      font-size: 28.07rpx;
    }
  }

  .article-item {
    display: flex;
    // height: 175.44rpx;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding: 21.05rpx 0;

    .text {
      flex: 1;
      height: 122.81rpx;
      margin-right: 17.54rpx;
      font-size: 24rpx;
      color: #999;
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .name {
        font-size: 26.32rpx;
        color: #282828;
      }
    }

    .pictrue {
      width: 175.44rpx;
      height: 122.81rpx;

      image {
        width: 100%;
        height: 100%;
        border-radius: 8px;
      }
    }
  }
}

.tabs_wrapper {
  width: 723rpx;
  margin: 0rpx auto;
  margin-bottom: 21.05rpx;

  .title {
    font-size: 31.58rpx;
    font-weight: bold;

    &::before {
      content: "";
      display: inline-block;
      width: 3px;
      height: 31.58rpx;
      background-color: #f84221;
      margin-right: 7.02rpx;
    }
  }
}

.goodslist {
  // display: flex;
  margin: 0 auto;
  width: 725rpx;
}

.goods {
  margin: 0 auto;
  width: 725rpx;

  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

  .goods_item {
    width: 356rpx;
    border: 1px solid;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    margin-bottom: 10.53rpx;
    position: relative;
    margin-top: -40rpx;

    .kk {
      width: 365rpx;
      height: 251rpx;
    }

    .goods_item_img {
      position: absolute;
      top: 18rpx;
      right: 18rpx;
      width: 52rpx;
      height: 52rpx;

      image {
        width: 100%;
        height: 100%;
      }
    }

    .goods_img {
      width: 100%;
      height: 294.74rpx;

      /deep/.easy-loadimage {
        width: 100%;
        height: 294.74rpx;
        // border-radius: 8rpx;
        position: relative;
      }
    }

    .botm {
      flex: 1;
      padding: 0 14.04rpx;
      padding-bottom: 21.05rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .title {
        font-size: 30rpx;
        font-family: PingFang SC-Medium, PingFang SC;
        font-weight: 500;
        color: #333333;
        margin: 12px 0;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
      }

      .goods_info {
        justify-content: space-between;

        .g_img {
          width: 49rpx;
          height: 49rpx;
          border-radius: 50%;
        }

        .g_name {
          margin-left: 8.77rpx;
          width: 100.63rpx;
          text-overflow: ellipsis;
          /* 溢出显示省略号 */
          overflow: hidden;
          /* 溢出隐藏 */
          white-space: nowrap;
          /* 强制不换行 */
        }

        .nice_box {
          display: flex;
          align-items: center;

          .isshow {
            color: #fe3530 !important;
          }

          .iconfont {
            font-size: 30rpx;
          }

          .icon-shoucang1 {
            color: #f84221;
          }

          .collect {
            font-size: 24rpx;
            margin-left: 5rpx;
          }
        }
      }
    }
  }

  .goods_items {
    width: 356rpx;

    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    margin-bottom: 10.53rpx;
    position: relative;

    .goods_item_img {
      position: absolute;
      top: 18rpx;
      right: 18rpx;
      width: 52rpx;
      height: 52rpx;

      image {
        width: 100%;
        height: 100%;
      }
    }

    .goods_img {
      width: 100%;
      height: 294.74rpx;

      /deep/.easy-loadimage {
        width: 100%;
        height: 294.74rpx;
        // border-radius: 8rpx;
        position: relative;
      }
    }

    .botm {
      flex: 1;
      padding: 0 14.04rpx;
      padding-bottom: 21.05rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .title {
        font-size: 30rpx;
        font-family: PingFang SC-Medium, PingFang SC;
        font-weight: 500;
        color: #333333;
        margin: 12px 0;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
      }

      .goods_info {
        justify-content: space-between;

        .g_img {
          width: 49rpx;
          height: 49rpx;
          border-radius: 50%;
        }

        .g_name {
          margin-left: 8.77rpx;
          width: 100.63rpx;
          text-overflow: ellipsis;
          /* 溢出显示省略号 */
          overflow: hidden;
          /* 溢出隐藏 */
          white-space: nowrap;
          /* 强制不换行 */
        }

        .nice_box {
          display: flex;
          align-items: center;

          .isshow {
            color: #fe3530 !important;
          }

          .iconfont {
            font-size: 30rpx;
          }

          .icon-shoucang1 {
            color: #f84221;
          }

          .collect {
            font-size: 24rpx;
            margin-left: 5rpx;
          }
        }
      }
    }
  }
}
</style>