| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- <template>
- <view class="uni-main">
- <view class="sticky-nav">
- <view class="nav-box">
- <u-icon name="arrow-left" color="#000" size="48" @click="navBack()"></u-icon>
- <text class="title">寺院活动</text>
- <u-icon class="right-icon" name="zhuanfa" color="#000" size="48" @click="showMenu()"></u-icon>
- </view>
- </view>
- <view class="uni-header_title">
- <text v-text="info.title"></text>
- </view>
- <view class="uni-banner">
- <image class="uin-banner_thumb" :src="info.thumb" width="100" height="120"></image>
- </view>
- <view class="uni-info">
- <view class="uni-text uni-info_time">
- 时间: <text class="time" v-text="info.publish_at"></text>
- </view>
- <view class="uni-text uni-info_price">
- <view>费用:<text class="price" v-text="info.price?'¥'+info.price: '免费'"></text></view>
- </view>
- </view>
- <view class="uni-content">
- <view class="header">
- <text class="info_text">活动详情</text>
- </view>
- <view class="content" v-html="info.content">
- </view>
- </view>
- <view class="uni-buy">
- <view class="uni-buy_btn" @click="showPopup=true">
- <text v-text="info.type==1? '我要代订': (info.type==2?'我要助印': '我要供奉')"></text>
- </view>
- </view>
- <view class="specs-box">
- <view v-show="showPopup" @touchmove.stop.prevent="stopSlide">
- <!-- 遮罩层 -->
- <view class="mask" @click="modalCancel"></view>
- <!-- 内容区 -->
- <view class="tip">
- <view class="main">
- <view class="count">
- 随喜:<text class="input-box"><input class="tip-input" type="text" placeholder="8-3000" disabled="true"/>券</text>
- </view>
- <view class="options">
- <text :class="'option'+(v.value==selectOptionData.value? ' active' : '')" v-for="(v,k) in quanArr" v-text="v.name" @click="selectOption(v)"></text>
- </view>
- </view>
- <view class="bottom">
- <view class="btn cancel" @click="modalCancel()">取消</view>
- <view class="btn confirm" @click="modalConfirm()">确定</view>
- </view>
- </view>
- </view>
-
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- showPopup: false,
- phone: '12345678',
- autoplay: true,
- adAutoplay: true,
- interval: 2000,
- adInterval: 4000,
- duration: 1000,
- adDuration: 500,
- info: {
- id: 1,
- type: 1,
- thumb: '../../static/shop/1.jpg',
- title: '深圳线下心经交流会',
- price: 10.5,
- description: '描述',
- publish_at: '06月1日-07月30日',
- content: '活动详情',
- join_num: 10,
-
- },
- selectOptionData: {name: '',value: ''},
- quanArr: [
- {name: '8券', value: '8'},
- {name: '28券', value: '28'},
- {name: '58券', value: '58'},
- {name: '68券', value: '68'},
- {name: '168券', value: '168'},
- {name: '268券', value: '268'},
- ],
- activityList: [{
- id: 1,
- thumb: '../../static/index/shiyuan/sjmn.jpg',
- title: "深圳线下祈福交流活动",
- description: "般若智慧、慈悲宽容",
- join_count: "5",
- publish_at: "5月20-6月10日",
- price: 0,
- type: 1,
- },
- {
- id: 2,
- thumb: '../../static/index/gongdeng/wen_shu.jpg',
- title: "弘扬佛法,助印经书",
- description: "粉丝地方",
- join_count: "24",
- publish_at: "5月24-6月16日",
- price: 50.00,
- type: 1,
- },
- {
- id: 3,
- thumb: '../../static/index/gongdeng/guanyin.jpg',
- title: "观世音菩萨",
- description: "救苦救难",
- join_count: "10",
- publish_at: "5月21-6月20日",
- price: 100.00,
- type: 1,
- },
- {
- id: 4,
- thumb: '../../static/index/gongdeng/caishenye.jpg',
- title: "财神爷",
- description: "财运亨通",
- join_count: "300",
- publish_at: "5月20-6月18日",
- price: 0.00,
- type: 3,
- },
- {
- id: 5,
- thumb: '../../static/index/gongdeng/qianshouguanyin.jpg',
- title: "千手观音",
- description: "守护生肖:鼠",
- join_count: "1200",
- publish_at: "5月10-6月11日",
- price: 80.00,
- type: 2,
- }
- ],
-
- }
- },
- onLoad(option){
- let _uni = this
- let id = option.id
- _uni.activityList.forEach((item,key) => {
- if(item.id == id){
- _uni.info = item
- }
- })
- },
- methods: {
- navBack(){
- uni.navigateBack({
- delta: 1
- });
- },
- showMenu(){
-
- },
- modalCancel(){
- this.showPopup = false;
- },
- modalConfirm(){
- if(this.selectOptionData.value <= 0){
- uni.showToast({
- title: '请先选择随喜券数',
- icon: 'none'
- })
- return false;
- }
- },
- selectOption(data){
- this.selectOptionData = data
- },
- stopSlide() {
- return;
- }
-
- },
- }
- </script>
- <style lang="less" scoped>
- .uni-main {
- width: 100%;
- height: 100%;
- background-color: #fff;
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
- }
-
- .sticky-nav {
- position: sticky;
- width: 100%;
- top: 0;
- z-index: 1;
- border-bottom: 1rpx solid rgb(229,229,229);
- }
- .nav-box {
- width: 100%;
- padding-top: 50rpx;
- display: flex;
- align-items: center;
- background: #fff;
- height: 100rpx;
- padding-bottom: 50rpx;
- /deep/.u-icon{
- margin-left: 20rpx!important;
- }
- .title {
- font-size: 38rpx;
- color: #000;
- width: 100%;
- text-align: center;
- }
-
- .right-icon {
- float: right;
- margin-right: 20rpx;
- }
- }
-
- .uni-header_title {
- padding: 10rpx 0rpx;
- text-align: center;
- font-size: 36rpx;
- }
-
- .uni-banner .uin-banner_thumb {
- width: 80%;
- height: 300rpx;
- margin: 0 auto;
- display: block;
- }
-
- .uni-info .uni-text {
- font-size: 32rpx;
- margin-bottom: 10rpx;
- padding: 0rpx 10rpx;
- }
- .uni-info .uni-info_time {
- padding-top: 20rpx;
- }
-
- .uni-info .uni-info_price {
- padding-bottom: 20rpx;
- border-bottom: 8rpx solid #f1f1f1;
- }
-
- .uni-info .uni-info_price .price {
- color: #ff7a55;
- }
-
- .uni-info .uni-info_stock .kefu {
- float: right;
- margin-right: 10rpx;
- }
-
- .uni-content .header {
- padding: 20rpx 10px;
- font-size: 36rpx;
- font-weight: bold;
- text-align: center;
- color: #ff7a55;
- }
-
-
- .uni-content .content {
- border-top: 8rpx solid #f1f1f1;
- }
- .uni-content .content {
- padding: 10rpx;
- }
- .uni-buy {
- text-align: center;
- width: 100%;
- position: fixed;
- bottom: 0;
- background-color: #ccad51;
- }
- .uni-buy .uni-buy_btn {
- font-size: 40rpx;
- padding: 20rpx 0rpx;
- color: #fff;
- }
-
- /* 弹窗 */
- .mask {
- z-index: 99;
- background: rgba(0, 0, 0, 0.6);
- position: fixed;
- bottom: 0;
- right: 0;
- left: 0;
- top: 0;
- }
-
- .tip {
- z-index: 999;
- min-width: 600rpx;
- display: flex;
- font-size: 36rpx;
- text-align: center;
- background: #FFFFFF;
- align-items: center;
- flex-direction: column;
- justify-content: center;
- border-radius: 8rpx;
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- }
- .tip .main {
- padding: 50rpx 35rpx 20rpx;
- }
- .tip .count {
- width: 100%;
- text-align: left;
- }
- .tip .count .input-box {
- color: #666;
- background-color: #ccc;
- padding: 6rpx 10rpx;
- font-weight: bold;
- border-radius: 4rpx;
- }
- .tip .count .tip-input {
- display: inline-block;
- width: 120rpx;
- vertical-align: middle;
- }
- .tip .options {
- margin-top: 30rpx;
- text-align: center;
- }
- .tip .options .option {
- border-radius: 4rpx;
- background-color: #ccc;
- padding: 6rpx 10rpx;
- width: 26%;
- margin: 10rpx 3%;
- text-align: center;
- font-weight: bold;
- color: #666;
- display: inline-block;
- }
-
- .tip .options .option.active {
- background-color: #ccad51;
- }
-
-
- .tip .bottom {
- width: 100%;
- position: relative;
- bottom: 0;
- }
- .tip .bottom .btn {
- width: 50%;
- display: inline-block;
- border: 1px solid #ccc;
- padding: 10rpx 0rpx;
- font-weight: bold;
- }
- .tip .bottom .btn.cancel {
- border-bottom-left-radius: 8rpx;
- }
-
- .tip .bottom .btn.confirm {
- color: red;
- border-bottom-right-radius: 8rpx;
- }
- </style>
|