123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <view>
- <!-- <view class="container-box" v-if="!isSDKReady">正在初始化...</view> -->
- <view class="container">
- <image class="background-image" src="/static/static/assets/background.svg"></image>
- <view class="counter-warp">
- <view class="counter-main">
- <view class="header-content">
- <image src="/static/static/images/im.png" class="icon"></image>
- <view class="text">
- <view class="text-header">登录 · 即时通信</view>
- <view class="text-content">体验群组聊天,视频对话等IM功能</view>
- </view>
- </view>
- <view class="tui-scene-router">
- <view v-for="(item, index) in sceneList" :key="index" class="scene-item-card" :data-item="item" @tap="handleOnPageNavigate">
- <image class="tui-scene-icon" :src="item.iconUrl"></image>
- <view class="tui-scene-name">{{ item.name }}</view>
- <image class="tui-scene-link" src="/static/static/assets/detail.svg"></image>
- </view>
- </view>
- </view>
- <view class="foot" @tap="learnMore">了解更多 IM 功能</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- // miniprogram/pages/TUI-Index/TUI-create.js
- import logger from '../../utils/logger';
- const app = getApp();
- export default {
- data() {
- return {
- isSDKReady: false,
- sceneList: [
- {
- name: '在线客服',
- url: '../TUI-Conversation/conversation/conversation',
- iconUrl: '/static/static/assets/online-service.svg'
- }
- ]
- };
- },
- components: {},
- props: {},
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad() {},
- onShow() {
- logger.log(`| TUI-Index | onshow | login|userSig:${app.globalData.userInfo.userSig} userID:${app.globalData.userInfo.userID}`);
- },
- created() {
- uni.$on('isSDKReady', value => {
- this.isSDKReady = value.isSDKReady;
- });
- },
- methods: {
- handleOnPageNavigate(event) {
- const tab = event.currentTarget.dataset.item;
- console.log(tab.url)
- if (!tab.url) {
- uni.navigateToMiniProgram({
- appId: 'wx3b91b7aaa809ecf9'
- });
- } else {
- uni.navigateTo({
- url: tab.url
- });
- }
- },
- learnMore() {
- uni.navigateTo({
- url: '../TUI-User-Center/webview/webview?url=https://cloud.tencent.com/product/im'
- });
- }
- }
- };
- </script>
- <style>
- @import './index.css';
- </style>
|