Commit a31a75fb by 姜雷

Merge branch 'test'

parents 5777da72 126761d2
...@@ -12,6 +12,7 @@ Page({ ...@@ -12,6 +12,7 @@ Page({
areaList: [], areaList: [],
filterList: [], filterList: [],
methodName: '', methodName: '',
inputValue: '',
}, },
/** /**
...@@ -48,6 +49,7 @@ Page({ ...@@ -48,6 +49,7 @@ Page({
if (index > -1) { if (index > -1) {
this.setData({ this.setData({
selectedIndex: index, selectedIndex: index,
inputValue: res.data[index].areaName,
}); });
} }
} }
...@@ -74,6 +76,14 @@ Page({ ...@@ -74,6 +76,14 @@ Page({
console.log(e, value); console.log(e, value);
this.getFilterListByName(value); this.getFilterListByName(value);
}, },
clearInputValue() {
console.log('in clearInputValue');
this.setData!({
inputValue: '',
selected: '',
selectedIndex: '',
});
},
getFilterListByName(name: string) { getFilterListByName(name: string) {
let filterList = []; let filterList = [];
if (name) { if (name) {
...@@ -83,7 +93,7 @@ Page({ ...@@ -83,7 +93,7 @@ Page({
} else { } else {
filterList = this.data.areaList; filterList = this.data.areaList;
} }
this.setData({ this.setData!({
filterList, filterList,
}); });
}, },
...@@ -104,7 +114,7 @@ Page({ ...@@ -104,7 +114,7 @@ Page({
var pages = getCurrentPages(); var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //上一个页面 var prevPage = pages[pages.length - 2]; //上一个页面
let entity = { let entity = {
id: value, id: this.data.filterList[value].id,
name: this.data.filterList[value].areaName, name: this.data.filterList[value].areaName,
}; };
......
<!-- miniprogram/pages/areaSelect/areaSelect.wxml --> <!-- miniprogram/pages/areaSelect/areaSelect.wxml -->
<view class="areaselect-pickBox"> <view class="areaselect-pickBox">
<view class="areaselect-pickFilter"> <view class="areaselect-pickFilter">
<input class="areaselect-pickInput" type="text" bindinput="inputHandle" bindconfirm="confirmHandle" /> <input class="areaselect-pickInput" type="text" value="{{inputValue}}" bindinput="inputHandle" bindconfirm="confirmHandle" />
<view class="areaselect-pickInput-clear" wx:if="{{inputValue}}" catch:tap="clearInputValue">
<image class="areaselect-pickInput-clear-icon" src="../../images/ic_guanbi@2x.png" />
</view>
<view class="areaselect-pickBtn" bindtap="bindPickerChange">确认</view> <view class="areaselect-pickBtn" bindtap="bindPickerChange">确认</view>
</view> </view>
<view class="areaselect-list"> <view class="areaselect-list">
......
...@@ -13,6 +13,7 @@ page { ...@@ -13,6 +13,7 @@ page {
flex-direction: column; flex-direction: column;
} }
.areaselect-pickFilter { .areaselect-pickFilter {
position: relative;
display: flex; display: flex;
padding: 40rpx 40rpx 0; padding: 40rpx 40rpx 0;
align-items: center; align-items: center;
...@@ -20,6 +21,17 @@ page { ...@@ -20,6 +21,17 @@ page {
.areaselect-pickInput { .areaselect-pickInput {
flex: 1; flex: 1;
} }
.areaselect-pickInput-clear {
position: absolute;
width: 40rpx;
height: 40rpx;
right: 175rpx;
z-index: 2;
}
.areaselect-pickInput-clear-icon {
width: 100%;
height: 100%;
}
.areaselect-pickBtn { .areaselect-pickBtn {
color: #6895fe; color: #6895fe;
margin-left: 20rpx; margin-left: 20rpx;
......
...@@ -63,7 +63,11 @@ function initChart(canvas, width, height, F2) { ...@@ -63,7 +63,11 @@ function initChart(canvas, width, height, F2) {
const coord = paytypeChart.get('coord'); // 获取坐标系对象 const coord = paytypeChart.get('coord'); // 获取坐标系对象
frontPlot.addShape('sector', { frontPlot.addShape('sector', {
attrs: { attrs: {
fill: '#000', x: coord.center.x - coord.circleRadius - coord.start.x + coord.endAngle,
y: coord.center.y,
r: 0, // 全半径
r0: coord.circleRadius * coord.innerRadius,
fill: '#fff',
}, },
}); });
paytypeChart.get('canvas').draw(); paytypeChart.get('canvas').draw();
...@@ -84,7 +88,15 @@ Component({ ...@@ -84,7 +88,15 @@ Component({
marker: 'square', marker: 'square',
itemFormatter: val => { itemFormatter: val => {
let item = newVal.find(item => item.key === val); let item = newVal.find(item => item.key === val);
return item ? item.name + ' ' + formatPrice(item.count) : ''; if (item) {
let name = item.name;
if (item && item.name.length < 4) {
name += '\xa0\xa0\xa0';
}
return name + ' ' + formatPrice(item.count);
} else {
return '';
}
}, },
// custom: true, // custom: true,
// items: newVal.map(item => ({ // items: newVal.map(item => ({
......
...@@ -18,17 +18,19 @@ ...@@ -18,17 +18,19 @@
} }
.login-input-password { .login-input-password {
position: relative; display: flex;
align-items: center;
}
.login-input-password .login-input {
flex: 1;
margin-bottom: 0;
margin-right: 10rpx;
} }
.password-eyes { .password-eyes {
position: absolute;
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
right: 40rpx;
top: 10rpx;
z-index: 2; z-index: 2;
padding: 10rpx; padding: 20rpx;
} }
.password-eyes-icon { .password-eyes-icon {
width: 100%; width: 100%;
......
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