Compare commits

...

2 Commits

@ -58,7 +58,9 @@ page {
.tr {
text-align: right;
}
.rotate90{
transform: rotate(90deg);
}
.tc,
.center {
text-align: center;

@ -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,
};
}
},
}
})

@ -0,0 +1,3 @@
{
"component": true
}

@ -0,0 +1,17 @@
<view class="leftBox" hover-class="none" catchtouchmove="filterTouchMove" hover-stop-propagation="false">
<view class="mask" wx:if="{{show}}" catchtouchmove="modalMove" bindtap="hideLeft"></view>
<view class="hideBox {{show ? 'leftShow':''}}" wx:if="{{touchClose}}" style="height: {{height}};background-color:{{color}}" bindtouchstart="filterTouchStart" >
<view class="tac bb1 fw500 por" hover-class="none" hover-stop-propagation="false">
<slot name="title"></slot>
<view class="iconfont icon-guanbi11 f14 c9 poa" wx:if="{{cancerShow}}" style="color:#333;right:8px;top:16px;width:32px;height:32px" catchtap="hideLeft"></view>
</view>
<slot></slot>
</view>
<view class="hideBox {{show ? 'leftShow':''}}" wx:else style="height: {{height}};background-color:{{color}}">
<view class="tac bb1 fw500 por" hover-class="none" hover-stop-propagation="false">
<slot name="title"></slot>
<view class="iconfont icon-guanbi11 f14 c9 poa" wx:if="{{cancerShow}}" style="color:#333;right:8px;top:16px;width:32px;height:32px" catchtap="hideLeft"></view>
</view>
<slot></slot>
</view>
</view>

@ -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;
}

@ -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]);
}
},
},
});

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,12 @@
<view class="range-slider" catchtap style="width:calc({{contentWidth}} - 40px);height:{{height}}px">
<view class="range-bar" catchtap style="width:calc({{width}}rpx - 20rpx);height:{{8}}rpx">
<view class="range-bar-bg" style="background-color:{{backgroundColor}};margin-left:10px"></view>
<view class="range-bar-progress" style="margin-left:{{progressBarLeft}}rpx;width:{{progressBarWidth}}rpx;background-color:{{activeColor}}"></view>
</view>
<view class="block" style="margin-left:{{minBlockLeft}}rpx" catchtouchstart="_onBlockTouchStart" catchtouchmove="_onBlockTouchMove" catchtouchend="_onBlockTouchEnd" data-left="{{minBlockLeft}}" data-tag="minBlock">
<slot name="minBlock"></slot>
</view>
<view class="block" style="margin-left:{{maxBlockLeft}}rpx" catchtouchstart="_onBlockTouchStart" catchtouchmove="_onBlockTouchMove" catchtouchend="_onBlockTouchEnd" data-left="{{maxBlockLeft}}" data-tag="maxBlock">
<slot name="maxBlock"></slot>
</view>
</view>

@ -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%;
}

