代码更新

This commit is contained in:
jia 2023-09-01 16:15:43 +08:00
parent 0f11c59662
commit 44df92ccf9
7 changed files with 644 additions and 436 deletions

View File

@ -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> <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" @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>
@ -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();

View File

@ -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
@ -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,7 +360,7 @@
mounted() { mounted() {
this.appLocation() this.appLocation()
// #ifdef H5 // #ifdef H5
// //
window.addEventListener("scroll", this.scrolling); window.addEventListener("scroll", this.scrolling);
// #endif // #endif
@ -355,6 +380,49 @@
// #endif // #endif
methods: { methods: {
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() { appLocation() {
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
@ -491,7 +559,12 @@
.site-box { .site-box {
width: 100%; width: 100%;
/* #ifdef MP || APP-PLUS */
height: 170rpx;
/* #endif */
/* #ifdef H5 */
height: 120rpx; height: 120rpx;
/* #endif */
margin-bottom: 26.32rpx; margin-bottom: 26.32rpx;
position: absolute; position: absolute;
top: 0rpx; top: 0rpx;

View File

@ -16,12 +16,13 @@
<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"
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text> <text class="collect">{{item.count_start}}</text>
</view> </view>
</view> </view>
@ -52,12 +53,29 @@
<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,
graphicStartApi
} from '@/api/community.js'
import {
getIndexData,
getDiy
} 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 { export default {
components: { components: {
mTabbar, mTabbar,
@ -149,13 +167,9 @@
gogogo(item) { gogogo(item) {
if (this.tabsData.tabsActive == 1) { if (this.tabsData.tabsActive == 1) {
uni.navigateTo({ uni.navigateTo({
//#ifdef APP url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
url: '/pages/short_video/appSwiper/index?id=' + item.community_id
//#endif
//#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
//#endif
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
@ -203,12 +217,7 @@
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index
if (item.index == 1) { if (item.index == 1) {
uni.navigateTo({ 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}` url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif
}) })
} }
}, },
@ -219,7 +228,10 @@
let latitude, longitude; let latitude, longitude;
latitude = res.latitude.toString(); latitude = res.latitude.toString();
longitude = res.longitude.toString(); longitude = res.longitude.toString();
getGeocoder({ lat: latitude, long: longitude }).then(res => { getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
this.$store.commit('setLocation', res.data) this.$store.commit('setLocation', res.data)
this.street = res.data.address_component.street this.street = res.data.address_component.street
}).catch(err => { }).catch(err => {

View File

@ -2,20 +2,28 @@
<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="['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 class="town_name">{{street}}</view>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> <navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view> <view :class="['iconfont','icon-xiaoxi',isFshow?'sitbox':'']" style="color:#fff;"></view>
</navigator> </navigator>
<view class="bg-img" v-if="isFshow">
</view>
<view :class="['site-box ','flex_a_c_j_sb',isFshow?'sistbox':'']" v-if="isFshow">
<view class="bg-img">
<img :src="bgColor" alt=""> <img :src="bgColor" alt="">
</view> </view>
</view> </view>
</view>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper> <zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper>
@ -29,8 +37,44 @@
</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,29 +262,30 @@
}) })
}, },
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
} }
}, },
@ -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%;
/* #ifdef MP || APP-PLUS */
height: 160rpx;
/* #endif */
/* #ifdef H5 */
height: 120rpx; 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;

View File

@ -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 class="noVideo acea-row row-center-wrapper" v-if="!dataList.length && !loadVideo"> </view> -->
<!-- <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>

View File

@ -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)

View File

@ -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 {
@ -307,6 +328,12 @@
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({
@ -432,7 +459,12 @@
.site-box { .site-box {
width: 100%; width: 100%;
/* #ifdef MP || APP-PLUS */
height: 170rpx;
/* #endif */
/* #ifdef H5 */
height: 120rpx; height: 120rpx;
/* #endif */
margin-bottom: 26.32rpx; margin-bottom: 26.32rpx;
position: absolute; position: absolute;
top: 0rpx; top: 0rpx;