mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-11 03:46:47 +08:00
Merge branch 'master_1030' into 'master'
Master 1030 See merge request !9
This commit is contained in:
@@ -96,6 +96,14 @@ const logout = function() {
|
|||||||
return ajax.postJson('/logout',{"from":plat});
|
return ajax.postJson('/logout',{"from":plat});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取用户解绑状态
|
||||||
|
const hasOpenId = function(){
|
||||||
|
return ajax.post('/user/hasOpenId',{});
|
||||||
|
}
|
||||||
|
// 解绑unopenId
|
||||||
|
const UnOpenId = function(){
|
||||||
|
return ajax.post('/user/UnOpenId',{});
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
userParentOrg,
|
userParentOrg,
|
||||||
findOrgsByKeyword,
|
findOrgsByKeyword,
|
||||||
@@ -107,5 +115,7 @@ export default {
|
|||||||
modifyPassword,
|
modifyPassword,
|
||||||
getInAudienceIds,
|
getInAudienceIds,
|
||||||
updateUser,
|
updateUser,
|
||||||
logout
|
logout,
|
||||||
|
hasOpenId,
|
||||||
|
UnOpenId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ if(process.env.NODE_ENV === 'development'){
|
|||||||
oldApiBaseUrl = '/uboeApi';
|
oldApiBaseUrl = '/uboeApi';
|
||||||
statApiBaseUrl='/statApi';
|
statApiBaseUrl='/statApi';
|
||||||
socialApiBaseUrl='/socialApi';
|
socialApiBaseUrl='/socialApi';
|
||||||
fileUrl = 'http://127.0.0.1:9090/cdn/upload';
|
fileUrl = 'https://u-pre.boe.com/cdn/upload';
|
||||||
loginPath='/mobile/pages/login/login';
|
loginPath='/mobile/pages/login/login';
|
||||||
scormPlayer='http://localhost:9083/scorm-player';
|
scormPlayer='https://u-pre.boe.com/scorm-player';
|
||||||
}else if(process.env.ENV_TYPE === 'preview'){
|
}else if(process.env.ENV_TYPE === 'preview'){
|
||||||
// 预发布环境,当前配置未使用上
|
// 预发布环境,当前配置未使用上
|
||||||
context='/mobile-release';
|
context='/mobile-release';
|
||||||
|
|||||||
@@ -74,11 +74,11 @@
|
|||||||
"https" : false,
|
"https" : false,
|
||||||
"proxy" : {
|
"proxy" : {
|
||||||
"/systemapi" : {
|
"/systemapi" : {
|
||||||
"target" : "http://127.0.0.1:9090",
|
"target" : "https://u-pre.boe.com",
|
||||||
"changeOrigin" : true,
|
"changeOrigin" : true,
|
||||||
"secure" : false,
|
"secure" : false,
|
||||||
"pathRewrite" : {
|
"pathRewrite" : {
|
||||||
"^/systemapi" : ""
|
// "^/systemapi" : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/userbasic" : {
|
"/userbasic" : {
|
||||||
@@ -107,22 +107,22 @@
|
|||||||
},
|
},
|
||||||
"/statApi" : {
|
"/statApi" : {
|
||||||
// 目标代理服务器地址
|
// 目标代理服务器地址
|
||||||
"target" : "http://127.0.0.1:9080",
|
"target" : "https://u-pre.boe.com",
|
||||||
"changeOrigin" : true,
|
"changeOrigin" : true,
|
||||||
"logLevel" : "debug",
|
"logLevel" : "debug",
|
||||||
"secure" : false,
|
"secure" : false,
|
||||||
"pathRewrite" : {
|
"pathRewrite" : {
|
||||||
"^/statApi" : ""
|
// "^/statApi" : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/socialApi" : {
|
"/socialApi" : {
|
||||||
// 目标代理服务器地址
|
// 目标代理服务器地址
|
||||||
"target" : "http://127.0.0.1:9081",
|
"target" : "https://u-pre.boe.com",
|
||||||
"changeOrigin" : true,
|
"changeOrigin" : true,
|
||||||
"logLevel" : "debug",
|
"logLevel" : "debug",
|
||||||
"secure" : false,
|
"secure" : false,
|
||||||
"pathRewrite" : {
|
"pathRewrite" : {
|
||||||
"^/socialApi" : ""
|
// "^/socialApi" : ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,11 @@
|
|||||||
<!-- <u-cell title="语言设置" v-model="userInfoObj.name"></u-cell>
|
<!-- <u-cell title="语言设置" v-model="userInfoObj.name"></u-cell>
|
||||||
<u-cell title="位置" v-model="userInfoObj.name"></u-cell> -->
|
<u-cell title="位置" v-model="userInfoObj.name"></u-cell> -->
|
||||||
<u-cell @click="toRouter('next')" title="修改密码" :isLink="true" arrow-direction="left" v-model="userInfoObj.account.passValue"></u-cell>
|
<u-cell @click="toRouter('next')" title="修改密码" :isLink="true" arrow-direction="left" v-model="userInfoObj.account.passValue"></u-cell>
|
||||||
|
<u-cell title="解除绑定">
|
||||||
|
<view slot="value" :class="!relieveStatus ? 'relieveLogin noRelieveLogin' : 'relieveLogin activeRelieveLogin'" @click="relieveLogin(relieveStatus)">
|
||||||
|
<text>解除</text>
|
||||||
|
</view>
|
||||||
|
</u-cell>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -69,6 +74,7 @@
|
|||||||
import cropper from "@/components/x-cropper/x-cropper.vue"
|
import cropper from "@/components/x-cropper/x-cropper.vue"
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import {getToken} from '@/utils/token.js'
|
import {getToken} from '@/utils/token.js'
|
||||||
|
import userBasic from '@/api/boe/userbasic.js'
|
||||||
export default {
|
export default {
|
||||||
components: {cropper},
|
components: {cropper},
|
||||||
data() {
|
data() {
|
||||||
@@ -80,6 +86,7 @@
|
|||||||
},
|
},
|
||||||
clearShow:false,
|
clearShow:false,
|
||||||
imgurl:"",
|
imgurl:"",
|
||||||
|
relieveStatus:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -90,12 +97,44 @@
|
|||||||
this.aid=rs.aid;
|
this.aid=rs.aid;
|
||||||
this.imgurl = rs.avatar;
|
this.imgurl = rs.avatar;
|
||||||
this.load();
|
this.load();
|
||||||
|
this.getRelieveStatus();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
//this.load()
|
//this.load()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
relieveLogin(relieveStatus){
|
||||||
|
if(relieveStatus){
|
||||||
|
userBasic.UnOpenId().then(res=>{
|
||||||
|
if(res.status==200){
|
||||||
|
uni.showToast({
|
||||||
|
title: "解绑成功",
|
||||||
|
icon:'none'
|
||||||
|
});
|
||||||
|
this.getRelieveStatus();
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: "解绑失败",
|
||||||
|
icon:'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 解绑状态
|
||||||
|
getRelieveStatus(){
|
||||||
|
userBasic.hasOpenId().then(res=>{
|
||||||
|
if(res.status==200){
|
||||||
|
this.relieveStatus = res.result
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: "获取数据失败",
|
||||||
|
icon:'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
logout() {
|
logout() {
|
||||||
this.clearShow=true;
|
this.clearShow=true;
|
||||||
},
|
},
|
||||||
@@ -218,6 +257,29 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.relieveLogin{
|
||||||
|
width: 40px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 3px;
|
||||||
|
text {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.activeRelieveLogin{
|
||||||
|
color: red;
|
||||||
|
border: 1px solid red;
|
||||||
|
text{
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.noRelieveLogin{
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
color: #ccc;
|
||||||
|
text{
|
||||||
|
color: #ccc !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
/deep/ .u-modal{
|
/deep/ .u-modal{
|
||||||
width: 288px !important;
|
width: 288px !important;
|
||||||
border-radius: 28upx;
|
border-radius: 28upx;
|
||||||
|
|||||||
Reference in New Issue
Block a user