Commit 249a2cb0 authored by qinhaitao's avatar qinhaitao

fix: 🐛 bug

parent 69751d67
.item-dialog-content { .item-dialog-content {
background: #FFFFFF; background: #ffffff;
max-height: 507px; max-height: 507px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -11,102 +10,100 @@ ...@@ -11,102 +10,100 @@
} }
.modal-content-btn.choose-modal-footer { .modal-content-btn.choose-modal-footer {
justify-content:space-between; justify-content: space-between;
align-items:center; align-items: center;
} }
.choose-content-tab { .choose-content-tab {
padding:10px 20px; padding: 10px 10px;
flex-grow:1; flex-grow: 1;
overflow:hidden; overflow: hidden;
height:450px; height: 450px;
} }
.choose-content-tab .choose-content-tab-view{ .choose-content-tab .choose-content-tab-view {
padding:20px 0 5px; padding: 20px 0 5px;
} }
.choose-content-tab-baby{ .choose-content-tab-baby {
border:1px solid #ccc; border: 1px solid #ccc;
position:relative; position: relative;
margin:0 5px 10px 0; margin: 0 5px 10px 0;
} }
.choose-content-tab-baby_nomargin { .choose-content-tab-baby_nomargin {
margin-right: 0; margin-right: 0;
} }
.choose-content-tab-baby:hover { .choose-content-tab-baby:hover {
border:1px solid #3386F1; border: 1px solid #3386f1;
} }
.choose-content-tab-image-wrap { .choose-content-tab-image-wrap {
padding:10px; padding: 10px;
font-size:0; font-size: 0;
} }
.choose-content-tab-image-wrap image{ .choose-content-tab-image-wrap image {
width:134px; width: 134px;
height:134px; height: 134px;
} }
.choose-content-tab-baby-wrap{ .choose-content-tab-baby-wrap {
display:flex; display: flex;
max-height:300px; max-height: 300px;
overflow:hidden; overflow: hidden;
overflow-y: auto; overflow-y: auto;
padding-bottom: 70px; padding-bottom: 70px;
flex-wrap:wrap; flex-wrap: wrap;
/* justify-content: space-between; */ /* justify-content: space-between; */
} }
.choose-content-tab-baby-info{ .choose-content-tab-baby-info {
background:#EBF3FF; background: #ebf3ff;
padding:10px; padding: 10px;
} }
.choose-content-tab-baby Checkbox{ .choose-content-tab-baby Checkbox {
position:absolute; position: absolute;
right:10px; right: 10px;
top:9px; top: 9px;
} }
.choose-content-tab-baby-info-title{ .choose-content-tab-baby-info-title {
width:134px; width: 134px;
white-space: nowrap; white-space: nowrap;
font-size:12px; font-size: 12px;
color:#333333; color: #333333;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
margin-bottom:10px; margin-bottom: 10px;
} }
.choose-content-tab-baby-info-prize { .choose-content-tab-baby-info-prize {
display:flex; display: flex;
font-size:12px; font-size: 12px;
justify-content:space-between; justify-content: space-between;
} }
.choose-content-tab-baby-info-prize .prize-now{ .choose-content-tab-baby-info-prize .prize-now {
color: #333; color: #333;
} }
.choose-content-tab-baby-info-prize .prize-now text{ .choose-content-tab-baby-info-prize .prize-now text {
color:#FFA033; color: #ffa033;
} }
.choose-content-tab-baby-info-prize .prize-old{ .choose-content-tab-baby-info-prize .prize-old {
color:#999999; color: #999999;
text-decoration:line-through; text-decoration: line-through;
} }
.choose-content-pagination{ .choose-content-pagination {
display:flex; display: flex;
justify-content:flex-end; justify-content: flex-end;
margin:10px 20px 10px 0; margin: 10px 20px 10px 0;
} }
.choose-modal-footer-number{ .choose-modal-footer-number {
margin:0 5px; margin: 0 5px;
color:#3386F1; color: #3386f1;
} }
.choose-no-baby {
.choose-no-baby{ font-size: 14px;
font-size:14px;
color: #333; color: #333;
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<view class="modal-content-btn choose-modal-footer"> <view class="modal-content-btn choose-modal-footer">
<view>已选择<text class="choose-modal-footer-number">{{chooseId.length}}</text>个宝贝</view> <view>已选择<text class="choose-modal-footer-number">{{chooseId.length}}</text>个宝贝</view>
<view class="items-dialog-btns"> <view class="items-dialog-btns">
<button type="primary" classs="items-dialog-btns_confirm" onTap="sureBabyDialog">确定</button> <button type="primary" class="items-dialog-btns_confirm" onTap="sureBabyDialog">确定</button>
<button onTap="closeBaby">取消</button> <button onTap="closeBaby">取消</button>
</view> </view>
</view> </view>
......
...@@ -23,6 +23,7 @@ Component({ ...@@ -23,6 +23,7 @@ Component({
props: { props: {
onClose: () => { }, onClose: () => { },
showBaby: false, showBaby: false,
limit: 20,
browseItemIds: "", browseItemIds: "",
onUpdateBabyChoose: () => { }, onUpdateBabyChoose: () => { },
}, },
...@@ -124,16 +125,17 @@ Component({ ...@@ -124,16 +125,17 @@ Component({
}, },
changeCheckStatus(e) { changeCheckStatus(e) {
const { chooseId } = this.data; const { chooseId } = this.data;
const { limit } = this.props;
const { item } = e.target.dataset; const { item } = e.target.dataset;
if (chooseId.includes(item.itemId)) { if (chooseId.includes(item.itemId)) {
this.setData({ this.setData({
chooseId: chooseId.filter(v => v !== item.itemId), chooseId: chooseId.filter(v => v !== item.itemId),
}); });
} else { } else {
if (chooseId.length >= 20) { if (chooseId.length >= +limit) {
my.showToast({ my.showToast({
type: "fail", type: "fail",
content: "最多选择20个宝贝", content: `最多选择${limit}个宝贝`,
}); });
return; return;
} }
......
...@@ -192,11 +192,10 @@ ...@@ -192,11 +192,10 @@
class="probability-prize-content-formItem probability-prize-content-formItem-choosePrize" class="probability-prize-content-formItem probability-prize-content-formItem-choosePrize"
label="商品查看链接"> label="商品查看链接">
<view class="probability-prize-content-formitem-choosePrize-wrap"> <view class="probability-prize-content-formitem-choosePrize-wrap">
<view <button
class="probability-prize-content-formitem-goequity"
onTap="onOpenDialog" onTap="onOpenDialog"
type="primary">{{prizeInitData.itemId ? '更换商品' : '可选择商品'}} type="primary">{{prizeInitData.itemId ? '更换商品' : '添加商品'}}
</view> </button>
</view> </view>
</form-item> </form-item>
</form> </form>
...@@ -210,6 +209,7 @@ ...@@ -210,6 +209,7 @@
onUpdateBabyChoose="onUpdateBabyChoose" onUpdateBabyChoose="onUpdateBabyChoose"
browseItemIds="{{itemIds}}" browseItemIds="{{itemIds}}"
showBaby="{{goodsVisible}}" showBaby="{{goodsVisible}}"
limit="{{1}}"
onClose="onCloseGoodsDialog" /> onClose="onCloseGoodsDialog" />
</view> </view>
</dialog-wrap> </dialog-wrap>
\ No newline at end of file
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