| <template> |
| |
| <view class="background-style"> |
| <swiper :indicator-dots="indicatorDots" :circular="circular" :indicator-color="indicatorColor" :indicator-active-color="indicatorActiveColor" :autoplay="autoplay" :interval="interval" :duration="duration"> |
| <swiper-item> |
| <image src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3909434962,3584802110&fm=26&gp=0.jpg" mode=""></image> |
| </swiper-item> |
| <swiper-item> |
| <image src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3448238345,2979385749&fm=26&gp=0.jpg" mode=""></image> |
| </swiper-item> |
| <swiper-item> |
| <image src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1128345303,3817199128&fm=26&gp=0.jpg" mode=""></image> |
| </swiper-item> |
| </swiper> |
| |
| |
| <view class="price-content-style"> |
| <view class="price-style"> |
| ¥350.00 |
| </view> |
| <view class="content-style"> |
| 【官方正品】全新Dior迪奥烈焰蓝金唇膏红色传奇新色丝绒992548 |
| </view> |
| </view> |
| <view class="btn-background"> |
| <image @click="collection" v-if="collection_status==0" src="/static/collection.png" mode=""></image> |
| <image @click="collection" v-if="collection_status==1" src="/static/collection-two.png" mode=""></image> |
| <button style="background-color: #44f8ff;" type="default">立即试妆</button> |
| <button type="primary" @click="buyNow()" style="background-color: #FF7272;" >立即购买</button> |
| </view> |
| |
| <uni-popup id="popupGoods" ref="popupGoods" type="share" @change="change"> |
| <uni-popup-share title="选择类型" @select="select"></uni-popup-share> |
| </uni-popup> |
| |
| |
| |
| </view> |
| |
| </template> |
| |
| <script> |
| var that; |
| export default { |
| |
| data() { |
| return { |
| indicatorDots: true, |
| circular:true, |
| autoplay: true, |
| interval: 1500, |
| duration: 500, |
| indicatorColor:"#DD524D", |
| indicatorActiveColor: "#ffffff", |
| collection_status:0, |
| } |
| }, |
| created(){ |
| that = this; |
| }, |
| |
| onLoad() { |
| |
| }, |
| methods: { |
| collection(){ |
| var collection_status = that.collection_status; |
| if(collection_status==0){ |
| that.collection_status = 1 |
| }else{ |
| that.collection_status = 0 |
| } |
| }, |
| buyNow(){ |
| this.$refs.popupGoods.open() |
| }, |
| |
| |
| |
| |
| change(e) { |
| console.log('popup ' + e.type + ' 状态', e.show) |
| }, |
| |
| |
| |
| select(e, done) { |
| uni.showToast({ |
| title: `您选择了第${e.index+1}项:${e.item.text}`, |
| icon: 'none' |
| }) |
| done() |
| }, |
| } |
| } |
| </script> |
| |
| <style> |
| |
| .background-style{ |
| width: 100%; |
| height:900px; |
| } |
| .background-style swiper{ |
| width: 100%; |
| height: 700px; |
| } |
| .background-style swiper-item{ |
| width: 100%; |
| } |
| .background-style image{ |
| width: 100%; |
| height: 100%; |
| } |
| .price-content-style{ |
| width: 100%; |
| height: 120px; |
| } |
| .price-style{ |
| width: 100%; |
| display: flex; |
| justify-content: center; |
| align-items: center; |
| font-size: 30px; |
| color: #FF7272; |
| font-weight: 800; |
| height: 100px; |
| } |
| .content-style{ |
| width: 100%; |
| height: 50px; |
| display: flex; |
| justify-content: center; |
| color: #000000; |
| font-size: 16px; |
| } |
| .btn-background{ |
| width: 100%; |
| display: flex; |
| justify-content: center; |
| align-items: center; |
| height: 100px; |
| bottom: 0; |
| position: absolute; |
| } |
| .btn-background image{ |
| width: 7%; |
| height: 50%; |
| margin-left: 5%; |
| } |
| .background-style button{ |
| width: 35%; |
| border-radius: 50px; |
| height: 55%; |
| display: flex; |
| justify-content: center; |
| align-items: center; |
| color: #FFFFFF; |
| } |
| </style> |
关注我的公众号SpaceObj 领取idea系列激活码

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)