当前位置:网站首页>自动弹出 微信授权登录窗口
自动弹出 微信授权登录窗口
2022-06-21 12:01:00 【苦修的木鱼】
进入小程序首页 自动弹出 微信授权登录窗口-如下图

代码如下
<!-- 授权弹窗 -->
<view class="auth" v-if="showModal">
<view class="mask" catchtouchmove="preventTouchMove" v-if="showModal"></view>
<!-- 弹出层 -->
<view class="modalDlg" v-if="showModal">
<view class="title">
<text class="text0">微信授权</text>
</view>
<view class="cartLeft"></view>
<u-image :lazy-load="true" width="150rpx" height="150rpx" :src="logo"></u-image>
<view class="name">
<text class="text1">小程序名称</text>
</view>
<view class="cartLeft1"></view>
<view class="content">
<text class="text2">获取您的公开信息(昵称、头像等)</text>
</view>
<view class="cartLeft2"></view>
<view class="but">
<view class="not">
<u-button :hair-line="false" :custom-style='rejectStyle' size="mini" @click="rejectInfo">拒绝
</u-button>
</view>
<view class="ok">
<u-button :hair-line="false" :custom-style='customStyle' size="mini" @click="getUserProfileUrl">
允许</u-button>
</view>
</view>
</view>
</view>
样式如下
<style> // 授权窗口 .auth {
width: 620rpx; text-align: center; animation: auth 2s; -webkit-animation: auth 2s; /* 遮罩层 */ .mask {
width: 100%; height: 100%; position: fixed; top: 0; left: 0; background: #000; z-index: 9000; opacity: 0.5; } /* 弹出层 */ .modalDlg {
width: 70%; height: 480rpx; position: fixed; top: 300rpx; left: 0; right: 0; z-index: 9999; margin: 0 auto; background-color: #fff; border-radius: 10rpx; display: flex; flex-direction: column; align-items: center; /* 弹出层里面的文字 */ .title {
margin-top: 20rpx; .text0 {
text-align: center; font-weight: bold; font-size: 34rpx; color: #000; } } .cartLeft {
width: 90%; height: 20rpx; border-bottom: 1rpx solid #f3ebeb; } .name {
margin-top: 10rpx; .text1 {
text-align: center; font-size: 32rpx; color: #000; width: 360rpx; } } .cartLeft1 {
width: 75%; height: 20rpx; border-bottom: 1rpx solid #f3ebeb; } .content {
margin-top: 20rpx; .text2 {
text-align: center; // 实现两端对齐文本效果 font-size: 28rpx; color: #AFACB3; } } .cartLeft2 {
width: 100%; height: 20rpx; border-bottom: 1rpx solid #f3ebeb; } .but {
width: 70%; height: 18%; display: flex; justify-content: space-between; align-items: center; /* 弹出层里面的按钮 */ .not {
height: 60rpx; background: #fff; line-height: 10rpx; text-align: center; color: #44b549; } .ok {
height: 60rpx; line-height: 10rpx; text-align: center; font-size: 30rpx; } } } } </style>
边栏推荐
- Chapter VIII web project testing
- 南京大学 静态软件分析(static program analyzes)-- Intermediate Representation 学习笔记
- 重磅,MapStruct 1.5 发布,这次终于支持Map转为Bean了!
- MySQL-DQL
- Is 100W data table faster than 1000W data table query?
- 【综合笔试题】难度 2.5/5 :「树状数组」与「双树状数组优化」
- harmonyos培训一
- Summary of UART problems in stm32cubemx
- [Harbin Institute of technology] information sharing for the first and second examinations of postgraduate entrance examination
- Tensorflower uses the specified GPU and GPU video memory
猜你喜欢

External-Attention-tensorflow(更新中)

矩形覆盖面积

Simulated 100 questions of 2022 safety officer-a certificate examination and online simulated examination

蜜雪冰城(已黑化)

STM32笔记之 PWM(脉宽调制)

浅论OCA\UV-OCA LOCA\SLOCA 四种全贴合工艺

Rectangular coverage area

i.MX - RT1052输入输出(GPIO)

100w的数据表比1000w的数据表查询更快吗?

Customization of power aging test system | overview of charging pile automatic test system nsat-8000
随机推荐
Is 100W data table faster than 1000W data table query?
巨头局终战:即时零售
华为是如何从0到1打造以项目为中心运作的项目管理体系的?
MySQL-DDL
一文搞懂 Flink OperatorChain 对象重用
Rename all files in the folder with one click
typora免费版,无需破解,安装直接使用
Compilation de l'environnement vs Code + GCC développé par stm32
【无标题】
南京大学 静态软件分析(static program analyzes)-- Intermediate Representation 学习笔记
Typera free version, without cracking, can be installed and used directly
Transaction
Typescript variable declaration - type assertion
动手学数据分析 数据可视化
Is the Huatai Securities account given by qiniu school true? Is it safe to open an account
华为云发布桌面IDE-CodeArts
Introduction to the upper computer software ns-scope of Tektronix oscilloscope
清除交换机配置、配置镜像端口以及Wireshark抓包(以Huawei S5720为例)
XML entity injection vulnerability
马斯克的“好朋友”,冲击2022港股最大IPO