Browse Source

上传

master
前端-胡立永 3 months ago
parent
commit
50869a28c9
9 changed files with 62 additions and 39 deletions
  1. +2
    -1
      components/user/cartSubmitSelect.vue
  2. +3
    -3
      components/user/productList.vue
  3. +8
    -7
      components/user/selectProductUnit.vue
  4. +2
    -2
      config.js
  5. +39
    -18
      pages/index/cart.vue
  6. +6
    -5
      pages_order/components/product/submitUnitSelect.vue
  7. +1
    -1
      pages_order/order/createWash.vue
  8. +1
    -2
      pages_order/product/productDetail.vue
  9. BIN
      static/image/cart/1.png

+ 2
- 1
components/user/cartSubmitSelect.vue View File

@ -351,7 +351,8 @@
line-height: 50rpx; line-height: 50rpx;
&>view{ &>view{
display: flex; display: flex;
justify-content: space-between;
// justify-content: space-between;
// gap: 20rpx;
} }
} }
.coupon{ .coupon{


+ 3
- 3
components/user/productList.vue View File

@ -24,14 +24,14 @@
</view> --> </view> -->
<view class="price"> <view class="price">
租金<text>{{ item.goodsSku.price }}</text>/
租金<text>{{ item.depositPrice }}</text>/
</view> </view>
<view class="favorable" v-if="item.goodsSku"> <view class="favorable" v-if="item.goodsSku">
<view class="t"> <view class="t">
原价
押金
</view> </view>
<view class="p"> <view class="p">
{{ item.originalPrice }}
{{ item.goodsSku.price }}
</view> </view>
</view> </view>


+ 8
- 7
components/user/selectProductUnit.vue View File

@ -5,7 +5,7 @@
颜色选择 颜色选择
</view> </view>
<view class="list"> <view class="list">
<view :class="{act : unitKey.startsWith(item)}"
<view :class="{act : colorIndex == index}"
v-for="(item, index) in colorList" v-for="(item, index) in colorList"
@click="selectUnit(item, index, 0)" :key="index"> @click="selectUnit(item, index, 0)" :key="index">
{{ item }} {{ item }}
@ -19,7 +19,7 @@
</view> </view>
<view class="list"> <view class="list">
<view <view
:class="{act : unitKey.endsWith(item),
:class="{act : sizeIndex == index,
del : getUnitClassDel(item, index)}" del : getUnitClassDel(item, index)}"
v-for="(item, index) in sizeList" v-for="(item, index) in sizeList"
@click="selectUnit(item, index, 1)" :key="index"> @click="selectUnit(item, index, 1)" :key="index">
@ -56,11 +56,11 @@
return map return map
}, },
//
//
sizeList(){ sizeList(){
return [...new Set(this.list.map(n => n.title || defaultKey))] return [...new Set(this.list.map(n => n.title || defaultKey))]
}, },
//
//
colorList(){ colorList(){
return [...new Set(this.list.map(n => n.colour || defaultKey))] return [...new Set(this.list.map(n => n.colour || defaultKey))]
}, },
@ -101,18 +101,19 @@
}, },
getUnitClassDel(item, index, type){ getUnitClassDel(item, index, type){
let key = this.colorList[this.colorIndex] + ':' + item let key = this.colorList[this.colorIndex] + ':' + item
return this.unitMap[key] ? false : true
return !this.unitMap[key]
}, },
//
updateIndexAll(){ updateIndexAll(){
let key = this.unitKey let key = this.unitKey
this.colorList.forEach((n, i) => { this.colorList.forEach((n, i) => {
if(key.startsWith(n)){
if(key.startsWith(n + ':')){
this.colorIndex = i this.colorIndex = i
} }
}) })
this.sizeList.forEach((n, i) => { this.sizeList.forEach((n, i) => {
if(key.endsWith(n)){
if(key.endsWith(':' + n)){
this.sizeIndex = i this.sizeIndex = i
} }
}) })


+ 2
- 2
config.js View File

@ -13,8 +13,8 @@ const type = 'prod'
// 环境配置 // 环境配置
const config = { const config = {
dev : { dev : {
baseUrl : 'http://h5.xzaiyp.top/hotel',
// baseUrl : 'http://dev.java996.icu/hotel',
// baseUrl : 'http://h5.xzaiyp.top/hotel',
baseUrl : 'http://dev.java996.icu/hotel',
}, },
prod : { prod : {
baseUrl : 'https://hotel.java996.icu/hotel', baseUrl : 'https://hotel.java996.icu/hotel',


+ 39
- 18
pages/index/cart.vue View File

@ -38,9 +38,16 @@
<uv-icon name="arrow-down"></uv-icon> <uv-icon name="arrow-down"></uv-icon>
</view> </view>
<view class="price"> <view class="price">
<text>{{ item.depositPrice }}</text>
<view class="">
租金
<text>{{ item.depositPrice }}</text>
</view>
<view class="">
押金
<text>{{ item.price }}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -58,7 +65,7 @@
<view class="action"> <view class="action">
<view class="icon"> <view class="icon">
<image src="/static/image/cart/1.png" mode=""></image>
<image src="/static/image/cart/2.png" mode=""></image>
<view class="num">{{ checkboxValue.length }}</view> <view class="num">{{ checkboxValue.length }}</view>
</view> </view>
<view class="price"> <view class="price">
@ -93,14 +100,19 @@
</view> </view>
</view> --> </view> -->
<!-- 多规格选择 --> <!-- 多规格选择 -->
<view class="unit-box"> <view class="unit-box">
<selectProductUnit
:list="skuList"
ref="selectProductUnit"
@selectUnit="selectUnit"
/>
<scroll-view
scroll-y="true"
:style="{height: '50vh'}">
<selectProductUnit
:list="skuList"
ref="selectProductUnit"
@selectUnit="selectUnit"
/>
</scroll-view>
<view class="uni-color-btn" <view class="uni-color-btn"
@click="selectUnitSubmit"> @click="selectUnitSubmit">
保存修改 保存修改
@ -164,7 +176,7 @@
let price = 0 let price = 0
this.list.records.forEach(n => { this.list.records.forEach(n => {
if (this.checkboxValue.includes(n.id)) { if (this.checkboxValue.includes(n.id)) {
price += n.depositPrice * n.num
price += n.price * n.num
} }
}) })
@ -185,14 +197,14 @@
for(let i = 0;i < len;i++){ for(let i = 0;i < len;i++){
let item = list[i] let item = list[i]
if(item.price == n.depositPrice){
if(item.price == n.price){
item.num += n.num item.num += n.num
return return
} }
} }
list.push({ list.push({
price : n.depositPrice,
price : n.price,
num : n.num, num : n.num,
}) })
} }
@ -438,12 +450,21 @@
.price { .price {
color: $uni-color; color: $uni-color;
font-size: 28rpx;
font-size: 26rpx;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
text {
font-size: 36rpx;
font-weight: 900;
display: flex;
align-items: flex-end;
&>view:nth-child(1){
text {
font-size: 32rpx;
font-weight: 900;
}
}
&>view:nth-child(2){
font-size: 22rpx;
font-weight: 500;
margin-left: 10rpx;
margin-bottom: 4rpx;
} }
} }
} }


+ 6
- 5
pages_order/components/product/submitUnitSelect.vue View File

@ -70,12 +70,12 @@
<view class="info"> <view class="info">
<view class="price"> <view class="price">
租金<text>{{ unit.price }}</text>/
租金<text>{{ detail.depositPrice }}</text>/
</view> </view>
<view class="price" <view class="price"
style="font-size: 22rpx;"> style="font-size: 22rpx;">
押金<text 押金<text
style="font-size: 22rpx;">{{ detail.depositPrice }}</text>
style="font-size: 22rpx;">{{ unit.price }}</text>
</view> </view>
<view class="unit"> <view class="unit">
请选择规格 请选择规格
@ -129,13 +129,13 @@
<view class="title"> <view class="title">
费用明细 费用明细
</view> </view>
<view class="detail" v-if="detail.depositPrice">
<view class="detail" v-if="unit.price">
<view> <view>
应付款{{ price }} 应付款{{ price }}
</view> </view>
<view> <view>
<view class=""> <view class="">
押金{{ detail.depositPrice }}
押金{{ unit.price }}
</view> </view>
<view class=""> <view class="">
x{{ num }} x{{ num }}
@ -222,7 +222,8 @@
computed : { computed : {
...mapState(['configList']), ...mapState(['configList']),
price(){ price(){
return (this.detail.depositPrice * this.num).toFixed(2)
return (this.unit.price * this.num).toFixed(2)
// return (this.detail.depositPrice * this.num).toFixed(2)
}, },
}, },
data() { data() {


+ 1
- 1
pages_order/order/createWash.vue View File

@ -88,7 +88,7 @@
<view class="action"> <view class="action">
<view class="icon"> <view class="icon">
<image src="/static/image/cart/1.png" mode=""></image>
<image src="/static/image/cart/2.png" mode=""></image>
<view class="num">{{ checkboxValue.length }}</view> <view class="num">{{ checkboxValue.length }}</view>
</view> </view>
<view class="price"> <view class="price">


+ 1
- 2
pages_order/product/productDetail.vue View File

@ -18,8 +18,7 @@
<view class="price"> <view class="price">
租金<text> 租金<text>
{{ {{
detail.hotelGoodsSkuList[0] &&
detail.hotelGoodsSkuList[0].price
detail.depositPrice
}} }}
</text> </text>
</view> </view>


BIN
static/image/cart/1.png View File

Before After
Width: 36  |  Height: 36  |  Size: 1.9 KiB

Loading…
Cancel
Save