完善页面

This commit is contained in:
2025-04-26 18:06:44 +08:00
parent 0ab586dc2f
commit 2b6340dd15
116 changed files with 4300 additions and 119 deletions

View File

@ -0,0 +1,159 @@
<template>
<view>
<u-popup v-model="showPop" mode="bottom" border-radius="16" :safe-area-inset-bottom="true" :closeable="true">
<view class="appointment-time">
<view class="bold-700 lg u-p-t-24 u-p-b-24 u-text-center">选择预约时间</view>
<view class="block row" style="height: 700rpx;">
<view class="aside">
<scroll-view style="height: 100%;" scroll-y="true" scroll-with-animation="true">
<view style="padding-bottom: 200rpx;">
<block v-for="(item, index) in cateList" :key="index">
<view :class="'one-item sm ' + (index == selectIndex ? 'active bg-white' : '')" @click="changeActive(index)">
<text class="name">{{ item.name }}</text>
<view v-if="index == selectIndex" class="active-line bg-default"></view>
</view>
</block>
</view>
</scroll-view>
</view>
<view class="main">
<scroll-view style="height: 100%" scroll-y="true" scroll-with-animation="true">
<view class="main-wrap u-m-t-32">
<view class="bg-white br16 row u-col-top u-m-b-24" v-for="(item, index) in 20" :key="index">
<view>900 - 930</view>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {getCatrgory} from '@/api/store'
export default {
name: "appointment-time",
props: {
value: {
type: Boolean,
required: true
}
},
data() {
return {
mobile: '',
selectIndex: 0,
cateList: []
};
},
created() {
this.getCatrgoryFun()
},
methods: {
getCatrgoryFun() {
getCatrgory().then(res => {
if (res.code == 1) {
this.cateList = res.data
}
});
},
changeActive(index) {
const {cateList} = this
this.selectIndex = index
},
// 提交数据
handleSubmit(e) {
const {mobile} = this
if (!mobile) return this.$toast({
title: '请授权手机号'
})
this.$emit('update', {
mobile
})
this.showPop = false
this.$emit('close')
},
// 关闭弹窗
onClose() {
this.showPop = false
this.$emit('close')
}
},
computed: {
showPop: {
get() {
return this.value
},
set(val) {
this.$emit('input', val)
}
}
}
};
</script>
<style lang="scss">
.appointment-time {
height: 800rpx;
max-height: 800rpx;
}
.block {
height: 100vh;
}
.aside {
width: 180rpx;
flex: none;
height: 100%;
background-color: #fdfdfd;
.one-item {
position: relative;
text-align: center;
height: 108rpx;
line-height: 108rpx;
&.active {
color: $-color-theme;
font-size: 26rpx;
font-weight: bold;
}
.active-line {
position: absolute;
width: 6rpx;
height: 30rpx;
left: 4rpx;
top: 50%;
transform: translateY(-50%);
}
}
}
.main {
height: 100%;
flex: 1;
.main-wrap {
position: relative;
padding: 0 20rpx;
.goods {
padding-bottom: 200rpx;
.info {
width: 100%;
display: flex;
justify-content: space-between;
margin: 0 16rpx;
}
}
}
}
</style>

View File

@ -18,22 +18,22 @@
<scroll-view style="height: 100%" scroll-y="true" scroll-with-animation="true" @scrolltolower="getGoodsSearchFun">
<view class="main-wrap">
<view class="goods">
<view class="u-margin-top-32 bold-600">{{cateName}}</view>
<view class="u-m-t-32 bold-600">{{cateName}}</view>
<view class="u-margin-top-32">
<view class="bg-white br16 row u-col-top u-margin-bottom-24" v-for="(item, index) in 10" :key="index" @click="toShop()">
<view class="u-m-t-32">
<view class="bg-white br16 row u-col-top u-m-b-24" v-for="(item, index) in 10" :key="index" @click="toShop()">
<view>
<u-image :src="cloudPath + 'img/banner.png'" width="136" height="136" border-radius="16"></u-image>
</view>
<view class="info">
<view>
<view class="u-line-2 u-padding-top-10">葱烩海鲜卷边披萨</view>
<view class="u-padding-top-44 row-between">
<view class="u-line-2 u-p-t-10">葱烩海鲜卷边披萨</view>
<view class="u-p-t-44 row-between">
<view class="row">
<view class="primary">
<price-format :price="12.9" :subscriptSize="22" :firstSize="34" :secondSize="26"></price-format>
</view>
<view class="u-margin-left-8">
<view class="u-m-l-8">
<price-format :lineThrough="true" color="#C0C0C0" :subscriptSize="22" :firstSize="22" :secondSize="22" :price="16.9"></price-format>
</view>
</view>
@ -53,8 +53,11 @@
</view>
<view class="buy mx40 px40 br60 row-between">
<view class="row">
<u-image :src="cloudPath + 'img/icon_cart.png'" width="56" height="56"></u-image>
<view class="text-fff u-margin-left-32">未选购商品</view>
<view class="u-relative">
<u-image :src="cloudPath + 'img/icon_cart.png'" width="56" height="56"></u-image>
<u-badge type="error" count="7" :absolute="true" offset="[0, 0]"></u-badge>
</view>
<view class="text-fff u-m-l-32">未选购商品</view>
</view>
<view class="text-999">去结算</view>
</view>
@ -67,23 +70,23 @@
</view>
<view>
<scroll-view style="height: 700rpx;" scroll-y="true" scroll-with-animation="true">
<view class="row-start u-row-between u-padding-top-20 u-padding-bottom-20 px20" v-for="(item, index) in 20" :key="index">
<view class="row-start u-row-between u-p-t-20 u-padding-bottom-20 px20" v-for="(item, index) in 20" :key="index">
<view class="row-start">
<view>
<u-image :src="cloudPath + 'img/banner.png'" width="136" height="136" border-radius="16"></u-image>
</view>
<view class="ml20">
<view class="u-line-2 u-padding-top-10">葱烩海鲜卷边披萨</view>
<view class="primary u-padding-top-40">
<view class="u-line-2 u-p-t-10">葱烩海鲜卷边披萨</view>
<view class="primary u-p-t-40">
<price-format :price="12.9" :subscriptSize="22" :firstSize="34" :secondSize="26"></price-format>
</view>
</view>
</view>
<view>
<view class="u-text-right">
<u-icon class="u-padding-top-10" name="trash" size="32"></u-icon>
<u-icon class="u-p-t-10" name="trash" size="32"></u-icon>
</view>
<view class="u-padding-top-30">
<view class="u-p-t-30">
<u-number-box min="1" v-model="numberVal" @change="changeNumber"></u-number-box>
</view>
</view>

