From a22b3fba7172e46386eb665dd38a5568af4fe4b1 Mon Sep 17 00:00:00 2001
From: luyuan <1162963624@qq.com>
Date: Tue, 11 Aug 2020 09:36:03 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=9B=BE=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/informations/notice/notice.vue | 4 ++--
pageB/follow/index.vue | 6 +++---
pages/information/information.vue | 2 +-
static/imservice.js | 13 +++++++++----
4 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/components/informations/notice/notice.vue b/components/informations/notice/notice.vue
index b212e45..712914a 100644
--- a/components/informations/notice/notice.vue
+++ b/components/informations/notice/notice.vue
@@ -1,11 +1,11 @@
-
+
{{ item.addtime }}
{{ item.content }}
-
+
查看详情
diff --git a/pageB/follow/index.vue b/pageB/follow/index.vue
index 32aa774..2147b98 100644
--- a/pageB/follow/index.vue
+++ b/pageB/follow/index.vue
@@ -4,8 +4,8 @@
输入达人名称
-
-
+
+
@@ -76,7 +76,7 @@ export default {
},
searchValue() {
uni.navigateTo({
- url: '/pageB/search/index?type=1'
+ url: '/pageB/search/index?type=2'
})
},
},
diff --git a/pages/information/information.vue b/pages/information/information.vue
index f44ad09..8a4444d 100644
--- a/pages/information/information.vue
+++ b/pages/information/information.vue
@@ -10,7 +10,7 @@
-
+
diff --git a/static/imservice.js b/static/imservice.js
index f2d1e6f..098524d 100644
--- a/static/imservice.js
+++ b/static/imservice.js
@@ -297,7 +297,8 @@ IMService.prototype.initialIMListeners = function () {
friend.text = message.type != "text" ? "其他消息" : message.payload.text
let time = new Date(message.timestamp)
friend.date = message.timestamp
- friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
+ 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())
+
console.log(that.friends)
that.friendsarr = []
for(let i in that.friends){
@@ -322,7 +323,7 @@ IMService.prototype.initialIMListeners = function () {
friend.text = message.type != "text" ? "其他消息" : message.payload.text
let time = new Date(message.timestamp)
friend.date = message.timestamp
- friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
+ 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())
console.log(this.friends)
that.friendsarr = []
for(let i in this.friends){
@@ -537,7 +538,9 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
friend.text = message
let time = new Date()
friend.date = time.getTime()
- friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
+ 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())
+
+
console.log(that.friends)
that.friendsarr = []
for(let i in that.friends){
@@ -561,7 +564,9 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
friend.text = message
let time = new Date()
friend.date = time.getTime()
- friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds()
+ 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())
+
+
console.log(this.friends)
that.friendsarr = []
for(let i in this.friends){
From 6984ea9374bd730a427457cdc2a2282a0491df26 Mon Sep 17 00:00:00 2001
From: luyuan <1162963624@qq.com>
Date: Tue, 11 Aug 2020 10:25:41 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=B6=88=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageC/merchant/index.vue | 39 ++++++++++++++++++++++++++-
pages/information/information.vue | 45 ++++++++++++++++++++++++++++++-
2 files changed, 82 insertions(+), 2 deletions(-)
diff --git a/pageC/merchant/index.vue b/pageC/merchant/index.vue
index 83921d5..ccfc7f9 100644
--- a/pageC/merchant/index.vue
+++ b/pageC/merchant/index.vue
@@ -64,7 +64,7 @@
店铺信息
-
+
联系客服
@@ -109,6 +109,43 @@ export default {
// if(e.index == 0) this.show = true;
},
methods: {
+ customers(){
+ console.log(this.$store.state.hasLogin)
+ if(!this.$store.state.hasLogin){
+ this.$refs.uToast.show({
+ title: "请先登录",
+ type: 'warning'
+ })
+ }else{
+ function Friend(uuid, name, avatar,time = "", text = "",date = "") {
+ this.uuid = uuid;
+ this.name = name;
+ this.avatar = avatar;
+ this.online = false;
+ this.unReadMessage = 0;
+ this.text = text;
+ this.time = time;
+ this.date = date
+ }
+ console.log(123)
+ this.$u.api.getAtwillUserInfo({
+ id:this.sid
+ }).then((res)=>{
+ console.log(res)
+ let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
+ this.$u.route({
+ url:"/pageD/privateChat/privateChat",
+ params:{
+ id:JSON.stringify(user)
+ }
+
+ })
+ }).catch((err)=>{
+ console.log(err)
+ })
+ }
+
+ },
toDetailsPage(id) {
// console.log(11);
this.$u.route('pageB/photo/index', {
diff --git a/pages/information/information.vue b/pages/information/information.vue
index 8a4444d..e75d614 100644
--- a/pages/information/information.vue
+++ b/pages/information/information.vue
@@ -3,7 +3,7 @@
-
+
@@ -105,6 +105,49 @@
},
methods: {
+ kefu(){
+ if(!this.$store.state.hasLogin){
+ this.$refs.uToast.show({
+ title: "请先登录",
+ type: 'warning'
+ })
+ }else{
+ function Friend(uuid, name, avatar,time = "", text = "",date = "") {
+ this.uuid = uuid;
+ this.name = name;
+ this.avatar = avatar;
+ this.online = false;
+ this.unReadMessage = 0;
+ this.text = text;
+ this.time = time;
+ this.date = date
+ }
+ const token = uni.getStorageSync('token');
+ let that = this
+ uni.request({
+ url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
+ data:{
+ userId: 1
+ },
+ method:"POST",
+ header:{
+ "Authorization" : 'Bearer' + " " + token
+ },
+ success(res){
+ console.log(res)
+ res = res.data
+ let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
+ that.$u.route({
+ url:"/pageD/privateChat/privateChat",
+ params:{
+ id:JSON.stringify(user)
+ }
+ })
+ }
+ })
+ }
+
+ },
gochat(id){
this.$u.route({
url:"/pageD/privateChat/privateChat",