# Conflicts:
#	jiuyi2/common/js/config.js
#	jiuyi2/pages/mine/setting/usePay.vue
#	jiuyi2/pages/mine/switch-accounts/index.vue
#	jiuyi2/pages/news/news.vue
#	jiuyi2/vite.config.js
This commit is contained in:
sx 2025-02-21 18:01:09 +08:00
commit 409f137e89
14 changed files with 331 additions and 640 deletions

View File

@ -14,8 +14,6 @@ onLaunch(() => {
getUserinfo() getUserinfo()
// //
getConfig() getConfig()
//
getNoReadNum()
}) })
// //
@ -53,41 +51,6 @@ function getConfig() {
} }
}) })
} }
//
async function getNoReadNum() {
// uni.removeTabBarBadge({
// index: 2,
// text: "",
// });
// api.getNoReadNum().then(rs => {
// if (rs.code == 200) {
// uni.setTabBarBadge({
// index: 0,
// text: "11",
// });
// }
// })
// uni.setTabBarBadge({
// index: 2,
// text: "11",
// });
// const res = await uni.request({ url: 'API_URL' });
// const count = res.data.unread;
// setTimeout(() => {
// uni.setTabBarBadge({
// index: 1,
// text: '10',
// success: function () {
// console.log(11111);
// },
// })
// }, 1000)
}
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -1427,6 +1427,7 @@ const util = {
uni.$emit('login') uni.$emit('login')
setTimeout(() => { setTimeout(() => {
util.loginTencent(userinfo)
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/index' url: '/pages/index/index'
}) })

View File

@ -138,6 +138,12 @@ const showMenu = computed(() => {
// //
const noReadNum = ref(0) const noReadNum = ref(0)
const getReadNum = () => {
getNoReadNum()
}
defineExpose({ getReadNum })
// //
onMounted(() => { onMounted(() => {
// //
@ -153,7 +159,7 @@ onMounted(() => {
// proxy.$refs.alert.open() // proxy.$refs.alert.open()
}) })
onLoad(()=>{ onLoad(() => {
// //
getNoReadNum() getNoReadNum()
}) })
@ -245,7 +251,7 @@ function getNoReadNum() {
<view class="option" :class="{ active: item.page === page }" v-if="item.type == 'option'"> <view class="option" :class="{ active: item.page === page }" v-if="item.type == 'option'">
<text class="text">{{ item.name }}</text> <text class="text">{{ item.name }}</text>
<span class="pot" v-if="item.page == 'news' && noReadNum != 0">{{ noReadNum }}</span> <view class="pot" v-if="item.page == 'news' && noReadNum != 0">{{ noReadNum }}</view>
</view> </view>
<view class="middle" v-else-if="item.type === 'middle'"> <view class="middle" v-else-if="item.type === 'middle'">
@ -351,23 +357,28 @@ $boderSize: 2rpx;
color: #999; color: #999;
} }
.option { }
position: relative;
.pot { .option {
position: absolute; position: relative;
top: -16rpx; z-index: 1;
right: -30rpx;
height: 24rpx; .pot {
min-width: 24rpx; position: absolute;
line-height: 24rpx; top: -16rpx;
border-radius: 24rpx; right: -30rpx;
background: #FF6B17; height: 24rpx;
color: #fff; /* #ifndef APP-NVUE */
font-size: 20rpx; min-width: 24rpx;
padding: 4rpx; /* #endif */
text-align: center; line-height: 24rpx;
} border-radius: 24rpx;
background: #FF6B17;
color: #fff;
font-size: 20rpx;
padding: 4rpx;
text-align: center;
z-index: 11;
} }
} }

View File

@ -52,7 +52,7 @@
// //
function removeListener() { function removeListener() {
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED); uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED,()=>{});
} }
// //

View File

