源文件
This commit is contained in:
141
jeepay-ui-uapp-agent/pageWork/setUp/aboutUs.vue
Normal file
141
jeepay-ui-uapp-agent/pageWork/setUp/aboutUs.vue
Normal file
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view class="page-wrapper global-wrapper">
|
||||
<JHeaderTitle
|
||||
title="关于我们"
|
||||
bgColor="#7737fe"
|
||||
color="#fff"
|
||||
imgUrl="/static/iconImg/left-white.svg"
|
||||
></JHeaderTitle>
|
||||
<view class="header-card">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view>{{ edition }}</view>
|
||||
<!-- #endif-->
|
||||
</view>
|
||||
<JMainCard bgColor="rgba(0, 0, 0, 0.1)" wrapPd="50rpx 50rpx 0 50rpx" pd="40rpx">
|
||||
<view class="company-info">
|
||||
<view class="company-title">公司名称</view>
|
||||
<view>{{ companyInfo.companyName }}</view>
|
||||
</view>
|
||||
<view class="company-info">
|
||||
<view class="company-title" @tap="callPhone(companyInfo.companyTel)">联系电话</view>
|
||||
<view>{{ companyInfo.companyTel }}</view>
|
||||
</view>
|
||||
<view class="company-info">
|
||||
<view class="company-title">电子邮箱</view>
|
||||
<view>{{ companyInfo.companyEmail }}</view>
|
||||
</view>
|
||||
</JMainCard>
|
||||
<JMainCard bgColor="rgba(0, 0, 0, 0.1)" wrapPd="30rpx 50rpx" pd="0">
|
||||
<view class="service-wrapper" @tap="jumpPage('/pages/login/serviceAgreement')">
|
||||
服务协议 <image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="service-wrapper privacy" @tap="jumpPage('/pages/login/privacyPolicy')">
|
||||
隐私政策 <image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
|
||||
</view>
|
||||
</JMainCard>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<JMainCard bgColor="rgba(0, 0, 0, 0.1)" wrapPd="0 50rpx" pd="0">
|
||||
<view class="service-wrapper" @tap="checkCurrVersion(1)">
|
||||
检查更新
|
||||
<view class="edition">v{{ edition }} <image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" /></view>
|
||||
</view>
|
||||
</JMainCard>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { $getCompanyInfo } from "@/http/apiManager.js"
|
||||
import JHeaderTitle from "@/components//newComponents/JHeaderTitle/JHeaderTitle"
|
||||
import JMainCard from "@/components//newComponents/JMainCard/JMainCard"
|
||||
import { checkCurrVersion, getCurrentVersionPromise } from "@/util/versionManage.js"
|
||||
onLoad(() => {
|
||||
getCompanyInfo()
|
||||
// #ifdef APP-PLUS
|
||||
getCurrentVersionPromise().then((res) => {
|
||||
edition.value = res.version
|
||||
})
|
||||
// #endif
|
||||
})
|
||||
const companyInfo = ref({})
|
||||
const edition = ref("v1.0.0")
|
||||
const getCompanyInfo = () => {
|
||||
$getCompanyInfo().then(({ bizData }) => {
|
||||
companyInfo.value = bizData
|
||||
})
|
||||
}
|
||||
const callPhone = (phoneNumber) => {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber,
|
||||
})
|
||||
}
|
||||
const jumpPage = (url) => {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-wrapper {
|
||||
background-color: $primaryColor;
|
||||
.header-card {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
image {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 20rpx;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
view {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 27rpx;
|
||||
}
|
||||
.header-title {
|
||||
font-size: 33rpx;
|
||||
color: #ffffff;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
}
|
||||
.company-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 40rpx;
|
||||
font-size: 30rpx;
|
||||
view {
|
||||
color: #fff;
|
||||
}
|
||||
.company-title {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.service-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx 53rpx 32rpx 40rpx;
|
||||
font-size: 33rpx;
|
||||
color: #ffffff;
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
.privacy {
|
||||
border-top: 1rpx solid #5f2ccb;
|
||||
}
|
||||
.edition {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
81
jeepay-ui-uapp-agent/pageWork/setUp/accountSetting.vue
Normal file
81
jeepay-ui-uapp-agent/pageWork/setUp/accountSetting.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<view class="page-wrapper global-wrapper bgF2">
|
||||
<JMainCard wrapPd="30rpx" pd="32rpx">
|
||||
<view class="photo-wrapper">
|
||||
头像
|
||||
<!-- <image :src="userInfo.avatarUrl" mode="scaleToFill" @tap="editAvatar" /> -->
|
||||
<JeepayUpLoad
|
||||
ref="upLoad"
|
||||
:imgUrl="userInfo.avatarUrl"
|
||||
:userIsShowClear="false"
|
||||
@uploadSuccess="uploadSuccess"
|
||||
/>
|
||||
</view>
|
||||
</JMainCard>
|
||||
<JMainCard wrapPd="0 30rpx" pd="32rpx">
|
||||
<view class="photo-wrapper">
|
||||
名称
|
||||
<input type="text" v-model="userInfo.realname" />
|
||||
</view>
|
||||
</JMainCard>
|
||||
<JButton pd="30rpx" @HandleTouch="modifyUserInfo">保存</JButton>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { $modifyUser, $userInfo } from "@/http/apiManager.js"
|
||||
import JMainCard from "@/components//newComponents/JMainCard/JMainCard"
|
||||
import JButton from "@/components//newComponents/JButton/JButton"
|
||||
import JeepayUpLoad from "@/components/JeepayUpLoad/JeepayUpLoad.vue"
|
||||
import jeepyPreview from "@/components/jeepayUpLoad/enlarge.vue"
|
||||
onLoad(() => {
|
||||
getUserInfo()
|
||||
})
|
||||
const userInfo = ref({})
|
||||
const getUserInfo = () => {
|
||||
$userInfo().then(({ bizData }) => {
|
||||
userInfo.value = bizData
|
||||
})
|
||||
}
|
||||
|
||||
const uploadSuccess = (res) => {
|
||||
userInfo.value.avatarUrl = res.data
|
||||
}
|
||||
const modifyUserInfo = () => {
|
||||
uni.showLoading({
|
||||
title: "正在保存",
|
||||
mask: true,
|
||||
})
|
||||
$modifyUser({
|
||||
realname: userInfo.value.realname,
|
||||
avatarUrl: userInfo.value.avatarUrl,
|
||||
}).then((res) => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "保存成功",
|
||||
icon: "success|none",
|
||||
mask: true,
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-wrapper {
|
||||
.photo-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 33rpx;
|
||||
image {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
input {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
60
jeepay-ui-uapp-agent/pageWork/setUp/latestPost.vue
Normal file
60
jeepay-ui-uapp-agent/pageWork/setUp/latestPost.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<view class="post-list" v-for="item in useDataResult.dataList" @tap="toDetail(item.articleId)">
|
||||
<text>{{ item.title }}</text>
|
||||
<text>{{ item.createdAt ? item.createdAt.slice(0, 10) : '' }}</text>
|
||||
</view>
|
||||
<jeepayListNull :list="useDataResult.dataList"></jeepayListNull>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import { onBackPress } from '@dcloudio/uni-app'
|
||||
import useGetList from '@/hooks/useGetList.js'
|
||||
import { $getNoticeList } from '@/http/apiManager.js'
|
||||
import jeepayListNull from '@/components/jeepayListNull/jeepayListNull.vue'
|
||||
|
||||
const switchStatePopup = ref()
|
||||
const { useDataResult, getList } = useGetList($getNoticeList, undefined, { articleType: 1 })
|
||||
|
||||
let vdata = reactive({})
|
||||
|
||||
// 跳转
|
||||
const toDetail = (articleId) => {
|
||||
uni.navigateTo({
|
||||
url: './postDetail?id=' + articleId
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background: #f5f6fc;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
.post-list {
|
||||
box-sizing: border-box;
|
||||
width: 750rpx;
|
||||
height: 150rpx;
|
||||
background: #fff;
|
||||
margin-top: 2rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #000;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
font-weight: 500;
|
||||
font-size: 23rpx;
|
||||
color: #a6a6a6;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
153
jeepay-ui-uapp-agent/pageWork/setUp/passwordSetting.vue
Normal file
153
jeepay-ui-uapp-agent/pageWork/setUp/passwordSetting.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<view class="page-wrapper global-wrapper bgF2" v-if="flag">
|
||||
<JHeaderTitle title="修改密码" bgColor="#f2f2f2"></JHeaderTitle>
|
||||
<view class="origin-pwd">
|
||||
<LoginInput
|
||||
title="原密码"
|
||||
v-model:value="pwdInfo.oldPassword"
|
||||
bgColor="#fff"
|
||||
pd="30rpx 30rpx 20rpx 30rpx"
|
||||
place="请输入原密码"
|
||||
:password="!oldPasswordEyes"
|
||||
:rules="{ name: 'oldPassword', rule: 'REG_NotNUll' }"
|
||||
>
|
||||
<view class="right-eyes" @tap="oldPasswordEyes = !oldPasswordEyes">
|
||||
<image :src="eyeImg[oldPasswordEyes ? 1 : 0]" mode="scaleToFill" />
|
||||
</view>
|
||||
</LoginInput>
|
||||
<view class="forget" @tap="jumpPage">忘记原密码?</view>
|
||||
</view>
|
||||
<view class="edit-pwd">
|
||||
<LoginInput
|
||||
title="新密码"
|
||||
v-model:value="pwdInfo.newPassword"
|
||||
place="请输入新密码"
|
||||
bgColor="#fff"
|
||||
pd="50rpx 30rpx 30rpx 30rpx"
|
||||
:password="!isOpenEyes"
|
||||
:rules="{ name: 'newPassword', rule: 'REG_NotNUll' }"
|
||||
>
|
||||
<view class="right-eyes" @tap="isOpenEyes = !isOpenEyes">
|
||||
<image :src="eyeImg[isOpenEyes ? 1 : 0]" mode="scaleToFill" />
|
||||
</view>
|
||||
</LoginInput>
|
||||
<LoginInput
|
||||
title=""
|
||||
v-model:value="pwdInfo.confirmPassword"
|
||||
place="请再次输入新密码"
|
||||
bgColor="#fff"
|
||||
pd="0 30rpx"
|
||||
:password="!confirmOpenEyes"
|
||||
:rules="{ name: 'confirmPassword', rule: 'REG_NotNUll' }"
|
||||
>
|
||||
<view class="right-eyes" @tap="confirmOpenEyes = !confirmOpenEyes">
|
||||
<image :src="eyeImg[confirmOpenEyes ? 1 : 0]" mode="scaleToFill" />
|
||||
</view>
|
||||
</LoginInput>
|
||||
</view>
|
||||
<JButton pd="30rpx" @HandleTouch="editPwd.open()">确认修改</JButton>
|
||||
</view>
|
||||
<JPopup ref="editPwd">
|
||||
<JCard @confirm="confirm" title="确认修改" @tap.stop>
|
||||
密码修改成功后,当前账号将退出登录。重新登录需使用更新后的密码。</JCard
|
||||
>
|
||||
<JButton pd="0 30rpx 30rpx 30rpx" bgColor="rgba(255, 255, 255, 0.8)" color="#000" @HandleTouch="editPwd.close()"
|
||||
>取消</JButton
|
||||
>
|
||||
</JPopup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from "vue"
|
||||
import { $modifyPwd, $getPasswordRules } from "../../http/apiManager.js"
|
||||
import { onShow } from "@dcloudio/uni-app"
|
||||
import JMainCard from "@/components//newComponents/JMainCard/JMainCard"
|
||||
import LoginInput from "@/components//newComponents/LoginInput/LoginInput"
|
||||
import JButton from "@/components//newComponents/JButton/JButton"
|
||||
import JPopup from "@/components//newComponents/JPopup/JPopup"
|
||||
import JCard from "@/components/newComponents/JCard/JCard"
|
||||
import JHeaderTitle from "@/components/newComponents/JHeaderTitle/JHeaderTitle.vue"
|
||||
import user from "@/hooks/user.js"
|
||||
import { validateArray, clearRulesArray } from "@/hooks/rules"
|
||||
import { Base64 } from "js-base64"
|
||||
onShow(() => {
|
||||
flag.value = true
|
||||
getRules()
|
||||
})
|
||||
const eyeImg = reactive(["/static/loginImg/login-eye-close.svg", "/static/loginImg/login-eye-open.svg"])
|
||||
const isOpenEyes = ref(false)
|
||||
const confirmOpenEyes = ref(false)
|
||||
const oldPasswordEyes = ref(false)
|
||||
const editPwd = ref()
|
||||
const pwdInfo = reactive({})
|
||||
const flag = ref(true)
|
||||
const rules = ref({})
|
||||
const getRules = () => {
|
||||
$getPasswordRules().then((res) => {
|
||||
rules.value.rule = new RegExp(res.bizData.regexpRules)
|
||||
rules.value.ruleText = res.bizData.errTips
|
||||
})
|
||||
}
|
||||
const confirm = () => {
|
||||
if (validateArray(pwdInfo)) {
|
||||
if (pwdInfo.newPassword !== pwdInfo.confirmPassword)
|
||||
return uni.showToast({
|
||||
title: "两次密码输入不一致",
|
||||
icon: "error",
|
||||
mask: true,
|
||||
})
|
||||
if (!rules.value.rule.test(pwdInfo.newPassword))
|
||||
return uni.showToast({
|
||||
title: rules.value.ruleText,
|
||||
icon: "none",
|
||||
})
|
||||
uni.showLoading({
|
||||
title: "修改中",
|
||||
mask: true,
|
||||
})
|
||||
$modifyPwd({
|
||||
originalPwd: Base64.encode(pwdInfo.oldPassword),
|
||||
confirmPwd: Base64.encode(pwdInfo.newPassword),
|
||||
}).then((res) => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success",
|
||||
mask: true,
|
||||
})
|
||||
clearRulesArray()
|
||||
editPwd.value.close()
|
||||
user.logout()
|
||||
})
|
||||
}
|
||||
}
|
||||
const jumpPage = () => {
|
||||
flag.value = false
|
||||
uni.navigateTo({ url: "/pages/login/forgetPassword" })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-wrapper {
|
||||
.origin-pwd {
|
||||
font-size: 33rpx;
|
||||
.forget {
|
||||
margin-left: 50rpx;
|
||||
font-size: 27rpx;
|
||||
color: $primaryColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right-eyes {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
background-color: transparent;
|
||||
}
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
</style>
|
||||
60
jeepay-ui-uapp-agent/pageWork/setUp/postDetail.vue
Normal file
60
jeepay-ui-uapp-agent/pageWork/setUp/postDetail.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="title">
|
||||
<span>{{ content.title }}</span>
|
||||
</view>
|
||||
<view class="updatedAt">
|
||||
<span>作者:{{ content.publisher }}</span>
|
||||
  
|
||||
<span>时间:{{ content.updatedAt }}</span>
|
||||
</view>
|
||||
<!-- map-html 解析时出现横向滚动条 -->
|
||||
<!-- <mp-html :content="content.content" /> -->
|
||||
<view class="content-text" v-html="content.content"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from "vue"
|
||||
import { $noticeDetail } from "@/http/apiManager.js"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import parseHtml from "@/util/html-parse.js"
|
||||
const content = ref({})
|
||||
onLoad((options) => {
|
||||
$noticeDetail(options.id).then(({ bizData }) => {
|
||||
content.value = bizData
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
box-sizing: border-box;
|
||||
padding: 0 50rpx 40rpx 50rpx;
|
||||
.title {
|
||||
// height: 60rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
font-size: 35rpx;
|
||||
padding: 20rpx 0;
|
||||
font-weight: 700;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.updatedAt {
|
||||
padding: 0rpx 0 40rpx 0;
|
||||
color: #969696;
|
||||
font-size: 20rpx;
|
||||
span {
|
||||
&:nth-child(2) {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-text {
|
||||
img {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
58
jeepay-ui-uapp-agent/pageWork/setUp/pwSetting.vue
Normal file
58
jeepay-ui-uapp-agent/pageWork/setUp/pwSetting.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<view class="page-wrapper bgF2">
|
||||
<JHeaderTitle title="密码与安全" bgColor="#f2f2f2"></JHeaderTitle>
|
||||
<block v-for="(v, i) in list" :key="i">
|
||||
<view class="setting-wrapper bgF" @tap="jumpPage(v.url)">
|
||||
<view class="setting-main" :class="[v.isBorder]">
|
||||
{{ v.title }}
|
||||
<image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue'
|
||||
import JHeaderTitle from '@/components/newComponents/JHeaderTitle/JHeaderTitle.vue'
|
||||
const list = reactive([
|
||||
{
|
||||
title: '登录密码',
|
||||
url: '/pageWork/setUp/passwordSetting'
|
||||
},
|
||||
{
|
||||
title: '支付密码',
|
||||
url: '/pageWork/setUp/takeMoneyPwd'
|
||||
}
|
||||
])
|
||||
const jumpPage = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.setting-wrapper {
|
||||
padding-left: 32rpx;
|
||||
.setting-main {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 110rpx;
|
||||
border-bottom: 1rpx solid #f2f2f2;
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 50rpx;
|
||||
}
|
||||
}
|
||||
.isBorder {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
111
jeepay-ui-uapp-agent/pageWork/setUp/setUp.vue
Normal file
111
jeepay-ui-uapp-agent/pageWork/setUp/setUp.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<view class="page-wrapper global-wrapper bgF2">
|
||||
<JHeaderTitle title="设置" bgColor="#f2f2f2"></JHeaderTitle>
|
||||
<block v-for="(v, i) in list" :key="i">
|
||||
<view class="setting-wrapper bgF" @tap="phoneOpen(v.title), jumpPage(v.url)">
|
||||
<view class="setting-main" :class="[v.isBorder]">
|
||||
{{ v.title }}
|
||||
<image src="/static/iconImg/right-arrow.svg" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="login-uot bgF" @tap="logOut.open('账号退出后,系统不会主动删除任何数据,您仍可使用本账号再次登录。')"
|
||||
>退出登录</view
|
||||
>
|
||||
</view>
|
||||
|
||||
<JPopup ref="phone" type="center" dir="center">
|
||||
<callPhone @cancel="phone.close()" :phoneNumber="phoneNumber" @tap.stop></callPhone>
|
||||
</JPopup>
|
||||
<JDeletedTips ref="logOut" @confirm="confirm" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import user from "@/hooks/user.js"
|
||||
import { $getCompanyInfo } from "@/http/apiManager.js"
|
||||
import JPopup from "@/components/newComponents/JPopup/JPopup"
|
||||
import JCard from "@/components/newComponents/JCard/JCard"
|
||||
import JButton from "@/components/newComponents/JButton/JButton"
|
||||
import callPhone from "@/components/newComponents/callPhone/callPhone"
|
||||
import JHeaderTitle from "@/components/newComponents/JHeaderTitle/JHeaderTitle.vue"
|
||||
import JDeletedTips from "@/components/newComponents/JDeletedTips/JDeletedTips"
|
||||
import { clearRulesArray } from "@/hooks/rules"
|
||||
onLoad(() => {
|
||||
getPhoneNumber()
|
||||
})
|
||||
const logOut = ref(null)
|
||||
const list = reactive([
|
||||
{
|
||||
title: "账号设置",
|
||||
url: "/pageWork/setUp/accountSetting",
|
||||
},
|
||||
{
|
||||
title: "密码与安全",
|
||||
url: "/pageWork/setUp/pwSetting",
|
||||
},
|
||||
{
|
||||
title: "注销账号",
|
||||
},
|
||||
{
|
||||
title: "关于我们",
|
||||
url: "/pageWork/setUp/aboutUs",
|
||||
isBorder: "isBorder",
|
||||
},
|
||||
])
|
||||
const loginOut = ref()
|
||||
const phone = ref()
|
||||
const phoneNumber = ref("")
|
||||
const confirm = () => {
|
||||
user.logout()
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "退出成功",
|
||||
})
|
||||
}
|
||||
const phoneOpen = (v) => {
|
||||
if (v === "注销账号") return phone.value.open()
|
||||
}
|
||||
const getPhoneNumber = () => {
|
||||
$getCompanyInfo().then(({ bizData }) => {
|
||||
phoneNumber.value = bizData.companyTel
|
||||
})
|
||||
}
|
||||
const jumpPage = (url) => {
|
||||
if (!url) return
|
||||
clearRulesArray()
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-wrapper {
|
||||
font-size: 33rpx;
|
||||
.setting-wrapper {
|
||||
padding-left: 32rpx;
|
||||
.setting-main {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 110rpx;
|
||||
border-bottom: 1rpx solid #f2f2f2;
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 50rpx;
|
||||
}
|
||||
}
|
||||
.isBorder {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.login-uot {
|
||||
height: 110rpx;
|
||||
line-height: 110rpx;
|
||||
margin-top: 20rpx;
|
||||
text-align: center;
|
||||
color: #ff4433;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
280
jeepay-ui-uapp-agent/pageWork/setUp/takeMoneyPwd.vue
Normal file
280
jeepay-ui-uapp-agent/pageWork/setUp/takeMoneyPwd.vue
Normal file
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<view class="border"></view>
|
||||
<!-- v-if="vdata.index === 0" -->
|
||||
<view class="pw-box" v-if="vdata.index === 0">
|
||||
<view class="disc">
|
||||
<text>验证密码</text>
|
||||
<text>请输入支付密码,以验证身份</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<verification-code-style
|
||||
:latticeNum="6"
|
||||
ref="verCode"
|
||||
@getInputVerification="getInputVerification1"
|
||||
ciphertextSty="1"
|
||||
></verification-code-style>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pw-box" v-if="vdata.index === 1">
|
||||
<view class="disc">
|
||||
<text>设置新密码</text>
|
||||
<text>请输入新的支付密码</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<verification-code-style
|
||||
:latticeNum="6"
|
||||
@getInputVerification="getInputVerification2"
|
||||
ciphertextSty="1"
|
||||
></verification-code-style>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 580rpx; margin: 0 auto" v-if="vdata.index === 2">
|
||||
<view class="pw-box">
|
||||
<view class="disc">
|
||||
<text>验证新密码</text>
|
||||
<text>请再输入一次新的支付密码</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<verification-code-style
|
||||
:latticeNum="6"
|
||||
ref="newVerCode"
|
||||
@getInputVerification="getInputVerification3"
|
||||
ciphertextSty="1"
|
||||
></verification-code-style>
|
||||
</view>
|
||||
<view class="left" @click="back"> <text style="margin-left: 10rpx">重新设置密码</text> </view>
|
||||
</view>
|
||||
<!-- <view class="btn" @click="change">
|
||||
<text>确认修改</text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<JDeletedTips ref="tips" @confirm="phoneConfirm" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, getCurrentInstance } from "vue"
|
||||
import { $isAgentSipw, $updateAgentSipw, $isSipw } from "../../http/apiManager.js"
|
||||
import { onLoad, onBackPress } from "@dcloudio/uni-app"
|
||||
import { Base64 } from "js-base64"
|
||||
import verificationCodeStyle from "@/components/verification-code-style2/verification-code-style2"
|
||||
import JDeletedTips from "@/components/newComponents/JDeletedTips/JDeletedTips"
|
||||
const vdata = reactive({
|
||||
oldPwd: "",
|
||||
index: 0,
|
||||
newPwd: "",
|
||||
confirmPwd: "",
|
||||
allowChange: false,
|
||||
isBack: false, //是否允许退出
|
||||
})
|
||||
const { ctx } = getCurrentInstance()
|
||||
const tips = ref(null)
|
||||
onBackPress(() => {
|
||||
if (vdata.isBack) {
|
||||
return false
|
||||
} else {
|
||||
tips.value.open("是否退出支付密码修改?退出将不会保存您所做的修改")
|
||||
return true
|
||||
}
|
||||
})
|
||||
onLoad((options) => {
|
||||
//判断是否有密码
|
||||
let ispwd = ""
|
||||
$isSipw()
|
||||
.then((res) => {
|
||||
console.log(res.bizData)
|
||||
ispwd = res.bizData
|
||||
if (options.pwd === "0" || !ispwd) {
|
||||
vdata.index = 1
|
||||
} else {
|
||||
vdata.index = 0
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
})
|
||||
|
||||
const phoneConfirm = () => {
|
||||
vdata.isBack = true
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
})
|
||||
}
|
||||
const getInputVerification1 = (e) => {
|
||||
// console.log(e)
|
||||
if (e && e.length === 6) {
|
||||
vdata.oldPwd = e
|
||||
$isAgentSipw({
|
||||
originalPwd: Base64.encode(e),
|
||||
}).then((res) => {
|
||||
if (res.bizData) {
|
||||
vdata.index = 1
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "密码验证错误",
|
||||
})
|
||||
ctx.$refs.verCode.cleanVal()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInputVerification2 = (e) => {
|
||||
if (e.length === 6) {
|
||||
vdata.index = 2
|
||||
vdata.newPwd = e
|
||||
}
|
||||
}
|
||||
|
||||
const getInputVerification3 = (e) => {
|
||||
if (e.length === 6) {
|
||||
if (e !== vdata.newPwd) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "两次输入的密码不一致",
|
||||
})
|
||||
ctx.$refs.newVerCode.cleanVal()
|
||||
} else {
|
||||
vdata.allowChange = true
|
||||
vdata.confirmPwd = e
|
||||
change()
|
||||
}
|
||||
}
|
||||
}
|
||||
const change = () => {
|
||||
if (vdata.allowChange) {
|
||||
$updateAgentSipw({
|
||||
originalPwd: Base64.encode(vdata.oldPwd),
|
||||
confirmPwd: Base64.encode(vdata.newPwd),
|
||||
}).then((res) => {
|
||||
uni.showToast({
|
||||
icon: "success",
|
||||
title: "修改成功",
|
||||
})
|
||||
vdata.isBack = true
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
const back = () => {
|
||||
vdata.index = 1
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.border {
|
||||
height: 1rpx;
|
||||
width: 100%;
|
||||
background-color: #f5f6fc;
|
||||
}
|
||||
.swiper {
|
||||
background-color: #ff5500;
|
||||
margin-top: 154rpx;
|
||||
height: 80vh;
|
||||
.swiper-item {
|
||||
width: 100%;
|
||||
background-color: #3981ff;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 393rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 20rpx;
|
||||
background: $primaryColor;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: 500;
|
||||
font-size: 33rpx;
|
||||
color: #fff;
|
||||
margin-top: 500rpx;
|
||||
}
|
||||
|
||||
.pw-box {
|
||||
// height: 400rpx;
|
||||
width: 580rpx;
|
||||
// background-color: aqua;
|
||||
margin: 0 auto;
|
||||
margin-top: 156rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.disc {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
margin-bottom: 182rpx;
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
color: #000;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
font-weight: bold;
|
||||
font-size: 33rpx;
|
||||
color: #2e2e2e;
|
||||
}
|
||||
}
|
||||
}
|
||||
.left {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #2735b4;
|
||||
font-size: 25rpx;
|
||||
margin-top: 53rpx;
|
||||
}
|
||||
}
|
||||
.popview {
|
||||
box-sizing: border-box;
|
||||
width: 630rpx;
|
||||
height: 412rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #fff;
|
||||
padding: 50rpx 50rpx 30rpx 50rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
position: absolute;
|
||||
top: -500rpx;
|
||||
left: -310rpx;
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 33rpx;
|
||||
color: #000;
|
||||
}
|
||||
.content {
|
||||
height: 30%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.op {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
button {
|
||||
width: 45%;
|
||||
height: 110rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user