代码更新
This commit is contained in:
parent
0f11c59662
commit
44df92ccf9
@ -4,10 +4,8 @@
|
|||||||
<view class="bg-img">
|
<view class="bg-img">
|
||||||
<img :src="bgColor" alt="">
|
<img :src="bgColor" alt="">
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="height: 40rpx;">
|
|
||||||
|
<view class="site-box flex_a_c_j_sb">
|
||||||
</view>
|
|
||||||
<!-- <view class="site-box flex_a_c_j_sb">
|
|
||||||
<view class="place_wrapper flex_a_c" @click="selectLocation">
|
<view class="place_wrapper flex_a_c" @click="selectLocation">
|
||||||
<view class="iconfont icon-weizhi"></view>
|
<view class="iconfont icon-weizhi"></view>
|
||||||
<view class="town_name">{{street}}</view>
|
<view class="town_name">{{street}}</view>
|
||||||
@ -17,12 +15,13 @@
|
|||||||
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
|
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
||||||
</view> -->
|
</view>
|
||||||
<!-- 搜索栏 -->
|
<!-- 搜索栏 -->
|
||||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||||
<view class="flex_a_c">
|
<view class="flex_a_c">
|
||||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||||
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;" disabled>
|
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
|
||||||
|
disabled>
|
||||||
</view>
|
</view>
|
||||||
<button class="search_btn">搜索</button>
|
<button class="search_btn">搜索</button>
|
||||||
</navigator>
|
</navigator>
|
||||||
@ -33,8 +32,7 @@
|
|||||||
indicator-active-color="#fff">
|
indicator-active-color="#fff">
|
||||||
<block v-for="(item,index) in swiper['url']" :key="index">
|
<block v-for="(item,index) in swiper['url']" :key="index">
|
||||||
<swiper-item class="swi_item" @click="swiperClick(item)">
|
<swiper-item class="swi_item" @click="swiperClick(item)">
|
||||||
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx"
|
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx" mode="aspectFill">
|
||||||
mode="aspectFill">
|
|
||||||
</u--image>
|
</u--image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
@ -116,7 +114,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.appLocation()
|
this.appLocation()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
swiperClick(item) {
|
swiperClick(item) {
|
||||||
const url = item.info[1].value
|
const url = item.info[1].value
|
||||||
@ -206,9 +204,11 @@
|
|||||||
} = e.detail;
|
} = e.detail;
|
||||||
if (source === 'autoplay' || source === 'touch') {
|
if (source === 'autoplay' || source === 'touch') {
|
||||||
this.bgColor = this.swiper.url[e.detail.current]['img']
|
this.bgColor = this.swiper.url[e.detail.current]['img']
|
||||||
this.$emit('kkchange',this.bgColor)
|
this.$emit('kkchange', this.bgColor)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 对象转数组
|
// 对象转数组
|
||||||
objToArr(data) {
|
objToArr(data) {
|
||||||
let obj = Object.keys(data).sort();
|
let obj = Object.keys(data).sort();
|
||||||
@ -251,7 +251,7 @@
|
|||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
width: 102%;
|
width: 102%;
|
||||||
height: 133px;
|
height: 133px;
|
||||||
border-radius: 30px 30px 0 0;
|
border-radius: 30px 30px 0 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="gather">
|
<view class="gather">
|
||||||
<view class="site-box flex_a_c_j_sb">
|
<view class="site-box flex_a_c_j_sb">
|
||||||
<view class="place_wrapper flex_a_c" >
|
<view class="place_wrapper flex_a_c" @click="selectLocation">
|
||||||
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;"></view>
|
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;"></view>
|
||||||
<view class="town_name">{{street}}</view>
|
<view class="town_name">{{street}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -253,6 +253,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</m-tabbar> -->
|
</m-tabbar> -->
|
||||||
|
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||||
|
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||||
<view class="" v-if='jurisdiction==false&&isShow==false'>
|
<view class="" v-if='jurisdiction==false&&isShow==false'>
|
||||||
<emptyPage title="暂无信息"></emptyPage>
|
<emptyPage title="暂无信息"></emptyPage>
|
||||||
</view>
|
</view>
|
||||||
@ -261,9 +263,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Cache from '@/utils/cache';
|
||||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||||
import emptyPage from '@/components/emptyPage.vue';
|
import emptyPage from '@/components/emptyPage.vue';
|
||||||
import zbpSwiper from '@/components/zbpSwiper'
|
import zbpSwiper from '@/components/zbpSwiper'
|
||||||
|
import {
|
||||||
|
getArea,
|
||||||
|
getStreet
|
||||||
|
} from '@/api/article.js';
|
||||||
import {
|
import {
|
||||||
mapState,
|
mapState,
|
||||||
mapGetters
|
mapGetters
|
||||||
@ -287,7 +294,7 @@
|
|||||||
import {
|
import {
|
||||||
getDiy
|
getDiy
|
||||||
} from '@/api/api.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mTabbar,
|
mTabbar,
|
||||||
@ -309,14 +316,18 @@
|
|||||||
isShow: false,
|
isShow: false,
|
||||||
bgColor: '',
|
bgColor: '',
|
||||||
isFshow: false,
|
isFshow: false,
|
||||||
street:''
|
street: '',
|
||||||
|
showPicker: false,
|
||||||
|
columnData: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo', 'location', 'isLogin'])
|
...mapGetters(['userInfo', 'location', 'isLogin'])
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
onLoad() {},
|
onLoad() {
|
||||||
|
this.Area()
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.emptyText = '暂无可用应用'
|
this.emptyText = '暂无可用应用'
|
||||||
@ -328,6 +339,20 @@
|
|||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
this.appLocation()
|
this.appLocation()
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
street: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
this.street = newVal
|
||||||
|
let arr = Cache.get('ADRESS_LOCATION')
|
||||||
|
console.log(arr,'2')
|
||||||
|
if (arr.length > 0) {
|
||||||
|
this.street=arr.split(',')[0]
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
@ -335,10 +360,10 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.appLocation()
|
this.appLocation()
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// 监听页面滚动事件
|
// 监听页面滚动事件
|
||||||
window.addEventListener("scroll", this.scrolling);
|
window.addEventListener("scroll", this.scrolling);
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@ -355,7 +380,50 @@
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
appLocation() {
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
selectLocation() {
|
||||||
|
this.showPicker = true
|
||||||
|
},
|
||||||
|
confirm(e) {
|
||||||
|
this.street = e.value[1].name
|
||||||
|
Cache.set('ADRESS_LOCATION',
|
||||||
|
e.value[1].name + ',' + e.value[1].name + ',' +
|
||||||
|
|
||||||
|
e.value[1].code
|
||||||
|
)
|
||||||
|
this.showPicker = false
|
||||||
|
},
|
||||||
|
appLocation() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
timeout: '10',
|
timeout: '10',
|
||||||
@ -388,7 +456,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
scrolling() {
|
scrolling() {
|
||||||
// 滚动条距文档顶部的距离
|
// 滚动条距文档顶部的距离
|
||||||
let scrollTop =
|
let scrollTop =
|
||||||
@ -491,7 +559,12 @@
|
|||||||
|
|
||||||
.site-box {
|
.site-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120rpx;
|
/* #ifdef MP || APP-PLUS */
|
||||||
|
height: 170rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
height: 120rpx;
|
||||||
|
/* #endif */
|
||||||
margin-bottom: 26.32rpx;
|
margin-bottom: 26.32rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0rpx;
|
top: 0rpx;
|
||||||
|
@ -1,364 +1,376 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="Circle_friends">
|
<view class="Circle_friends">
|
||||||
<view class="circle_friends_wrapper">
|
<view class="circle_friends_wrapper">
|
||||||
|
|
||||||
<zbpSwiper></zbpSwiper>
|
<zbpSwiper></zbpSwiper>
|
||||||
|
|
||||||
<view class="tabs_wrapper">
|
<view class="tabs_wrapper">
|
||||||
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
|
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="goods">
|
<view class="goods">
|
||||||
<block v-for="(item,index) in cateGoods" :key="index">
|
<block v-for="(item,index) in cateGoods" :key="index">
|
||||||
<view class="goods_item" @click="gogogo(item)">
|
<view class="goods_item" @click="gogogo(item)">
|
||||||
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
|
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
|
||||||
<view class="botm">
|
<view class="botm">
|
||||||
<view class="title">{{item.title}}</view>
|
<view class="title">{{item.title}}</view>
|
||||||
<view class="goods_info flex_a_c">
|
<view class="goods_info flex_a_c">
|
||||||
<view class="l_info flex_a_c">
|
<view class="l_info flex_a_c">
|
||||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill"
|
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
||||||
class="g_img"></image>
|
mode="aspectFill" class="g_img"></image>
|
||||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="nice_box" @click.stop="giveStart(item)">
|
<view class="nice_box" @click.stop="giveStart(item)">
|
||||||
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
<text class="iconfont"
|
||||||
<text class="collect">{{item.count_start}}</text>
|
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||||
</view>
|
<text class="collect">{{item.count_start}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</view>
|
||||||
</view>
|
</block>
|
||||||
<view class="empty_wrapper" v-if="emptyShow">
|
</view>
|
||||||
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
<view class="empty_wrapper" v-if="emptyShow">
|
||||||
</view>
|
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||||
|
|
||||||
<!-- <view class="bg_color"></view> -->
|
<!-- <view class="bg_color"></view> -->
|
||||||
|
|
||||||
<!-- <m-tabbar native>
|
<!-- <m-tabbar native>
|
||||||
<template v-slot:tabbar_index_2>
|
<template v-slot:tabbar_index_2>
|
||||||
<view class="custom_style">
|
<view class="custom_style">
|
||||||
<view class="custom_style_icon"></view>
|
<view class="custom_style_icon"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</m-tabbar> -->
|
</m-tabbar> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||||
import zbpSwiper from '@/components/zbpSwiper'
|
import zbpSwiper from '@/components/zbpSwiper'
|
||||||
import { getSlideAPI } from '@/api/lihai.js'
|
import {
|
||||||
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js'
|
getSlideAPI
|
||||||
import { getIndexData, getDiy } from '@/api/api.js'
|
} from '@/api/lihai.js'
|
||||||
import { getGeocoder, merClassifly } from '@/api/store.js';
|
import {
|
||||||
import { getArea, getStreet } from '@/api/article.js';
|
graphicLstApi,
|
||||||
import { Toast } from '@/libs/uniApi'
|
getTopicList,
|
||||||
export default {
|
graphicStartApi
|
||||||
components: {
|
} from '@/api/community.js'
|
||||||
mTabbar,
|
import {
|
||||||
zbpSwiper
|
getIndexData,
|
||||||
},
|
getDiy
|
||||||
data() {
|
} from '@/api/api.js'
|
||||||
return {
|
import {
|
||||||
bgColor: '',
|
getGeocoder,
|
||||||
showPicker: false,
|
merClassifly
|
||||||
columnData: [],
|
} from '@/api/store.js';
|
||||||
show: false,
|
import {
|
||||||
swiper: {
|
getArea,
|
||||||
url: [{
|
getStreet
|
||||||
img: ''
|
} from '@/api/article.js';
|
||||||
}],
|
import {
|
||||||
indicatorDots: true, // 显示面板指示点
|
Toast
|
||||||
vertical: false, // 滑动方向是否为纵向
|
} from '@/libs/uniApi'
|
||||||
autoplay: true, // 是否自动切换
|
export default {
|
||||||
interval: 2000, // 自动切换时间间隔
|
components: {
|
||||||
duration: 500 // 滑动动画时长
|
mTabbar,
|
||||||
},
|
zbpSwiper
|
||||||
tabsData: {
|
},
|
||||||
list: [],
|
data() {
|
||||||
tabsActive: 0
|
return {
|
||||||
},
|
bgColor: '',
|
||||||
where: {
|
showPicker: false,
|
||||||
category_id: 0,
|
columnData: [],
|
||||||
page: 1,
|
show: false,
|
||||||
limit: 30
|
swiper: {
|
||||||
},
|
url: [{
|
||||||
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
img: ''
|
||||||
keyword: '',
|
}],
|
||||||
location: '',
|
indicatorDots: true, // 显示面板指示点
|
||||||
emptyShow: false,
|
vertical: false, // 滑动方向是否为纵向
|
||||||
street: '',
|
autoplay: true, // 是否自动切换
|
||||||
cateGoods: []
|
interval: 2000, // 自动切换时间间隔
|
||||||
}
|
duration: 500 // 滑动动画时长
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
tabsData: {
|
||||||
this.getCateList()
|
list: [],
|
||||||
this.getGoods()
|
tabsActive: 0
|
||||||
this.selfLocation()
|
},
|
||||||
this.Area()
|
where: {
|
||||||
uni.stopPullDownRefresh()
|
category_id: 0,
|
||||||
},
|
page: 1,
|
||||||
onLoad() {
|
limit: 30
|
||||||
this.getCateList()
|
},
|
||||||
this.getGoods()
|
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
||||||
this.selfLocation()
|
keyword: '',
|
||||||
this.Area()
|
location: '',
|
||||||
},
|
emptyShow: false,
|
||||||
onShow() {},
|
street: '',
|
||||||
methods: {
|
cateGoods: []
|
||||||
confirm(e) {
|
}
|
||||||
this.where.street_id = e.value[1].code
|
},
|
||||||
this.showPicker = false
|
onPullDownRefresh() {
|
||||||
},
|
this.getCateList()
|
||||||
changeHandler(e) {
|
this.getGoods()
|
||||||
const {
|
this.selfLocation()
|
||||||
columnIndex,
|
this.Area()
|
||||||
value,
|
uni.stopPullDownRefresh()
|
||||||
values,
|
},
|
||||||
index,
|
onLoad() {
|
||||||
picker = this.$refs.uPicker
|
this.getCateList()
|
||||||
} = e;
|
this.getGoods()
|
||||||
if (columnIndex === 0) {
|
this.selfLocation()
|
||||||
getStreet({
|
this.Area()
|
||||||
area_code: value[0]['code']
|
},
|
||||||
}).then(res => {
|
onShow() {},
|
||||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
methods: {
|
||||||
});
|
confirm(e) {
|
||||||
}
|
this.where.street_id = e.value[1].code
|
||||||
},
|
this.showPicker = false
|
||||||
Area() {
|
},
|
||||||
getArea({
|
changeHandler(e) {
|
||||||
city_code: 510500
|
const {
|
||||||
}).then(res => {
|
columnIndex,
|
||||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
value,
|
||||||
this.Street(res.data[0]['code']);
|
values,
|
||||||
});
|
index,
|
||||||
},
|
picker = this.$refs.uPicker
|
||||||
Street(code) {
|
} = e;
|
||||||
getStreet({
|
if (columnIndex === 0) {
|
||||||
area_code: code
|
getStreet({
|
||||||
}).then(res => {
|
area_code: value[0]['code']
|
||||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
}).then(res => {
|
||||||
});
|
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||||
},
|
});
|
||||||
gogogo(item) {
|
}
|
||||||
if (this.tabsData.tabsActive == 1) {
|
},
|
||||||
uni.navigateTo({
|
Area() {
|
||||||
//#ifdef APP
|
getArea({
|
||||||
url: '/pages/short_video/appSwiper/index?id=' + item.community_id
|
city_code: 510500
|
||||||
//#endif
|
}).then(res => {
|
||||||
//#ifndef APP
|
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||||
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
|
this.Street(res.data[0]['code']);
|
||||||
//#endif
|
});
|
||||||
})
|
},
|
||||||
} else {
|
Street(code) {
|
||||||
uni.navigateTo({
|
getStreet({
|
||||||
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
|
area_code: code
|
||||||
})
|
}).then(res => {
|
||||||
}
|
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||||
},
|
});
|
||||||
giveStart(item) {
|
},
|
||||||
let status = item.relevance_id ? 0 : 1
|
gogogo(item) {
|
||||||
graphicStartApi(item.community_id, {
|
if (this.tabsData.tabsActive == 1) {
|
||||||
status: status
|
uni.navigateTo({
|
||||||
}).then(res => {
|
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
||||||
Toast(res.message)
|
})
|
||||||
this.getGoods()
|
|
||||||
})
|
} else {
|
||||||
},
|
uni.navigateTo({
|
||||||
dianji() {
|
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
|
||||||
this.show = !this.show
|
})
|
||||||
},
|
}
|
||||||
// 获取发现商品
|
},
|
||||||
getGoods: function() {
|
giveStart(item) {
|
||||||
// 数据写死:默认社区数据 category_id=69&page=1&limit=30
|
let status = item.relevance_id ? 0 : 1
|
||||||
graphicLstApi(this.where).then(res => {
|
graphicStartApi(item.community_id, {
|
||||||
this.cateGoods = res.data.list
|
status: status
|
||||||
res.data.list.length <= 0 ? this.emptyShow = true : this.emptyShow = false
|
}).then(res => {
|
||||||
})
|
Toast(res.message)
|
||||||
},
|
this.getGoods()
|
||||||
/*获取分类列表*/
|
})
|
||||||
async getCateList() {
|
},
|
||||||
const {
|
dianji() {
|
||||||
data
|
this.show = !this.show
|
||||||
} = await getTopicList()
|
},
|
||||||
this.tabsData.list = [{
|
// 获取发现商品
|
||||||
cate_name: "推荐",
|
getGoods: function() {
|
||||||
category_id: 0
|
// 数据写死:默认社区数据 category_id=69&page=1&limit=30
|
||||||
}, {
|
graphicLstApi(this.where).then(res => {
|
||||||
cate_name: "视频",
|
this.cateGoods = res.data.list
|
||||||
category_id: -1,
|
res.data.list.length <= 0 ? this.emptyShow = true : this.emptyShow = false
|
||||||
children: []
|
})
|
||||||
}, ...data]
|
},
|
||||||
},
|
/*获取分类列表*/
|
||||||
tabsChange(item) {
|
async getCateList() {
|
||||||
this.where.category_id = item.category_id
|
const {
|
||||||
this.getGoods()
|
data
|
||||||
this.street_id = item.id
|
} = await getTopicList()
|
||||||
this.tabsData.tabsActive = item.index
|
this.tabsData.list = [{
|
||||||
if (item.index == 1) {
|
cate_name: "推荐",
|
||||||
uni.navigateTo({
|
category_id: 0
|
||||||
// #ifdef MP || H5
|
}, {
|
||||||
url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0].community_id
|
cate_name: "视频",
|
||||||
// #endif
|
category_id: -1,
|
||||||
// #ifdef APP
|
children: []
|
||||||
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
}, ...data]
|
||||||
// #endif
|
},
|
||||||
})
|
tabsChange(item) {
|
||||||
}
|
this.where.category_id = item.category_id
|
||||||
},
|
this.getGoods()
|
||||||
selfLocation() {
|
this.street_id = item.id
|
||||||
uni.getLocation({
|
this.tabsData.tabsActive = item.index
|
||||||
type: 'gcj02',
|
if (item.index == 1) {
|
||||||
success: (res) => {
|
uni.navigateTo({
|
||||||
let latitude, longitude;
|
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
||||||
latitude = res.latitude.toString();
|
})
|
||||||
longitude = res.longitude.toString();
|
}
|
||||||
getGeocoder({ lat: latitude, long: longitude }).then(res => {
|
},
|
||||||
this.$store.commit('setLocation', res.data)
|
selfLocation() {
|
||||||
this.street = res.data.address_component.street
|
uni.getLocation({
|
||||||
}).catch(err => {
|
type: 'gcj02',
|
||||||
uni.showToast({
|
success: (res) => {
|
||||||
title: err,
|
let latitude, longitude;
|
||||||
icon: 'none'
|
latitude = res.latitude.toString();
|
||||||
})
|
longitude = res.longitude.toString();
|
||||||
})
|
getGeocoder({
|
||||||
},
|
lat: latitude,
|
||||||
fail: (err) => {
|
long: longitude
|
||||||
uni.showToast({
|
}).then(res => {
|
||||||
title: err.errMsg,
|
this.$store.commit('setLocation', res.data)
|
||||||
icon: 'none',
|
this.street = res.data.address_component.street
|
||||||
duration: 1000
|
}).catch(err => {
|
||||||
});
|
uni.showToast({
|
||||||
}
|
title: err,
|
||||||
});
|
icon: 'none'
|
||||||
},
|
})
|
||||||
}
|
})
|
||||||
}
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.errMsg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.Circle_friends {
|
.Circle_friends {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 0 87.72rpx 0;
|
padding: 0 0 87.72rpx 0;
|
||||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.circle_friends_wrapper {
|
.circle_friends_wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.search_wrapper {
|
.search_wrapper {
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs_wrapper {
|
.tabs_wrapper {
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-bottom: 21.05rpx;
|
margin-bottom: 21.05rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty_wrapper {
|
.empty_wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods {
|
.goods {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.goods_item {
|
.goods_item {
|
||||||
width: 342.11rpx;
|
width: 342.11rpx;
|
||||||
height: 491.23rpx;
|
height: 491.23rpx;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 10.53rpx;
|
margin-bottom: 10.53rpx;
|
||||||
|
|
||||||
.goods_img {
|
.goods_img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 294.74rpx;
|
height: 294.74rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.botm {
|
.botm {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0 14.04rpx;
|
padding: 0 14.04rpx;
|
||||||
padding-bottom: 21.05rpx;
|
padding-bottom: 21.05rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 12px 0;
|
margin: 12px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods_info {
|
.goods_info {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.g_img {
|
.g_img {
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g_name {
|
.g_name {
|
||||||
margin-left: 8.77rpx;
|
margin-left: 8.77rpx;
|
||||||
width: 100.63rpx;
|
width: 100.63rpx;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
/* 溢出显示省略号 */
|
/* 溢出显示省略号 */
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* 溢出隐藏 */
|
/* 溢出隐藏 */
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
/* 强制不换行 */
|
/* 强制不换行 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.nice_box {
|
.nice_box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.isshow {
|
.isshow {
|
||||||
color: #FE3530 !important;
|
color: #FE3530 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-shoucang1 {
|
.icon-shoucang1 {
|
||||||
color: #F84221;
|
color: #F84221;
|
||||||
}
|
}
|
||||||
|
|
||||||
.collect {
|
.collect {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
margin-left: 5rpx;
|
margin-left: 5rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -2,18 +2,26 @@
|
|||||||
<view class="Circle_friends">
|
<view class="Circle_friends">
|
||||||
<view class="circle_friends_wrapper">
|
<view class="circle_friends_wrapper">
|
||||||
|
|
||||||
<view class="site-box flex_a_c_j_sb">
|
|
||||||
<view class="place_wrapper flex_a_c" >
|
<view class="">
|
||||||
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;"></view>
|
<view :class="['site-box ','flex_a_c_j_sb',isFshow?'sitbox':'']">
|
||||||
<view class="town_name">{{street}}</view>
|
<view :class="['place_wrapper','flex_a_c',isFshow?'sitbox':'']" @click="selectLocation">
|
||||||
|
<view :class="['iconfont','icon-weizhi',isFshow?'sitbox':'']" style="margin-left: 20rpx;">
|
||||||
|
</view>
|
||||||
|
<view class="town_name">{{street}}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||||
|
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitbox':'']" style="color:#fff;"></view>
|
||||||
|
</navigator>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view :class="['site-box ','flex_a_c_j_sb',isFshow?'sistbox':'']" v-if="isFshow">
|
||||||
|
<view class="bg-img">
|
||||||
|
<img :src="bgColor" alt="">
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
|
||||||
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
|
|
||||||
</navigator>
|
|
||||||
<view class="bg-img" v-if="isFshow">
|
|
||||||
<img :src="bgColor" alt="">
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
@ -23,14 +31,50 @@
|
|||||||
|
|
||||||
<view class="tabs_wrapper">
|
<view class="tabs_wrapper">
|
||||||
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"
|
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"
|
||||||
:activeStyle="activeStyle" itemStyle="padding-left: 0px; height: 33px;"></u-tabs>
|
:activeStyle="activeStyle" itemStyle="padding-left: 0px; height: 33px;"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goodslist">
|
<view class="goodslist">
|
||||||
|
|
||||||
|
|
||||||
<view class="goods">
|
<view class="goods">
|
||||||
<view v-for="(item,index) in cateGoods" :key="index" v-if='index%2!=0'>
|
<view v-for="(item,index) in cateGoods" :key="index">
|
||||||
|
|
||||||
|
<view :class="[index%2==0?'goods_item':'goods_items']" @click="gogogo(item)">
|
||||||
|
<view class="kk" v-if="index%2==0">
|
||||||
|
|
||||||
|
<image :src="item.image[0]" mode="aspectFill" style="width:'365rpx';height:251rpx">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view style="width:'365rpx';height:336rpx" v-else>
|
||||||
|
<image :src="item.image[0]" mode="aspectFill" style="width:'365rpx';height:336rpx">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="goods_item_img" v-if="item.video_link.length>0">
|
||||||
|
<image src="@/static/images/sp.png" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view class="botm">
|
||||||
|
<view class="title">{{item.title}}</view>
|
||||||
|
<view class="goods_info flex_a_c">
|
||||||
|
<view class="l_info flex_a_c">
|
||||||
|
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
||||||
|
mode="aspectFill" class="g_img"></image>
|
||||||
|
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="nice_box" @click.stop="giveStart(item)">
|
||||||
|
<text class="iconfont"
|
||||||
|
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||||
|
<text class="collect">{{item.count_start}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!--<view class="goods">
|
||||||
|
<view v-for="(item,i) in cateGoods" :key="i" v-if='i%2!=0'>
|
||||||
<view class="goods_item" @click="gogogo(item)">
|
<view class="goods_item" @click="gogogo(item)">
|
||||||
<view style="height: 251rpx;">
|
<view style="height: 251rpx;">
|
||||||
<u--image :src="item.image[0]" width="356rpx" height="251rpx" :showLoading="true"
|
<u--image :src="item.image[0]" width="356rpx" height="251rpx" :showLoading="true"
|
||||||
@ -62,40 +106,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods">
|
-->
|
||||||
<view v-for="(item,index) in cateGoods" :key="index" v-if='index%2==0'>
|
|
||||||
<view class="goods_items" @click="gogogo(item)">
|
|
||||||
|
|
||||||
<view style="height: 336rpx;">
|
|
||||||
<u--image :src="item.image[0]" width="356rpx" height="336rpx" :showLoading="true"
|
|
||||||
lazyLoad fade duration="450">
|
|
||||||
<template v-slot:loading>
|
|
||||||
<u-loading-icon color="#f5f5f5"></u-loading-icon>
|
|
||||||
</template>
|
|
||||||
</u--image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="goods_item_img" v-if="item.video_link.length>0">
|
|
||||||
<image src="@/static/images/sp.png" mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
<view class="botm">
|
|
||||||
<view class="title">{{item.title}}</view>
|
|
||||||
<view class="goods_info flex_a_c">
|
|
||||||
<view class="l_info flex_a_c">
|
|
||||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
|
||||||
mode="aspectFill" class="g_img"></image>
|
|
||||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="nice_box" @click.stop="giveStart(item)">
|
|
||||||
<text class="iconfont"
|
|
||||||
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
|
||||||
<text class="collect">{{item.count_start}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -132,7 +143,7 @@
|
|||||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||||
import zbpSwiper from '@/components/zbpSwiper'
|
import zbpSwiper from '@/components/zbpSwiper'
|
||||||
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
|
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
|
||||||
|
import Cache from '@/utils/cache';
|
||||||
import {
|
import {
|
||||||
getSlideAPI
|
getSlideAPI
|
||||||
} from '@/api/lihai.js'
|
} from '@/api/lihai.js'
|
||||||
@ -190,7 +201,7 @@
|
|||||||
where: {
|
where: {
|
||||||
category_id: 0,
|
category_id: 0,
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 15
|
limit: 6
|
||||||
},
|
},
|
||||||
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
||||||
keyword: '',
|
keyword: '',
|
||||||
@ -206,14 +217,29 @@
|
|||||||
isFshow: false,
|
isFshow: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
street: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
this.street = newVal
|
||||||
|
let arr = Cache.get('ADRESS_LOCATION')
|
||||||
|
console.log(arr, '1')
|
||||||
|
if (arr.length > 0) {
|
||||||
|
this.street = arr.split(',')[0]
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.getCateList()
|
this.getCateList()
|
||||||
this.cateGoods = []
|
this.cateGoods = []
|
||||||
this.getGoods()
|
this.getGoods()
|
||||||
this.selfLocation()
|
|
||||||
this.Area()
|
this.Area()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
this.getCateList()
|
this.getCateList()
|
||||||
@ -236,36 +262,37 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {},
|
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.status == 'nomore') return;
|
if (this.status == 'nomore') return;
|
||||||
this.status = 'loading';
|
this.status = 'loading';
|
||||||
|
this.where.limit = 2
|
||||||
this.where.page = ++this.where.page;
|
this.where.page = ++this.where.page;
|
||||||
this.getGoods()
|
this.getGoods()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
|
||||||
// #endif
|
|
||||||
// 监听页面滚动事件
|
// 监听页面滚动事件
|
||||||
window.addEventListener("scroll", this.scrolling);
|
window.addEventListener("scroll", this.scrolling);
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
// this.scrollTop = e.scrollTop;
|
// this.scrollTop = e.scrollTop;
|
||||||
console.log(e.scrollTop)
|
console.log(e.scrollTop)
|
||||||
if(e.scrollTop>0){
|
if (e.scrollTop > 0) {
|
||||||
this.isFshow=true
|
this.isFshow = true
|
||||||
}else{
|
} else {
|
||||||
this.isFshow=false
|
this.isFshow = false
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
scrolling() {
|
scrolling() {
|
||||||
// 滚动条距文档顶部的距离
|
// 滚动条距文档顶部的距离
|
||||||
let scrollTop =
|
let scrollTop =
|
||||||
@ -357,8 +384,16 @@
|
|||||||
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
|
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
selectLocation() {
|
||||||
|
this.showPicker = true
|
||||||
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
this.where.street_id = e.value[1].code
|
this.street = e.value[1].name
|
||||||
|
Cache.set('ADRESS_LOCATION',
|
||||||
|
e.value[1].name + ',' + e.value[1].name + ',' +
|
||||||
|
|
||||||
|
e.value[1].code
|
||||||
|
)
|
||||||
this.showPicker = false
|
this.showPicker = false
|
||||||
},
|
},
|
||||||
changeHandler(e) {
|
changeHandler(e) {
|
||||||
@ -458,10 +493,6 @@
|
|||||||
this.tabsData.list = [{
|
this.tabsData.list = [{
|
||||||
cate_name: "推荐",
|
cate_name: "推荐",
|
||||||
category_id: 0
|
category_id: 0
|
||||||
}, {
|
|
||||||
cate_name: "视频",
|
|
||||||
category_id: -1,
|
|
||||||
children: []
|
|
||||||
}, ...data]
|
}, ...data]
|
||||||
},
|
},
|
||||||
tabsChange(item) {
|
tabsChange(item) {
|
||||||
@ -643,10 +674,30 @@
|
|||||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.sistbox {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadenum {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.bg-img {
|
.bg-img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
top: 0;
|
top: 0;
|
||||||
/* #ifdef MP || APP-PLUS */
|
/* #ifdef MP || APP-PLUS */
|
||||||
z-index: -100;
|
z-index: -100;
|
||||||
@ -657,7 +708,7 @@
|
|||||||
z-index: -100;
|
z-index: -100;
|
||||||
filter: blur(0);
|
filter: blur(0);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
transition: fadenum 3s linear;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -667,15 +718,36 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sitbox {
|
||||||
|
opacity: 1 !important;
|
||||||
|
background: #ac3525 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.site-box {
|
.site-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120rpx;
|
/* #ifdef MP || APP-PLUS */
|
||||||
|
height: 160rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
height: 120rpx;
|
||||||
|
/* #endif */
|
||||||
margin-bottom: 26.32rpx;
|
margin-bottom: 26.32rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0rpx;
|
top: 0rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
padding-top: 30rpx;
|
/* #ifdef MP || APP-PLUS */
|
||||||
|
padding-top: 75rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
padding-top: 25rpx;
|
||||||
|
/* #endif */
|
||||||
|
// background-color: #e5e5e5;
|
||||||
|
// opacity: 0;
|
||||||
|
/* 初始时设置元素不透明 */
|
||||||
|
transition: opacity 0.2s ease-in;
|
||||||
|
transition-delay: 1.5s;
|
||||||
|
transition: background 0.2s ease-in;
|
||||||
padding-right: 20rpx;
|
padding-right: 20rpx;
|
||||||
|
|
||||||
// 位置
|
// 位置
|
||||||
@ -683,6 +755,9 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
margin-right: 24.56rpx;
|
margin-right: 24.56rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 1s ease-in;
|
||||||
|
transition-delay: 1.5s;
|
||||||
|
|
||||||
.town_name {
|
.town_name {
|
||||||
margin-left: 21rpx;
|
margin-left: 21rpx;
|
||||||
@ -690,6 +765,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
|
font-size: 30rpx;
|
||||||
|
|
||||||
|
|
||||||
font-size: 35.09rpx;
|
font-size: 35.09rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -804,7 +882,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goodslist {
|
.goodslist {
|
||||||
display: flex;
|
// display: flex;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 725rpx;
|
width: 725rpx;
|
||||||
}
|
}
|
||||||
@ -813,9 +891,13 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 725rpx;
|
width: 725rpx;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.goods_item {
|
.goods_item {
|
||||||
width: 356rpx;
|
width: 356rpx;
|
||||||
height: 450rpx;
|
border: 1px solid;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@ -823,6 +905,12 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 10.53rpx;
|
margin-bottom: 10.53rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
margin-top: -40rpx;
|
||||||
|
|
||||||
|
.kk {
|
||||||
|
width: 365rpx;
|
||||||
|
height: 251rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.goods_item_img {
|
.goods_item_img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -919,7 +1007,7 @@
|
|||||||
|
|
||||||
.goods_items {
|
.goods_items {
|
||||||
width: 356rpx;
|
width: 356rpx;
|
||||||
height: 536rpx;
|
|
||||||
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
】
|
】
|
||||||
-->
|
-->
|
||||||
<!-- 头部导航 -->
|
<!-- 头部导航 -->
|
||||||
<view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#fff'}" >
|
<!-- <view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#000'}" >
|
||||||
<!-- <view class="items" @click.stop="navTap(2)">
|
<view class="items" @click.stop="navTap(2)">
|
||||||
<text class="tName" :class="currentNav==2?'on':''">关注</text>
|
<text class="tName" :class="currentNav==2?'on':''">关注</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="items" @click.stop="navTap(1)">
|
<view class="items" @click.stop="navTap(1)">
|
||||||
@ -29,14 +29,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="items" @click.stop="navTap(3)">
|
<view class="items" @click.stop="navTap(3)">
|
||||||
<text class="tName" :class="currentNav==3?'on':''">列表</text>
|
<text class="tName" :class="currentNav==3?'on':''">列表</text>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="noVideo acea-row row-center-wrapper" v-if="!dataList.length && !loadVideo">
|
<!-- <view class="noVideo acea-row row-center-wrapper" v-if="!dataList.length && !loadVideo">
|
||||||
<view>
|
<view>
|
||||||
<image :src="imgHost+'/static/no-video.png'" class="pictrue"></image>
|
<image :src="imgHost+'/static/no-video.png'" class="pictrue"></image>
|
||||||
<text class="tips">暂无短视频内容哦~</text>
|
<text class="tips">暂无短视频内容哦~</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view v-if="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
|
<view v-if="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
|
||||||
<!--
|
<!--
|
||||||
1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view
|
1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view
|
||||||
@ -49,7 +49,7 @@
|
|||||||
-->
|
-->
|
||||||
<list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false" ref="listBox"
|
<list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false" ref="listBox"
|
||||||
:pagingEnabled="true" :scrollable="true">
|
:pagingEnabled="true" :scrollable="true">
|
||||||
<!-- 刷新模块 -->
|
|
||||||
<refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
|
<refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
|
||||||
:display="refreshing ? 'show' : 'hide'">
|
:display="refreshing ? 'show' : 'hide'">
|
||||||
<loading style="background-color: #FFFFFF;">
|
<loading style="background-color: #FFFFFF;">
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<!-- 用div把视频模组套起来 -->
|
<!-- 用div把视频模组套起来 -->
|
||||||
<div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
|
<div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
|
||||||
<!-- <view v-if="Math.abs(k-i)<=1"> -->
|
<!-- <view v-if="Math.abs(k-i)<=1"> -->
|
||||||
<view v-if="max > i">
|
<view v-if="Math.abs(k-i)<=1">
|
||||||
<view class="root">
|
<view class="root">
|
||||||
<!--
|
<!--
|
||||||
具体视频参数可以参考官方文档
|
具体视频参数可以参考官方文档
|
||||||
@ -300,6 +300,7 @@
|
|||||||
<view class="fixed-head">
|
<view class="fixed-head">
|
||||||
<view class="sys-head" :style="{height:statusBarHeight}"></view>
|
<view class="sys-head" :style="{height:statusBarHeight}"></view>
|
||||||
<view class="tool-bar" @click='goBack()'>
|
<view class="tool-bar" @click='goBack()'>
|
||||||
|
|
||||||
<image class="icon-xiangzuo" src="../static/img/index/icon-back.png"></image>
|
<image class="icon-xiangzuo" src="../static/img/index/icon-back.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -368,7 +369,7 @@
|
|||||||
newTime: 0, //跟手滑动后的最新时间💗
|
newTime: 0, //跟手滑动后的最新时间💗
|
||||||
timeNumber: 0, //🌟💗
|
timeNumber: 0, //🌟💗
|
||||||
ProgressBarBottom: 20, //进度条离底部的距离💗
|
ProgressBarBottom: 20, //进度条离底部的距离💗
|
||||||
object_fit: 'contain', //视频样式默认包含🌟💗
|
object_fit: 'cover', //视频样式默认包含🌟💗
|
||||||
mode: 'aspectFit', //图片封面样式🌟💗
|
mode: 'aspectFit', //图片封面样式🌟💗
|
||||||
timeout: "", //🌟用来阻止 setTimeout()方法
|
timeout: "", //🌟用来阻止 setTimeout()方法
|
||||||
voice: "", //🌟用来阻止 setTimeout()方法
|
voice: "", //🌟用来阻止 setTimeout()方法
|
||||||
@ -1633,6 +1634,7 @@
|
|||||||
|
|
||||||
.root {
|
.root {
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -1198,7 +1198,7 @@
|
|||||||
this.isTriggered = true;
|
this.isTriggered = true;
|
||||||
const newList = this.goods.reverse();
|
const newList = this.goods.reverse();
|
||||||
this.goods = newList;
|
this.goods = newList;
|
||||||
this.getProductSpu()
|
// this.getProductSpu()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.isTriggered = false;
|
this.isTriggered = false;
|
||||||
}, 500)
|
}, 500)
|
||||||
@ -1210,7 +1210,7 @@
|
|||||||
// 模拟触底刷新
|
// 模拟触底刷新
|
||||||
if (this.tabActive == 0) {
|
if (this.tabActive == 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.goods.push(...this.goods);
|
// this.goods.push(...this.goods);
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1220,7 +1220,8 @@
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const newList = this.goods.reverse();
|
const newList = this.goods.reverse();
|
||||||
this.goods = newList;
|
this.goods = newList;
|
||||||
this.getProductSpu()
|
// this.getGoods()
|
||||||
|
// this.getProductSpu()
|
||||||
// uni.startPullDownRefresh();
|
// uni.startPullDownRefresh();
|
||||||
// uni.stopPullDownRefresh();
|
// uni.stopPullDownRefresh();
|
||||||
}, 500)
|
}, 500)
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker> columnData: [],
|
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||||
<!-- <view class="bg_color"></view> -->
|
<!-- <view class="bg_color"></view> -->
|
||||||
|
|
||||||
<!-- <m-tabbar native>
|
<!-- <m-tabbar native>
|
||||||
@ -98,6 +98,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Cache from '@/utils/cache';
|
||||||
import zbpSwiper from '@/components/zbpSwiper'
|
import zbpSwiper from '@/components/zbpSwiper'
|
||||||
import {
|
import {
|
||||||
getArea,
|
getArea,
|
||||||
@ -180,6 +181,21 @@
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
street: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
this.street = newVal
|
||||||
|
let arr = Cache.get('ADRESS_LOCATION')
|
||||||
|
console.log(arr,'3')
|
||||||
|
if (arr.length > 0) {
|
||||||
|
this.street=arr.split(',')[0]
|
||||||
|
this.town = arr.split(',')[1]
|
||||||
|
this.street_id =arr.split(',')[2]
|
||||||
|
this.getCloudShopMerId(this.street_id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
@ -196,11 +212,16 @@
|
|||||||
methods: {
|
methods: {
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
this.street = e.value[1].name
|
this.street = e.value[1].name
|
||||||
this.town= e.value[1].name
|
this.town = e.value[1].name
|
||||||
this.showPicker = false
|
this.showPicker = false
|
||||||
this.street_id = e.value[1].id
|
this.street_id = e.value[1].code
|
||||||
this.getCloudShopMerId(e.value[1].id)
|
this.getCloudShopMerId(e.value[1].code)
|
||||||
|
|
||||||
|
Cache.set('ADRESS_LOCATION',
|
||||||
|
this.street + ','+ this.town+','+
|
||||||
|
|
||||||
|
this.street_id
|
||||||
|
)
|
||||||
},
|
},
|
||||||
changeHandler(e) {
|
changeHandler(e) {
|
||||||
const {
|
const {
|
||||||
@ -304,9 +325,15 @@
|
|||||||
lat: latitude,
|
lat: latitude,
|
||||||
long: longitude
|
long: longitude
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.street = res.data.address_component.street
|
this.street = res.data.address_component.street
|
||||||
this.town = res.data.address_reference.town.title
|
this.town = res.data.address_reference.town.title
|
||||||
this.street_id = res.data.address_reference.town.id
|
this.street_id = res.data.address_reference.town.id
|
||||||
|
|
||||||
|
Cache.set('ADRESS_LOCATION',
|
||||||
|
this.street + ','+ this.town+','+
|
||||||
|
this.street_id
|
||||||
|
)
|
||||||
|
|
||||||
this.getCloudShopMerId(this.street_id)
|
this.getCloudShopMerId(this.street_id)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -325,12 +352,12 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
selectPlce(e) {
|
selectPlce(e) {
|
||||||
this.street_id = e.value[1].code
|
this.street_id = e.value[1].code
|
||||||
this.town = e.value[1].name
|
this.town = e.value[1].name
|
||||||
this.getCloudShopMerId(e.value[1].code)
|
this.getCloudShopMerId(e.value[1].code)
|
||||||
|
|
||||||
},
|
},
|
||||||
getCloudShopMerId(id) {
|
getCloudShopMerId(id) {
|
||||||
get_cloud_shop(id).then(res => {
|
get_cloud_shop(id).then(res => {
|
||||||
@ -432,7 +459,12 @@
|
|||||||
|
|
||||||
.site-box {
|
.site-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120rpx;
|
/* #ifdef MP || APP-PLUS */
|
||||||
|
height: 170rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
height: 120rpx;
|
||||||
|
/* #endif */
|
||||||
margin-bottom: 26.32rpx;
|
margin-bottom: 26.32rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0rpx;
|
top: 0rpx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user