工作代码提交
This commit is contained in:
parent
17b259fd3a
commit
a10e8353e9
|
@ -9,6 +9,8 @@
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// vuex
|
// vuex
|
||||||
import store from '@/store/index.js'
|
import store from '@/store/index.js'
|
||||||
|
// 腾讯云聊天
|
||||||
|
import TencentCloudChat from '@tencentcloud/chat';
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
// 引入各种权限配置
|
// 引入各种权限配置
|
||||||
import {
|
import {
|
||||||
|
@ -40,6 +42,9 @@
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
unregisterRequestPermissionTipsListener(null)
|
unregisterRequestPermissionTipsListener(null)
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
// 关闭未读消息提示
|
||||||
|
removeListenerUnreadCount()
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,7 +63,6 @@
|
||||||
onConfirm: (e) => {
|
onConfirm: (e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
},
|
},
|
||||||
// onComplete
|
|
||||||
onComplete: (e) => {
|
onComplete: (e) => {
|
||||||
// 华为手机在权限禁止之后,再次申请权限不会出现权限申请框。此时应该引导用户去系统设置开启此权限,不应该频繁申请。
|
// 华为手机在权限禁止之后,再次申请权限不会出现权限申请框。此时应该引导用户去系统设置开启此权限,不应该频繁申请。
|
||||||
if (brand.toLowerCase() == "huawei") {
|
if (brand.toLowerCase() == "huawei") {
|
||||||
|
@ -103,9 +107,29 @@
|
||||||
util.loginTencent(userinfo)
|
util.loginTencent(userinfo)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 开启未读消息监听
|
||||||
|
addListenerUnreadCount()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 开启未读消息监听
|
||||||
|
function addListenerUnreadCount() {
|
||||||
|
let onTotalUnreadMessageCountUpdated = function(event) {
|
||||||
|
// 设置未读消息条数
|
||||||
|
store.commit('setUnreadCount', event.data)
|
||||||
|
};
|
||||||
|
|
||||||
|
uni.$chat.on(TencentCloudChat.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED, onTotalUnreadMessageCountUpdated);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭未读消息更新
|
||||||
|
function removeListenerUnreadCount() {
|
||||||
|
let onTotalUnreadMessageCountUpdated = (event) => {};
|
||||||
|
//
|
||||||
|
uni.$chat.off(TencentCloudChat.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED, onTotalUnreadMessageCountUpdated);
|
||||||
|
}
|
||||||
|
|
||||||
// 获取系统配置
|
// 获取系统配置
|
||||||
function getConfig() {
|
function getConfig() {
|
||||||
api.getConfig().then(rs => {
|
api.getConfig().then(rs => {
|
||||||
|
|
|
@ -1220,11 +1220,31 @@ const util = {
|
||||||
userSig: imSig,
|
userSig: imSig,
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
util.updateMyProfile(userinfo)
|
util.updateMyProfile(userinfo)
|
||||||
|
// 获取未读消息条数
|
||||||
|
util.getUnread(userinfo)
|
||||||
console.log('im login success', rs)
|
console.log('im login success', rs)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 获取未读消息条数
|
||||||
|
getUnread(userinfo) {
|
||||||
|
if (userinfo.isRealName) {
|
||||||
|
// 验证sdk是否准备完毕
|
||||||
|
let isReady = uni.$chat.isReady();
|
||||||
|
if (!isReady) {
|
||||||
|
setTimeout(function() {
|
||||||
|
util.getUnread(userinfo)
|
||||||
|
}, 800);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 未读条数
|
||||||
|
let unreadCount = uni.$chat.getTotalUnreadMessageCount();
|
||||||
|
// 设置未读消息条数
|
||||||
|
store.commit('setUnreadCount', unreadCount)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 更新im个人资料
|
// 更新im个人资料
|
||||||
updateMyProfile(userinfo) {
|
updateMyProfile(userinfo) {
|
||||||
// 验证sdk是否准备完毕
|
// 验证sdk是否准备完毕
|
||||||
|
|
|
@ -112,14 +112,6 @@
|
||||||
url: '/pages/release/video',
|
url: '/pages/release/video',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 1是商家
|
|
||||||
// if(userinfo.value.isShop == 1) {
|
|
||||||
// result.push({
|
|
||||||
// name: '发布商品',
|
|
||||||
// img: '/static/footerMenu1.png',
|
|
||||||
// url: '/pages/release/commodity',
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// 追加
|
// 追加
|
||||||
// result.push({
|
// result.push({
|
||||||
// name: '打车',
|
// name: '打车',
|
||||||
|
@ -134,13 +126,8 @@
|
||||||
// })
|
// })
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
// 未读数量
|
// 未读数量
|
||||||
const noReadNum = ref(0)
|
const noReadNum = computed(() => uni.$store.state.unreadCount)
|
||||||
|
|
||||||
const getReadNum = () => {
|
|
||||||
getNoReadNum()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 加载完成之后
|
// 加载完成之后
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -152,8 +139,6 @@
|
||||||
uni.getSystemInfo().then(rs => {
|
uni.getSystemInfo().then(rs => {
|
||||||
safeHeight.value = rs.safeArea + 'px'
|
safeHeight.value = rs.safeArea + 'px'
|
||||||
})
|
})
|
||||||
// 获取未读消息数量
|
|
||||||
getNoReadNum()
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// proxy.$refs.alert.open()
|
// proxy.$refs.alert.open()
|
||||||
|
@ -189,7 +174,6 @@
|
||||||
else uni.navigateTo({
|
else uni.navigateTo({
|
||||||
url: `/${item.pagePath}`,
|
url: `/${item.pagePath}`,
|
||||||
})
|
})
|
||||||
getNoReadNum()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -217,29 +201,6 @@
|
||||||
//
|
//
|
||||||
proxy.$refs.alert.close()
|
proxy.$refs.alert.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取未读消息数量
|
|
||||||
function getNoReadNum() {
|
|
||||||
if (userinfo.value.isRealName) {
|
|
||||||
// 验证sdk是否准备完毕
|
|
||||||
let isReady = uni.$chat.isReady();
|
|
||||||
if (!isReady) {
|
|
||||||
setTimeout(function() {
|
|
||||||
getNoReadNum();
|
|
||||||
}, 800);
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// #ifdef APP
|
|
||||||
const unreadCount = uni.$chat.getTotalUnreadMessageCount();
|
|
||||||
noReadNum.value = +unreadCount > 99 ? '99+' : unreadCount;
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
getReadNum
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="btn cancel bar f1" v-if="versionCloud.isForce == 1">
|
<view class="btn cancel bar f1" v-if="versionCloud.isForce == 1">
|
||||||
<text class="tac c333 f28" @click="handleQuit">关闭</text>
|
<text class="tac c333 f28" @click="handleQuit">退出程序</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="btn cancel bar f1" v-else>
|
<view class="btn cancel bar f1" v-else>
|
||||||
|
|
|
@ -242,7 +242,7 @@
|
||||||
<text class="c333 f34">{{detail.name}}</text>
|
<text class="c333 f34">{{detail.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="history mtb20 df fdr jcsb aic">
|
<view class="history mtb20 df fdr jcsb aic" v-if="!giftPack">
|
||||||
<text class="c666 f28">商品修改历史</text>
|
<text class="c666 f28">商品修改历史</text>
|
||||||
<uni-icons type="right" color="#999" size="30rpx" />
|
<uni-icons type="right" color="#999" size="30rpx" />
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
<text class="txt f36">{{item.price}}</text>
|
<text class="txt f36">{{item.price}}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 销量 -->
|
<!-- 销量 -->
|
||||||
<view class="sales fs0 thd wsn ml10 c999 f26">销量:{{item.sales}}</view>
|
<view class="sales fs0 thd wsn ml10 c999 f26" v-if="item.categoryCode !== 'GIFT_PACK'">销量:{{item.sales}}</view>
|
||||||
<view class="f1"></view>
|
<view class="f1"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "九亿",
|
"name" : "九亿",
|
||||||
"appid" : "__UNI__08B31BC",
|
"appid" : "__UNI__08B31BC",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.18",
|
"versionName" : "1.0.20",
|
||||||
"versionCode" : 1018,
|
"versionCode" : 1020,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|
|
@ -798,7 +798,8 @@
|
||||||
"path" : "pages/shop/gift",
|
"path" : "pages/shop/gift",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "礼包专区"
|
"navigationBarTitleText" : "礼包专区",
|
||||||
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -837,7 +837,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
<footerMenu ref="footerMenuRef" page="index" subject="dark" />
|
<footerMenu page="index" subject="dark" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- app版本更新弹窗 -->
|
<!-- app版本更新弹窗 -->
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
addListener()
|
addListener()
|
||||||
// 获取历史消息
|
// 获取历史消息
|
||||||
getHistory({
|
getHistory({
|
||||||
callback: scrollToBottom
|
callback: scrollToBottom()
|
||||||
})
|
})
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
uni.onKeyboardHeightChange((rs) => {
|
uni.onKeyboardHeightChange((rs) => {
|
||||||
|
@ -351,10 +351,7 @@
|
||||||
// 是否拉取完毕
|
// 是否拉取完毕
|
||||||
list.isCompleted = result.isCompleted
|
list.isCompleted = result.isCompleted
|
||||||
// 消息体
|
// 消息体
|
||||||
list.messageList = result.messageList.map(item => {
|
list.messageList = result.messageList
|
||||||
console.log('msg item', item)
|
|
||||||
return item
|
|
||||||
})
|
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
param.callback && param.callback()
|
param.callback && param.callback()
|
||||||
|
@ -375,12 +372,13 @@
|
||||||
// 滚动至底部
|
// 滚动至底部
|
||||||
function scrollToBottom() {
|
function scrollToBottom() {
|
||||||
uni.createSelectorQuery().in(proxy).select('#scroll-content').boundingClientRect((res) => {
|
uni.createSelectorQuery().in(proxy).select('#scroll-content').boundingClientRect((res) => {
|
||||||
top.value = res.height
|
top.value = res.bottom
|
||||||
|
console.log('scrollToBottom', res)
|
||||||
|
|
||||||
uni.pageScrollTo({
|
// uni.pageScrollTo({
|
||||||
scrollTop: top.value,
|
// scrollTop: top.value,
|
||||||
duration: 0
|
// duration: 0
|
||||||
})
|
// })
|
||||||
// console.log('top.value', top.value)
|
// console.log('top.value', top.value)
|
||||||
}).exec();
|
}).exec();
|
||||||
}
|
}
|
||||||
|
@ -468,6 +466,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<view class="chatPage">
|
||||||
<apex :title="pageTitle">
|
<apex :title="pageTitle">
|
||||||
<template #right>
|
<template #right>
|
||||||
<view>
|
<view>
|
||||||
|
@ -476,10 +475,9 @@
|
||||||
</template>
|
</template>
|
||||||
</apex>
|
</apex>
|
||||||
|
|
||||||
<view class="app">
|
|
||||||
<scroll-view class="scroll-view" scroll-y :scroll-with-animation="true" :scroll-top="top"
|
<scroll-view class="scroll-view" scroll-y :scroll-with-animation="true" :scroll-top="top"
|
||||||
@scroll="onContentScroll" @scrolltoupper="getMoreHistroy">
|
@scroll="onContentScroll" @scrolltoupper="getMoreHistroy">
|
||||||
<view id="scroll-content" style="padding: 30rpx 30rpx">
|
<view id="scroll-content" style="padding: 30rpx">
|
||||||
<view v-for="(item, index) in list.messageList" :key="index">
|
<view v-for="(item, index) in list.messageList" :key="index">
|
||||||
<!-- 系统消息 -->
|
<!-- 系统消息 -->
|
||||||
<template v-if="item.from == 'administrator'"></template>
|
<template v-if="item.from == 'administrator'"></template>
|
||||||
|
@ -555,10 +553,10 @@
|
||||||
</view>
|
</view>
|
||||||
<view v-if="showGhost" :style="{ height: `${ghostBox.height}px`, transition: `${ghostBox.duration}s` }">
|
<view v-if="showGhost" :style="{ height: `${ghostBox.height}px`, transition: `${ghostBox.duration}s` }">
|
||||||
</view>
|
</view>
|
||||||
<view class="ghost" :style="{ height: toolHeight + 'px' }"></view>
|
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
|
||||||
|
<view class="ghost" :style="{ height: toolHeight + 'px' }"></view>
|
||||||
|
|
||||||
<view class="tool bfff" id="tool">
|
<view class="tool bfff" id="tool">
|
||||||
<view class="tool-group">
|
<view class="tool-group">
|
||||||
|
@ -585,7 +583,8 @@
|
||||||
<view class="send" @click="handleSend">发送</view>
|
<view class="send" @click="handleSend">发送</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="showGhost" :style="{ height: `${ghostBox.height}px`, transition: `${ghostBox.duration}s` }"></view>
|
<view v-if="showGhost" :style="{ height: `${ghostBox.height}px`, transition: `${ghostBox.duration}s` }">
|
||||||
|
</view>
|
||||||
<!-- 表情 -->
|
<!-- 表情 -->
|
||||||
<template v-if="toolStatus == 'emoji'">
|
<template v-if="toolStatus == 'emoji'">
|
||||||
<emoji @setEmoj="emojiTap"></emoji>
|
<emoji @setEmoj="emojiTap"></emoji>
|
||||||
|
@ -595,6 +594,7 @@
|
||||||
<JyPlus @send="handlePlusSend" :msg="msg"></JyPlus>
|
<JyPlus @send="handlePlusSend" :msg="msg"></JyPlus>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 视频 -->
|
<!-- 视频 -->
|
||||||
<video :src="videoUrl" id="video" @fullscreenchange="onScreenChange" />
|
<video :src="videoUrl" id="video" @fullscreenchange="onScreenChange" />
|
||||||
|
@ -639,6 +639,15 @@
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './index.scss';
|
@import './index.scss';
|
||||||
|
|
||||||
|
// 聊天
|
||||||
|
.chatPage {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
#video {
|
#video {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
.scroll-view {
|
.scroll-view {
|
||||||
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
<noLogin class="f1" />
|
<noLogin class="f1" />
|
||||||
|
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
<footerMenu ref="footerMneuRef" page="news" />
|
<footerMenu page="news" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 未实名 -->
|
<!-- 未实名 -->
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
<noAuth class="f1" />
|
<noAuth class="f1" />
|
||||||
|
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
<footerMenu ref="footerMneuRef" page="news" />
|
<footerMenu page="news" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template class="page" v-else>
|
<template class="page" v-else>
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
<footerMenu ref="footerMneuRef" page="news" />
|
<footerMenu page="news" />
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -249,6 +249,8 @@
|
||||||
data.sliderImage = data.sliderImage.join(',')
|
data.sliderImage = data.sliderImage.join(',')
|
||||||
// 商品详情
|
// 商品详情
|
||||||
if (data.infoRichText) data.infoRichText = btoa(unescape(encodeURIComponent(data.infoRichText)))
|
if (data.infoRichText) data.infoRichText = btoa(unescape(encodeURIComponent(data.infoRichText)))
|
||||||
|
// 判断如果是礼包商品
|
||||||
|
if (cateCurrent.value.categoryCode.startsWith('GIFT_PACK')) data.categoryCode = 'GIFT_PACK'
|
||||||
|
|
||||||
//
|
//
|
||||||
api.shop.saveProduct({
|
api.shop.saveProduct({
|
||||||
|
|
|
@ -101,9 +101,19 @@
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper> -->
|
</swiper> -->
|
||||||
|
|
||||||
|
<view class="gift mt30 bfff">
|
||||||
|
<view class="item fdc fmid" :class="{'big': item.categoryCode == 'GIFT_PACK'}"
|
||||||
|
v-for="(item,index) in tab" :key="index">
|
||||||
|
<view class="icon">
|
||||||
|
<image class="image" :src="item.image" mode="widthFix" />
|
||||||
|
</view>
|
||||||
|
<view class="mt10 c333 f28">{{item.name}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 礼包专区 -->
|
<!-- 礼包专区 -->
|
||||||
<view class="tab bfff">
|
<view class="tab pt20 bfff">
|
||||||
<view class="item ver ptb20" v-for="(item,index) in tab" :key="index" @click="handleTab(index)"
|
<view class="item ver ptb30" v-for="(item,index) in tab" :key="index" @click="handleTab(index)"
|
||||||
:class="{'active': index === tabIndex}">
|
:class="{'active': index === tabIndex}">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image class="icon" :src="item.icon" mode="aspectFill" />
|
<image class="icon" :src="item.icon" mode="aspectFill" />
|
||||||
|
@ -140,7 +150,7 @@
|
||||||
.item {
|
.item {
|
||||||
.icon {
|
.icon {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 40rpx;
|
height: 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
|
@ -158,4 +168,34 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 礼包专区
|
||||||
|
.gift {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item.big {
|
||||||
|
width: 400rpx;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 240rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-end;
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -135,7 +135,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="appbw">
|
<view class="app">
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<!-- <swiper class="banner oh" autoplay="true">
|
<!-- <swiper class="banner oh" autoplay="true">
|
||||||
<swiper-item v-for="(item, index) in 3" :key="index">
|
<swiper-item v-for="(item, index) in 3" :key="index">
|
||||||
|
@ -147,13 +147,17 @@
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper> -->
|
</swiper> -->
|
||||||
|
|
||||||
<view class="gift mtb30">
|
<view class="gift mt30 bfff">
|
||||||
<view class="item fdc fmid" v-for="(item,index) in giftCateList" :key="index" @click="handleGiftCate(item)">
|
<view class="item fdc fmid" :class="{'big': item.categoryCode == 'GIFT_PACK'}"
|
||||||
<image class="icon" :src="item.image" mode="aspectFill" />
|
v-for="(item,index) in giftCateList" :key="index" @click="handleGiftCate(item)">
|
||||||
|
<view class="icon">
|
||||||
|
<image class="image" :src="item.image" mode="widthFix" />
|
||||||
|
</view>
|
||||||
<view class="mt10 c333 f28">{{item.name}}</view>
|
<view class="mt10 c333 f28">{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="oh bfff">
|
||||||
<!-- 功能区 -->
|
<!-- 功能区 -->
|
||||||
<view class="fn rows mtb30 mlr30">
|
<view class="fn rows mtb30 mlr30">
|
||||||
<!-- <uni-icons type="scan" class="mr20" size="48rpx" color="#FF7F37" /> -->
|
<!-- <uni-icons type="scan" class="mr20" size="48rpx" color="#FF7F37" /> -->
|
||||||
|
@ -173,6 +177,7 @@
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 商品卡片组 加载更多 -->
|
<!-- 商品卡片组 加载更多 -->
|
||||||
<view class="product oh ptb30 plr30">
|
<view class="product oh ptb30 plr30">
|
||||||
|
@ -201,12 +206,31 @@
|
||||||
|
|
||||||
// 礼包专区
|
// 礼包专区
|
||||||
.gift {
|
.gift {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
|
||||||
|
.image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item.big {
|
||||||
|
width: 400rpx;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
width: 120rpx;
|
width: 240rpx;
|
||||||
height: 90rpx;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-end;
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ export default createStore({
|
||||||
"updateContent": "",
|
"updateContent": "",
|
||||||
"isForce": 0
|
"isForce": 0
|
||||||
},
|
},
|
||||||
|
// 未读消息条数
|
||||||
|
unreadCount: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
mutations: {
|
mutations: {
|
||||||
|
@ -62,6 +64,10 @@ export default createStore({
|
||||||
setTabbarMode(state, mode) {
|
setTabbarMode(state, mode) {
|
||||||
state.tabbarMode = mode
|
state.tabbarMode = mode
|
||||||
},
|
},
|
||||||
|
// 设置未读消息
|
||||||
|
setUnreadCount(state, result) {
|
||||||
|
state.unreadCount = +result > 99 ? '99+' : result
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
getters: {
|
getters: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
let target = 'http://91f.xyz:8080'
|
let target = 'http://91f.xyz:8080'
|
||||||
// let target = 'http://liuyd.cpolar.top'
|
// let target = 'http://liuyd.cpolar.top'
|
||||||
// let target = 'http://7vs3pa.natappfree.cc'
|
// let target = 'http://z7jchv.natappfree.cc'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue