Merge branch 'lr' of http://1.94.221.165:3000/sx/jiuyiUniapp
# 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:
commit
409f137e89
|
@ -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">
|
||||||
|
|
|
@ -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'
|
||||||
})
|
})
|
||||||
|
|
|
@ -138,6 +138,12 @@ const showMenu = computed(() => {
|
||||||
// 未读数量
|
// 未读数量
|
||||||
const noReadNum = ref(0)
|
const noReadNum = ref(0)
|
||||||
|
|
||||||
|
const getReadNum = () => {
|
||||||
|
getNoReadNum()
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ getReadNum })
|
||||||
|
|
||||||
// 加载完成之后
|
// 加载完成之后
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 开启监听
|
// 开启监听
|
||||||
|
@ -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,15 +357,20 @@ $boderSize: 2rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.option {
|
.option {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
.pot {
|
.pot {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -16rpx;
|
top: -16rpx;
|
||||||
right: -30rpx;
|
right: -30rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
min-width: 24rpx;
|
min-width: 24rpx;
|
||||||
|
/* #endif */
|
||||||
line-height: 24rpx;
|
line-height: 24rpx;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
background: #FF6B17;
|
background: #FF6B17;
|
||||||
|
@ -367,7 +378,7 @@ $boderSize: 2rpx;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
padding: 4rpx;
|
padding: 4rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
z-index: 11;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
// 移除监听
|
// 移除监听
|
||||||
function removeListener() {
|
function removeListener() {
|
||||||
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED);
|
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED,()=>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取群组列表
|
// 获取群组列表
|
||||||
|
|
|
@ -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);
|
|
||||||
list.data = handleList(JSON.parse(rs.msg).SessionItem);
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
util.alert({
|
|
||||||
content: rs.msg,
|
uni.$emit('updateNum', {})
|
||||||
showCancel: false,
|
|
||||||
|
uni.$chat.getConversationList().then(rs => {
|
||||||
|
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,7 +168,7 @@ function handleList(list) {
|
||||||
}, 800);
|
}, 800);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (list) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
item.MsgTime = handleDate(item.MsgTime)
|
item.MsgTime = handleDate(item.MsgTime)
|
||||||
|
|
||||||
|
@ -151,6 +189,7 @@ function handleList(list) {
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
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 => {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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>
|
|
|
@ -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>
|
|
|
@ -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>
|
|
|
@ -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>
|
|
|
@ -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>
|
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
// 移除监听
|
// 移除监听
|
||||||
function removeListener() {
|
function removeListener() {
|
||||||
uni.$chat.off(TencentCloudChat.EVENT.GROUP_LIST_UPDATED);
|
uni.$chat.off(TencentCloudChat.EVENT.GROUP_LIST_UPDATED,()=>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取群组列表
|
// 获取群组列表
|
||||||
|
|
|
@ -33,10 +33,11 @@
|
||||||
// vuex
|
// vuex
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
// 菜单列表
|
// 菜单列表
|
||||||
const menuList = reactive([{
|
const menuList = reactive([
|
||||||
|
{
|
||||||
key: 'group',
|
key: 'group',
|
||||||
name: '即时消息',
|
name: '即时消息',
|
||||||
load: true,
|
load: false,
|
||||||
}, {
|
}, {
|
||||||
key: 'friend',
|
key: 'friend',
|
||||||
name: '通讯录',
|
name: '通讯录',
|
||||||
|
@ -67,6 +68,7 @@
|
||||||
const menuCurrent = computed(() => {
|
const menuCurrent = computed(() => {
|
||||||
return menuList[menuIndex.value]
|
return menuList[menuIndex.value]
|
||||||
})
|
})
|
||||||
|
const footerMneuRef = ref()
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// 初始化菜单
|
// 初始化菜单
|
||||||
|
@ -74,6 +76,11 @@
|
||||||
|
|
||||||
// 开启监听
|
// 开启监听
|
||||||
addListener()
|
addListener()
|
||||||
|
|
||||||
|
// 更新未读数量
|
||||||
|
uni.$on('updateNum', (val) => {
|
||||||
|
getNoRead()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
|
@ -81,6 +88,12 @@
|
||||||
removeListener()
|
removeListener()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function getNoRead() {
|
||||||
|
setTimeout(() => {
|
||||||
|
footerMneuRef.value.getReadNum();
|
||||||
|
}, 200)
|
||||||
|
}
|
||||||
|
|
||||||
// 开启监听
|
// 开启监听
|
||||||
function addListener() {
|
function addListener() {
|
||||||
uni.$chat.on(TencentCloudChat.EVENT.SDK_READY, imLoading);
|
uni.$chat.on(TencentCloudChat.EVENT.SDK_READY, imLoading);
|
||||||
|
@ -93,7 +106,9 @@
|
||||||
|
|
||||||
// 移除监听
|
// 移除监听
|
||||||
function removeListener() {
|
function removeListener() {
|
||||||
|
// #ifdef APP
|
||||||
uni.$chat.off(TencentCloudChat.EVENT.SDK_READY,()=>{});
|
uni.$chat.off(TencentCloudChat.EVENT.SDK_READY,()=>{});
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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>
|
||||||
|
|
|
@ -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([])
|
||||||
|
|
Loading…
Reference in New Issue