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="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation"> <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>
<view class="town_name" style="color:#000;">{{street}}</view> <view class="town_name" style="color:#000;">{{street}}</view>
</view> </view>
@ -21,18 +22,9 @@
</view> </view>
<zbpSwiper <zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town="street" @kkchange="kkchange"></zbpSwiper>
:isSelectPlace="true" <u-empty :show="jurisdiction" mode="permission" :text="emptyText"
:location_Arr="locationArr" icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
: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="business com special_work" v-if="jurisdiction == false">
<view class="title project"> <view class="title project">
<view>更多功能</view> <view>更多功能</view>
@ -41,39 +33,19 @@
</view> </view>
<view class="content"> <view class="content">
<block v-if="nowMenuList.length > 0"> <block v-if="nowMenuList.length > 0">
<u-transition <u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
v-for="(item, index) in nowMenuList" <view class="examine" @click="
:key="item.name"
show
>
<view
class="examine"
@click="
editFlag ? removeMenu(item) : clickMenu(item.type, item.data) 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> </image>
<u-icon <u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
v-if="editFlag"
class="icon"
name="minus-circle-fill"
color="red"
></u-icon>
<text class="text">{{ item.name }}</text> <text class="text">{{ item.name }}</text>
</view> </view>
</u-transition> </u-transition>
</block> </block>
<view <view v-else-if="!editFlag" @click="editFlag = true"
v-else-if="!editFlag" style="text-align: center; width: 100%; color: #aaa">还没有应用,点我添加应用</view>
@click="editFlag = true"
style="text-align: center; width: 100%; color: #aaa"
>还没有应用,点我添加应用</view
>
</view> </view>
</view> </view>
<view v-if="editFlag" class="business com special_work edit_card"> <view v-if="editFlag" class="business com special_work edit_card">
@ -82,17 +54,9 @@
<view class="edit2" @click="editComfirm">完成</view> <view class="edit2" @click="editComfirm">完成</view>
</view> </view>
<view class="content"> <view class="content">
<u-transition <u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
v-for="(item, index) in AllMenuList"
:key="item.name"
show
>
<view class="examine" @click="pushMenu(item)"> <view class="examine" @click="pushMenu(item)">
<image <image class="icon_img" :src="item.icon" mode="aspectFit">
class="icon_img"
:src="item.icon"
mode="aspectFit"
>
</image> </image>
<u-icon class="icon" name="plus-circle-fill"></u-icon> <u-icon class="icon" name="plus-circle-fill"></u-icon>
<text class="text">{{ item.name }}</text> <text class="text">{{ item.name }}</text>
@ -111,46 +75,46 @@
</template> </template>
<script> <script>
import Cache from '@/utils/cache'; 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 { import {
getArea, getArea,
getStreet getStreet
} from '@/api/article.js'; } from '@/api/article.js';
import { import {
mapState, mapState,
mapGetters mapGetters
} from 'vuex' } from 'vuex'
import { import {
getWorkArticleCount, getWorkArticleCount,
getSlideAPI getSlideAPI
} from '@/api/article.js' } from '@/api/article.js'
import { import {
getStoreList, getStoreList,
getUserInfo getUserInfo
} from '@/api/user.js' } from '@/api/user.js'
import { import {
getGeocoder, getGeocoder,
microSeachBarCode, microSeachBarCode,
microEadtProduct microEadtProduct
} from '@/api/store.js' } from '@/api/store.js'
import { import {
Toast Toast
} from '@/libs/uniApi'; } from '@/libs/uniApi';
import { import {
getDiy getDiy
} from '@/api/api.js'; } from '@/api/api.js';
import uniMP from '@/utils/uniMP.js'; import uniMP from '@/utils/uniMP.js';
export default { export default {
components: { components: {
mTabbar, mTabbar,
zbpSwiper, zbpSwiper,
emptyPage emptyPage
}, },
data () { data() {
return { return {
locationArr: ({}), locationArr: ({}),
emptyText: '暂无可用应用', emptyText: '暂无可用应用',
@ -171,13 +135,13 @@ export default {
// //
AllMenuList: [{ AllMenuList: [{
name: '商户平台', name: '商户平台',
icon: '/static/applet/shop_app.png', icon: 'static/applet/shop_app.png',
data: '/pages/moreProject/moreProject', data: '/pages/moreProject/moreProject',
type: 2, type: 2,
}, },
{ {
name: '供销平台', name: '供销平台',
icon: '/static/applet/gx_app.png', icon: 'static/applet/gx_app.png',
data: '__UNI__B5B1EDD', data: '__UNI__B5B1EDD',
type: 1, type: 1,
}, },
@ -194,13 +158,13 @@ export default {
computed: { computed: {
...mapGetters(['userInfo', 'location', 'isLogin']) ...mapGetters(['userInfo', 'location', 'isLogin'])
}, },
created () { }, created() {},
onLoad () { onLoad() {
this.Area() this.Area()
this.initMenu(); this.initMenu();
}, },
onShow () { onShow() {
if (this.isLogin) { if (this.isLogin) {
this.emptyText = '暂无可用应用' this.emptyText = '暂无可用应用'
this.jurisdiction = false this.jurisdiction = false
@ -212,15 +176,15 @@ export default {
}, },
onPullDownRefresh () { onPullDownRefresh() {
this.getUserInfo() this.getUserInfo()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
beforeDestroy () { beforeDestroy() {
// //
this.$bus.$off('value-updated') this.$bus.$off('value-updated')
}, },
mounted () { mounted() {
if (this.street.length <= 0) { if (this.street.length <= 0) {
this.appLocation() this.appLocation()
} }
@ -236,7 +200,7 @@ export default {
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll (e) { onPageScroll(e) {
const scrollTop = e.scrollTop; const scrollTop = e.scrollTop;
if (scrollTop <= 20) { if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0)' this.backColor = 'rgba(252, 252, 252, 0)'
@ -255,7 +219,7 @@ export default {
// #endif // #endif
methods: { methods: {
scrolling () { scrolling() {
// //
let scrollTop = let scrollTop =
window.pageYOffset || window.pageYOffset ||
@ -297,7 +261,7 @@ export default {
}, },
// //
initMenu () { initMenu() {
let all = uni.getStorageSync('gatherAllMenuList'); let all = uni.getStorageSync('gatherAllMenuList');
let now = uni.getStorageSync('gatherNowMenuList'); let now = uni.getStorageSync('gatherNowMenuList');
if (all) { if (all) {
@ -307,7 +271,7 @@ export default {
this.nowMenuList = JSON.parse(now); this.nowMenuList = JSON.parse(now);
} }
}, },
clickMenu (e, data) { clickMenu(e, data) {
switch (e) { switch (e) {
case 1: case 1:
this.getUniMp(data); this.getUniMp(data);
@ -318,26 +282,26 @@ export default {
} }
}, },
// //
pushMenu (data) { pushMenu(data) {
this.nowMenuList.push(data); this.nowMenuList.push(data);
this.AllMenuList = this.AllMenuList.filter((item) => { this.AllMenuList = this.AllMenuList.filter((item) => {
return item.name != data.name; return item.name != data.name;
}) })
}, },
// //
removeMenu (data) { removeMenu(data) {
this.AllMenuList.push(data); this.AllMenuList.push(data);
this.nowMenuList = this.nowMenuList.filter((item) => { this.nowMenuList = this.nowMenuList.filter((item) => {
return item.name != data.name; return item.name != data.name;
}) })
}, },
// //
editComfirm () { editComfirm() {
this.editFlag = false; this.editFlag = false;
uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList)); uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList));
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList)); uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
}, },
getUniMp (appid) { getUniMp(appid) {
console.log('点击供销平台'); console.log('点击供销平台');
// #ifdef APP-PLUS // #ifdef APP-PLUS
uniMP.loadMP(appid); uniMP.loadMP(appid);
@ -348,7 +312,7 @@ export default {
title: 'H5不支持打开小程序' title: 'H5不支持打开小程序'
}) })
}, },
changeHandler (e) { changeHandler(e) {
const { const {
columnIndex, columnIndex,
value, value,
@ -373,17 +337,17 @@ export default {
this.Street(res.data[0]['code']); this.Street(res.data[0]['code']);
}); });
}, },
Street (code) { Street(code) {
getStreet({ getStreet({
area_code: code area_code: code
}).then(res => { }).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data); this.$refs.uPicker.setColumnValues(1, res.data);
}); });
}, },
selectLocation () { selectLocation() {
this.showPicker = true this.showPicker = true
}, },
confirm (e) { confirm(e) {
this.street = e.value[1].name this.street = e.value[1].name
this.$nextTick(() => { this.$nextTick(() => {
@ -392,7 +356,7 @@ export default {
}) })
this.showPicker = false this.showPicker = false
}, },
appLocation () { appLocation() {
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
timeout: '10', timeout: '10',
@ -410,7 +374,8 @@ export default {
let street_id = res.data.address_reference.town.id let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street this.street = res.data.address_component.street
this.$nextTick(() => { 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 this.bgColor = e
}, },
navigator (url, t) { navigator(url, t) {
// if (this.userInfoData.is_wsxx === 0 && t != '') return Toast(""); // if (this.userInfoData.is_wsxx === 0 && t != '') return Toast("");
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })
}, },
getUserInfo: function () { getUserInfo: function() {
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
that.userInfoData = res.data; that.userInfoData = res.data;
@ -463,22 +428,22 @@ export default {
}); });
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.gather { .gather {
padding-bottom: 164.91rpx; padding-bottom: 164.91rpx;
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%); background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
position: relative; position: relative;
} }
.sitebox { .sitebox {
animation-name: fadeIn; animation-name: fadeIn;
animation-duration: 3s; animation-duration: 3s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
} }
@keyframes fadeIn { @keyframes fadeIn {
from { from {
opacity: 0; opacity: 0;
} }
@ -486,9 +451,9 @@ export default {
to { to {
opacity: 1; opacity: 1;
} }
} }
.site-box { .site-box {
width: 100%; width: 100%;
/* #ifdef MP || APP-PLUS */ /* #ifdef MP || APP-PLUS */
height: 160rpx; height: 160rpx;
@ -528,24 +493,24 @@ export default {
font-size: 30rpx; font-size: 30rpx;
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.top_box { .top_box {
// padding-top: 180rpx; // padding-top: 180rpx;
background: linear-gradient(#36a2ff, #fff); background: linear-gradient(#36a2ff, #fff);
} }
.com { .com {
margin-left: 50%; margin-left: 50%;
transform: translate(-50%); transform: translate(-50%);
} }
.business { .business {
width: 694.74rpx; width: 694.74rpx;
// margin-bottom: 175rpx; // margin-bottom: 175rpx;
} }
.special_work { .special_work {
// padding: 17.54rpx; // padding: 17.54rpx;
width: 694.74rpx; width: 694.74rpx;
margin-top: 52.63rpx; margin-top: 52.63rpx;
@ -635,10 +600,10 @@ export default {
} }
} }
} }
} }
.edit_card { .edit_card {
background-color: #fff; background-color: #fff;
padding-top: 28rpx; padding-top: 28rpx;
} }
</style> </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 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>
@ -316,13 +323,7 @@
</view> </view>
</uni-popup> </uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <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> </view>
</template> </template>
<script> <script>
@ -402,7 +403,7 @@
newTime: 0, //跟手滑动后的最新时间💗 newTime: 0, //跟手滑动后的最新时间💗
timeNumber: 0, //🌟💗 timeNumber: 0, //🌟💗
ProgressBarBottom: 20, //进度条离底部的距离💗 ProgressBarBottom: 20, //进度条离底部的距离💗
object_fit: 'cover', //视频样式默认包含🌟💗 object_fit: 'fill', //视频样式默认包含🌟💗
mode: 'aspectFit', //图片封面样式🌟💗 mode: 'aspectFit', //图片封面样式🌟💗
timeout: "", //🌟用来阻止 setTimeout()方法 timeout: "", //🌟用来阻止 setTimeout()方法
voice: "", //🌟用来阻止 setTimeout()方法 voice: "", //🌟用来阻止 setTimeout()方法
@ -704,12 +705,13 @@
// }); // });
// })' // })'
// that.isUser ? // that.isUser ?
videoList({ videoList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
id:this.videoID id: that.videoID
}).then(res => {
}).then(res=>{ console.log(res.data.list)
that.getVideoData(res.data.list); that.getVideoData(res.data.list);
}) })
@ -883,7 +885,7 @@
// 这个方法主要就是用来第一次进入视频播放时用来处理 // 这个方法主要就是用来第一次进入视频播放时用来处理
deoList(this.videoID).then(async (res) => { deoList(this.videoID).then(async (res) => {
this.loadVideo = false this.loadVideo = false
this.userUid=res.data.uid this.userUid = res.data.uid
this.page = this.page + 1; this.page = this.page + 1;
var msg = [res.data]; var msg = [res.data];
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
@ -1110,6 +1112,11 @@
// background-color: #999; // background-color: #999;
// } // }
// } // }
.container {
position: relative;
}
.video-list { .video-list {
// margin: 0 auto; // margin: 0 auto;
// width: 750rpx; // 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 { .header {
position: fixed; position: fixed;
z-index: 9; z-index: 9999 !important;
width: 750rpx; width: 750rpx;
height: 186rpx; height: 120rpx;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: 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 { .items {
margin: 0 30rpx; margin: 0 30rpx;
image {
width: 58rpx;
height: 58rpx;
}
.tName { .tName {
color: #000; font-size: 33rpx;
font-size: 32rpx; font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #737373;
line-height: 50px;
&.on { &.on {
font-size: 38rpx; font-size: 33rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
} }
} }
} }
} }