1 Commits

Author SHA1 Message Date
cmxdd
9baac8ef63 update adout upload adout tencentCOS 2020-08-12 15:17:48 +08:00
16 changed files with 127 additions and 230 deletions

7
common/cos-wx-sdk-v5.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -80,7 +80,7 @@
<!-- 已发货 --> <!-- 已发货 -->
<view class="pushtimeline" v-if="type == 2"> <view class="pushtimeline" v-if="type == 2">
<view class="timelinetitle">物流信息</view> <view class="timelinetitle">物流信息</view>
<view class="timelineid">订单单号:{{ info.order_sn }}</view> <view class="timelineid">订单单号:&nbsp;&nbsp;&nbsp;{{ info.order_sn }}</view>
<view class="timelinebox" v-for="list in info.express_list"> <view class="timelinebox" v-for="list in info.express_list">
<view class="timelinecontent">{{list.content}}</view> <view class="timelinecontent">{{list.content}}</view>
<view class="timelinetime">{{list.kd_time}}</view> <view class="timelinetime">{{list.kd_time}}</view>
@@ -463,7 +463,6 @@ export default {
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
background-color: #ffffff; background-color: #ffffff;
border-bottom: 2rpx solid #ececec;
} }
.refunds-user { .refunds-user {
padding: 25rpx 30rpx; padding: 25rpx 30rpx;

View File

@@ -113,7 +113,10 @@
font-size: 26rpx; font-size: 26rpx;
color: #666666; color: #666666;
height: 30rpx; height: 30rpx;
line-height: 30rpx; height: 30rpx;
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //用省略号显示
white-space:nowrap; //不换行
} }
.times{ .times{
position: absolute; position: absolute;

View File

@@ -312,7 +312,7 @@
box-sizing: border-box; box-sizing: border-box;
} }
.chatInterface .top{ .chatInterface .top{
font-size: 20rpx; font-size: 24rpx;
height: 90rpx; height: 90rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -322,7 +322,7 @@
color: blue; color: blue;
} }
.chatInterface .top .description{ .chatInterface .top .description{
/* text-decoration: underline; */ text-decoration: underline;
} }
.chatInterface .message-item{ .chatInterface .message-item{

View File

@@ -80,13 +80,13 @@
</view> </view>
</view> </view>
<!-- 提交 --> <!-- 提交 -->
<u-button :hair-line="false" class="custom-style" shape="circle" size="default" @click="publish">发表</u-button> <u-button class="custom-style" shape="circle" size="default" @click="publish">发表</u-button>
</u-form> </u-form>
<!-- 添加标签的按钮 --> <!-- 添加标签的按钮 -->
<u-popup v-model="show" mode="center" border-radius="14"> <u-popup v-model="show" mode="center" border-radius="14">
<view class="text">创建属于你的标签吧</view> <view class="text">创建属于你的标签吧</view>
<view class="u-inputes"><u-input v-model="tagcontent" /></view> <view class="u-inputes"><u-input v-model="tagcontent" /></view>
<u-button :hair-line="false" class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button> <u-button class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
</u-popup> </u-popup>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
@@ -338,7 +338,7 @@ export default {
#release { #release {
width: 690rpx; width: 690rpx;
margin: 0 auto; margin: 0 auto;
padding-bottom:20rpx;
.form-view { .form-view {
background: #cdc7c8; background: #cdc7c8;
border-radius: 6rpx; border-radius: 6rpx;
@@ -460,28 +460,6 @@ export default {
color: #333; color: #333;
} }
} }
.u-btn {
width: 628rpx;
height: 98rpx;
background: rgba(255, 120, 15, 1) !important;
border-radius: 49rpx;
margin: 0 auto;
font-size: 36rpx;
color: rgba(255, 255, 255, 1) !important;
line-height: 36px;
border: 1px #ff780f solid;
outline: none;
border-color: rgba(255, 120, 15, 1) !important;
}
.custom-style-button {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 28rpx;
width: 200rpx;
margin-bottom: 23rpx;
line-height: 60rpx;
height: 60rpx;
}
.titles_border, .titles_border,
.uni-textarea-compute { .uni-textarea-compute {

View File

@@ -1,7 +1,7 @@
<template> <template>
<!-- tosign页面 --> <!-- tosign页面 -->
<view> <view>
<view class="tosign" style=""> <view class="tosign" style="padding-bottom:180rpx">
<image class="images" src="../../static/image/login/login(2).png"></image> <image class="images" src="../../static/image/login/login(2).png"></image>
<view class="backes"></view> <view class="backes"></view>
<!-- z自定义导航卡 --> <!-- z自定义导航卡 -->
@@ -147,7 +147,6 @@
live_id: res.data.live_id live_id: res.data.live_id
} }
}) })
this.tiaozhuan = true
}) })
}, },
init(){ init(){
@@ -509,11 +508,11 @@
} }
.button-uview { .button-uview {
// position: fixed; position: fixed;
// bottom: 40rpx; bottom: 40rpx;
// left: 0; left: 0;
// right: 0; right: 0;
margin: 20rpx auto; margin: auto;
// z-index: 10; z-index: 10;
} }
</style> </style>

