59
components/ywx-auth-model/ywx-auth-model.vue
Normal file
59
components/ywx-auth-model/ywx-auth-model.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
|
||||
<button @click="open">关闭</button>
|
||||
<uni-popup ref="popup" :mask-click="false" type="bottom">
|
||||
<text>Popup</text>
|
||||
|
||||
<button class="avatar-wrapper" open-type="chooseAvatar" @tap="onChooseAvatar">
|
||||
<image class="avatar" :src="avatarUrl" style="width: 320rpx; height: 320rpx; margin: auto;"></image>
|
||||
</button>
|
||||
|
||||
<uni-easyinput placeholder="请输入昵称" v-model="nickname" type="nickname"></uni-easyinput>
|
||||
<button v-show="showPhone" type="primary" block open-type="getPhoneNumber" @getphonenumber="getPhone">
|
||||
授权电话
|
||||
</button>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ywx-auth-model",
|
||||
data() {
|
||||
return {
|
||||
avatarUrl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
|
||||
openid: "",
|
||||
loginstate: "0",
|
||||
openid: "",
|
||||
userEntity: null,
|
||||
terminal: "",
|
||||
osVersion: "",
|
||||
phoneNumber: "",
|
||||
showPhone:false,
|
||||
showModal: false, //定义登录弹窗
|
||||
}
|
||||
},
|
||||
onLoad: function() {},
|
||||
methods: {
|
||||
onChooseAvatar(e) {
|
||||
console.log(e)
|
||||
const {
|
||||
avatarUrl
|
||||
} = e.detail
|
||||
this.avatarUrl = avatarUrl
|
||||
},
|
||||
open() {
|
||||
this.$refs.popup.open('top')
|
||||
},
|
||||
close() {
|
||||
this.$refs.popup.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user