合并代码
This commit is contained in:
parent
3c27a4a274
commit
b07032764e
|
@ -44,9 +44,9 @@ export const news = {
|
||||||
*/
|
*/
|
||||||
deleteFriend(param) {
|
deleteFriend(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/user/friend/deleteFriend`,
|
url: `/user/chat/relation/deleteFriend`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
path: param.path,
|
data: param.data,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -9,19 +9,21 @@ const video = {
|
||||||
*/
|
*/
|
||||||
homeVideo(param) {
|
homeVideo(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/video/api/queryVideoByPage`,
|
url: `/video/video/list`,
|
||||||
|
// url: `/video/api/queryVideoByPage`,
|
||||||
query: param.query,
|
query: param.query,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布作品
|
* 发布视频
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
*/
|
*/
|
||||||
saveVideo(param) {
|
saveVideo(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/video/api/saveVideo`,
|
url: `/video/video/add`,
|
||||||
|
// url: `/video/api/saveVideo`,
|
||||||
data: param.data,
|
data: param.data,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
})
|
})
|
||||||
|
@ -57,7 +59,8 @@ const video = {
|
||||||
*/
|
*/
|
||||||
getLabel(param) {
|
getLabel(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/video/api/getTagsByPage`,
|
url: `/video/tag/list`,
|
||||||
|
// url: `/video/api/getTagsByPage`,
|
||||||
data: param.data,
|
data: param.data,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
load: true,
|
load: true,
|
||||||
|
@ -90,6 +93,7 @@ const video = {
|
||||||
load: true,
|
load: true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 展播量推送
|
* 展播量推送
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
|
@ -102,6 +106,7 @@ const video = {
|
||||||
load: true,
|
load: true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 他人用户主页
|
* 他人用户主页
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
|
|
|
@ -18,10 +18,8 @@
|
||||||
import util from '@/common/js/util.js'
|
import util from '@/common/js/util.js'
|
||||||
// 腾讯云聊天
|
// 腾讯云聊天
|
||||||
import TencentCloudChat from '@tencentcloud/chat';
|
import TencentCloudChat from '@tencentcloud/chat';
|
||||||
//
|
|
||||||
import api from '@/api/index.js'
|
|
||||||
// api
|
// api
|
||||||
import newsApi from '@/api/news.js'
|
import api from '@/api/index.js'
|
||||||
import pinyin from 'js-pinyin'
|
import pinyin from 'js-pinyin'
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
|
@ -214,48 +212,33 @@
|
||||||
function getFriendList() {
|
function getFriendList() {
|
||||||
// 验证sdk是否准备完毕
|
// 验证sdk是否准备完毕
|
||||||
let isReady = uni.$chat.isReady();
|
let isReady = uni.$chat.isReady();
|
||||||
console.log('isReady', isReady)
|
|
||||||
|
|
||||||
if (!isReady) {
|
if (!isReady) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
getFriendList()
|
getFriendList()
|
||||||
}, 1000);
|
}, 500);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
newsApi.getFriendList().then(rs => {
|
api.news.getFriendList().then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
viewData.value = rs.data;
|
|
||||||
// 这里可以将好友列表传递给book组件进行展示
|
|
||||||
console.log('好友列表:', viewData.value);
|
|
||||||
return
|
|
||||||
}
|
|
||||||
util.alert({
|
|
||||||
content: rs.msg,
|
|
||||||
showCancel: false,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
uni.$chat.getFriendList().then(rs => {
|
|
||||||
console.log('friend', rs)
|
|
||||||
if (rs.code == 0) {
|
|
||||||
const result = rs.data
|
const result = rs.data
|
||||||
|
|
||||||
//
|
//
|
||||||
userList.data.push(...result.map(item => {
|
userList.data.push(...result.rows.map(item => {
|
||||||
// 取拼音
|
// 取拼音
|
||||||
let char = pinyin.getCamelChars(item.remark || item.profile.nick);
|
let char = pinyin.getCamelChars(item.remark || item.userNickname);
|
||||||
return {
|
return {
|
||||||
key: char.charAt(0),
|
key: char.charAt(0),
|
||||||
letter: char.charAt(0),
|
letter: char.charAt(0),
|
||||||
child: [item]
|
child: [item]
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
console.log('userList.data', userList.data)
|
return
|
||||||
// console.log('friend list', list)
|
|
||||||
}
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,9 +294,7 @@
|
||||||
* @param {Object} user 用户信息
|
* @param {Object} user 用户信息
|
||||||
*/
|
*/
|
||||||
function handleSwipeAction(ev, user) {
|
function handleSwipeAction(ev, user) {
|
||||||
//
|
|
||||||
ev.content.fn(user)
|
ev.content.fn(user)
|
||||||
//
|
|
||||||
proxy.$refs.swipeAction.closeAll()
|
proxy.$refs.swipeAction.closeAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,18 +305,26 @@
|
||||||
function delFriend(user) {
|
function delFriend(user) {
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
util.alert({
|
util.alert({
|
||||||
content: `确认删除好友${user.profile.nick}?`
|
content: `确认删除好友${user.remark || user.userNickname}?`
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (!res.confirm) return
|
if (!res.confirm) return
|
||||||
return resolve()
|
return resolve()
|
||||||
})
|
})
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
uni.$chat.deleteFriend({
|
api.news.deleteFriend({
|
||||||
userIDList: [user.userID],
|
data: {
|
||||||
type: TencentCloudChat.TYPES.SNS_DELETE_TYPE_BOTH
|
toUserId: user.userId,
|
||||||
|
},
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
// 获取朋友列表
|
if (rs.code === 200) {
|
||||||
getFriendList()
|
// 获取朋友列表
|
||||||
|
getFriendList()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -380,18 +369,40 @@
|
||||||
* @param {Object} user 当前用户信息
|
* @param {Object} user 当前用户信息
|
||||||
*/
|
*/
|
||||||
function handleUser(user) {
|
function handleUser(user) {
|
||||||
console.log('handleUser', user)
|
|
||||||
util.toChat({
|
util.toChat({
|
||||||
name: user.remark || user.profile.nick,
|
name: user.remark || user.profile.nick,
|
||||||
msgId: user.userID,
|
msgId: user.userID,
|
||||||
type: 'C2C',
|
type: 'C2C',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转
|
||||||
|
* @param {Object} url
|
||||||
|
*/
|
||||||
|
function link(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url,
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="firendBox pr">
|
<view class="firendBox pr">
|
||||||
<scroll-view scroll-y="true" class="scroll" :scroll-into-view="listKey">
|
<scroll-view scroll-y="true" class="scroll" :scroll-into-view="listKey">
|
||||||
|
<!-- 菜单 -->
|
||||||
|
<view class="menu oh c333 f34">
|
||||||
|
<view class="rows ptb20 plr30 bfff" @click="link('/pages/news/newFriend')">
|
||||||
|
<view class="">好友申请</view>
|
||||||
|
<uni-icons type="right" color="#999" size="30rpx" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="rows ptb20 plr30 bfff" @click="link('/pages/news/chatGroup')">
|
||||||
|
<view class="">群聊列表</view>
|
||||||
|
<uni-icons type="right" color="#999" size="30rpx" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<uni-swipe-action ref="swipeAction">
|
<uni-swipe-action ref="swipeAction">
|
||||||
<view class="list pb30">
|
<view class="list pb30">
|
||||||
<view class="li" v-for="(item, index) in userList.data" :key="item.key" :id="item.key">
|
<view class="li" v-for="(item, index) in userList.data" :key="item.key" :id="item.key">
|
||||||
|
@ -400,8 +411,8 @@
|
||||||
<uni-swipe-action-item :right-options="rightOption" v-for="(user, secIndex) in item.child"
|
<uni-swipe-action-item :right-options="rightOption" v-for="(user, secIndex) in item.child"
|
||||||
:key="secIndex" @click="handleSwipeAction($event,user)">
|
:key="secIndex" @click="handleSwipeAction($event,user)">
|
||||||
<view class="item rows ptb20" @click="handleUser(user)">
|
<view class="item rows ptb20" @click="handleUser(user)">
|
||||||
<image class="wh80 avatar cir" :src="user.profile.avatar" mode="aspectFill" />
|
<image class="wh80 avatar cir" :src="user.avatar" mode="aspectFill" />
|
||||||
<view class="name thd f1 ml20 c333 f32">{{user.remark || user.profile.nick}}</view>
|
<view class="name thd f1 ml20 c333 f32">{{user.remark || user.userNickname}}</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-swipe-action-item>
|
</uni-swipe-action-item>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -625,12 +625,6 @@
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/mine/feedback",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "意见反馈"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/mine/setting/safeCenter",
|
"path": "pages/mine/setting/safeCenter",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -712,10 +706,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/mine/setting/secondPwd",
|
"path": "pages/mine/setting/secondPwd",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": "二级密码",
|
||||||
"navigationBarTitleText" : "二级密码",
|
"navigationBarBackgroundColor": "#fff"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/news/chatGroup",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "群聊列表",
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<script setup>
|
|
||||||
// 意见反馈
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<view class="app">
|
|
||||||
<!-- -->
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -226,7 +226,7 @@
|
||||||
|
|
||||||
<navigator url="/pages/mine/userinfo" class="user f1 ml20">
|
<navigator url="/pages/mine/userinfo" class="user f1 ml20">
|
||||||
<view class="f36 b">{{userinfo.userNickname}}</view>
|
<view class="f36 b">{{userinfo.userNickname}}</view>
|
||||||
<view class="f24">账号:{{userinfo.userAccount}}</view>
|
<view class="f24">账号:{{userinfo.account}}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
||||||
<view class="tac" v-if="userinfo.isShop == 1">
|
<view class="tac" v-if="userinfo.isShop == 1">
|
||||||
|
|
|
@ -72,6 +72,19 @@
|
||||||
count: 6,
|
count: 6,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除图片
|
||||||
|
* @param {Object} index
|
||||||
|
*/
|
||||||
|
function removeImage(index) {
|
||||||
|
util.alert({
|
||||||
|
content: '删除后不可恢复,确认删除吗?',
|
||||||
|
}).then(rs => {
|
||||||
|
if (!rs.confirm) return
|
||||||
|
form.url.splice(index, 1)
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -95,7 +108,8 @@
|
||||||
<view class="key f36">请输入您遇到的问题</view>
|
<view class="key f36">请输入您遇到的问题</view>
|
||||||
<view class="imgList mt30">
|
<view class="imgList mt30">
|
||||||
<view class="imgs wh180 br20" v-for="(item,index) in form.url" :key="index">
|
<view class="imgs wh180 br20" v-for="(item,index) in form.url" :key="index">
|
||||||
<image :src="item" mode="aspectFill" />
|
<image class="wh180 br20" :src="item" mode="aspectFill" />
|
||||||
|
<uni-icons type="clear" class="close" color="red" @click="removeImage(index)" />
|
||||||
</view>
|
</view>
|
||||||
<view class="imgs upload fmid wh180 br20" @click="uploadImg">
|
<view class="imgs upload fmid wh180 br20" @click="uploadImg">
|
||||||
<uni-icons type="plusempty" size="80rpx" color="#aaa" />
|
<uni-icons type="plusempty" size="80rpx" color="#aaa" />
|
||||||
|
|
|
@ -77,9 +77,10 @@
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
|
const result = rs.data
|
||||||
if (userList.pageNum) userList.data.length = 0
|
if (userList.pageNum) userList.data.length = 0
|
||||||
// 追加朋友列表
|
// 追加朋友列表
|
||||||
userList.data.push(...rs.rows.map(item => {
|
userList.data.push(...result.rows.map(item => {
|
||||||
item.format_userPortrait = util.format_url(item.userPortrait, 'img')
|
item.format_userPortrait = util.format_url(item.userPortrait, 'img')
|
||||||
return item
|
return item
|
||||||
}))
|
}))
|
||||||
|
@ -139,10 +140,10 @@
|
||||||
function addFriendConfirm() {
|
function addFriendConfirm() {
|
||||||
api.news.addFriend({
|
api.news.addFriend({
|
||||||
data: [{
|
data: [{
|
||||||
toAccount: friend.value.userId,
|
toAccount: friend.value.userId,
|
||||||
addWording: friend.value.AddWording,
|
addWording: friend.value.AddWording,
|
||||||
remark: friend.value.Remark,
|
remark: friend.value.Remark,
|
||||||
}],
|
}],
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
util.alert('已发送好友申请,请等待对方同意')
|
util.alert('已发送好友申请,请等待对方同意')
|
||||||
|
|
|
@ -0,0 +1,154 @@
|
||||||
|
<script setup>
|
||||||
|
// 群组列表
|
||||||
|
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
onMounted,
|
||||||
|
onUnmounted,
|
||||||
|
getCurrentInstance,
|
||||||
|
} from 'vue';
|
||||||
|
// 工具库
|
||||||
|
import util from '@/common/js/util.js'
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onUnload,
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
// 腾讯云聊天
|
||||||
|
import TencentCloudChat from '@tencentcloud/chat';
|
||||||
|
//
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
|
// 数据列表
|
||||||
|
const list = reactive([])
|
||||||
|
|
||||||
|
// 右滑菜单
|
||||||
|
const rightOption = [{
|
||||||
|
text: '退出群聊',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#F85050'
|
||||||
|
},
|
||||||
|
fn: (item) => quitGroup(item)
|
||||||
|
}]
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
//
|
||||||
|
getGroupList()
|
||||||
|
// 开启监听
|
||||||
|
addListener()
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnload(() => {
|
||||||
|
// 移除监听
|
||||||
|
removeListener()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 开启监听
|
||||||
|
function addListener() {
|
||||||
|
let onFriendListUpdated = function(event) {
|
||||||
|
getGroupList()
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.$chat.on(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED, onFriendListUpdated);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移除监听
|
||||||
|
function removeListener() {
|
||||||
|
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取群组列表
|
||||||
|
function getGroupList() {
|
||||||
|
// 验证sdk是否准备完毕
|
||||||
|
let isReady = uni.$chat.isReady();
|
||||||
|
|
||||||
|
if (!isReady) {
|
||||||
|
setTimeout(function() {
|
||||||
|
getGroupList()
|
||||||
|
}, 200);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.$chat.getGroupList().then(rs => {
|
||||||
|
if (rs.code == 0) {
|
||||||
|
list.length = 0
|
||||||
|
list.push(...rs.data.groupList)
|
||||||
|
console.log('group list', list)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取群组列表
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
function handleGroupItem(item) {
|
||||||
|
console.log('group item', item)
|
||||||
|
util.toChat({
|
||||||
|
name: `${item.name}(${item.memberCount})`,
|
||||||
|
msgId: item.groupID,
|
||||||
|
type: 'GROUP',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单
|
||||||
|
* @param {Object} ev 默认事件
|
||||||
|
* @param {Object} item 单项
|
||||||
|
*/
|
||||||
|
function handleMenu(ev, item) {
|
||||||
|
ev.content.fn(item)
|
||||||
|
proxy.$refs.swipeAction.closeAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退出群组
|
||||||
|
* @param {Object} item 详情
|
||||||
|
*/
|
||||||
|
function quitGroup(item) {
|
||||||
|
util.alert({
|
||||||
|
content: '确认退出群聊?'
|
||||||
|
}).then(rs => {
|
||||||
|
if (!rs.confirm) return
|
||||||
|
uni.$chat.quitGroup({
|
||||||
|
groupID: item.groupID,
|
||||||
|
}).then(rs => {
|
||||||
|
getGroupList()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="group app">
|
||||||
|
<uni-swipe-action ref="swipeAction">
|
||||||
|
<view class="list plr20 pb30">
|
||||||
|
<view class="li" v-for="(item, index) in list" :key="index">
|
||||||
|
<uni-swipe-action-item :right-options="rightOption" @click="handleMenu($event,item)">
|
||||||
|
<view class="item rows ptb20" @click="handleGroupItem(item)">
|
||||||
|
<image class="wh80 avatar br10" :src="item.avatar" mode="aspectFill" />
|
||||||
|
|
||||||
|
<view class="f1 mlr20">
|
||||||
|
<view class="name thd f1 c333 f32">{{item.name}}</view>
|
||||||
|
<!-- <view class="content thd mt10 c666 f24">{{item.lastMessage.messageForShow || ''}}</view> -->
|
||||||
|
</view>
|
||||||
|
<!-- <view class="time c999 f22" v-if="item.lastMessage.messageForShow || ''">{{util.formatTime('yyyy-MM-dd HH:mm:ss',item.lastMessage.lastTime)}}</view> -->
|
||||||
|
</view>
|
||||||
|
</uni-swipe-action-item>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mtb20 nomore">到底啦~</view>
|
||||||
|
</view>
|
||||||
|
</uni-swipe-action>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.group {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.scroll {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -163,10 +163,6 @@
|
||||||
<noLogin class="f1" />
|
<noLogin class="f1" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="" v-else-if="!imLoad">
|
|
||||||
加载中
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="page" v-else>
|
<view class="page" v-else>
|
||||||
<apex>
|
<apex>
|
||||||
<template #left>
|
<template #left>
|
||||||
|
|
|
@ -334,6 +334,7 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果不是草稿箱
|
||||||
if (data.status == 1) {
|
if (data.status == 1) {
|
||||||
if (!data.title) {
|
if (!data.title) {
|
||||||
util.alert('标题不能为空')
|
util.alert('标题不能为空')
|
||||||
|
@ -384,7 +385,7 @@
|
||||||
<view class="imgs wh200 br10" v-if="form.coverUrl">
|
<view class="imgs wh200 br10" v-if="form.coverUrl">
|
||||||
<image :src="form.coverUrl" class="br10" mode="aspectFill" />
|
<image :src="form.coverUrl" class="br10" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="imgs wh200 upload fmid bfff br10" v-else @click="uploadImg">
|
<view class="imgs wh200 upload fmid bfff br10" @click="uploadImg">
|
||||||
<uni-icons type="plusempty" color="#E8E8E8" size="50rpx" />
|
<uni-icons type="plusempty" color="#E8E8E8" size="50rpx" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -396,7 +397,7 @@
|
||||||
<view class="imgs wh200 br10" v-if="form.videoUrl">
|
<view class="imgs wh200 br10" v-if="form.videoUrl">
|
||||||
<video :src="form.videoUrl" class="br10" />
|
<video :src="form.videoUrl" class="br10" />
|
||||||
</view>
|
</view>
|
||||||
<view class="imgs wh200 upload fmid bfff br10" v-else @click="uploadVideo">
|
<view class="imgs wh200 upload fmid bfff br10" @click="uploadVideo">
|
||||||
<uni-icons type="plusempty" color="#E8E8E8" size="50rpx" />
|
<uni-icons type="plusempty" color="#E8E8E8" size="50rpx" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -14,18 +14,22 @@ export default defineConfig({
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
"/user": {
|
"/user": {
|
||||||
|
// target: "http://192.168.0.129:8080",
|
||||||
target: "http://192.168.0.133:8080",
|
target: "http://192.168.0.133:8080",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
"/coreplay": {
|
"/coreplay": {
|
||||||
|
// target: "http://192.168.0.129:8080",
|
||||||
target: "http://192.168.0.133:8080",
|
target: "http://192.168.0.133:8080",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
"/file": {
|
"/file": {
|
||||||
|
// target: "http://192.168.0.129:8080",
|
||||||
target: "http://192.168.0.133:8080",
|
target: "http://192.168.0.133:8080",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
"/video": {
|
"/video": {
|
||||||
|
// target: "http://192.168.0.129:8080",
|
||||||
target: "http://192.168.0.133:8080",
|
target: "http://192.168.0.133:8080",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue