no message

This commit is contained in:
2025-09-03 13:12:44 +08:00
parent 573369817e
commit c2ba5048b0
16 changed files with 1370 additions and 202 deletions
+6
View File
@@ -123,9 +123,15 @@
.text-28{
font-size:28rpx;
}
.text-32{
font-size:32rpx;
}
.text-36{
font-size:36rpx;
}
.text-38{
font-size:38rpx;
}
.text-bold{
font-weight:bold;
}
+35
View File
@@ -37,6 +37,23 @@ export function forgotPassword(params) {
url: "/user/forgotPassword",
method: "post",
data: params,
cha:1
});
}
export function uploadAvatar(params) {
// params.appId = APPID;
return request({
url: "/user/uploadAvatar",
method: "post",
data: params,
});
}
export function updateName(params) {
// params.appId = APPID;
return request({
url: "/user/updateName",
method: "post",
data: params,
});
}
@@ -63,6 +80,15 @@ export function getUserInfo(params) {
data: params,
});
}
export function deleteAccount(params) {
// params.appId = APPID;
return request({
url: "/user/deleteAccount",
method: "post",
data: params,
cha:1
});
}
/**
* 实名认证
@@ -88,6 +114,15 @@ export function resetTradePw(params) {
data: params,
});
}
export function forgotPayPassword(params) {
// params.appId = APPID;
return request({
url: "/user/forgotPayPassword",
method: "post",
data: params,
cha:1
});
}
/**
* 获取短信验证码
+67
View File
@@ -0,0 +1,67 @@
<template>
<view class="my-btn" @click.stop="onClick"
:style="{
'border-radius':br,'min-height':mh,'background-color':bg,width:wd
}">
<text :style="{
color:color,'font-size':fz,'font-weight':fw
}">{{text}}</text>
</view>
</template>
<script>
export default {
props:{
text:{
type:String,
default:'确认'
},
wd:{
type:String,
default:'100%'
},
mh:{
type:String,
default:'88rpx'
},
bg:{
type:String,
default:'#7934F6'
},
br:{
type:String,
default:'16rpx'
},
color:{
type:String,
default:'#fff'
},
fz:{
type:String,
default:'32rpx'
},
fw:{
type:String,
default:'500'
}
},
mounted(){
},
methods: {
onClick(){
this.$emit('ok');
}
}
}
</script>
<style lang="scss" scoped>
.my-btn{
width:100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>
+4 -3
View File
@@ -51,9 +51,10 @@
}
const leftPathType = this.leftPathType;
if(leftPathType === "navigateTo"){
uni.navigateTo({
url:leftPath,
})
// uni.navigateTo({
// url:leftPath,
// })
uni.navigateBack();
}else if(leftPathType === "switchTab"){
uni.switchTab({
url: leftPath,
+1 -16
View File
@@ -139,20 +139,5 @@
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3",
"h5": {
"devServer": {
"disableHostCheck": true, // 禁止访问本地host文件
"port": 8085, // 修改项目端口
"proxy": {
"/api": { // 配置服务器路径
"target": "http://api.outer.tbmall.xin:6880", // 目标服务器
"changeOrigin": true, // 重写路径
"pathRewrite": {
"^/api": "" // 将/api替换为空
}
}
}
}
}
"vueVersion" : "3"
}
+49 -5
View File
@@ -258,6 +258,55 @@
"navigationStyle": "default" // 默认样式,会显示返回图标
}
},
{
"path": "setting/setting",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "setting/out-agreement",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "setting/out-code",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "setting/set-name",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "setting/account-out",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "setting/forgot-pass",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "setting/account-safe",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black"
}
},
{
"path": "dongjian/index",
"style": {
@@ -339,11 +388,6 @@
"style": {
"navigationStyle": "custom"
}
}, {
"path": "login/forgotPass",
"style": {
"navigationStyle": "custom"
}
}, {
"path": "register/register",
"style": {
-174
View File
@@ -1,174 +0,0 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="忘记密码" />
<view class="contract-view">
<view class="input-view">
<up-input placeholder="请输入手机号" border="surround" v-model="form.mobile" :customStyle="inputCss"></up-input>
</view>
<view class="input-view">
<up-input placeholder="请输入验证码" border="surround" v-model="form.smsCode" :customStyle="inputCss">
<template #suffix style="margin-right: 10rpx;">
<view v-if="countdown" class="code-warp">
<up-count-down :time="60 * 1000" format="ss" @finish="countdown = false"></up-count-down>
<text style="margin-left: 10rpx;">s</text>
</view>
<view v-else @click="getMobileCode" class="code_msg">
获取验证码
</view>
</template>
</up-input>
</view>
<view class="input-view">
<up-input placeholder="请输入登录密码" border="surround" v-model="form.pass" :customStyle="inputCss"
:type="loginPasswordIsShow ? 'text' : 'password'">
<template #suffix style="margin-right: 10rpx;">
<up-image v-if="loginPasswordIsShow" src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"
@click="loginPasswordIsShow = false;"></up-image>
<up-image v-else src="/static/login/hidden.png" width="20" height="20" bgColor="#f1f6ff00"
@click="loginPasswordIsShow = true;"></up-image>
</template>
</up-input>
</view>
<view class="input-view">
<up-input placeholder="请输入登录密码" border="surround" v-model="form.passOne" :customStyle="inputCss"
:type="loginPassword2IsShow ? 'text' : 'password'">
<template #suffix style="margin-right: 10rpx;">
<up-image v-if="loginPassword2IsShow" src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"
@click="loginPassword2IsShow = false;"></up-image>
<up-image v-else src="/static/login/hidden.png" width="20" height="20" bgColor="#f1f6ff00"
@click="loginPassword2IsShow = true;"></up-image>
</template>
</up-input>
</view>
<view class="login_comm_but login_comm_but_yes" style="margin-top:48rpx" @click="registerFun" >
确认修改
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getUserList } from '@/api/common.js';
import { forgotPassword } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import CryptoJS from 'crypto-js';
export default {
components: { Header, TopSafe },
data() {
return {
form:{
mobile:'',
smsCode:'',
pass:'',
passOne:''
},
loginPasswordIsShow:false,
loginPassword2IsShow:false,
countdown: false,// 清空倒计时
inputCss: {
"height": '80rpx',
"background": "#F3F3F3FF",
"border-radius": "30rpx",
"border": "0rpx",
"padding-left": "16px",
},
};
},
onShow() {
},
onLoad() {
},
methods: {
async getMobileCode() {
const form = this.form;
if (!form.mobile) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入手机号码",
});
return;
}
this.countdown = true;
const params = {
mobile: form.mobile,
type: 'passwd',
}
const response = await getUserList(params);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: response.msg,
});
} else {
this.countdown = false;
}
},
registerFun(){
if (!this.form.mobile) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入手机号码",
});
return;
}
if (!this.form.smsCode) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入验证码",
});
return;
}
if (!this.form.pass || !this.form.passOne) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入密码",
});
return;
}
if (this.form.pass !== this.form.passOne) {
this.$refs.uToastRef.show({
type: 'error',
message: "两次输入的登录密码不一致",
});
return;
}
let params = {
verificationCode:this.form.smsCode,
newPassword:CryptoJS.MD5(this.form.pass).toString()
}
forgotPassword(params).then(res=>{
console.log('params',res)
})
},
}
}
</script>
<style lang="scss" scoped>
.contract-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
background-color: #fff;
.input-view{
width:100%;
height:100rpx;
background-color: #f3f3f3;
border-radius: 16rpx;
margin-top:48rpx;
}
}
</style>
+2 -2
View File
@@ -46,7 +46,7 @@
<view class="cut_way_warp">
<view v-if="loginWay === 'password'" @click="loginWay = 'code'">验证码登录</view>
<view v-if="loginWay === 'code'" @click="loginWay = 'password'">密码登录登录</view>
<!-- <view @click="jumpForgot">忘记密码</view> -->
<view @click="jumpForgot">忘记密码</view>
<view @click="jumpRegister">注册</view>
</view>
</view>
@@ -196,7 +196,7 @@ export default {
},
jumpForgot(){
uni.navigateTo({
url: "/pages/login_package/login/forgotPass",
url: "/pages/rwa_package/setting/forgot-pass?type=3",
})
},
jumpRegister() {
+1 -2
View File
@@ -443,10 +443,9 @@ export default {
};
}
},
jumpSetting() {
uni.navigateTo({
url: '/pages/mine_package/mine_settings/mine_settings'
url: '/pages/rwa_package/setting/setting'
})
}
},
+166
View File
@@ -0,0 +1,166 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="注销账号" />
<view class="setting-view">
<view class="name-box">
<view class="top-view">
<u-icon name="error-circle-fill" color="#e88900" size="108"></u-icon>
<text class="text-36 text-zu text-bold mt-12">注销信任桥账号</text>
</view>
<view class="mid-view">
<text class="text-fu text-28">账号注销后不可恢复,请您谨慎操作。注销成功后,您将无法登录或使用原账号,账号内的信息和权益将均无法找回:</text>
<text class="text-fu text-28 mt-48">1.账号将无法登录 </text>
<text class="text-fu text-28">2.历史订单将无法查询 </text>
<text class="text-fu text-28">3.放弃会员等级权益和会员积分 </text>
<text class="text-fu text-28">4.放弃钱包余额、优惠券等资产 </text>
</view>
<text class="text-fu text-28 mt-32">*详细注销信息可阅读
<text class="text-zi" @click="onJump">《信任桥账号注销协议》</text>
</text>
</view>
</view>
<view class="bottom-btn">
<MyBtn text="已清楚风险,确定注销" @ok="onZhu"></MyBtn>
</view>
<u-modal :show="tipsShow" title="提示" showCancelButton @cancel="onCancel" @confirm="onConfirm" :content='content'></u-modal>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getUserInfo,updateName,deleteAccount } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import { clear } from '@/utils/auth.js';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import func from '@/utils/func.js';
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
userInfo: null,
inputText:'',
tipsShow:false,
content:'是否确定注销账号?'
};
},
onShow() {
},
onLoad() {
this.init();
// this.userinfo();
},
methods: {
init() {
this.userinfo()
},
onJump(){
uni.navigateTo({
url:'/pages/rwa_package/setting/out-agreement'
})
},
onZhu(){
this.tipsShow = true;
},
onConfirm(){
// uni.navigateTo({
// url:'/pages/rwa_package/setting/out-code'
// })
this.onCancel();
deleteAccount().then(res=>{
if (res.bizcode == 100) {
clear()
this.$refs.uToastRef.show({
type: 'success',
message: "注销成功",
});
setTimeout(()=>{
uni.redirectTo({
url:'/pages/login_package/login/login'
})
},2000)
}
})
},
onCancel(){
this.tipsShow = false;
},
userinfo() {
getUserInfo().then(res => {
if (res.bizcode == 100) {
this.userInfo = res.data;
this.inputText = this.userInfo.nickname;
}
})
}
}
}
</script>
<style lang="scss" scoped>
.bottom-btn{
width: 100%;
margin-bottom:92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.name-box{
width:100%;
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
padding: 64rpx 32rpx;
box-sizing: border-box;
margin-top:24rpx;
.mid-view{
width:100%;
padding: 40rpx 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
border:2rpx solid #eaeaea;
border-radius: 16rpx;
margin-top:48rpx;
}
.top-view{
width:100%;
display: flex;
flex-direction: column;
align-items: center;
}
.input-view{
border-radius: 20rpx;
margin-top:52rpx;
width:100%;
padding: 0 32rpx;
min-height:104rpx;
display: flex;
flex-direction: row;
align-items: center;
background-color: #f5f5f5;
box-sizing: border-box;
}
}
}
</style>
+121
View File
@@ -0,0 +1,121 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="设置" />
<view class="setting-view">
<view class="item-list mt-24">
<view class="flex-r-lr item-box" @click="onHead(index)"
v-for="(item,index) in headList" :key="index"
:style="{borderWidth:index == headList.length - 1 ? '0' : '2rpx'}"
>
<text class="text-zu1 text-32">{{item.text}}</text>
<view class="flex-r-e" style="align-items: center;">
<text class="text-zu text-32" v-if="item.type == 'text'">{{item.value}}</text>
<text class="text-fu text-32" v-if="item.type == 'text1'">{{item.value}}</text>
<u-icon size="16" name="arrow-right" color="#666" style="margin-left:12rpx"></u-icon>
</view>
</view>
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getUserInfo } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import func from '@/utils/func.js';
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
type: false,
userInfo: null,
headList:[
{text:'注册手机号',type:'text',value:''},
{text:'交易密码设置',type:'text1',value:'设置密码'},
{text:'登录密码设置',type:'text1',value:'设置密码'},
{text:'注销账号',type:'text',value:''},
],
bottomList:[
{text:'账号与安全'},
{text:'我的合同'},
{text:'用户协议'},
{text:'隐私协议'},
{text:'售后保障协议'},
{text:'关于我们'},
]
};
},
onShow() {
},
onLoad() {
this.init();
// this.userinfo();
},
methods: {
init() {
this.userinfo()
},
onHead(index){
if(index == 1){
uni.navigateTo({
url:`/pages/rwa_package/setting/forgot-pass?type=1`
})
}else if(index == 2){
uni.navigateTo({
url:`/pages/rwa_package/setting/forgot-pass?type=2`
})
}else if(index == 3){
uni.navigateTo({
url:`/pages/rwa_package/setting/account-out`
})
}
},
userinfo() {
getUserInfo().then(res => {
if (res.bizcode == 100) {
this.userInfo = res.data;
this.headList[0].value = this.userInfo.mobile;
this.headList[0].value = this.headList[0].value.replace(this.headList[0].value.substring(3,7),'****')
}
})
}
}
}
</script>
<style lang="scss" scoped>
.setting-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
.item-list{
width:100%;
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
.item-box{
min-height:108rpx;
padding: 0 32rpx;
box-sizing: border-box;
align-items: center;
border-bottom:solid #EAEAEA;
.ava-img{
width:60rpx;
height:60rpx;
border-radius: 30rpx;
}
}
}
}
</style>
+251
View File
@@ -0,0 +1,251 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header :title="topText" />
<view class="contract-view">
<view class="mid-box">
<view class="input-view">
<u-icon name="phone" style="margin-left:32rpx" size="24"></u-icon>
<up-input placeholder="请输入手机号" border="surround" v-model="form.mobile" :customStyle="inputCss"></up-input>
</view>
<view class="input-view">
<u-icon name="clock" style="margin-left:32rpx" size="24"></u-icon>
<up-input placeholder="请输入验证码" border="surround" v-model="form.smsCode" :customStyle="inputCss">
<template #suffix style="margin-right: 10rpx;">
<view v-if="countdown" class="code-warp">
<up-count-down :time="60 * 1000" format="ss" @finish="countdown = false"></up-count-down>
<text style="margin-left: 10rpx;">s</text>
</view>
<view v-else @click="getMobileCode" class="code_msg">
获取验证码
</view>
</template>
</up-input>
</view>
<view class="input-view">
<u-icon name="lock" style="margin-left:32rpx" size="24"></u-icon>
<up-input placeholder="请输入登录密码" border="surround" v-model="form.pass" :customStyle="inputCss"
:type="loginPasswordIsShow ? 'text' : 'password'">
<template #suffix style="margin-right: 10rpx;">
<up-image v-if="loginPasswordIsShow" src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"
@click="loginPasswordIsShow = false;"></up-image>
<up-image v-else src="/static/login/hidden.png" width="20" height="20" bgColor="#f1f6ff00"
@click="loginPasswordIsShow = true;"></up-image>
</template>
</up-input>
</view>
<view class="input-view">
<u-icon name="lock" style="margin-left:32rpx" size="24"></u-icon>
<up-input placeholder="请输入登录密码" border="surround" v-model="form.passOne" :customStyle="inputCss"
:type="loginPassword2IsShow ? 'text' : 'password'">
<template #suffix style="margin-right: 10rpx;">
<up-image v-if="loginPassword2IsShow" src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"
@click="loginPassword2IsShow = false;"></up-image>
<up-image v-else src="/static/login/hidden.png" width="20" height="20" bgColor="#f1f6ff00"
@click="loginPassword2IsShow = true;"></up-image>
</template>
</up-input>
</view>
</view>
</view>
<view class="bottom-btn">
<MyBtn @ok="registerFun"></MyBtn>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getUserList } from '@/api/common.js';
import MyBtn from '@/components/common/my-btn.vue'
import { forgotPassword,forgotPayPassword } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import { clear } from '@/utils/auth.js';
import TopSafe from '@/components/common/top-safe.nvue'
import CryptoJS from 'crypto-js';
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
form:{
mobile:'',
smsCode:'',
pass:'',
passOne:''
},
loginPasswordIsShow:false,
loginPassword2IsShow:false,
countdown: false,// 清空倒计时
inputCss: {
"height": '80rpx',
"background": "#F3F3F3FF",
"border-radius": "30rpx",
"border": "0rpx",
"padding-left": "12rpx",
},
topText:'',
type:'1'
};
},
onShow() {
},
onLoad(options) {
if(options.type){
this.type = options.type;
this.init();
}
},
methods: {
init(){
if(this.type == '1'){
this.topText = '修改交易密码';
}else if(this.type == '2'){
this.topText = '修改登录密码';
}else if(this.type == '3'){
this.topText = '找回登录密码';
}
},
async getMobileCode() {
const form = this.form;
if (!form.mobile) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入手机号码",
});
return;
}
this.countdown = true;
const params = {
mobile: form.mobile,
type: this.type == '1' ? 'tradepw' : 'passwd'
}
const response = await getUserList(params);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: response.msg,
});
} else {
this.countdown = false;
}
},
registerFun(){
if (!this.form.mobile) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入手机号码",
});
return;
}
if (!this.form.smsCode) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入验证码",
});
return;
}
if (!this.form.pass || !this.form.passOne) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入密码",
});
return;
}
if (this.form.pass !== this.form.passOne) {
this.$refs.uToastRef.show({
type: 'error',
message: "两次输入的登录密码不一致",
});
return;
}
let params = {
verificationCode:this.form.smsCode,
newPassword:CryptoJS.MD5(this.form.pass).toString(),
phone:this.form.mobile
}
if(this.type == '1'){
forgotPayPassword(params).then(res=>{
if(res.bizcode == 100){
this.$refs.uToastRef.show({
type: 'success',
message: "密码设置成功",
});
setTimeout(()=>{
uni.navigateBack();
},2000)
//
}
})
}else{
forgotPassword(params).then(res=>{
if(res.bizcode == 100){
this.$refs.uToastRef.show({
type: 'success',
message: "密码设置成功",
});
clear();
setTimeout(()=>{
uni.redirectTo({
url: '/pages/login_package/login/login'
})
},2000)
}
})
}
},
}
}
</script>
<style lang="scss" scoped>
.bottom-btn{
width: 100%;
margin-bottom:92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.contract-view {
width: 100%;
height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
// background-color: #fff;
.mid-box{
width:100%;
border-radius: 16rpx;
padding: 16rpx 32rpx 48rpx;
margin-top:32rpx;
box-sizing: border-box;
background-color: #fff;
display: flex;
flex-direction: column;
.input-view{
width:100%;
height:100rpx;
background-color: #f5f5f5;
border-radius: 20rpx;
margin-top:32rpx;
display: flex;
flex-direction: row;
align-items: center;
}
}
}
</style>
+136
View File
@@ -0,0 +1,136 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="信任桥APP账号注销协议" />
<view class="setting-view">
<text class="text-28 text-zu1 mt-24">尊敬的用户:</text>
<text class="text-28 text-zu1 mt-24">感谢您使用信任桥APP。为了保护您的合法权益,请您在申请注销前,仔细阅读并充分理解本协议。</text>
<text class="text-28 text-zu1 mt-24">一旦您提交注销申请并完成相关流程,即表示您已知悉并同意本协议的全部内容。</text>
<text class="text-36 text-zu mt-24 text-bold">一、账号注销的结果</text>
<text class="text-28 text-zu1 mt-24">账号一旦注销成功,将无法恢复。届时:</text>
<text class="text-28 text-zu1 mt-24">1、您的账号将无法再登录或使用原有服务。</text>
<text class="text-28 text-zu1 mt-24">2、您的历史订单记录将无法查询。</text>
<text class="text-28 text-zu1 mt-24">3、您将放弃所有会员等级权益与会员积分。</text>
<text class="text-28 text-zu1 mt-24">4、您的账户钱包余额、优惠券及其他虚拟资产将全部清零且无法找回。</text>
<text class="text-36 text-zu mt-24 text-bold">二、您在申请注销前需确认</text>
<text class="text-28 text-zu1 mt-24">1、您的账号当前无未完成的订单、未结清的款项或其他争议。</text>
<text class="text-28 text-zu1 mt-24">2、您已妥善处理与账号相关的资金、权益及信息。</text>
<text class="text-28 text-zu1 mt-24">3、您已明确知晓注销操作不可逆转。</text>
<text class="text-36 text-zu mt-24 text-bold">三、免责条款</text>
<text class="text-28 text-zu1 mt-24">因您主动注销账号而导致的任何信息丢失、权益消耗、资产作废,本平台不承担任何形式的补偿或责任。</text>
<text class="text-36 text-zu mt-24 text-bold">四、特别提示</text>
<text class="text-28 text-zu1 mt-24">1、请您在注销前,确认账号内的余额、积分、优惠券等已合理使用。</text>
<text class="text-28 text-zu1 mt-24">2、如您仅因短期不使用,可选择退出登录,而非注销账号。</text>
<text class="text-28 text-zu1 mt-24">3、若因违规、欺诈等原因导致平台强制注销账号,将不适用本协议中的补偿或说明。</text>
<text class="text-36 text-zu mt-24 text-bold">五、协议生效</text>
<text class="text-28 text-zu1 mt-24" style="margin-bottom:48rpx">本协议自您点击确认并完成注销申请之时立即生效。</text>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getUserInfo,updateName } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import func from '@/utils/func.js';
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
userInfo: null,
inputText:'',
tipsShow:false,
content:'是否确定注销账号?'
};
},
onShow() {
},
onLoad() {
this.init();
// this.userinfo();
},
methods: {
init() {
// this.userinfo()
},
onJump(){
uni.navigateTo({
url:'/pages/rwa_package/setting/out-agreement'
})
}
}
}
</script>
<style lang="scss" scoped>
.bottom-btn{
width: 100%;
margin-bottom:92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.name-box{
width:100%;
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
padding: 64rpx 32rpx;
box-sizing: border-box;
margin-top:24rpx;
.mid-view{
width:100%;
padding: 40rpx 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
border:2rpx solid #eaeaea;
border-radius: 16rpx;
margin-top:48rpx;
}
.top-view{
width:100%;
display: flex;
flex-direction: column;
align-items: center;
}
.input-view{
border-radius: 20rpx;
margin-top:52rpx;
width:100%;
padding: 0 32rpx;
min-height:104rpx;
display: flex;
flex-direction: row;
align-items: center;
background-color: #f5f5f5;
box-sizing: border-box;
}
}
}
</style>
+154
View File
@@ -0,0 +1,154 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="注销账号" />
<view class="setting-view">
<view class="name-box">
<text class="text-zu text-38">请输入验证码</text>
<text class="text-fu text-28 mt-24" >验证码已发送至 {{userInfo && userInfo.mobile1}}</text>
<u-code-input size="40" focus disabledDot @finish="onCode" :maxlength="6" v-model="code" style="margin-top:32rpx"></u-code-input>
<view class="flex-c mt-32">
<view v-if="countdown" class="code-warp">
<up-count-down :time="60 * 1000" format="ss" @finish="countdown = false"></up-count-down>
<text style="margin-left: 10rpx;">s</text>
</view>
<view v-else @click="getMobileCode" class="code_msg">
获取验证码
</view>
</view>
</view>
</view>
<view class="bottom-btn">
<MyBtn text="确定注销" @ok="onOut"></MyBtn>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getUserList } from '@/api/common.js';
import { getUserInfo,deleteAccount } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import { clear } from '@/utils/auth.js';
import CryptoJS from 'crypto-js';
import MyBtn from '@/components/common/my-btn.vue'
import func from '@/utils/func.js';
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
userInfo: null,
code:'',
countdown:false
};
},
onShow() {
},
onLoad() {
this.init();
// this.userinfo();
},
methods: {
init() {
this.userinfo()
},
onCode(){
},
async getMobileCode() {
this.countdown = true;
const params = {
mobile: this.userInfo.mobile,
type: this.type == '1' ? 'tradepw' : 'passwd'
}
const response = await getUserList(params);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: response.msg,
});
} else {
this.countdown = false;
}
},
userinfo() {
getUserInfo().then(res => {
if (res.bizcode == 100) {
this.userInfo = res.data;
this.userInfo.mobile1 = this.userInfo.mobile.replace(this.userInfo.mobile.substring(3,7),'****')
}
})
}
}
}
</script>
<style lang="scss" scoped>
.bottom-btn{
width: 100%;
margin-bottom:92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.name-box{
width:100%;
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
padding: 64rpx 32rpx;
box-sizing: border-box;
margin-top:24rpx;
.mid-view{
width:100%;
padding: 40rpx 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
border:2rpx solid #eaeaea;
border-radius: 16rpx;
margin-top:48rpx;
}
.top-view{
width:100%;
display: flex;
flex-direction: column;
align-items: center;
}
.input-view{
border-radius: 20rpx;
margin-top:52rpx;
width:100%;
padding: 0 32rpx;
min-height:104rpx;
display: flex;
flex-direction: row;
align-items: center;
background-color: #f5f5f5;
box-sizing: border-box;
}
}
}
</style>
+135
View File
@@ -0,0 +1,135 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="用户名称" />
<view class="setting-view">
<view class="name-box">
<text class="text-zu text-38">修改用户名称</text>
<text class="text-fu text-28 mt-24" >昵称为2~32位字符,支持中文、英文、数</text>
<view class="input-view">
<input v-model="inputText" maxlength="32" placeholder="请输入名称" />
</view>
</view>
</view>
<view class="bottom-btn">
<MyBtn text="保存" @ok="onSetName"></MyBtn>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import { getUserInfo,updateName } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import func from '@/utils/func.js';
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
userInfo: null,
inputText:''
};
},
onShow() {
},
onLoad() {
this.init();
// this.userinfo();
},
methods: {
init() {
this.userinfo()
},
onSetName(){
if(!this.inputText){
return this.$refs.uToastRef.show({
type: 'error',
message: "请输入名称",
});
}
if(this.inputText.length < 2){
return this.$refs.uToastRef.show({
type: 'error',
message: "名称长度2-32",
});
}
updateName({name:this.inputText}).then(res=>{
if (res.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: "名称设置成功",
});
this.init();
} else {
this.$refs.uToastRef.show({
type: 'error',
message: "名称设置失败",
});
}
})
},
userinfo() {
getUserInfo().then(res => {
if (res.bizcode == 100) {
this.userInfo = res.data;
this.inputText = this.userInfo.nickname;
}
})
}
}
}
</script>
<style lang="scss" scoped>
.bottom-btn{
width: 100%;
margin-bottom:92rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
}
.setting-view {
width: 100%;
height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.name-box{
width:100%;
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
padding: 64rpx 32rpx;
box-sizing: border-box;
margin-top:24rpx;
.input-view{
border-radius: 20rpx;
margin-top:52rpx;
width:100%;
padding: 0 32rpx;
min-height:104rpx;
display: flex;
flex-direction: row;
align-items: center;
background-color: #f5f5f5;
box-sizing: border-box;
}
}
}
</style>
+242
View File
@@ -0,0 +1,242 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="设置" />
<view class="setting-view">
<view class="item-list mt-24">
<view class="flex-r-lr item-box" @click="onHead(index)"
v-for="(item,index) in headList" :key="index"
:style="{borderWidth:index == headList.length - 1 ? '0' : '2rpx'}"
>
<text class="text-zu1 text-32">{{item.text}}</text>
<view class="flex-r-e" style="align-items: center;">
<image v-if="item.type == 'img'" :src="item.value" class="ava-img"></image>
<text class="text-zu text-32" v-if="item.type == 'text'">{{item.value}}</text>
<u-icon size="16" name="arrow-right" color="#666" style="margin-left:12rpx"></u-icon>
</view>
</view>
</view>
<view class="item-list mt-24">
<view class="flex-r-lr item-box" @click="onBottom(index)"
v-for="(item,index) in bottomList" :key="index"
:style="{borderWidth:index == bottomList.length - 1 ? '0' : '2rpx'}"
>
<text class="text-zu1 text-32">{{item.text}}</text>
<view class="flex-r-e" style="align-items: center;">
<u-icon size="16" name="arrow-right" color="#666" style="margin-left:12rpx"></u-icon>
</view>
</view>
</view>
<MyBtn class="mt-48" @ok="onOutLogin" text="退出登录"></MyBtn>
</view>
<up-toast ref="uToastRef"></up-toast>
<!-- 腾讯电子签H5 → 集成到UniApp -->
</view>
</template>
<script>
import { getUserInfo,uploadAvatar } from '@/api/auth.js';
import { uploadImage, uploadImg } from '@/api/common.js';
import { IMG_TYPE } from '@/utils/enumUtils.js';
import { BASE_URL, Authorization } from '@/utils/config.js';
import { getStorageFun, TOKEN_NAME,clear } from '@/utils/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import func from '@/utils/func.js';
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
type: false,
userInfo: null,
headList:[
{text:'头像',type:'img',value:''},
{text:'用户名称',type:'text',value:''},
],
bottomList:[
{text:'账号与安全'},
{text:'我的合同'},
{text:'用户协议'},
{text:'隐私协议'},
{text:'售后保障协议'},
{text:'关于我们'},
]
};
},
onShow() {
this.init();
},
onLoad() {
// this.userinfo();
},
methods: {
init() {
this.userinfo()
},
onHead(index){
console.log('index',index)
let that = this;
if(index == 0){
uni.chooseImage({
count: 1, // 默认9,设置图片的数量
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
// 成功选择图片后
const filePath = res.tempFilePaths[0]; // 获取文件路径
that.uploadFile(filePath);
}
});
}else if(index == 1){
uni.navigateTo({
url:'/pages/rwa_package/setting/set-name'
})
}
},
uploadFile(url) {
uni.showLoading({
title: '图片上传中...',
})
const that = this;
const token = getStorageFun(TOKEN_NAME); // 获取token, 根据实际情况调整获取方式
// 成功则返回文件的本地临时文件路径
uni.uploadFile({
url: BASE_URL + uploadImg, // 替换为你的上传接口URL
filePath: url,
name: 'file',
formData: {
'type': IMG_TYPE.COMMON,
},
header: {
"Authorization": Authorization,
'HSM-AUTH': token ? token : '',
},
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data);
if (data.bizcode === 100) {
that.setUploadAvatar(data.data.accessUrl);
} else {
uni.showToast({
title: '图片上传失败',
icon: 'none',
mask: true,
duration: 3000,
})
}
},
fail: (uploadFileErr) => {
uni.showToast({
title: '图片上传失败',
icon: 'none',
mask: true,
duration: 3000,
})
},
complete: (res) => {
// 请求完成以后做一些事情
uni.hideLoading();
}
});
},
setUploadAvatar(img){
let params = {
imgUrl:img
}
uploadAvatar(params).then(res=>{
if (res.bizcode === 100) {
this.$refs.uToastRef.show({
type: 'success',
message: "头像设置成功",
});
this.init();
} else {
this.$refs.uToastRef.show({
type: 'error',
message: "头像设置失败",
});
}
})
},
onOutLogin(){
clear();
uni.navigateTo({
url: '/pages/login_package/login/login'
})
},
onBottom(index){
let url = '';
switch(index){
case 0:
url = '/pages/rwa_package/setting/account-safe'
break;
case 1:
url = '/pages/rwa_package/dongjian/index'
break;
case 2:
url = '/pages/mine_package/mine_user_agreement/mine_user_agreement'
break;
case 3:
url = '/pages/mine_package/mine_privacy_agreement/mine_privacy_agreement'
break;
case 4:
url = '/pages/mine_package/mine_product_agreement/mine_product_agreement'
break;
case 5:
url = '/pages/mine_package/mine_about_us/mine_about_us'
break;
}
if(url){
uni.navigateTo({
url:url
})
}
},
userinfo() {
getUserInfo().then(res => {
if (res.bizcode == 100) {
this.userInfo = res.data;
this.userInfo.avatarUrl = this.userInfo.avatarUrl ? this.userInfo.avatarUrl : 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/default-avatar.png';
this.headList[0].value = this.userInfo.avatarUrl;
this.userInfo.nickname = this.userInfo.nickname ? this.userInfo.nickname : '暂未设置';
this.headList[1].value = this.userInfo.nickname;
}
})
}
}
}
</script>
<style lang="scss" scoped>
.setting-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
.item-list{
width:100%;
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
.item-box{
min-height:108rpx;
padding: 0 32rpx;
box-sizing: border-box;
align-items: center;
border-bottom:solid #EAEAEA;
.ava-img{
width:60rpx;
height:60rpx;
border-radius: 30rpx;
}
}
}
}
</style>