no message

cyl/master
jscyl13849007907 1 week ago
parent f2ca6d240d
commit 0fa526768a

@ -324,9 +324,7 @@ export default {
let notice = uni.getStorageSync("miniApp-info").notice;
var reg = /[\r\n]/g;
notice = notice.replace(reg, "");
that.noticList = [];
// that.noticList = notice;
that.noticList.push(notice);
that.noticList = [notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice,notice];
that.showNotic = "play";
}
console.log("that.noticList", that.noticList);
@ -384,9 +382,7 @@ export default {
let notice = uni.getStorageSync("miniApp-info").notice;
var reg = /[\r\n]/g;
notice = notice.replace(reg, "");
that.noticList = [];
// that.noticList = notice;
that.noticList.push(notice);
that.noticList = [notice, notice];
that.showNotic = "play";
}
console.log("that.noticList", that.noticList);

@ -118,14 +118,21 @@ export default {
boxWidth: 0, //
animationDuration: '10s', //
animationPlayState: 'paused', //
showText: '' //
showText: '', //
originalText: '' //
};
},
watch: {
list: {
immediate: true,
handler(val) {
this.showText = val.join('');
if (val.length > 0) {
this.originalText = val.join(' ');
this.showText = this.originalText + ' ' + val[0];
} else {
this.originalText = '';
this.showText = '';
}
this.$nextTick(() => {
this.initSize();
});
@ -181,11 +188,24 @@ export default {
resolve();
});
});
let boxQuery = new Promise((resolve, reject) => {
uni.createSelectorQuery()
.in(this)
.select(`#u-notice-box`)
.boundingClientRect()
.exec(ret => {
this.boxWidth = ret[0].width;
resolve();
});
});
query.push(textQuery);
query.push(boxQuery);
Promise.all(query).then(() => {
// t=s/v(=/)#u-notice-box.u-notice-contentpadding-left: 100%
// #u-notice-box
this.animationDuration = `${this.textWidth / uni.upx2px(this.speed)}s`;
// t=s/v(=/)
// = - padding-left: 100%
let originalContentWidth = this.textWidth - this.boxWidth;
// = /
this.animationDuration = `${originalContentWidth / uni.upx2px(this.speed)}s`;
// APP(HX2.4.6IOS13)
this.animationPlayState = 'paused';
setTimeout(() => {

Loading…
Cancel
Save