Browse Source

上传

master
前端-胡立永 3 months ago
parent
commit
1c67b26a06
4 changed files with 156 additions and 5 deletions
  1. +1
    -0
      App.vue
  2. +1
    -1
      config.js
  3. +143
    -0
      pages_order/components/list/gourmet/productSelectList.vue
  4. +11
    -4
      pages_order/gourmet/gourmetDetail.vue

+ 1
- 0
App.vue View File

@ -8,6 +8,7 @@
if(uni.getStorageSync('token')){ if(uni.getStorageSync('token')){
this.$store.commit('getMemberInfo') this.$store.commit('getMemberInfo')
this.$store.commit('getUserInfo')
} }
}, },
onHide: function() { onHide: function() {


+ 1
- 1
config.js View File

@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI); Vue.use(uvUI);
// 当前环境 // 当前环境
const type = 'prod'
const type = 'dev'
// 环境配置 // 环境配置


+ 143
- 0
pages_order/components/list/gourmet/productSelectList.vue View File

@ -0,0 +1,143 @@
<template>
<view class="page">
<view class="box d">
<uv-checkbox-group shape="circle" v-model="checkboxValue">
<view v-for="(item, index) in list"
:key="index"
@click="" class="item">
<view class="checkbox">
<uv-checkbox
:name="item.id"
activeColor="#FA5A0A"
size="40rpx" @click.stop
icon-size="35rpx"></uv-checkbox>
</view>
<image class="image"
:src="item.image" mode="">
</image>
<view class="info">
<view class="title">
<view class="text-ellipsis">{{ item.name }}</view>
<!-- <view style="flex-shrink: 0;">
数量{{ item.num }}
</view> -->
</view>
<view class="unit">
{{ item.nameSub }}
</view>
<view class="price-box">
<view class="price">
现价<text>{{ item.price }}</text>
</view>
<view class="del">
原价{{ item.oldPrice }}
</view>
</view>
<view class="unit">
<uv-number-box v-model="item.selectNum" :max="item.num">
</uv-number-box>
</view>
</view>
</view>
</uv-checkbox-group>
</view>
</view>
</template>
<script>
export default {
props : {
list : {
default : []
},
},
data() {
return {
};
}
}
</script>
<style scoped lang="scss">
.page {
.d {
.item {
background-color: #fff;
display: flex;
padding: 30rpx;
width: 690rpx;
.checkbox {
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
}
.image {
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
flex-shrink: 0;
}
.info {
flex: 1;
.title {
display: flex;
padding: 6rpx 20rpx;
justify-content: space-between;
.text-ellipsis {
width: 410rpx;
// width: 280rpx;
overflow: hidden; //
text-overflow: ellipsis; //
white-space: nowrap; //
}
}
.unit {
font-size: 24rpx;
padding: 6rpx 20rpx;
color: #717171;
}
.price-box{
display: flex;
align-items: end;
padding-left: 20rpx;
.price{
color: $uni-price-color;
margin-top: 6rpx;
font-size: 24rpx;
text{
font-size: 28rpx;
font-weight: 900;
}
}
.del{
font-size: 22rpx;
color: #888;
font-weight: 500;
text-decoration : line-through;
margin-top: auto;
margin-left: 10rpx;
}
}
.wan {
color: $uni-color;
font-size: 26rpx;
padding: 10rpx 20rpx;
}
}
}
}
}
</style>

+ 11
- 4
pages_order/gourmet/gourmetDetail.vue View File

@ -55,7 +55,9 @@
<!-- 商城美食 --> <!-- 商城美食 -->
<view class="goodList" <view class="goodList"
v-if="tagIndex == 0"> v-if="tagIndex == 0">
<goodList :productList="list"/>
<productSelectList
@getData="getData"
:list="list"/>
</view> </view>
<!-- 店铺介绍 --> <!-- 店铺介绍 -->
@ -114,12 +116,13 @@
import mixinsSex from '@/mixins/sex.js' import mixinsSex from '@/mixins/sex.js'
import mixinsList from '@/mixins/list.js' import mixinsList from '@/mixins/list.js'
import commentList from '../components/list/comment/commentList.vue' import commentList from '../components/list/comment/commentList.vue'
import goodList from '../components/list/gourmet/goodList.vue'
// import goodList from '../components/list/gourmet/goodList.vue'
import productSelectList from '../components/list/gourmet/productSelectList.vue'
export default { export default {
mixins: [mixinsSex, mixinsList], mixins: [mixinsSex, mixinsList],
components: { components: {
commentList, commentList,
goodList,
productSelectList,
}, },
data() { data() {
return { return {
@ -297,8 +300,12 @@
} }
} }
.LabelOptions{
background-color: #fff;
}
.goodList{ .goodList{
padding: 0 20rpx;
// padding: 0 20rpx;
} }
.goodInfo{ .goodInfo{


Loading…
Cancel
Save