View File

@@ -1,5 +1,5 @@
<template> <template>
<view id="release" > <view id="release">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<u-form-item label="标题" label-position="right"><u-input v-model="form.name" placeholder="请输入标题" /></u-form-item> <u-form-item label="标题" label-position="right"><u-input v-model="form.name" placeholder="请输入标题" /></u-form-item>
<view class="titles">封面</view> <view class="titles">封面</view>
@@ -25,7 +25,7 @@
<view> <view>
<view class="titles">标签</view> <view class="titles">标签</view>
<view class="form-view active" @click="show_add()">+ 新建标签</view> <view class="form-view active" @click="show_add()">+ 新建标签</view>
<view :class="['form-view',item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)"> <view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
{{ item.name }} {{ item.name }}
</view> </view>
</view> </view>
@@ -40,14 +40,7 @@
<view class="listes_shoping" v-for="(item, index) in list" :key="index"> <view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view> <view>
<u-checkbox-group> <u-checkbox-group>
<u-checkbox <u-checkbox shape="circle" size="40" active-color="#FF780F" v-model="item.checked" :name="index" @change="checkboxChange"></u-checkbox>
shape="circle"
size="40"
active-color="#FF780F"
v-model="item.checked"
:name="index"
@change="checkboxChange"
></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<view><image :src="item.goods_image" mode="widthFix"></image></view> <view><image :src="item.goods_image" mode="widthFix"></image></view>
@@ -71,19 +64,88 @@
</view> </view>
</view> </view>
<!-- 提交 --> <!-- 提交 -->
<u-button class="custom-style" shape="circle" size="default" :hair-line="false" @click="publish">发表</u-button> <u-button class="custom-style" shape="circle" size="default" @click="publish">发表</u-button>
</u-form> </u-form>
<!-- 添加标签的按钮 --> <!-- 添加标签的按钮 -->
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true"> <u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
<view class="text">创建属于你的标签吧</view> <view class="text">创建属于你的标签吧</view>
<view class="u-inputes"><u-input v-model="tagcontent" /></view> <view class="u-inputes"><u-input v-model="tagcontent" /></view>
<u-button :hair-line="false" class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button> <u-button class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
</u-popup> </u-popup>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
let COS = require('../../common/cos-wx-sdk-v5.js');
// 上传文件
const upload_file_server = (_this, filepath) => {
// 腾讯云配置
let cosConfig = {
Bucket: 'dmmall-1300406074', //replace with yours
Region: 'ap-shanghai', //replace with yours
SecretId: 'AKIDjDPJhni9gTzEB9iGNWQ3PTVGjv74q7EL', //replace with yours
SecretKey: 'ye3SZOvAQO5X5LK3Vy933h6G86h4mqpG' //replace with yours
};
// 获取本地文件
let filePath = filepath;
// 自定义文件名以及路径
let time = new Date();
var y = time.getFullYear();
var m = time.getMonth() + 1;
m = m < 10 ? '0' + m : m;
var d = time.getDate();
d = d < 10 ? '0' + d : d;
let str = y + m + d;
let Key = 'video/' + str + '/' + filePath.substr(filePath.lastIndexOf('/') + 1);
// 初始化凭证
var cos = new COS({
SecretId: cosConfig.SecretId,
SecretKey: cosConfig.SecretKey
});
//上传文件
cos.postObject(
{
Bucket: cosConfig.Bucket,
Region: cosConfig.Region,
Key: Key,
StorgeClass: 'STANDARD', //存储方式
FilePath: filePath
},
(err, data) => {
console.log(err, data, 12345);
if (err == null) {
if (data.statusCode == 200) {
_this.videopath = 'https://dmmall-1300406074.cos.ap-shanghai.myqcloud.com/' + Key;
uni.hideLoading();
_this.videostate = true;
} else {
uni.showToast({
title: '上传失败!',
icon: 'none'
});
}
} else {
return;
}
}
);
};
// 选择图片(通用)
const cImage = _this => {
uni.chooseVideo({
count: 1,
sourceType: ['camera', 'album'],
success: function(res) {
uni.showLoading({
title: '上传中'
});
const tempFilePaths = res.tempFilePath;
console.log(tempFilePaths);
upload_file_server(_this, tempFilePaths);
}
});
};
export default { export default {
data() { data() {
return { return {
@@ -114,7 +176,7 @@ export default {
tagcontent: '', //新建标签名字 tagcontent: '', //新建标签名字
selectvideo: '', //视频名字 selectvideo: '', //视频名字
videostate: false, //视频状态 videostate: false, //视频状态
progress:0 progress: 0
}; };
}, },
onLoad() { onLoad() {
@@ -158,11 +220,11 @@ export default {
title: res.message, title: res.message,
type: 'success' type: 'success'
}); });
setTimeout(function(){ setTimeout(function() {
uni.navigateBack({ uni.navigateBack({
delta:1 delta: 1
}) });
},1000) }, 1000);
} }
}); });
}, },
@@ -236,48 +298,7 @@ export default {
}, },
// 上传视频 // 上传视频
uploadvideo() { uploadvideo() {
let url = this.action; cImage(this);
let that = this;
uni.showLoading({
title:'上传中'+that.progress+'%'
})
uni.chooseVideo({
count: 1,
sourceType: ['camera', 'album'],
success: function(res) {
that.src = res.tempFilePath;
const tempFilePaths = res.tempFilePath;
const uploadTask = uni.uploadFile({
url: url, //仅为示例,非真实的接口地址
filePath: tempFilePaths,
name: 'article_video',
formData: {
name: 'article_video'
},
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: uploadFileRes => {
console.log(uploadFileRes);
let obj = JSON.parse(uploadFileRes.data);
that.videopath = obj.data.url;
that.selectvideo = obj.data.key;
uni.hideLoading()
that.videostate = true;
},
fail: function(error) {
console.log(error);
}
});
uploadTask.onProgressUpdate((res) => {
console.log("上传进度",res.progress)
that.progress = res.progress
// 测试条件,取消上传任务。
if (res.progress == 100) {
}
});
}
});
}, },
// 新建标签 // 新建标签
show_add() { show_add() {
@@ -291,13 +312,13 @@ export default {
// 选中某个复选框时由checkbox时触发 // 选中某个复选框时由checkbox时触发
checkboxChange(e) { checkboxChange(e) {
let that = this; let that = this;
let num =Number(e.name) let num = Number(e.name);
if (e.value == true) { if (e.value == true) {
that.pushes(that.list[num].goods_id); that.pushes(that.list[num].goods_id);
that.list[num].checked=true that.list[num].checked = true;
} else { } else {
that.delarr(that.list[num].goods_id); that.delarr(that.list[num].goods_id);
that.list[num].checked=false that.list[num].checked = false;
} }
}, },
// 删除直播商品 // 删除直播商品
@@ -330,7 +351,6 @@ export default {
#release { #release {
width: 690rpx; width: 690rpx;
margin: 0 auto; margin: 0 auto;
padding-bottom:20rpx;
.titles_border, .titles_border,
.uni-textarea-compute { .uni-textarea-compute {
border: 1px #bababa solid !important; border: 1px #bababa solid !important;
@@ -457,7 +477,7 @@ export default {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
} }
.form-view { .form-view {
background: #CDC7C8; background: #cdc7c8;
border-radius: 6rpx; border-radius: 6rpx;
margin-right: 20rpx; margin-right: 20rpx;
font-size: 24rpx; font-size: 24rpx;
@@ -467,7 +487,7 @@ export default {
color: #fff; color: #fff;
} }
.active { .active {
background: #FF780F; background: #ff780f;
} }
.titles { .titles {
font-size: 30rpx; font-size: 30rpx;
@@ -499,20 +519,7 @@ export default {
.custom-style { .custom-style {
background: rgba(255, 120, 15, 1) !important; background: rgba(255, 120, 15, 1) !important;
color: #fff !important; color: #fff !important;
// font-size: 36rpx;
}
.u-btn {
width: 628rpx;
height: 98rpx;
background: rgba(255, 120, 15, 1) !important;
border-radius: 49rpx;
margin: 0 auto;
font-size: 36rpx; font-size: 36rpx;
color: rgba(255, 255, 255, 1) !important;
line-height: 36px;
border: 1px #ff780f solid;
outline: none;
border-color: rgba(255, 120, 15, 1) !important;
} }
.custom-style-button { .custom-style-button {
background: rgba(255, 120, 15, 1) !important; background: rgba(255, 120, 15, 1) !important;

View File

@@ -10,7 +10,7 @@
<div class="head"> <div class="head">
<div style="flex-direction: row;align-items:center"> <div style="flex-direction: row;align-items:center">
<text class="title">全部商品</text> <text class="title">全部商品</text>
<text class="num">{{list.length}}件</text> <text class="num">2件</text>
</div> </div>
<!-- <div class="add"> <!-- <div class="add">
<text style="font-size:28rpx;color: #fff;text-align:center">添加/管理商品</text> <text style="font-size:28rpx;color: #fff;text-align:center">添加/管理商品</text>
@@ -35,21 +35,21 @@
</div> </div>
</div> </div>
<div v-if="zhibo" class="user"> <div class="user">
</div> </div>
<div v-if="zhibo" style="position: fixed;top: 60rpx;left: 30rpx;flex-direction: row;align-items:center"> <div style="position: fixed;top: 60rpx;left: 30rpx;flex-direction: row;align-items:center">
<image class="userhead" :src="info.member_avatar"></image> <image class="userhead" :src="info.member_avatar"></image>
<div class="userinfo"> <div class="userinfo">
<text class="username">{{info.member_name}}</text> <text class="username">{{info.member_name}}</text>
<text class="username" style="font-size:20rpx">{{time}} | sadasdas</text> <text class="username" style="font-size:20rpx">{{time}} | sadasdas</text>
</div> </div>
</div> </div>
<image v-if="zhibo" class="closeimg" src="../../static/image/close.png" @click="closes"></image> <image class="closeimg" src="../../static/image/close.png" @click="closes"></image>
<image v-if="zhibo" class="menuimg" src="../../static/image/menu.png" @click="tool = true"></image> <image class="menuimg" src="../../static/image/menu.png" @click="tool = true"></image>
<image v-if="zhibo" class="shoptapimg" @click="xianshi" src="../../static/image/shop.png"></image> <image class="shoptapimg" @click="xianshi" src="../../static/image/shop.png"></image>
<text v-if="zhibo" style="font-size:26rpx;color:#fff;width:512rpx;position:fixed;left:30rpx;top:793rpx">德铭阳光在线绿色直播请遵循相关法律法规警察叔叔24小时巡查哦。为了保障直播系统稳定现将全局开放防主播沉迷功能。主播积累直播16小时将自动下播休息2小时后方可继续开播。请大家注意休息/避免空播。 <text style="font-size:26rpx;color:#fff;width:512rpx;position:fixed;left:30rpx;top:793rpx">德铭阳光在线绿色直播请遵循相关法律法规警察叔叔24小时巡查哦。为了保障直播系统稳定现将全局开放防主播沉迷功能。主播积累直播16小时将自动下播休息2小时后方可继续开播。请大家注意休息/避免空播。
</text> </text>
<div v-if="zhibo" class="danmulist"> <div class="danmulist">
<text class="danmuitem" v-for="(i,j) in danmulist" :key="j">{{i.senderNickname}}:{{i.content}}</text> <text class="danmuitem" v-for="(i,j) in danmulist" :key="j">{{i.senderNickname}}:{{i.content}}</text>
</div> </div>
@@ -59,12 +59,12 @@
<text class="menutitle">直播工具</text> <text class="menutitle">直播工具</text>
<view class="menutool"> <view class="menutool">
<view class="menutoolitem" @click="switchCamera"> <view class="menutoolitem" @click="switchCamera">
<image src="../../static/images/fanzhuan.png" class="menutoolitemimg"></image> <image class="menutoolitemimg"></image>
<text class="menutoolitemtitle">翻转</text> <text class="menutoolitemtitle">翻转</text>
</view> </view>
<picker @change="bindPickerChange" :value="meiyan" :range="[1,2,3,4,5,6,7,8,9]"> <picker @change="bindPickerChange" :value="meiyan" :range="[1,2,3,4,5,6,7,8,9]">
<view class="menutoolitem"> <view class="menutoolitem">
<image src="../../static/images/meiyan.png" class="menutoolitemimg"></image> <image class="menutoolitemimg"></image>
<text class="menutoolitemtitle">美颜</text> <text class="menutoolitemtitle">美颜</text>
</view> </view>
</picker> </picker>
@@ -72,27 +72,6 @@
</view> </view>
</view> </view>
</div> </div>
<div class="jieshu" v-if="!zhibo" :style="{'height':height + 'px'}">
<div class="jieshuback" :style="{'height':height + 'px'}"></div>
<image class="closeimg" src="../../static/image/cloneb.png" @click="closes"></image>
<text class="jieshutitle">徳铭阳光在线</text>
<image class="jieshuheadimg" :src="info.member_avatar"></image>
<text class="jieshuusername">{{info.member_name}}</text>
<div class="jieshubox">
<view class="jieshuboxitem">
<text style="color:#fff;font-size:30rpx">{{jieshu.newfans}}</text>
<text style="color:#fff;font-size:30rpx;margin-top:10rpx">新粉丝</text>
</view>
<view class="jieshuboxitem">
<text style="color:#fff;font-size:30rpx">{{renshumax}}</text>
<text style="color:#fff;font-size:30rpx;margin-top:10rpx">热度</text>
</view>
<view class="jieshuboxitem">
<text style="color:#fff;font-size:30rpx">RMB {{jieshu.sales_amount}}</text>
<text style="color:#fff;font-size:30rpx;margin-top:10rpx">直播销量</text>
</view>
</div>
</div>
<!-- <button class="btn" @click="start">开始推流1</button> <!-- <button class="btn" @click="start">开始推流1</button>
<button class="btn" @click="pause">暂停推流</button> <button class="btn" @click="pause">暂停推流</button>
<button class="btn" @click="resume">resume</button> <button class="btn" @click="resume">resume</button>
@@ -105,57 +84,6 @@
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.jieshuboxitem{
width: 210rpx;
height: 120rpx;
align-items: center;
justify-content: center;
}
.jieshubox{
width: 438rpx;
height: 288rpx;
border-width: 1rpx;
border-color: #fff;
margin-top: 78rpx;
flex-direction: row;
flex-wrap: wrap;
}
.jieshuusername{
font-size: 30rpx;
margin-top: 31rpx;
color: #fff;
}
.jieshuheadimg{
width: 154rpx;
height: 154rpx;
border-radius: 77rpx;
}
.jieshutitle{
font-size: 30rpx;
color:#fff;
position: fixed;
top: 70rpx;
left: 31rpx;
height: 31rpx;
}
.jieshuback{
background-color: #000;
opacity: 0.8;
position: absolute;
left: 0;
top: 0;
width: 750rpx;
}
.jieshu{
position: fixed;
top: 0;
left: 0;
width: 750rpx;
align-items: center;
justify-content: center;
}
.shoptapimg{ .shoptapimg{
width: 65rpx; width: 65rpx;
height: 65rpx; height: 65rpx;
@@ -176,7 +104,6 @@
right: 31rpx; right: 31rpx;
width: 31rpx; width: 31rpx;
height: 31rpx; height: 31rpx;
z-index:99999;
} }
.username{ .username{
font-size: 24rpx; font-size: 24rpx;
@@ -363,10 +290,7 @@
time:'00:00:00', time:'00:00:00',
room:{}, room:{},
chatRoomService:{}, chatRoomService:{},
danmulist:[], danmulist:[]
zhibo:true,
jieshu:{},
renshumax:0
}, },
onLaunch: function() { onLaunch: function() {
console.log('App Launch'); console.log('App Launch');
@@ -469,7 +393,6 @@
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage); that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
//获取当前聊天室数据 //获取当前聊天室数据
that.room = that.chatRoomService.room; that.room = that.chatRoomService.room;
that.chatRoomService.whenOnlineUserChange = that.renqu
} }
}) })
let shi = 0; let shi = 0;
@@ -551,11 +474,6 @@
}, },
methods: { methods: {
renqu(res){
if(this.room.onlineUsers.users.length > this.renqu){
this.renqu = this.room.onlineUsers.users.length
}
},
whenNewMessage (message) {//新消息监听 whenNewMessage (message) {//新消息监听
// if(message.type == this.room.MessageType.PROP){ // if(message.type == this.room.MessageType.PROP){
// this.propAnimation(parseInt(message.content)) // this.propAnimation(parseInt(message.content))
@@ -578,12 +496,6 @@
}); });
}, },
closes(){ closes(){
if(!this.zhibo){
uni.switchTab({
url: '/pages/index/index'
});
return ;
}
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
let that = this let that = this
console.log(that.url) console.log(that.url)
@@ -605,12 +517,9 @@
}, },
success(res){ success(res){
console.log(res) console.log(res)
that.stop() uni.navigateBack({
that.jieshu = res.data.data delta: 1
that.zhibo = false });
// uni.navigateBack({
// delta: 1
// });
// that.list= res.data.data // that.list= res.data.data
} }
}) })
@@ -721,7 +630,6 @@
arr.push(this.list[i].goods_id) arr.push(this.list[i].goods_id)
} }
} }
console.log(arr.join(','))
let that = this let that = this
uni.request({ uni.request({
url:"https://dmmall.sdbairui.com/storeapi/Streaming/updateGoods", url:"https://dmmall.sdbairui.com/storeapi/Streaming/updateGoods",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 472 B

View File

@@ -299,8 +299,7 @@ IMService.prototype.initialIMListeners = function () {
friend.text = message.type != "text" ? "其他消息" : message.payload.text friend.text = message.type != "text" ? "其他消息" : message.payload.text
let time = new Date(message.timestamp) let time = new Date(message.timestamp)
friend.date = message.timestamp friend.date = message.timestamp
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds()) friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
console.log(that.friends) console.log(that.friends)
that.friendsarr = [] that.friendsarr = []
for(let i in that.friends){ for(let i in that.friends){
@@ -326,8 +325,7 @@ IMService.prototype.initialIMListeners = function () {
friend.text = message.type != "text" ? "其他消息" : message.payload.text friend.text = message.type != "text" ? "其他消息" : message.payload.text
let time = new Date(message.timestamp) let time = new Date(message.timestamp)
friend.date = message.timestamp friend.date = message.timestamp
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds()) friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
console.log(this.friends) console.log(this.friends)
that.friendsarr = [] that.friendsarr = []
for(let i in this.friends){ for(let i in this.friends){
@@ -426,8 +424,7 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
friend.text = message friend.text = message
let time = new Date() let time = new Date()
friend.date = time.getTime() friend.date = time.getTime()
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds()) friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
console.log(that.friends) console.log(that.friends)
that.friendsarr = [] that.friendsarr = []
for(let i in that.friends){ for(let i in that.friends){
@@ -451,8 +448,7 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
friend.text = message friend.text = message
let time = new Date() let time = new Date()
friend.date = time.getTime() friend.date = time.getTime()
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds()) friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
console.log(this.friends) console.log(this.friends)
that.friendsarr = [] that.friendsarr = []
for(let i in this.friends){ for(let i in this.friends){