|
|
@@ -62,6 +62,30 @@ VueLikePage([], {
|
|
|
selectedDate: '' // 最终选中的日期
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectConfirm(e){
|
|
|
+ this.confirmIp()
|
|
|
+ // 拿到item,从confirmedIps去掉当前item
|
|
|
+ const selectedItem = e.currentTarget.dataset.item
|
|
|
+ console.log(selectedItem)
|
|
|
+ this.setData({
|
|
|
+ confirmedIps:this.data.confirmedIps.filter(i=>i.id!==selectedItem.id),
|
|
|
+ // 再重新还原到选中状态 设置
|
|
|
+ selectedIp: selectedItem.selectedIp,
|
|
|
+ selectedIpIndex: selectedItem.selectedIpIndex,
|
|
|
+ tabIndex: selectedItem.typeIndex, // 判断是贴图还是标题还是日期
|
|
|
+ rgb: selectedItem.rgb,
|
|
|
+ imgUrl:selectedItem.typeIndex==1? selectedItem?.imgUrl:'',
|
|
|
+ title: selectedItem.typeIndex==2?selectedItem?.title:'',
|
|
|
+ date: selectedItem.typeIndex==3?selectedItem?.date:'',
|
|
|
+ ipScaleX: selectedItem.scaleX,
|
|
|
+ ipScaleY: selectedItem.scaleY,
|
|
|
+ ipRotate: selectedItem.rotate,
|
|
|
+ ipLeft: selectedItem.left,
|
|
|
+ ipTop: selectedItem.top,
|
|
|
+ positionInitialized:true
|
|
|
+ })
|
|
|
+ // console.log(this.data)
|
|
|
+ },
|
|
|
loadDate() {
|
|
|
const now = new Date();
|
|
|
const currentYear = now.getFullYear();
|
|
|
@@ -226,9 +250,9 @@ VueLikePage([], {
|
|
|
if (type == "0") {
|
|
|
link = `${VIDEO_BASE_URL}4dvedio/${rdw}.mp4`;
|
|
|
} else {
|
|
|
- link = `${VIDEO_BASE_URL}4dpic/${rdw}.jpg`;
|
|
|
+ // link = `${VIDEO_BASE_URL}4dpic/${rdw}.jpg`;
|
|
|
// test
|
|
|
- // link = 'https://pic.616pic.com/phototwo/00/06/02/618e27a7290161785.jpg'
|
|
|
+ link = 'https://pic.616pic.com/phototwo/00/06/02/618e27a7290161785.jpg'
|
|
|
this.loadDate()
|
|
|
}
|
|
|
|
|
|
@@ -519,7 +543,7 @@ VueLikePage([], {
|
|
|
const padding = paddingRpx * ratio;
|
|
|
const borderRadius = 40 * ratio;
|
|
|
|
|
|
- ctx.font = ` ${fontSizePx}px iconfont`;
|
|
|
+ ctx.font = ` ${fontSizePx}px cexwz`;
|
|
|
ctx.fillStyle = ov.rgb || '#000000';
|
|
|
ctx.textAlign = 'center';
|
|
|
ctx.textBaseline = 'middle';
|
|
|
@@ -545,7 +569,7 @@ VueLikePage([], {
|
|
|
const finalWidth = contentWidth + padding * 2;
|
|
|
|
|
|
// 绘制圆角矩形背景
|
|
|
- ctx.fillStyle = 'rgba(156, 208, 255, 1)';
|
|
|
+ ctx.fillStyle = 'rgba(255, 255, 255, 0.70)';
|
|
|
ctx.beginPath();
|
|
|
this.drawRoundRect(
|
|
|
ctx,
|
|
|
@@ -748,8 +772,10 @@ VueLikePage([], {
|
|
|
});
|
|
|
},
|
|
|
selectIp(e) {
|
|
|
- const index = e.currentTarget.dataset.index;
|
|
|
+
|
|
|
+ const index = e.currentTarget.dataset.index ;
|
|
|
const item = this.data.ipsImgList[index];
|
|
|
+ console.log(index,item)
|
|
|
// 这里日期和标题选择的index都没用,但是也需要传,相当于限制了添加上限为ips数组长度
|
|
|
if (!item) return;
|
|
|
if (this.data.selectedIp && !this.data.ipConfirmed) {
|
|
|
@@ -907,6 +933,7 @@ VueLikePage([], {
|
|
|
});
|
|
|
},
|
|
|
confirmIp() {
|
|
|
+
|
|
|
if (!this.data.selectedIp) return;
|
|
|
const overlayItem = {
|
|
|
typeIndex: this.data.tabIndex, // 判断是贴图还是标题还是日期
|
|
|
@@ -919,7 +946,9 @@ VueLikePage([], {
|
|
|
scaleY: this.data.ipScaleY,
|
|
|
rotate: this.data.ipRotate,
|
|
|
left: this.data.ipLeft,
|
|
|
- top: this.data.ipTop
|
|
|
+ top: this.data.ipTop,
|
|
|
+ selectedIp:this.data.selectedIp,
|
|
|
+ selectedIpIndex:this.data.selectedIpIndex
|
|
|
};
|
|
|
this.setData({
|
|
|
confirmedIps: [...this.data.confirmedIps, overlayItem],
|