mirror of
https://github.com/TencentCloud/TIMSDK.git
synced 2026-10-22 17:38:46 +08:00
8fed5ce8a9
Co-authored-by: mileszzhang <mileszzhang@tencent.com>
52 lines
1.4 KiB
JavaScript
52 lines
1.4 KiB
JavaScript
// miniprogram/pages/TUI-Index/TUI-create.js
|
|
import logger from '../../utils/logger';
|
|
// eslint-disable-next-line no-undef
|
|
const app = getApp();
|
|
// eslint-disable-next-line no-undef
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
sceneList: [
|
|
{ name: '在线客服', url: '../../TUI-CustomerService/pages/TUI-Conversation/conversation/conversation', iconUrl: '../../static/assets/online-service.svg' },
|
|
{ name: '实时通话', url: '../../TUI-Calling/pages/TUI-Calling/calling-index/index', iconUrl: '../../static/assets/calling.svg' },
|
|
{ name: '互动直播', url: '', iconUrl: '../../static/assets/interactive-live.svg' },
|
|
],
|
|
},
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad() {
|
|
},
|
|
onShow() {
|
|
logger.log(`| TUI-Index | onshow | login |userSig:${app.globalData.userInfo.userSig} userID:${app.globalData.userInfo.userID}`);
|
|
|
|
wx.$TUIKit.login({
|
|
userID: app.globalData.userInfo.userID,
|
|
userSig: app.globalData.userInfo.userSig,
|
|
}).then(() => {
|
|
})
|
|
.catch(() => {
|
|
});
|
|
},
|
|
handleOnPageNavigate(event) {
|
|
const tab = event.currentTarget.dataset.item;
|
|
if (!tab.url) {
|
|
wx.navigateToMiniProgram({
|
|
appId: 'wx3b91b7aaa809ecf9',
|
|
});
|
|
} else {
|
|
wx.navigateTo({
|
|
url: tab.url,
|
|
});
|
|
}
|
|
},
|
|
learnMore() {
|
|
wx.navigateTo({
|
|
url: '../TUI-User-Center/webview/webview?url=https://cloud.tencent.com/product/im',
|
|
});
|
|
},
|
|
});
|