界面修改

This commit is contained in:
jia 2023-09-06 11:07:10 +08:00
parent 069e8c30e7
commit 1d82db35bf
6 changed files with 1042 additions and 1063 deletions

View File

@ -101,7 +101,7 @@ export default {
if(this.mark < this.allList.length){
this.waterFall()
}
console.log(this.rightList,this.leftList)
}
},
immediate: true,

View File

@ -70,7 +70,13 @@
</view>
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<!-- <m-tabbar native>
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
</view>
</template>
</m-tabbar> -->
</view>
</template>
@ -264,13 +270,14 @@
},
//
initMenu() {
let all = uni.getStorageSync('gatherAllMenuList');
let now = uni.getStorageSync('gatherNowMenuList');
if (all) {
this.AllMenuList = JSON.parse(all);
}
if (now) {
try {
this.nowMenuList = JSON.parse(now);
this.AllMenuList = this.AllMenuList.filter((item) => {
return this.nowMenuList.find(t => t.name == item.name)?.name != item.name;
})
} catch (e) {
this.nowMenuList = [];
}
},
clickMenu(e, data) {
@ -299,8 +306,7 @@
},
//
editComfirm() {
this.editFlag = false;
uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList));
this.editFlag = false;
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
},
getUniMp(appid) {

View File

@ -2,29 +2,15 @@
<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 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 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">
@ -34,50 +20,25 @@
</view> -->
</view>
<zbpSwiper
ref="list"
:isSelectPlace="true"
:town="street"
:show="show"
:location_Arr="locationArr"
@kkchange="kkchange"
@change="dchange"
>
<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>
<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>
<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-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> -->
@ -96,44 +57,44 @@
</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 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 {
import {
getSlideAPI
} from '@/api/lihai.js'
import {
} from '@/api/lihai.js'
import {
graphicLstApi,
getTopicList,
graphicStartApi
} from '@/api/community.js'
import {
} from '@/api/community.js'
import {
getIndexData,
getDiy,
getArticleList,
getArticleCategoryLists
} from '@/api/api.js'
import {
} from '@/api/api.js'
import {
getGeocoder,
merClassifly
} from '@/api/store.js';
import {
} from '@/api/store.js';
import {
getArea,
getStreet
} from '@/api/article.js';
import {
} from '@/api/article.js';
import {
Toast
} from '@/libs/uniApi'
export default {
} from '@/libs/uniApi'
export default {
components: {
mTabbar,
zbpSwiper,
easyLoadimage,
WaterfallsFlow
},
data () {
data() {
return {
activeStyle: {
@ -179,7 +140,7 @@ export default {
}
},
onPullDownRefresh () {
onPullDownRefresh() {
this.getCateList()
this.cateGoods = []
this.getGoods()
@ -187,7 +148,7 @@ export default {
uni.stopPullDownRefresh()
},
onLoad () {
onLoad() {
@ -211,9 +172,9 @@ export default {
}
this.connectstatus = connectStr
})
},
onTabItemTap(e) {
console.log(e)
if (e.text.length >= 4) {
uni.pageScrollTo({
selector: ".Circle_friends",
@ -235,22 +196,22 @@ export default {
window.addEventListener("scroll", this.scrolling);
// #endif
},
onTabItemTap (e) {
if (e.text.length >= 4) {
onTabItemTap(e) {
uni.pageScrollTo({
selector: ".Circle_friends",
scrollTop: 0
})
}
},
onReachBottom () {
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.getGoods()
},
mounted () {
mounted() {
this.selfLocation()
// #ifdef H5
//
@ -264,7 +225,7 @@ export default {
});
},
// #ifdef APP-PLUS
onPageScroll (e) {
onPageScroll(e) {
const scrollTop = e.scrollTop;
@ -288,24 +249,26 @@ export default {
this.backColor = 'rgba(252, 252, 252, 1.0)'
this.isFshow = true
this.show = false
this.$nextTick(()=>{
uni.setTabBarItem({
index: 0,
text: '返回顶部',
iconPath: '/static/tabbar_icon/top.png',
selectedIconPath: '/static/tabbar_icon/top.png'
});
})
}
},
// #endif
beforeDestroy () {
beforeDestroy() {
//
this.$bus.$off('value-updated')
},
methods: {
scrolling () {
scrolling() {
//
let scrollTop =
window.pageYOffset ||
@ -355,17 +318,17 @@ export default {
},
kkchange (e) {
kkchange(e) {
this.bgColor = e
},
tabsChange1 (item) {
tabsChange1(item) {
this.getArticleList(item.article_category_id)
this.streeta_id = item.id
this.tabsData1.tabsActive = item.index
},
async getArticle () {
async getArticle() {
let list = []
const {
@ -384,7 +347,7 @@ export default {
this.tabsData1.list = list
this.getArticleList(list[0].article_category_id)
},
async getArticleList (id) {
async getArticleList(id) {
let obj = {
is_home: 1
}
@ -393,25 +356,25 @@ export default {
} = await getArticleList(id)
this.articleList = data.list
},
article (item) {
article(item) {
uni.navigateTo({
url: '/pages/news_details/index?id=' + item.article_id
})
},
selectPlce (e) {
selectPlce(e) {
this.street_id = e.value[1].code
this.town = e.value[1].name
this.getCloudShopMerId(e.value[1].code)
},
getCloudShopMerId (id) {
getCloudShopMerId(id) {
get_cloud_shop(id).then(res => {
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
})
},
selectLocation () {
selectLocation() {
this.showPicker = true
},
confirm (e) {
confirm(e) {
this.street = e.value[1].name
@ -421,7 +384,7 @@ export default {
})
this.showPicker = false
},
changeHandler (e) {
changeHandler(e) {
const {
columnIndex,
value,
@ -437,7 +400,7 @@ export default {
});
}
},
Area () {
Area() {
getArea({
city_code: 510500
}).then(res => {
@ -445,19 +408,19 @@ export default {
this.Street(res.data[0]['code']);
});
},
Street (code) {
Street(code) {
getStreet({
area_code: code
}).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data);
});
},
dchange (e) {
dchange(e) {
this.$refs.list.street = e.value[1].name
this.street = e.value[1].name
},
gogogo (item) {
gogogo(item) {
if (item.video_link.length > 0) {
uni.navigateTo({
// #ifdef MP || H5
@ -475,7 +438,7 @@ export default {
})
}
},
giveStart (item) {
giveStart(item) {
let status = item.relevance_id ? 0 : 1
graphicStartApi(item.community_id, {
status: status
@ -490,7 +453,7 @@ export default {
}
})
},
getGoods: function (item) {
getGoods: function(item) {
graphicLstApi(this.where).then(res => {
this.cateGoods.push(...res.data.list)
@ -516,7 +479,7 @@ export default {
})
},
/*获取分类列表*/
async getCateList () {
async getCateList() {
const {
data
} = await getTopicList()
@ -525,7 +488,7 @@ export default {
category_id: 0
}, ...data]
},
tabsChange (item) {
tabsChange(item) {
this.cateGoods = []
this.where.category_id = item.category_id
this.emptyShow = false
@ -536,7 +499,7 @@ export default {
this.tabsData.tabsActive = item.index
},
selfLocation () {
selfLocation() {
if (uni.getStorageSync('loction') == true) {
this.isshow = false
} else {
@ -585,7 +548,7 @@ export default {
/**
* 设置手机通知权限
*/
setPermissions () {
setPermissions() {
// #ifdef APP-PLUS
if (plus.os.name == 'Android') { // Android
var main = plus.android.runtimeMainActivity();
@ -606,7 +569,7 @@ export default {
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
showCancel: false,
confirmText: '去设置',
success: function (res) {
success: function(res) {
if (res.confirm) {
var Intent = plus.android.importClass('android.content.Intent');
var Build = plus.android.importClass("android.os.Build");
@ -652,7 +615,7 @@ export default {
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
showCancel: false,
confirmText: '去设置',
success: function (res) {
success: function(res) {
if (res.confirm) {
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
var setting = plus.ios.invoke('NSURL', 'URLWithString:',
@ -668,17 +631,17 @@ export default {
// #endif
}
}
}
}
</script>
<style lang="scss" scoped>
page {
page {
background-color: #f4f7fe;
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}
}
.location {
.location {
background-color: #f6f6f6;
width: 680rpx;
height: 150rpx;
@ -703,46 +666,46 @@ page {
font-size: 20rpx;
color: #5a5a5a;
}
}
}
.Circle_friends {
.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%;
// .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;
// 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);
// }
// }
// img {
// width: 100%;
// height: 100%;
// filter: blur(30rpx);
// transform: scale(1.5);
// }
// }
.sitebox {
.sitebox {
animation-name: fadeIn;
animation-duration: 3s;
animation-fill-mode: forwards;
}
}
@keyframes fadeIn {
@keyframes fadeIn {
from {
opacity: 0;
}
@ -750,9 +713,9 @@ page {
to {
opacity: 1;
}
}
}
.site-box {
.site-box {
width: 100%;
/* #ifdef MP || APP-PLUS */
height: 160rpx;
@ -793,43 +756,43 @@ page {
font-size: 30rpx;
font-size: 35.09rpx;
}
}
}
.circle_friends_wrapper {
.circle_friends_wrapper {
position: relative;
z-index: 2;
}
}
/deep/.u-tabs__wrapper__nav__line {
/deep/.u-tabs__wrapper__nav__line {
width: 46rpx;
margin-left: -2rpx;
}
}
/deep/.u-tabs__wrapper__nav__item {
/deep/.u-tabs__wrapper__nav__item {
padding: 0 0px;
padding-right: 10rpx;
}
}
.search_wrapper {
.search_wrapper {
width: 694.74rpx;
margin: 0 auto;
}
}
.tabs_wrapper {
.tabs_wrapper {
width: 720rpx;
margin: 0 auto;
margin-bottom: 21.05rpx;
// margin-left: -20rpx;
}
}
.empty_wrapper {
.empty_wrapper {
display: flex;
align-items: center;
justify-content: center;
}
}
.article_box {
.article_box {
height: 100%;
width: 694.74rpx;
margin: 0 auto;
@ -880,9 +843,9 @@ page {
}
}
}
}
}
.tabs_wrapper {
.tabs_wrapper {
width: 723rpx;
margin: 0rpx auto;
margin-bottom: 21.05rpx;
@ -900,15 +863,15 @@ page {
margin-right: 7.02rpx;
}
}
}
}
.goodslist {
.goodslist {
// display: flex;
margin: 0 auto;
width: 725rpx;
}
}
.goods {
.goods {
margin: 0 auto;
width: 725rpx;
@ -1127,5 +1090,5 @@ page {
}
}
}
}
}
</style>

View File

@ -143,7 +143,10 @@
<!-- <m-tabbar native>
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
<view class="custom_style_icon" style="margin-top: -50rpx;"></view>
<view class="" style="color: red;">
发布
</view>
</view>
</template>
</m-tabbar> -->

View File

@ -129,6 +129,13 @@
<view class="locationa"> 位置权限使用说明 </view>
<view class="locationb"> 用于向你推荐最近门店 </view>
</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>
</template>