@ -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);
},
}
})

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,53 @@
<!-- wx:if="{{recordBillShow}}" -->
<view class="leftBox" hover-class="none" catchtouchmove="filterTouchMove" hover-stop-propagation="false">
<view class="mask" wx:if="{{show}}" catchtouchmove="modalMove" bindtap="hideModal"></view>
<view class="hideBox {{show ? 'leftShow':''}}" >
<view class="mt24 f18 fw500 mb24 tac">报名确认</view>
<view class="pl32">
<view class="fss">
<view class="mr16 f14">报名岗位</view>
<view class="fw500 f15">{{jobDetail.storeJob.jobName}}</view>
</view>
<view class="fss mt10">
<view class="mr16 f14">薪资待遇</view>
<view class="fw500 f15 cfred">{{jobDetail.storeJob.monthlyPay + '元/月'}}</view>
</view>
<view class="mt16 tal">
<view class="mr16 f14">
<text class="cfred">*</text>姓名
</view>
<view class="fw500 f15 fss por billInput">
<view class>
<input class="weui-input" type="text" name="userName" bindinput="bothwayBind" data-type="name" value="{{userInfo.name}}" placeholder="请输入姓名或称呼" placeholder-class="input-placeholder" />
</view>
</view>
</view>
<view class="mt16 tal">
<view class="mr16 f14">
<text class="cfred">*</text>身份证
</view>
<view class="fw500 f15 fss por billInput">
<view class>
<input class="weui-input" type="text" name="userName" data-type="name" value="{{userInfo.name}}" placeholder="手动输入或拍照自动识别" />
</view>
<view class="t-icon t-icon-paizhao4 poa" style="right:12px"></view>
</view>
</view>
<view class="mt16 tal">
<view class="mr16 f14">
<text class="cfred">*</text>联系电话
</view>
<view class="fw500 f15 fss por billInput">
<view class>
<input class="weui-input" type="text" name="userName" data-type="name" value="{{userInfo.name}}" placeholder="请输入联系电话" />
</view>
</view>
</view>
<view class="mt8 f11 tal cccc mb24 pl4" style="width:90%" hover-class="none" hover-stop-propagation="false">注意:不同的报名人如果填写同一个手机号,报名提交将会失败。</view>
</view>
<view class="fsa pl32 pr32 mb24" hover-class="none" hover-stop-propagation="false">
<button class="nobg_Btn normalBtn mr16" style type role="button" bindtap='hideModal'>我再想想</button>
<button class="bgBtn normalBtn" style type="primary" role="button" bindtap>确认报名</button>
</view>
</view>
</view>

@ -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;
}

@ -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);
}
},
});

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,11 @@
<view class="component-slider">
<view class="slider-box">
<view class="slider_value" hover-class="none" hover-stop-propagation="false">{{show_value == 60 ?show_value + '+' : show_value }}</view>
<!-- <view class="slider-btn" style="left:{{(slider_value - slider_min)*(92 / (slider_max - slider_min)) }}%">
<image class src="/assets/images/slider_img.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindtap bindload></image>
</view>
<view class="slider-line"></view>
<view class="slider-line-active" style="width: {{ (slider_value - slider_min)*(92 / (slider_max-slider_min))}}%"></view> -->
</view>
<slider block-size="28" style="height:30px" selected-color="var(--color-ysd)" bindchanging="sliderChanging" bindchange="sliderChange" min="{{slider_min}}" max="{{slider_max}}" value="{{slider_value}}" />
</view>

@ -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;
}

@ -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");

@ -1,3 +1,6 @@
{
"navigationStyle":"custom"
"navigationStyle":"custom",
"usingComponents": {
"record-bill": "../../components/recordBill/index"
}
}

@ -475,57 +475,5 @@
</view>
</view>
<view class="mask" wx:if="{{isMaskShow}}"></view>
<view aria-role="dialog" aria-modal="true" catchtouchmove="modalMove" class="fadeIn" wx:if="{{recordBillShow}}">
<view class="weui-mask" catchtap="hideModal"></view>
<view class="weui-dialog contact" style="box-sizing:border-box;">
<view class="mt24 f18 fw500 mb24">报名确认</view>
<view class="pl32">
<view class="fss">
<view class="mr16 f14">报名岗位</view>
<view class="fw500 f15">{{jobDetail.storeJob.jobName}}</view>
</view>
<view class="fss mt10">
<view class="mr16 f14">薪资待遇</view>
<view class="fw500 f15 cfred">{{jobDetail.storeJob.monthlyPay + '元/月'}}</view>
</view>
<view class="mt16 tal">
<view class="mr16 f14">
<text class="cfred">*</text>姓名
</view>
<view class="fw500 f15 fss por billInput">
<view class>
<input class="weui-input" type="text" name="userName" bindinput="bothwayBind" data-type="name" value="{{userInfo.name}}" placeholder="请输入姓名或称呼" placeholder-class="input-placeholder" />
</view>
</view>
</view>
<view class="mt16 tal">
<view class="mr16 f14">
<text class="cfred">*</text>身份证
</view>
<view class="fw500 f15 fss por billInput">
<view class>
<input class="weui-input" type="text" name="userName" bindinput="bothwayBind" data-type="name" value="{{userInfo.name}}" placeholder="手动输入或拍照自动识别" />
</view>
<view class="t-icon t-icon-paizhao4 poa" style="right:12px" catchtap="chooseIdCard"></view>
</view>
</view>
<view class="mt16 tal">
<view class="mr16 f14">
<text class="cfred">*</text>联系电话
</view>
<view class="fw500 f15 fss por billInput">
<view class>
<input class="weui-input" type="text" name="userName" bindinput="bothwayBind" data-type="name" value="{{userInfo.name}}" placeholder="请输入联系电话" />
</view>
</view>
</view>
<view class="mt8 f11 tal cccc mb24 pl4" style="width:90%" hover-class="none" hover-stop-propagation="false">注意:不同的报名人如果填写同一个手机号,报名提交将会失败。</view>
</view>
<view class="fsa pl32 pr32 mb24" hover-class="none" hover-stop-propagation="false">
<button class="nobg_Btn normalBtn mr16" style type role="button" bindtap>我再想想</button>
<button class="bgBtn normalBtn" style type="primary" role="button" bindtap>确认报名</button>
</view>
</view>
</view>
</view>
<record-bill show="{{recordBillShow}}" bindhidedrawer="hidedrawershow" drawerType="recordBillShow" jobDetail="{{jobDetail}}"></record-bill>

@ -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 () {
}
})

@ -1,4 +1,6 @@
{
"navigationBarTitleText": "我的代理",
"usingComponents": {}
"usingComponents": {
"bottom-drawer": "../../components/bottom-drawer/index"
}
}

@ -1,2 +1,27 @@
<!--pages/mineAgency/index.wxml-->
<text>pages/mineAgency/index.wxml</text>
<view class="mineAgencyContainer" hover-class="none" hover-stop-propagation="false">
<view class="weui-search-bar__box flex-1 fss" style="background-color: #f5f5f5;border-radius: 17px;">
<i class="iconfont icon-sousuo poa" style="left:12px"></i>
<input type="text" class="weui-search-bar__input flex-1 c3" style placeholder-style="color:#999;" value="{{inputVal}}" placeholder="{{'搜索代理名称'}}" bindinput="inputTyping" bindconfirm="searchKey" auto-focus confirm-type="search" />
<view class="iconfont icon-qingchu1 biggerSize" wx:if="{{inputVal}}" catchtap="clearInput"></view>
</view>
<scroll-view class="mineAgencyBody mt10" scroll-x="false" scroll-y="true" scroll-top="0" scroll-left="0" scroll-into-view scroll-with-animation="false" enable-flex enable-back-to-top="false" bindscrolltoupper bindscrolltolower bindscroll>
<view class="fsa subItem" wx:for="{{list}}" hover-class="none" hover-stop-propagation="false">
<view class="fss" hover-class="none" hover-stop-propagation="false">
<image class="logoImg" src="{{item.logo}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
<view class="ml16" hover-class="none" hover-stop-propagation="false">{{item.title}}</view>
</view>
<view class="iconfont icon-gengduo2 cccc rotate90" hover-class="none" bindtap="deleteAgency" hover-stop-propagation="false"></view>
</view>
</scroll-view>
</view>
<!-- 复制确认框显示 -->
<bottom-drawer show="{{deleteAgencyShow}}" cancerShow="{{false}}" drawerType="deleteAgencyShow" bindhidedrawer="hidedrawershow" touchClose="{{true}}" class="bottomDrawer" height>
<view class hover-class="none" style="background-color:#f5f5f5" hover-stop-propagation="false">
<view class="weui-actionsheet__menu bgf">
<view aria-role="button" class="weui-actionsheet__cell cfred" bindtap="sureDelete">删除</view>
</view>
<view class="weui-actionsheet__action">
<view aria-role="button" class="weui-actionsheet__cell bgf mt8 chref pb32" bindtap="cancelDelete">取消</view>
</view>
</view>
</bottom-drawer>

@ -1 +1,16 @@
/* pages/mineAgency/index.wxss */
/* 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;
}
Loading…
Cancel
Save