更新记录
1.0.1(2020-10-12)
发布版本
平台兼容性
小程序授权,获取用户手机号(uni-app通用插件)
2020-10-12
- 发布第一版
使用方法
main.js
引入插件// main.js import appletAuthor from './components/appletAuthor/index.vue' Vue.component('appletAuthor', appletAuthor)
2.test.vue
页面调用
// test.vue
<template>
<weChatAuthor>
<view class="bg-cuCol flex" style="margin-bottom: -48rpx;padding-bottom:72rpx" catchtap="tosetup">
<view class="imgCon padding-left-xl">
<image class="cu-avatar round no xl" src="{{userInfo.avatarUrl||'/images/default-icon.png'}}"></image>
</view>
<view class="padding text-xl">
<view wx:if="{{!userInfo}}">点击登录</view>
<view wx:elif="{{!userInfo.mobile}}">点击绑定手机号</view>
<view wx:else>{{userInfo.realName||userInfo.nickName}}</view>
</view>
</view>
<view class="cu-list card-menu menu shadow-warp margin-bottom">
<view class="cu-item">
<view class="content flex justify-between text-center padding-tb-sm">
<navigator wx:for="{{order}}" hover-class="none" wx:key="index">
<view class="{{item.ico}} text-xxl" style="color:#{{item.col}}"></view>
<view class="text-sm">{{item.txt}}</view>
</navigator>
</view>
</view>
</view>
<view class="cu-list card-menu menu" wx:for="{{list}}" wx:key="index">
<view class="cu-item">
<view class="content padding-tb-sm">
<view class="flex justify-between">
<view>{{item.title}}</view>
<navigator class="text-sm" wx:if="{{item.subbtn}}" hover-class="none" url="{{item.subbtn.url}}">
{{item.subbtn.txt}}</navigator>
</view>
<view class="flex justify-between align-center text-center padding-top-sm">
<navigator wx:for="{{item.child}}" url="{{child.url}}" wx:for-item="child" hover-class="none" wx:key="txt">
<view class="{{child.ico}} text-xxl" style="color:#{{child.col}}"></view>
<view>{{child.txt}}</view>
</navigator>
</view>
</view>
</view>
</view>
</weChatAuthor>
</template>