按钮添加

This commit is contained in:
1154079537 2024-06-14 16:31:41 +08:00
parent 87cc78ffcd
commit 33a416d407
3 changed files with 64 additions and 3 deletions

View File

@ -1,3 +1,12 @@
<style lang="scss">
.share-btn {
display: flex;
align-items: center;
position: fixed;
width: 120rpx;
z-index: 20;
}
</style>
<template> <template>
<view class="content"> <view class="content">
<up-navbar placeholder style="z-index: 10080;"> <up-navbar placeholder style="z-index: 10080;">
@ -13,6 +22,11 @@
</view> </view>
</template> </template>
</up-navbar> </up-navbar>
<view class="share-btn" :style="{height:btns.height + 'px',top:btns.top + 'px',left:(btns.left - 70) + 'px'}">
<up-button type="success" icon="share" openType="share" plain text="分享" size="mini" />
</view>
<view class="navbar"> <view class="navbar">
<view style="width: 400rpx;"> <view style="width: 400rpx;">
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword" <up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
@ -510,6 +524,14 @@
}) })
} }
//
const btns = ref({
height: 0,
top: 0,
bottom: 0,
left: 0
})
onLoad(async (opt) => { onLoad(async (opt) => {
// id // id
if (opt.id) { if (opt.id) {
@ -528,6 +550,8 @@
getgoodClassList(0); getgoodClassList(0);
getGoodList(); getGoodList();
btns.value = uni.getMenuButtonBoundingClientRect();
}) })
onShow(() => { onShow(() => {

View File

@ -1,3 +1,26 @@
<style lang="scss">
.rest {
display: flex;
justify-content: space-around;
margin: 20rpx;
.rest-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.rest-item-num {
font-size: 30rpx;
margin-bottom: 16rpx;
}
.rest-item-txt {
font-size: 28rpx;
}
}
}
</style>
<template> <template>
<view> <view>
<up-navbar title="我的" :autoBack="true" bgColor="transparent" :fixed="true"> <up-navbar title="我的" :autoBack="true" bgColor="transparent" :fixed="true">
@ -15,6 +38,22 @@
</view> </view>
</view> </view>
</view> </view>
<view class="rest">
<view class="rest-item">
<view class="rest-item-num">123123</view>
<view class="rest-item-txt">余额</view>
</view>
<view class="rest-item">
<view class="rest-item-num">123123</view>
<view class="rest-item-txt">采购款</view>
</view>
<view class="rest-item">
<view class="rest-item-num">123123</view>
<view class="rest-item-txt">待返还金额</view>
</view>
</view>
<view class="gift"> <view class="gift">
<view style="font-weight: bold;"> <view style="font-weight: bold;">
供销经营礼包 供销经营礼包
@ -22,7 +61,6 @@
<view class='gift-buy' @click="navgo('/pages/gift/index')"> <view class='gift-buy' @click="navgo('/pages/gift/index')">
立即购买 立即购买
</view> </view>
</view> </view>
<view class="order-info-box"> <view class="order-info-box">
<view class="order-info"> <view class="order-info">

View File

@ -316,6 +316,7 @@
if (!isAddress.value && orderInfo.value.shipping_type == 1) return toastAddressShow.value = true; if (!isAddress.value && orderInfo.value.shipping_type == 1) return toastAddressShow.value = true;
createOrder(); createOrder();
} }
// //
const cartList = ref([]); const cartList = ref([]);
const orderInfo = ref({}); const orderInfo = ref({});
@ -345,9 +346,7 @@
reservation_time: reservation_time.value, reservation_time: reservation_time.value,
shipping_type: orderInfo.value.shipping_type, shipping_type: orderInfo.value.shipping_type,
mark: formData.value.remark mark: formData.value.remark
}).then(res => { }).then(res => {
console.log(res);
if (pay_type.value == 3) { if (pay_type.value == 3) {
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ uni.showToast({