deming/pageE/setting/binding.vue

91 lines
1.7 KiB
Vue
Raw Normal View History

2020-08-27 01:36:12 +00:00
<template>
<view class="binding">
<view class="binding-item" v-for="(item, index) in bangdingList" :key="index">
<view class="title">{{ item.title }}</view>
<view class="btn unbundling-btn" @click="unbinding" v-if="0">
<image src="/static/image/mine/44.png"></image>
<text>解绑</text>
</view>
<view class="btn bundling-btn" @click="binding(item.provider)" v-else>
<image src="/static/image/mine/43.png"></image>
<text>绑定</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bangdingList: [
{
title: 'QQ',
provider: 'qq'
},
{
title: '微信',
provider: 'weixin'
}
]
}
},
methods: {
binding(provider) {
uni.login({
provider: provider,
success: function (loginRes) {
console.log(loginRes.authResult);
}
});
},
unbinding() {
}
}
};
</script>
<style lang="scss" scoped>
.binding {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
padding-top: 1rpx;
.binding-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 35rpx 30rpx;
height: 98rpx;
background-color: #FFFFFF;
&:not(:last-child) {
margin-bottom: 2rpx;
}
.title {
font-size: 30rpx;
color: rgba(52,52,52,1);
}
.btn {
// width: 112rpx;
height: 48rpx;
border-radius: 10rpx;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12rpx 16rpx;
> image {
width: 26rpx;
height: 26rpx;
margin-right: 10rpx;
}
}
.unbundling-btn {
border: 1rpx solid rgba(102,102,102,1);
color: rgba(102,102,102,1);
}
.bundling-btn {
border: 1rpx solid rgba(255,120,16,1);
color: #FF7810;
}
}
}
</style>