feat:小程序改造

This commit is contained in:
2026-07-23 14:00:03 +08:00
committed by charles
parent 3f335074ea
commit 553543b5b3
39 changed files with 1096 additions and 1231 deletions
-166
View File
@@ -1,166 +0,0 @@
<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="54"></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>
-149
View File
@@ -1,149 +0,0 @@
<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'}"
>
<view class="flex-r" >
<text class="text-zu1 text-32">{{item.text}}</text>
<view class="yi-view" v-if="item.type == 'text1' && item.she">
<text class="text-zi text-24">{{item.she}}</text>
</view>
</view>
<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',she:'',value:'设置密码'},
{text:'登录密码设置',type:'text1',she:'',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),'****')
if(res.data.tradePassword){
this.headList[1].she = '已设置';
this.headList[1].value = '修改密码';
}else{
this.headList[1].value = '设置密码';
}
if(res.data.password){
this.headList[2].she = '已设置';
this.headList[2].value = '修改密码';
}else{
this.headList[2].value = '设置密码';
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.yi-view{
width:104rpx;
height:44rpx;
display: flex;
background: rgba(122,53,246,0.1);
align-items: center;
justify-content: center;
border-radius: 8rpx;
margin-left:12rpx;
}
.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>
-131
View File
@@ -1,131 +0,0 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="物流信息" />
<view class="setting-view">
<view class="express-panel">
<view class="top-one" style="margin-top:12rpx">
<u-icon name="email" color="#333" size="20"></u-icon>
<text class="text-24 text-fu text-space" style="margin-left:10rpx;line-height: 1.4;margin-right:12rpx">{{curData && `${curData.items[0].expressName}:`}}</text>
<text class="text-24 text-gray text-space" style="margin-left:10rpx;line-height: 1.4;margin-right:12rpx">{{curData && `${curData.items[0].expressNo}`}}</text>
<up-image src="/static/common/copy.png" width="14" height="14" bgColor="#f1f6ff00"
@click="copyData(curData ? curData.items[0].expressNo :'')"></up-image>
</view>
<view class="top-one" style="border-bottom:2rpx solid #eee">
<u-icon name="map" color="#333" size="20"></u-icon>
<text class="text-24 text-fu text-space" style="margin-left:10rpx;line-height: 1.4;margin-right:12rpx">收货地址</text>
<text class="text-24 text-zu text-space" style="margin-left:10rpx;line-height: 1.4;margin-right:12rpx">{{curData && `${curData.countryName} ${curData.cityName} ${curData.areaName} ${curData.address}`}}</text>
</view>
<u-steps current="0" direction="column" dot activeColor="#7934F6" style="margin-top:20rpx">
<u-steps-item :style="`width:calc(100vw - 48rpx)`"
:title="item.areaName + ' ' + item.curTime" :desc="item.desc" v-for="(item,index) in express.logisticsTraceDetailList" :key="index"></u-steps-item>
</u-steps>
</view>
</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';
import { copyData } from '@/utils/index.js';
import {
getDetail,
orderLogistics
} from "@/api/order.js";
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
express:null,
curData:null,
id:0
};
},
onLoad(option) {
// this.userinfo();
if(option && option.id){
this.id = Number(option.id);
this.init();
}
},
methods: {
copyData,
init() {
this.detail();
},
detail(){
let params = {
id:this.id
}
getDetail(params).then(res=>{
if(res.bizcode == 100){
this.curData = res.data;
if(this.curData.items[0].expressNo){
this.getOrderLogistics();
}
}
console.log('id',res)
})
},
getOrderLogistics(){
let params = {
mailNo:this.curData.items[0].expressNo
}
orderLogistics(params).then(res=>{
if(res.bizcode == 100){
this.express = res.data;
this.express.logisticsTraceDetailList.forEach(item=>{
item.curTime = func.formatDate(new Date(item.time), 2);
})
}
})
}
}
}
</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;
.express-panel{
width:100%;
margin-top:24rpx;
height: calc(100% - 24rpx);
padding: 0 32rpx;
box-sizing: border-box;
overflow-y: auto;
display: flex;
flex-direction: column;
background-color: #fff;
.top-one{
width:100%;
display: flex;
flex-direction: row;
align-items: center;
min-height:70rpx;
}
}
}
</style>
-257
View File
@@ -1,257 +0,0 @@
<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'){
if (this.form.pass.length != 6 || this.form.passOne.length != 6) {
this.$refs.uToastRef.show({
type: 'error',
message: "请输入6位密码",
});
return;
}
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>
-126
View File
@@ -1,126 +0,0 @@
<template>
<view class="customer-service-page">
<TopSafe />
<view class="customer-service-nav">
<button class="nav-back" aria-label="返回" @click="goBack">
<u-icon name="arrow-left" size="25" color="#2f3037" />
</button>
<text class="nav-title">全媒体智能客服</text>
<view class="nav-placeholder" />
</view>
<button class="history-entry" @click="showHistory">点击查询聊天记录</button>
<view class="customer-service-body">
<hashmall-customer-service v-if="optionsReady" ref="customerService" :entry-options="entryOptions" />
</view>
</view>
</template>
<script>
import TopSafe from '@/components/common/top-safe.nvue'
import HashmallCustomerService from '@/uni_modules/hashmall-customer-service/components/hashmall-customer-service/hashmall-customer-service.vue'
export default {
components: {
TopSafe,
HashmallCustomerService
},
data() {
return {
entryOptions: {},
optionsReady: false
}
},
onLoad(options) {
this.entryOptions = options || {}
this.optionsReady = true
},
onShow() {
this.$nextTick(() => {
if (this.$refs.customerService) this.$refs.customerService.resume()
})
},
onHide() {
if (this.$refs.customerService) this.$refs.customerService.suspend()
},
onUnload() {
if (this.$refs.customerService) this.$refs.customerService.suspend()
},
methods: {
goBack() {
uni.navigateBack()
},
showHistory() {
if (this.$refs.customerService) this.$refs.customerService.showHistory()
}
}
}
</script>
<style scoped lang="scss">
.customer-service-page {
display: flex;
width: 100%;
height: 100vh;
height: 100dvh;
box-sizing: border-box;
flex-direction: column;
overflow: hidden;
background: #f4f5fa;
}
.customer-service-nav {
display: flex;
height: 92rpx;
align-items: center;
justify-content: space-between;
padding: 0 28rpx;
background: #f4f5fa;
}
.nav-back,
.nav-placeholder {
width: 72rpx;
height: 72rpx;
flex: 0 0 72rpx;
}
.nav-back {
display: flex;
align-items: center;
justify-content: flex-start;
margin: 0;
padding: 0;
background: transparent;
}
.nav-title {
color: #101116;
font-size: 38rpx;
font-weight: 500;
line-height: 1.2;
}
.history-entry {
width: 100%;
height: 72rpx;
margin: 0;
padding: 0;
background: transparent;
color: #a2a3aa;
font-size: 27rpx;
font-weight: 400;
line-height: 72rpx;
}
.nav-back::after,
.history-entry::after {
border: 0;
}
.customer-service-body {
width: 100%;
min-height: 0;
flex: 1;
overflow: hidden;
}
</style>
-136
View File
@@ -1,136 +0,0 @@
<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
@@ -1,154 +0,0 @@
<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
@@ -1,135 +0,0 @@
<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>
+3 -3
View File
@@ -93,7 +93,7 @@ export default {
});
}else if(index == 1){
uni.navigateTo({
url:'/pages/rwa_package/setting/set-name'
url:'/pages/rwa_package/setName/setName'
})
}
},
@@ -171,13 +171,13 @@ export default {
let url = '';
switch(index){
case 0:
url = '/pages/rwa_package/setting/account-safe'
url = '/pages/rwa_package/accountSafe/accountSafe'
break;
case 1:
url = '/pages/rwa_package/dongjian/index'
break;
case 2:
url = '/pages/rwa_package/setting/zhaopian'
url = '/pages/rwa_package/zhaopian/zhaopian'
break;
case 3:
url = '/pages/mine_package/mine_user_agreement/mine_user_agreement'
-73
View File
@@ -1,73 +0,0 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header :title="zhaoList[type]" />
<view class="setting-view">
<image :src="`https://static.tbmall.xin/static/new/zi_${type + 1}.png`" mode="widthFix" ></image>
</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:'',
zhaoList:['营业执照','电信增值许可证书'],
type:0
};
},
onShow() {
},
onLoad(option) {
if(option && option.type){
this.type = Number(option.type);
}
this.init();
// this.userinfo();
},
methods: {
init() {
},
}
}
</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: 32rpx 24rpx 0 ;
box-sizing: border-box;
position: relative;
image{
width:100%;
border-radius: 12rpx;
}
}
</style>
-107
View File
@@ -1,107 +0,0 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="资质证明" />
<view class="setting-view">
<view class="name-box">
<view class="zhao-list" @click="onJump(index)" :style="{borderWidth:index == zhaoList.length - 1 ? '0' : '2rpx'}"
v-for="(item,index) in zhaoList" :key="index">
<text class="text-zu1 text-32">{{item}}</text>
<view class="zhao-right">
<text class="text-fu1 text-28" style="margin-right:20rpx;">查看</text>
<u-icon name="arrow-right" color="#999" size='14'></u-icon>
</view>
</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:'',
zhaoList:['营业执照','电信增值许可证书']
};
},
onShow() {
},
onLoad() {
this.init();
// this.userinfo();
},
methods: {
init() {
},
onJump(index){
uni.navigateTo({
url:`/pages/rwa_package/setting/zhao?type=${index}`
})
}
}
}
</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;
margin-top:30rpx;
.zhao-list{
width:100%;
height:100rpx;
display: flex;
flex-direction: row;
padding: 0 24rpx;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #EAEAEA;
box-sizing: border-box;
.zhao-right{
display: flex;
flex-direction: row;
justify-content: flex-end;
}
}
}
}
</style>