Commit 5ca35981 by huahua

修改banner显示不全

parent ccb579bb
<template>
<view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 888;">
<view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 9999;">
<view class="head" :style="{ height: height + 'px', background:background}">
<view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }">
<image src="../../../static/recommend/icon_back_black.png" mode="aspectFit"
......
......@@ -3,7 +3,6 @@ const drag = {
* 部件缩放中事件四角缩放
*/
scaleMove(e, item, data, allLineListData, designWidth, designHeight) {
console.log(item)
item.isShowLineV = false; //初始化默认不显示
item.isShowLineH = false; //初始化默认不显示
var minwwidth = 20
......@@ -169,7 +168,6 @@ const drag = {
}
},
/**
* @description: 记录按下数据
*/
......@@ -216,7 +214,6 @@ const drag = {
y: 'top'
}
}
//记录对应坐标点坐标
if (fixed != null) {
//初始化盒子上下左右位置
......@@ -232,7 +229,6 @@ const drag = {
}
},
//计算旋转后坐标点
rotatedPoint(rect, rotate, point) {
let {
......@@ -259,7 +255,6 @@ const drag = {
//四边伸缩
edgeMove(e, item, data, allLineListData, designWidth, designHeight) {
//修改属性状态
item.active = true //辅助线
item.activeguide = false //辅助线
......@@ -327,7 +322,6 @@ const drag = {
let newScale = 1;
if (item.typetext == "right") {
let right = designWidth - (item.left + item.width);
item.left = item.elmX; //重新赋值左上角x位置
item.width = item.elmW //重新设置宽度
......@@ -339,7 +333,6 @@ const drag = {
}
} else if (item.typetext == "left") {
newScale = item.elmW / item.lastElmW //计算新比例
let distanceLeft = 0
if (item.lastImageLeft > 0) {
......@@ -357,7 +350,6 @@ const drag = {
}
} else if (item.typetext == "top") {
newScale = item.elmH / item.lastElmH //计算新比例
let distanceTop = 0
if (item.lastImageTop > 0) {
......@@ -365,7 +357,6 @@ const drag = {
} else {
distanceTop = item.lastImageTop + (item.elmH - item.lastElmH);
}
if (distanceTop < 0) {
item.image_top = distanceTop;
} else {
......@@ -376,7 +367,6 @@ const drag = {
}
} else if (item.typetext == "bottom") {
let buttom = designHeight - (item.top + item.height);
newScale = item.elmH / item.lastElmH //计算新比例
if (newScale > 1) { //开始放大处理
......@@ -427,13 +417,10 @@ const drag = {
* @description: 计算移动前坐标值
*/
getRotatedPoint(curPos, centerPos, angle) {
let radian = Math.PI / 180 * angle;
return {
x: Math.floor((curPos.x - centerPos.x) * Math.cos(radian) - (curPos.y - centerPos.y) * Math.sin(
radian) + centerPos.x),
y: Math.floor((curPos.y - centerPos.y) * Math.cos(radian) + (curPos.x - centerPos.x) * Math.sin(
radian) + centerPos.y)
x: Math.floor((curPos.x - centerPos.x) * Math.cos(radian) - (curPos.y - centerPos.y) * Math.sin(radian) + centerPos.x),
y: Math.floor((curPos.y - centerPos.y) * Math.cos(radian) + (curPos.x - centerPos.x) * Math.sin(radian) + centerPos.y)
}
},
......@@ -491,7 +478,7 @@ const drag = {
* @description: 计算变换后的方框四个角的位置
*/
getTransferPositionangle(left, top, width, height, angle, center, item) {
// 计算变换后的方框四个角的位置
},
/**
......@@ -581,13 +568,10 @@ const drag = {
},
/**
* 图片拖动中事件
*/
dragMove(e, item, data, editor_top) {
item.isShowLineV = false;
item.isShowLineH = false;
let mouseX = e.touches[0].clientX;
......@@ -600,13 +584,10 @@ const drag = {
let diffY = mouseY - item.startY
let dX = diffX
let dY = diffY
item.elmX += diffX
item.elmY += diffY
item.left = item.elmX
item.top = item.elmY
if (item.newRotate == 0) {
if (item.left > (data.editorWidth / 2 - 5) && item.left < (data.editorWidth / 2 + 5)) {
/* 辅助线左侧磁性吸附 */
......@@ -659,7 +640,6 @@ const drag = {
//添加所有参考线x轴y轴
addallLineListDataXAndY(item) {
if (item.angle != 0) {
var center = {
x: item.left + (item.width) / 2,
......
......@@ -30,8 +30,7 @@
background: linear-gradient(92deg, #E6B01A, #F29F3D);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
border-radius: 40px;">
<view
style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
<view style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
立即定制</view>
</view>
</view>
......@@ -115,11 +114,8 @@
toCustomSize() {
uni.navigateTo({
url: '../mall/size?machine_id=' + this.machine_id +
// + "&title=" + item.title + "&real_width=" + item.key +
"&isFirstPage=true" +
"&machineDetail=" + JSON.stringify(this.list)
// url: '../index/size?machine_id=' + this.machine_id +
// '&key=' + this.key;
})
},
......
<template>
<!-- 贴图 -->
<view class="content" style="width: 100%; height: 100%; position: relative;"
:style="{height: (windowHeight - classificationHeight) +'px'}">
<view class="content" style="width: 100%; height: 100%; position: relative; z-index: 999999;"
:style="{height: (windowHeight + 80) +'px'}">
<refresh @interrupt="interrupt" @pushToInterrupt="pushToInterrupt" @finished="finished" @scrolltolower="g"
:scrollHeight="(windowHeight - classificationHeight)" :scrollTop="scrollViewTop" @scroll="scroll">
:scrollHeight="(windowHeight + 80 )" :scrollTop="scrollViewTop" @scroll="scroll">
<template slot="top">
<view style="color: #FFFFFF;position: absolute; top: 0;width: 100%; text-align: center;"
:style="'height:' + 40 + 'px; line-height:' + 40 + 'px;'">{{tip}}</view>
......
<template>
<view v-if="isShow" style=" width: 100%; height: 100%; ">
<view v-if="isShow" style=" width: 100%; ">
<view
style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index:997; opacity: 0.5; "
......@@ -77,7 +77,7 @@
margin: 0 auto;
line-height: 84upx;
margin-top:20upx;
text-align: center;"> 自定义</view>
text-align: center;"> 自定义尺寸</view>
</view>
</view>
......
......@@ -763,9 +763,7 @@
this.inputBottom = 0
},
typefaceClick(e,index) {
console.log(this.typefacedata.length)
console.log(index + 1)
// console.log(index + 1)
if((index + 1) == this.typefacedata.length){
if(e.textlong == true){
this.$emit('typefaceClick', e)
......@@ -779,16 +777,6 @@
}else{
this.$emit('typefaceClick', e)
}
// if(e.textlong == true){
// this.$emit('typefaceClick', e)
// }else{
// if(e.remark != ''){
// this.loadFont(e)
// }else{
// this.$emit('typefaceClick', e)
// }
// }
},
loadFont(textlist) {
let that = this;
......@@ -811,7 +799,6 @@
},
complete(res) {
uni.hideLoading();
// wx.showToast({title: '字体下载完成',icon: 'success',duration: 2000});
textlist.long = true
that.setData({typefacedata: that.typefacedata});
that.$emit('typefaceClick', textlist)
......@@ -875,32 +862,9 @@
this.typeface('typeface')
this.inputBottom = 'none'
}
// 字体列表
// homeservice.queryList({
// s: 'Material.fontFamilyList'
// }).then(result => {
// result.forEach(item=>{
// item.long = false
// item.textlong = null
// })
// result.unshift({
// id: 0,
// key: "",
// remark: "",
// title: "思源黑体",
// textlong:true,
// long:true
// })
// this.typefacedata = result
// }).catch(err => {
// });
if(this.$base.typefacedata.length > 0){
this.typefacedata = this.$base.typefacedata
console.log(this.$base.typefacedata)
}
}
}
}
......
......@@ -52,38 +52,17 @@
begin: false,
bgColor: 'rgba(255, 255, 255, 0)',
toolArr: [
// {
// title: '清空',
// icon: '../../static/png/tool_clear.png',
// selectIcon: '../../static/png/tool_clear_s.png',
// select: false,
// url: 'clear'
// },
{
title: '撤销',
icon: '../../static/png/tool_eraser.png',
selectIcon: '../../static/png/tool_eraser.png',
icon: '',//../../static/png/tool_eraser.png
selectIcon: '.',//../../static/png/tool_eraser.png
select: false,
url: 'eraser'
},
// {
// title: '画笔',
// icon: '../../static/png/tool_pen.png',
// selectIcon: '../../static/png/tool_pen_s.png',
// select: true,
// url: 'pen'
// },
// {
// title: '颜色',
// icon: '../../static/png/tool_color.png',
// selectIcon: '../../static/png/tool_color_s.png',
// select: false,
// url: 'color'
// },
{
title: '确认',
icon: '../../static/png/icon_confirm.png',
selectIcon: '../../static/png/icon_confirm.png',
icon: '', //../../static/png/icon_confirm.png
selectIcon: '', //../../static/png/icon_confirm.png
select: false,
url: 'save'
}
......@@ -96,7 +75,6 @@
hollowCircleMode: false,
lastHollowRect: {},
lastHollowCircle: {},
MobilePhoneHeight: 0,
MobilePhoneWidth: 0,
pixelRate: 1,
......@@ -152,11 +130,11 @@
icon: 'none',
duration: 3000
})
// console.log(atter.host + '/' + atter.dir + time + '.png')
let url = atter.host + '/' + atter.dir + time + '.png'
_this.$emit('tuyaimg', url)
_this.$refs['brandscenter'].close()
_this.openState = false
_this.openState = false
_this.$emit('tuyaimg', url)
}
},
fail: function(err) {
......@@ -167,7 +145,7 @@
})
},
complete: function(err) {
// console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
}
})
}
......@@ -204,7 +182,6 @@
})
},
colorPickTapHandler(obj) {
// console.log('我点击的颜色:' + JSON.stringify(obj));
this.colorPanelShow = false;
this.toolArr.forEach(item => {
item.select = false;
......@@ -221,7 +198,6 @@
this.drawContext.strokeStyle = obj.color;
},
penWidthChangeHandler(width) {
// console.log('画笔宽度:' + width);
this.lineWidth = width;
this.drawContext.setLineWidth(width);
this.drawContext.setLineCap('round') // 让线条圆润
......@@ -235,7 +211,6 @@
break;
case 'eraser':
this.canvas_restore()
// this.drawContext.strokeStyle = 'rgba(255, 255, 255, 0)';
this.colorPanelShow = false;
break;
case 'pen':
......@@ -249,7 +224,6 @@
break;
case 'color':
this.colorPanelShow = !this.colorPanelShow;
// this.drawMode = this.colorPanelShow ? false : true;
break;
case 'save':
if (that.canvas_neto.length < 1) {
......@@ -259,23 +233,7 @@
uni.canvasToTempFilePath({
canvasId: 'drawCanvas',
success: function(res) {
// console.log('回调参数:' + JSON.stringify(res))
that.uploadDIY(res.tempFilePath);
// console.log('回调参数:' + JSON.stringify(res));
// 在H5平台下,tempFilePath 为 base64
// uni.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success: function(res) {
// console.log('回调参数:' + JSON.stringify(res))
// // console.log('成功回调参数:' + JSON.stringify(res));
// // that.$api.msgSuccess('保存成功');
// },
// fail: function(res) {
// console.log('回调参数:' + JSON.stringify(res))
// // console.log('失败回调参数:' + JSON.stringify(res));
// // that.$api.msgSuccess('保存成功');
// }
// });
},
fail: function(res) {
console.log('fail' + JSON.stringify(res));
......@@ -285,43 +243,6 @@
case 'close':
this.cancelBrand();
break;
// case 'hollowRect':
// this.hollowRectMode = true;
// this.rectMode = false;
// this.circleMode = false;
// this.hollowCircleMode = false;
// this.penMode = false;
// this.colorPanelShow = false;
// this.drawContext.strokeStyle = this.currentColor;
// // this.drawContext.restore();
// break;
// case 'hollowCircle':
// this.hollowRectMode = false;
// this.rectMode = false;
// this.circleMode = false;
// this.hollowCircleMode = true;
// this.penMode = false;
// this.colorPanelShow = false;
// this.drawContext.strokeStyle = this.currentColor;
// break;
// case 'rect':
// this.hollowRectMode = false;
// this.rectMode = true;
// this.circleMode = false;
// this.hollowCircleMode = false;
// this.penMode = false;
// this.colorPanelShow = false;
// this.drawContext.strokeStyle = this.currentColor;
// break;
// case 'circle':
// this.hollowRectMode = false;
// this.rectMode = false;
// this.circleMode = true;
// this.hollowCircleMode = false;
// this.penMode = false;
// this.colorPanelShow = false;
// this.drawContext.strokeStyle = this.currentColor;
// break;
default:
break;
}
......@@ -348,7 +269,6 @@
touchStart(e) {
this.initBoard();
if (this.penMode) {
// console.log('我能够进行绘制--touchStart---x' + e.touches[0].x + '----y----' + e.touches[0].y);
this.lineBegin(e.touches[0].x, e.touches[0].y)
this.canvas_neto.push({
point_x: e.touches[0].x,
......@@ -359,13 +279,13 @@
})
this.draw(true);
} else if (this.rectMode) {
// this.rectBegin(e.touches[0].x, e.touches[0].y)
} else if (this.hollowRectMode) {
// this.hollowRectBegin(e.touches[0].x, e.touches[0].y)
} else if (this.hollowCircleMode) {
// this.hollowCircleBegin(e.touches[0].x, e.touches[0].y)
} else if (this.circleMode) {
// this.circleBegin(e.touches[0].x, e.touches[0].y)
}
this.curDrawArr.push({
x: e.touches[0].x,
......@@ -375,7 +295,6 @@
touchMove(e) {
if (this.begin) {
if (this.penMode) {
// console.log('我能够进行绘制--touchMove----x' + e.touches[0].x + '----y----' + e.touches[0].y);
this.lineAddPoint(e.touches[0].x, e.touches[0].y);
this.draw(true);
this.canvas_neto[this.canvas_neto.length - 1].list.push({
......
......@@ -20,14 +20,14 @@
:style="{background: designer.status.value == 1 ? '#ffffff' :'#EEEEEE;'}">
<view style=" display: flex; align-items: center;">
<view v-if="designer.user_id != userId"
style="margin:20upx 20upx;width: 340upx; height: 140upx; position: relative; overflow: hidden; opacity: 0.3; ">
style="margin:20upx 20upx;width: 380upx; height: 140upx; position: relative; overflow: hidden; opacity: 0.3; ">
<view style="width: 140upx; height: 140upx;border-radius: 20upx; background: #FFFFFF;">
</view>
<image style="width: 90upx; height: 90upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="aspectFit"></image>
</view>
<view v-if="designer.user_id == userId"
style="margin:20upx 20upx;width: 340upx; height: 140upx; position: relative; overflow: hidden; ">
style="margin:20upx 20upx;width: 380upx; height: 140upx; position: relative; overflow: hidden; ">
<view style="width: 140upx; height: 140upx;border-radius: 20upx; background: #FFFFFF;"></view>
<image style="width: 90upx; height: 90upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit"></image>
......@@ -66,8 +66,7 @@
<view style="width: 558upx;position: absolute; top: 40upx ">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 200upx; margin: auto;">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_120'"
mode="aspectFit" style=" margin: auto; width: 120upx; max-height: 200upx; "></image>
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_120'" mode="aspectFit" style=" margin: auto; width: 120upx; max-height: 200upx; "></image>
</view>
<!-- 作品排队中 -->
<view style="text-align: center; font-size: 34upx; margin-top: 50upx;">{{lineStatusText}}</view>
......
......@@ -133,7 +133,6 @@ class WxTouchEvent {
}, 0)
} else {
this.tapTimeout = setTimeout(function () {
console.info("tap");
evt.type = "tap";
self.tap.dispatch(evt);
// trigger double tap immediately
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment