This commit is contained in:
18631081161 2025-07-23 14:37:55 +08:00
parent 15fcb75f60
commit a1ed683780
2 changed files with 177 additions and 62 deletions

View File

@ -49,10 +49,12 @@
<view class=""
style="width: 100%; height: 114.58rpx; background-color: #FFFDF1; position: fixed; bottom: 0; display: flex; flex-direction: row-reverse; align-items: center;">
<view class=""
<view class="" @click="openBagsPop()"
style="width: 164.58rpx; height: 68.75rpx; position: relative; margin-right: 19.44rpx; display: flex; align-items: center; justify-content: center;">
<image src="https://guyu-1308826010.cos.ap-shanghai.myqcloud.com/static/pay_bg.png" style="width: 100%; height: 100%;position: absolute;" mode=""></image>
<text class="myZt-600w" style="position: absolute; font-size: 20.83rpx; color: #66594E;">结算 ({{checkNum}})</text>
<image src="https://guyu-1308826010.cos.ap-shanghai.myqcloud.com/static/pay_bg.png"
style="width: 100%; height: 100%;position: absolute;" mode=""></image>
<text class="myZt-600w" style="position: absolute; font-size: 20.83rpx; color: #66594E;">结算
({{checkNum}})</text>
</view>
<text style="font-size: 29.13rpx; color: #6E5B51; margin-right: 30.56rpx;">{{sumPrice}}</text>
@ -69,6 +71,19 @@
</view>
<!-- 购买弹窗 -->
<uni-popup ref="bagsPayPop" type="bottom" :safe-area='false'>
<view class="bg" style="width: 100%; height: 1191.67rpx; background-image: url(@@:static/pay_pop_bg2.png);">
</view>
</uni-popup>
</view>
</template>
@ -79,6 +94,7 @@
checkNum: 0, //
sumPrice: 0, //
selectAll: false,
selectedItems: [], //
dataList: [{
imgurl: "",
title: "坂本日常 吧唧",
@ -200,7 +216,39 @@
this.sumPrice = this.dataList.reduce((total, item) => {
return total + (item.isCheck ? item.price * item.num : 0);
}, 0);
}
},
//
getSelectedItems() {
return this.dataList.filter(item => item.isCheck);
},
//
submitSelected() {
this.selectedItems = this.getSelectedItems();
console.log('选中的项目:', this.selectedItems);
console.log("88888");
uni.showToast({
title: `已选中${this.selectedItems.length}个项目`,
icon: 'none'
});
},
openBagsPop() {
this.submitSelected();
if (this.selectedItems.length < 1) {
uni.showToast({
title: `请选择商品`,
icon: 'none'
});
return;
}
this.$refs.bagsPayPop.open()
},
closeBagsPop() {
this.$refs.bagsPayPop.close()
},
},

View File

@ -10,7 +10,7 @@
<view class="back"></view>
</view>
<view class="" style="width: 100%; margin-top: 41.67rpx; overflow: auto;">
<scroll-view class="" scroll-y="true" style="width: 100vw; margin-top: 41.67rpx; overflow-y: auto;">
<view class="" v-for="(item,index) in dataList" :style="setBorder(index)" @click="selectAdd(index)"
style="width: 695.83rpx; height: 136.81rpx; background-color: white; margin: 0 auto 12.5rpx; border-radius: 16rpx; display: flex; align-items: center;">
@ -21,20 +21,93 @@
<text style="font-size: 19.44rpx; color: #8C8574; margin-top: 10.67rpx;">{{item.phone}}</text>
</view>
<image src="@@:static/ic_modify.png" @click="addressPopOpen()" style="width: 22.92rpx; height: 22.92rpx; margin-right: 12.5rpx;"
mode=""></image>
<image src="@@:static/ic_modify.png" @click="addressPopOpen()"
style="width: 22.92rpx; height: 22.92rpx; margin-right: 12.5rpx;" mode=""></image>
</view>
<image src="@@:static/add_address.png"
style="width: 561.81rpx; height: 122.92rpx; margin: 10rpx auto 20rpx; margin-left: 50%; transform: translateX(-50%);"
mode=""></image>
</view>
</scroll-view>
<uni-popup ref="addressPop" type="bottom" :safe-area='false'>
<view class="bg" style="width: 100%; height: 825rpx; background-image: url('@@:static/address_bg.png');">
<view class="bg column"
style="width: 100%; height: 825rpx; align-items: center; background-image: url('@@:static/address_bg.png'); ">
<view class="row" style="width: 100%; margin-top: 38.89rpx;">
<view style="flex: 1;"></view>
<view class="center" @click="addressPopClose()"
style="width: 30rpx; height: 30rpx; margin-right: 30.56rpx;">
<image src="@@:static/ic_close.png" style="width: 19.44rpx; height: 19.44rpx;" mode=""></image>
</view>
</view>
<view class=" column"
style="width: 690.28rpx; height: 477.78rpx; background-color: white; border-radius: 16rpx; margin-top: 40.97rpx;">
<text class="myZt-500w"
style="font-size: 19.44rpx; color: #8C8574; margin-left: 28.47rpx; margin-top: 30.56rpx;">所在地区</text>
<view class="myZt-500w"
style="width: 633.33rpx; height: 22.22rpx; font-size: 23.61rpx; color: #6E5B51; align-items: center; margin-top: 19.44rpx; margin-left: 29.86rpx;">
<textarea v-model="economize" auto-height="false"
style="height: 22.22rpx; line-height: 22.22rpx;" fixed="true" />
</view>
<view class=""
style="width: 633.33rpx; height: 1rpx; background-color: #EBE7DB; margin: 18.75rpx auto 0;">
</view>
<text class="myZt-500w"
style="font-size: 19.44rpx; color: #8C8574; margin-left: 28.47rpx; margin-top: 30.56rpx;">详细地址与门牌号</text>
<view class="myZt-500w"
style="width: 633.33rpx; height: 22.22rpx; font-size: 23.61rpx; color: #6E5B51; align-items: center; margin-top: 19.44rpx; margin-left: 29.86rpx;">
<textarea v-model="community" auto-height="false"
style="height: 22.22rpx; line-height: 22.22rpx;" fixed="true" />
</view>
<view class=""
style="width: 633.33rpx; height: 1rpx; background-color: #EBE7DB; margin: 18.75rpx auto 0;">
</view>
<text class="myZt-500w"
style="font-size: 19.44rpx; color: #8C8574; margin-left: 28.47rpx; margin-top: 30.56rpx;">收货人名字</text>
<view class="myZt-500w"
style="width: 633.33rpx; height: 22.22rpx; font-size: 23.61rpx; color: #6E5B51; align-items: center; margin-top: 19.44rpx; margin-left: 29.86rpx;">
<textarea v-model="name" auto-height="false" style="height: 22.22rpx; line-height: 22.22rpx;"
fixed="true" />
</view>
<view class=""
style="width: 633.33rpx; height: 1rpx; background-color: #EBE7DB; margin: 18.75rpx auto 0;">
</view>
<text class="myZt-500w"
style="font-size: 19.44rpx; color: #8C8574; margin-left: 28.47rpx; margin-top: 30.56rpx;">手机号</text>
<view class="myZt-500w"
style="width: 633.33rpx; height: 22.22rpx; font-size: 23.61rpx; color: #6E5B51; align-items: center; margin-top: 19.44rpx; margin-left: 29.86rpx;">
<textarea v-model="phone" auto-height="false" style="height: 22.22rpx; line-height: 22.22rpx;"
fixed="true" />
</view>
</view>
<image src="@@:/static/save_address.png"
style="width: 561.81rpx; height: 122.92rpx; margin: 51.39rpx auto 0;" mode=""></image>
</view>
@ -47,59 +120,53 @@
data() {
return {
selectAddress: 0,
economize: "河南省",
community: "某某小区某号楼",
name: "嘉辉",
phone: "125641586522",
dataList: [{
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
phone: "某某 13333333333"
},
]
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
name: "某某",
phone: "13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
name: "某某",
phone: "13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
name: "某某",
phone: "13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
name: "某某",
phone: "13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
name: "某某",
phone: "13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
name: "某某",
phone: "13333333333"
}, {
id: 1,
economize: "河南省 某某市 某某区 某某街道",
community: "某某小区某号楼",
name: "某某",
phone: "13333333333"
}, ]
}
},
@ -129,7 +196,7 @@
},
addressPopClose() {
this.$refs.addressPop.cloes()
this.$refs.addressPop.close()
},