11111
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
<view style="display: flex;flex-direction: row;
|
||||
margin:20px 20px 0px 20px;padding-bottom: 20px; border-bottom: 2px #EFEFEF solid; justify-content: space-between;">
|
||||
margin:20px 20px 0px 20px;padding-bottom: 10px; border-bottom: 2px #EFEFEF solid; justify-content: space-between;">
|
||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
||||
<view style="background: #FF9900; border-radius: 50%;width: 12px;height: 12px;"></view>
|
||||
<view style="background: #FFCC7F; border-radius: 50%;width: 12px;height: 12px;"></view>
|
||||
@@ -25,10 +25,10 @@
|
||||
</view>
|
||||
|
||||
<view style="display: flex;flex-direction: row;align-items: center;margin-right: 10px;">
|
||||
<view style="color: #888;font-size: 12px;">我要定 </view>
|
||||
<view style="color: #888;font-size: 12px;">定制</view>
|
||||
<input type="number" @input="numbers" v-model="page.number" maxlength="3"
|
||||
style="font-size: 12px; border: 1px #AEAEAE solid;border-radius: 5px;text-align: center; width: 25px;margin-left: 5px;margin-right: 5px;padding-left: 3px;padding-right: 3px;" />
|
||||
<view style="color: #888;font-size: 12px;">个云菜窖</view>
|
||||
<view style="color: #888;font-size: 12px;">个菜窖</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<view
|
||||
style=" display: flex;flex-direction: row;align-items: center; margin-right: 10px;margin-top: 5px; margin-left: 10px;">
|
||||
|
||||
<image :src='item.iconUrl' style="width: 60px;height: 70px;"></image>
|
||||
<image :src='item.iconUrl' style="width: 70px;height: 70px;" mode="aspectFit"></image>
|
||||
|
||||
<view style="display: flex;flex-direction: column;margin-left: 20px;width: 100%;">
|
||||
|
||||
@@ -54,20 +54,20 @@
|
||||
</view>
|
||||
|
||||
|
||||
<text style="color: #AEAEAE;font-size: 14px;margin-top: 5px;">{{item.remark}}</text>
|
||||
<text style="color: #AEAEAE;font-size: 12px;margin-top: 5px;">{{item.remark}}</text>
|
||||
|
||||
<view
|
||||
style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 5px;">
|
||||
|
||||
<view style="display: flex;flex-direction: row;">
|
||||
<text style="border: 1px #EE752F solid; border-radius: 10px; color:#EE752F ; font-size: 14px;
|
||||
margin-right: 20px;padding: 0px 8px;">{{item.jprice}}元/{{item.specificationUnit}}</text>
|
||||
<text style="border: 1px #EE752F solid; border-radius: 10px; color:#EE752F ; font-size: 10px;
|
||||
margin-right: 20px;padding: 0px 5px;">{{item.jprice}}元/{{item.specificationUnit}}</text>
|
||||
<text
|
||||
style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 14px;;padding: 0px 8px;">{{item.weight}}斤/{{item.unitName}}</text>
|
||||
style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 10px;;padding: 0px 5px;">{{item.weight}}斤/{{item.unitName}}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<text style="color: #FF5006;font-size: 14px;">¥{{item.totalValue}}</text>
|
||||
<text style="color: #FF5006;font-size: 15px;">¥{{item.totalValue}}</text>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -140,8 +140,17 @@
|
||||
this.page.endHeight = info.windowWidth * 0.8
|
||||
|
||||
this.request()
|
||||
uni.$on("pay", (e) => {
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/home/pickUpCard'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
uni.$off('pay');
|
||||
},
|
||||
onPageScroll(res) {
|
||||
// 渐变
|
||||
this.$refs.nav.defaultColorBgAlpha(res)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
<view style="display: flex;flex-direction: column;
|
||||
margin:20px 20px 0px 20px;padding-bottom: 5px; border-bottom: 2px #EFEFEF solid;">
|
||||
margin:20px 10px 0px 20px;padding-bottom:10px; border-bottom: 2px #EFEFEF solid;">
|
||||
|
||||
<view
|
||||
style="display: flex;flex-direction: row;align-items: center; justify-content: space-between;">
|
||||
@@ -28,23 +28,17 @@
|
||||
</view>
|
||||
|
||||
<view style="display: flex;flex-direction: row;align-items: center;margin-right: 10px;">
|
||||
<view style="color: #888;font-size: 12px;">我要定 </view>
|
||||
<view style="color: #888;font-size: 12px;">定制</view>
|
||||
<input type="number" @input="numbers" v-model="page.number" maxlength="3"
|
||||
style="font-size: 12px; border: 1px #AEAEAE solid;border-radius: 5px;text-align: center; width: 25px;margin-left: 5px;margin-right: 5px;padding-left: 3px;padding-right: 3px;" />
|
||||
<view style="color: #888;font-size: 12px;">个云菜窖</view>
|
||||
<view style="color: #888;font-size: 12px;">个菜窖</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="margin-top: 10px;display: flex;flex-direction: row;align-items: center;margin-top: 15px;">
|
||||
<view style="color: #888;font-size: 12px;">您已经定制了</view>
|
||||
<view style="color: #FF5006;font-size: 18px;">{{page.weight}}斤</view>
|
||||
<view style="color: #888;font-size: 12px;">,满200斤可定制云菜窖</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view v-for="(item,index) in data" :key="index" @click="itemClick(item.goodsSid)"
|
||||
style="display: flex;flex-direction: column;margin-top: 14px; ">
|
||||
style="display: flex;flex-direction: column;margin-top: 14px;">
|
||||
|
||||
<view :style="{'border-bottom':(index===data.length-1 ? 'none':'1px #EFEFEF solid')}" style="display: flex;flex-direction: column;
|
||||
margin-left: 20px;margin-right: 20px;padding-bottom: 10px;">
|
||||
@@ -52,7 +46,7 @@
|
||||
<view
|
||||
style=" display: flex;flex-direction: row;align-items: center; margin-right: 10px;margin-top: 5px; margin-left: 10px;">
|
||||
|
||||
<image :src='item.iconUrl' style="width: 60px;height: 70px;"></image>
|
||||
<image :src='item.iconUrl' style="width: 70px;height: 70px;" mode="aspectFill"></image>
|
||||
|
||||
<view style="display: flex;flex-direction: column;margin-left: 20px;width: 100%;">
|
||||
|
||||
@@ -71,14 +65,14 @@
|
||||
style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 5px;">
|
||||
|
||||
<view style="display: flex;flex-direction: row;">
|
||||
<text style="border: 1px #EE752F solid; border-radius: 10px; color:#EE752F ; font-size: 14px;
|
||||
margin-right: 20px;padding: 0px 8px;">{{item.jprice}}元/{{item.specificationUnit}}</text>
|
||||
<text style="border: 1px #EE752F solid; border-radius: 10px; color:#EE752F ; font-size: 10px;
|
||||
margin-right: 20px;padding: 0px 5px;">{{item.jprice}}元/{{item.specificationUnit}}</text>
|
||||
<text
|
||||
style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 14px;;padding: 0px 8px;">{{item.weight}}斤/{{item.unitName}}</text>
|
||||
style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 10px;;padding: 0px 5px;">{{item.weight}}斤/{{item.unitName}}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<text style="color: #FF5006;font-size: 14px;">¥{{item.price}}</text>
|
||||
<text style="color: #FF5006;font-size: 15px;">¥{{item.price}}</text>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -92,26 +86,38 @@
|
||||
</view>
|
||||
<view v-show="data.length>0" style="height: 100px;background: #f1f2f3; "></view>
|
||||
|
||||
<view style="background-color: #fff; padding: 10px 20px;position: fixed;bottom: 0;overflow:hidden;
|
||||
display: flex;flex-direction: row; width: 100%;flex-shrink: 1;">
|
||||
<view style="background-color: #fff;position: fixed;bottom: 0;overflow:hidden;
|
||||
display: flex;flex-direction: column; width: 100%;flex-shrink: 1;">
|
||||
|
||||
<view style="flex: 1; display: flex;flex-direction: row;align-items: center; margin-right: 30px;
|
||||
justify-content: space-between;">
|
||||
|
||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
||||
<text style="color: #888;font-size: 14px;">合计:</text>
|
||||
<text style="color: #F0752F;font-size: 18px;">{{page.price}}元</text>
|
||||
</view>
|
||||
<view
|
||||
style="display: flex;flex-direction: row;align-items: center; border-bottom: 1px #F0F0F0 solid;padding-top: 5px; padding-bottom: 5px;padding-left: 20px;">
|
||||
<view style="color: #888;font-size: 10px;">温馨提示:已定制了</view>
|
||||
<view style="color: #FF5006;font-size: 15px;">{{page.weight}}斤</view>
|
||||
<view style="color: #888;font-size: 10px;">,满200斤可定制云菜窖</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="display: flex;flex-direction: row;align-items: center; margin-top: 5px; padding: 10px 20px; width: 100%;">
|
||||
<view style="flex: 1; display: flex;flex-direction: row;align-items: center; ;
|
||||
justify-content: space-between;">
|
||||
|
||||
<text
|
||||
style="background: #EE752F; text-align: center; color: #fff; border-radius: 5px;padding: 5px 20px; margin-right: 40px; "
|
||||
@click="settlement()">结算</text>
|
||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
||||
<text style="color: #888;font-size: 14px;">合计:</text>
|
||||
<text style="color: #F0752F;font-size: 18px;">{{page.price}}元</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<text
|
||||
style="background: #EE752F; text-align: center; color: #fff; border-radius: 5px;padding: 5px 20px; margin-right: 40px; "
|
||||
@click="settlement()">结算</text>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</loading-state>
|
||||
</view>
|
||||
|
||||
@@ -149,7 +155,16 @@
|
||||
this.page.endHeight = info.windowWidth * 0.8
|
||||
|
||||
this.request()
|
||||
uni.$on("pay", (e) => {
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/home/pickUpCard'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
uni.$off('pay');
|
||||
},
|
||||
methods: {
|
||||
itemClick(goodsSid) {
|
||||
@@ -191,7 +206,7 @@
|
||||
|
||||
let num = 0;
|
||||
for (var i = 0; i < this.data.length; i++) {
|
||||
num += Number(this.data[i].jprice) * Number(this.data[i].goodsNumber)* Number(this.data[i].weight);
|
||||
num += Number(this.data[i].jprice) * Number(this.data[i].goodsNumber) * Number(this.data[i].weight);
|
||||
}
|
||||
|
||||
console.log("num", num)
|
||||
@@ -244,8 +259,8 @@
|
||||
})
|
||||
}
|
||||
// console.log("ddd", list);
|
||||
|
||||
if(list.length==0){
|
||||
|
||||
if (list.length == 0) {
|
||||
this.shortToast('请添加商品')
|
||||
return
|
||||
}
|
||||
@@ -262,9 +277,8 @@
|
||||
_this.$api.createOrder(params).then((resp) => {
|
||||
|
||||
// console.log("resp", resp);
|
||||
this.$pay(resp)
|
||||
}).catch(e => {
|
||||
})
|
||||
this.$pay(resp)
|
||||
}).catch(e => {})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user