Compare commits

...

15 Commits

Author SHA1 Message Date
840ba58aa6 Merge pull request '调试完成' (#311) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/311
2020-08-31 17:04:37 +08:00
gyh
0de127d351 Merge pull request 'gdpao' (#312) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/312
2020-08-31 16:33:10 +08:00
Gdpao
b1b4298721 gdpao 2020-08-31 16:31:31 +08:00
gyh
2d8e738164 Merge pull request 'gyh' (#310) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/310
2020-08-31 10:15:47 +08:00
Gdpao
ee3ba5b0dc gdpasomg 2020-08-31 09:10:40 +08:00
Gdpao
8937a31684 gdpao 2020-08-31 09:07:24 +08:00
993e1bc647 Merge pull request 'xbx' (#309) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/309
2020-08-29 00:14:09 +08:00
0e21019107 Merge pull request 'xbx' (#307) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/307
2020-08-27 14:04:08 +08:00
4dfacfb524 Merge pull request '第三方绑定' (#305) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/305
2020-08-27 12:22:22 +08:00
d3154dc864 第三方绑定 2020-08-27 12:21:32 +08:00
8f02597787 Merge pull request '第三方绑定' (#304) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/304
2020-08-27 12:18:02 +08:00
16115ba111 第三方绑定 2020-08-27 12:16:09 +08:00
5f233b8e06 Merge pull request '第三方绑定' (#303) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/303
2020-08-27 09:37:18 +08:00
916b1e0cbd 第三方绑定 2020-08-27 09:36:12 +08:00
Gdpao
2e36f2a22f gdpao 2020-08-26 20:31:30 +08:00
11 changed files with 227 additions and 8 deletions

View File

@ -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,
})
}
}

View File

@ -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>

View File

@ -16,6 +16,11 @@
"autoclose" : true,
"delay" : 0
},
"safearea": { //iOS
"bottom": { //
"offset": "none" // "none""auto""none"
}
},
/* */
"modules" : {
"OAuth" : {},

View File

@ -500,7 +500,6 @@
.container {
position: relative;
background-color: #FF0000 !important;
}
/* 关闭 */

View File

@ -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
View 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>

View File

@ -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": {

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

BIN
static/image/mine/44.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB