优化代码
This commit is contained in:
@@ -211,7 +211,7 @@ export default {
|
||||
triggered: false, //下拉刷新标识
|
||||
RealTimePklist: [], // PK大厅列表数据
|
||||
MakeAppointmentPKlist: [], // 今日PK列表数据
|
||||
listtype: 1, // 列表类型 1 当天 2 大于当天
|
||||
listtype: 2, // 列表类型 1 当天 2 大于当天
|
||||
filterable: true, //是否可搜索
|
||||
Country: optionsArray,
|
||||
countrys: "", //国家
|
||||
@@ -419,6 +419,10 @@ export default {
|
||||
// this.$global.lastPage = getCurrentPages().router;
|
||||
uni.navigateTo({ url: "/pages/pkDetail/pkDetail" });
|
||||
},
|
||||
onScrollToLower() {
|
||||
this.page++;
|
||||
this.pkList({ type: this.listtype });
|
||||
},
|
||||
//下拉刷新
|
||||
onRefresherRefresh() {
|
||||
this.page = 0;
|
||||
@@ -474,7 +478,7 @@ export default {
|
||||
userId: this.info.id,
|
||||
from: 1,
|
||||
},
|
||||
userInfo: true,
|
||||
userInfo: false,
|
||||
});
|
||||
this.detailsdata = res.data;
|
||||
if (res.code === 200) {
|
||||
@@ -536,10 +540,6 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
onScrollToLower() {
|
||||
this.page++;
|
||||
this.pkList({ type: this.listtype });
|
||||
},
|
||||
components: {
|
||||
topNavigation,
|
||||
Advertisement,
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
<view class="PKInformation">
|
||||
<view class="title">
|
||||
<view class="titleText">专属客服</view>
|
||||
<view class="titleText">其他功能</view>
|
||||
<view class="titleLine"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</view>
|
||||
|
||||
<view class="Individual">
|
||||
<view class="name">{{ SenderData.anchorId }}</view>
|
||||
<view class="name">{{ SenderData.disPlayId }}</view>
|
||||
|
||||
<view class="GenderAndAge">
|
||||
<view class="male" v-if="SenderData.sex === '1'">
|
||||
@@ -84,7 +84,7 @@
|
||||
</view>
|
||||
|
||||
<view class="Individual">
|
||||
<view class="name">{{ ReceiverData.anchorId }}</view>
|
||||
<view class="name">{{ ReceiverData.disPlayId }}</view>
|
||||
|
||||
<view class="GenderAndAge">
|
||||
<view class="male" v-if="ReceiverData.sex === '1'">
|
||||
@@ -138,6 +138,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 邀请信息 -->
|
||||
<view class="flex">
|
||||
<view
|
||||
class="button"
|
||||
v-if="PkIDInfodata.pkStatus === 0 && ReceiverData.senderId !== id"
|
||||
@@ -145,15 +146,23 @@
|
||||
<button class="accept" @click="AcceptHint()">接受邀请</button>
|
||||
<button class="reject" @click="RefuseHint()">拒绝邀请</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view
|
||||
v-if="ReceiverData.senderId === id && PkIDInfodata.pkStatus === 0"
|
||||
class="button buttontext"
|
||||
>等待对方接受邀请</view
|
||||
>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view v-if="PkIDInfodata.pkStatus === 1" class="button buttontext">已接受邀请</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view v-if="PkIDInfodata.pkStatus === 2" class="button buttontext">已拒绝邀请</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-popup ref="popups" type="center" border-radius="10px 10px 0 0">
|
||||
<view class="popup-Hintcontent">
|
||||
<view class="popup-text">提示</view>
|
||||
@@ -375,7 +384,7 @@ export default {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 80rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.sengderIcon {
|
||||
width: 150rpx;
|
||||
@@ -485,11 +494,16 @@ export default {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.flex{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 15px;
|
||||
}
|
||||
.button {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 150rpx;
|
||||
}
|
||||
.buttontext {
|
||||
font-size: 40rpx;
|
||||
|
||||
@@ -1,17 +1,90 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<button class="login-btn" open-type="chooseAvatar" @chooseavatar="Userinfo">
|
||||
<image class="avatar" :src="userinfo"></image>
|
||||
</button>
|
||||
<input
|
||||
type="nickname"
|
||||
class="weui-input"
|
||||
placeholder="请输入昵称"
|
||||
@blur="inputName"
|
||||
v-model="name"
|
||||
/>
|
||||
<button class="weui-btn" @click="wxLogin">修改</button>
|
||||
<button class="weui-btn" @click="cancel">取消</button>
|
||||
<view class="bg">
|
||||
<image
|
||||
class="bgImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="Return" @click="onBack">
|
||||
<image
|
||||
class="ReturnImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="title">设置</view>
|
||||
|
||||
<view class="contentbox">
|
||||
<view class="content">
|
||||
<!-- 修改头像 -->
|
||||
<button class="login-btn" open-type="chooseAvatar" @chooseavatar="Userinfo">
|
||||
<view class="avatarmodify">
|
||||
<view class="avatarmodify-item">头像</view>
|
||||
<view class="avatarmodify-img">
|
||||
<image class="avatar" :src="userinfo"></image>
|
||||
<image
|
||||
class="more"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/More.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</button>
|
||||
<!-- 修改昵称 -->
|
||||
<view class="Nickname" @click="inputNickname">
|
||||
<view class="avatarmodify-item">昵称</view>
|
||||
<view class="NicknameInput">
|
||||
<view class="NicknameInput-name">{{ name }}</view>
|
||||
<image
|
||||
class="more"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/More.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 修改邮箱 -->
|
||||
<view class="Nickname" @click="modifyEmailAddress">
|
||||
<view class="avatarmodify-item">邮箱</view>
|
||||
<view class="NicknameInput">
|
||||
<view class="NicknameInput-name">{{
|
||||
email == "" || email == null ? "未绑定" : email
|
||||
}}</view>
|
||||
<image
|
||||
class="more"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/More.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 修改密码 -->
|
||||
<view class="Nickname" @click="modifyPassword">
|
||||
<view class="avatarmodify-item">密码</view>
|
||||
<view class="NicknameInput">
|
||||
<view class="NicknameInput-name">{{
|
||||
havaPassword ? "" : "未设置"
|
||||
}}</view>
|
||||
<image
|
||||
class="more"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/More.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 扫码登录web端 -->
|
||||
<view class="Nickname" @click="scanCode">
|
||||
<view class="avatarmodify-item">扫码</view>
|
||||
<view class="NicknameInput">
|
||||
<image
|
||||
class="more"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/More.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -19,7 +92,7 @@
|
||||
import request from "../../components/request.js";
|
||||
import postFile from "../../components/postFile.js";
|
||||
import generateFileName from "../../components/generateFileName.js";
|
||||
import { goEasylogin,goEasylogout } from "../../components/goEasyTool/tool.js";
|
||||
import { goEasylogin, goEasylogout } from "../../components/goEasyTool/tool.js";
|
||||
|
||||
export default {
|
||||
inject: ["$global"],
|
||||
@@ -30,6 +103,8 @@ export default {
|
||||
id: "",
|
||||
info: {},
|
||||
useravatar: "",
|
||||
email: null,
|
||||
havaPassword: false,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -39,61 +114,100 @@ export default {
|
||||
this.id = res.data.id;
|
||||
this.name = res.data.nickName;
|
||||
this.userinfo = this.useravatar = res.data.headerIcon;
|
||||
this.email = res.data.email;
|
||||
this.havaPassword = res.data.havaPassword;
|
||||
},
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
uni.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
this.name = res.data.nickName;
|
||||
this.userinfo = this.useravatar = res.data.headerIcon;
|
||||
this.email = res.data.email;
|
||||
this.havaPassword = res.data.havaPassword;
|
||||
},
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
//修改密码
|
||||
modifyPassword() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/Setting/settingmod/changePassword?id=" + this.id,
|
||||
});
|
||||
},
|
||||
// 修改邮箱
|
||||
modifyEmailAddress() {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/Setting/settingmod/changeEmail?email=" + this.email + "&id=" + this.id,
|
||||
});
|
||||
},
|
||||
// 修改昵称
|
||||
inputNickname() {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/Setting/settingmod/changeNickname?name=" + this.name + "&id=" + this.id,
|
||||
});
|
||||
},
|
||||
// 扫码登录web端
|
||||
scanCode() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
const data = JSON.parse(res.result);
|
||||
if (data.type === "qrcdoe") {
|
||||
request({
|
||||
url: "user/scan",
|
||||
method: "POST",
|
||||
data: {
|
||||
uuid: data.uuid,
|
||||
userId: this.id,
|
||||
},
|
||||
userInfo: true,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
icon: "success",
|
||||
});
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
uni.showToast({
|
||||
title: "登录失败",
|
||||
icon: "none",
|
||||
})
|
||||
});
|
||||
}
|
||||
// 其他类型暂不处理
|
||||
},
|
||||
});
|
||||
},
|
||||
onBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
},
|
||||
// 输入昵称
|
||||
inputName(e) {
|
||||
this.name = e.detail.value;
|
||||
},
|
||||
// 选择头像
|
||||
async Userinfo(e) {
|
||||
const { avatarUrl } = e.detail;
|
||||
this.userinfo = avatarUrl;
|
||||
this.changeHeaderIcon();
|
||||
},
|
||||
// 微信登录
|
||||
wxLogin(e) {
|
||||
// 修改头像
|
||||
changeHeaderIcon() {
|
||||
goEasylogout(this.$goeasy);
|
||||
uni.showLoading({
|
||||
title: "修改中...",
|
||||
mask: true,
|
||||
});
|
||||
if (this.useravatar == this.userinfo) {
|
||||
request({
|
||||
url: "user/updateUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
headerIcon: this.userinfo.split("/").pop(),
|
||||
nickName: this.name,
|
||||
},
|
||||
userInfo: true,
|
||||
}).then((ress) => {
|
||||
if (ress.code === 200) {
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success",
|
||||
});
|
||||
uni.setStorageSync("userinfo", ress.data.info);
|
||||
goEasylogin(this.$goeasy,String(ress.data.info.id),ress.data.info.headerIcon,ress.data.info.nickName);
|
||||
uni.hideLoading();
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "修改失败",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
postFile({
|
||||
path: this.userinfo,
|
||||
name: generateFileName(),
|
||||
@@ -109,14 +223,19 @@ export default {
|
||||
},
|
||||
userInfo: true,
|
||||
}).then((ress) => {
|
||||
console.log("修改调用返回",ress);
|
||||
console.log("修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success",
|
||||
});
|
||||
uni.setStorageSync("userinfo", ress.data.info);
|
||||
goEasylogin(this.$goeasy,String(ress.data.info.id),ress.data.info.headerIcon,ress.data.info.nickName);
|
||||
goEasylogin(
|
||||
this.$goeasy,
|
||||
String(ress.data.info.id),
|
||||
ress.data.info.headerIcon,
|
||||
ress.data.info.nickName
|
||||
);
|
||||
uni.hideLoading();
|
||||
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
|
||||
uni.navigateBack({
|
||||
@@ -124,53 +243,139 @@ export default {
|
||||
});
|
||||
//````````````````````````````````````````````````````````````````````
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "修改失败",
|
||||
title: ress.msg,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('上传失败', err);
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "上传失败",
|
||||
icon: "none",
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
.bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.bgImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.Return {
|
||||
position: fixed;
|
||||
left: 35rpx;
|
||||
top: 120rpx;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.title {
|
||||
position: fixed;
|
||||
top: 120rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: bold;
|
||||
z-index: 1;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.contentbox {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);
|
||||
}
|
||||
.avatarmodify {
|
||||
width: 94%;
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
padding-left: 3%;
|
||||
padding-right: 3%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.avatarmodify-item {
|
||||
font-size: 24rpx;
|
||||
color: #100e0f;
|
||||
line-height: 100rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.avatarmodify-img {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.login-btn {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
padding: 0px;
|
||||
margin-bottom: 60rpx;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
background-color: #fff;
|
||||
border-radius: 0rpx;
|
||||
display: flex;
|
||||
}
|
||||
.login-btn::after {
|
||||
border: none;
|
||||
border-radius: 0rpx;
|
||||
}
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.weui-input {
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
.more {
|
||||
width: 15rpx;
|
||||
height: 30rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.weui-btn {
|
||||
width: 40%;
|
||||
margin-top: 20rpx;
|
||||
background-color: #11cb2a00;
|
||||
color: #fff;
|
||||
.Nickname {
|
||||
width: 94%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-left: 3%;
|
||||
padding-right: 3%;
|
||||
background-color: #fff;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.NicknameInput {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.NicknameInput-name {
|
||||
font-size: 24rpx;
|
||||
color: #bdbdbd;
|
||||
line-height: 100rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
100
pages/Setting/settingmod/changeEmail.vue
Normal file
100
pages/Setting/settingmod/changeEmail.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<view class="changeEmail">
|
||||
<view class="bg">
|
||||
<image
|
||||
class="bgImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="Return" @click="onBack">
|
||||
<image
|
||||
class="ReturnImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="title">邮箱</view>
|
||||
<view class="contentbox">
|
||||
<view class="content">
|
||||
<!-- -->
|
||||
|
||||
|
||||
<!-- -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello",
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// 页面加载时执行
|
||||
},
|
||||
methods: {
|
||||
// 返回上一页
|
||||
onBack() {
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.bgImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.Return {
|
||||
position: fixed;
|
||||
left: 35rpx;
|
||||
top: 120rpx;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.title {
|
||||
position: fixed;
|
||||
top: 120rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: bold;
|
||||
z-index: 1;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.contentbox {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
186
pages/Setting/settingmod/changeNickname.vue
Normal file
186
pages/Setting/settingmod/changeNickname.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<view class="changeNickname">
|
||||
<view class="bg">
|
||||
<image
|
||||
class="bgImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="Return" @click="onBack">
|
||||
<image
|
||||
class="ReturnImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="title">修改昵称</view>
|
||||
<view class="contentbox">
|
||||
<view class="content">
|
||||
<!-- -->
|
||||
<input
|
||||
type="nickname"
|
||||
class="weui-input"
|
||||
placeholder="请输入昵称"
|
||||
@blur="inputName"
|
||||
v-model="name"
|
||||
/>
|
||||
<!-- -->
|
||||
<view class="btn" @click="onSubmit">确认修改</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { goEasylogin, goEasylogout } from "../../../components/goEasyTool/tool.js";
|
||||
import request from "../../../components/request.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name: "",
|
||||
id: "",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
// 页面加载时执行
|
||||
this.name = options.name;
|
||||
this.id = options.id;
|
||||
},
|
||||
methods: {
|
||||
// 提交修改
|
||||
onSubmit() {
|
||||
if (this.name.trim() === "") {
|
||||
wx.showToast({
|
||||
title: "昵称不能为空",
|
||||
icon: "none",
|
||||
duration: 1000,
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "修改中...",
|
||||
mask: true,
|
||||
});
|
||||
goEasylogout(this.$goeasy);
|
||||
request({
|
||||
url: "user/updateUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
nickName: this.name,
|
||||
},
|
||||
userInfo: true,
|
||||
}).then((ress) => {
|
||||
console.log("修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success",
|
||||
});
|
||||
uni.setStorageSync("userinfo", ress.data);
|
||||
goEasylogin(
|
||||
this.$goeasy,
|
||||
String(ress.data.id),
|
||||
ress.data.headerIcon,
|
||||
ress.data.nickName
|
||||
);
|
||||
uni.hideLoading();
|
||||
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
//````````````````````````````````````````````````````````````````````
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: ress.msg,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 输入昵称
|
||||
inputName(e) {
|
||||
this.name = e.detail.value;
|
||||
},
|
||||
// 返回上一页
|
||||
onBack() {
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.bgImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.Return {
|
||||
position: fixed;
|
||||
left: 35rpx;
|
||||
top: 120rpx;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.title {
|
||||
position: fixed;
|
||||
top: 120rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: bold;
|
||||
z-index: 1;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.contentbox {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.weui-input {
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
margin-top: 40rpx;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.btn {
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
margin-top: 50rpx;
|
||||
background-color: #00b4ff;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
100
pages/Setting/settingmod/changePassword.vue
Normal file
100
pages/Setting/settingmod/changePassword.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<view class="change-password">
|
||||
<view class="bg">
|
||||
<image
|
||||
class="bgImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="Return" @click="onBack">
|
||||
<image
|
||||
class="ReturnImg"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="title">修改密码</view>
|
||||
<view class="contentbox">
|
||||
<view class="content">
|
||||
<!-- -->
|
||||
|
||||
<!-- -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello",
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// 页面加载时执行
|
||||
},
|
||||
methods: {
|
||||
// 返回上一页
|
||||
onBack() {
|
||||
console.log(1);
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.bgImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.Return {
|
||||
position: fixed;
|
||||
left: 35rpx;
|
||||
top: 120rpx;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.title {
|
||||
position: fixed;
|
||||
top: 120rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: bold;
|
||||
z-index: 1;
|
||||
}
|
||||
.ReturnImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.contentbox {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -111,6 +111,7 @@ export default {
|
||||
icon: "success",
|
||||
});
|
||||
uni.setStorageSync("userinfo", res.data.info);
|
||||
uni.setStorageSync("token", res.data.info.token);
|
||||
goEasylogin(this.$goeasy,String(res.data.info.id),this.picture,this.name);
|
||||
counter.$patch({ myitem: res.data.info });
|
||||
uni.hideLoading();
|
||||
|
||||
@@ -357,11 +357,11 @@ export default {
|
||||
icon: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Album.png",
|
||||
type: "Album",
|
||||
},
|
||||
{
|
||||
name: "视频",
|
||||
icon: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Video.png",
|
||||
type: "Video",
|
||||
},
|
||||
// {
|
||||
// name: "视频",
|
||||
// icon: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Video.png",
|
||||
// type: "Video",
|
||||
// },
|
||||
{
|
||||
name: "邀请",
|
||||
icon: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chat_invite.png",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="return" @click="Return">
|
||||
<image
|
||||
style="width:40rpx;height:40rpx;"
|
||||
style="width: 40rpx; height: 40rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
@@ -18,11 +18,11 @@
|
||||
<script>
|
||||
import request from "../../components/request.js";
|
||||
import { goEasylogin } from "../../components/goEasyTool/tool.js";
|
||||
import { useCounterStore } from '@/stores/counter'
|
||||
import { useCounterStore } from "@/stores/counter";
|
||||
|
||||
const counter = useCounterStore()
|
||||
const counter = useCounterStore();
|
||||
export default {
|
||||
inject: ['$global'],
|
||||
inject: ["$global"],
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
@@ -42,14 +42,14 @@ export default {
|
||||
uni.getStorage({
|
||||
key: "lastPage",
|
||||
success: (res) => {
|
||||
this.lastPage = "/"+res.data;
|
||||
this.lastPage = "/" + res.data;
|
||||
},
|
||||
fail: () => {
|
||||
this.lastPage = "/pages/Home/Home";
|
||||
},
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
// 返回首页
|
||||
Return() {
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 获取手机号
|
||||
async getPhoneNumber(e) {
|
||||
getPhoneNumber(e) {
|
||||
if (e.detail.code == undefined) {
|
||||
uni.showToast({
|
||||
title: "登录失败",
|
||||
@@ -70,40 +70,51 @@ export default {
|
||||
title: "登录中...",
|
||||
mask: true,
|
||||
});
|
||||
const res = await request({
|
||||
url: "user/loginWithPhoneNumber",
|
||||
method: "POST",
|
||||
data: {
|
||||
code: e.detail.code,
|
||||
},
|
||||
userInfo: false,
|
||||
});
|
||||
this.info = res;
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
const now = Date.now();
|
||||
uni.setStorageSync("last_clean_time", now);
|
||||
counter.$patch({ myitem:this.info.data.info })
|
||||
if (this.info.code === 200) {
|
||||
if (this.info.data.newAccount) {
|
||||
uni.reLaunch({
|
||||
url: "/pages/UserInformation/UserInformation",
|
||||
});
|
||||
uni.hideLoading();
|
||||
request({
|
||||
url: "user/loginWithPhoneNumber",
|
||||
method: "POST",
|
||||
data: {
|
||||
code: e.detail.code,
|
||||
},
|
||||
userInfo: false,
|
||||
}).then((res) => {
|
||||
uni.hideLoading();
|
||||
this.info = res;
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
const now = Date.now();
|
||||
uni.setStorageSync("last_clean_time", now);
|
||||
counter.$patch({ myitem: this.info.data.info });
|
||||
if (this.info.code === 200) {
|
||||
if (this.info.data.newAccount) {
|
||||
uni.reLaunch({
|
||||
url: "/pages/UserInformation/UserInformation",
|
||||
});
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
uni.setStorageSync("token", res.data.info.token);
|
||||
goEasylogin(
|
||||
this.$goeasy,
|
||||
String(this.info.data.info.id),
|
||||
this.info.data.info.headerIcon,
|
||||
this.info.data.info.nickName
|
||||
);
|
||||
uni.hideLoading();
|
||||
//跳转原来页面否则首页
|
||||
uni.reLaunch({
|
||||
url: this.lastPage,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
goEasylogin(this.$goeasy,String(this.info.data.info.id),this.info.data.info.headerIcon,this.info.data.info.nickName);
|
||||
uni.hideLoading();
|
||||
//跳转原来页面否则首页
|
||||
uni.reLaunch({
|
||||
url: this.lastPage,
|
||||
});
|
||||
uni.showToast({
|
||||
title: "登录失败",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "登录失败",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -146,7 +157,7 @@ export default {
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.return{
|
||||
.return {
|
||||
position: fixed;
|
||||
top: 100rpx;
|
||||
left: 80rpx;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</view>
|
||||
<view class="nation">{{ item.country }}</view>
|
||||
</view>
|
||||
<view class="Time">PK时间:{{ formatDate(item.pkTime) }}</view>
|
||||
<view class="Time">PK时间(北京时间):{{ formatDate(item.pkTime) }}</view>
|
||||
<view class="SessionAndGoldCoin">
|
||||
<view class="goldCoin">
|
||||
<image
|
||||
@@ -82,12 +82,12 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="buttonflex">
|
||||
<view class="button" v-if="item.senderId !== id">
|
||||
<button class="accept" @click="openChat()">聊了个天</button>
|
||||
<button class="reject" @click="open()">立即邀请</button>
|
||||
<view class="button" v-if="item.senderId !== id">
|
||||
<button class="accept" @click="openChat()">聊了个天</button>
|
||||
<button class="reject" @click="open()">立即邀请</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹窗 -->
|
||||
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
|
||||
@@ -119,7 +119,7 @@
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view>{{ TimeFormatting(item.pkTime*1000) }}</view>
|
||||
<view>{{ TimeFormatting(item.pkTime * 1000) }}</view>
|
||||
<view class="goldimg">
|
||||
<image
|
||||
style="width: 31.49rpx; height: 31.49rpx; margin-top: 4rpx"
|
||||
@@ -163,6 +163,7 @@ import formatDate from "../../components/formatDate.js";
|
||||
import TimeFormatting from "../../components/TimeFormatting.js";
|
||||
import NewAddedPk from "../../pages/NewAddedPk/NewAddedPk.vue";
|
||||
import request from "../../components/request.js";
|
||||
import VerifyLogin from "../../components/VerifyLogin.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -179,15 +180,19 @@ export default {
|
||||
};
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
if (res.from === 'menu') {
|
||||
if (res.from === "menu") {
|
||||
return {
|
||||
title: '分享',
|
||||
path: `${getCurrentPages()[getCurrentPages().length - 1].route}?inid=${this.item.id}`,
|
||||
}
|
||||
title: "分享",
|
||||
path: `${getCurrentPages()[getCurrentPages().length - 1].route}?inid=${
|
||||
this.item.id
|
||||
}`,
|
||||
};
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.inid = options.inid;
|
||||
console.log(this.inid);
|
||||
|
||||
if (this.inid) {
|
||||
this.GetonShareAppMessagedata();
|
||||
}
|
||||
@@ -203,7 +208,7 @@ export default {
|
||||
data: {
|
||||
id: data.item.senderId,
|
||||
},
|
||||
userInfo: true,
|
||||
userInfo: false,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.chatPartnerinfo = res.data;
|
||||
@@ -227,7 +232,7 @@ export default {
|
||||
methods: {
|
||||
//分享直接获取数据
|
||||
GetonShareAppMessagedata() {
|
||||
request({
|
||||
request({
|
||||
url: "pk/pkInfoDetail",
|
||||
method: "POST",
|
||||
data: {
|
||||
@@ -247,7 +252,6 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
//修改信息
|
||||
// onRecompose(item) {
|
||||
@@ -272,14 +276,16 @@ export default {
|
||||
delta: 1,
|
||||
fail: () => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/Home/Home',
|
||||
url: "/pages/Home/Home",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
open() {
|
||||
this.$refs.popup.open("center");
|
||||
this.userlist();
|
||||
VerifyLogin(this.item.id).then((res) => {
|
||||
this.$refs.popup.open("center");
|
||||
this.userlist();
|
||||
});
|
||||
},
|
||||
invite() {
|
||||
if (this.InvitingPartyEventindex === null) {
|
||||
@@ -292,12 +298,12 @@ export default {
|
||||
}
|
||||
this.$refs.popups.open("center");
|
||||
},
|
||||
closeHint(){
|
||||
closeHint() {
|
||||
this.$refs.popups.close();
|
||||
},
|
||||
inviteHint(){
|
||||
inviteHint() {
|
||||
this.$refs.popups.close();
|
||||
// 发送邀请消息
|
||||
// 发送邀请消息
|
||||
const myitem = JSON.stringify(this.list[this.InvitingPartyEventindex]);
|
||||
const youritem = JSON.stringify(this.item);
|
||||
uni.redirectTo({
|
||||
@@ -309,8 +315,10 @@ export default {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
openChat() {
|
||||
wx.navigateTo({
|
||||
url: `/pages/index/chat/chat?userId=${this.chatPartnerinfo.id}&nickname=${this.chatPartnerinfo.nickName}&avatar=${this.chatPartnerinfo.headerIcon}`,
|
||||
VerifyLogin(this.item.id).then((res) => {
|
||||
wx.navigateTo({
|
||||
url: `/pages/index/chat/chat?userId=${this.chatPartnerinfo.id}&nickname=${this.chatPartnerinfo.nickName}&avatar=${this.chatPartnerinfo.headerIcon}`,
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -371,7 +379,7 @@ export default {
|
||||
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);
|
||||
background-position: center;
|
||||
}
|
||||
.popup-Hintcontent{
|
||||
.popup-Hintcontent {
|
||||
width: 600rpx;
|
||||
height: 500rpx;
|
||||
background-repeat: no-repeat;
|
||||
@@ -433,7 +441,7 @@ export default {
|
||||
font-weight: bold;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.popup-texts{
|
||||
.popup-texts {
|
||||
margin-left: 50rpx;
|
||||
color: #7e7e7e;
|
||||
font-size: 26rpx;
|
||||
@@ -670,7 +678,7 @@ export default {
|
||||
margin-top: 60rpx;
|
||||
width: 90%;
|
||||
}
|
||||
.Remarkscroll{
|
||||
.Remarkscroll {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
}
|
||||
@@ -680,14 +688,14 @@ export default {
|
||||
color: transparent;
|
||||
display: none;
|
||||
}
|
||||
.Remarkscss{
|
||||
.Remarkscss {
|
||||
padding: 20rpx;
|
||||
word-break: break-all; /* 强制换行 */
|
||||
white-space: pre-line; /* 保留空白符并换行 */
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.buttonflex{
|
||||
.buttonflex {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
Reference in New Issue
Block a user