|
@@ -1,173 +1,218 @@
|
|
|
<template>
|
|
|
- <view class="container">
|
|
|
- <view class="top">
|
|
|
- <!-- <view class="item flex justify-between align-center">
|
|
|
- <view class="key">
|
|
|
- 合作商家:
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- --
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
- <view class="item flex justify-between align-center">
|
|
|
- <view class="key">
|
|
|
- 收款支付宝
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- {{aliNo}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="item flex justify-between align-center" style="border-bottom: none;" @click="open">
|
|
|
- <view class="key">
|
|
|
- 修改密码
|
|
|
- </view>
|
|
|
- <up-icon name="arrow-right"></up-icon>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <up-popup :show="show" @close="close" @open="open" mode="center" :round="10">
|
|
|
- <view class="pop-content">
|
|
|
- <view class="pop-title">
|
|
|
- 修改密码
|
|
|
- </view>
|
|
|
- <view class="pop-input">
|
|
|
- <up-input placeholder="请输入新密码" border="surround" type="password" v-model="password"></up-input>
|
|
|
- </view>
|
|
|
- <view class="pop-btn flex justify-end">
|
|
|
- <view class="pop-btns close" @click="close">
|
|
|
- 取消
|
|
|
- </view>
|
|
|
- <view class="pop-btns submit" @click="submit">
|
|
|
- 确定
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </up-popup>
|
|
|
- </view>
|
|
|
+ <view class="container">
|
|
|
+ <view class="top">
|
|
|
+ <view class="item flex justify-between align-center">
|
|
|
+ <view class="key">
|
|
|
+ 收款支付宝
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ {{aliNo}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="item flex justify-between align-center" style="border-bottom: none;" @click="open">
|
|
|
+ <view class="key">
|
|
|
+ 修改密码
|
|
|
+ </view>
|
|
|
+ <up-icon name="arrow-right"></up-icon>
|
|
|
+ </view>
|
|
|
+ <view class="item flex justify-between align-center" style="border-bottom: none;" @click="openLogoutConfirm">
|
|
|
+ <view class="key">
|
|
|
+ 退出登录
|
|
|
+ </view>
|
|
|
+ <up-icon name="arrow-right"></up-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <up-popup :show="show" @close="close" @open="open" mode="center" :round="10">
|
|
|
+ <view class="pop-content">
|
|
|
+ <view class="pop-title">
|
|
|
+ 修改密码
|
|
|
+ </view>
|
|
|
+ <view class="pop-input">
|
|
|
+ <up-input placeholder="请输入新密码" border="surround" type="password" v-model="password"></up-input>
|
|
|
+ </view>
|
|
|
+ <view class="pop-btn flex justify-end">
|
|
|
+ <view class="pop-btns close" @click="close">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ <view class="pop-btns submit" @click="submit">
|
|
|
+ 确定
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </up-popup>
|
|
|
+
|
|
|
+ <up-popup :show="showLogoutConfirm" @close="closeLogoutConfirm" mode="center" :round="10">
|
|
|
+ <view class="pop-content">
|
|
|
+ <view class="pop-title">
|
|
|
+ 确认退出登录?
|
|
|
+ </view>
|
|
|
+ <view class="pop-btn flex justify-end">
|
|
|
+ <view class="pop-btns close" @click="closeLogoutConfirm">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ <view class="pop-btns submit" @click="logout">
|
|
|
+ 确定
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </up-popup>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- const {
|
|
|
- proxy
|
|
|
- } = getCurrentInstance();
|
|
|
-
|
|
|
- onBeforeMount(() => {
|
|
|
- //获取初始数据
|
|
|
- getAli()
|
|
|
- })
|
|
|
-
|
|
|
- //-----------------------------------------支付宝提现号
|
|
|
- let aliNo = ref(null)
|
|
|
-
|
|
|
- /**
|
|
|
- * 统计数据
|
|
|
- */
|
|
|
- function getAli() {
|
|
|
- proxy.request({
|
|
|
- url: '/merc/merc-account-ratio-info/queryInfo'
|
|
|
- }).then((res) => {
|
|
|
- aliNo.value = res.accountAliDrawId
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- //-----------------------------------------修改密码
|
|
|
- let show = ref(false)
|
|
|
- let password = ref(null)
|
|
|
-
|
|
|
- function open() {
|
|
|
- show.value = true
|
|
|
- }
|
|
|
-
|
|
|
- function close() {
|
|
|
- show.value = false
|
|
|
- password.value = ''
|
|
|
- }
|
|
|
- /**
|
|
|
- * 修改密码
|
|
|
- */
|
|
|
- function submit() {
|
|
|
- if (!password.value) {
|
|
|
- password.$modal.msg('请输入新密码')
|
|
|
- return
|
|
|
- }
|
|
|
- proxy.request({
|
|
|
- url: '/merc/merc-account-ratio-info/editPassword',
|
|
|
- data: {
|
|
|
- "password": password.value,
|
|
|
- }
|
|
|
- }).then((res) => {
|
|
|
- close()
|
|
|
- proxy.$modal.msg('修改成功')
|
|
|
- })
|
|
|
- }
|
|
|
+import useUserStore from '@/stores/user.js'
|
|
|
+
|
|
|
+const {
|
|
|
+ proxy
|
|
|
+} = getCurrentInstance();
|
|
|
+
|
|
|
+onBeforeMount(() => {
|
|
|
+ //获取初始数据
|
|
|
+ getAli()
|
|
|
+})
|
|
|
+
|
|
|
+//-----------------------------------------支付宝提现号
|
|
|
+let aliNo = ref(null)
|
|
|
+
|
|
|
+/**
|
|
|
+ * 统计数据
|
|
|
+ */
|
|
|
+function getAli() {
|
|
|
+ proxy.request({
|
|
|
+ url: '/merc/merc-account-ratio-info/queryInfo'
|
|
|
+ }).then((res) => {
|
|
|
+ aliNo.value = res.accountAliDrawId
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+//-----------------------------------------修改密码
|
|
|
+let show = ref(false)
|
|
|
+let password = ref(null)
|
|
|
+
|
|
|
+function open() {
|
|
|
+ show.value = true
|
|
|
+}
|
|
|
+
|
|
|
+function close() {
|
|
|
+ show.value = false
|
|
|
+ password.value = ''
|
|
|
+}
|
|
|
+/**
|
|
|
+ * 修改密码
|
|
|
+ */
|
|
|
+function submit() {
|
|
|
+ if (!password.value) {
|
|
|
+ password.$modal.msg('请输入新密码')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ proxy.request({
|
|
|
+ url: '/merc/merc-account-ratio-info/editPassword',
|
|
|
+ data: {
|
|
|
+ "password": password.value,
|
|
|
+ }
|
|
|
+ }).then((res) => {
|
|
|
+ close()
|
|
|
+ proxy.$modal.msg('修改成功')
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+//-----------------------------------------退出登录
|
|
|
+let showLogoutConfirm = ref(false)
|
|
|
+
|
|
|
+function openLogoutConfirm() {
|
|
|
+ showLogoutConfirm.value = true
|
|
|
+}
|
|
|
+
|
|
|
+function closeLogoutConfirm() {
|
|
|
+ showLogoutConfirm.value = false
|
|
|
+}
|
|
|
+
|
|
|
+function logout() {
|
|
|
+ // proxy.request({
|
|
|
+ // url: '/merc/logout'
|
|
|
+ // }).then((res) => {
|
|
|
+ // closeLogoutConfirm()
|
|
|
+ // proxy.$modal.msg('退出成功')
|
|
|
+ // // 这里可以添加跳转到登录页面的逻辑
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ useUserStore()
|
|
|
+ .LogOut()
|
|
|
+ .then((res) => {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/pages/login',
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .container {
|
|
|
- .top {
|
|
|
- position: relative;
|
|
|
- width: 702rpx;
|
|
|
- padding: 24rpx;
|
|
|
- margin-left: 24rpx;
|
|
|
- box-shadow: rgb(229, 229, 229) 0px 5px 20px -5px;
|
|
|
- margin-top: 20rpx;
|
|
|
-
|
|
|
- .item {
|
|
|
- border-bottom: 1rpx solid #eee;
|
|
|
- line-height: 100rpx;
|
|
|
-
|
|
|
- .key {
|
|
|
- font-size: 28rpx;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
-
|
|
|
- .value {
|
|
|
- font-size: 28rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .pop-content {
|
|
|
- width: 690rpx;
|
|
|
- height: 600rpx;
|
|
|
- padding: 24rpx;
|
|
|
-
|
|
|
- .pop-title {
|
|
|
- text-align: center;
|
|
|
- line-height: 80rpx;
|
|
|
- font-size: 34rpx;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
-
|
|
|
- .pop-input {
|
|
|
- margin-top: 40rpx;
|
|
|
-
|
|
|
- .max {
|
|
|
- line-height: 90rpx;
|
|
|
- color: red;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .pop-btn {
|
|
|
- position: absolute;
|
|
|
- right: 20rpx;
|
|
|
- bottom: 24rpx;
|
|
|
-
|
|
|
- .pop-btns {
|
|
|
- width: 120rpx;
|
|
|
- line-height: 60rpx;
|
|
|
- border: 1rpx solid #2C6FF3;
|
|
|
- text-align: center;
|
|
|
- border-radius: 60rpx;
|
|
|
- color: #2C6FF3;
|
|
|
- margin-left: 20rpx;
|
|
|
-
|
|
|
- &.submit {
|
|
|
- background-color: #2C6FF3;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-</style>
|
|
|
+.container {
|
|
|
+ .top {
|
|
|
+ position: relative;
|
|
|
+ width: 702rpx;
|
|
|
+ padding: 24rpx;
|
|
|
+ margin-left: 24rpx;
|
|
|
+ box-shadow: rgb(229, 229, 229) 0px 5px 20px -5px;
|
|
|
+ margin-top: 20rpx;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ border-bottom: 1rpx solid #eee;
|
|
|
+ line-height: 100rpx;
|
|
|
+
|
|
|
+ .key {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .value {
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .pop-content {
|
|
|
+ width: 690rpx;
|
|
|
+ height: 600rpx;
|
|
|
+ padding: 24rpx;
|
|
|
+
|
|
|
+ .pop-title {
|
|
|
+ text-align: center;
|
|
|
+ line-height: 80rpx;
|
|
|
+ font-size: 34rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .pop-input {
|
|
|
+ margin-top: 40rpx;
|
|
|
+
|
|
|
+ .max {
|
|
|
+ line-height: 90rpx;
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .pop-btn {
|
|
|
+ position: absolute;
|
|
|
+ right: 20rpx;
|
|
|
+ bottom: 24rpx;
|
|
|
+
|
|
|
+ .pop-btns {
|
|
|
+ width: 120rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ border: 1rpx solid #2C6FF3;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 60rpx;
|
|
|
+ color: #2C6FF3;
|
|
|
+ margin-left: 20rpx;
|
|
|
+
|
|
|
+ &.submit {
|
|
|
+ background-color: #2C6FF3;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|