+
95
-

微信小程序如何开发一个开屏动画slogo?

微信小程序如何开发一个开屏动画slogo?


网友回复

+
15
-

小程序不支持开屏slogo播放,但是你可以自己做个view组件来实现,组件内可以播放视频或者gif动画图片作为引导页,还可以跳过引导页,具体步骤如下:

新建一个组件叫kaiping_component

kaiping_component.wxml

<view class="kaiping_box">
<image src="{{imagepath}}" mode="aspectFill"></image>
<view class="kaiping-header">
<view class="kaiping-btn" bindtap="skipAnimation">跳过 {{second}}s</view>
</view>
</view>
kaiping_component.js
// component/kaiping_component.js
Component({
/**
* 组件的属性列表
*/
properties: {
imagepath: {
type: String
},
second: {
type: Number
}
},

/**
* 组件的初始数据
*/
data: {
timer: null
},

lifetimes: {
created: function () {

},
attached: function () {
let secondTime = this.data.second;
let that = this;

const timer = setInterval(function () {
let ...

点击查看剩余70%

+
15
-

上面的index.wxml要修改一下:

index.wxml

<view class="intro">原本的首页</view>

<kaiping-component wx...

点击查看剩余70%

我知道答案,我要回答