好友资料,申请好友流程,调整
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
<view class="item" @click="onNav('imFriends', {})">
|
||||
<uni-icons color="#555" custom-prefix="iconfont" type="icon-tuandui" size="22"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @click="scanQrCode">
|
||||
<uni-icons color="#555" type="scan" size="22"></uni-icons>
|
||||
</view>
|
||||
<view class="item" @click="onNav('', {})">
|
||||
<uni-icons color="#555" custom-prefix="iconfont" type="icon-gengduo2" size="22"></uni-icons>
|
||||
</view>
|
||||
@@ -67,7 +70,7 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import * as RongIMLib from "@/uni_modules/RongCloud-IMWrapper/js_sdk/index"
|
||||
import im from '@/utils/im/index.js'
|
||||
import userAuth from '@/public/userAuth'
|
||||
@@ -153,7 +156,7 @@
|
||||
.pickedItem.isTop)
|
||||
} else {
|
||||
RongIMLib.removeConversation(this.pickedItem.conversationType, this.pickedItem.targetId)
|
||||
}
|
||||
}
|
||||
im.setNotifyBadge()
|
||||
this.getConversationList()
|
||||
this.hidePop()
|
||||
@@ -193,8 +196,7 @@
|
||||
getConversationList() {
|
||||
const count = 1000
|
||||
const timestamp = 0
|
||||
RongIMLib.getConversationList([RongIMLib.ConversationType.PRIVATE], count, timestamp, (res) => {
|
||||
console.log('getConversationList', res);
|
||||
RongIMLib.getConversationList([RongIMLib.ConversationType.PRIVATE], count, timestamp, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.conversations = res.conversations
|
||||
}
|
||||
@@ -223,6 +225,20 @@
|
||||
params
|
||||
})
|
||||
}
|
||||
},
|
||||
scanQrCode() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
// "result": "ADDFRIEND|10010",
|
||||
if (res.scanType == 'QR_CODE') {
|
||||
res.result.substr(0, 10) == 'ADDFRIEND|'
|
||||
// 跳转到添加好友页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/im/friends/info?targetId=' + res.result.substr(10)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user