Compare commits
15 Commits
6039328f54
...
840ba58aa6
Author | SHA1 | Date | |
---|---|---|---|
840ba58aa6 | |||
0de127d351 | |||
|
b1b4298721 | ||
2d8e738164 | |||
|
ee3ba5b0dc | ||
|
8937a31684 | ||
993e1bc647 | |||
0e21019107 | |||
4dfacfb524 | |||
d3154dc864 | |||
8f02597787 | |||
16115ba111 | |||
5f233b8e06 | |||
916b1e0cbd | |||
|
2e36f2a22f |
@ -454,6 +454,19 @@ export default {
|
||||
//获取默认头像
|
||||
getDefaultAvatar(){
|
||||
return vm.$u.post("member/getDefaultAvatar")
|
||||
},
|
||||
// 第三方账号绑定【微信|QQ】
|
||||
bindingThird({ openid, type }) {
|
||||
return vm.$u.post("auth/memberBindThird", {
|
||||
third_openid: openid,
|
||||
third_type: type,
|
||||
})
|
||||
},
|
||||
// 解绑
|
||||
unbindingThird({ type }) {
|
||||
return vm.$u.post("auth/memberUnbindThird", {
|
||||
third_type: type,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
<view class="swiper-item uni-bg-red">
|
||||
<image :src=" 'https://' + item.launch_path"></image>
|
||||
</view>
|
||||
<view class="btn-init" v-if="parseInt(index) == list.length" @click="goNext">立即体验</view>
|
||||
</swiper-item>
|
||||
<view class="btn-init" v-if="parseInt(index) == list.length - 1" @click="goNext">立即体验</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -16,6 +16,11 @@
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
"safearea": { //安全区域配置,仅iOS平台生效
|
||||
"bottom": { // 底部安全区域配置
|
||||
"offset": "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
|
||||
}
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"OAuth" : {},
|
||||
|
@ -500,7 +500,6 @@
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
background-color: #FF0000 !important;
|
||||
}
|
||||
|
||||
/* 关闭 */
|
||||
|
@ -10,6 +10,10 @@
|
||||
<view>{{ item.title }}</view>
|
||||
<image src="../static/mine/21.png"></image>
|
||||
</view>
|
||||
<view class="list-item" @click="clearCache">
|
||||
<view>清除缓存</view>
|
||||
<view class="left-text">{{ fileSizeString }}</view>
|
||||
</view>
|
||||
<view class="list-item" @click="sheetStatus=true">
|
||||
<view>退出登录</view>
|
||||
<image src="../static/mine/21.png"></image>
|
||||
@ -58,13 +62,16 @@
|
||||
title: '证件中心',
|
||||
link: '../mine/ArticleDetails?type=1'
|
||||
},
|
||||
{
|
||||
title: '第三方绑定',
|
||||
link: './binding'
|
||||
},
|
||||
{
|
||||
title: '屏蔽用户',
|
||||
link: './ShieldUsers'
|
||||
},
|
||||
{
|
||||
title: '关于我们',
|
||||
// link: '../mine/ArticleDetails?type=2'
|
||||
link: '/pageE/setting/version'
|
||||
},
|
||||
{
|
||||
@ -73,9 +80,13 @@
|
||||
},
|
||||
],
|
||||
content: "是否退出登录!",
|
||||
show: false
|
||||
show: false,
|
||||
fileSizeString: "", // 缓存大小
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getCache();
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['logout']),
|
||||
// 退出登录选择 0:切换账号 | 1:退出登录
|
||||
@ -85,6 +96,45 @@
|
||||
this.show = true;
|
||||
}
|
||||
},
|
||||
// 获取缓存
|
||||
getCache() {
|
||||
let _this = this;
|
||||
// #ifdef APP-PLUS
|
||||
plus.cache.calculate(function(size) {
|
||||
let sizeCache = size;
|
||||
if (sizeCache == 0) {
|
||||
_this.fileSizeString = "0B";
|
||||
} else if (sizeCache < 1024) {
|
||||
_this.fileSizeString = sizeCache + "B";
|
||||
} else if (sizeCache < 1048576) {
|
||||
_this.fileSizeString = (sizeCache / 1024).toFixed(2) + "KB";
|
||||
} else if (sizeCache < 1073741824) {
|
||||
_this.fileSizeString = (sizeCache / 1048576).toFixed(2) + "MB";
|
||||
} else {
|
||||
_this.fileSizeString = (sizeCache / 1073741824).toFixed(2) + "GB";
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 清除缓存
|
||||
clearCache() {
|
||||
// #ifdef APP-PLUS
|
||||
uni.showModal({
|
||||
title: "确定要清理缓存吗?",
|
||||
cancelColor: "#999",
|
||||
confirmColor: "#f00",
|
||||
success: (res) => {
|
||||
// console.log(res);
|
||||
if (res.confirm) {
|
||||
plus.cache.clear(function(e) {
|
||||
console.log(e);
|
||||
})
|
||||
}
|
||||
this.getCache();
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
toNextPage(url, ...params) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
@ -122,6 +172,11 @@
|
||||
width: 14rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
.left-text {
|
||||
margin-left: auto;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
129
pageE/setting/binding.vue
Normal file
129
pageE/setting/binding.vue
Normal file
@ -0,0 +1,129 @@
|
||||
<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(item.type)" v-if="userInfo[item.name]">
|
||||
<image src="/static/image/mine/44.png"></image>
|
||||
<text>解绑</text>
|
||||
</view>
|
||||
<view class="btn bundling-btn" @click="binding(item.provider, item.type)" v-else>
|
||||
<image src="/static/image/mine/43.png"></image>
|
||||
<text>绑定</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: '',
|
||||
bangdingList: [
|
||||
{
|
||||
title: 'QQ',
|
||||
provider: 'qq', // uni 登录 provider
|
||||
type: 'qq', // 后台需要解绑的参数名 type
|
||||
name: 'member_qqopenid', // 后台返回是否绑定的字段名
|
||||
},
|
||||
{
|
||||
title: '微信',
|
||||
provider: 'weixin',
|
||||
type: 'wechat',
|
||||
name: 'member_wxopenid',
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getMemberInfo();
|
||||
},
|
||||
methods: {
|
||||
getMemberInfo() {
|
||||
this.$u.api.getMemberInfo().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.userInfo = res.data.MemberArray;
|
||||
}
|
||||
})
|
||||
},
|
||||
binding(provider, type) {
|
||||
uni.login({
|
||||
provider: provider,
|
||||
success: (loginRes) => {
|
||||
console.log(loginRes);
|
||||
uni.getUserInfo({
|
||||
provider: provider,
|
||||
success: (res) => {
|
||||
console.log(res.userInfo.openId);
|
||||
this.$u.api.bindingThird({
|
||||
openid: res.userInfo.openId,
|
||||
type: type
|
||||
}).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
if(res.errCode == 0) {
|
||||
this.getMemberInfo();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
},
|
||||
unbinding(type) {
|
||||
this.$u.api.unbindingThird({ type: type }).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
if(res.errCode == 0) {
|
||||
this.getMemberInfo();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</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>
|
15
pages.json
15
pages.json
@ -135,7 +135,7 @@
|
||||
"backgroundColor":"#ffffff",
|
||||
"buttons": [
|
||||
{
|
||||
"type":"none",
|
||||
// "type":"none",
|
||||
"text":"\ue636",
|
||||
"float":"right",
|
||||
"fontSize":"18",
|
||||
@ -999,6 +999,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setting/binding",
|
||||
"style": {
|
||||
"navigationBarTitleText": "第三方绑定",
|
||||
"app-plus": {
|
||||
"titleSize": "36px",
|
||||
"titleNView": {
|
||||
"titleColor": "#333333",
|
||||
"backgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setting/ShieldUsers",
|
||||
"style": {
|
||||
|
@ -100,9 +100,10 @@
|
||||
<image src="/static/image/mine/16.png"></image>
|
||||
<view>使用帮助</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/more/Complaints')">
|
||||
<view class="badge-box" @click="toOtherPage('/more/Complaints')">
|
||||
<image src="/static/image/mine/15.png"></image>
|
||||
<view>投诉意见</view>
|
||||
<u-badge size="mini" :count="userInfo.feedback_show" :offset="offset" type="error"></u-badge>
|
||||
</view>
|
||||
<!-- <view></view> -->
|
||||
</view>
|
||||
@ -163,7 +164,8 @@ export default {
|
||||
link: '/order/Index?current=7',
|
||||
number: '',
|
||||
},
|
||||
]
|
||||
],
|
||||
offset: [-10,6]
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
@ -466,6 +468,9 @@ export default {
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
}
|
||||
.badge-box {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
BIN
static/image/mine/43.png
Normal file
BIN
static/image/mine/43.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 665 B |
BIN
static/image/mine/44.png
Normal file
BIN
static/image/mine/44.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Loading…
x
Reference in New Issue
Block a user