Commit 5868267a authored by 罗超's avatar 罗超

2

parent a3737bf2
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="topBox"> <view class="topBox">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/banner2.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/banner2.png"
mode="widthFix" class="bg"></image> mode="widthFix" class="bg"></image>
<u-sticky > <u-sticky>
<view class="nav" :style="{paddingTop:`${statusNavBar}px`}"> <view class="nav" :style="{paddingTop:`${statusNavBar}px`}">
<u-icon name="arrow-left" size="40" color="#fff" @click="back"></u-icon> <u-icon name="arrow-left" size="40" color="#fff" @click="back"></u-icon>
<view class="title"> <view class="title">
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="GiveAway" v-if="item.GiveAwayNum>0"> <view class="GiveAway" v-if="item.GiveAwayNum>0">
{{item.BuyNum}}杯赠{{item.GiveAwayNum}} {{item.BuyNum}}杯赠{{item.GiveAwayNum}}
</view> </view>
</view> </view>
<view class="itemInfo2"> <view class="itemInfo2">
<view class="money"> <view class="money">
...@@ -55,36 +55,73 @@ ...@@ -55,36 +55,73 @@
export default { export default {
data() { data() {
return { return {
showPage:false, showPage: false,
statusNavBar: 0, statusNavBar: 0,
pageData: {}, pageData: {},
menuList: [{ menuList: [
name: "馥芮白 ", {
english: "Flat White" name: "意式浓缩",
english: "Espresso"
},
{
name: "浓郁玛奇朵",
english: "Rich Macchiato"
}, },
{ {
name: "卡布奇诺", name: "卡布奇诺",
english: "Cappucino" english: "Cappucino"
}, },
{ {
name: "拿铁", name: "馥芮白 ",
english: "Cafte Lafte" english: "Flat White"
}, },
{ {
name: "美式", name: "美式",
english: "Cafte Americano" english: "Cafte Americano"
}, },
{ {
name: "摩卡", name: "拿铁",
english: "Mocha" english: "Cafte Lafte"
}, },
{ {
name: "拿铁玛奇朵", name: "拿铁玛奇朵",
english: "Latte Macchiato" english: "Latte Macchiato"
}, },
{ {
name: "巧克力饮品", name: "摩卡",
english: "Classic Chocolate" english: "Mocha"
},
{
name: "热巧克力",
english: "hot chocolate"
},
{
name: "冰美式咖啡",
english: "Iced Americano"
},
{
name: "冰拿铁咖啡",
english: "Iced Cafe Latte"
},
{
name: "冰拿铁玛奇朵",
english: "Iced Latte Macchiato"
},
{
name: "冰摩卡咖啡",
english: "Ice Mocha"
},
{
name: "冰巧克力",
english: "Ice chocolate"
},
{
name: "冰馥芮白",
english: "Iced Flat White"
},
{
name: "冰卡布其诺",
english: "Iced Cappuccino"
}, },
] ]
} }
...@@ -96,7 +133,7 @@ ...@@ -96,7 +133,7 @@
data: {} data: {}
}, },
res => { res => {
this.showPage=true this.showPage = true
this.pageData = res.data this.pageData = res.data
} }
); );
...@@ -186,7 +223,7 @@ ...@@ -186,7 +223,7 @@
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #000000; color: #000000;
} }
.GiveAway { .GiveAway {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view class="num"> <view class="num">
星巴克咖啡{{item.BuyNum||0}} 星巴克咖啡{{item.BuyNum||0}}
</view> </view>
<view class="give"> <view class="give" v-if="item.GiveAwayNum>0">
{{item.BuyNum||0}}杯赠送{{item.GiveAwayNum||0}} {{item.BuyNum||0}}杯赠送{{item.GiveAwayNum||0}}
</view> </view>
<view class="tip"> <view class="tip">
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<view class="label">购买数量</view> <view class="label">购买数量</view>
<view class="value">{{item.BuyNum||0}}</view> <view class="value">{{item.BuyNum||0}}</view>
</view> </view>
<view class="row2"> <view class="row2" v-if="item.GiveAwayNum>0">
<view class="label">赠送数量</view> <view class="label">赠送数量</view>
<view class="value">{{item.GiveAwayNum||0}}</view> <view class="value">{{item.GiveAwayNum||0}}</view>
</view> </view>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<text>立即购买</text> <text>立即购买</text>
<view class="tipBox" v-if="pageData.GiveAwayList&&pageData.GiveAwayList.length>0"> <view class="tipBox" v-if="pageData.GiveAwayList&&pageData.GiveAwayList.length>0">
<view class="tipText"> <view class="tipText">
{{pageData.GiveAwayList[1].BuyNum}}{{pageData.GiveAwayList[1].GiveAwayNum}} {{getGive().BuyNum}}{{getGive().GiveAwayNum}}
</view> </view>
<view class="tipIcon"></view> <view class="tipIcon"></view>
</view> </view>
...@@ -85,16 +85,11 @@ ...@@ -85,16 +85,11 @@
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup3.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup3.png"
mode="widthFix" style="width:546rpx;height:auto;display: block;"></image> mode="widthFix" style="width:546rpx;height:auto;display: block;"></image>
<view class="viewBox"> <view class="viewBox">
<view class="cup">
1杯
</view>
<view class="successText"> <view class="successText">
消费成功 使用成功
</view> </view>
<view class="user"> <view class="cup">
<image :src="headImg" style="width: 66rpx;height: 66rpx;border-radius: 50%;margin-right: 6rpx;"> 1杯
</image>
{{username}}
</view> </view>
</view> </view>
<view class="closeIcon" @click="closePopup"> <view class="closeIcon" @click="closePopup">
...@@ -120,10 +115,11 @@ ...@@ -120,10 +115,11 @@
qrData: '', // 要生成的二维码值 qrData: '', // 要生成的二维码值
isShowQrcode: false, isShowQrcode: false,
headImg: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup.png", headImg: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup.png",
pageData: {}, pageData: {
GiveAwayList:[]
},
isShowSuccess: false, isShowSuccess: false,
timer: null, timer: null,
username: "",
flag:false,//是否继续请求扫码结果 flag:false,//是否继续请求扫码结果
} }
}, },
...@@ -134,12 +130,23 @@ ...@@ -134,12 +130,23 @@
if (userInfo.Photo) { if (userInfo.Photo) {
this.headImg = userInfo.Photo this.headImg = userInfo.Photo
} }
this.username = userInfo.Name
this.UserId = userInfo.UserId this.UserId = userInfo.UserId
this.getData() this.getData()
}, },
onHide(){
this.flag=false
},
methods: { methods: {
getGive(){
let res={}
for(let i=0; i<this.pageData.GiveAwayList.length;i++){
if(this.pageData.GiveAwayList[i].GiveAwayNum>0){
res=this.pageData.GiveAwayList[i]
break
}
}
return res
},
async showPopup() { async showPopup() {
this.timestamp = new Date().getTime() this.timestamp = new Date().getTime()
this.qrData = encodeURIComponent(JSON.stringify({ this.qrData = encodeURIComponent(JSON.stringify({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment