first commit

This commit is contained in:
GYJ
2024-12-02 10:39:36 +08:00
commit f1f5b666b5
464 changed files with 81372 additions and 0 deletions

203
me/setting/bind.vue Normal file
View File

@@ -0,0 +1,203 @@
<template>
<view class="container">
<view class="cu-form-group"
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<view class="title">手机号</view>
<input type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
</view>
<view class="cu-form-group"
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<text class="title">验证码</text>
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange"
@confirm="toLogin" />
<button class="send-msg" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
</view>
<button class="confirm-btn" @click="toLogin" :disabled="logining">立即换绑
</button>
</view>
</view>
</template>
<script>
// import listCell from '@/components/com-input';
export default {
components: {
// listCell
},
data() {
return {
mobile: '',
code: '',
logining: false,
sending: false,
sendTime: '获取验证码',
count: 60,
}
},
methods: {
inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
uni.navigateBack();
},
countDown() {
const {
count
} = this;
if (count === 1) {
this.count = 60;
this.sending = false;
this.sendTime = '获取验证码'
} else {
this.count = count - 1;
this.sending = true;
this.sendTime = count - 1 + '秒后重新获取';
setTimeout(this.countDown.bind(this), 1000);
}
},
sendMsg() {
const {
mobile
} = this;
if (!mobile) {
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 1000
})
} else if (mobile.length !== 11) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 1000
})
} else {
uni.showLoading({
title: '正在发送验证码...'
})
this.$u.get('/app/Login/sendMsg/' + mobile + '/login').then(res => {
if (res.code === 0) {
this.sending = true;
uni.showToast({
title: '验证码发送成功请注意查收',
icon: 'none',
duration: 1000
})
this.countDown();
uni.hideLoading();
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg ? res.msg : '请一分钟后再获取验证码'
});
}
});
}
},
toLogin() {
const {
mobile,
code,
} = this;
if (!mobile) {
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 1000
})
} else if (code.length == 0) {
uni.showToast({
title: '请输入验证码',
icon: 'none',
duration: 1000
})
} else {
this.logining = true;
uni.showLoading({
title: '更换中...'
})
this.$u.post('/app/user/updatePhone?phone=' + mobile + '&msg=' + code).then(res => {
if (res.code === 0) {
// this.$queue.remove('invitation');
// uni.setStorageSync('token', res.token)
// uni.setStorageSync('userId', res.userId)
// uni.setStorageSync('mobile', res.mobile)
uni.showToast({
title: '更换成功',
icon: 'none'
})
setTimeout(function() {
uni.navigateBack()
}, 1000)
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '更换失败',
content: res.msg
});
}
});
}
},
},
}
</script>
<style lang='scss'>
page {
background: #ffffff;
}
.send-msg {
border-radius: 30px;
color: white;
height: 30px;
font-size: 14px;
line-height: 30px;
background: #ff7581;
}
.container {
top: 0;
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.wrapper {
position: relative;
z-index: 90;
background: #ffffff;
padding-bottom: 20px;
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70px;
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
</style>

91
me/setting/index.vue Normal file
View File

@@ -0,0 +1,91 @@
<template>
<view class="">
<view class="flex justify-between padding bg-white solid-bottom" @click="goNav('/me/setting/bind')">
<view>修改手机号</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
<view class="flex justify-between padding bg-white solid-bottom"
@click="goNav('/me/feedbackIndex/feedbackIndex')">
<view>帮助中心</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
<view class="flex justify-between padding bg-white solid-bottom" @click="goNav('/me/feedback/index')">
<view>意见反馈</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
<view class="flex justify-between padding bg-white solid-bottom" @click="goNav('/me/setting/xieyi')">
<view>用户协议</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
<view class="flex justify-between padding bg-white solid-bottom" @click="goNav('/me/setting/mimi')">
<view>隐私协议</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
<view class="flex justify-between padding bg-white solid-bottom" @click="goNav('/me/setting/logOff')">
<view>注销账号</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
<view class="flex justify-between padding bg-white solid-bottom" @click="loginOut">
<view>退出登录</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
goNav(e) {
uni.navigateTo({
url: e
})
},
// 退出登录
loginOut() {
uni.showModal({
title: '退出提醒',
content: '确定要退出登录么',
confirmColor: '#ff7581',
success: e => {
if (e.confirm) {
this.avatar = '/static/images/logo.png';
this.userName = '';
// this.isLogin = false
// 清除本地数据
uni.removeStorageSync('token')
uni.removeStorageSync('userName')
uni.removeStorageSync('avatar')
uni.removeStorageSync('phone')
uni.removeStorageSync('invitationCode')
uni.removeStorageSync('sex')
uni.removeStorageSync('userId')
uni.removeStorageSync('openId')
uni.removeStorageSync('zhiFuBao')
uni.removeStorageSync('zhiFuBaoName')
uni.removeStorageSync('isVIP')
uni.showToast({
icon: 'none',
title: '退出登录成功'
})
setTimeout(function() {
uni.navigateBack()
}, 1500)
}
}
});
}
}
}
</script>
<style>
</style>

123
me/setting/kefu.vue Normal file
View File

@@ -0,0 +1,123 @@
<template>
<view style="height: 100vh;margin: 32upx;">
<view style="text-align: center;background: #FFFFFF;padding: 40upx;border-radius: 32upx;">
<view style="font-size: 38upx;">添加客服微信咨询</view>
<!-- <view style="font-size: 32upx;margin-top: 32upx;">微信号{{weixin}}</view>
<view @click="copyHref"
style="background: #ff7581;width:200upx;margin-top: 32upx;font-size: 30upx;margin-left: 36%;color: #FFFFFF;padding: 4upx 20upx;border-radius: 24upx;">
一键复制</view> -->
<image @click="saveImg" mode="aspectFit" style="margin-top: 32upx" :src="image"></image>
<view style="font-size: 28upx;margin-top: 32upx" v-if="isWeiXin">{{ isWeiXin ? '长按识别上方二维码' : '' }}</view>
<!-- <view @click="goChat"
style="width:260upx;margin-top: 32upx;font-size: 30upx;margin-left: 28%;color: #557EFD;padding: 4upx 20upx;border-radius: 24upx;">
联系在线客服</view> -->
<!-- <view v-if="isWeiXin" style="font-size: 24upx;margin-top: 80upx" @click="rests">无法识别</view> -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
image: '',
isWeiXin: false,
weixin: '',
webviewStyles: {
progress: {
color: '#1A1929 '
}
}
};
},
onLoad() {
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
this.isWeiXin = true;
}
// #endif
//客服二维码
this.$u.get('/app/common/type/205').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.image = res.data.value;
}
}
});
// 客服微信号 /
this.$u.get('/app/common/type/207').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.weixin = res.data.value;
}
}
});
},
onPullDownRefresh: function() {
uni.stopPullDownRefresh(); // 停止刷新
},
methods: {
//邀请码复制
copyHref() {
uni.setClipboardData({
data: this.weixin,
success: r => {
this.$queue.showToast('复制成功');
}
});
},
saveImg() {
let that = this;
let imgArr = []
imgArr.push(that.image);
//预览图片
uni.previewImage({
urls: imgArr,
current: imgArr[0]
});
// uni.saveImageToPhotosAlbum({
// filePath: that.image,
// success(res) {
// that.$queue.showToast('保存成功');
// }
// });
},
rests() {
uni.showToast({
title: '已刷新请再次长按识别',
mask: false,
duration: 1500,
icon: 'none'
});
window.location.reload();
},
// 在线客服
goChat() {
let token = this.$queue.getData('token');
if (token) {
uni.navigateTo({
url: '/my/setting/chat'
});
} else {
this.goLoginInfo();
}
},
//统一登录跳转
goLoginInfo() {
uni.navigateTo({
url: '/pages/public/loginphone'
});
},
}
};
</script>
<style>
/* @import '../../static/css/index.css'; */
page {
background: #F5F5F5;
}
</style>

181
me/setting/logOff.vue Normal file
View File

@@ -0,0 +1,181 @@
<template>
<view>
<view class="icon flex align-center justify-center">
<u-icon name="info-circle-fill" color="#ff7581" size="100"></u-icon>
</view>
<view class="title">
注销短剧服务
</view>
<view class="shuoming">
短剧服务帐号注销后您将放弃以下权益且无法找回
</view>
<view class="list flex align-center justify-center">
<view class="list-box">
<view class="list-box-item">
·<text style="margin-left: 10rpx;">您将无法通过该帐号登录使用短剧平台</text>
</view>
<view class="list-box-item">
·<text style="margin-left: 10rpx;">您将无法访问帐号的个人信息包括帐号名称昵称头像等</text>
</view>
<view class="list-box-item">
·<text style="margin-left: 10rpx;">您帐号的所有权益将视为主动放弃</text>
</view>
</view>
</view>
<view class="tishi">
点击确认注销即代表您已同意<text @click="goXieOff()">用户注销协议</text>
</view>
<view class="submit flex align-center justify-center">
<view class="submit-box flex align-center justify-center" @click="submit()">
确认注销
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
methods: {
//用户注销协议
goXieOff() {
uni.navigateTo({
url: '/me/setting/offXieyi'
})
},
//确认注销
submit() {
let that = this
uni.showModal({
title: '提示',
content: '确认注销后,您将退出登录,并清除所有数据!',
cancelText: '我再想想',
confirmText: '确认注销',
confirmColor: '#ff7581',
complete(ret) {
if (ret.confirm) {
let data = {
state: 3,
content: '我要注销账号',
userId: uni.getStorageSync('userId')
}
that.$Request.postJson('/app/message/insertMessage', data).then(res => {
if (res.code == 0) {
uni.showModal({
title: '提示',
content: '操作成功',
showCancel: false,
confirmText: '确认',
confirmColor: '#fd6416'
})
that.loginOut()
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
}
}
})
},
// 退出登录
loginOut() {
this.avatar = '/static/images/logo.png';
this.userName = '';
// this.isLogin = false
// 清除本地数据
uni.removeStorageSync('token')
uni.removeStorageSync('userName')
uni.removeStorageSync('avatar')
uni.removeStorageSync('phone')
uni.removeStorageSync('invitationCode')
uni.removeStorageSync('sex')
uni.removeStorageSync('userId')
uni.removeStorageSync('openId')
uni.removeStorageSync('zhiFuBao')
uni.removeStorageSync('zhiFuBaoName')
uni.removeStorageSync('isVIP')
setTimeout(function() {
uni.switchTab({
url: '/pages/me/index'
})
}, 1500)
}
},
}
</script>
<style lang="scss">
.icon {
width: 100%;
padding-top: 100rpx;
}
.title {
width: 100%;
text-align: center;
margin-top: 20rpx;
font-weight: bold;
font-size: 40rpx;
}
.shuoming {
font-size: 16rpx;
color: #333333;
margin-top: 20rpx;
text-align: center;
}
.list {
width: 100%;
// height: 100rpx;
margin-top: 20rpx;
.list-box {
padding: 20rpx;
width: 686rpx;
height: 100%;
border-radius: 24rpx;
background: #ffffff;
.list-box-item {
margin-top: 10rpx;
font-size: 16rpx;
color: #333333;
}
}
}
.tishi {
width: 100%;
text-align: center;
color: #999999;
margin-top: 40rpx;
font-size: 18rpx;
text {
color: #ff7581;
}
}
.submit {
width: 100%;
height: 88rpx;
margin-top: 60rpx;
.submit-box {
width: 686rpx;
height: 88rpx;
border-radius: 16rpx;
color: #ffffff;
background-color: #ff7581;
}
}
</style>

31
me/setting/mimi.vue Normal file
View File

@@ -0,0 +1,31 @@
<template>
<view style="font-size: 14px;line-height: 26px;padding: 32upx;" class="home1">
<view style="font-size: 28upx;" v-html="content"></view>
</view>
</template>
<script>
export default {
data() {
return {
content:''
}
},
onLoad() {
this.getGuize();
},
methods: {
getGuize(){
this.$u.get('app/common/type/155').then(res => {
this.content = res.data.value
});
}
}
}
</script>
<style>
page {
/* background: #1c1b20; */
}
</style>

32
me/setting/offXieyi.vue Normal file
View File

@@ -0,0 +1,32 @@
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1">
<view style="font-size: 28upx;" v-html="content"></view>
</view>
</template>
<script>
export default {
data() {
return {
content:''
}
},
onLoad() {
this.getGuize();
},
methods: {
getGuize(){
this.$u.get('app/common/type/246').then(res => {
this.content = res.data.value
});
}
}
}
</script>
<style>
page{
/* background: #1c1b20; */
}
</style>

31
me/setting/payXieYi.vue Normal file
View File

@@ -0,0 +1,31 @@
<template>
<view style="font-size: 14px;line-height: 26px;padding: 32upx;" class="home1">
<view style="font-size: 28upx;" v-html="content"></view>
</view>
</template>
<script>
export default {
data() {
return {
content: ''
}
},
onLoad() {
this.getGuize();
},
methods: {
getGuize() {
this.$u.get('app/common/type/500').then(res => {
this.content = res.data.value
});
}
}
}
</script>
<style>
page {
/* background: #1c1b20; */
}
</style>

37
me/setting/xieyi.vue Normal file
View File

@@ -0,0 +1,37 @@
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1">
<view style="font-size: 28upx;" v-html="content"></view>
</view>
</template>
<script>
export default {
data() {
return {
content:''
}
},
onLoad() {
this.getGuize();
},
methods: {
getGuize(){
// this.$Request.getT('/agreement/find?id=1').then(res =>{
// if(res.status === 0){
// this.content = res.data.content;
// }
// });
this.$u.get('app/common/type/154').then(res => {
this.content = res.data.value
});
}
}
}
</script>
<style>
page{
/* background: #1c1b20; */
}
</style>