小程序接入支付功能
This commit is contained in:
1 parent
edf1e51846
commit
07a90e860d
38 files changed
+3644
-90
No files matched your search
@@ -349,7 +349,7 @@ Page({
|
||||
|
||||
const animations = skeletonData.animations.map((a) => a.name)
|
||||
if (!animations.length) {
|
||||
this.setData({ status: 'error', errorMsg: '该骨骼文件里没有任何动画' })
|
||||
this.setData({ status: 'error', errorMsg: '该骨骼文件里没有可播放的内容' })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ Page({
|
||||
skeletonData.slots.length +
|
||||
'插槽 · ' +
|
||||
animations.length +
|
||||
'动画 · ' +
|
||||
'段画面 · ' +
|
||||
atlas.pages.length +
|
||||
'图集页 · 文件声明PMA ' +
|
||||
(this._pma ? '是' : '否'),
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<!-- 空状态 -->
|
||||
<view wx:if="{{status === 'idle'}}" class="stage-mask">
|
||||
<view class="empty-icon">🎬</view>
|
||||
<view class="empty-title">Spine 动画预览</view>
|
||||
<view class="empty-sub">支持 Spine 4.2 导出的 .skel / .atlas / .png</view>
|
||||
<view class="empty-tip">把三个文件发到「文件传输助手」后在下方选择;真机可一次多选,PC 可分多次选</view>
|
||||
<view class="empty-title">Spine 画面预览</view>
|
||||
<view class="empty-sub">小程序版本可支持 Spine 4.2 导出的 .skel / .atlas / .png</view>
|
||||
<view class="empty-tip">先把 .skel / .atlas / 图片发到「文件传输助手」,再在下方一次选中即可;文件只在本地解析,不会上传</view>
|
||||
</view>
|
||||
|
||||
<!-- 加载中 -->
|
||||
@@ -39,17 +39,12 @@
|
||||
|
||||
<!-- ===== 控制面板 ===== -->
|
||||
<view class="sheet">
|
||||
<view class="grabber"></view>
|
||||
|
||||
<!-- 文件 -->
|
||||
<view class="section">
|
||||
<view class="section-title">文件</view>
|
||||
|
||||
<button class="pick-btn" bindtap="chooseFiles">
|
||||
<text class="pick-icon">📁</text>
|
||||
<text class="pick-text">选择文件</text>
|
||||
<text class="pick-hint">可多选</text>
|
||||
<text class="pick-text">{{pickedCount ? '重新选择文件' : '选择文件'}}</text>
|
||||
</button>
|
||||
<view class="pick-sub">可一次选中多个文件 · .skel / .atlas / .png</view>
|
||||
|
||||
<view wx:if="{{pickedCount}}" class="chips">
|
||||
<view wx:for="{{pickedFiles}}" wx:key="id" class="chip chip-{{item.kind}}">
|
||||
@@ -58,7 +53,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{missingText}}" class="missing">● {{missingText}}</view>
|
||||
<view wx:if="{{missingText}}" class="missing">{{missingText}}</view>
|
||||
|
||||
<view wx:if="{{pickedCount}}" class="link" bindtap="clearFiles">清空已选</view>
|
||||
</view>
|
||||
@@ -90,7 +85,7 @@
|
||||
<slider
|
||||
class="param-slider"
|
||||
min="0.1" max="3" step="0.1" value="{{speed}}"
|
||||
activeColor="#4a6cf7" backgroundColor="#e9ecf5" block-color="#4a6cf7" block-size="16"
|
||||
activeColor="#f2353b" backgroundColor="#2c2c35" block-color="#f2353b" block-size="16"
|
||||
bindchange="onSpeedChange"
|
||||
/>
|
||||
<text class="param-val">{{speed}}x</text>
|
||||
|
||||
+55
-66
@@ -3,7 +3,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
background: #16181d;
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
/* ===== 预览区(深色)===== */
|
||||
@@ -11,7 +11,7 @@
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
background: linear-gradient(180deg, #21252d 0%, #14161b 100%);
|
||||
background: linear-gradient(180deg, var(--panel) 0%, #14161b 100%);
|
||||
}
|
||||
|
||||
.stage-canvas {
|
||||
@@ -70,26 +70,18 @@
|
||||
left: 22rpx;
|
||||
top: 22rpx;
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 999rpx;
|
||||
border-radius: var(--r-pill);
|
||||
background: rgba(0, 0, 0, 0.34);
|
||||
color: rgba(255, 255, 255, 0.72);
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
/* ===== 控制面板(白色圆角卡片)===== */
|
||||
/* ===== 控制面板(深色,和预览区统一)===== */
|
||||
.sheet {
|
||||
background: #ffffff;
|
||||
border-radius: 32rpx 32rpx 0 0;
|
||||
padding: 0 28rpx 28rpx;
|
||||
box-shadow: 0 -10rpx 36rpx rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.grabber {
|
||||
width: 76rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 4rpx;
|
||||
background: #e3e6ee;
|
||||
margin: 14rpx auto 18rpx;
|
||||
background: var(--bg-2);
|
||||
border-radius: var(--r-lg) var(--r-lg) 0 0;
|
||||
padding: 30rpx 28rpx 28rpx;
|
||||
box-shadow: 0 -10rpx 36rpx rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.section {
|
||||
@@ -101,10 +93,10 @@
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 23rpx;
|
||||
color: #9aa1b1;
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.92);
|
||||
font-weight: 600;
|
||||
letter-spacing: 2rpx;
|
||||
letter-spacing: 1rpx;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
@@ -114,35 +106,29 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 94rpx;
|
||||
height: 100rpx;
|
||||
padding: 0;
|
||||
border-radius: 16rpx;
|
||||
background: linear-gradient(135deg, #4a6cf7 0%, #6d8bff 100%);
|
||||
border-radius: var(--r-lg);
|
||||
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
|
||||
color: #ffffff;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 8rpx 20rpx rgba(74, 108, 247, 0.3);
|
||||
box-shadow: 0 10rpx 24rpx rgba(242, 53, 59, 0.28);
|
||||
}
|
||||
|
||||
.pick-btn::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.pick-icon {
|
||||
font-size: 32rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.pick-text {
|
||||
font-size: 30rpx;
|
||||
font-size: 31rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
.pick-hint {
|
||||
margin-left: 14rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 999rpx;
|
||||
background: rgba(255, 255, 255, 0.22);
|
||||
font-size: 21rpx;
|
||||
.pick-sub {
|
||||
margin-top: 16rpx;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
color: rgba(255, 255, 255, 0.38);
|
||||
}
|
||||
|
||||
/* ===== 文件类型标签 ===== */
|
||||
@@ -157,26 +143,26 @@
|
||||
align-items: center;
|
||||
margin: 0 12rpx 12rpx 0;
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #f3f5f9;
|
||||
border-radius: var(--r-pill);
|
||||
background: var(--panel-2);
|
||||
}
|
||||
|
||||
.chip-dot {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background: #94a3b8;
|
||||
background: var(--text-dim);
|
||||
margin-right: 10rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chip-name {
|
||||
font-size: 23rpx;
|
||||
color: #4a5264;
|
||||
color: rgba(255, 255, 255, 0.72);
|
||||
}
|
||||
|
||||
.chip-skel .chip-dot {
|
||||
background: #4a6cf7;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.chip-atlas .chip-dot {
|
||||
@@ -192,24 +178,27 @@
|
||||
}
|
||||
|
||||
.missing {
|
||||
margin-top: 2rpx;
|
||||
font-size: 24rpx;
|
||||
color: #f59e0b;
|
||||
margin-top: 18rpx;
|
||||
padding: 14rpx 20rpx;
|
||||
border-radius: var(--r-lg);
|
||||
background: rgba(245, 158, 11, 0.1);
|
||||
font-size: 23rpx;
|
||||
color: #f0b45c;
|
||||
}
|
||||
|
||||
.link {
|
||||
margin-top: 14rpx;
|
||||
font-size: 24rpx;
|
||||
color: #9aa1b1;
|
||||
color: rgba(255, 255, 255, 0.45);
|
||||
}
|
||||
|
||||
.link.inline {
|
||||
margin-top: 0;
|
||||
margin-left: 18rpx;
|
||||
color: #4a6cf7;
|
||||
color: var(--cyan);
|
||||
}
|
||||
|
||||
/* ===== 动画选择 ===== */
|
||||
/* ===== 播放选择 ===== */
|
||||
.select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -217,27 +206,27 @@
|
||||
height: 86rpx;
|
||||
padding: 0 26rpx;
|
||||
margin-bottom: 14rpx;
|
||||
background: #f5f6fa;
|
||||
border-radius: 14rpx;
|
||||
background: var(--panel-2);
|
||||
border-radius: var(--r-lg);
|
||||
}
|
||||
|
||||
.select-label {
|
||||
font-size: 29rpx;
|
||||
font-weight: 500;
|
||||
color: #1f2430;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.select-arrow {
|
||||
font-size: 26rpx;
|
||||
color: #9aa1b1;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
/* ===== 分段控件 ===== */
|
||||
.segment {
|
||||
display: flex;
|
||||
padding: 6rpx;
|
||||
background: #f2f4f8;
|
||||
border-radius: 14rpx;
|
||||
background: var(--panel-2);
|
||||
border-radius: var(--r-lg);
|
||||
}
|
||||
|
||||
.seg {
|
||||
@@ -246,15 +235,15 @@
|
||||
line-height: 68rpx;
|
||||
text-align: center;
|
||||
font-size: 25rpx;
|
||||
color: #7b8290;
|
||||
border-radius: 10rpx;
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
border-radius: var(--r-md);
|
||||
}
|
||||
|
||||
.seg.on {
|
||||
background: #ffffff;
|
||||
color: #4a6cf7;
|
||||
background: #3d262e;
|
||||
color: var(--cyan);
|
||||
font-weight: 600;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
/* ===== 参数行 ===== */
|
||||
@@ -268,7 +257,7 @@
|
||||
width: 76rpx;
|
||||
flex-shrink: 0;
|
||||
font-size: 26rpx;
|
||||
color: #6b7280;
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
}
|
||||
|
||||
.param-slider {
|
||||
@@ -282,7 +271,7 @@
|
||||
text-align: right;
|
||||
font-size: 25rpx;
|
||||
font-weight: 600;
|
||||
color: #4a6cf7;
|
||||
color: var(--cyan);
|
||||
}
|
||||
|
||||
/* ===== 缩放步进器 ===== */
|
||||
@@ -290,8 +279,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 16rpx;
|
||||
background: #f2f4f8;
|
||||
border-radius: 12rpx;
|
||||
background: var(--panel-2);
|
||||
border-radius: var(--r-lg);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -301,11 +290,11 @@
|
||||
line-height: 64rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #4a5264;
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
}
|
||||
|
||||
.step-btn:active {
|
||||
background: #e6e9f2;
|
||||
background: var(--panel-2);
|
||||
}
|
||||
|
||||
.step-val {
|
||||
@@ -313,12 +302,12 @@
|
||||
text-align: center;
|
||||
font-size: 25rpx;
|
||||
font-weight: 600;
|
||||
color: #1f2430;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.gesture-hint {
|
||||
margin-top: 4rpx;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
color: #b6bcc9;
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
Reference in new issue
Block a user