This commit is contained in:
2024-03-14 10:41:24 +08:00
parent 80196ea911
commit 129c65d5d6
15 changed files with 1757 additions and 247 deletions

View File

@@ -114,14 +114,14 @@
<text
style="font-size: 14px;color: #FF5006;">{{item.mefenPrice}}</text>
<view v-if="!item.showCart"
<view
style="display: flex;flex-direction: row;align-items: center;">
<image src="../../static/jian_icon.png" mode="aspectFill"
style="width: 20px;height: 20px;" @click.stop="jian(item)">
</image>
<text v-if="!item.showCart"
<text
style="font-size: 14px;padding:5px; margin-left: 8px;margin-right: 8px;"
@click.stop="numberClick(item)">{{item.goodsNumber}}</text>

View File

@@ -64,7 +64,7 @@
<text v-if="item.state == '1'" style="opacity: 0.7; font-size: 14px;font-weight: 600;font-family: sans-serif;z-index: 101;
margin-top: 30px; margin-left: 5px; width: 80px; height: 30px;line-height: 30px; text-align: center; background: #6d6d6d;
position: absolute;border-radius: 20px;color: #fff;">已失效</text>
<image :src="item.iconUrl" @click="itemClick(item.goodsSid)"
<image :src="item.iconUrl" @click="itemClick(item.goodsSid)"
style="width: 90px;height: 90px; border-radius: 10px;z-index: 100;"
mode="aspectFill"></image>
@@ -123,7 +123,10 @@
style="width: 20px;height: 20px;" @click.stop="jian(item)"></image>
<text
style="font-size: 14px;margin-left: 8px;margin-right: 8px;">{{item.count}}</text>
style="font-size: 14px;padding:5px; margin-left: 8px;margin-right: 8px;"
@click.stop="numberClick(item)">{{item.count}}</text>
<image src="../../static/jia_icon.png" mode="aspectFill"
style="width: 20px;height: 20px;" @click.stop="jia(item)"></image>
@@ -364,25 +367,28 @@
</view>
<!-- 恢复预约提货弹框 -->
<!-- <view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' ></view>
<view class="modalDlg2" catchtouchmove='preventTouchMove' v-if='showModal2'>
<!-- 输入数量 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click="colseDialog2()"></view>
<view class="modalDlg4" catchtouchmove='preventTouchMove' v-if='showModal2'>
<view
style="display: flex;flex-direction: column;background: #fff; width: 80%; border-radius: 20px;box-sizing: border-box;">
<input type="number" placeholder="请输入数量" v-model="goodsItem.count" @input="inputNumber"
style="margin: 20px 20px 10px 20px;border: 1px #bbb solid; padding: 5px;line-height: 30px;height: 30px;border-radius: 6px;" />
<text
style="font-size: 12px;color: #f14;margin-left: 20px;margin-bottom: 20px;">商品存量{{goodsItem.goodsNumber}}{{goodsItem.unitName}}</text>
<view
style="flex-shrink: 0;display: flex;flex-direction: row;align-items: center;justify-content: center;">
<button class="button1" @click="colseDialog2()">取消</button>
<button class="button2" @click="inCart()">确定</button>
</view>
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;
width: 80%; border-radius: 20px; background: linear-gradient(#FFF4E4, #fff);">
<image src="../../static/notices.png" style="width: 60px;height: 60px; margin-top: -30px;" mode="scaleToFill"></image>
<text style="margin-top: 16px;font-size: 18px;color: #101010;font-weight: 600;font-family: sans-serif;">温馨提示</text>
<text style="margin-top: 12px;font-size: 14px;color: #333;padding-left: 30px;padding-right: 30px;">您好云菜窖预约提货服务现已恢复正常您可在我的菜窖页面进行预约提菜</text>
<text style="margin-top: 25px;margin-bottom: 20px;border: 1px #FF9900 solid; color: #FF9900;font-size: 14px;
border-radius: 20px;height: 40px; line-height: 40px;padding-left: 30px;padding-right: 30px;" @click="colseDialog2()">{{confirmText}}</text>
</view>
</view> -->
</view>
@@ -401,9 +407,7 @@
transferNotData: true,
notData: false,
showModal1: false,
showModal2: true,
confirmText: "我知道了5s",
countdown: 5,
showModal2: false,
showModal3: false,
showModal4: false,
scrollHeight: "",
@@ -452,7 +456,11 @@
transferInfo: {},
newporGiftSid: "",
orderSid: "",
shareSid: ""
shareSid: "",
goodsItem: {
goodsNumber: "",
count: ""
},
}
},
@@ -492,7 +500,6 @@
this.page.endHeight = info.windowWidth * 0.8
this.shareGift()
this.showPop()
},
filters: {
@@ -530,24 +537,6 @@
},
methods: {
showPop() {
let timeOut = setInterval(() => {
if (this.countdown == 1) {
this.showModal2 = false
this.confirmText = "确定"
this.countdown = 5
clearInterval(timeOut)
} else {
this.countdown = this.countdown - 1;
this.confirmText = "我知道了" + "" + this.countdown + "s"
}
}, 1000)
},
getNotice() {
let _this = this
this.$api.getNotices().then((resp) => {
@@ -633,6 +622,37 @@
})
})
},
numberClick(item) {
if (item.state == '0') {
this.showModal2 = true
console.log("inCart", item);
this.goodsItem = item
} else {
this.shortToast('商品已过提货日期')
}
},
inputNumber(val) {
console.log("inputNumber", val);
var num = val.detail.value
this.goodsItem.count = Number(num) > Number(this.goodsItem.goodsNumber) ? Number(this.goodsItem
.goodsNumber) : Number(num)
console.log("inputNumber222", this.goodsItem.count);
},
inCart() {
this.getcount()
this.addGoods(this.goodsItem)
this.showModal2 = false
},
jian(item) {
if (item.state == '0') {
@@ -645,7 +665,6 @@
this.shortToast('商品已过提货日期')
}
},
jia(item) {
if (item.state == '0') {
@@ -697,7 +716,7 @@
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
url: '/pages/good/goodsDetail2?sid=' + goodsSid
})
},
@@ -746,7 +765,6 @@
},
colseDialog2() {
this.showModal2 = false
clearInterval()
},
colseDialog3() {
this.showModal3 = false