From 05aa790d32fb5eaf61b6dfae0e1f8cd3dc922ce4 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Sat, 15 Aug 2020 15:42:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=A4=B4?= =?UTF-8?q?=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api/user.js | 4 ++++ pages/index/index.vue | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/common/api/user.js b/common/api/user.js index f45dc6f..72184b6 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -437,6 +437,10 @@ export default { friend_tomid:id }); }, + //获取默认头像 + getDefaultAvatar(){ + return vm.$u.post("member/getDefaultAvatar") + } } } diff --git a/pages/index/index.vue b/pages/index/index.vue index 598b997..c7d616c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -222,6 +222,7 @@ import zhiboItem from "@/components/index/zhibo-item/index" import indexad from "@/components/index/ad/index" import darenItem from "@/components/index/daren-item/index" +import chatVue from '../../pageD/chat/chat.vue' export default { name: "index", @@ -290,6 +291,11 @@ // console.log("lianjie") that.imService.connectIM() },2000) + }else{ + this.$u.api.getDefaultAvatar().then((res)=>{ + console.log(res) + uni.setStorageSync("morenimg",res.data.avatar) + }) } }, onPullDownRefresh() {