人脸比对
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -45,9 +45,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef APP-PLUS
|
||||
const TUICalling = uni.requireNativePlugin("TUICallingUniPlugin-TUICallingModule");
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -223,7 +221,9 @@
|
||||
uni.setStorageSync('appId', data.appId);
|
||||
uni.setStorageSync('userId', data.userId);
|
||||
uni.setStorageSync('imUserSign', data.imUserSign);
|
||||
uni.setStorageSync('userSign', data.userSign);
|
||||
uni.setStorageSync('userCSign', data.userSign);
|
||||
|
||||
this.$socketTask.connectSocket()
|
||||
|
||||
uni.reLaunch({
|
||||
url: '../tabbar1/index'
|
||||
|
||||
@@ -21,39 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from "@/common/config.js"
|
||||
|
||||
|
||||
|
||||
const ListenerMap = {
|
||||
onSocketConnectEvent: (option, status, data) => {
|
||||
console.log("已建立连接:" + JSON.stringify(status));
|
||||
},
|
||||
onSocketErrorEvent: (error) => {
|
||||
console.log("连接出现错误:" + userId);
|
||||
},
|
||||
onSocketReConnectEvent: () => {
|
||||
console.log("正在重连:");
|
||||
},
|
||||
onSocketCloseEvent: () => {
|
||||
console.log("连接关闭:");
|
||||
},
|
||||
onSocketReConnectSuccessEvent: () => {
|
||||
console.log("重连成功");
|
||||
},
|
||||
onTestMessage: (e) => {
|
||||
console.log("onTestMessage :" + e);
|
||||
},
|
||||
onP2PMessage: (e) => {
|
||||
console.log("onP2PMessage :" + e);
|
||||
e = JSON.parse(e)
|
||||
uni.$emit('P2PMessage', e.data);
|
||||
},
|
||||
onLogin: (uid) => {
|
||||
console.log("用户" + uid + "登陆sdk成功");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
export default {
|
||||
@@ -191,43 +159,10 @@
|
||||
},
|
||||
mounted() {
|
||||
|
||||
console.log(this.imsdk)
|
||||
|
||||
|
||||
var listeners = {};
|
||||
for (const v in ListenerMap) {
|
||||
listeners[v] = ListenerMap[v];
|
||||
}
|
||||
this.$socketTask.connectSocket()
|
||||
|
||||
|
||||
const userId=uni.getStorageSync("userId")
|
||||
const imUserSign=uni.getStorageSync("imUserSign")
|
||||
|
||||
console.log(this.imsdk)
|
||||
|
||||
this.imsdk.lim.im.init(config.getImApiUrl(),config.getImAppId(),userId,imUserSign, listeners, function(
|
||||
sdk) {
|
||||
if (sdk) {
|
||||
console.log('sdk 成功连接的回调, 可以使用 sdk 请求数据了.');
|
||||
sdk.getAllFriend().then(res=>{
|
||||
console.warn(res)
|
||||
})
|
||||
sdk.getUserSequence().then(res=>{
|
||||
console.warn(res)
|
||||
})
|
||||
|
||||
sdk.getUserConversationList(0).then(res=>{
|
||||
console.warn(res)
|
||||
})
|
||||
|
||||
return uni.switchTab({
|
||||
url: "/pages/tabbar/index/index"
|
||||
})
|
||||
} else {
|
||||
console.log('sdk 初始化失败.');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
})
|
||||
*/
|
||||
uni.navigateTo({
|
||||
url: '../chatWindow/index?userId=' + e.item.data.userId + '&windowType=' + e.windowType
|
||||
url: '../chatWindow/index?userId=' + e.item.data.userId + '&windowType=' + "SINGLE"
|
||||
});
|
||||
},
|
||||
getflist(){
|
||||
|
||||
Reference in New Issue
Block a user