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

2

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