| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478 |
- <template>
- <view>
- <view class="goods-section" v-for="(s,si) in productList" v-bind:key="si">
- <view class="g-header b-b flex-c">
- <text class="name F1">{{s.shop_name}}</text>
- <text class="iconfont iconenter"></text>
- </view>
- <!-- 商品列表 -->
- <view class="g-item" v-for="(g,gi) in s.goods_info" v-bind:key="gi">
- <image :src="g.good_img" />
- <view class="right">
- <text class="title clamp">{{g.good_name}}</text>
- <text class="spec">{{g.goodspecs}}</text>
- <view class="price-box">
- <text class="price F1">¥{{g.good_current_price}}</text>
- <template v-if="isChange">
- <uni-number-box v-model="g.num" @change="change" />
- </template>
- <template v-else>
- <text class="number">x {{g.num}}</text>
- </template>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue'
- export default{
- props:{
- list:{
- type:Array,
- default:()=>[]
- },
- isChange:{
- type:Boolean,
- default:false
- }
- },
- data(){
- return{
- productList:[]
- }
- },
- methods:{
- init(){
- let _self = this
- setTimeout(function(){
- _self.productList = JSON.parse(JSON.stringify(_self.list))
- _self.change()
- },10)
- },
- change(){
- let _self = this
- let parent = _self.utils.getParent.call(this)
- parent.productList = JSON.parse(JSON.stringify(_self.productList))
- }
- },
- components:{
- uniNumberBox
- }
- }
- </script>
- <style lang="scss">
- page {
- background: $page-color-base;
- padding-bottom: 100rpx;
- }
- .address-section {
- padding: 30rpx 0;
- background: #fff;
- position: relative;
- .order-content {
- display: flex;
- align-items: center;
- }
- .iconlocation {
- flex-shrink: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 90rpx;
- color: #888;
- font-size: 44rpx;
- }
- .cen {
- display: flex;
- flex-direction: column;
- flex: 1;
- font-size: 28rpx;
- color: $font-color-dark;
- }
- .name {
- font-size: 34rpx;
- }
- .address {
- margin-top: 16rpx;
- margin-right: 20rpx;
- color: $font-color-light;
- }
- .icon-you {
- font-size: 32rpx;
- color: $font-color-light;
- margin-right: 30rpx;
- }
- .a-bg {
- position: absolute;
- left: 0;
- bottom: 0;
- display: block;
- width: 100%;
- height: 5rpx;
- }
- }
- .goods-section {
- margin-top: 16rpx;
- background: #fff;
- padding-bottom: 1px;
- .g-header {
- display: flex;
- align-items: center;
- height: 84rpx;
- padding: 0 30rpx;
- position: relative;
- }
- .logo {
- display: block;
- width: 50rpx;
- height: 50rpx;
- border-radius: 100px;
- }
- .name {
- font-size: 30rpx;
- color: $font-color-base;
- }
- .g-item {
- display: flex;
- margin: 20rpx 30rpx;
- image {
- flex-shrink: 0;
- display: block;
- width: 140rpx;
- height: 140rpx;
- border-radius: 4rpx;
- }
- .right {
- flex: 1;
- padding-left: 24rpx;
- overflow: hidden;
- }
- .title {
- font-size: 30rpx;
- color: $font-color-dark;
- }
- .spec {
- font-size: 26rpx;
- color: $font-color-light;
- }
- .price-box {
- display: flex;
- align-items: center;
- font-size: 32rpx;
- color: $font-color-dark;
- padding-top: 10rpx;
- .price {
- margin-bottom: 4rpx;
- color:$base-color;
- }
- .number{
- font-size: 26rpx;
- color: $font-color-base;
- margin-left: 20rpx;
- }
- }
- .step-box {
- position: relative;
- }
- }
- }
- .yt-list {
- margin-top: 16rpx;
- background: #fff;
- }
- .yt-list-cell {
- display: flex;
- align-items: center;
- padding: 10rpx 30rpx 10rpx 40rpx;
- line-height: 70rpx;
- position: relative;
- &.cell-hover {
- background: #fafafa;
- }
- &.b-b:after {
- left: 30rpx;
- }
- .cell-icon {
- height: 32rpx;
- width: 32rpx;
- font-size: 22rpx;
- color: #fff;
- text-align: center;
- line-height: 32rpx;
- background: #f85e52;
- border-radius: 4rpx;
- margin-right: 12rpx;
- &.hb {
- background: #ffaa0e;
- }
- &.lpk {
- background: #3ab54a;
- }
- }
- .cell-more {
- align-self: center;
- font-size: 24rpx;
- color: $font-color-light;
- margin-left: 8rpx;
- margin-right: -10rpx;
- }
- .cell-tit {
- flex: 1;
- font-size: 26rpx;
- color: $font-color-light;
- margin-right: 10rpx;
- }
- .cell-tip {
- font-size: 26rpx;
- color: $font-color-dark;
- &.disabled {
- color: $font-color-light;
- }
- &.active {
- color: $base-color;
- }
- &.red{
- color: $base-color;
- }
- }
- &.desc-cell {
- .cell-tit {
- max-width: 90rpx;
- }
- }
- .desc {
- flex: 1;
- font-size: $font-base;
- color: $font-color-dark;
- }
- }
-
- /* 支付列表 */
- .pay-list{
- padding-left: 40rpx;
- margin-top: 16rpx;
- background: #fff;
- .pay-item{
- display: flex;
- align-items: center;
- padding-right: 20rpx;
- line-height: 1;
- height: 110rpx;
- position: relative;
- }
- .icon-weixinzhifu{
- width: 80rpx;
- font-size: 40rpx;
- color: #6BCC03;
- }
- .icon-alipay{
- width: 80rpx;
- font-size: 40rpx;
- color: #06B4FD;
- }
- .icon-xuanzhong2{
- display: flex;
- align-items: center;
- justify-content: center;
- width: 60rpx;
- height: 60rpx;
- font-size: 40rpx;
- color: $base-color;
- }
- .tit{
- font-size: 32rpx;
- color: $font-color-dark;
- flex: 1;
- }
- }
-
- .footer{
- position: fixed;
- left: 0;
- bottom: 0;
- z-index: 995;
- display: flex;
- align-items: center;
- width: 100%;
- height: 90rpx;
- justify-content: space-between;
- font-size: 30rpx;
- background-color: #fff;
- z-index: 998;
- color: $font-color-base;
- box-shadow: 0 -1px 5px rgba(0,0,0,.1);
- .price-content{
- padding-left: 30rpx;
- }
- .price-tip{
- color: $base-color;
- margin-left: 8rpx;
- }
- .price{
- font-size: 36rpx;
- color: $base-color;
- }
- .submit{
- display:flex;
- align-items:center;
- justify-content: center;
- width: 280rpx;
- height: 100%;
- color: #fff;
- font-size: 32rpx;
- background-color: $base-color;
- }
- }
-
- /* 优惠券面板 */
- .mask{
- display: flex;
- align-items: flex-end;
- position: fixed;
- left: 0;
- top: var(--window-top);
- bottom: 0;
- width: 100%;
- background: rgba(0,0,0,0);
- z-index: 9995;
- transition: .3s;
-
- .mask-content{
- width: 100%;
- min-height: 30vh;
- max-height: 70vh;
- background: #f3f3f3;
- transform: translateY(100%);
- transition: .3s;
- overflow-y:scroll;
- }
- &.none{
- display: none;
- }
- &.show{
- background: rgba(0,0,0,.4);
-
- .mask-content{
- transform: translateY(0);
- }
- }
- }
- /* 优惠券列表 */
- .coupon-item{
- display: flex;
- flex-direction: column;
- margin: 20rpx 24rpx;
- background: #fff;
- .con{
- display: flex;
- align-items: center;
- position: relative;
- height: 120rpx;
- padding: 0 30rpx;
- &:after{
- position: absolute;
- left: 0;
- bottom: 0;
- content: '';
- width: 100%;
- height: 0;
- border-bottom: 1px dashed #f3f3f3;
- transform: scaleY(50%);
- }
- }
- .left{
- display: flex;
- flex-direction: column;
- justify-content: center;
- flex: 1;
- overflow: hidden;
- height: 100rpx;
- }
- .title{
- font-size: 32rpx;
- color: $font-color-dark;
- margin-bottom: 10rpx;
- }
- .time{
- font-size: 24rpx;
- color: $font-color-light;
- }
- .right{
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- font-size: 26rpx;
- color: $font-color-base;
- height: 100rpx;
- }
- .price{
- font-size: 44rpx;
- color: $base-color;
- &:before{
- content: '¥';
- font-size: 34rpx;
- }
- }
- .tips{
- font-size: 24rpx;
- color: $font-color-light;
- line-height: 60rpx;
- padding-left: 30rpx;
- }
- .circle{
- position: absolute;
- left: -6rpx;
- bottom: -10rpx;
- z-index: 10;
- width: 20rpx;
- height: 20rpx;
- background: #f3f3f3;
- border-radius: 100px;
- &.r{
- left: auto;
- right: -6rpx;
- }
- }
- }
- </style>
|