订单相关修改同步test

This commit is contained in:
GaoHao
2024-10-16 09:05:52 +08:00
parent 3288d1ed9b
commit 3ad4d7af68
16 changed files with 363 additions and 4678 deletions

View File

@@ -40,7 +40,7 @@
</view>
</view>
</view>
<view class="shop-item-remark" v-if="item.productId!=-999">
<!-- <view class="shop-item-remark" v-if="item.productId!=-999">
<view class="label">备注</view>
<u--input
placeholder="商品备注(选填)"
@@ -48,7 +48,7 @@
v-model="item.note"
@blur="productBlur(item)"
></u--input>
</view>
</view> -->
</view>
</view>
</scroll-view>
@@ -60,31 +60,53 @@
<script>
export default {
props:{
cartLists:{
type: Object
},
cartLists_count: {
type: Number,
default: 0
},
showCart:{
type: Boolean
},
shopId:{
type: String,
default: ''
},
tableCode:{
type: String,
default: ''
}
},
data() {
return {
}
},
props:{
cartLists:{
type: Object
},
cartLists_count: {
type: String
},
showCart:{
type: Boolean
watch:{
tableCode:{
immediate: true,
handler (newVal) {
console.log(newVal)
console.log("tableCode1==",this.tableCode)
}
},
shopId:{
type: String
immediate: true,
handler (newVal) {
console.log(newVal)
console.log("shopId1==",this.shopId)
}
},
tableCode:{
type: String
}
},
mounted() {
console.log("tableCode3==",this.tableCode)
console.log("shopId3==",this.shopId)
},
methods: {
@@ -101,6 +123,8 @@
* @param {Object} a
*/
async cartListadd(item, index, c) {
console.log(this.shopId)
console.log(this.tableCode)
try {
if ( c == "+" && item.isVip == 1){
return;
@@ -116,6 +140,7 @@
"userId": uni.cache.get('userInfo').id,
"tableId": this.tableCode,
}
this.$emit("addCart",params)
} catch (e) {
//TODO handle the exception

View File

@@ -30,7 +30,6 @@
}
},
props:{
cartListsdatashow: {
type: Boolean
},
@@ -49,15 +48,24 @@
shopId:{
type: String
},
dinersNum:{
type: String
},
tableCode:{
type: String
},
},
mounted() {
console.log("tableCode==",this.tableCode)
console.log("shopId==",this.shopId)
},
watch:{
tableCode(newVal, oldValue) {
console.log(newVal)
console.log("tableCode2==",this.tableCode)
},
shopId(newVal, oldValue) {
console.log(newVal)
console.log("shopId2==",this.tableCode)
},
},
methods: {
@@ -80,8 +88,9 @@
})
return false
}
uni.navigateTo({
url: `/pagesOrder/confirm_order/index?storeInfo=${encodeURIComponent(JSON.stringify(this.storeInfo))}&cartLists=${JSON.stringify(this.cartLists)}&tableCode=${this.tableCode||''}&dinersNum=${this.dinersNum||''}`
url: `/pagesOrder/confirm_order/index?storeInfo=${encodeURIComponent(JSON.stringify(this.storeInfo))}&cartLists=${JSON.stringify(this.cartLists)}&tableCode=${this.tableCode||''}`
});
},