[添加梵呗弹窗]

This commit is contained in:
2024-01-26 17:37:47 +08:00
parent 2a998468d9
commit 6ccb9ca8f1
7 changed files with 119 additions and 15 deletions

View File

@@ -36,11 +36,18 @@ const articlesSubscribe = (article_id) => req({
url: "cms/articles/subscribe/" + article_id
})
// 广告开关
const festival = () => req({
url: "festival"
})
export default ({
home,
articlesList,
articlesSee,
articlesClass,
articlesFavorite,
articlesSubscribe
articlesSubscribe,
festival
})

View File

@@ -11,8 +11,8 @@ import {updToken} from './updateToken'
// https://api.siyuankunlun.com //正式地址
// wxecf8786d25af47b3 正式appid
const api = "https://apitest.siyuankunlun.com/api/"
// const api = "https://api.siyuankunlun.com/api/"
// const api = "https://apitest.siyuankunlun.com/api/"
const api = "https://api.siyuankunlun.com/api/"
const header = {
"Accept" : "application/json"

View File

@@ -62,12 +62,6 @@
"iconPath": "/static/tabBarIcon/02.png",
"selectedIconPath": "/static/tabBarIcon/02_active.png"
},
{
"pagePath": "pages/member/index",
"text": "锶源会员",
"iconPath": "/static/tabBarIcon/04.png",
"selectedIconPath": "/static/tabBarIcon/04_active.png"
},
{
"pagePath": "pages/user/index",
"text": "锶人中心",

View File

@@ -14,6 +14,8 @@ Page({
videos : '',
isFixedTop : 0,
barHeight : getApp().globalData.statusBarHeight, // 状态栏高度
showActivity : '',
checkBubble : false
},
/**
@@ -30,7 +32,13 @@ Page({
data : options.invite
})
}
console.log(wx.getStorageSync("inviteData"))
// 获取开关接口
wx.$api.index.festival().then(res => {
this.setData({
showActivity: res.data.show_activity
})
}).catch(err => {})
},
/**
@@ -102,4 +110,35 @@ Page({
url: '/pages/article/index?type=' + e.currentTarget.dataset.type
})
},
// 梵呗弹框关闭
checkTap() {
this.setData({
showActivity: !this.data.showActivity,
checkBubble: true
})
},
bubbleTap() {
this.setData({
showActivity: true,
checkBubble: false
})
},
checkWx() {
this.setData({
showActivity: !this.data.showActivity,
checkBubble: true
})
wx.navigateToMiniProgram({
appId: 'wx9ae0c63d0c58caeb',
path: '/pages/activity/activity',
envVersion: 'release',
success: res=> {
// 打开成功
console.log("跳转小程序成功!",res);
}
})
}
})

View File

@@ -13,7 +13,7 @@
<view class="layout">
<!-- 商品 -->
<view class="goods">
<view class="goods" wx:if="{{goodsArr.length > 0}}">
<image class="goodsBack" src="https://api.siyuankunlun.com/storage/images/2023/11/13/4834ef56bbfe2f6802d90ab8bbfcc17b.jpg" mode="widthFix"></image>
<view class="goodsCont">
<view class="goodsCont-title">
@@ -111,3 +111,13 @@
</view>
</view>
</view>
<!-- 梵呗弹框 -->
<view class="checkEject {{showActivity ? 'active' : ''}}" catchtouchmove='true'></view>
<view class="checkCont {{showActivity ? 'active' : ''}}" catchtouchmove='true'>
<image class="checkCont-img" src="https://api.siyuankunlun.com/storage/images/2024/01/26/6b0a7fb4f50648bc9bd1a9a2ffcdcb33.png" mode="widthFix" bindtap="checkWx"></image>
<image src="/static/icons/closeBig.png" class="checkCont-close" bindtap="checkTap" mode="widthFix"></image>
</view>
<!-- 气泡 -->
<image src="https://api.siyuankunlun.com/storage/images/2024/01/26/d14bc268c048b933b72a3868785c20de.png" class="bubble" bindtap="bubbleTap" mode="widthFix" wx:if="{{checkBubble}}"></image>

View File

@@ -151,7 +151,7 @@
/* 用水指南 */
.other {
padding: 0 30rpx;
padding: 30rpx 30rpx 0;
box-sizing: border-box;
}
@@ -340,3 +340,57 @@
left: 0;
z-index: 99;
}
/* 梵呗弹框 */
.checkEject {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, .6);
z-index: 1000;
display: none;
}
.checkEject.active {
display: block;
}
.checkCont {
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1001;
text-align: center;
display: none;
box-sizing: border-box;
padding-top: 95rpx;
}
.checkCont.active {
display: -webkit-box;
}
.checkCont-img {
width: 100%;
border-radius: 20rpx;
}
.checkCont-close {
width: 70rpx;
margin-top: 25rpx;
}
.bubble {
position: fixed;
right: 0;
bottom: 12%;
width: 15%;
z-index: 100000;
}

View File

@@ -196,11 +196,11 @@
<view class="rightCont-text-tips">库存量信息</view>
<view class="rightCont-text-number" wx:if="{{ caseOrder.residue}}">{{ caseOrder.residue}}</view>
</view>
<view bindtap="userNav" data-url="/pages/water/index" class="rightCont-text-item">
<!-- <view bindtap="userNav" data-url="/pages/water/index" class="rightCont-text-item">
<image class="rightCont-text-icon" src="/static/ls/userIcon_02.png"></image>
<view class="rightCont-text-name">水滴账户</view>
<view class="rightCont-text-tips">水滴获得记录</view>
</view>
</view> -->
<view bindtap="userNav" data-url="./code/code" class="rightCont-text-item">
<image class="rightCont-text-icon" src="/static/ls/userIcon_03.png"></image>
<view class="rightCont-text-name">邀请码</view>