diff --git a/packageA/pages/my_service/appment_main.js b/packageA/pages/my_service/appment_main.js index 7e97e07..f2795f4 100644 --- a/packageA/pages/my_service/appment_main.js +++ b/packageA/pages/my_service/appment_main.js @@ -44,15 +44,6 @@ Page({ validay: "", //服务项目有效期 is_sub: 0, //判断是否重复提交 is_textea: 1, //备注是否是可输入 - - - // 拖拽参数 - writePosition: [80, 90], //默认定位参数 - writesize: [0, 0],// X Y 定位 - window: [0, 0], //屏幕尺寸 - write: [0, 0], //定位参数 - scrolltop: 0,//据顶部距离 - v:{}, }, //控制备注输入 check_text: function() { @@ -542,10 +533,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function(options) { - - - - var th = this; th.setData({ options, @@ -660,11 +647,6 @@ Page({ is_textea: 1 }) th.query_project(); - - th.queryMultipleNodes(); - - - }, //获取单个服务项目信息 query_project: function() { @@ -761,129 +743,8 @@ Page({ } }) - }, - - - - //计算默认定位值 - getSysdata: function () { - var that = this; - wx.getSystemInfo({ - success: function (e) { - that.data.window = [e.windowWidth, e.windowHeight]; - var write = []; - write[0] = that.data.window[0] * that.data.writePosition[0] / 100; - write[1] = that.data.window[1] * that.data.writePosition[1] / 100; - console.log(write,45) - that.setData({ - write: write - }, function () { - // 获取元素宽高 - wx.createSelectorQuery().select('.td').boundingClientRect(function (res) { - // console.log('0x0x',res.width) - that.data.writesize = [res.width, res.height]; - }).exec(); - }) - }, - fail: function (e) { - console.log(e) - } - }); - }, - //开始拖拽 - touchmove: function (e) { - // console.log(123); - var that = this; - var position = [e.touches[0].pageX - that.data.writesize[0] / 2, e.touches[0].pageY - that.data.writesize[1] / 2 - this.data.scrolltop]; - that.setData({ - write: position - }); - this.getSysdata(); - }, - onPageScroll(e) { - this.data.scrolltop = e.scrollTop; - }, + } + - scroll(e) { - // console.log('scroll', e); - }, - - rect() { - // console.log('click'); - // wx.createSelectorQuery().select('.td').boundingClientRect(function (res) { - // console.log('0x0x',res); - // }).exec(); - }, - - print(e) { - console.log('e', e); - wx.createSelectorQuery().select('.td').boundingClientRect(function (res) { - console.log('0x0x',res); - // that.data.writesize = [res.width, res.height]; - }).exec(); - }, - - //开始拖拽 - touchmove: function (e) { - var that = this,th=that; - var position = [e.touches[0].pageX - that.data.writesize[0] / 2, e.touches[0].pageY - that.data.writesize[1] / 2 - this.data.scrolltop]; - that.setData({ - write: position - }); - - }, - - - touchend:function(e){ - var that = this,th=that; - var position =th.data.write; - for(var i=0;i<7;i++){ - for(var j=0; j<2;j++){ - //如果坐标在网格内 - if( position[0]>th.data.f_x+i*th.data.f_width && position[0]th.data.f_y +j*th.data.f_hei && position[1] { - console.log(res); - th.data.f_x=res[0].left; - th.data.f_y=res[0].top; - th.data.f_hei=res[0].height; - th.data.f_width=res[0].width; - - }) - }, - - getcopy:function(e){ - var that=this; - var position = [e.detail.x - that.data.writesize[0] / 2, e.detail.y - that.data.writesize[1] / 2 - this.data.scrolltop]; - that.setData({ - write: position,copy_btn:1 - }); - - } - }) \ No newline at end of file diff --git a/packageA/pages/my_service/appment_main.wxml b/packageA/pages/my_service/appment_main.wxml index 45eae66..4b99d91 100644 --- a/packageA/pages/my_service/appment_main.wxml +++ b/packageA/pages/my_service/appment_main.wxml @@ -1,10 +1,10 @@ - - + + - + @@ -17,187 +17,54 @@ - - - - - - 时间 - 美导 - - 8:00 - 9:00 - - - - - 张三 - 100 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - 200 - - - - - 张三 - {{v[0][0]}} - {{v[0][1]}} - - - 张三 - {{v[1][0]}} - {{v[1][1]}} - - - 张三 - {{v[2][0]}} - {{v[2][1]}} - - - 张三 - {{v[3][0]}} - {{v[3][1]}} - - - - 1张三 - 300 - 300 - - - 张三 - 100 - 200 - - - 张三 - 100 - 200 - - - 1张三 - 300 - 300 - - - 张三 - 100 - 200 - - - 张三 - 100 - 200 - - - 1张三 - 张三 - 300 - 300 - - - - - - - - - - - - 项目1 - - - - - - 项目2 - - - - 项目3 - - - - 项目4 - - - - 项目5 - - - - 项目6 - - - - - - - + - + - - + - + - - - - + + - + - + - - + + - + - - + - + - - + + @@ -280,6 +147,4 @@ - - -项目1 \ No newline at end of file + \ No newline at end of file diff --git a/packageA/pages/my_service/appment_main.wxss b/packageA/pages/my_service/appment_main.wxss index 2a6c55a..ba5d2c1 100644 --- a/packageA/pages/my_service/appment_main.wxss +++ b/packageA/pages/my_service/appment_main.wxss @@ -286,90 +286,3 @@ button { height: 80rpx; color: rgb(159, 159, 159); } - - -.table { - background-color: white; - border-top: 2rpx solid rgba(218, 217, 217, 1); - border-left: 2rpx solid rgba(218, 217, 217, 1); -} -.blue { - background: rgba(241, 252, 255, 1); -} -.bg-pink { - background-color: #FFDEF0; -} -.td { - width: 100rpx; - height: 100rpx; - display: flex; - align-items: center; - justify-content: center; - border-right: 2rpx solid rgba(218, 217, 217, 1); - border-bottom: 2rpx solid rgba(218, 217, 217, 1); -} - -.left { - box-shadow: 4px 0px 6px #e7e9eb; -} - -.right { - width: calc(100% - 102rpx); - - box-sizing: border-box; -} - -.card { - position: fixed; - top: 50%; - right: 0; - transform: translateY(-50%); - background-color: white; - - border-radius: 10rpx; - box-shadow: -2px 0px 6px #ccc; -} - -.icon-meirong { - color: pink; -} - - - -.time-box { - width: 0; - height: 0; - border-width: 50rpx; - border-style: solid; - border-color: transparent transparent white white; - position: absolute; - left: 0; - bottom: 0; -} -.time { - position: absolute; - bottom: -22px; - width: 53rpx; - z-index: 999; - left: -22px; - font-size: 12px; -} - -.md-box { - width: 0; - height: 0; - border-width: 50rpx; - border-style: solid; - border-color: #FFDEF0 #FFDEF0 transparent transparent; - position: absolute; - right: 0; - top: 0; -} -.md { - position: absolute; - top: -18px; - width: 53rpx; - z-index: 999; - right: -24px; - font-size: 12px; -}