View File

@ -8,9 +8,9 @@
</view>
<view class="popup-form">
<form @submit="handleSubmit">
<view class="u-flex u-row-between avatar u-margin-top-80">
<view class="u-flex u-row-between avatar u-m-t-80">
<text>手机号码</text>
<view class="u-flex u-row-between flex1 u-margin-left-30">
<view class="u-flex u-row-between flex1 u-m-l-30">
<button style="border: none;" class="u-flex u-row-between w-full" hover-class="none"
open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">
<view v-if="mobile">{{mobile}}</view>

View File

@ -8,9 +8,9 @@
</view>
<view class="popup-form">
<form @submit="handleSubmit">
<view class="u-flex u-row-between avatar u-margin-top-80">
<view class="u-flex u-row-between avatar u-m-t-80">
<text>头像</text>
<view class="u-flex u-row-between flex1 u-margin-left-30">
<view class="u-flex u-row-between flex1 u-m-l-30">
<button style="border: none;" class="u-flex u-row-between w-full" hover-class="none"
open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<u-image v-if="avatar" :src="avatar" width="100rpx" height="100rpx"shape="circle"></u-image>
@ -19,9 +19,9 @@
</button>
</view>
</view>
<view class="u-flex u-row-between avatar u-margin-top-60">
<view class="u-flex u-row-between avatar u-m-t-60">
<text>昵称</text>
<view class="u-flex u-row-between flex1 u-margin-left-30">
<view class="u-flex u-row-between flex1 u-m-l-30">
<input
:value="nickname"
name="nickname"

View File

@ -3,10 +3,10 @@
<u-popup v-model="showPop" mode="center" :border-radius="16" @close="close">
<view class="bg-white spec">
<view class="shop-title bold-600 u-padding-left-40 w-full">商品标题</view>
<view class="u-margin-left-40">
<view class="u-m-l-40">
<scroll-view scroll-y="true" scroll-with-animation="true" style="height: 500rpx;">
<view>
<view class="attr nr u-margin-top-20 u-margin-bottom-20">口味</view>
<view class="attr nr u-m-t-20 u-m-b-20">口味</view>
<view class="row wrap">
<view class="attr-list active">要葱</view>
<view class="attr-list">要香菜</view>
@ -16,7 +16,7 @@
</view>
<view>
<view class="attr nr u-margin-top-20 u-margin-bottom-20">口味</view>
<view class="attr nr u-m-t-20 u-m-b-20">口味</view>
<view class="row wrap">
<view class="attr-list">要葱</view>
<view class="attr-list">要香菜</view>
@ -26,7 +26,7 @@
</view>
<view>
<view class="attr nr u-margin-top-20 u-margin-bottom-20">口味</view>
<view class="attr nr u-m-t-20 u-m-b-20">口味</view>
<view class="row wrap">
<view class="attr-list">要葱</view>
<view class="attr-list">要香菜</view>
@ -38,7 +38,7 @@
</view>
<view class="mt20">
<view class="u-margin-left-40">已选规格</view>
<view class="u-m-l-40">已选规格</view>
<view class="row u-row-center mt20">
<view class="w-40 mr10">
<u-button @click="mobileLogin" hover-class="none" :customStyle="{color: themeColor, border: '1px solid ' + themeColor, padding: '16rpx 0'}" :plain="true" :hair-line="false" shape="circle">取消</u-button>

View File

@ -155,7 +155,7 @@ text {
padding-#{$long}: $i + rpx!important;
}
// 完整版结果如u-margin-left-30
// 完整版结果如u-m-l-30
// 定义外边距
.u-margin-#{$long}-#{$i} {
margin-#{$long}: $i + rpx!important;