feat: 电子药箱小程序 - 4Tab药品管理
- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡 - 药品百科: 搜索 + 分类筛选 + 20种药品静态数据 - 惠教中心: 4条药品使用指南课程 - 我的: 家庭成员信息管理 - 自定义TabBar + navigation-bar组件 - SVG药品分类插图
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"backgroundTextStyle": "light",
|
||||
"backgroundColor": "#ffffff",
|
||||
"navigationBarShareAppMessage": false,
|
||||
"navigationBarShareTimeline": false,
|
||||
"usingComponents": {
|
||||
"popup": "/components/popup/popup",
|
||||
"navigation-bar": "/components/navigation-bar/navigation-bar"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
@import "../../variables";
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
}
|
||||
.login {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
padding: 0 60rpx;
|
||||
|
||||
.login-header {
|
||||
align-self: flex-start;
|
||||
position: absolute;
|
||||
top: 100rpx;
|
||||
left: 30rpx;
|
||||
|
||||
.login-back {
|
||||
font-size: 38rpx;
|
||||
color: #333;
|
||||
padding: 16rpx 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 80rpx;
|
||||
|
||||
.login-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.login-desc {
|
||||
font-size: $defualt-font-size;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
background: linear-gradient(90deg, #005bea 0%, #00c6fb 99%);
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
border-radius: 48rpx;
|
||||
border: none;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
已登录页 — 用户信息展示
|
||||
============================================ */
|
||||
.body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
background: linear-gradient(180deg, #f8f9fe 0%, #eef0f7 100%);
|
||||
|
||||
.body-header {
|
||||
align-self: flex-start;
|
||||
z-index: 10;
|
||||
padding: 30rpx;
|
||||
background: linear-gradient(180deg, #f8f9fe 0%, rgba(248, 249, 254, 0) 100%);
|
||||
|
||||
.body-back {
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
padding: 16rpx 24rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.body-content{
|
||||
width: 100%;
|
||||
margin-top: 15vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 30rpx;
|
||||
padding: 40rpx 50rpx;
|
||||
border: none;
|
||||
border-radius: 32rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.06);
|
||||
width: calc(100% - 80rpx);
|
||||
max-width: 600rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.choose-avatar {
|
||||
flex-shrink: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
background: none;
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 50%;
|
||||
border: 3rpx solid $primary-color;
|
||||
box-shadow: 0 4rpx 12rpx rgba($primary-color, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.nickname {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #222;
|
||||
max-width: 280rpx;
|
||||
text-align: center;
|
||||
flex-shrink: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.refresh {
|
||||
flex-shrink: 0;
|
||||
padding: 12rpx 32rpx;
|
||||
font-size: $small-font-size;
|
||||
color: $primary-color;
|
||||
background: rgba($primary-color, 0.06);
|
||||
border: 1.5rpx solid $primary-color;
|
||||
border-radius: 28rpx;
|
||||
line-height: 1.5;
|
||||
transition: all 0.2s ease;
|
||||
&:active {
|
||||
background: rgba($primary-color, 0.12);
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.msg {
|
||||
font-size: $defualt-font-size;
|
||||
color: #888;
|
||||
text-align: center;
|
||||
padding: 24rpx 60rpx;
|
||||
margin: 0 60rpx 40rpx;
|
||||
white-space: pre-wrap;
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
border-radius: 20rpx;
|
||||
line-height: 1.6;
|
||||
width: calc(100% - 120rpx);
|
||||
max-width: 600rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
弹窗 — 设置头像和昵称
|
||||
============================================ */
|
||||
.login-container {
|
||||
.popup-title {
|
||||
display: block;
|
||||
font-size: 35rpx;
|
||||
font-weight: 600;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 40rpx;
|
||||
|
||||
// 左右布局:左头像 + 右按钮组
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 36rpx;
|
||||
margin-bottom: 50rpx;
|
||||
|
||||
// 左侧:头像选择器
|
||||
.avatar-picker {
|
||||
flex-shrink: 0;
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.popup-avatar {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
border: 3rpx solid $primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
// 右侧:按钮组(上下排列)
|
||||
.btn-group {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
|
||||
.form-btn {
|
||||
width: 100%;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(90deg, #005bea 0%, #00c6fb 99%);
|
||||
border-radius: 36rpx;
|
||||
border: none;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 昵称输入:外观伪装成按钮,click 唤起微信昵称弹层
|
||||
.form-input--nickname {
|
||||
width: 100%;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
font-size: 26rpx;
|
||||
color: $primary-color;
|
||||
background: transparent;
|
||||
border: 2rpx solid $primary-color;
|
||||
border-radius: 36rpx;
|
||||
text-align: center;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提交按钮
|
||||
.form-submit {
|
||||
width: 100%;
|
||||
|
||||
.submit-btn {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
background: linear-gradient(90deg, #005bea 0%, #00c6fb 99%);
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
border-radius: 48rpx;
|
||||
border: none;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
import { request } from "../../utils/request";
|
||||
import { LoginRes } from "../../components/login/login.d";
|
||||
import { appId, BASE_URL } from "../../env";
|
||||
import { wxLogin, wxRequest } from "../../utils/wx-api";
|
||||
|
||||
// package-live/login/login.ts
|
||||
const app = getApp<IAppOption>();
|
||||
const defaultAvatarUrl =
|
||||
'https://oss.rsjk.org.cn/ruo-shan/image/425663f8-55eb-4aa9-b3dc-dcae6a963b71.png'
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
showPopup: false,
|
||||
avatarUrl: defaultAvatarUrl,
|
||||
nickname: '',
|
||||
userId: null,
|
||||
activityId: null,
|
||||
show: null,
|
||||
msg: ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options: any) {
|
||||
if (options) {
|
||||
this.setData({
|
||||
userId: options.userId,
|
||||
activityId: options.activityId,
|
||||
show: options.show,
|
||||
msg: options.msg
|
||||
})
|
||||
if (options.show) {
|
||||
this.setData({
|
||||
avatarUrl: wx.getStorageSync('avatarUrl') || defaultAvatarUrl,
|
||||
nickname: wx.getStorageSync('userName') || '',
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
goBack() {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length > 1) {
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
return;
|
||||
}
|
||||
wx.switchTab({
|
||||
url: "/pages/tab-bar/medicine-box/index",
|
||||
});
|
||||
},
|
||||
async handOpen() {
|
||||
try {
|
||||
wx.showLoading({ title: "登录中" });
|
||||
const loginRes = await wxLogin();
|
||||
if (!loginRes.code) throw new Error(loginRes.errMsg);
|
||||
|
||||
let loginResult: LoginRes;
|
||||
|
||||
const reqData: Record<string, any> = {
|
||||
state: loginRes.code,
|
||||
};
|
||||
|
||||
loginResult = await wxRequest<LoginRes>({
|
||||
url: `${BASE_URL}/api/auth/app-auth?appId=${appId}&code=${loginRes.code}`,
|
||||
method: "POST",
|
||||
data: reqData,
|
||||
});
|
||||
|
||||
if (loginResult?.statusCode !== 200) {
|
||||
throw new Error(loginResult?.data?.msg || "登录失败");
|
||||
}
|
||||
|
||||
// 判断方式 1:仅判断是否存在(当前逻辑)
|
||||
if (loginResult.data.avatarUrl !== defaultAvatarUrl) {
|
||||
const storageData = {
|
||||
openId: loginResult.data.openId,
|
||||
userId: loginResult.data.mpUserId,
|
||||
mbuId: loginResult.data.id,
|
||||
unionId: loginResult.data.unionId,
|
||||
userName: loginResult.data.nickName,
|
||||
avatarUrl: loginResult.data.avatarUrl,
|
||||
};
|
||||
Object.entries(storageData).forEach(([key, value]) => {
|
||||
wx.setStorageSync(key, value);
|
||||
});
|
||||
|
||||
app.globalData.isLogin = true;
|
||||
|
||||
wx.showToast({
|
||||
title: "登录成功",
|
||||
duration: 2000,
|
||||
});
|
||||
// 跳转到直播页面
|
||||
const { userId, activityId } = this.data;
|
||||
wx.redirectTo({
|
||||
url: `/package-live/wxroom/index?userId=${userId}&activityId=${activityId}`
|
||||
})
|
||||
} else {
|
||||
wx.hideToast()
|
||||
this.setData({
|
||||
showPopup: true
|
||||
})
|
||||
}
|
||||
|
||||
} catch (err: any) {
|
||||
app.globalData.isLogin = false;
|
||||
wx.showToast({
|
||||
title: `登录失败:${err.message || err.errMsg}`,
|
||||
icon: "none",
|
||||
});
|
||||
} finally {
|
||||
setTimeout(() => wx.hideToast(), 3000);
|
||||
}
|
||||
|
||||
},
|
||||
closePopup() {
|
||||
this.setData({
|
||||
showPopup: false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取头像
|
||||
onChooseAvatar(e: any) {
|
||||
const { avatarUrl } = e.detail;
|
||||
this.setData({
|
||||
avatarUrl
|
||||
});
|
||||
},
|
||||
|
||||
// 获取昵称(微信系统填入后失焦触发 bindblur)
|
||||
onNicknameInput(e: any) {
|
||||
const { value } = e.detail;
|
||||
this.setData({
|
||||
nickname: value
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 提交登录
|
||||
async submitLogin() {
|
||||
const { avatarUrl, nickname } = this.data;
|
||||
if (!avatarUrl) {
|
||||
wx.showToast({
|
||||
title: '请选择头像',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!nickname) {
|
||||
wx.showToast({
|
||||
title: '请选择昵称',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
try {
|
||||
wx.showLoading({ title: "登录中" });
|
||||
const loginRes = await wxLogin();
|
||||
if (!loginRes.code) throw new Error(loginRes.errMsg);
|
||||
|
||||
let loginResult: LoginRes;
|
||||
|
||||
const reqData: Record<string, any> = {
|
||||
state: loginRes.code,
|
||||
avatarUrl,
|
||||
nickName: nickname
|
||||
};
|
||||
|
||||
loginResult = await wxRequest<LoginRes>({
|
||||
url: `${BASE_URL}/api/auth/app-auth?appId=${appId}&code=${loginRes.code}`,
|
||||
method: "POST",
|
||||
data: reqData,
|
||||
});
|
||||
|
||||
if (loginResult?.statusCode !== 200) {
|
||||
throw new Error(loginResult?.data?.msg || "登录失败");
|
||||
}
|
||||
|
||||
const storageData = {
|
||||
openId: loginResult.data.openId,
|
||||
userId: loginResult.data.mpUserId,
|
||||
mbuId: loginResult.data.id,
|
||||
unionId: loginResult.data.unionId,
|
||||
userName: loginResult.data.nickName,
|
||||
avatarUrl: loginResult.data.avatarUrl,
|
||||
};
|
||||
|
||||
Object.entries(storageData).forEach(([key, value]) => {
|
||||
wx.setStorageSync(key, value);
|
||||
});
|
||||
|
||||
app.globalData.isLogin = true;
|
||||
|
||||
wx.showToast({
|
||||
title: "登录成功",
|
||||
duration: 2000,
|
||||
});
|
||||
// 跳转到直播页面
|
||||
const { userId, activityId } = this.data;
|
||||
wx.redirectTo({
|
||||
url: `/package-live/wxroom/index?userId=${userId}&activityId=${activityId}`
|
||||
})
|
||||
|
||||
} catch (err: any) {
|
||||
app.globalData.isLogin = false;
|
||||
wx.showToast({
|
||||
title: `登录失败:${err.message || err.errMsg}`,
|
||||
icon: "none",
|
||||
});
|
||||
} finally {
|
||||
setTimeout(() => wx.hideToast(), 3000);
|
||||
}
|
||||
|
||||
// 关闭弹窗
|
||||
this.closePopup();
|
||||
},
|
||||
async refresh() {
|
||||
const { userId, activityId } = this.data;
|
||||
const params = userId ? { mpUserId: wx.getStorageSync("userId"), userId } : { mpUserId: wx.getStorageSync("userId") };
|
||||
const dataRes = await request<any>({
|
||||
options: {
|
||||
url: "/app/saas/refresh",
|
||||
method: "GET",
|
||||
data: params
|
||||
},
|
||||
isLoading: false,
|
||||
});
|
||||
if (dataRes.pass) {
|
||||
wx.redirectTo({
|
||||
url: `/package-live/wxroom/index?userId=${userId}&activityId=${activityId}`
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,64 @@
|
||||
<!--package-live/login/login.wxml-->
|
||||
<!--pages/live/registration/registration.wxml-->
|
||||
<navigation-bar title="会员认证" back="{{false}}" color="black" background="#FFF" wx:if="{{(show)}}" />
|
||||
|
||||
<!-- 未登录:微信授权 -->
|
||||
<view class="login" wx:if="{{!show}}">
|
||||
<view class="login-header">
|
||||
<text class="login-back" bind:tap="goBack">← 返回</text>
|
||||
</view>
|
||||
<view class="login-logo">
|
||||
<text class="login-title">欢迎来到直播间</text>
|
||||
<text class="login-desc">授权登录后可观看会员专属内容</text>
|
||||
</view>
|
||||
<button class="login-btn" bind:tap="handOpen">微信授权登录</button>
|
||||
</view>
|
||||
|
||||
<!-- 已登录:显示用户信息 -->
|
||||
<view class="body" wx:else>
|
||||
<view class="body-header">
|
||||
<text class="body-back" bind:tap="goBack">← 返回</text>
|
||||
</view>
|
||||
<view class="body-content">
|
||||
<view class="userinfo" >
|
||||
<button class="choose-avatar">
|
||||
<image class="avatar" src="{{avatarUrl}}" />
|
||||
</button>
|
||||
<view class="nickname">{{nickname}}</view>
|
||||
<view class="refresh" bind:tap="refresh">刷新</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="white-space:pre-wrap">{{msg}}</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 弹窗:设置头像和昵称 -->
|
||||
<view class="login-container">
|
||||
<popup visible="{{showPopup}}" bind:close="closePopup">
|
||||
<text class="popup-title">手动设置头像和昵称</text>
|
||||
<view class="popup-content">
|
||||
<!-- 左右布局:左侧头像 | 右侧按钮组 -->
|
||||
<view class="form-row">
|
||||
<!-- 左侧:头像 -->
|
||||
<button class="avatar-picker" open-type="chooseAvatar" bindchooseavatar="onChooseAvatar">
|
||||
<image src="{{avatarUrl}}" class="popup-avatar"></image>
|
||||
</button>
|
||||
<!-- 右侧:两个按钮 -->
|
||||
<view class="btn-group">
|
||||
<button class="form-btn" open-type="chooseAvatar" bindchooseavatar="onChooseAvatar">点击获取头像</button>
|
||||
<input
|
||||
type="nickname"
|
||||
class="form-input--nickname"
|
||||
placeholder="点击获取昵称"
|
||||
bindblur="onNicknameInput"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提交 -->
|
||||
<view class="form-submit">
|
||||
<button class="submit-btn" bind:tap="submitLogin">确定授权</button>
|
||||
</view>
|
||||
</view>
|
||||
</popup>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744786271399" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M832 192H192c-35.2 0-64 28.8-64 64v512c0 35.2 28.8 64 64 64h640c35.2 0 64-28.8 64-64V256c0-35.2-28.8-64-64-64z" fill="#F56C6C"/><path d="M192 192h640L512 448 192 192z" fill="#F78989"/><path d="M512 512m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z" fill="#FFD700"/></svg>
|
||||
|
After Width: | Height: | Size: 545 B |
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"navigation-bar": "/components/navigation-bar/navigation-bar",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-tab": "@vant/weapp/tab/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
.page-wrap {
|
||||
box-sizing: border-box;
|
||||
background: #f5f5f5;
|
||||
height: calc(100vh - 162rpx);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* ===== 汇总卡片 ===== */
|
||||
.summary-section {
|
||||
padding: 24rpx 24rpx 0;
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.total-card {
|
||||
background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
|
||||
margin-bottom: 16rpx;
|
||||
padding: 28rpx 20rpx;
|
||||
}
|
||||
|
||||
.total-card .card-label {
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.total-amount {
|
||||
color: #fff !important;
|
||||
font-size: 48rpx !important;
|
||||
}
|
||||
|
||||
.summary-row {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.sub-card {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
|
||||
padding: 24rpx 10rpx;
|
||||
}
|
||||
|
||||
.card-label {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.card-amount {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.card-amount.received {
|
||||
color: #52c41a;
|
||||
}
|
||||
|
||||
.card-amount.pending {
|
||||
color: #fa8c16;
|
||||
}
|
||||
|
||||
.card-amount.expired {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.tabs-wrap {
|
||||
margin: 16rpx;
|
||||
}
|
||||
|
||||
/* ===== 红包列表 ===== */
|
||||
.red-history {
|
||||
flex: 1;
|
||||
background: #f5f5f5;
|
||||
margin-top: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list-scroll {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.record {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx 30rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #eee;
|
||||
margin: 0 24rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.record:first-child {
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.red-icon {
|
||||
width: 70rpx;
|
||||
height: 140rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.amount {
|
||||
font-size: 32rpx;
|
||||
color: #ff4d4f;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.receive-btn {
|
||||
margin-top: 12rpx;
|
||||
padding: 8rpx 28rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
background: #ff4d4f;
|
||||
border-radius: 24rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.no-more {
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.loading-tip {
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.no-data {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 0.9;
|
||||
font-size: 32rpx;
|
||||
color: #999;
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
import { request } from "../../utils/request";
|
||||
import { appId } from "../../env";
|
||||
import { receiveRedPacket } from "../../utils/util";
|
||||
|
||||
const app = getApp<IAppOption>();
|
||||
const formatDate = (isoString: string): string => {
|
||||
const date = new Date(isoString);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
const hours = String(date.getHours()).padStart(2, "0");
|
||||
const minutes = String(date.getMinutes()).padStart(2, "0");
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}`;
|
||||
};
|
||||
|
||||
const RED_STATE_MAP: Record<number, string> = {
|
||||
10: "未发送",
|
||||
11: "等待领取",
|
||||
20: "正在发送",
|
||||
21: "等待确认",
|
||||
30: "发送失败",
|
||||
31: "个数不够",
|
||||
32: "账户余额不足",
|
||||
33: "客户未实名",
|
||||
34: "其它原因",
|
||||
40: "已领取",
|
||||
50: "已过期",
|
||||
};
|
||||
|
||||
const getStateText = (state: number) => {
|
||||
return RED_STATE_MAP[state] || "发放中";
|
||||
};
|
||||
|
||||
const FAILED_STATES = [30, 31, 32, 33, 34];
|
||||
|
||||
const canReceive = (state: number) => {
|
||||
return state === 11 || state === 21 || FAILED_STATES.includes(state);
|
||||
};
|
||||
|
||||
const isRetry = (state: number) => {
|
||||
return FAILED_STATES.includes(state);
|
||||
};
|
||||
|
||||
Page({
|
||||
data: {
|
||||
list: [] as any[],
|
||||
loading: false,
|
||||
hasMore: true,
|
||||
current: 1,
|
||||
pageSize: 15,
|
||||
activeTab: 0,
|
||||
tabs: [
|
||||
{ label: '待领取', value: 0, type: 1 },
|
||||
{ label: '已领取', value: 1, type: 2 },
|
||||
{ label: '已过期', value: 2, type: 3 },
|
||||
],
|
||||
summary: {
|
||||
totalAmount: '0.00',
|
||||
receivedAmount: '0.00',
|
||||
pendingAmount: '0.00',
|
||||
expiredAmount: '0.00',
|
||||
},
|
||||
store: {},
|
||||
safeBottom: app.globalData.safeBottom,
|
||||
safeTop: app.globalData.safeTop,
|
||||
},
|
||||
|
||||
async onLoad() {
|
||||
await this.fetchRecords(1, false, this.data.tabs[0].type);
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
if (this.data.loading || !this.data.hasMore) return;
|
||||
const nextPage = this.data.current + 1;
|
||||
this.fetchRecords(nextPage, true, this.data.tabs[this.data.activeTab].type);
|
||||
},
|
||||
|
||||
onTabChange(e: any) {
|
||||
const index = e.detail.index;
|
||||
const tab = this.data.tabs[index];
|
||||
this.setData({ activeTab: index });
|
||||
this.fetchRecords(1, false, tab.type);
|
||||
},
|
||||
|
||||
async handleReceive(e: any) {
|
||||
const { id, outrewardsid } = e.currentTarget.dataset;
|
||||
const params: Record<string, any> = {
|
||||
appId: appId,
|
||||
openId: wx.getStorageSync("openId"),
|
||||
};
|
||||
if (outrewardsid) params.outRewardsId = outrewardsid;
|
||||
if (id) params.redId = id;
|
||||
try {
|
||||
await receiveRedPacket(
|
||||
params,
|
||||
'/app/general/receive-red',
|
||||
appId
|
||||
);
|
||||
// 领取成功,刷新当前列表
|
||||
this.fetchRecords(1, false, this.data.tabs[this.data.activeTab].type);
|
||||
} catch (err) {
|
||||
console.error('领取红包失败:', err);
|
||||
}
|
||||
},
|
||||
|
||||
async fetchRecords(page: number, append = false, type: number) {
|
||||
const app = getApp<IAppOption>();
|
||||
const openId = wx.getStorageSync("openId");
|
||||
|
||||
this.setData({
|
||||
store: app.globalData.store,
|
||||
});
|
||||
if (!openId) {
|
||||
wx.showToast({ title: "请先登录", icon: "none" });
|
||||
return;
|
||||
}
|
||||
|
||||
if (append) {
|
||||
this.setData({ loading: true });
|
||||
} else {
|
||||
wx.showLoading({ title: "加载中" });
|
||||
}
|
||||
|
||||
try {
|
||||
const params: Record<string, any> = {};
|
||||
params.openId = openId;
|
||||
params.appId = appId;
|
||||
params.current = page;
|
||||
params.pageSize = 15;
|
||||
params.type = type;
|
||||
|
||||
const res = await request({
|
||||
options: {
|
||||
url: "/app/saas/query-red",
|
||||
data: params,
|
||||
},
|
||||
isLoading: !append,
|
||||
// needLogin: false,
|
||||
});
|
||||
|
||||
const records = res.data?.records || res.records || [];
|
||||
const items = records.map((item: any) => ({
|
||||
...item,
|
||||
date: formatDate(item.createdTime),
|
||||
stateText: getStateText(item.state),
|
||||
amountText: `${(item.amount / 100).toFixed(2)}`,
|
||||
canReceive: canReceive(item.state),
|
||||
isRetry: isRetry(item.state),
|
||||
}));
|
||||
|
||||
this.setData({
|
||||
list: append ? [...this.data.list, ...items] : items,
|
||||
current: page,
|
||||
hasMore: records.length >= this.data.pageSize,
|
||||
});
|
||||
|
||||
// 汇总数据在 res.data 根层级,单位是分,转为元
|
||||
const d = res.data;
|
||||
if (d && d.totalAmount !== undefined) {
|
||||
this.setData({
|
||||
summary: {
|
||||
totalAmount: (d.totalAmount / 100).toFixed(2),
|
||||
receivedAmount: (d.receivedAmount / 100).toFixed(2),
|
||||
pendingAmount: (d.pendingAmount / 100).toFixed(2),
|
||||
expiredAmount: (d.expiredAmount / 100).toFixed(2),
|
||||
},
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("加载红包记录失败:", err);
|
||||
} finally {
|
||||
if (append) {
|
||||
this.setData({ loading: false });
|
||||
} else {
|
||||
wx.hideLoading();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,57 @@
|
||||
<navigation-bar title="红包记录" back="{{true}}" color="black" background="#FFF" />
|
||||
|
||||
<view class="page-wrap">
|
||||
<view class="summary-section">
|
||||
<view class="summary-card total-card">
|
||||
<text class="card-label">总领取金额</text>
|
||||
<text class="card-amount total-amount">¥{{summary.totalAmount}}</text>
|
||||
</view>
|
||||
<view class="summary-row">
|
||||
<view class="summary-card sub-card">
|
||||
<text class="card-label">待领取金额</text>
|
||||
<text class="card-amount pending">¥{{summary.pendingAmount}}</text>
|
||||
</view>
|
||||
<view class="summary-card sub-card">
|
||||
<text class="card-label">已领取金额</text>
|
||||
<text class="card-amount received">¥{{summary.receivedAmount}}</text>
|
||||
</view>
|
||||
<view class="summary-card sub-card">
|
||||
<text class="card-label">已过期金额</text>
|
||||
<text class="card-amount expired">¥{{summary.expiredAmount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tabs-wrap">
|
||||
<van-tabs active="{{activeTab}}" bind:change="onTabChange" animated>
|
||||
<van-tab wx:for="{{tabs}}" wx:key="value" title="{{item.label}}" />
|
||||
</van-tabs>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{list.length}}" class="red-history">
|
||||
<scroll-view
|
||||
class="list-scroll"
|
||||
scroll-y
|
||||
bindscrolltolower="onReachBottom"
|
||||
lower-threshold="200"
|
||||
>
|
||||
<view class="record" wx:for="{{list}}" wx:key="id">
|
||||
<image class="red-icon" src="./assets/red.svg" mode="aspectFill"/>
|
||||
<view class="content">
|
||||
<text class="name">{{item.description}}</text>
|
||||
<text class="time">{{item.date}}</text>
|
||||
</view>
|
||||
<view class="right">
|
||||
<text class="amount">¥{{item.amountText}}</text>
|
||||
<view wx:if="{{item.canReceive}}" class="receive-btn" data-id="{{item.id}}" data-outRewardsId="{{item.outRewardsId}}" bind:tap="handleReceive">{{item.isRetry ? '重试' : '领取'}}</view>
|
||||
<text wx:else class="state-text">{{item.stateText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{!hasMore}}" class="no-more">没有更多数据了</view>
|
||||
<view wx:if="{{loading}}" class="loading-tip">加载中...</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view wx:else class="no-data">暂无记录</view>
|
||||
</view>
|
||||
|
After Width: | Height: | Size: 5.2 KiB |
@@ -0,0 +1,8 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="#3370ff" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_1029_34541)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.2647 2.83337L10.9553 1.50004C10.7959 1.40799 10.592 1.46261 10.5 1.62204L10.1667 2.19939C10.0746 2.35883 10.1292 2.56269 10.2887 2.65474L12.5981 3.98807C12.7575 4.08012 12.9614 4.02549 13.0534 3.86606L13.3867 3.28871C13.4788 3.12928 13.4242 2.92542 13.2647 2.83337ZM4.93139 1.83337C5.09082 1.74132 5.29469 1.79595 5.38673 1.95538L5.72007 2.53273C5.81212 2.69216 5.75749 2.89602 5.59806 2.98807L3.28866 4.3214C3.12923 4.41345 2.92536 4.35883 2.83332 4.19939L2.49998 3.62204C2.40794 3.46261 2.46256 3.25875 2.62199 3.1667L4.93139 1.83337ZM8.11003 3.41072C11.2396 3.41072 13.7767 5.94777 13.7767 9.07739C13.7767 12.207 11.2396 14.7441 8.11003 14.7441C4.98041 14.7441 2.44336 12.207 2.44336 9.07739C2.44336 5.94777 4.98041 3.41072 8.11003 3.41072ZM8.11003 4.74405C5.71679 4.74405 3.77669 6.68415 3.77669 9.07739C3.77669 11.4706 5.71679 13.4107 8.11003 13.4107C10.5033 13.4107 12.4434 11.4706 12.4434 9.07739C12.4434 6.68415 10.5033 4.74405 8.11003 4.74405ZM8.77445 6.37185C8.7552 6.20607 8.6143 6.07739 8.44336 6.07739H7.77669L7.73782 6.07963C7.57204 6.09888 7.44336 6.23977 7.44336 6.41072V9.35913L9.28165 11.5936L9.31022 11.6242C9.43053 11.7381 9.61961 11.7472 9.75084 11.6392L10.2657 11.2157L10.2963 11.1871C10.4102 11.0668 10.4193 10.8777 10.3113 10.7465L8.77669 8.88115V6.41072L8.77445 6.37185Z"></path>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1029_34541"><rect width="16" height="16" fill="white"></rect></clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,8 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="#ee4d38" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_1029_34541)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.2647 2.83337L10.9553 1.50004C10.7959 1.40799 10.592 1.46261 10.5 1.62204L10.1667 2.19939C10.0746 2.35883 10.1292 2.56269 10.2887 2.65474L12.5981 3.98807C12.7575 4.08012 12.9614 4.02549 13.0534 3.86606L13.3867 3.28871C13.4788 3.12928 13.4242 2.92542 13.2647 2.83337ZM4.93139 1.83337C5.09082 1.74132 5.29469 1.79595 5.38673 1.95538L5.72007 2.53273C5.81212 2.69216 5.75749 2.89602 5.59806 2.98807L3.28866 4.3214C3.12923 4.41345 2.92536 4.35883 2.83332 4.19939L2.49998 3.62204C2.40794 3.46261 2.46256 3.25875 2.62199 3.1667L4.93139 1.83337ZM8.11003 3.41072C11.2396 3.41072 13.7767 5.94777 13.7767 9.07739C13.7767 12.207 11.2396 14.7441 8.11003 14.7441C4.98041 14.7441 2.44336 12.207 2.44336 9.07739C2.44336 5.94777 4.98041 3.41072 8.11003 3.41072ZM8.11003 4.74405C5.71679 4.74405 3.77669 6.68415 3.77669 9.07739C3.77669 11.4706 5.71679 13.4107 8.11003 13.4107C10.5033 13.4107 12.4434 11.4706 12.4434 9.07739C12.4434 6.68415 10.5033 4.74405 8.11003 4.74405ZM8.77445 6.37185C8.7552 6.20607 8.6143 6.07739 8.44336 6.07739H7.77669L7.73782 6.07963C7.57204 6.09888 7.44336 6.23977 7.44336 6.41072V9.35913L9.28165 11.5936L9.31022 11.6242C9.43053 11.7381 9.61961 11.7472 9.75084 11.6392L10.2657 11.2157L10.2963 11.1871C10.4102 11.0668 10.4193 10.8777 10.3113 10.7465L8.77669 8.88115V6.41072L8.77445 6.37185Z"></path>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1029_34541"><rect width="16" height="16" fill="white"></rect></clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1666776746823" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16798" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M183.168 481.834667a42.666667 42.666667 0 0 1 60.330667 0L512 750.336l268.501333-268.501333a42.666667 42.666667 0 0 1 60.330667 60.330666l-298.666667 298.666667a42.666667 42.666667 0 0 1-60.330666 0l-298.666667-298.666667a42.666667 42.666667 0 0 1 0-60.330666z" fill="#181038" p-id="16799"></path><path d="M183.168 183.168a42.666667 42.666667 0 0 1 60.330667 0L512 451.669333l268.501333-268.501333a42.666667 42.666667 0 1 1 60.330667 60.330667l-298.666667 298.666666a42.666667 42.666667 0 0 1-60.330666 0l-298.666667-298.666666a42.666667 42.666667 0 0 1 0-60.330667z" fill="#181038" p-id="16800"></path></svg>
|
||||
|
After Width: | Height: | Size: 943 B |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
@@ -0,0 +1,86 @@
|
||||
<svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6 9C6 7.89543 6.89543 7 8 7H37C38.1046 7 39 7.89543 39 9V38C39 39.1046 38.1046 40 37 40H8C6.89543 40 6 39.1046 6 38V9Z" fill="url(#paint0_linear_442_6105)"/>
|
||||
<circle cx="15.5" cy="10" r="2" fill="#E57B59"/>
|
||||
<circle cx="29.5" cy="10" r="2" fill="#E57B59"/>
|
||||
<path opacity="0.5" d="M15 7H17V11H15V7Z" fill="#E57259"/>
|
||||
<path opacity="0.5" d="M29 7H31V11H29V7Z" fill="#E57259"/>
|
||||
<g filter="url(#filter0_ii_442_6105)">
|
||||
<rect x="14.5" y="5" width="2" height="6" rx="1" fill="#FAF6F2"/>
|
||||
</g>
|
||||
<g filter="url(#filter1_ii_442_6105)">
|
||||
<rect x="28.5" y="5" width="2" height="6" rx="1" fill="#FAF6F2"/>
|
||||
</g>
|
||||
<g filter="url(#filter2_dii_442_6105)">
|
||||
<rect x="9" y="15" width="27" height="21" rx="1" fill="#FAF6F2"/>
|
||||
</g>
|
||||
<rect x="19.5" y="27" width="6" height="6" rx="1" fill="#FFC5A4"/>
|
||||
<rect x="27.5" y="27" width="6" height="6" rx="1" fill="#FFC5A4"/>
|
||||
<rect x="11.5" y="27" width="6" height="6" rx="1" fill="#FFC5A4"/>
|
||||
<rect x="19.5" y="19" width="6" height="6" rx="1" fill="url(#paint1_linear_442_6105)"/>
|
||||
<rect x="27.5" y="19" width="6" height="6" rx="1" fill="#FFC5A4"/>
|
||||
<rect x="11.5" y="19" width="6" height="6" rx="1" fill="url(#paint2_linear_442_6105)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.3536 20.6464C16.5488 20.8417 16.5488 21.1583 16.3536 21.3536L14.3536 23.3536C14.1583 23.5488 13.8417 23.5488 13.6464 23.3536L12.6464 22.3536C12.4512 22.1583 12.4512 21.8417 12.6464 21.6464C12.8417 21.4512 13.1583 21.4512 13.3536 21.6464L14 22.2929L15.6464 20.6464C15.8417 20.4512 16.1583 20.4512 16.3536 20.6464Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.3536 20.6464C24.5488 20.8417 24.5488 21.1583 24.3536 21.3536L22.3536 23.3536C22.1583 23.5488 21.8417 23.5488 21.6464 23.3536L20.6464 22.3536C20.4512 22.1583 20.4512 21.8417 20.6464 21.6464C20.8417 21.4512 21.1583 21.4512 21.3536 21.6464L22 22.2929L23.6464 20.6464C23.8417 20.4512 24.1583 20.4512 24.3536 20.6464Z" fill="white"/>
|
||||
<defs>
|
||||
<filter id="filter0_ii_442_6105" x="14.5" y="5" width="2" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-1" dy="-1"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.94 0 0 0 0 0.922955 0 0 0 0 0.90992 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_442_6105"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1" dy="1"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect1_innerShadow_442_6105" result="effect2_innerShadow_442_6105"/>
|
||||
</filter>
|
||||
<filter id="filter1_ii_442_6105" x="28.5" y="5" width="2" height="6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-1" dy="-1"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.94 0 0 0 0 0.922955 0 0 0 0 0.90992 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_442_6105"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1" dy="1"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect1_innerShadow_442_6105" result="effect2_innerShadow_442_6105"/>
|
||||
</filter>
|
||||
<filter id="filter2_dii_442_6105" x="7.5" y="13.5" width="31" height="25" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="0.5" dy="0.5"/>
|
||||
<feGaussianBlur stdDeviation="1"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.845833 0 0 0 0 0.386264 0 0 0 0 0.271372 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_442_6105"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_442_6105" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-1" dy="-1"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.94 0 0 0 0 0.922955 0 0 0 0 0.90992 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect2_innerShadow_442_6105"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1" dy="1"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect2_innerShadow_442_6105" result="effect3_innerShadow_442_6105"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_442_6105" x1="6.55" y1="7" x2="44.7339" y2="38.2806" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFA563"/>
|
||||
<stop offset="1" stop-color="#FF9263"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_442_6105" x1="19.6" y1="19" x2="26.5425" y2="24.6874" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFA563"/>
|
||||
<stop offset="1" stop-color="#FF8D63"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_442_6105" x1="11.6" y1="19" x2="18.5425" y2="24.6874" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFA563"/>
|
||||
<stop offset="1" stop-color="#FF8D63"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg width="44" height="44" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.5" y="4.398" width="33" height="35.2" rx="4" fill="#FF7455"/><path d="M21.25 23.123v7.126H16a.75.75 0 01-.75-.75v-6.375h6zm7.5 0V29.5a.75.75 0 01-.75.75h-5.25v-7.126h6zm-13.5-1.125h-.75a.75.75 0 01-.75-.75v-3a.75.75 0 01.694-.747l.056-.002h1.578c-.246-1.438.081-2.701 1.075-3.275 1.489-.86 3.57.35 4.898 2.492 1.328-2.142 3.409-3.351 4.898-2.492.993.574 1.32 1.837 1.074 3.275H29.5a.75.75 0 01.75.75v3a.75.75 0 01-.75.75h-6.75v-4.5h3.744c.223-.97.1-1.747-.295-1.976-.587-.338-1.914.443-2.868 1.975h-2.56c-.933-1.497-2.221-2.277-2.827-1.996l-.041.021c-.382.22-.51.95-.318 1.872l.023.104h3.642v4.5h-6z" fill="#fff"/></svg>
|
||||
|
After Width: | Height: | Size: 706 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="34" height="36" viewBox="0 0 34 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" y="0.398438" width="33" height="35.2" rx="4" fill="#5592FF"/>
|
||||
<path d="M10.2259 23.4358C10.3233 23.4264 10.3705 23.3678 10.3611 23.2728C10.3453 23.1463 10.3014 23.0324 10.2877 22.9029C10.2102 22.1924 10.934 20.6021 11.2451 19.9365C12.6362 16.9263 12.6383 16.9555 12.6048 16.6473C12.5859 16.4874 12.3084 15.9389 12.0255 15.9671C11.7239 15.9984 10.5747 16.8385 10.2416 17.0788C9.99548 17.2543 9.79122 17.3745 9.80379 17.6827C9.80065 17.7475 9.79751 17.9293 9.91692 17.9168C9.96092 17.9105 10.1568 17.806 10.1977 17.7778L11.1854 17.2878L11.2106 17.3066C10.5998 18.2876 10.0421 19.3004 9.53982 20.3409C9.29995 20.8487 8.9637 22.0753 9.02027 22.6072C9.07997 23.1589 9.55449 23.1829 9.99234 23.3616C10.0637 23.4034 10.1435 23.4287 10.2259 23.4358ZM19.6031 17.1624C19.556 16.7371 19.4428 16.2137 18.939 16.1144C19.0081 16.0308 19.2658 16.0036 19.2532 15.8866C19.2281 15.6526 18.6405 15.2001 18.1963 15.2461C17.4914 15.3193 15.9243 16.3244 15.0842 17.455C14.3792 18.4089 13.7434 19.808 13.8754 21.0054C13.977 21.9082 14.6652 22.8109 15.6561 22.6323C18.2466 22.1788 19.8262 19.2009 19.6031 17.1624ZM17.6862 19.879L16.7298 20.9469C16.5067 21.1966 15.8552 21.6741 15.5315 21.7076C15.2288 21.7389 15.1156 21.1287 15.1062 20.926C15.0496 19.8258 15.742 18.2271 17.5731 16.9492C17.5793 17.014 17.615 17.1373 17.7019 17.1279C17.8098 17.1154 18.0476 16.6943 18.3314 16.6629C18.6342 16.6316 18.7882 17.0234 18.8133 17.2449C18.8887 17.9471 18.1052 19.3085 17.6862 19.878V19.879ZM25.7268 16.5146C25.6796 16.0904 25.5665 15.5669 25.0626 15.4676C25.1318 15.384 25.3895 15.3569 25.3769 15.2398C25.3518 15.0058 24.7641 14.5534 24.32 14.5993C23.615 14.6725 22.048 15.6776 21.2079 16.8082C20.5029 17.7621 19.8671 19.1612 19.9991 20.3586C20.1007 21.2614 20.7889 22.1642 21.7798 21.9855C24.3734 21.532 25.953 18.5542 25.7268 16.5156V16.5146ZM23.8098 19.2312L22.8535 20.3001C22.6304 20.5498 21.9788 21.0273 21.6551 21.0608C21.3524 21.0921 21.2393 20.4819 21.2299 20.2792C21.1733 19.179 21.8657 17.5803 23.6967 16.3025C23.703 16.3672 23.7407 16.4905 23.8256 16.4811C23.9334 16.4686 24.1712 16.0475 24.4551 16.0162C24.7578 15.9848 24.9118 16.3767 24.9369 16.5982C25.0124 17.3003 24.232 18.6586 23.8098 19.2312ZM22.0197 23.0763C22.4481 23.0074 23.2379 22.9091 23.2379 22.9091C15.0339 23.3992 9.2591 25.8076 9.35966 25.7616C9.35966 25.7616 9.03598 25.9675 9.35966 26.1117C9.52411 26.1858 10.4742 25.7606 10.4742 25.7606C16.9907 23.4974 24.5054 22.9081 24.5054 22.9081C23.615 22.9426 22.0197 23.0753 22.0197 23.0753V23.0763ZM24.5054 23.5465C15.4938 24.0825 10.6282 26.399 10.6282 26.399C10.6282 26.399 10.3034 26.6048 10.6282 26.7501C10.7916 26.8232 11.7427 26.399 11.7427 26.399C18.4949 24.0512 18.5231 24.1128 25.7739 23.5465C24.8835 23.581 23.2913 23.7137 23.2913 23.7137C23.7156 23.6479 24.5064 23.5465 24.5064 23.5465H24.5054ZM9.01398 11.4616H20.8727C21.0116 11.4616 21.1448 11.4066 21.243 11.3086C21.3412 11.2106 21.3964 11.0777 21.3964 10.9392C21.3964 10.8006 21.3412 10.6677 21.243 10.5698C21.1448 10.4718 21.0116 10.4167 20.8727 10.4167H9.01398C8.87508 10.4167 8.74186 10.4718 8.64364 10.5698C8.54541 10.6677 8.49023 10.8006 8.49023 10.9392C8.49023 11.0777 8.54541 11.2106 8.64364 11.3086C8.74186 11.4066 8.87508 11.4616 9.01398 11.4616ZM9.01398 13.5513H14.9428C15.0817 13.5513 15.2149 13.4963 15.3131 13.3983C15.4114 13.3003 15.4665 13.1675 15.4665 13.0289C15.4665 12.8904 15.4114 12.7575 15.3131 12.6595C15.2149 12.5615 15.0817 12.5065 14.9428 12.5065H9.01398C8.87508 12.5065 8.74186 12.5615 8.64364 12.6595C8.54541 12.7575 8.49023 12.8904 8.49023 13.0289C8.49023 13.1675 8.54541 13.3003 8.64364 13.3983C8.74186 13.4963 8.87508 13.5513 9.01398 13.5513Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,7 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M14.0455 3.09961C14.5726 3.09961 15 3.56971 15 4.14961V5.77334C15 5.92151 14.9073 6.05161 14.7777 6.1235C14.1546 6.46924 13.7273 7.17953 13.7273 7.99961C13.7273 8.81969 14.1546 9.52998 14.7777 9.87572C14.9073 9.94761 15 10.0777 15 10.2259L15 11.8496C15 12.4295 14.5726 12.8996 14.0455 12.8996L1.95455 12.8996C1.42736 12.8996 1 12.4295 1 11.8496L1 10.2259C1 10.0777 1.09274 9.94761 1.22229 9.87572C1.84538 9.52998 2.27273 8.81969 2.27273 7.99961C2.27273 7.17953 1.84538 6.46924 1.22229 6.1235C1.09274 6.05161 1 5.92151 1 5.77334L1 4.14961C1 3.56971 1.42736 3.09961 1.95455 3.09961L14.0455 3.09961Z"
|
||||
stroke="#161823" stroke-linejoin="round" />
|
||||
<path d="M5.8999 6.59961H10.0999" stroke="#161823" stroke-linecap="round" />
|
||||
<path d="M5.8999 9.39941H10.0999" stroke="#161823" stroke-linecap="round" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 921 B |
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||
<g clip-path="url(#clip0_1344_84658)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.5417 11.6671C12.7028 11.6671 12.8334 11.7976 12.8334 11.9587V12.5421C12.8334 12.7031 12.7028 12.8337 12.5417 12.8337H1.45835C1.29727 12.8337 1.16669 12.7031 1.16669 12.5421V11.9587C1.16669 11.7976 1.29727 11.6671 1.45835 11.6671H12.5417ZM8.42068 1.13385L8.45886 1.16901L10.4621 3.18283C10.6889 3.41081 10.6884 3.77932 10.4611 4.0067L10.2454 4.22203L10.2493 4.22599L3.97487 10.5004H1.75002C1.4425 10.5004 1.19056 10.2624 1.16829 9.96059L1.16669 9.91705V7.69221L7.22694 1.58478L7.22143 1.57932L7.63282 1.16792C7.84864 0.952109 8.19149 0.94075 8.42068 1.13385ZM6.34756 4.11061L2.35232 8.18425L2.35231 8.18592L3.48106 9.31467L3.48283 9.31475L7.5151 5.27815L6.34756 4.11061ZM8.03165 2.39357L7.16481 3.27761L8.33994 4.45274L9.21173 3.58007L8.03165 2.39357Z" fill="#737A87"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1344_84658">
|
||||
<rect width="14" height="14" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||
<g clip-path="url(#clip0_1344_84658)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.5417 11.6671C12.7028 11.6671 12.8334 11.7976 12.8334 11.9587V12.5421C12.8334 12.7031 12.7028 12.8337 12.5417 12.8337H1.45835C1.29727 12.8337 1.16669 12.7031 1.16669 12.5421V11.9587C1.16669 11.7976 1.29727 11.6671 1.45835 11.6671H12.5417ZM8.42068 1.13385L8.45886 1.16901L10.4621 3.18283C10.6889 3.41081 10.6884 3.77932 10.4611 4.0067L10.2454 4.22203L10.2493 4.22599L3.97487 10.5004H1.75002C1.4425 10.5004 1.19056 10.2624 1.16829 9.96059L1.16669 9.91705V7.69221L7.22694 1.58478L7.22143 1.57932L7.63282 1.16792C7.84864 0.952109 8.19149 0.94075 8.42068 1.13385ZM6.34756 4.11061L2.35232 8.18425L2.35231 8.18592L3.48106 9.31467L3.48283 9.31475L7.5151 5.27815L6.34756 4.11061ZM8.03165 2.39357L7.16481 3.27761L8.33994 4.45274L9.21173 3.58007L8.03165 2.39357Z" fill="#C7CCD6"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1344_84658">
|
||||
<rect width="14" height="14" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,28 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0_2074_25435" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="2" y="0" width="8" height="11">
|
||||
<path d="M2.09961 0H9.89961V6.97452C9.89961 9.08727 8.18689 10.8 6.07413 10.8C3.87906 10.8 2.09961 9.02055 2.09961 6.82548V0Z" fill="#C4C4C4"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_2074_25435)">
|
||||
<path d="M8.78533 3.90091C9.59975 4.80088 9.89961 5.70088 9.89961 6.60091C9.89961 7.80091 9.84261 8.12269 9.89961 8.10091C8.32573 8.7257 5.56077 7.3132 4.79975 5.40088C4.03873 3.48856 5.12112 1.80089 6.79263 0.900906C6.85916 0.86594 6.89961 0.924317 6.89961 1.01325C6.89973 2.40088 7.9709 3.00095 8.78533 3.90091Z" fill="url(#paint0_linear_2074_25435)"/>
|
||||
<path d="M9.76139 8.40432C9.92317 8.10942 10.2332 9.29922 9.89961 7.36562C10.1996 5.69922 8.93256 5.04042 8.0996 5.39922C6.70677 5.99917 5.9996 5.99922 5.0996 5.69922C4.51559 5.50455 3.71221 5.09922 3.46159 4.19922C3.18308 5.39922 4.02104 7.64302 5.28885 8.40432C6.55667 9.16562 9.59961 8.69922 9.76139 8.40432Z" fill="url(#paint1_linear_2074_25435)"/>
|
||||
<path d="M3.17961 3.71735C2.97511 3.92181 2.09961 4.977 2.09961 6.66263C2.09961 8.34827 2.99961 10.7997 5.99961 10.7997C8.99961 10.7997 10.1765 9.60845 10.4996 8.04255C7.79961 9.54259 5.70903 8.04255 5.39961 7.74259C4.63775 7.00403 3.59961 5.69968 3.41961 3.84262C3.39488 3.58748 3.3841 3.51289 3.17961 3.71735Z" fill="url(#paint2_linear_2074_25435)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_2074_25435" x1="4.67103" y1="1.12801" x2="8.39685" y2="6.60276" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.0214737" stop-color="#FADF32"/>
|
||||
<stop offset="0.450575" stop-color="#EB9B46"/>
|
||||
<stop offset="0.782146" stop-color="#EB5854"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_2074_25435" x1="3.89188" y1="4.94623" x2="10.653" y2="8.95083" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFC533"/>
|
||||
<stop offset="0.435892" stop-color="#F26461"/>
|
||||
<stop offset="0.8092" stop-color="#FF0544"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_2074_25435" x1="8.61793" y1="10.3141" x2="2.16498" y2="5.10289" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.1335" stop-color="#FA0951"/>
|
||||
<stop offset="0.3545" stop-color="#FA3E65"/>
|
||||
<stop offset="0.8813" stop-color="#F2AE49"/>
|
||||
<stop offset="0.9983" stop-color="#FAC032"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="31" height="31" viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M15.5 30.5C23.7843 30.5 30.5 23.7843 30.5 15.5C30.5 7.21573 23.7843 0.5 15.5 0.5C7.21573 0.5 0.5 7.21573 0.5 15.5C0.5 23.7843 7.21573 30.5 15.5 30.5Z" fill="black" stroke="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9648 10.5507C11.5743 10.1602 10.9412 10.1602 10.5506 10.5507C10.1601 10.9412 10.1601 11.5744 10.5506 11.9649L14.0857 15.5L10.5497 19.036C10.1592 19.4265 10.1592 20.0597 10.5497 20.4502C10.9403 20.8407 11.5734 20.8407 11.9639 20.4502L15.4999 16.9142L19.0359 20.4502C19.4264 20.8407 20.0596 20.8407 20.4501 20.4502C20.8407 20.0597 20.8407 19.4265 20.4501 19.036L16.9141 15.5L20.4492 11.9649C20.8397 11.5744 20.8397 10.9412 20.4492 10.5507C20.0587 10.1602 19.4255 10.1602 19.035 10.5507L15.4999 14.0858L11.9648 10.5507Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 933 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="7.4375" y="5.25" width="4.375" height="17.5" rx="0.875" fill="white"/>
|
||||
<rect x="16.1875" y="5.25" width="4.375" height="17.5" rx="0.875" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 264 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M19.7692 11.6188C21.5385 12.7132 21.5385 15.2867 19.7692 16.3812L8.65436 23.2568C6.789 24.4107 4.38134 23.069 4.38134 20.8756L4.38134 7.12454C4.38134 4.93113 6.78897 3.58941 8.65434 4.7433L19.7692 11.6188Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 334 B |
@@ -0,0 +1,26 @@
|
||||
<svg
|
||||
width="80"
|
||||
height="44"
|
||||
viewBox="0 0 80 44"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M75.0811 3.35699L77.6711 0L79.2509 3.94682L75.0811 3.35699Z"
|
||||
fill="rgba(29, 33, 41, 0.18)"
|
||||
/>
|
||||
<path
|
||||
d="M73.2199 17.6932L72.6857 16.2333L72.1516 17.6932L70.708 18.2333L72.1516 18.7735L72.6857 20.2333L73.2199 18.7735L74.6634 18.2333L73.2199 17.6932Z"
|
||||
fill="rgba(29, 33, 41, 0.18)"
|
||||
/>
|
||||
<path
|
||||
d="M4.26778 31.9231L3.46655 29.7333L2.66531 31.9231L0.5 32.7333L2.66531 33.5436L3.46655 35.7333L4.26778 33.5436L6.43309 32.7333L4.26778 31.9231Z"
|
||||
fill="rgba(29, 33, 41, 0.18)"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M21.6885 3.00483C21.6885 1.34797 23.0316 0.00482607 24.6885 0.00482607H57.1504C58.8072 0.00482607 60.1504 1.34797 60.1504 3.00483V31.2548C60.1504 43.3573 48.5346 43.279 48.1374 43.2764C48.1334 43.2763 48.1289 43.2763 48.1289 43.2763H24.6885C23.0316 43.2763 21.6885 41.9332 21.6885 40.2763V3.00483ZM28.9004 31.2597H43.3242V28.8574H28.9004V31.2597ZM28.9004 21.6406H52.9385V19.2382H28.9004V21.6406ZM28.9004 12.0263H52.9385V9.62397H28.9004V12.0263Z"
|
||||
fill="rgba(29, 33, 41, 0.18)"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,26 @@
|
||||
<svg
|
||||
width="80"
|
||||
height="44"
|
||||
viewBox="0 0 80 44"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M75.0811 3.35699L77.6711 0L79.2509 3.94682L75.0811 3.35699Z"
|
||||
fill="rgba(255, 255, 255, 0.18)"
|
||||
/>
|
||||
<path
|
||||
d="M73.2199 17.6932L72.6857 16.2333L72.1516 17.6932L70.708 18.2333L72.1516 18.7735L72.6857 20.2333L73.2199 18.7735L74.6634 18.2333L73.2199 17.6932Z"
|
||||
fill="rgba(255, 255, 255, 0.18)"
|
||||
/>
|
||||
<path
|
||||
d="M4.26778 31.9231L3.46655 29.7333L2.66531 31.9231L0.5 32.7333L2.66531 33.5436L3.46655 35.7333L4.26778 33.5436L6.43309 32.7333L4.26778 31.9231Z"
|
||||
fill="rgba(255, 255, 255, 0.18)"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M21.6885 3.00483C21.6885 1.34797 23.0316 0.00482607 24.6885 0.00482607H57.1504C58.8072 0.00482607 60.1504 1.34797 60.1504 3.00483V31.2548C60.1504 43.3573 48.5346 43.279 48.1374 43.2764C48.1334 43.2763 48.1289 43.2763 48.1289 43.2763H24.6885C23.0316 43.2763 21.6885 41.9332 21.6885 40.2763V3.00483ZM28.9004 31.2597H43.3242V28.8574H28.9004V31.2597ZM28.9004 21.6406H52.9385V19.2382H28.9004V21.6406ZM28.9004 12.0263H52.9385V9.62397H28.9004V12.0263Z"
|
||||
fill="rgba(255, 255, 255, 0.18)"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.0488 8.5832C19.0488 7.86523 18.4667 7.2832 17.7488 7.2832C17.0308 7.2832 16.4488 7.86523 16.4488 8.5832L16.4488 21.0832C16.4488 21.8012 17.0308 22.3832 17.7488 22.3832C18.4667 22.3832 19.0488 21.8012 19.0488 21.0832V8.5832ZM24.0493 17.7499C24.0493 17.0319 23.4673 16.4499 22.7493 16.4499C22.0313 16.4499 21.4493 17.0319 21.4493 17.7499V21.0832C21.4493 21.8012 22.0313 22.3832 22.7493 22.3832C23.4673 22.3832 24.0493 21.8012 24.0493 21.0832V17.7499ZM12.7497 13.1165C13.4677 13.1165 14.0497 13.6985 14.0497 14.4165L14.0497 21.0832C14.0497 21.8012 13.4677 22.3832 12.7497 22.3832C12.0318 22.3832 11.4497 21.8012 11.4497 21.0832V14.4165C11.4497 13.6985 12.0318 13.1165 12.7497 13.1165ZM9.0541 11.9166C9.0541 11.1986 8.47207 10.6166 7.7541 10.6166C7.03613 10.6166 6.4541 11.1986 6.4541 11.9166V21.0832C6.4541 21.8012 7.03613 22.3832 7.7541 22.3832C8.47207 22.3832 9.0541 21.8012 9.0541 21.0832L9.0541 11.9166Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,18 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="80"
|
||||
height="80"
|
||||
viewBox="0 0 80 80"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M40 68C55.464 68 68 55.464 68 40C68 24.536 55.464 12 40 12C24.536 12 12 24.536 12 40C12 55.464 24.536 68 40 68Z"
|
||||
fill="#13C15A"
|
||||
/>
|
||||
<path
|
||||
d="M36.3705 44.5065L48.4325 32.3421C49.1125 31.6563 50.2189 31.6487 50.9082 32.3252C51.6027 33.0066 51.6103 34.123 50.9252 34.8139L37.6233 48.2287C36.9342 48.9237 35.8067 48.9237 35.1176 48.2287L29.0749 42.1347C28.3898 41.4438 28.3974 40.3274 29.0919 39.6459C29.7812 38.9695 30.8876 38.9771 31.5676 39.6629L36.3705 44.5065Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 652 B |
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1 @@
|
||||
"use strict";var _constant=require("../../utils/constant"),_jump=require("../../utils/jump");function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Component({properties:{sdkInstance:{type:Object,value:null}},data:{showAd:!1,showClose:!1,closedByUser:!1,ad:null,adId:null},observers:{sdkInstance:function(e){var t=this;e&&(this.sdkInstance=e,this.store=e.store,"function"==typeof this.unsub&&this.unsub(),this.unsub=null,this.unsub=this.store.get({liveInfo:function(e){var n,i,r,o=null==e||null===(n=e.Menus)||void 0===n?void 0:n.Market,s=1===(null==o?void 0:o.IsPageUpperAdvertisementEnable),a=Array.isArray(null==o?void 0:o.AdvertisementInfo)?o.AdvertisementInfo:[],d=s?a.find(function(e){return 3===(null==e?void 0:e.PageAdvertisementType)}):null;if(d){var l=null!==(i=null!==(r=null==d?void 0:d.Id)&&void 0!==r?r:null==d?void 0:d.Index)&&void 0!==i?i:null,u=l!==t.data.adId,c=0===(null==o?void 0:o.IsPageUpperAdvertisementCloseEnable),v=null==d?void 0:d.AdvertisementContent,y="string"==typeof v&&v.startsWith("//")?"https:".concat(v):v,p=_objectSpread(_objectSpread({},d),{},{AdvertisementContent:y}),f=!!u||!t.data.closedByUser,b=t.data.showAd;t.setData({showAd:f,showClose:c,closedByUser:!u&&t.data.closedByUser,ad:p,adId:l}),b!==f&&t.triggerEvent("visibilityChange",{visible:f})}else(t.data.showAd||t.data.ad)&&(t.setData({showAd:!1,showClose:!1,closedByUser:!1,ad:null,adId:null}),t.triggerEvent("visibilityChange",{visible:!1}))}}))}},lifetimes:{detached:function(){"function"==typeof this.unsub&&this.unsub(),this.unsub=null}},methods:{onAdClick:function(){var e,t,n;this.data.ad&&(null===(e=this.sdkInstance)||void 0===e||e.reportLogger("mini_sdk_ad_floating_click",_objectSpread({},this.data.ad)),null===(t=this.sdkInstance)||void 0===t||t.emitEvent(_constant.EVENTS.PUBLIC.adFloating.click,{AdvertisementRedirectUrl:this.data.ad.AdvertisementRedirectUrl}),null===(n=this.sdkInstance)||void 0===n||n.reportBusiness("view_ad",{AdType:this.data.ad.PageAdvertisementType,AdId:this.data.ad.Id,AdContent:this.data.ad.AdvertisementContent,AdLink:this.data.ad.AdvertisementRedirectUrl}),(0,_jump.navigateToConfiguredWebview)(this.sdkInstance,_jump.JUMP_FEATURES.AD_FLOATING,this.data.ad.AdvertisementRedirectUrl))},onClose:function(){this.setData({showAd:!1,closedByUser:!0}),this.triggerEvent("visibilityChange",{visible:!1})}}});
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"mp-icon":"weui-miniprogram/icon/icon"}}
|
||||
@@ -0,0 +1,6 @@
|
||||
<view wx:if="{{showAd}}" class="adFloating" bindtap="onAdClick">
|
||||
<view wx:if="{{showClose}}" class="closeIcon" catchtap="onClose">
|
||||
<mp-icon class="icon-mp" icon="close" color="#fff" size="{{16}}"></mp-icon>
|
||||
</view>
|
||||
<image class="adImage" src="{{ad.AdvertisementContent}}"></image>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
page{--radius--:8rpx}.adFloating{box-sizing:border-box;position:relative;border-radius:var(--radius--);overflow:hidden;width:142rpx;height:142rpx;box-shadow:rgba(0,0,0,.12) 4rpx 4rpx 10rpx 1rpx;background-color:#fff}.adImage{width:100%;height:100%}.closeIcon{position:absolute;top:0;right:0;z-index:2;background-color:rgba(0,0,0,.4);border-top-right-radius:var(--radius--);border-bottom-left-radius:var(--radius--)}.icon-mp{display:flex;align-items:center;justify-content:center}
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"mp-dialog":"../../pubComponents/dialog/dialog"}}
|
||||
@@ -0,0 +1,18 @@
|
||||
<!-- 认真读检测需要压过横屏直播预约内容,避免倒计时/预约条遮住检测提示。 -->
|
||||
<mp-dialog
|
||||
visible="{{dialogVisible}}"
|
||||
maskClosable="{{false}}"
|
||||
zIndex="{{12001}}"
|
||||
containerStyle="background: {{useDarkTheme ? '#26262a' : '#ffffff'}}; overflow: hidden;"
|
||||
>
|
||||
<view slot="header" class="attention-dialog-header {{useDarkTheme ? 'attention-dialog-header-dark' : ''}}">
|
||||
<view class="attention-dialog-title {{useDarkTheme ? 'attention-dialog-title-dark' : ''}}">
|
||||
<view class="attention-dialog-tips-icon">i</view>
|
||||
<text>{{dialogTitle}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="attention-dialog-content {{useDarkTheme ? 'attention-dialog-content-dark' : ''}}">{{dialogContent}}</view>
|
||||
<view slot="footer" class="attention-dialog-footer">
|
||||
<button class="attention-dialog-button" bindtap="onDialogButtonTap">我知道了</button>
|
||||
</view>
|
||||
</mp-dialog>
|
||||
@@ -0,0 +1 @@
|
||||
.attention-dialog-header{position:relative;height:150rpx;padding:40rpx;box-sizing:border-box;overflow:hidden;background:linear-gradient(180deg,#e7edff 0,rgba(231,237,255,0) 100%)}.attention-dialog-header-dark{background:linear-gradient(180deg,#1b202f 0,#26262a 100%)}.attention-dialog-header::before{content:'';position:absolute;left:-120rpx;top:-138rpx;width:268rpx;height:268rpx;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.69) 0,rgba(255,255,255,0) 68%)}.attention-dialog-header::after{content:'';position:absolute;left:-46rpx;top:74rpx;width:210rpx;height:40rpx;border-radius:999rpx;background:linear-gradient(180deg,rgba(0,177,255,.76) 0,rgba(0,177,255,0) 100%);filter:blur(18rpx);opacity:.54}.attention-dialog-header-dark::before{opacity:.35}.attention-dialog-header-dark::after{background:#06f;opacity:.3}.attention-dialog-title{position:relative;z-index:1;display:flex;align-items:center;color:#1f2329;font-size:calc(32rpx + .5 * (1rem - 16px));font-weight:500;line-height:calc(44rpx + .5 * (1rem - 16px))}.attention-dialog-title-dark{color:#f2f3f5}.attention-dialog-tips-icon{width:calc(32rpx + .5 * (1rem - 16px));height:calc(32rpx + .5 * (1rem - 16px));margin-right:16rpx;border-radius:50%;background:#f5b433;border:2rpx solid #f2a200;box-sizing:border-box;color:#fff;font-size:calc(24rpx + .5 * (1rem - 16px));font-weight:700;line-height:calc(28rpx + .5 * (1rem - 16px));text-align:center}.attention-dialog-content{position:relative;z-index:1;min-height:calc(84rpx + .5 * (1rem - 16px));margin:-40rpx 40rpx 40rpx;color:#4e5969;font-size:calc(28rpx + .5 * (1rem - 16px));line-height:calc(42rpx + .5 * (1rem - 16px));text-align:left;word-break:break-word;overflow-wrap:anywhere}.attention-dialog-content-dark{color:#c9cdd4}.attention-dialog-footer{padding:0 40rpx 40rpx}.attention-dialog-button{width:100%;height:calc(64rpx + .5 * (1rem - 16px));display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:8rpx;background:#fe2c55;color:#fff;font-size:calc(28rpx + .5 * (1rem - 16px));font-weight:500;line-height:calc(64rpx + .5 * (1rem - 16px))}.attention-dialog-button::after{border:0}.attention-dialog-button:active{background:rgba(254,44,85,.85)}
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";var _constant=require("../../utils/constant"),_singleLogin=require("../../utils/singleLogin"),NORMAL_ICON="../../assets/banTips.png",ERROR_ICON="../../assets/banTipsRed.png";Component({properties:{sdkInstance:{type:Object,value:null}},data:{isBanned:!1,banType:_constant.BAN_TYPE.NONE,banTips:"",isSoftBan:!1,canContinue:!1,displayTips:"",normalIcon:NORMAL_ICON,errorIcon:ERROR_ICON},observers:{sdkInstance:function(n){if(n){var s=n.store,t=this;console.log("[BanPage] sdkInstance initialized"),"function"==typeof this._unsubscribe&&this._unsubscribe(),this._unsubscribe=null,this._unsubscribe=s.get({banStatus:function(n){if(console.log("[BanPage] banStatus changed:",n),n){var s=n.isBanned,e=void 0!==s&&s,i=n.banType,a=void 0===i?_constant.BAN_TYPE.NONE:i,o=n.banTips,c=void 0===o?"":o,u=n.isSoftBan,r=void 0!==u&&u,l=a===_constant.BAN_TYPE.CHECK_IN||r,b=c||(0,_singleLogin.getBanTipsText)(a);t.setData({isBanned:e,banType:a,banTips:c,isSoftBan:r,canContinue:l,displayTips:b})}}})}else console.log("[BanPage] sdkInstance is null")}},lifetimes:{detached:function(){"function"==typeof this._unsubscribe&&this._unsubscribe(),this._unsubscribe=null}},methods:{onContinueWatch:function(){var n=this.properties.sdkInstance,s={banType:this.data.banType,isSoftBan:this.data.isSoftBan};n&&n.store?(console.log("[BanPage] User clicked continue watch"),(0,_singleLogin.updateBanStatus)(n.store,{isBanned:!1,banType:_constant.BAN_TYPE.NONE,banTips:"",isSoftBan:!1}),this.triggerEvent("continue",s)):console.warn("[BanPage] sdkInstance or store is null")}}});
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{}}
|
||||
@@ -0,0 +1,10 @@
|
||||
<!-- BAN 页面组件 -->
|
||||
<view class="ban-page" wx:if="{{isBanned}}">
|
||||
<view class="ban-modal">
|
||||
<image class="ban-icon" src="{{canContinue ? normalIcon : errorIcon}}" mode="aspectFit" />
|
||||
<view class="ban-text">{{displayTips}}</view>
|
||||
<view class="ban-actions" wx:if="{{canContinue}}">
|
||||
<button class="continue-button" bindtap="onContinueWatch">继续观看</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
.ban-page{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;background-image:url("https://p1-live.byteimg.com/tos-cn-i-gjr78lqtd0/123342ac439a4ef587c3ca584078a5dc~tplv-gjr78lqtd0-z75.image");background-size:cover;background-position:center;z-index:30000;display:flex;align-items:center;justify-content:center}.ban-modal{display:flex;flex-direction:column;align-items:center;width:280px;min-height:168px;background-color:#fff;border-radius:16px;padding:20px;padding-bottom:25px;box-shadow:0 4px 16px rgba(0,0,0,.1);box-sizing:border-box}.ban-icon{width:80px;height:80px;margin-bottom:12px}.ban-text{font-size:calc(17px + .5 * (1rem - 16px));color:#161823;line-height:1.5;text-align:center;font-weight:500;word-break:break-all}.ban-actions{margin-top:12px;width:100%;display:flex;justify-content:center}.continue-button{width:240px;height:calc(44px + .5 * (1rem - 16px));line-height:calc(44px + .5 * (1rem - 16px));background-color:#ff4050;color:#fff;border-radius:8px;font-size:calc(15px + .5 * (1rem - 16px));font-weight:500;border:none;padding:0;text-align:center}.continue-button::after{border:none}.continue-button:active{opacity:.6}
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"thumb-button":"../../thumb/thumb-button/index"}}
|
||||
@@ -0,0 +1,116 @@
|
||||
<!-- 横屏大字版下 chat tab 容器高度可能不足,输入态面板必须挂到 root-portal,避免被 tab 内容区裁剪。 -->
|
||||
<root-portal wx:if="{{entering}}">
|
||||
<view class="chat-edit-drawer-mask" bindtap="handleOutsideTap"></view>
|
||||
<view class="comment-wrapper comment-wrapper-portal {{isLandscape ? 'comment-wrapper-landscape' : 'comment-wrapper-portrait'}}">
|
||||
<view class="chat-edit-drawer chat-edit-drawer-open" catchtap="catchNone">
|
||||
<view class="chat-edit-row">
|
||||
<view class="chat-edit-shell chat-edit-shell-open chat-edit-shell-active">
|
||||
<view class="chat-edit-main">
|
||||
<view wx:if="{{IsSendCommentEnable}}" class="chat-edit-input-wrap">
|
||||
<textarea
|
||||
value="{{chatValue}}"
|
||||
class="chat-edit-input"
|
||||
id="chat-edit-input"
|
||||
placeholder-class="chat-edit-input-placeholder-active"
|
||||
placeholder="{{IsSendCommentEnable === 2 ? '主持人暂未开启互动聊天' : CommentConfig.InputBoxPrompt}}"
|
||||
maxlength="200"
|
||||
bindinput="chatInputChange"
|
||||
bindtap="handleInputTap"
|
||||
bindfocus="handleInputFocus"
|
||||
bindblur="bindblur"
|
||||
bindconfirm="bindconfirm"
|
||||
bindkeyboardheightchange="handleKeyboardHeightChange"
|
||||
adjust-position="{{false}}"
|
||||
confirm-type="send"
|
||||
focus="{{focusInput}}"
|
||||
auto-height="{{false}}"
|
||||
fixed="{{false}}"
|
||||
cursor-spacing="0"
|
||||
show-confirm-bar="{{false}}"
|
||||
disable-default-padding="{{true}}"
|
||||
disabled="{{IsSendCommentEnable === 2 || InvalidToken}}"
|
||||
></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-edit-footer">
|
||||
<view class="chat-edit-counter">{{chatLength}}/200</view>
|
||||
<view class="chat-edit-footer-actions">
|
||||
<block wx:if="{{showEmojiEntry}}">
|
||||
<view wx:if="{{showEmojiPanel}}" class="chat-edit-action-btn" catchtap="handleKeyboardTrigger">
|
||||
<image class="chat-edit-action-icon" src="{{keyboardTriggerIconDark}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view wx:else class="chat-edit-action-btn" catchtap="handleEmojiTrigger">
|
||||
<image class="chat-edit-action-icon" src="{{emojiTriggerIconDark}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
</block>
|
||||
<view wx:if="{{showImageEntry}}" class="chat-edit-action-btn" catchtap="handleChooseImage">
|
||||
<image class="chat-edit-action-icon" src="{{imageTriggerIconDark}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view wx:if="{{showCloseEntry}}" class="chat-edit-close-btn" catchtap="handleCloseTap">关闭</view>
|
||||
<view class="chat-edit-send-btn {{chatLength > 0 ? 'chat-edit-send-btn-active' : 'chat-edit-send-btn-disabled'}}" catchtap="handleSendTap">发送</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view wx:if="{{showEmojiPanel}}" class="emoji-panel emoji-panel-active" scroll-y show-scrollbar="{{false}}" style="height: {{ panelHeight + 'px'}};">
|
||||
<view
|
||||
wx:for="{{emojiPanelSections}}"
|
||||
wx:key="key"
|
||||
wx:for-item="section"
|
||||
class="emoji-section"
|
||||
>
|
||||
<view class="emoji-section-title">{{section.title}}</view>
|
||||
<view class="emoji-grid">
|
||||
<view
|
||||
wx:for="{{section.emojis}}"
|
||||
wx:key="_emojiIndex_"
|
||||
wx:for-item="emoji"
|
||||
class="emoji-item {{section.isDynamic ? 'emoji-item-dynamic' : ''}} {{emoji.EmojiType === 2 ? 'emoji-item-big' : ''}}"
|
||||
data-set-index="{{emoji._setIndex_}}"
|
||||
data-emoji-index="{{emoji._emojiIndex_}}"
|
||||
bindtap="selectEmoji"
|
||||
>
|
||||
<image
|
||||
wx:if="{{emoji.EmojiImage && emoji.EmojiStatus !== 2}}"
|
||||
src="{{emoji.EmojiImage}}"
|
||||
mode="aspectFit"
|
||||
class="emoji-image {{section.isDynamic ? 'emoji-image-dynamic' : ''}} {{emoji.EmojiType === 2 ? 'emoji-image-big' : ''}}"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view wx:else class="keyboard-spacer" style="height: {{ panelHeight + 'px'}};"></view>
|
||||
</view>
|
||||
</view>
|
||||
</root-portal>
|
||||
|
||||
<view wx:else class="comment-wrapper {{isLandscape ? 'comment-wrapper-landscape' : 'comment-wrapper-portrait'}}">
|
||||
<view class="chat-edit-drawer" catchtap="catchNone">
|
||||
<view class="chat-edit-row">
|
||||
<view class="chat-edit-shell">
|
||||
<view class="chat-edit-main">
|
||||
<view wx:if="{{IsSendCommentEnable}}" class="chat-edit-input-wrap">
|
||||
<view
|
||||
class="chat-edit-input-preview {{chatValue ? '' : 'chat-edit-input-preview-placeholder'}}"
|
||||
catchtap="handleInputActivatorTap"
|
||||
>
|
||||
{{chatValue || (IsSendCommentEnable === 2 ? '主持人暂未开启互动聊天' : CommentConfig.InputBoxPrompt)}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-edit-actions">
|
||||
<block wx:if="{{showEmojiEntry}}">
|
||||
<view class="chat-edit-icon" catchtap="handleEmojiTrigger">
|
||||
<image class="chat-edit-icon-image" src="{{emojiTriggerIcon}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-edit-toolbar">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
.comment-wrapper{margin:0 28rpx 10rpx 28rpx;position:relative;z-index:1103}.chat-edit-drawer-mask{position:fixed;inset:0;background:rgba(0,0,0,.24);z-index:1100}.comment-wrapper-landscape,.comment-wrapper-portrait{width:auto}.chat-edit-drawer{width:100%}.chat-edit-drawer-open{position:fixed;left:0;right:0;bottom:0;z-index:1103;background:#fff;padding:18rpx 16rpx 0;box-sizing:border-box;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.chat-edit-row{display:flex;align-items:flex-end;margin-top:12rpx}.comment-wrapper-large{margin-bottom:16rpx}.chat-edit-shell{flex:1;border-radius:46rpx;background:rgba(0,0,0,.14);padding:0 16rpx 0 28rpx;box-sizing:border-box;overflow:hidden}.chat-edit-shell-open{border-radius:20rpx;background:#f3f4f6;padding:18rpx 18rpx 16rpx}.chat-edit-shell-active{min-height:224rpx;box-shadow:0 -4rpx 18rpx rgba(29,33,41,.06)}.chat-edit-main{display:flex;align-items:center;min-height:72rpx;min-width:0;width:100%;overflow:hidden}.chat-edit-input-wrap{flex:1;min-width:0;position:relative;overflow:hidden}.chat-edit-input{width:100%;height:calc(72rpx + .5 * (1rem - 16px));min-height:calc(72rpx + .5 * (1rem - 16px));min-width:0;color:#fff;font-size:calc(28rpx + .5 * (1rem - 16px));line-height:calc(40rpx + .5 * (1rem - 16px));padding:16rpx 0;box-sizing:border-box;background:0 0;overflow:hidden}.chat-edit-input-preview{display:flex;align-items:center;flex:1;height:calc(72rpx + .5 * (1rem - 16px));min-height:calc(72rpx + .5 * (1rem - 16px));min-width:0;color:#fff;font-size:calc(28rpx + .5 * (1rem - 16px));line-height:calc(40rpx + .5 * (1rem - 16px));padding:16rpx 0;box-sizing:border-box;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-edit-input-preview-placeholder{color:rgba(255,255,255,.72)}.chat-edit-shell-active .chat-edit-main{align-items:flex-start;min-height:112rpx}.chat-edit-shell-active .chat-edit-input{height:calc(112rpx + .5 * (1rem - 16px));min-height:calc(112rpx + .5 * (1rem - 16px));color:#1d2129;font-size:calc(32rpx + .5 * (1rem - 16px));line-height:calc(46rpx + .5 * (1rem - 16px));padding:14rpx 0 0}.chat-edit-input-large{font-size:calc(34rpx + .5 * (1rem - 16px))}.chat-edit-input-placeholder{color:rgba(255,255,255,.72)}.chat-edit-input-placeholder-active{color:#d0d4dc;font-size:calc(32rpx + .5 * (1rem - 16px));line-height:calc(46rpx + .5 * (1rem - 16px))}.chat-edit-actions{display:flex;align-items:center;margin-left:12rpx}.chat-edit-icon{width:56rpx;height:56rpx;display:flex;align-items:center;justify-content:center;margin-left:12rpx}.chat-edit-icon-image{width:calc(40rpx + .5 * (1rem - 16px));height:calc(40rpx + .5 * (1rem - 16px))}.chat-edit-toolbar{display:flex;align-items:flex-end;flex:0 0 auto;margin-left:12rpx}.chat-edit-footer{display:flex;align-items:flex-end;justify-content:space-between;margin-top:14rpx;min-height:60rpx;padding-top:10rpx}.chat-edit-counter{color:#4e5969;font-size:calc(20rpx + .5 * (1rem - 16px));line-height:calc(28rpx + .5 * (1rem - 16px));padding-bottom:10rpx}.chat-edit-footer-actions{display:flex;align-items:flex-end}.chat-edit-action-btn{width:60rpx;height:60rpx;border-radius:30rpx;background:#fff;display:flex;align-items:center;justify-content:center;margin-left:12rpx}.chat-edit-action-icon{width:calc(36rpx + .5 * (1rem - 16px));height:calc(36rpx + .5 * (1rem - 16px))}.chat-edit-close-btn{min-width:112rpx;height:calc(64rpx + .5 * (1rem - 16px));padding:0 28rpx;border-radius:40rpx;margin-left:12rpx;background:rgba(254,44,85,.08);color:#fe2c55;font-size:calc(28rpx + .5 * (1rem - 16px));font-weight:500;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.chat-edit-send-btn{min-width:112rpx;height:calc(64rpx + .5 * (1rem - 16px));padding:0 28rpx;border-radius:40rpx;margin-left:12rpx;background:#f7a3b3;color:#fff;font-size:calc(28rpx + .5 * (1rem - 16px));font-weight:500;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.chat-edit-send-btn-active{background:#ff3158;opacity:1}.chat-edit-send-btn-disabled{opacity:.55}.emoji-panel{margin-top:16rpx;border-radius:0;background:#fff;padding:8rpx 0 12rpx 0;box-sizing:border-box;position:relative;z-index:1102;overflow:hidden;flex:0 0 auto}.emoji-panel-active{margin-top:0}.keyboard-spacer{flex:0 0 auto;width:100%}.emoji-section{padding:8rpx 14rpx 18rpx 14rpx}.emoji-section-title{color:#1d2129;font-size:calc(22rpx + .5 * (1rem - 16px));line-height:calc(32rpx + .5 * (1rem - 16px));margin-bottom:12rpx;font-weight:600}.emoji-grid{display:flex;flex-wrap:wrap;margin:0 -2rpx}.emoji-item{width:12.5%;height:76rpx;display:flex;align-items:center;justify-content:center;margin-bottom:8rpx}.emoji-item-big{width:20%;height:88rpx}.emoji-item-dynamic{width:16.66%;height:92rpx}.emoji-image{width:56rpx;height:56rpx}.emoji-image-big{width:76rpx;height:76rpx}.emoji-image-dynamic{width:76rpx;height:76rpx}
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";var CommentType={MuteAll:0,Welcome:2,Mock:3},UploadStatus={Uploading:"uploading",Failed:"failed",Success:"success"};module.exports={CommentType:CommentType,UploadStatus:UploadStatus};
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function ownKeys(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)}return o}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(o),!0).forEach(function(t){_defineProperty(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,t||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _require=require("../../../utils/comment"),EMOJI_TYPE=_require.EMOJI_TYPE,getDisplayName=function(e){return String(e||"").split("|")[0]},buildEmojiPanelSections=function(e){var t=(e||[]).map(function(e,t){return{emojiSet:e,setIndex:t}}),o=t.find(function(e){var t;return 1===(null===(t=e.emojiSet)||void 0===t?void 0:t.IsSystemEmojiSet)}),i=t.filter(function(e){var t;return 1!==(null===(t=e.emojiSet)||void 0===t?void 0:t.IsSystemEmojiSet)}),r=[];if(null!=o&&o.emojiSet){var n=o.emojiSet,u=o.setIndex,s=[],m=[];(n.Emojis||[]).forEach(function(e,t){if(e&&2!==e.EmojiStatus){var o=_objectSpread(_objectSpread({},e),{},{_setIndex_:u,_emojiIndex_:t});String(e.EmojiImage||"").toLowerCase().includes(".gif")?s.push(o):m.push(o)}}),s.length>0&&r.push({key:"system-dynamic-".concat(n.EmojiSetId||0),title:"动态",type:"system-dynamic",isDynamic:!0,emojis:s}),m.length>0&&r.push({key:"system-all-".concat(n.EmojiSetId||0),title:"全部",type:"system-default",emojis:m})}return i.forEach(function(e){var t=e.emojiSet,o=e.setIndex,i=(t.Emojis||[]).map(function(e,t){return _objectSpread(_objectSpread({},e),{},{_setIndex_:o,_emojiIndex_:t})}).filter(function(e){return 2!==(null==e?void 0:e.EmojiStatus)});i.length&&r.push({key:"custom-".concat(t.EmojiSetId||o),title:getDisplayName(t.EmojiSetName),type:t.EmojiSetType===EMOJI_TYPE.BIG?"custom-big":"custom-small",emojis:i})}),r},getImageMimeType=function(e){var t=String(e||"").toLowerCase();return t.endsWith(".png")?"image/png":t.endsWith(".jpg")?"image/jpg":t.endsWith(".jpeg")?"image/jpeg":""},isChooseImageCancelled=function(e){return String((null==e?void 0:e.errMsg)||(null==e?void 0:e.message)||"").toLowerCase().includes("cancel")};module.exports={getDisplayName:getDisplayName,buildEmojiPanelSections:buildEmojiPanelSections,getImageMimeType:getImageMimeType,isChooseImageCancelled:isChooseImageCancelled};
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"mp-icon":"weui-miniprogram/icon/icon","product-message":"../../product-message/product-message"}}
|
||||
@@ -0,0 +1,449 @@
|
||||
<template name="rich-text-segments">
|
||||
<block wx:for="{{segments}}" wx:for-item="segment" wx:key="index">
|
||||
<text wx:if="{{segment.type === 'text'}}">{{segment.text}}</text>
|
||||
<image wx:else class="{{emojiClass}} {{segment.isDynamic ? dynamicEmojiClass : ''}}" src="{{segment.src}}" mode="aspectFit"></image>
|
||||
</block>
|
||||
</template>
|
||||
|
||||
<template name="system-message">
|
||||
<view id="{{item.Common.MsgId}}" class="chat-list-item-content" style="background-color: {{backgroundColor}}">
|
||||
<view class="chat-list-user-info chat-list-user-info-other" style="background-color: {{ tagBackgroundColor }};">
|
||||
{{ item.Extra.User.Nickname || '系统提示' }}
|
||||
</view>
|
||||
<view class="chat-list-msg-content" style="color: {{ textColor }}">
|
||||
<template
|
||||
is="rich-text-segments"
|
||||
data="{{segments: item.Extra._richTextSegments_, emojiClass: 'chat-comment-inline-emoji', dynamicEmojiClass: 'chat-comment-inline-emoji-dynamic'}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="viewer-level-badge">
|
||||
<view
|
||||
wx:if="{{isViewerLevelEnable && item.Extra._levelMeta_}}"
|
||||
class="chat-list-level-badge {{inlineFlow ? 'chat-list-level-badge-inline-flow' : ''}}"
|
||||
style="background-color: {{item.Extra._levelMeta_.Color}}"
|
||||
>
|
||||
<image
|
||||
wx:if="{{item.Extra._levelMeta_.LevelIcon}}"
|
||||
class="chat-list-level-icon"
|
||||
src="{{item.Extra._levelMeta_.LevelIcon}}"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text class="chat-list-level-name">{{item.Extra._levelMeta_.LevelName}}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="comment-image-with-status">
|
||||
<view class="chat-comment-image-wrapper" style="{{item.Extra._imageStyle_ || ''}}">
|
||||
<image
|
||||
class="chat-comment-image"
|
||||
src="{{item.Extra._previewSrc_}}"
|
||||
mode="aspectFit"
|
||||
data-msg-id="{{item.Common.MsgId}}"
|
||||
data-src="{{item.Extra._previewSrc_}}"
|
||||
bindload="handleCommentImageLoad"
|
||||
bindtap="previewCommentImage"
|
||||
></image>
|
||||
<view wx:if="{{showStatus && (item.Extra._uploadStatus_ === 'uploading' || item.Extra._uploadStatus_ === 'failed')}}" class="chat-comment-status">
|
||||
{{item.Extra._uploadStatus_ === 'uploading' ? '上传中...' : '上传失败'}}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="rich-comment-content">
|
||||
<view class="chat-comment-rich-text chat-comment-inline-flow {{extraClass}}" style="color: {{textColor}}">
|
||||
<template
|
||||
is="viewer-level-badge"
|
||||
data="{{item, isViewerLevelEnable: showViewerBadge ? isViewerLevelEnable : false, inlineFlow: true}}"
|
||||
/>
|
||||
<view
|
||||
wx:if="{{pillText}}"
|
||||
class="chat-list-user-info chat-list-user-info-other chat-presenter-tag-inline"
|
||||
style="background-color: {{nicknameBackgroundColor}}"
|
||||
>
|
||||
{{ pillText }}
|
||||
</view>
|
||||
<text wx:if="{{pillText}}" class="chat-comment-name-inline"> </text>
|
||||
<block wx:elif="{{hideNickname}}">
|
||||
</block>
|
||||
<text
|
||||
wx:elif="{{usePillNickname && item.Extra.User.Nickname}}"
|
||||
class="chat-comment-name-inline chat-comment-name-pill"
|
||||
style="background-color: {{nicknameBackgroundColor}}"
|
||||
>
|
||||
{{ item.Extra.User.Nickname }}
|
||||
</text>
|
||||
<text wx:if="{{!pillText && !hideNickname && usePillNickname && item.Extra.User.Nickname}}" class="chat-comment-name-inline"> </text>
|
||||
<block wx:elif="{{!pillText && !hideNickname && item.Extra.User.Nickname}}">
|
||||
<text class="chat-comment-name-inline">{{ item.Extra.User.Nickname }}</text>
|
||||
<text class="chat-comment-name-inline">:</text>
|
||||
</block>
|
||||
<template
|
||||
is="rich-text-segments"
|
||||
data="{{segments: item.Extra._richTextSegments_, emojiClass: 'chat-comment-inline-emoji', dynamicEmojiClass: 'chat-comment-inline-emoji-dynamic'}}"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="photo-comment-content">
|
||||
<view class="{{containerClass}}">
|
||||
<template
|
||||
is="viewer-level-badge"
|
||||
data="{{item, isViewerLevelEnable: showViewerBadge ? isViewerLevelEnable : false, inlineFlow: false}}"
|
||||
/>
|
||||
<view class="chat-comment-body">
|
||||
<view
|
||||
wx:if="{{pillText}}"
|
||||
class="chat-list-user-info chat-list-user-info-other"
|
||||
style="background-color: {{nicknameBackgroundColor}}"
|
||||
>
|
||||
{{ pillText }}
|
||||
</view>
|
||||
<block wx:elif="{{hideNickname}}">
|
||||
</block>
|
||||
<view
|
||||
wx:elif="{{usePillNickname && item.Extra.User.Nickname}}"
|
||||
class="chat-list-user-info chat-list-user-info-other"
|
||||
style="background-color: {{nicknameBackgroundColor}}"
|
||||
>
|
||||
{{ item.Extra.User.Nickname }}
|
||||
</view>
|
||||
<view wx:elif="{{!hideNickname && item.Extra.User.Nickname}}" class="chat-list-user-info" style="color: {{textColor}}">
|
||||
{{ item.Extra.User.Nickname + ':' }}
|
||||
</view>
|
||||
<template is="comment-image-with-status" data="{{item, showStatus}}" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="big-emoji-comment-content">
|
||||
<view class="{{containerClass}}">
|
||||
<template
|
||||
is="viewer-level-badge"
|
||||
data="{{item, isViewerLevelEnable: showViewerBadge ? isViewerLevelEnable : false, inlineFlow: false}}"
|
||||
/>
|
||||
<view class="chat-comment-body">
|
||||
<view
|
||||
wx:if="{{pillText}}"
|
||||
class="chat-list-user-info chat-list-user-info-other"
|
||||
style="background-color: {{nicknameBackgroundColor}}"
|
||||
>
|
||||
{{ pillText }}
|
||||
</view>
|
||||
<block wx:elif="{{hideNickname}}">
|
||||
</block>
|
||||
<view
|
||||
wx:elif="{{usePillNickname && item.Extra.User.Nickname}}"
|
||||
class="chat-list-user-info chat-list-user-info-other"
|
||||
style="background-color: {{nicknameBackgroundColor}}"
|
||||
>
|
||||
{{ item.Extra.User.Nickname }}
|
||||
</view>
|
||||
<view wx:elif="{{!hideNickname && item.Extra.User.Nickname}}" class="chat-list-user-info" style="color: {{textColor}}">
|
||||
{{ item.Extra.User.Nickname + ':' }}
|
||||
</view>
|
||||
<image class="chat-comment-big-emoji" src="{{item.Extra._emojiImage_}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="avatar-comment-content">
|
||||
<view id="{{item.Common.MsgId}}" class="chat-avatar-comment">
|
||||
<view class="chat-avatar-box">
|
||||
<image
|
||||
class="chat-avatar-image"
|
||||
src="{{item.Extra._avatarUrl_ && !item.Extra._avatarLoadFailed_ ? item.Extra._avatarUrl_ : item.Extra._avatarDefaultUrl_}}"
|
||||
mode="aspectFill"
|
||||
data-msg-id="{{item.Common.MsgId}}"
|
||||
data-src="{{item.Extra._avatarUrl_}}"
|
||||
binderror="handleAvatarError"
|
||||
></image>
|
||||
</view>
|
||||
<view class="chat-avatar-main">
|
||||
<view class="chat-avatar-header">
|
||||
<view
|
||||
wx:if="{{pillText}}"
|
||||
class="chat-list-user-info chat-list-user-info-other"
|
||||
style="background-color: {{nicknameBackgroundColor}}"
|
||||
>
|
||||
{{ pillText }}
|
||||
</view>
|
||||
<template
|
||||
wx:else
|
||||
is="viewer-level-badge"
|
||||
data="{{item, isViewerLevelEnable: showViewerBadge ? isViewerLevelEnable : false, inlineFlow: false}}"
|
||||
/>
|
||||
<text wx:if="{{!hideNickname && item.Extra.User.Nickname}}" class="chat-avatar-name" style="color: {{textColor}}">{{ item.Extra.User.Nickname }}</text>
|
||||
</view>
|
||||
<template
|
||||
wx:if="{{item.Extra._renderType_ === 'photo'}}"
|
||||
is="comment-image-with-status"
|
||||
data="{{item, showStatus: true}}"
|
||||
/>
|
||||
<view wx:else class="chat-avatar-bubble" style="background-color: {{backgroundColor}}">
|
||||
<image
|
||||
wx:if="{{item.Extra._renderType_ === 'big-emoji'}}"
|
||||
class="chat-comment-big-emoji"
|
||||
src="{{item.Extra._emojiImage_}}"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<view wx:else class="chat-comment-rich-text" style="color: {{textColor}}">
|
||||
<template
|
||||
is="rich-text-segments"
|
||||
data="{{segments: item.Extra._richTextSegments_, emojiClass: 'chat-comment-inline-emoji', dynamicEmojiClass: 'chat-comment-inline-emoji-dynamic'}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="auto-reply-card-content">
|
||||
<view
|
||||
class="chat-list-auto-reply-card {{avatarMode ? 'chat-list-auto-reply-card-avatar' : 'chat-list-item-content'}}"
|
||||
style="background-color: {{backgroundColor}}"
|
||||
bindtap="onAutoReplyTap"
|
||||
data-item="{{item}}"
|
||||
>
|
||||
<view
|
||||
wx:if="{{item.Extra._autoReplyDisplay_.hasAnchorPreview}}"
|
||||
class="chat-list-auto-reply-preview {{avatarMode ? 'chat-list-auto-reply-preview-avatar' : ''}}"
|
||||
style="color: {{ textColor }}"
|
||||
>
|
||||
<text class="chat-list-auto-reply-preview-text">{{ item.Extra._autoReplyDisplay_.anchorPreviewText }}</text>
|
||||
</view>
|
||||
<view
|
||||
wx:if="{{item.Extra._autoReplyDisplay_.hasAnchorPreview}}"
|
||||
class="chat-list-auto-reply-divider {{avatarMode ? 'chat-list-auto-reply-divider-avatar' : ''}}"
|
||||
></view>
|
||||
<view class="chat-list-auto-reply-footer {{avatarMode ? 'chat-list-auto-reply-footer-avatar' : ''}}">
|
||||
<view wx:if="{{!avatarMode}}" class="chat-list-auto-reply-icon" aria-hidden="true">
|
||||
<image
|
||||
wx:if="{{item.Extra._autoReplyDisplay_.robotAvatar}}"
|
||||
class="chat-list-auto-reply-icon-img"
|
||||
src="{{item.Extra._autoReplyDisplay_.robotAvatar}}"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view wx:else class="chat-list-auto-reply-icon-fallback"></view>
|
||||
</view>
|
||||
<text class="chat-list-auto-reply-status {{avatarMode ? 'chat-list-auto-reply-status-avatar' : ''}}">{{ avatarMode ? item.Extra._autoReplyDisplay_.avatarStatusText : item.Extra._autoReplyDisplay_.statusText }}</text>
|
||||
<text class="chat-list-auto-reply-action {{avatarMode ? 'chat-list-auto-reply-action-avatar' : ''}}">查看 ></text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="avatar-auto-reply-content">
|
||||
<view id="{{item.Common.MsgId}}" class="chat-avatar-comment chat-avatar-auto-reply">
|
||||
<view class="chat-avatar-box">
|
||||
<image
|
||||
class="chat-avatar-image"
|
||||
src="{{item.Extra._avatarUrl_ && !item.Extra._avatarLoadFailed_ ? item.Extra._avatarUrl_ : item.Extra._avatarDefaultUrl_}}"
|
||||
mode="aspectFill"
|
||||
data-msg-id="{{item.Common.MsgId}}"
|
||||
data-src="{{item.Extra._avatarUrl_}}"
|
||||
binderror="handleAvatarError"
|
||||
></image>
|
||||
</view>
|
||||
<view class="chat-avatar-main chat-avatar-auto-reply-main">
|
||||
<view class="chat-avatar-header">
|
||||
<text class="chat-avatar-name chat-avatar-auto-reply-name" style="color: {{textColor}}">{{ item.Extra._autoReplyDisplay_.robotNameDisplay }}</text>
|
||||
</view>
|
||||
<template
|
||||
is="auto-reply-card-content"
|
||||
data="{{item, backgroundColor, textColor, avatarMode: true}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="chat-list-wrapper">
|
||||
<view wx:if="{{topComment.length}}" class="chat-top-comment">
|
||||
<view class="chat-top-comment-content">
|
||||
<view class="chat-top-comment-main">
|
||||
<view wx:if="{{topComment[0].Extra.User.Nickname}}" class="chat-top-comment-header">
|
||||
<view class="chat-top-comment-accent"></view>
|
||||
<text class="chat-top-comment-name">{{ topComment[0].Extra.User.Nickname }}</text>
|
||||
</view>
|
||||
<block wx:if="{{topComment[0].Extra._renderType_ === 'photo'}}">
|
||||
<view class="chat-top-comment-media">
|
||||
<template is="comment-image-with-status" data="{{item: topComment[0], showStatus: false}}" />
|
||||
</view>
|
||||
</block>
|
||||
<block wx:elif="{{topComment[0].Extra._renderType_ === 'big-emoji'}}">
|
||||
<view class="chat-top-comment-media">
|
||||
<image class="chat-comment-big-emoji" src="{{topComment[0].Extra._emojiImage_}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
</block>
|
||||
<view wx:else class="chat-top-comment-rich-text-expandable" bindtap="handleTopCommentTap">
|
||||
<view class="chat-top-comment-rich-text">
|
||||
<template
|
||||
is="rich-text-segments"
|
||||
data="{{segments: topComment[0].Extra._richTextSegments_, emojiClass: 'chat-comment-inline-emoji', dynamicEmojiClass: 'chat-comment-inline-emoji-dynamic'}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view id="chat-scrollview" reverse="{{true}}" enable-flex="{{true}}" class="chat-scroll-view" scroll-y bindscrolltoupper="getHistoryList" scroll-into-view="{{scrollIntoViewId}}" bindscroll="bindscroll">
|
||||
<view id="chat-list-list" class="chat-list-list" style="font-size: {{_chatFontSizeStyle}}">
|
||||
<view style="color: {{ FontColor }}" class="chat-list-history" wx:if="{{ !hasHistory && filterListCount > 25 }}">
|
||||
<view class="chat-list-history-content">没有更多了</view>
|
||||
</view>
|
||||
<view
|
||||
id="view{{item.Common.MsgId}}"
|
||||
class="chat-list-item"
|
||||
hidden="{{item.Extra._systemNoticeInfo_ && !systemNoticeVisible}}"
|
||||
wx:for="{{ chatList }}"
|
||||
wx:for-index="index"
|
||||
wx:for-item="item"
|
||||
wx:key="id"
|
||||
>
|
||||
<!-- 欢迎语 -->
|
||||
<template
|
||||
wx:if="{{item.Extra._welcomeInfo_}}"
|
||||
is="system-message"
|
||||
data="{{item, backgroundColor: MobileChatBackgroundColor, tagBackgroundColor: PresenterTagBackgroundColor, textColor: FontColor}}"
|
||||
/>
|
||||
<template
|
||||
wx:elif="{{item.Extra._operationInfo_ && item.Extra._operationInfo_.IsSendCommentEnable !== undefined}}"
|
||||
is="system-message"
|
||||
data="{{item, backgroundColor: MobileChatBackgroundColor, tagBackgroundColor: PresenterTagBackgroundColor, textColor: FontColor}}"
|
||||
/>
|
||||
<!-- 智能助理:头像模式对齐 Web ChatItemAvatar,非头像模式对齐 Web MobileAutoReplyMessage inline -->
|
||||
<template
|
||||
wx:elif="{{item.Extra._autoReplyInfo_.IsAutoReply && showAvatar}}"
|
||||
is="avatar-auto-reply-content"
|
||||
data="{{item, backgroundColor: MobileChatBackgroundColor, textColor: FontColor}}"
|
||||
/>
|
||||
<template
|
||||
wx:elif="{{item.Extra._autoReplyInfo_.IsAutoReply}}"
|
||||
is="auto-reply-card-content"
|
||||
data="{{item, backgroundColor: MobileChatBackgroundColor, textColor: FontColor, avatarMode: false}}"
|
||||
/>
|
||||
<template
|
||||
wx:elif="{{item.Extra.IsPresenter && showAvatar}}"
|
||||
is="avatar-comment-content"
|
||||
data="{{item, backgroundColor: MobileChatBackgroundColor, textColor: PresenterChatColor, showViewerBadge: false, isViewerLevelEnable: false, pillText: item.Extra._presenterNickname_, nicknameBackgroundColor: PresenterTagBackgroundColor, hideNickname: true}}"
|
||||
/>
|
||||
<!-- 主持人 -->
|
||||
<view id="{{item.Common.MsgId}}" wx:elif="{{item.Extra.IsPresenter}}" class="chat-list-item-content" style="background-color: {{MobileChatBackgroundColor}}">
|
||||
<template
|
||||
wx:if="{{item.Extra._renderType_ === 'photo'}}"
|
||||
is="photo-comment-content"
|
||||
data="{{item, containerClass: '', usePillNickname: false, pillText: item.Extra._presenterNickname_, nicknameBackgroundColor: PresenterTagBackgroundColor, textColor: PresenterChatColor, showViewerBadge: false, isViewerLevelEnable: false, showStatus: true}}"
|
||||
/>
|
||||
<template
|
||||
wx:elif="{{item.Extra._renderType_ === 'big-emoji'}}"
|
||||
is="big-emoji-comment-content"
|
||||
data="{{item, containerClass: '', usePillNickname: false, pillText: item.Extra._presenterNickname_, nicknameBackgroundColor: PresenterTagBackgroundColor, textColor: PresenterChatColor, showViewerBadge: false, isViewerLevelEnable: false}}"
|
||||
/>
|
||||
<template
|
||||
wx:else
|
||||
is="rich-comment-content"
|
||||
data="{{item, textColor: PresenterChatColor, usePillNickname: false, pillText: item.Extra._presenterNickname_, nicknameBackgroundColor: PresenterTagBackgroundColor, showViewerBadge: false, isViewerLevelEnable: false, extraClass: ''}}"
|
||||
/>
|
||||
</view>
|
||||
<!-- 观众 -->
|
||||
<template
|
||||
wx:elif="{{showAvatar}}"
|
||||
is="avatar-comment-content"
|
||||
data="{{item, backgroundColor: MobileChatBackgroundColor, textColor: FontColor, showViewerBadge: true, isViewerLevelEnable}}"
|
||||
/>
|
||||
<view id="{{item.Common.MsgId}}" wx:else class="chat-list-item-content" style="background-color: {{MobileChatBackgroundColor}}">
|
||||
<template
|
||||
wx:if="{{item.Extra._renderType_ === 'photo'}}"
|
||||
is="photo-comment-content"
|
||||
data="{{item, containerClass: 'chat-comment-main', usePillNickname: false, nicknameBackgroundColor: '', textColor: FontColor, showViewerBadge: true, isViewerLevelEnable, showStatus: true}}"
|
||||
/>
|
||||
<template
|
||||
wx:elif="{{item.Extra._renderType_ === 'big-emoji'}}"
|
||||
is="big-emoji-comment-content"
|
||||
data="{{item, containerClass: 'chat-comment-main', usePillNickname: false, nicknameBackgroundColor: '', textColor: FontColor, showViewerBadge: true, isViewerLevelEnable}}"
|
||||
/>
|
||||
<template
|
||||
wx:else
|
||||
is="rich-comment-content"
|
||||
data="{{item, textColor: FontColor, usePillNickname: false, nicknameBackgroundColor: '', showViewerBadge: true, isViewerLevelEnable, extraClass: ''}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<product-message sdkInstance="{{sdkInstance}}" />
|
||||
</view>
|
||||
<!-- 智能助理底部横幅:白底双行 + 固定色「查看」,对齐设计稿 AutoReplyNotice -->
|
||||
<view
|
||||
wx:if="{{autoReplyNoticeVisible && autoReplyNoticeItem}}"
|
||||
class="chat-auto-reply-notice"
|
||||
catchtap="catchNone"
|
||||
>
|
||||
<view class="chat-auto-reply-notice-icon" aria-hidden="true">
|
||||
<image
|
||||
wx:if="{{autoReplyNoticeItem.Extra._autoReplyDisplay_.robotAvatar}}"
|
||||
class="chat-auto-reply-notice-icon-img"
|
||||
src="{{autoReplyNoticeItem.Extra._autoReplyDisplay_.robotAvatar}}"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view wx:else class="chat-auto-reply-notice-icon-fallback"></view>
|
||||
</view>
|
||||
<view class="chat-auto-reply-notice-content">
|
||||
<text class="chat-auto-reply-notice-title">{{ autoReplyNoticeItem.Extra._autoReplyDisplay_.noticeTitle }}</text>
|
||||
<text class="chat-auto-reply-notice-desc">{{ autoReplyNoticeItem.Extra._autoReplyDisplay_.noticeDesc }}</text>
|
||||
</view>
|
||||
<view class="chat-auto-reply-notice-actions">
|
||||
<text class="chat-auto-reply-notice-action" catchtap="onAutoReplyNoticeView">查看</text>
|
||||
<text class="chat-auto-reply-notice-close" catchtap="closeAutoReplyNotice">×</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-more-notice" wx:if="{{newCount && isShowMoreNote}}" bind:tap="newCountClick">
|
||||
<image src="../../../assets/arrowDoubleDown.svg" class="chat-more-notice-icon" />
|
||||
{{newCount}} 条消息
|
||||
</view>
|
||||
<view wx:if="{{autoReplyPanelVisible && autoReplyPanelItem}}" class="chat-auto-reply-panel-mask" bindtap="closeAutoReplyPanel"></view>
|
||||
<view wx:if="{{autoReplyPanelVisible && autoReplyPanelItem}}" class="chat-auto-reply-panel-sheet" catchtap="catchNone">
|
||||
<view class="chat-auto-reply-panel">
|
||||
<view class="chat-auto-reply-panel-header">
|
||||
<view class="chat-auto-reply-panel-title">
|
||||
{{ autoReplyPanelItem.Extra._autoReplyDisplay_.panelHeaderTitle }}
|
||||
</view>
|
||||
<view class="chat-auto-reply-panel-close" bindtap="closeAutoReplyPanel">
|
||||
<mp-icon icon="close" size="{{16}}" color="#1d2129"></mp-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-auto-reply-panel-card">
|
||||
<view class="chat-auto-reply-panel-question">
|
||||
{{ autoReplyPanelItem.Extra._autoReplyDisplay_.panelQuestion }}
|
||||
</view>
|
||||
<view class="chat-auto-reply-panel-answer">
|
||||
<template
|
||||
is="rich-text-segments"
|
||||
data="{{segments: autoReplyPanelItem.Extra._richTextSegments_, emojiClass: 'chat-comment-inline-emoji', dynamicEmojiClass: 'chat-comment-inline-emoji-dynamic'}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-auto-reply-panel-confirm" bindtap="closeAutoReplyPanel">我知道了</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{topCommentPopupVisible && topComment.length}}" class="chat-top-comment-drawer-mask" bindtap="closeTopCommentPopup"></view>
|
||||
<view wx:if="{{topCommentPopupVisible && topComment.length}}" class="chat-top-comment-drawer-sheet" catchtap="catchNone">
|
||||
<view class="chat-top-comment-drawer">
|
||||
<view class="chat-top-comment-drawer-header">
|
||||
<view class="chat-top-comment-drawer-title">置顶内容</view>
|
||||
<view class="chat-top-comment-drawer-close" bindtap="closeTopCommentPopup">
|
||||
<mp-icon icon="close" size="{{16}}" color="#1d2129"></mp-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-top-comment-drawer-body">
|
||||
<view class="chat-top-comment-drawer-name">{{topComment[0].Extra.User.Nickname}}</view>
|
||||
<view class="chat-top-comment-drawer-content">
|
||||
<template
|
||||
is="rich-text-segments"
|
||||
data="{{segments: topComment[0].Extra._richTextSegments_, emojiClass: 'chat-top-comment-drawer-emoji', dynamicEmojiClass: 'chat-top-comment-drawer-emoji-dynamic'}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";Component({options:{multipleSlots:!0},properties:{sdkInstance:{type:Object,value:null},isLandscape:{type:Boolean,value:!1},externalEditorCloseSignal:{type:Number,value:0}},lifetimes:{detached:function(){"function"==typeof this.unsub&&this.unsub(),this.unsub=null}},observers:{sdkInstance:function(t){t&&(this.store=t.store)}},methods:{commentCheck:function(){this.triggerEvent("commentCheck")},openChatInput:function(){var t,e;null===(t=this.selectComponent("#chatEdit"))||void 0===t||null===(e=t.handleInputActivatorTap)||void 0===e||e.call(t)},previewImage:function(t){this.triggerEvent("previewimage",t.detail)},handleEditorStateChange:function(t){this.triggerEvent("editorstatechange",t.detail)}}});
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"chat-list":"./chat-list/chat-list","chat-edit":"./chat-edit/chat-edit","notification-message":"../notification-message/notification-message"}}
|
||||
@@ -0,0 +1,23 @@
|
||||
<view class="volc-chat-wrap {{isLandscape ? 'volc-chat-wrap-landscape' : ''}}">
|
||||
<slot name="top-area"></slot>
|
||||
<notification-message sdkInstance="{{sdkInstance}}" isLandscape="{{isLandscape}}" bind:commentCheck="commentCheck" />
|
||||
<chat-list
|
||||
class="volc-chat-list"
|
||||
id="chatList"
|
||||
sdkInstance="{{sdkInstance}}"
|
||||
isLandscape="{{isLandscape}}"
|
||||
chat-list="{{ chatList }}"
|
||||
bind:previewimage="previewImage"
|
||||
/>
|
||||
<chat-edit
|
||||
id="chatEdit"
|
||||
class="volc-chat-edit"
|
||||
sdkInstance="{{sdkInstance}}"
|
||||
isLandscape="{{isLandscape}}"
|
||||
externalEditorCloseSignal="{{externalEditorCloseSignal}}"
|
||||
bind:commentCheck="commentCheck"
|
||||
bind:editorstatechange="handleEditorStateChange"
|
||||
>
|
||||
<slot></slot>
|
||||
</chat-edit>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
.volc-chat-wrap{display:flex;flex-direction:column;position:relative;width:100%;height:100%;font-family:PingFang SC,Helvetica Neue,Helvetica,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Arial,sans-serif}.volc-chat-wrap-landscape{height:calc(100% - env(safe-area-inset-bottom))}.volc-chat-list{height:0;flex:1;position:relative}.volc-chat-edit{width:100%;height:55px;z-index:102}
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
<svg width="43" height="42" viewBox="0 0 43 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.928558" y="0.428711" width="41.1429" height="41.1429" rx="20.5714" fill="url(#paint0_linear_2570_76858)" fill-opacity="0.6"/>
|
||||
<g clip-path="url(#clip0_2570_76858)">
|
||||
<g filter="url(#filter0_d_2570_76858)">
|
||||
<path d="M31.0118 28.2805C31.2626 28.5319 31.4034 28.8724 31.4034 29.2275C31.4034 29.5825 31.2626 29.9231 31.0118 30.1744L30.0648 31.1215C29.365 31.8212 28.4446 32.2475 27.3289 32.3886C27.0523 32.4232 26.7737 32.4403 26.4949 32.4398C25.6829 32.4398 24.8069 32.3027 23.8796 32.03C21.3626 31.2902 18.7153 29.6218 16.4276 27.3335C14.14 25.0451 12.4709 22.3987 11.7311 19.8815C11.3628 18.6274 11.2416 17.4669 11.3725 16.4329C11.5136 15.3172 11.9399 14.3968 12.6396 13.697L13.5867 12.75C13.838 12.4992 14.1786 12.3584 14.5336 12.3584C14.8887 12.3584 15.2292 12.4992 15.4806 12.75L19.6476 16.9168C19.8984 17.1682 20.0392 17.5088 20.0392 17.8639C20.0392 18.219 19.8984 18.5595 19.6476 18.8109L18.7006 19.7573C18.1649 20.293 18.6981 22.0277 20.2158 23.5453C21.7336 25.0629 23.4674 25.5969 24.0038 25.0605L24.9509 24.1135C25.2022 23.8627 25.5428 23.7219 25.8979 23.7219C26.253 23.7219 26.5936 23.8627 26.8449 24.1135L31.0118 28.2805Z" fill="white"/>
|
||||
</g>
|
||||
<g filter="url(#filter1_d_2570_76858)">
|
||||
<path d="M27.9286 17.2904H23.6428C22.7589 17.2904 22.0357 16.7118 22.0357 16.0047V12.1475C22.0357 11.4404 22.7589 10.8618 23.6428 10.8618H27.9286C28.8125 10.8618 29.5357 11.4404 29.5357 12.1475V16.0047C29.5357 16.7118 28.8125 17.2904 27.9286 17.2904Z" fill="white"/>
|
||||
</g>
|
||||
<g filter="url(#filter2_d_2570_76858)">
|
||||
<path d="M31.1451 16.2183C31.4385 16.2183 31.6786 16.043 31.6786 15.8287V12.3222C31.6786 12.1079 31.4385 11.9326 31.1451 11.9326C31.065 11.9326 30.985 11.9521 30.9139 11.9716V11.9651L30.1848 12.2378C29.8025 12.4131 29.5357 12.7508 29.5357 13.1534V14.9846C29.5357 15.3872 29.7847 15.7183 30.1848 15.9066L30.8605 16.1599H30.8783C30.9672 16.1989 31.0473 16.2183 31.1451 16.2183V16.2183Z" fill="white"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_d_2570_76858" x="6.17858" y="8.92983" width="30.3677" height="30.3673" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dy="1.71429"/>
|
||||
<feGaussianBlur stdDeviation="2.57143"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.10625 0 0 0 0 0.5 0 0 0 0 0.477647 0 0 0 0.5 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2570_76858"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2570_76858" result="shape"/>
|
||||
</filter>
|
||||
<filter id="filter1_d_2570_76858" x="16.8928" y="7.43324" width="17.7857" height="16.7144" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dy="1.71429"/>
|
||||
<feGaussianBlur stdDeviation="2.57143"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.10625 0 0 0 0 0.5 0 0 0 0 0.477647 0 0 0 0.5 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2570_76858"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2570_76858" result="shape"/>
|
||||
</filter>
|
||||
<filter id="filter2_d_2570_76858" x="24.3928" y="8.50405" width="12.4286" height="14.5714" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dy="1.71429"/>
|
||||
<feGaussianBlur stdDeviation="2.57143"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.10625 0 0 0 0 0.5 0 0 0 0 0.477647 0 0 0 0.5 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2570_76858"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2570_76858" result="shape"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_2570_76858" x1="0.928558" y1="21.0001" x2="42.0714" y2="21.0001" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#4FFE80"/>
|
||||
<stop offset="1" stop-color="#00D0FE"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clip0_2570_76858">
|
||||
<rect width="27.4286" height="27.4286" fill="white" transform="translate(7.78571 7.28613)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,5 @@
|
||||
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.1399 4.80012H18.0007L17.6455 3.83052C17.4391 3.25932 16.8967 2.88012 16.2871 2.88012H8.71274C8.10314 2.88012 7.56074 3.25932 7.35434 3.83052L6.99914 4.80012H3.85994C2.80394 4.80012 1.93994 5.66412 1.93994 6.72012V19.2001C1.93994 20.2561 2.80394 21.1201 3.85994 21.1201H21.1399C22.1959 21.1201 23.0599 20.2561 23.0599 19.2001V6.72012C23.0599 5.66412 22.1959 4.80012 21.1399 4.80012ZM7.7432 13.424C7.748 13.448 7.8008 13.76 7.8008 13.76C8.2424 15.9488 10.1816 17.6 12.5 17.6C13.7183 17.6 14.8322 17.1452 15.6807 16.3933C15.8748 16.2213 15.8757 15.9257 15.7023 15.7329L15.1038 15.0676C14.9001 14.8412 14.5438 14.8515 14.3065 15.0425C13.8127 15.4401 13.1846 15.68 12.5 15.68C11.2088 15.68 10.124 14.8256 9.7592 13.6544C9.6728 13.3808 9.62 13.0976 9.62 12.8H10.3709C10.5441 12.8 10.6354 12.5949 10.5196 12.4662L9.03165 10.8129C8.83303 10.5922 8.48697 10.5922 8.28835 10.8129L6.80041 12.4662C6.68458 12.5949 6.77592 12.8 6.94907 12.8H7.7C7.7 13.0112 7.7432 13.424 7.7432 13.424ZM15.2406 11.9457C14.8758 10.7745 13.791 9.92008 12.4998 9.92008C11.8136 9.92008 11.1841 10.1611 10.6876 10.5603C10.451 10.7506 10.0961 10.7601 9.89296 10.5344L9.2927 9.86716C9.11928 9.6744 9.12025 9.37875 9.31431 9.20679C10.1628 8.45488 11.2767 8.00008 12.495 8.00008C14.8134 8.00008 16.7526 9.65128 17.1942 11.8401C17.1942 11.8401 17.2278 12.0129 17.2422 12.0993C17.247 12.1281 17.2998 12.5889 17.2998 12.8001H18.0507C18.2239 12.8001 18.3152 13.0052 18.1994 13.1339L16.7115 14.7871C16.5128 15.0078 16.1668 15.0078 15.9682 14.7871L14.4802 13.1339C14.3644 13.0052 14.4557 12.8001 14.6289 12.8001H15.3798C15.3798 12.5025 15.327 12.2193 15.2406 11.9457Z" fill="white"/>
|
||||
</svg>
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="1.77429" y="1.27393" width="21.4515" height="21.4515" rx="5.61039" fill="#E63F3F"/>
|
||||
<path d="M9.6959 13.901C9.96119 13.7296 10.0325 13.4556 10.097 13.2141C10.1623 12.9663 10.2186 12.4268 10.4511 12.318C11.6849 11.8038 13.2719 11.7468 14.5053 12.2685C14.7423 12.3801 14.8016 12.9203 14.8695 13.1693C14.935 13.4106 15.0101 13.6842 15.2753 13.8589C15.5139 14.0156 16.7166 14.1598 17.0878 14.1568C17.3329 14.155 17.5262 14.0955 17.6668 13.9765C18.1758 13.5095 18.0696 12.3134 18.0095 12.0621C17.9168 11.4905 17.4735 11.0498 16.6954 10.7561C14.6725 9.90024 10.2931 9.93507 8.24279 10.7744C7.85149 10.9163 7.54516 11.0976 7.32616 11.3166C7.11185 11.5309 6.98083 11.7816 6.93543 12.0642C6.88297 12.2592 6.77722 13.5091 7.29608 13.9924C7.43454 14.1094 7.629 14.1703 7.87273 14.1739C8.24439 14.18 9.45848 14.056 9.6959 13.901Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 946 B |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.84294 4.53446V5.34766C3.84294 6.33615 4.65464 7.13811 5.65605 7.13811H5.80176C5.99656 7.13811 6.18419 7.10776 6.36007 7.0516L3.84294 4.53446ZM6.99277 7.6843C6.6146 7.87975 6.18469 7.99036 5.72912 7.99036C4.22116 7.99036 2.99452 6.77906 2.99452 5.29035C2.99452 5.06993 2.81369 4.89176 2.59089 4.89176C2.36808 4.89176 2.18726 5.06993 2.18726 5.29035C2.18726 7.08358 3.56203 8.56433 5.32549 8.76322V9.56557C5.32549 9.78559 5.50592 9.96416 5.72912 9.96416C5.95193 9.96416 6.13276 9.78559 6.13276 9.56557V8.76322C6.65781 8.70399 7.14842 8.53107 7.57854 8.27007L6.99277 7.6843ZM8.76087 7.09538L8.17062 6.50512C8.3578 6.13977 8.46333 5.72699 8.46333 5.29035C8.46333 5.06993 8.64415 4.89176 8.86696 4.89176C9.08976 4.89176 9.27059 5.06993 9.27059 5.29035C9.27059 5.9505 9.08428 6.56829 8.76087 7.09538ZM7.53652 5.87103L4.12588 2.46039C4.44772 1.96165 5.01274 1.63086 5.65605 1.63086H5.80176C6.80317 1.63086 7.61528 2.43241 7.61528 3.4213V5.34766C7.61528 5.52973 7.58773 5.70546 7.53652 5.87103Z" fill="#E63F3F"/>
|
||||
<path d="M2.13472 2.82588C1.972 2.66316 1.972 2.39934 2.13472 2.23662C2.29743 2.0739 2.56125 2.0739 2.72397 2.23662L8.81295 8.3256C8.97566 8.48832 8.97566 8.75213 8.81295 8.91485C8.65023 9.07757 8.38641 9.07757 8.22369 8.91485L2.13472 2.82588Z" fill="#E63F3F"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M20.0312 9.82617C19.4964 9.82617 19.0624 10.2538 19.0624 10.7828C19.0624 14.3557 16.1185 17.2628 12.5004 17.2628C8.88124 17.2628 5.93731 14.3557 5.93731 10.7828C5.93731 10.2538 5.50333 9.82617 4.96859 9.82617C4.43386 9.82617 3.99988 10.2538 3.99988 10.7828C3.99988 15.0865 7.29933 18.6403 11.5316 19.1177V21.0433C11.5316 21.5714 11.9647 21.9999 12.5004 21.9999C13.0351 21.9999 13.4691 21.5714 13.4691 21.0433V19.1177C17.7004 18.6403 20.9999 15.0865 20.9999 10.7828C20.9999 10.2538 20.5659 9.82617 20.0312 9.82617Z" fill="white"/>
|
||||
<path d="M12.3253 15.2174H12.6751C15.0784 15.2174 17.0275 13.2927 17.0275 10.9203V6.29706C17.0275 3.92373 15.0784 2 12.6751 2H12.3253C9.92196 2 7.97388 3.92373 7.97388 6.29706V10.9203C7.97388 13.2927 9.92196 15.2174 12.3253 15.2174Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 891 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.99973 5.07475C2.91899 5.79625 2.2644 7.02269 2.2644 8.52895V15.5754C2.2644 18.0259 3.9968 19.7357 6.4781 19.7357H12.4119C14.2344 19.7357 15.6528 18.8133 16.2776 17.3526L3.99973 5.07475ZM21.9961 17.2759L18.2338 13.5135V9.06366C18.2338 8.42713 18.5821 7.85509 19.1435 7.57219L20.6618 6.80566C21.1115 6.57684 21.6392 6.60076 22.0684 6.87118C22.4977 7.14056 22.7538 7.60859 22.7538 8.12031V15.9843C22.7538 16.4971 22.4977 16.9641 22.0684 17.2334C22.0446 17.2483 22.0205 17.2625 21.9961 17.2759ZM16.6256 11.9053L9.08892 4.36865H12.4119C14.8932 4.36865 16.6256 6.07853 16.6256 8.52895V11.9053Z" fill="#E63F3F"/>
|
||||
<path d="M2.25981 3.33574C1.85973 2.93566 1.85973 2.287 2.25981 1.88692C2.65989 1.48684 3.30855 1.48684 3.70864 1.88692L21.5023 19.6806C21.9024 20.0807 21.9024 20.7294 21.5023 21.1294C21.1022 21.5295 20.4536 21.5295 20.0535 21.1294L2.25981 3.33574Z" fill="#E63F3F"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M22.5295 6.56441C22.0791 6.28068 21.5255 6.25558 21.0536 6.49566L19.4606 7.29992C18.8716 7.59674 18.5061 8.19693 18.5061 8.86478V15.1351C18.5061 15.8019 18.8716 16.4021 19.4606 16.7011L21.0525 17.5043C21.2686 17.6145 21.4997 17.669 21.7308 17.669C22.0081 17.669 22.2833 17.5905 22.5295 17.4366C22.9798 17.154 23.2486 16.664 23.2486 16.126V7.87501C23.2486 7.33811 22.9798 6.84704 22.5295 6.56441Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.1724 3.93848H12.3982C15.0016 3.93848 16.8193 5.7325 16.8193 8.30351V15.6968C16.8193 18.2678 15.0016 20.0618 12.3982 20.0618H6.1724C3.569 20.0618 1.75134 18.2678 1.75134 15.6968V8.30351C1.75134 5.7325 3.569 3.93848 6.1724 3.93848ZM6.51122 10.1573C7.27448 10.1573 7.89322 9.53853 7.89322 8.77528C7.89322 8.01202 7.27448 7.39328 6.51122 7.39328C5.74796 7.39328 5.12922 8.01202 5.12922 8.77528C5.12922 9.53853 5.74796 10.1573 6.51122 10.1573Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"GridLayout":"./gridLayout/gridLayout","Drawer":"../../pubComponents/drawer/drawer"}}
|
||||
@@ -0,0 +1,63 @@
|
||||
<!-- volc-mini-sdk/components/connect/connect.wxml -->
|
||||
<wxs src="./connect.wxs" module="CONNECT" />
|
||||
<view>
|
||||
<!-- 宫格布局 -->
|
||||
<GridLayout id='connect-layout' wx:if="{{connectStatus == CONNECT.ConnectStatus.Connecting}}" renderList="{{renderList}}" hasAudio="{{hasAudio}}" hasVideo="{{hasVideo}}" bind:showPanel="showPanel" isPortrait="{{isPortrait}}" connectLivePlayerAttrs="{{connectLivePlayerAttrs}}" />
|
||||
<!-- 连麦申请按钮 -->
|
||||
<view wx:if="{{connectStatus != CONNECT.ConnectStatus.Connecting}}" class="applyBt" bindtap="showPanel">
|
||||
<image src="https://p1-live.byteimg.com/tos-cn-i-gjr78lqtd0/f5313aaf92d0496b8e53d7596fb95d69~tplv-gjr78lqtd0-resize:88:0.webp"></image>
|
||||
<view class='tag' wx:if="{{connectStatus == CONNECT.ConnectStatus.Init}}">
|
||||
<view>申请连麦</view>
|
||||
</view>
|
||||
<view class='tag' wx:if="{{connectStatus == CONNECT.ConnectStatus.Applying}}">
|
||||
<view>申请中...</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部弹出框 -->
|
||||
<Drawer id='volc-connect-drawer' needCancel="{{connectStatus != CONNECT.ConnectStatus.Applying}}">
|
||||
<!-- 申请面板 -->
|
||||
<view class="applyPanel" wx:if="{{connectStatus == CONNECT.ConnectStatus.Init}}">
|
||||
<view class="item" data-type="video" bindtap="applyConnect" hover-class="buttonHover">
|
||||
<image src="./assets/video.svg"></image>
|
||||
视频连麦
|
||||
</view>
|
||||
<view class="item" data-type="audio" bindtap="applyConnect" hover-class="buttonHover">
|
||||
<image src="./assets/unmute.svg"></image>
|
||||
语音连麦
|
||||
</view>
|
||||
</view>
|
||||
<!-- 申请中,取消申请面板 -->
|
||||
<view class="cancelPanel" wx:if="{{connectStatus == CONNECT.ConnectStatus.Applying}}">
|
||||
<image src="./assets/apply2.svg"></image>
|
||||
<view class="tips">连麦申请已发送,请稍等...</view>
|
||||
<view class="cancelBt" bindtap="cancelApply" hover-class="buttonHover">取消申请</view>
|
||||
</view>
|
||||
<!-- 连麦设置面板 -->
|
||||
<view class="settingPanel" wx:if="{{connectStatus == CONNECT.ConnectStatus.Connecting}}">
|
||||
<view class="btBox" bindtap="switchCamera">
|
||||
<view class="icon">
|
||||
<image src="./assets/camera.svg"></image>
|
||||
</view>
|
||||
<view>翻转摄像头</view>
|
||||
</view>
|
||||
<view class="btBox" bindtap="changeAudioStatus">
|
||||
<view class="icon">
|
||||
<image src="{{hasAudio ? './assets/unmute.svg' : './assets/mute.svg'}}"></image>
|
||||
</view>
|
||||
<view>{{hasAudio? '静音' : '取消静音'}}</view>
|
||||
</view>
|
||||
<view class="btBox" bindtap="changeVideoStatus">
|
||||
<view class="icon">
|
||||
<image src="{{hasVideo ? './assets/video.svg' : './assets/unvideo.svg'}}"></image>
|
||||
</view>
|
||||
<view>{{hasVideo? '关闭摄像头' : '打开摄像头'}}</view>
|
||||
</view>
|
||||
<view class="btBox" bindtap="hangUpConnect">
|
||||
<view class="icon">
|
||||
<image src="./assets/hangup.svg"></image>
|
||||
</view>
|
||||
<view>断开连麦</view>
|
||||
</view>
|
||||
</view>
|
||||
</Drawer>
|
||||
</view>
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
ConnectStatus:{
|
||||
Init: 0, // 初始状态
|
||||
Applying: 1, // 申请中
|
||||
Connecting: 2, // 连麦中
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
.applyBt{position:fixed;width:50px;height:50px;bottom:55px;bottom:calc(env(safe-area-inset-bottom) + 55px);right:17px;z-index:1000}.applyBt image{width:100%;height:100%;background:rgba(0,0,0,.2);border-radius:7px}.applyBt .tag{width:50px;height:calc(14px + .5 * (1rem - 16px));background:rgba(0,0,0,.6);border-radius:20px;font-size:calc(9px + .5 * (1rem - 16px));display:flex;align-items:center;justify-content:center;position:absolute;bottom:0}.applyBt .tag view{background-clip:text;background:linear-gradient(90deg,#8bffac 0,#41ddff 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.applyPanel{display:flex;flex-direction:column;width:100%}.applyPanel .item{width:100%;height:calc(56px + .5 * (1rem - 16px));display:flex;align-items:center;justify-content:center;font-size:calc(16px + .5 * (1rem - 16px))}.applyPanel .item image{width:20px;height:20px;margin-right:15rpx}.cancelPanel{display:flex;flex-direction:column;align-items:center;font-size:calc(16px + .5 * (1rem - 16px))}.cancelPanel image{width:48px;height:48px;margin-bottom:8px}.cancelPanel .tips{background:linear-gradient(90deg,#8bffac 0,#41ddff 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.cancelPanel .cancelBt{color:#eb635e;height:56px;width:100%;display:flex;align-items:center;justify-content:center}.settingPanel{display:flex;background-color:#000;color:#fff;justify-content:space-between;padding:0 15px 8px 15px}.settingPanel .btBox{display:flex;flex-direction:column;font-size:calc(12px + .5 * (1rem - 16px));align-items:center}.settingPanel .btBox .icon{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.1);margin-bottom:8px}.settingPanel .btBox .icon image{width:24px;height:24px}.buttonHover{background-color:#1f1f1f}
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserVersion=exports.StreamType=exports.RoomStatus=exports.MediaType=exports.LinkStatus=exports.LeaveStatus=exports.LayoutMode=exports.Identity=exports.ControlStatus=exports.ConnectStatus=exports.AudioMuteMap=exports.ApplyStatus=void 0;var ConnectStatus={Init:0,Applying:1,Connecting:2};exports.ConnectStatus=ConnectStatus;var ApplyStatus={Apply:1,Cancel:2};exports.ApplyStatus=ApplyStatus;var LinkStatus={NOSTART:0,APPLYING:1,ALLOWING:2,CONNECTING:3};exports.LinkStatus=LinkStatus;var UserVersion={OLD:0,NEW:1};exports.UserVersion=UserVersion;var StreamType={VIDEO:0,SCREEN:1};exports.StreamType=StreamType;var RoomStatus={ENTER:1,LEAVE:2};exports.RoomStatus=RoomStatus;var Identity={Host:1,Guest:2,Audience:3};exports.Identity=Identity;var LeaveStatus={INITIATIVE:1,KICKED:2};exports.LeaveStatus=LeaveStatus;var ControlStatus={OPEN:1,CLOSE:2};exports.ControlStatus=ControlStatus;var MediaType={AUDIO:1,VIDEO:2,ALL:3};exports.MediaType=MediaType;var AudioMuteMap={noMute:1,Mute:2};exports.AudioMuteMap=AudioMuteMap;var LayoutMode={FullScreen:1,Gird:2,Speaker:3,CloseUp:4};exports.LayoutMode=LayoutMode;
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";Component({properties:{renderList:{type:Array,value:[]},connectLivePlayerAttrs:{type:Object,value:{}},hasVideo:{type:Boolean,value:!1},hasAudio:{type:Boolean,value:!1},isPortrait:{type:Boolean,value:!0}},data:{},methods:{showPanel:function(){this.triggerEvent("showPanel")}}});
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"v-player":"../v-player/v-player","v-pusher":"../v-pusher/v-pusher"}}
|
||||
@@ -0,0 +1,34 @@
|
||||
<view class="layout-contianer" style="top: {{isPortrait ? '90px': '0px'}}">
|
||||
<block wx:for="{{renderList}}" wx:key="id">
|
||||
<!-- player -->
|
||||
<view wx:if="{{!item.isMe}}" class="player-block {{item.isShow ? '' : 'hide'}}" style="left: {{item.styles.left}};top:{{item.styles.top}};width: {{item.styles.width}};height:{{item.styles.height}};z-index:{{item.styles.zIndex}};">
|
||||
<v-player url="{{item.url || ''}}" uid="{{item.userId}}" screen="{{item.isScreen ? '1' : '0'}}" state='init' connectLivePlayerAttrs="{{connectLivePlayerAttrs}}" />
|
||||
<view wx:if="{{!item.hasVideo}}" class="back" style="background: url({{item.styles.image}});background-size: cover;"></view>
|
||||
<view class="position" wx:if="{{item.isShow && item.isShowLabel}}">
|
||||
<view class="tag" wx:if="{{item.isHost}}">主持人</view>
|
||||
<view class="tag" wx:if="{{item.isPresenter && !item.isHost}}">主讲</view>
|
||||
<view wx:if="{{!item.hasAudio}}" class="mute">
|
||||
<image src="../assets/mute.svg" />
|
||||
</view>
|
||||
<view class="name">{{item.nickname || '主持人'}}</view>
|
||||
<view wx:if="{{item.isAudience}}">(观众)</view>
|
||||
<span wx:if="{{item.isScreen}}">正在共享屏幕</span>
|
||||
</view>
|
||||
</view>
|
||||
<!-- pusher -->
|
||||
<view wx:if="{{item.isMe}}" class="player-block {{item.isShow ?'' : 'outer'}}" style="left: {{item.styles.left}};top:{{item.styles.top}};width: {{item.styles.width}};height:{{item.styles.height}};z-index:{{item.styles.zIndex}};" bindtap="showPanel">
|
||||
<v-pusher id="v-pusher" url="{{item.url || ''}}" enableCamera="{{hasVideo}}" enableMic="{{hasAudio}}" beauty="0" state="init" />
|
||||
<view wx:if="{{!hasVideo}}" class="back" style="background: url({{item.styles.image}}); background-size: cover;"></view>
|
||||
<view class="position">
|
||||
<view wx:if="{{!hasAudio}}" class="mute">
|
||||
<image src="../assets/mute.svg" />
|
||||
</view>
|
||||
<view class="name">{{item.nickname}}</view>
|
||||
<view wx:if="{{item.isAudience && item.isShow}}">(观众)</view>
|
||||
</view>
|
||||
<view class="moreBt">
|
||||
<image src="../assets/more.png" />
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
.layout-contianer{display:flex;width:100vw;height:56.25vw;flex-wrap:wrap;justify-content:center;align-items:center;background-color:rgba(0,0,0,.6);position:absolute;z-index:1000}.layout-contianer .player-block{display:block;position:absolute}.layout-contianer .player-block .back{width:100%;height:100%;z-index:9;position:absolute;left:0;bottom:0;background-size:cover}.layout-contianer .player-block .position{position:absolute;left:2px;bottom:2px;color:#fff;font-size:calc(10px + .5 * (1rem - 16px));background:rgba(0,0,0,.6);border-radius:2px;z-index:10;display:flex;align-items:center;padding:0 8rpx;white-space:nowrap;flex-wrap:nowrap;max-width:90%}.layout-contianer .player-block .position .tag{background:#d4d4d2;font-size:calc(8px + .5 * (1rem - 16px));border-radius:1.25px;color:#151716;margin-right:5rpx;padding:0 8rpx}.layout-contianer .player-block .position .mute{display:flex;align-items:center;justify-content:center;margin-right:5rpx}.layout-contianer .player-block .position .mute image{width:10px;height:10px}.layout-contianer .player-block .position .name{display:inline;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.layout-contianer .player-block v-player{width:100%;height:100%}.layout-contianer .player-block v-pusher{width:100%;height:100%}.layout-contianer .player-block .moreBt{position:absolute;top:0;right:5px;width:24px;height:24px;z-index:10}.layout-contianer .player-block .moreBt image{width:100%;height:38%}.layout-contianer .outer{position:fixed;right:20rpx;bottom:150rpx;width:96px!important;height:96px!important;display:block;border-radius:6px!important;overflow:hidden}.layout-contianer .outer live-pusher{border-radius:6px!important}.layout-contianer .outer .back{background-repeat:no-repeat;background-position:center center!important;border-radius:6px!important}.layout-contianer .outer .position{font-size:calc(11px + .5 * (1rem - 16px))!important}.layout-contianer .outer .mute image{width:14px!important;height:14px!important}.layout-contianer .hide{display:none}
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";Component({properties:{url:{type:String,value:""},connectLivePlayerAttrs:{type:Object,value:{}},uid:{type:String,value:""},screen:{type:String,value:"0"},state:{type:String,value:"init"}},data:{},lifetimes:{ready:function(){this.livePlayerContext||(this.livePlayerContext=wx.createLivePlayerContext("v-player-".concat(this.data.uid,"-").concat(this.data.screen),this))},detached:function(){this.livePlayerContext&&this.livePlayerContext.stop()}},methods:{bindstatechange:function(t){this.triggerEvent("playerstatechange",{uid:this.data.uid,e:t}),2004===t.detail.code?"init"===this.data.state&&this.setData({state:"ok"}):-2301===t.detail.code&&this.setData({state:"error"})},bindnetstatuschange:function(t){this.triggerEvent("playernetstatuschange",{uid:this.data.uid,e:t})}}});
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{}}
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--volc-mini-sdk/components/connect/v-player/v-player.wxml-->
|
||||
<view class="player-view">
|
||||
<!--
|
||||
mode: RTC 实时通话
|
||||
其他配置请参考小程序文档: https://developers.weixin.qq.com/miniprogram/dev/component/live-player.html
|
||||
-->
|
||||
<!-- @build:exclude-in-video-only -->
|
||||
<live-player
|
||||
src="{{url}}"
|
||||
id="v-player-{{uid}}-{{screen}}"
|
||||
data-uid="{{uid}}"
|
||||
class="player"
|
||||
mode="RTC"
|
||||
autoplay="true"
|
||||
object-fit="{{connectLivePlayerAttrs['object-fit']}}"
|
||||
picture-in-picture-mode="{{connectLivePlayerAttrs['picture-in-picture-mode']}}"
|
||||
background-mute="true"
|
||||
bindstatechange="bindstatechange"
|
||||
bindnetstatus="bindnetstatuschange"
|
||||
/>
|
||||
<!-- @build:end-exclude-in-video-only -->
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
.player-view{width:100%;height:100%}.player-view .player{width:100%;height:100%;border-radius:2px}
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";Component({properties:{url:{type:String,value:""},enableCamera:{type:Boolean,value:!0},enableMic:{type:Boolean,value:!0},beauty:{type:Number,value:0},state:{type:String,value:"init"}},data:{},lifetimes:{ready:function(){this.livePusherContext||(this.livePusherContext=wx.createLivePusherContext(this))},detached:function(){console.log("detached")}},methods:{stop:function(){this.livePusherContext&&this.livePusherContext.stop()},switchCamera:function(){this.livePusherContext&&this.livePusherContext.switchCamera()},bindstatechange:function(t){console.log("bindstatechange",t),this.triggerEvent("pusherstatechange",t),-1307===t.detail.code&&this.setData({state:"error"}),1008===t.detail.code&&"init"===this.data.state&&this.setData({state:"ok"})},bindnetstatus:function(t){this.triggerEvent("pushernetstatuschange",t)}}});
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{}}
|
||||
@@ -0,0 +1,23 @@
|
||||
<!--volc-mini-sdk/components/connect/v-pusher/v-pusher.wxml-->
|
||||
<view class="pusher-view">
|
||||
<!--
|
||||
mode: RTC 实时通话
|
||||
background-mute: true 进入后台静音(兼容旧版本)
|
||||
其他配置请参考小程序文档: https://developers.weixin.qq.com/miniprogram/dev/component/live-pusher.html
|
||||
-->
|
||||
<live-pusher
|
||||
class="pusher"
|
||||
url="{{url}}"
|
||||
mode="RTC"
|
||||
autopush="true"
|
||||
max-bitrate="500"
|
||||
min-bitrate="200"
|
||||
beauty="{{beauty}}"
|
||||
background-mute="true"
|
||||
bindstatechange="bindstatechange"
|
||||
bindnetstatus="bindnetstatus"
|
||||
enable-camera="{{enableCamera}}"
|
||||
enable-mic="{{enableMic}}"
|
||||
aspect="3:4"
|
||||
/>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
.pusher-view{width:100%;height:100%}.pusher-view .pusher{width:100%;height:100%;border-radius:2px}
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"Dialog":"../../pubComponents/dialog/dialog","mp-icon":"weui-miniprogram/icon/icon","custom-button":"../../pubComponents/button/button"}}
|
||||
@@ -0,0 +1,94 @@
|
||||
<Dialog
|
||||
visible="{{visible}}"
|
||||
maskClosable="{{true}}"
|
||||
zIndex="{{20000}}"
|
||||
containerClass="coupon-dialog-container {{useDarkTheme ? 'coupon-dialog-container-dark' : ''}}"
|
||||
containerStyle="width: 560rpx; background: transparent; overflow: visible; border-radius: 0;"
|
||||
bind:close="closeCouponDrawer"
|
||||
>
|
||||
<view class="coupon-card">
|
||||
<view class="coupon-tab">卡券</view>
|
||||
|
||||
<view class="coupon-contain">
|
||||
<view class="coupon-contain-top">
|
||||
<view class="coupon-main-title">{{title}}</view>
|
||||
<view wx:if="{{desc}}" class="coupon-sub-title">{{desc}}</view>
|
||||
|
||||
<view wx:if="{{imageUrl}}" class="coupon-image-wrap">
|
||||
<image class="coupon-image" src="{{imageUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{showText}}" class="coupon-contain-middle">
|
||||
<view class="coupon-pickup-condition">满足以下条件即可领取</view>
|
||||
<view wx:if="{{isHasLimit}}" class="coupon-pickup-condition-desc">
|
||||
<view class="coupon-pickup-condition-desc-text">观看本场直播</view>
|
||||
<view class="can-pickup-coupon">
|
||||
<text wx:if="{{canPickUp}}">已满足</text>
|
||||
<text wx:else>未满足</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{IsViewerLevelLimit}}" class="coupon-pickup-condition-desc">
|
||||
<view class="coupon-pickup-condition-desc-text">达到可领取卡券的观众等级</view>
|
||||
<view class="can-pickup-coupon">
|
||||
<text wx:if="{{isLevelEligible}}">已满足</text>
|
||||
<text wx:else>未满足</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{!isPopup && (isNeedCountDown || isNeedCutOff)}}" class="coupon-countdown-wrap">
|
||||
<view wx:if="{{isNeedCountDown && countdownArr.length}}" class="coupon-countdown">
|
||||
<view class="countdown-box">{{countdownArr[0]}}</view>
|
||||
<view class="countdown-sep">:</view>
|
||||
<view class="countdown-box">{{countdownArr[1]}}</view>
|
||||
<view class="countdown-sep">:</view>
|
||||
<view class="countdown-box">{{countdownArr[2]}}</view>
|
||||
<text class="countdown-text">后截止</text>
|
||||
</view>
|
||||
<view wx:if="{{isNeedCutOff}}" class="coupon-cutoff">
|
||||
<text>截止至</text> {{cutOffText}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupon-contain-bottom">
|
||||
<view wx:if="{{isPopup && (isNeedCountDown || isNeedCutOff)}}" class="coupon-countdown-wrap">
|
||||
<view wx:if="{{isNeedCountDown && countdownArr.length}}" class="coupon-countdown">
|
||||
<view class="countdown-box">{{countdownArr[0]}}</view>
|
||||
<view class="countdown-sep">:</view>
|
||||
<view class="countdown-box">{{countdownArr[1]}}</view>
|
||||
<view class="countdown-sep">:</view>
|
||||
<view class="countdown-box">{{countdownArr[2]}}</view>
|
||||
<text class="countdown-text">后截止</text>
|
||||
</view>
|
||||
<view wx:if="{{isNeedCutOff}}" class="coupon-cutoff">
|
||||
<text>截止至</text> {{cutOffText}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{countText || timeText}}" class="coupon-meta">
|
||||
<text wx:if="{{countText}}">{{countText}} </text>
|
||||
<text wx:if="{{timeText}}">{{timeText}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<custom-button
|
||||
class="coupon-btn-host"
|
||||
custom-class="coupon-btn"
|
||||
type="primary"
|
||||
size="44"
|
||||
disabled="{{btnDisabled}}"
|
||||
bind:click="onPickup"
|
||||
>
|
||||
{{btnText}}
|
||||
</custom-button>
|
||||
<view class="coupon-tip">{{tipText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupon-close" bindtap="closeCouponDrawer">
|
||||
<image src="../../assets/icon_close_btn.svg" class="coupon-close-icon" />
|
||||
</view>
|
||||
</view>
|
||||
</Dialog>
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"Drawer":"../../../pubComponents/drawer/drawer","mp-icon":"weui-miniprogram/icon/icon","custom-button":"../../../pubComponents/button/button"}}
|
||||
@@ -0,0 +1,53 @@
|
||||
<view wx:if="{{showEntry && hasValidCoupons}}" class="coupon-entry-container {{mode === 'landscape' ? 'landscape' : ''}}" catchtap="openListDrawer">
|
||||
<view class="coupon-entry-wrap {{entryTheme === 'dark' || (mode === 'landscape' && useDarkTheme) ? 'dark' : ''}}">
|
||||
<image class="coupon-entry-icon" src="../../../assets/coupon.svg" mode="aspectFit" />
|
||||
<view class="coupon-entry-text">卡券</view>
|
||||
</view>
|
||||
</view>
|
||||
<Drawer id="coupon-list-drawer" class="coupon-list-drawer {{mode === 'landscape' ? 'landscape' : ''}}" needCancel="{{false}}" themeColor="{{drawerTheme}}" bind:myCancel="closeListDrawer">
|
||||
<view class="coupon-list-container {{mode === 'landscape' ? 'landscape' : ''}}">
|
||||
<view class="coupon-list-header">
|
||||
<view class="coupon-list-title">卡券</view>
|
||||
<view class="coupon-list-sub">
|
||||
<text>共 {{couponList.length}} 个卡券</text>
|
||||
<text class="view-products-btn" bindtap="onViewProducts">查看商品</text>
|
||||
</view>
|
||||
<view class="coupon-close-btn" bindtap="onViewProducts">
|
||||
<image src="../../../assets/common_close.png" class="close-icon" />
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="coupon-list-scroll">
|
||||
<block wx:if="{{couponList.length > 0}}">
|
||||
<view class="coupon-list-item {{item._display.isReceived ? 'received' : ''}}" wx:for="{{couponList}}" wx:key="Id" data-id="{{item.Id}}" bindtap="onCouponItemClick">
|
||||
<image class="coupon-list-bg" src="../../../assets/Subtract.png" />
|
||||
<view class="item-left">
|
||||
<image class="item-img" src="{{item._display.imageUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="item-center">
|
||||
<view class="item-title">{{item._display.title}}</view>
|
||||
<view class="item-desc">{{item._display.desc}}</view>
|
||||
<view class="item-meta">
|
||||
<text wx:if="{{item._display.countText}}">{{item._display.countText}}</text>
|
||||
</view>
|
||||
<view class="item-meta-time">
|
||||
<text wx:if="{{item._display.timeText}}" class="item-time">
|
||||
{{item._display.timeText}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<view wx:if="{{item._display.isReceived}}" class="received-btn">已领取</view>
|
||||
<view wx:else class="action-btn {{item._display.btnDisabled ? 'disabled' : ''}}" data-id="{{item.Id}}" catchtap="onPickupFromList">
|
||||
{{item._display.btnText}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="scroll-bottom-spacer"></view>
|
||||
</block>
|
||||
<view wx:else class="coupon-list-empty">
|
||||
<image src="../../../assets/no_content.svg" class="empty-icon" />
|
||||
<view class="empty-text">暂无卡券</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</Drawer>
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";Component({properties:{icon:{type:String,value:""},describeText:{type:String,value:""},title:{type:String,value:""},buttonText:{type:String,value:""},buttonType:{type:String,value:"primary"},useDarkTheme:{type:Boolean,value:""},current:{type:Object,value:null},showCountDown:{type:Boolean,value:!1}},data:{visible:!0},lifetimes:{attached:function(){}},observers:{},methods:{onClick:function(){this.triggerEvent("onClick")}}});
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"count-down":"../../image-text-float/count-down/count-down"}}
|
||||
@@ -0,0 +1,16 @@
|
||||
<view class="image-text-item-card {{useDarkTheme ? 'image-text-item-card-dark' : ''}}" bindtap="onClick">
|
||||
<view class="image-text-item-prefix">
|
||||
<image src="{{icon}}" />
|
||||
<count-down class="count-down" wx:if="{{showCountDown}}" sendTime="{{current.SendTime}}" deadLine="{{current.Deadline || current.DeadLine}}" deadLineSecond="{{current.DeadlineSecond || current.DeadLineSecond}}" />
|
||||
</view>
|
||||
<view class="image-text-item-content">
|
||||
<view class="image-text-item-content-title">{{title}}</view>
|
||||
<view wx:if="{{describeText}}" class="image-text-item-content-info">
|
||||
<view class="image-text-item-content-describe">{{describeText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="image-text-item-btn">
|
||||
<!-- CTA 自身和整卡都可点击;这里截断冒泡,避免按钮点击时重复触发 feature.click。 -->
|
||||
<view class="image-text-item-content-button image-text-item-content-button-{{buttonType || 'primary'}}" catchtap="onClick">{{buttonText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
.image-text-item-card{padding:24rpx;display:flex;align-items:center;justify-content:flex-start;border-radius:16rpx;border:2rpx solid rgba(22,24,35,.08);background-color:rgba(255,255,255,.5);width:100%;box-sizing:border-box}.image-text-item-prefix{flex:0 0 72rpx;width:72rpx;height:72rpx;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;border:1rpx solid rgba(22,24,35,.12);border-radius:16rpx;background-color:#fff;box-sizing:border-box}.image-text-item-prefix image{width:100%;height:100%;border-radius:14rpx}.count-down{font-weight:600;font-size:calc(24rpx + .5 * (1rem - 16px));position:absolute;min-width:100%;text-align:center;display:flex;justify-content:center;align-items:center;height:calc(24rpx + .5 * (1rem - 16px));line-height:calc(24rpx + .5 * (1rem - 16px));bottom:0;color:#fff;background:rgba(0,0,0,.5);border-radius:16rpx}.image-text-item-content{flex:1;display:flex;padding-left:24rpx;padding-right:20rpx;flex-direction:column;justify-content:space-between;overflow:hidden}.image-text-item-content-info{display:flex;align-items:center;margin-top:8rpx;color:rgba(22,24,35,.6);overflow:hidden}.image-text-item-content-title{color:#161823;font-size:calc(28rpx + .5 * (1rem - 16px));font-weight:500;line-height:calc(44rpx + .5 * (1rem - 16px));padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-text-item-content-describe{flex:1;font-size:calc(24rpx + .5 * (1rem - 16px));line-height:calc(34rpx + .5 * (1rem - 16px));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-text-item-btn{flex-shrink:0;margin-left:auto;display:flex;white-space:nowrap}.image-text-item-content-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:calc(56rpx + .5 * (1rem - 16px));border-radius:8rpx;padding:0 20rpx;font-size:calc(28rpx + .5 * (1rem - 16px));line-height:calc(40rpx + .5 * (1rem - 16px));white-space:nowrap;box-sizing:border-box}.image-text-item-content-button-primary{color:#fff;background-color:#fe2c55;border:2rpx solid transparent}.image-text-item-content-button-ghost{color:#323b47;background-color:#fff;border:2rpx solid rgba(22,24,35,.34)}.image-text-item-content-button-minor{color:#fe2c55;background-color:rgba(254,44,85,.08);border:2rpx solid transparent}.image-text-item-content-button view{color:inherit!important}.image-text-item-content-button>svg{margin-left:8rpx;width:24rpx;height:24rpx}.image-text-item-card-dark{border-color:rgba(22,24,35,.08);background-color:rgba(255,255,255,.1)}.image-text-item-card-dark .image-text-item-prefix{border-color:rgba(255,255,255,.08);background-color:rgba(22,24,35,.15)}.image-text-item-card-dark .image-text-item-content-title{color:rgba(255,255,255,.9)}.image-text-item-card-dark .image-text-item-content-info{color:rgba(255,255,255,.5)}.image-text-item-card-dark .image-text-item-content-button-primary{color:#fff;background-color:#fe2c55;border-color:transparent}.image-text-item-card-dark .image-text-item-content-button-minor{color:#fe2c55;background-color:rgba(254,44,85,.2);border-color:transparent}.image-text-item-card-dark .image-text-item-content-button-ghost{color:#fff;background-color:rgba(255,255,255,.06);border-color:transparent}.image-text-item-card-dark .image-text-item-content-button view{color:inherit!important}
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"card-item":"./card-item/card-item"}}
|
||||