You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< template >
< view class = "container" >
< view class = "info-list" >
< view class = "info-item" >
< view class = "contacts" >
< text class = "name" > < text class = "iconfont icon-bangzhu" > < / text > 长按领取会员卡 < / text >
< / view >
< / view >
< / view >
< view class = "info-code" >
< view class = "code-text" > 会员号 : { { userInfo . userNo } } < / view >
< image class = "qrcode" :src ="qrCode" > < / image >
< / view >
<!-- 底部操作按钮 -- >
< view class = "footer-fixed" >
< view class = "btn-wrapper" >
< view class = "btn-item btn-item-main" @click ="goBack()" > 返 回 主 页 < / view >
< / view >
< / view >
< / view >
< / template >
< script >
import * as UserApi from '@/api/user'
import store from '@/store'
export default {
data ( ) {
return {
//当前页面参数
options : { } ,
// 正在加载
isLoading : true ,
userInfo : { } ,
qrCode : ""
}
} ,
/**
* 生命周期函数--监听页面加载
*/
onLoad ( options ) {
// 当前页面参数
this . options = options
this . getUserInfo ( )
} ,
methods : {
/**
* 用户信息
* */
getUserInfo ( ) {
const app = this
app . isLoading = true
UserApi . qrCode ( )
. then ( result => {
app . userInfo = result . data . userInfo ;
app . qrCode = result . data . wxCardQrCode ;
app . isLoading = false ;
} )
} ,
goBack ( ) {
this . $navTo ( 'pages/index/index' ) ;
}
}
}
< / script >
< style lang = "scss" scoped >
. info - list {
padding - bottom : 30 rpx ;
margin - top : 30 rpx ;
}
// 项目内容
. info - item {
margin : 20 rpx auto 20 rpx auto ;
padding : 30 rpx ;
width : 94 % ;
box - shadow : 0 1 rpx 5 rpx 0 px rgba ( 0 , 0 , 0 , 0.05 ) ;
border - radius : 10 rpx ;
background : # fff ;
}
. contacts {
font - size : 35 rpx ;
text - align : center ;
. name {
margin - left : 0 px ;
text - align : center ;
}
}
. info - code {
text - align : center ;
padding : 30 rpx ;
margin - bottom : 30 rpx ;
. code - text {
margin - bottom : 50 rpx ;
}
. qrcode {
width : 360 rpx ;
height : 360 rpx ;
margin : 0 auto ;
border : solid 1 px # ccc ;
}
}
// 底部操作栏
. footer - fixed {
z - index : 11 ;
box - shadow : 0 - 4 rpx 40 rpx 0 rgba ( 144 , 52 , 52 , 0.1 ) ;
. btn - wrapper {
height : 100 % ;
display : flex ;
text - align : center ;
align - items : center ;
padding : 0 30 rpx ;
}
. btn - item {
flex : 1 ;
font - size : 28 rpx ;
height : 80 rpx ;
line - height : 80 rpx ;
text - align : center ;
color : # fff ;
border - radius : 40 rpx ;
}
. btn - item - main {
background : linear - gradient ( to right , # f9211c , # ff6335 ) ;
}
}
< / style >