@ -93,28 +93,66 @@ function addListener() {
// //
function removeListener() { function removeListener() {
// #ifdef APP uni.$chat.off(TencentCloudChat.EVENT.CONVERSATION_LIST_UPDATED, () => { });
uni.$chat.off(TencentCloudChat.EVENT.CONVERSATION_LIST_UPDATED);
// #endif
} }
// //
function getList() { function getList() {
api.news.getMessageList({ // sdk
query: { let isReady = uni.$chat.isReady();
userId: userinfo.value.id, if (!isReady) {
} setTimeout(function () {
}).then(rs => { getList();
if (rs.code == 200) { }, 800);
// list.data = handleList(rs.data); return
list.data = handleList(JSON.parse(rs.msg).SessionItem); }
return
} uni.$emit('updateNum', {})
util.alert({
content: rs.msg, uni.$chat.getConversationList().then(rs => {
showCancel: false, let res = rs.data.conversationList
let arr = []
res.forEach(item => {
let obj = {}
obj.type = item.type;
obj.chatText = item.lastMessage.messageForShow;
obj.MsgTime = handleDate(item.lastMessage.lastTime);
obj.unreadCount = item.unreadCount;
if (item.type == 'C2C') {
obj.avatar = item.userProfile.avatar;
obj.name = item.userProfile.nick;
obj.userID = item.userProfile.userID;
} else if (item.type == 'GROUP') {
obj.avatar = item.groupProfile.avatar;
obj.name = item.groupProfile.name;
obj.num = item.groupProfile.memberCount;
obj.groupID = item.groupProfile.groupID;
}
arr.push(obj)
}) })
list.data = arr;
}) })
// api.news.getMessageList({
// query: {
// userId: userinfo.value.id,
// }
// }).then(rs => {
// if (rs.code == 200) {
// let msg = JSON.parse(rs.msg);
// list.data = handleList(msg.SessionItem);
// return
// }
// util.alert({
// content: rs.msg,
// showCancel: false,
// })
// })
} }
/** /**
@ -130,27 +168,28 @@ function handleList(list) {
}, 800); }, 800);
return return
} }
if (list) {
list.forEach(item => {
item.MsgTime = handleDate(item.MsgTime)
list.forEach(item => { let type = item.Type == 1 ? `C2C${item.To_Account}` : `GROUP${item.GroupId}`;
item.MsgTime = handleDate(item.MsgTime) uni.$chat.getConversationProfile(type).then(rs => {
let res = rs.data.conversation;
let type = item.Type == 1 ? `C2C${item.To_Account}` : `GROUP${item.GroupId}`; item.chatText = res.lastMessage.messageForShow;
uni.$chat.getConversationProfile(type).then(rs => { item.unreadCount = res.unreadCount;
let res = rs.data.conversation; if (item.Type == 1) {
item.avatar = res.userProfile.avatar;
item.chatText = res.lastMessage.messageForShow; item.name = res.userProfile.nick;
item.unreadCount = res.unreadCount; } else if (item.Type == 2) {
if (item.Type == 1) { item.avatar = res.groupProfile.avatar;
item.avatar = res.userProfile.avatar; item.name = res.groupProfile.name;
item.name = res.userProfile.nick; item.num = res.groupProfile.memberCount;
} else if (item.Type == 2) { }
item.avatar = res.groupProfile.avatar;
item.name = res.groupProfile.name;
item.num = res.groupProfile.memberCount;
}
})
}) })
}) }
return list return list
} }
@ -178,15 +217,15 @@ function handleList(list) {
function handleChat(item) { function handleChat(item) {
let param = {}; let param = {};
// //
if (item.groupId == null) { if (item.type == 'C2C') {
param.type = 'C2C' param.type = 'C2C'
param.name = `${item.name}` param.name = `${item.name}`
param.msgId = `${item.To_Account}` param.msgId = `${item.userID}`
} else { } else {
// //
param.type = 'GROUP' param.type = 'GROUP'
param.name = `${item.name}` param.name = `${item.name}`
param.msgId = `${item.GroupId}` param.msgId = `${item.groupID}`
param.num = `${item.num}` param.num = `${item.num}`
} }
@ -216,7 +255,7 @@ function delMsg(item) {
return return
} }
let conversationId = item.Type == 1 ? `C2C${item.To_Account}` : `GROUP${item.GroupId}`; let conversationId = item.Type == 1 ? `C2C${item.userID}` : `GROUP${item.groupID}`;
uni.$chat.deleteConversation(conversationId).then(rs => { uni.$chat.deleteConversation(conversationId).then(rs => {
getList() getList()
@ -234,7 +273,7 @@ function setRead(item) {
return return
} }
let conversationId = item.Type == 1 ? `C2C${item.To_Account}` : `GROUP${item.GroupId}`; let conversationId = item.Type == 1 ? `C2C${item.userID}` : `GROUP${item.groupID}`;
uni.$chat.setMessageRead({ uni.$chat.setMessageRead({
conversationID: conversationId, conversationID: conversationId,
}).then(rs => { }).then(rs => {

View File

@ -226,7 +226,7 @@
color: #333; color: #333;
background-color: #F7F7F7; background-color: #F7F7F7;
border-radius: 10rpx; border-radius: 10rpx;
transition: .3s; // transition: .3s;
border: 2rpx solid #F7F7F7; border: 2rpx solid #F7F7F7;
.text {} .text {}
@ -244,7 +244,7 @@
// //
&.disabled { &.disabled {
background-color: F7F7F7; background-color: #F7F7F7;
.txt { .txt {
color: #999; color: #999;

View File

@ -1,30 +0,0 @@
<!-- 商品管理 -->
<template>
<view class="jy-business-operator-order">
<JyCommonHead title="商品管理" isRight>
<template v-slot:right>
<view @click="right">添加</view>
</template>
</JyCommonHead>
<view class="p16">
<JyOrderCard v-for="(item, index) in 10" type="merchandise_control"></JyOrderCard>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue'
import {
onLoad,
onReachBottom
} from "@dcloudio/uni-app"
import JyCommonHead from '@/components/public/jy-common-head'
//
import JyOrderCard from '@/components/public/jy-order-card'
onReachBottom(() => {
//
})
</script>

View File

@ -1,155 +0,0 @@
<!-- 商品发布 -->
<template>
<view class="jy-commodity_release">
<!-- 商品图片多选 -->
<uni-forms :modelValue="paramsData">
<uni-forms-item class="vertical-label margins" label="商品图片" name="name">
<uni-file-picker :imageStyles="{
width: '150rpx',
height: '150rpx'
}" limit="9">
<view>
<image class="wh120" src="/static/shop-upload-image.png"></image>
</view>
</uni-file-picker>
</uni-forms-item>
<uni-forms-item class="vertical-label margins" labelPosition="top" label="商品标题" name="name">
<uni-easyinput type="textarea" autoHeight :inputBorder="false" maxlength="30"
placeholder="最多输入60字符30个汉字" />
</uni-forms-item>
<view class="margins mb20">
<uni-forms-item label="类目" name="name">
<view class="df jcsb aic hohp" @click="category.open()">
<text class="click_select">点击选择</text>
<uni-icons color="#d8d8d8" type="arrowright" size="18" />
</view>
<JyPopup ref="category" title="请选择申请原因" :showSave="false">
<view class="reason-list" v-for="item in 10" @click="selectReason(item)">
<text class="label">{{ item }}</text>
</view>
</JyPopup>
</uni-forms-item>
<uni-forms-item label="规格" name="name">
<text class="click_select hohp df aic" @click="addSpecifications">添加规格</text>
<!-- <uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="" /> -->
</uni-forms-item>
<uni-forms-item label="价格" name="name">
<uni-easyinput class="hohp df aic" type="number" :inputBorder="false" placeholder="¥0.00" />
</uni-forms-item>
<uni-forms-item label="库存" name="name">
<uni-easyinput class="hohp df aic" type="number" :inputBorder="false" placeholder="输入库存" />
</uni-forms-item>
</view>
<uni-forms-item class="margins" label="发货" name="name">
<view class="df jcsb aic hohp">
<text class="click_select">点击选择</text>
<uni-icons color="#d8d8d8" type="arrowright" size="18" />
</view>
<JyPopup ref="category" title="发货" :showSave="false">
<uni-forms :modelValue="paramsDeliveryData">
<uni-forms-item label="发货时间" name="name">
<uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="输入时间" />
</uni-forms-item>
<uni-forms-item label="运费" name="name">
<uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="输入运费" />
</uni-forms-item>
<uni-forms-item label="所在地" name="name">
<uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="输入省,市,区" />
</uni-forms-item>
</uni-forms>
</JyPopup>
</uni-forms-item>
<uni-forms-item class="margins" name="name">
<view class="df jcsb aic hohp">
<view class="df aic hohp">
<image class="wh50 mr40" src="/static/commodity-release-video.png" mode="aspectFit" />
<text>添加链接到视频</text>
</view>
<uni-icons color="#d8d8d8" type="arrowright" size="18" />
</view>
</uni-forms-item>
</uni-forms>
</view>
<!-- 立即发布 -->
<JyBottomBtn @click="postApi">立即发布</JyBottomBtn>
</template>
<script setup>
import { ref, reactive, inject, onMounted, onUnmounted } from 'vue'
import JyBottomBtn from '@/components/public/jy-bottom-button'
import JyPopup from '@/components/public/jy-popup'
const { checkLink } = inject('util');
import { eventBus } from '@/components/public/event-bus'
onMounted(() => {
eventBus.on('business-operator', businessOperator)
})
onUnmounted(() => {
eventBus.off('business-operator')
});
const businessOperator = (value) => {
console.log('====================================');
console.log(value);
console.log('====================================');
}
const category = ref(null)
const paramsData = reactive({
name: ''
})
const paramsDeliveryData = reactive({
name: ''
})
const postApi = () => {
uni.showToast({
title: '发布成功',
icon: 'none'
})
}
const addSpecifications = () => {
checkLink('pages/merchant/specifications/index')
}
</script>
<style scoped lang="scss">
.jy-commodity_release {
padding: 26rpx;
.vertical-label {
display: flex;
flex-direction: column !important;
}
.uni-forms-item {
margin-bottom: 20rpx !important;
}
::v-deep .file-picker__box-content {
border: none !important;
}
::v-deep .uni-easyinput {
.uni-easyinput__content-input {
padding: 0px !important;
}
.uni-input-placeholder {
display: flex;
align-items: center;
color: #c9c9c9 !important;
font-size: 28rpx !important;
height: 100%;
}
}
.margins {
padding: 16rpx 24rpx;
border-radius: 20rpx;
background-color: #ffffff;
}
.click_select {
color: #C9C9C9;
}
}
</style>

View File

@ -1,68 +0,0 @@
<!-- 我的订单 -->
<template>
<view class="jy-business-operator-order">
<JyCommonHead>
<template v-slot:center>
<uni-easyinput prefixIcon="search" v-model="value" placeholder="搜索内容" />
</template>
</JyCommonHead>
<JyShopNavigation :current="params.currentTab" :list="tabs" @tabItemClick="itemClick" marright="25px"
activeWeight='600' activeColor="#333333" activeBarColor="initial" />
<view class="p16">
<JyOrderCard v-for="(item, index) in 10" type="business_order"></JyOrderCard>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad } from "@dcloudio/uni-app"
import JyCommonHead from '@/components/public/jy-common-head'
//
import JyShopNavigation from '@/components/public/jy-shop-navigation'
import JyOrderCard from '@/components/public/jy-order-card'
import { onReachBottom } from '@dcloudio/uni-app';
onReachBottom(() => {
console.log('====================================');
console.log("加载到底了通知刷新");
console.log('====================================');
})
const itemClick = (item, index) => {
}
const tabs = ref([{
id: 1,
name: '全部'
},
{
id: 2,
name: '待付款'
},
{
id: 3,
name: '待发货'
},
{
id: 4,
name: '待收货'
},
{
id: 6,
name: '售后/退款'
}])
const value = ref('')
const params = ref({
currentTab: 0
})
//
onLoad(options => {
params.value.currentTab = options.currentTab / 1
})
</script>
<style scoped lang="scss">
.jy-order {
::v-deep .uni-easyinput__content {
border-radius: 18rpx;
width: 542rpx;
}
}
</style>

View File

@ -1,33 +0,0 @@
<!-- 规格 -->
<template>
<view class="jy-specifications p25">
<JyCommonHead title="商品管理" @back="sendCommodity">
<template v-slot:right>
<text @click="add">添加</text>
</template>
</JyCommonHead>
<view v-if="list.length > 0">
<JySpecificationsCard class="mt20" v-for="(item, index) in list" :key="index" :item="item">
</JySpecificationsCard>
</view>
</view>
<JyBottomBtn @click="postApi">确定</JyBottomBtn>
</template>
<script setup>
import { ref } from 'vue'
import JyCommonHead from '@/components/public/jy-common-head'
import JySpecificationsCard from './jy-specifications-card'
import { eventBus } from '@/components/public/event-bus.js'
import JyBottomBtn from '@/components/public/jy-bottom-button'
const list = ref([{}])
const sendCommodity = () => {
eventBus.emit('business-operator', list.value)
uni.navigateBack();
}
const add = () => {
list.value.push({})
}
</script>
<style scoped lang="scss"></style>

View File

@ -1,51 +0,0 @@
<!-- 规格卡片 -->
<template>
<view class="jy-specifications-card bfff p25 br25">
<uni-forms :modelValue="paramsData">
<uni-forms-item label="商品图片" name="name">
<uni-file-picker :imageStyles="{
width: '150rpx',
height: '150rpx'
}" limit="9">
<uni-icons type="camera" color="#B2B2B2" size="60"></uni-icons>
</uni-file-picker>
</uni-forms-item>
<uni-forms-item label="规格" name="name">
<uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="输入规格" />
</uni-forms-item>
<view class="df">
<uni-forms-item label="价格" name="name">
<uni-easyinput class="hohp df aic" type="number" :inputBorder="false" placeholder="¥0.00" />
</uni-forms-item>
<uni-forms-item label="库存" name="name">
<uni-easyinput class="hohp df aic" type="number" :inputBorder="false" placeholder="输入库存" />
</uni-forms-item>
</view>
</uni-forms>
</view>
</template>
<script setup>
import { ref } from 'vue'
const props = defineProps({
item: {
type: Object,
default: () => ({})
}
})
const paramsData = ref({})
</script>
<style scoped lang="scss">
.jy-specifications-card {
::v-deep .uni-forms-item {
margin-bottom: 16rpx !important;
.uni-forms-item__content {
display: flex !important;
align-items: center !important;
}
}
}
</style>

View File

@ -59,7 +59,7 @@
// //
function removeListener() { function removeListener() {
uni.$chat.off(TencentCloudChat.EVENT.GROUP_LIST_UPDATED); uni.$chat.off(TencentCloudChat.EVENT.GROUP_LIST_UPDATED,()=>{});
} }
// //

View File

@ -1,161 +1,176 @@
<script setup> <script setup>
// //
import { import {
ref, ref,
reactive, reactive,
computed, computed,
} from 'vue' } from 'vue'
import { import {
useStore, useStore,
} from 'vuex' } from 'vuex'
import { import {
onLoad, onLoad,
onUnload, onUnload,
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
// //
import TencentCloudChat from '@tencentcloud/chat'; import TencentCloudChat from '@tencentcloud/chat';
// //
import apex from '@/components/header/apex' import apex from '@/components/header/apex'
// //
import noLogin from '@/components/login/noLogin.vue' import noLogin from '@/components/login/noLogin.vue'
// //
import book from '@/components/news/book' import book from '@/components/news/book'
// //
import groupList from '@/components/news/groupList' import groupList from '@/components/news/groupList'
// //
import msgList from '@/components/news/msgList' import msgList from '@/components/news/msgList'
// //
import footerMneu from '@/components/footerMenu/footerMenu' import footerMneu from '@/components/footerMenu/footerMenu'
// //
import util from '@/common/js/util.js' import util from '@/common/js/util.js'
// vuex // vuex
const store = useStore() const store = useStore()
// //
const menuList = reactive([{ const menuList = reactive([
key: 'group', {
name: '即时消息', key: 'group',
load: true, name: '即时消息',
}, { load: false,
key: 'friend', }, {
name: '通讯录', key: 'friend',
load: false, name: '通讯录',
}, load: false,
{ },
key: 'video', {
name: '视讯消息', key: 'video',
load: false, name: '视讯消息',
}, load: false,
{ },
key: 'store', {
name: '商城消息', key: 'store',
load: false, name: '商城消息',
}, load: false,
]) },
// ])
const menuIndex = ref('') //
// const menuIndex = ref('')
const showSearch = ref(false) //
// im const showSearch = ref(false)
const imLoad = ref(false) // im
// const imLoad = ref(false)
const userinfo = computed(() => { //
return store.state.userinfo const userinfo = computed(() => {
}) return store.state.userinfo
// })
const menuCurrent = computed(() => { //
return menuList[menuIndex.value] const menuCurrent = computed(() => {
}) return menuList[menuIndex.value]
})
const footerMneuRef = ref()
onLoad(() => { onLoad(() => {
// //
handleMenuIndex(0) handleMenuIndex(0)
//
addListener()
})
onUnload(() => {
//
removeListener()
})
// //
function addListener() { addListener()
uni.$chat.on(TencentCloudChat.EVENT.SDK_READY, imLoading);
}
// im //
function imLoading() { uni.$on('updateNum', (val) => {
imLoad.value = true getNoRead()
} })
})
onUnload(() => {
// //
function removeListener() { removeListener()
uni.$chat.off(TencentCloudChat.EVENT.SDK_READY, () => {}); })
}
/** function getNoRead() {
* 切换下标 setTimeout(() => {
* @param {Number} index footerMneuRef.value.getReadNum();
*/ }, 200)
function handleMenuIndex(index) { }
if (menuIndex.value === index) return
menuList.forEach(item => {
item.load = false;
});
menuList[index].load = true;
menuIndex.value = index
}
// //
function showActionSheet() { function addListener() {
uni.showActionSheet({ uni.$chat.on(TencentCloudChat.EVENT.SDK_READY, imLoading);
itemList: ['扫一扫', '添加好友', '发起群聊', '我的二维码'], }
success: rs => {
switch (rs.tapIndex) {
case 0:
util.scan()
break;
case 1:
uni.navigateTo({
// url: '/pages/news/addFriend'
url: '/pages/news/newFriend'
});
break;
case 2:
uni.navigateTo({
url: '/pages/news/group-chat/index'
});
break;
case 3:
uni.navigateTo({
url: '/pages/news/myQr'
});
break;
default:
break;
}
}
})
}
function getUserInfos(userRecommend) { // im
videoApi.getUserInfo({ function imLoading() {
query: { imLoad.value = true
userRecommend: userRecommend, }
//
function removeListener() {
// #ifdef APP
uni.$chat.off(TencentCloudChat.EVENT.SDK_READY,()=>{});
// #endif
}
/**
* 切换下标
* @param {Number} index
*/
function handleMenuIndex(index) {
if (menuIndex.value === index) return
menuList.forEach(item => {
item.load = false;
});
menuList[index].load = true;
menuIndex.value = index
}
//
function showActionSheet() {
uni.showActionSheet({
itemList: ['扫一扫', '添加好友', '发起群聊', '我的二维码'],
success: rs => {
switch (rs.tapIndex) {
case 0:
util.scan()
break;
case 1:
uni.navigateTo({
// url: '/pages/news/addFriend'
url: '/pages/news/newFriend'
});
break;
case 2:
uni.navigateTo({
url: '/pages/news/group-chat/index'
});
break;
case 3:
uni.navigateTo({
url: '/pages/news/myQr'
});
break;
default:
break;
} }
}).then(rs => { }
if (rs.data !== null) { })
uni.navigateTo({ }
url: '/pages/index/beInvited?header=' + rs.data.userPortrait + '&userId=' + rs.data
.userId + '&userNickname=' + function getUserInfos(userRecommend) {
rs.data.userNickname videoApi.getUserInfo({
}); query: {
} userRecommend: userRecommend,
}) }
} }).then(rs => {
if (rs.data !== null) {
uni.navigateTo({
url: '/pages/index/beInvited?header=' + rs.data.userPortrait + '&userId=' + rs.data
.userId + '&userNickname=' +
rs.data.userNickname
});
}
})
}
</script> </script>
<template> <template>
@ -198,7 +213,7 @@
<swiper class="swiper" :current="menuIndex" disable-touch="true"> <swiper class="swiper" :current="menuIndex" disable-touch="true">
<!-- 群组 --> <!-- 群组 -->
<swiper-item> <swiper-item>
<msgList v-if="menuList[0].load" :type="menuIndex" /> <msgList v-if="menuList[0].load" :type="menuIndex" @updateNum="updateNum" />
<view class="loading" v-else>正在加载</view> <view class="loading" v-else>正在加载</view>
</swiper-item> </swiper-item>
@ -210,13 +225,13 @@
<!-- 视频消息 --> <!-- 视频消息 -->
<swiper-item> <swiper-item>
<msgList v-if="menuList[2].load" :type="menuIndex" /> <msgList v-if="menuList[2].load" :type="menuIndex" @updateNum="updateNum" />
<view class="loading" v-else>正在加载</view> <view class="loading" v-else>正在加载</view>
</swiper-item> </swiper-item>
<!-- 商城消息 --> <!-- 商城消息 -->
<swiper-item> <swiper-item>
<msgList v-if="menuList[3].load" :type="menuIndex" /> <msgList v-if="menuList[3].load" :type="menuIndex" @updateNum="updateNum" />
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
@ -226,70 +241,70 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
// //
.headMenu { .headMenu {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
grid-gap: 25rpx; grid-gap: 25rpx;
margin: 20rpx; margin: 20rpx;
// //
.option { .option {
height: 120rpx; height: 120rpx;
background-color: #E2E2E2; background-color: #E2E2E2;
border-radius: 15rpx; border-radius: 15rpx;
transition: .3s;
//
&.active {
color: #fff;
//
&.friend,
&.group,
&.video {
background-image: linear-gradient(126deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
}
//
&.store {
background-image: linear-gradient(270deg, #FF9B27 20%, #FDC123 103%);
}
}
}
//
.cartoon {
margin-top: -15rpx;
margin-right: -25rpx;
width: 194rpx;
height: 175rpx;
transform: rotate(-5deg);
}
}
//
.searchBox {
overflow: hidden;
height: 0;
transition: .3s; transition: .3s;
//
&.active { &.active {
height: 80rpx; color: #fff;
//
&.friend,
&.group,
&.video {
background-image: linear-gradient(126deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
}
//
&.store {
background-image: linear-gradient(270deg, #FF9B27 20%, #FDC123 103%);
}
} }
} }
// //
.swiper { .cartoon {
flex: 1; margin-top: -15rpx;
width: 100%; margin-right: -25rpx;
width: 194rpx;
height: 175rpx;
transform: rotate(-5deg);
} }
}
// //
.loading { .searchBox {
display: flex; overflow: hidden;
justify-content: center; height: 0;
align-items: center; transition: .3s;
height: 100%;
&.active {
height: 80rpx;
} }
}
//
.swiper {
flex: 1;
width: 100%;
}
//
.loading {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
</style> </style>

View File

@ -43,7 +43,6 @@ import {
statusBarHeight, statusBarHeight,
goBack goBack
} from '@/components/public/Mixins.js' } from '@/components/public/Mixins.js'
import JyCommonHead from '@/components/public/jy-common-head'
import { shareToPlatform } from '@/components/public/share.js' import { shareToPlatform } from '@/components/public/share.js'
const share_more = ref(null) const share_more = ref(null)
const more_share_data = ref([]) const more_share_data = ref([])