From 29676571a9e3e551b856ce507ff2c612b1a6e872 Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Fri, 15 Dec 2023 10:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=90=8D=E7=BB=84=E4=BB=B6=E5=B0=81?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.wxss | 4 +- components/bottom-drawer/index.js | 116 +++++++++++++++++ components/bottom-drawer/index.json | 3 + components/bottom-drawer/index.wxml | 17 +++ components/bottom-drawer/index.wxss | 35 +++++ components/range/range-slider.js | 230 +++++++++++++++++++++++++++++++++ components/range/range-slider.json | 4 + components/range/range-slider.wxml | 12 ++ components/range/range-slider.wxss | 45 +++++++ components/recordBill/index.js | 50 +++++++ components/recordBill/index.json | 4 + components/recordBill/index.wxml | 53 ++++++++ components/recordBill/index.wxss | 45 +++++++ components/slider-component/index.js | 62 +++++++++ components/slider-component/index.json | 4 + components/slider-component/index.wxml | 11 ++ components/slider-component/index.wxss | 100 ++++++++++++++ pages/detail/index.js | 12 +- pages/detail/index.json | 5 +- pages/detail/index.wxml | 54 +------- pages/mineAgency/index.js | 81 ++++++++++-- pages/mineAgency/index.json | 4 +- pages/mineAgency/index.wxml | 29 ++++- pages/mineAgency/index.wxss | 17 ++- 24 files changed, 926 insertions(+), 71 deletions(-) create mode 100644 components/bottom-drawer/index.js create mode 100644 components/bottom-drawer/index.json create mode 100644 components/bottom-drawer/index.wxml create mode 100644 components/bottom-drawer/index.wxss create mode 100644 components/range/range-slider.js create mode 100644 components/range/range-slider.json create mode 100644 components/range/range-slider.wxml create mode 100644 components/range/range-slider.wxss create mode 100644 components/recordBill/index.js create mode 100644 components/recordBill/index.json create mode 100644 components/recordBill/index.wxml create mode 100644 components/recordBill/index.wxss create mode 100644 components/slider-component/index.js create mode 100644 components/slider-component/index.json create mode 100644 components/slider-component/index.wxml create mode 100644 components/slider-component/index.wxss diff --git a/app.wxss b/app.wxss index 938319b..06b7933 100644 --- a/app.wxss +++ b/app.wxss @@ -58,7 +58,9 @@ page { .tr { text-align: right; } - +.rotate90{ + transform: rotate(90deg); +} .tc, .center { text-align: center; diff --git a/components/bottom-drawer/index.js b/components/bottom-drawer/index.js new file mode 100644 index 0000000..ecbf08c --- /dev/null +++ b/components/bottom-drawer/index.js @@ -0,0 +1,116 @@ +Component({ + data: {}, + properties: { + // 抽屉高度 + height: { + type: String, + value: "", + }, + drawerType: { + type: String, + value: "", + }, + //抽屉显示隐藏 + show: { + type: Boolean, + value: false + }, + titleText: { + type: String, + value: '' + }, + // 是否需要显示tabbar + hideTabbar: { + type: Boolean, + value: false + }, + cancerShow: { + type: Boolean, + value: true + }, + // + touchClose: { + type: Boolean, + value: true + }, + color: { + type: String, + value: '#fff' + }, + }, + methods: { + /** + * 阻止滑动穿透 + * + * + */ + modalMove () { + console.log(this.data.color); + return false; + }, + // 触摸开始事件 + handletouchtart: function (event) { + this.data.lastX = event.touches[0].pageX; + this.data.lastY = event.touches[0].pageY; + }, + filterTouchStart (event) { + this.handletouchtart(event); + }, + filterTouchMove (event) { + let tx = this.handletouchmove(event); + if (this.data.touchClose) { + if (tx.ty > 100) { + this.hideLeft(); + + } + } else { + return false + } + }, + + hideLeft () { + // this.data.show = false + // this.setData({ + // show: false + // }) + var eventDetail = { + type: this.data.drawerType + }; + this.triggerEvent("hidedrawer", eventDetail); + + if (this.data.hideTabbar) { + setTimeout(() => { + this.getTabBar().setData({ + isShow: true, + }); + }, 200); + } + + }, + /** + * 页面滑动事件监听 + * + * + */ + handletouchmove: function (event) { + let that = this; + var currentX = event.touches[0].pageX; + var currentY = event.touches[0].pageY; + var tx = currentX - this.data.lastX; + var ty = currentY - this.data.lastY; + var text = ""; + //左右方向滑动 + if (Math.abs(tx) > Math.abs(ty)) { + return { + tx, + }; + } + //上下方向滑动 + else { + return { + ty, + }; + } + }, + } +}) \ No newline at end of file diff --git a/components/bottom-drawer/index.json b/components/bottom-drawer/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/components/bottom-drawer/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/components/bottom-drawer/index.wxml b/components/bottom-drawer/index.wxml new file mode 100644 index 0000000..6b53241 --- /dev/null +++ b/components/bottom-drawer/index.wxml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/components/bottom-drawer/index.wxss b/components/bottom-drawer/index.wxss new file mode 100644 index 0000000..4d4cdca --- /dev/null +++ b/components/bottom-drawer/index.wxss @@ -0,0 +1,35 @@ +@import "../../app.wxss"; +.leftBox { + position: fixed; + left: 0; + top: 0; + width: 0; + height: 0; + /* width: 100vw; + height: 100vh; */ + z-index: 999; +} +.leftBox .mask { + position: fixed; + width: 100vw; + height: 100vh; + z-index: 99; + background-color: rgba(0, 0, 0, 0.5); +} + +.leftBox .hideBox { + position: fixed; + left: 0; + bottom: -100vh; + width: 100vw; + /* height: 100vh; */ + overflow: hidden; + z-index: 99; + /* background-color: #fff; */ + border-radius: 8px 8px 0px 0px; + transition: bottom linear 0.2s; +} + +.leftBox .leftShow { + bottom: 0px !important; +} diff --git a/components/range/range-slider.js b/components/range/range-slider.js new file mode 100644 index 0000000..01a5ff4 --- /dev/null +++ b/components/range/range-slider.js @@ -0,0 +1,230 @@ +const _windowWidth = wx.getSystemInfoSync().windowWidth; +Component({ + properties: { + //组件宽度 + width: { + type: Number, + value: 700, + observer: function (newVal, oldVal, changedPath) { + var that = this; + if (newVal != that.data.width) { + this._refresh(); + } + }, + }, + contentWidth: { + type: String, + value: "100vw", + }, + //组件高度 + height: { + type: Number, + value: 100, + }, + //滑块大小 + blockSize: { + type: Number, + value: 60, + observer: function (newVal, oldVal, changedPath) { + var that = this; + if (newVal != that.data.blockSize) { + this._refresh(); + } + }, + }, + //区间进度条高度 + barHeight: { + type: Number, + value: 10, + }, + //背景条颜色 + backgroundColor: { + type: String, + value: "#e9e9e9", + }, + //已选择的颜色 + activeColor: { + type: String, + value: "#E5EDFF", + }, + //最小值 + min: { + type: Number, + value: 0, + observer: function (newVal, oldVal, changedPath) { + var that = this; + if (newVal != that.data.min) { + that._refresh(); + } + }, + }, + //最大值 + max: { + type: Number, + value: 100, + observer: function (newVal, oldVal, changedPath) { + var that = this; + if (newVal != that.data.max) { + that._refresh(); + } + }, + }, + //设置初始值 + values: { + type: Object, + value: [0, 100], + observer: function (newVal, oldVal, changedPath) { + var that = this; + // var values = that.data.values; + if (that._isValuesValid(newVal) && that._isValuesValid(oldVal)) { + if (oldVal[0] != newVal[0] || oldVal[1] != newVal[1]) that._refresh(); + } + }, + }, + }, + /** + * 组件生命周期函数,在组件布局完成后执行 + */ + ready() { + // console.log(this.data.activeColor); + // console.log(this.data.width); + this.setData({ + progressBarWidth: this.data.width, + }); + this._refresh(); + }, + options: { + multipleSlots: true, + }, + data: { + MAX_LENGTH: 700, + minBlockLeft: 0, + maxBlockLeft: 700, + progressBarLeft: 0, + progressBarWidth: 700, + fangdou: true, + }, + methods: { + _pxToRpx: function (px) { + return (750 * px) / _windowWidth; + }, + _onBlockTouchStart: function (e) { + console.log(e); + this._blockDownX = e.changedTouches[0].pageX; + this._blockLeft = e.target.dataset.left; + this._curBlock = e.target.dataset.tag; + }, + _onBlockTouchMove: function (e) { + var that = this; + if (that.data.fangdou) { + that.data.fangdou = false; + var values = that._calculateValues(e); + that._refreshProgressBar(values[2], values[3]); + that._refreshBlock(values[2], values[3]); + var eventDetail = { + minValue: values[0], + maxValue: values[1], + fromUser: true, + }; + var eventOption = {}; + that.triggerEvent("rangechange", eventDetail, eventOption); + setTimeout(() => { + that.data.fangdou = true; + }, 5); + } + }, + _onBlockTouchEnd: function (e) { + var that = this; + var values = that._calculateValues(e); + that._refreshProgressBar(values[2], values[3]); + that._refreshBlock(values[2], values[3]); + var eventDetail = { + minValue: values[0], + maxValue: values[1], + fromUser: true, + }; + var eventOption = {}; + that.triggerEvent("rangechange", eventDetail, eventOption); + }, + _isValuesValid: function (values) { + return values != null && values != undefined && values.length == 2; + }, + /** + * 根据手势计算相关数据 + */ + _calculateValues: function (e) { + var that = this; + var moveLength = e.changedTouches[0].pageX - that._blockDownX; + var left = that._blockLeft + that._pxToRpx(moveLength); + left = Math.max(0, left); + left = Math.min(left, that.data.MAX_LENGTH); + var minBlockLeft = that.data.minBlockLeft; + var maxBlockLeft = that.data.maxBlockLeft; + if (that._curBlock == "minBlock") { + minBlockLeft = left; + } else { + maxBlockLeft = left; + } + var range = that.data.max - that.data.min; + var minLeft = Math.min(minBlockLeft, maxBlockLeft); + var maxLeft = Math.max(minBlockLeft, maxBlockLeft); + var minValue = (minLeft / that.data.MAX_LENGTH) * range + that.data.min; + var maxValue = (maxLeft / that.data.MAX_LENGTH) * range + that.data.min; + return [minValue, maxValue, minLeft, maxLeft]; + }, + /** + * 计算滑块坐标 + */ + _calculateBlockLeft: function (minValue, maxValue) { + var that = this; + var blockSize = that.data.blockSize; + var range = that.data.max - that.data.min; + var minLeft = ((minValue - that.data.min) / range) * that.data.MAX_LENGTH; + var maxLeft = ((maxValue - that.data.min) / range) * that.data.MAX_LENGTH; + return [minLeft, maxLeft]; + }, + /** + * 刷新进度条视图 + */ + _refreshProgressBar: function (minBlockLeft, maxBlockLeft) { + var that = this; + var blockSize = that.data.blockSize; + that.setData({ + progressBarLeft: minBlockLeft + blockSize / 2, + progressBarWidth: Math.abs(maxBlockLeft - minBlockLeft), + }); + }, + /** + * 刷新滑块视图 + */ + _refreshBlock: function (minBlockLeft, maxBlockLeft) { + var that = this; + that.setData({ + minBlockLeft: minBlockLeft, + maxBlockLeft: maxBlockLeft, + }); + }, + /** + * 刷新整个视图 + */ + _refresh: function () { + var that = this; + var MAX_LENGTH = that.data.width - that.data.blockSize; + that.setData({ + MAX_LENGTH: MAX_LENGTH, + maxBlockLeft: MAX_LENGTH, + progressBarWidth: MAX_LENGTH, + }); + var values = that.data.values; + if (that._isValuesValid(values)) { + values[0] = Math.max(that.data.min, values[0]); + values[0] = Math.min(values[0], that.data.max); + values[1] = Math.max(that.data.min, values[1]); + values[1] = Math.min(values[1], that.data.max); + var leftValues = that._calculateBlockLeft(values[0], values[1]); + that._refreshProgressBar(leftValues[0], leftValues[1]); + that._refreshBlock(leftValues[0], leftValues[1]); + } + }, + }, +}); diff --git a/components/range/range-slider.json b/components/range/range-slider.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/range/range-slider.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/range/range-slider.wxml b/components/range/range-slider.wxml new file mode 100644 index 0000000..8900917 --- /dev/null +++ b/components/range/range-slider.wxml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/components/range/range-slider.wxss b/components/range/range-slider.wxss new file mode 100644 index 0000000..292924e --- /dev/null +++ b/components/range/range-slider.wxss @@ -0,0 +1,45 @@ +.range-slider { + position: relative; +} + +.range-bar { + position: absolute; +} + +.range-bar { + position: absolute; + top: 50%; + transform: translate(0, -50%); + border-radius: 10000rpx; +} + +.range-bar-bg { + position: absolute; + width: 100%; + height: 100%; + border-radius: 10000rpx; +} + +.range-bar-progress { + position: absolute; + width: 100%; + height: 100%; + background-color: blueviolet; +} + +.block { + position: absolute; + width: 30px; + height: 30px; + top: 50%; + border-radius: 50%; + transform: translate(0, -50%); + background-image: url('https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/slider_img.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + /* background-color: var(--color-ysd); */ +} +.block image { + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/components/recordBill/index.js b/components/recordBill/index.js new file mode 100644 index 0000000..f50409a --- /dev/null +++ b/components/recordBill/index.js @@ -0,0 +1,50 @@ +// components/recordBill/index.js +Component({ + + /** + * 组件的属性列表 + */ + properties: { + jobDetail: { + type: Object, + value: {}, + }, + show: { + type: Boolean, + value: false + }, + drawerType: { + type: String, + value: '' + } + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + ready () { + console.log(this.data.jobDetail); + }, + /** + * 组件的方法列表 + */ + methods: { + /** + * 阻止滑动穿透 + * + * + */ + modalMove () { + return false; + }, + hideModal () { + var eventDetail = { + type: this.data.drawerType + }; + this.triggerEvent("hidedrawer", eventDetail); + }, + } +}) \ No newline at end of file diff --git a/components/recordBill/index.json b/components/recordBill/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/recordBill/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/recordBill/index.wxml b/components/recordBill/index.wxml new file mode 100644 index 0000000..8ceafad --- /dev/null +++ b/components/recordBill/index.wxml @@ -0,0 +1,53 @@ + + + + + 报名确认 + + + 报名岗位 + {{jobDetail.storeJob.jobName}} + + + 薪资待遇 + {{jobDetail.storeJob.monthlyPay + '元/月'}} + + + + *姓名 + + + + + + + + + + *身份证 + + + + + + + + + + + *联系电话 + + + + + + + + 注意:不同的报名人如果填写同一个手机号,报名提交将会失败。 + + + + + + + diff --git a/components/recordBill/index.wxss b/components/recordBill/index.wxss new file mode 100644 index 0000000..814e355 --- /dev/null +++ b/components/recordBill/index.wxss @@ -0,0 +1,45 @@ +@import '../../app.wxss'; +.leftBox { + position: fixed; + left: 0; + top: 0; + width: 0; + height: 0; + /* width: 100vw; + height: 100vh; */ + z-index: 999; +} +.leftBox .mask { + position: fixed; + width: 100vw; + height: 100vh; + z-index: 99; + background-color: rgba(0, 0, 0, 0.5); +} +.leftBox .leftShow { + display: block !important; +} + +.leftBox .hideBox { + position: fixed; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + width: 80vw; + min-height: 510px; + overflow: hidden; + z-index: 99; + background-color: #fff; + border-radius: 8px; + transition: bottom linear 0.2s; + display: none; +} +.billInput { + height: 40px; + width: 90%; + padding-left: 12px; + box-sizing: border-box; + background: #f9f9f9; + border-radius: 4px; + margin-top: 4px; +} diff --git a/components/slider-component/index.js b/components/slider-component/index.js new file mode 100644 index 0000000..bff9825 --- /dev/null +++ b/components/slider-component/index.js @@ -0,0 +1,62 @@ +// components/slider-component/index.js +Component({ + properties: { + slider_min: { + //最小值 + type: Number, + value: 0, + }, + slider_max: { + //最大值 + type: Number, + value: 100, + }, + slider_value: { + //当前值 + type: Number, + value: 10, + }, + show_value: { + //当前值 + type: Number, + value: 10, + }, + // age: { + // //当前值 + // type: Number, + // value: true, + // }, + }, + ready() { + console.log(this.properties.slider_min); + console.log(this.properties.slider_max); + console.log(this.properties.slider_value); + }, + methods: { + sliderChanging(e) { + // console.log(this.properties); + const value = e.detail.value; + if (value >= 16) { + this.properties.show_value = value; + } + + // wx.vibrateShort({ + // type: "heavy", + // success: function (e) {}, + // }); + // console.log(this.properties.slider_value); + // this.triggerEvent("sliderchange", value); + this.triggerEvent("showchange", this.properties.show_value); + }, + sliderChange(e){ + const value = e.detail.value; + if (value >= 16) { + this.properties.show_value = value; + } + + // console.log(this.properties.slider_value); + this.triggerEvent("sliderchange", value); + // this.triggerEvent("showchange", this.properties.show_value); + } + }, +}); diff --git a/components/slider-component/index.json b/components/slider-component/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/slider-component/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/slider-component/index.wxml b/components/slider-component/index.wxml new file mode 100644 index 0000000..d6735d1 --- /dev/null +++ b/components/slider-component/index.wxml @@ -0,0 +1,11 @@ + + + {{show_value == 60 ?show_value + '+' : show_value }} + + + + diff --git a/components/slider-component/index.wxss b/components/slider-component/index.wxss new file mode 100644 index 0000000..2553217 --- /dev/null +++ b/components/slider-component/index.wxss @@ -0,0 +1,100 @@ +/* components/slider-component/index.wxss */ +.component-slider { + width: 100%; + position: relative; + margin: 0rpx auto 0rpx; +} + +/* 盒子 */ +.slider-box { + width: 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); +} + +/* 未选中区线 */ +.slider-line { + width: 100%; + height: 4px; + background: rgba(91, 150, 246, 0.1); + margin: 0 auto; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border-radius: 12rpx; + border-bottom-right-radius: 8rpx; + border-top-right-radius: 8rpx; +} + +/* 选中区线 */ +.slider-line-active { + position: absolute; + left: 0; + top: 50%; + transform: translate(0, -50%); + height: 4px; + background: #f40; + border-bottom-left-radius: 8rpx; + border-top-left-radius: 8rpx; +} + +/* slider按钮 */ +.slider-btn { + width: 30px; + height: 30px; + position: relative; + /* background: url("/assets/images/slider_img.png"); */ + border-radius: 50%; + background-size: 100% 100%; + background-color: #fff; + +} +.slider-btn image{ + position: relative; + width: 100%; + height: 100%; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); +} +.slider_value { + position: absolute; + top: -40px; + left: 15px; + color: var(--color-ysd); + transform: translateX(-50%); +} +/* 显示的数字 */ +.slider-number { + width: 100%; + position: absolute; + bottom: -10rpx; +} + +.slider-number text { + position: absolute; + top: 0; + font-size: 24rpx; + color: #999999; + transition: all 0.3s; +} + +/* 当前选中的数字 */ +.slider-number text.active { + font-size: 32rpx; + color: #5b96f6; + transition: all 0.3s; +} + +/* slider组件设置透明 */ +slider { + width: 92%; + /* opacity: 0; */ + /* height: 20px ; */ + padding: 14px 0; + margin: 12px 16px; + box-sizing: border-box; +} \ No newline at end of file diff --git a/pages/detail/index.js b/pages/detail/index.js index 2e58ee9..8365a8b 100644 --- a/pages/detail/index.js +++ b/pages/detail/index.js @@ -1246,17 +1246,25 @@ Page({ }) },*/ - hideModal () { + /** + * 抽屉组件隐藏 + * + * + */ + hidedrawershow (e) { + console.log(e); this.setData({ - recordBillShow: false + [e.detail.type]: false }) }, goNewEnroll (e) { let that = this; + console.log(e); // this.data.recordBillShow = true this.setData({ recordBillShow: true }) + console.log(this.data.recordBillShow); return let argument; argument = JSON.stringify(that.data.jobDetail.storeJob).replace(/\=|\&/g, "3D"); diff --git a/pages/detail/index.json b/pages/detail/index.json index 5b28bc4..5dda9a3 100644 --- a/pages/detail/index.json +++ b/pages/detail/index.json @@ -1,3 +1,6 @@ { - "navigationStyle":"custom" + "navigationStyle":"custom", + "usingComponents": { + "record-bill": "../../components/recordBill/index" + } } \ No newline at end of file diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index 751e9f6..4568ff8 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -475,57 +475,5 @@ - - - - - 报名确认 - - - 报名岗位 - {{jobDetail.storeJob.jobName}} - - - 薪资待遇 - {{jobDetail.storeJob.monthlyPay + '元/月'}} - - - - *姓名 - - - - - - - - - - *身份证 - - - - - - - - - - - *联系电话 - - - - - - - - 注意:不同的报名人如果填写同一个手机号,报名提交将会失败。 - - - - - - - + diff --git a/pages/mineAgency/index.js b/pages/mineAgency/index.js index 148489d..6b3f540 100644 --- a/pages/mineAgency/index.js +++ b/pages/mineAgency/index.js @@ -5,62 +5,123 @@ Page({ * 页面的初始数据 */ data: { - + list: [ + { + title: '郑州一才工作', + logo: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/yicaigongzuo.png' + }, + { + title: '郑州一才工作', + logo: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/yicaigongzuo.png' + }, + { + title: '郑州一才工作', + logo: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/yicaigongzuo.png' + }, + { + title: '郑州一才工作', + logo: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/yicaigongzuo.png' + } + ], + deleteAgencyShow: false }, /** * 生命周期函数--监听页面加载 */ - onLoad(options) { + onLoad (options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ - onReady() { + onReady () { }, /** * 生命周期函数--监听页面显示 */ - onShow() { + onShow () { }, - + sureDelete () { + let that = this + wx.showModal({ + title: '删除代理', + content: '删除后,将无法查看此代理名下的职位。', + confirmColor: "#027AFF", + success: function (res) { + if (res.confirm) { + console.log("用户点击确定"); + wx.showToast({ + title: '删除成功', + icon: 'success' + }) + that.setData({ + deleteAgencyShow: false + }) + } else if (res.cancel) { + console.log("用户点击取消"); + + } + }, + }); + }, + cancelDelete () { + this.setData({ + deleteAgencyShow: false + }) + }, + deleteAgency () { + this.setData({ + deleteAgencyShow: true + }) + }, + /** + * 抽屉组件隐藏 + * + * + */ + hidedrawershow (e) { + console.log(e); + this.setData({ + [e.detail.type]: false + }) + }, /** * 生命周期函数--监听页面隐藏 */ - onHide() { + onHide () { }, /** * 生命周期函数--监听页面卸载 */ - onUnload() { + onUnload () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ - onPullDownRefresh() { + onPullDownRefresh () { }, /** * 页面上拉触底事件的处理函数 */ - onReachBottom() { + onReachBottom () { }, /** * 用户点击右上角分享 */ - onShareAppMessage() { + onShareAppMessage () { } }) \ No newline at end of file diff --git a/pages/mineAgency/index.json b/pages/mineAgency/index.json index 5772cfc..bc12add 100644 --- a/pages/mineAgency/index.json +++ b/pages/mineAgency/index.json @@ -1,4 +1,6 @@ { "navigationBarTitleText": "我的代理", - "usingComponents": {} + "usingComponents": { + "bottom-drawer": "../../components/bottom-drawer/index" + } } \ No newline at end of file diff --git a/pages/mineAgency/index.wxml b/pages/mineAgency/index.wxml index 52fe136..03a712e 100644 --- a/pages/mineAgency/index.wxml +++ b/pages/mineAgency/index.wxml @@ -1,2 +1,27 @@ - -pages/mineAgency/index.wxml \ No newline at end of file + + + + + + + + + + + {{item.title}} + + + + + + + + + + 删除 + + + 取消 + + + diff --git a/pages/mineAgency/index.wxss b/pages/mineAgency/index.wxss index 774739a..331279f 100644 --- a/pages/mineAgency/index.wxss +++ b/pages/mineAgency/index.wxss @@ -1 +1,16 @@ -/* pages/mineAgency/index.wxss */ \ No newline at end of file +/* pages/mineAgency/index.wxss */ +page { +} +.mineAgencyContainer { + background-color: #fff; + padding: 0 10px; +} +.logoImg { + width: 48px; + height: 48px; + border-radius: 50%; +} +.subItem{ + padding: 0 6px; + height: 76px; +} \ No newline at end of file