This commit is contained in:
jia 2023-09-05 18:25:49 +08:00
parent 9c2bd07e8a
commit d70a328f9c
2 changed files with 609 additions and 620 deletions

View File

@ -5,7 +5,8 @@
<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="['iconfont','icon-weizhi',isFshow?'sitebox':'']"
style="color:#000;margin-left: 20rpx;">
</view>
<view class="town_name" style="color:#000;">{{street}}</view>
</view>
@ -21,18 +22,9 @@
</view>
<zbpSwiper
:isSelectPlace="true"
:location_Arr="locationArr"
:town="street"
@kkchange="kkchange"
></zbpSwiper>
<u-empty
:show="jurisdiction"
mode="permission"
:text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"
></u-empty>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town="street" @kkchange="kkchange"></zbpSwiper>
<u-empty :show="jurisdiction" mode="permission" :text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
<view class="business com special_work" v-if="jurisdiction == false">
<view class="title project">
<view>更多功能</view>
@ -41,39 +33,19 @@
</view>
<view class="content">
<block v-if="nowMenuList.length > 0">
<u-transition
v-for="(item, index) in nowMenuList"
:key="item.name"
show
>
<view
class="examine"
@click="
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
<view class="examine" @click="
editFlag ? removeMenu(item) : clickMenu(item.type, item.data)
"
>
<image
class="icon_img"
:src="item.icon"
mode="aspectFit"
>
">
<image class="icon_img" :src="item.icon" mode="aspectFit">
</image>
<u-icon
v-if="editFlag"
class="icon"
name="minus-circle-fill"
color="red"
></u-icon>
<u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
<text class="text">{{ item.name }}</text>
</view>
</u-transition>
</block>
<view
v-else-if="!editFlag"
@click="editFlag = true"
style="text-align: center; width: 100%; color: #aaa"
>还没有应用,点我添加应用</view
>
<view v-else-if="!editFlag" @click="editFlag = true"
style="text-align: center; width: 100%; color: #aaa">还没有应用,点我添加应用</view>
</view>
</view>
<view v-if="editFlag" class="business com special_work edit_card">
@ -82,17 +54,9 @@
<view class="edit2" @click="editComfirm">完成</view>
</view>
<view class="content">
<u-transition
v-for="(item, index) in AllMenuList"
:key="item.name"
show
>
<u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
<view class="examine" @click="pushMenu(item)">
<image
class="icon_img"
:src="item.icon"
mode="aspectFit"
>
<image class="icon_img" :src="item.icon" mode="aspectFit">
</image>
<u-icon class="icon" name="plus-circle-fill"></u-icon>
<text class="text">{{ item.name }}</text>
@ -111,46 +75,46 @@
</template>
<script>
import Cache from '@/utils/cache';
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import emptyPage from '@/components/emptyPage.vue';
import zbpSwiper from '@/components/zbpSwiper'
import {
import Cache from '@/utils/cache';
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import emptyPage from '@/components/emptyPage.vue';
import zbpSwiper from '@/components/zbpSwiper'
import {
getArea,
getStreet
} from '@/api/article.js';
import {
} from '@/api/article.js';
import {
mapState,
mapGetters
} from 'vuex'
import {
} from 'vuex'
import {
getWorkArticleCount,
getSlideAPI
} from '@/api/article.js'
import {
} from '@/api/article.js'
import {
getStoreList,
getUserInfo
} from '@/api/user.js'
import {
} from '@/api/user.js'
import {
getGeocoder,
microSeachBarCode,
microEadtProduct
} from '@/api/store.js'
import {
} from '@/api/store.js'
import {
Toast
} from '@/libs/uniApi';
import {
} from '@/libs/uniApi';
import {
getDiy
} from '@/api/api.js';
import uniMP from '@/utils/uniMP.js';
} from '@/api/api.js';
import uniMP from '@/utils/uniMP.js';
export default {
export default {
components: {
mTabbar,
zbpSwiper,
emptyPage
},
data () {
data() {
return {
locationArr: ({}),
emptyText: '暂无可用应用',
@ -171,13 +135,13 @@ export default {
//
AllMenuList: [{
name: '商户平台',
icon: '/static/applet/shop_app.png',
icon: 'static/applet/shop_app.png',
data: '/pages/moreProject/moreProject',
type: 2,
},
{
name: '供销平台',
icon: '/static/applet/gx_app.png',
icon: 'static/applet/gx_app.png',
data: '__UNI__B5B1EDD',
type: 1,
},
@ -194,13 +158,13 @@ export default {
computed: {
...mapGetters(['userInfo', 'location', 'isLogin'])
},
created () { },
onLoad () {
created() {},
onLoad() {
this.Area()
this.initMenu();
},
onShow () {
onShow() {
if (this.isLogin) {
this.emptyText = '暂无可用应用'
this.jurisdiction = false
@ -212,15 +176,15 @@ export default {
},
onPullDownRefresh () {
onPullDownRefresh() {
this.getUserInfo()
uni.stopPullDownRefresh()
},
beforeDestroy () {
beforeDestroy() {
//
this.$bus.$off('value-updated')
},
mounted () {
mounted() {
if (this.street.length <= 0) {
this.appLocation()
}
@ -236,7 +200,7 @@ export default {
},
// #ifdef APP-PLUS
onPageScroll (e) {
onPageScroll(e) {
const scrollTop = e.scrollTop;
if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0)'
@ -255,7 +219,7 @@ export default {
// #endif
methods: {
scrolling () {
scrolling() {
//
let scrollTop =
window.pageYOffset ||
@ -297,7 +261,7 @@ export default {
},
//
initMenu () {
initMenu() {
let all = uni.getStorageSync('gatherAllMenuList');
let now = uni.getStorageSync('gatherNowMenuList');
if (all) {
@ -307,7 +271,7 @@ export default {
this.nowMenuList = JSON.parse(now);
}
},
clickMenu (e, data) {
clickMenu(e, data) {
switch (e) {
case 1:
this.getUniMp(data);
@ -318,26 +282,26 @@ export default {
}
},
//
pushMenu (data) {
pushMenu(data) {
this.nowMenuList.push(data);
this.AllMenuList = this.AllMenuList.filter((item) => {
return item.name != data.name;
})
},
//
removeMenu (data) {
removeMenu(data) {
this.AllMenuList.push(data);
this.nowMenuList = this.nowMenuList.filter((item) => {
return item.name != data.name;
})
},
//
editComfirm () {
editComfirm() {
this.editFlag = false;
uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList));
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
},
getUniMp (appid) {
getUniMp(appid) {
console.log('点击供销平台');
// #ifdef APP-PLUS
uniMP.loadMP(appid);
@ -348,7 +312,7 @@ export default {
title: 'H5不支持打开小程序'
})
},
changeHandler (e) {
changeHandler(e) {
const {
columnIndex,
value,
@ -373,17 +337,17 @@ 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);
});
},
selectLocation () {
selectLocation() {
this.showPicker = true
},
confirm (e) {
confirm(e) {
this.street = e.value[1].name
this.$nextTick(() => {
@ -392,7 +356,7 @@ export default {
})
this.showPicker = false
},
appLocation () {
appLocation() {
uni.getLocation({
type: 'wgs84',
timeout: '10',
@ -410,7 +374,8 @@ export default {
let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' + street_id);
this.$bus.$emit('value-updated', this.street + ',' +
street_id);
})
@ -433,17 +398,17 @@ export default {
},
kkchange (e) {
kkchange(e) {
this.bgColor = e
},
navigator (url, t) {
navigator(url, t) {
// if (this.userInfoData.is_wsxx === 0 && t != '') return Toast("");
uni.navigateTo({
url: url
})
},
getUserInfo: function () {
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.userInfoData = res.data;
@ -463,22 +428,22 @@ export default {
});
}
}
};
};
</script>
<style lang="scss" scoped>
.gather {
.gather {
padding-bottom: 164.91rpx;
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
position: relative;
}
}
.sitebox {
.sitebox {
animation-name: fadeIn;
animation-duration: 3s;
animation-fill-mode: forwards;
}
}
@keyframes fadeIn {
@keyframes fadeIn {
from {
opacity: 0;
}
@ -486,9 +451,9 @@ export default {
to {
opacity: 1;
}
}
}
.site-box {
.site-box {
width: 100%;
/* #ifdef MP || APP-PLUS */
height: 160rpx;
@ -528,24 +493,24 @@ export default {
font-size: 30rpx;
font-size: 35.09rpx;
}
}
}
.top_box {
.top_box {
// padding-top: 180rpx;
background: linear-gradient(#36a2ff, #fff);
}
}
.com {
.com {
margin-left: 50%;
transform: translate(-50%);
}
}
.business {
.business {
width: 694.74rpx;
// margin-bottom: 175rpx;
}
}
.special_work {
.special_work {
// padding: 17.54rpx;
width: 694.74rpx;
margin-top: 52.63rpx;
@ -635,10 +600,10 @@ export default {
}
}
}
}
}
.edit_card {
.edit_card {
background-color: #fff;
padding-top: 28rpx;
}
}
</style>

View File

@ -21,6 +21,13 @@
-->
<!-- 头部导航 -->
<view class="header">
<view class='xiangzuo' @click='goBack()'>
<image src="@/static/images/icon-back.png" mode="aspectFit"></image>
</view>
</view>
<!-- <view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#000'}" >
<view class="items" @click.stop="navTap(2)">
<text class="tName" :class="currentNav==2?'on':''">关注</text>
@ -316,13 +323,7 @@
</view>
</uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<view class="fixed-head">
<view class="sys-head" :style="{height:statusBarHeight}"></view>
<view class="tool-bar" @click='goBack()'>
<image class="icon-xiangzuo" src="@/static/image/icon-back.png"></image>
</view>
</view>
</view>
</template>
<script>
@ -402,7 +403,7 @@
newTime: 0, //跟手滑动后的最新时间💗
timeNumber: 0, //🌟💗
ProgressBarBottom: 20, //进度条离底部的距离💗
object_fit: 'cover', //视频样式默认包含🌟💗
object_fit: 'fill', //视频样式默认包含🌟💗
mode: 'aspectFit', //图片封面样式🌟💗
timeout: "", //🌟用来阻止 setTimeout()方法
voice: "", //🌟用来阻止 setTimeout()方法
@ -704,12 +705,13 @@
// });
// })'
// that.isUser ?
videoList({
page: that.page,
limit: that.limit,
id:this.videoID
}).then(res=>{
id: that.videoID
}).then(res => {
console.log(res.data.list)
that.getVideoData(res.data.list);
})
@ -883,7 +885,7 @@
// 这个方法主要就是用来第一次进入视频播放时用来处理
deoList(this.videoID).then(async (res) => {
this.loadVideo = false
this.userUid=res.data.uid
this.userUid = res.data.uid
this.page = this.page + 1;
var msg = [res.data];
for (let i = 0; i < msg.length; i++) {
@ -1110,6 +1112,11 @@
// background-color: #999;
// }
// }
.container {
position: relative;
}
.video-list {
// margin: 0 auto;
// width: 750rpx;
@ -1231,44 +1238,61 @@
}
}
.fixed-head {
flex-direction: row;
justify-content: center;
align-items: center;
position: fixed;
left: 0;
top: 70rpx;
height: 86rpx;
.icon-xiangzuo {
margin-left: 10px;
width: 20px;
height: 20px;
color: #ffffff;
}
}
.header {
position: fixed;
z-index: 9;
z-index: 9999 !important;
width: 750rpx;
height: 186rpx;
height: 120rpx;
flex-direction: row;
justify-content: center;
align-items: center;
padding-top: 70rpx;
padding-top: 20rpx;
/* #ifdef MP */
padding-top: 75rpx;
/* #endif */
/deep/ .xiangzuo {
position: absolute;
left: 20rpx;
top: 60px;
width: 23rpx;
height: 42rpx;
margin-right: 40rpx;
margin-left: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.items {
margin: 0 30rpx;
image {
width: 58rpx;
height: 58rpx;
}
.tName {
color: #000;
font-size: 32rpx;
font-size: 33rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #737373;
line-height: 50px;
&.on {
font-size: 38rpx;
font-size: 33rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
}
}