源文件

This commit is contained in:
gyq
2024-05-23 14:39:33 +08:00
commit a1128dd791
2997 changed files with 500069 additions and 0 deletions

View File

@@ -0,0 +1,218 @@
<template>
<view class="page-wrapper">
<JHeaderTitle title="应用详情页" :bgColor="vdata.headerBgColor" color="#fff" imgUrl="/static/iconImg/left-white.svg" />
<image class="header-bg-img" src="/pageWork/static/images/app-bg-img.svg" mode="scaleToFill" />
<view class="header-card">
<image src="/pageWork/static/images/icon-app-white.svg" mode="scaleToFill" />
<view class="app-name">{{ appInfo.appName }}</view>
<view class="app-no">{{ appInfo.appId }}</view>
<view class="app-edit" @tap="toEdit(appInfo.appName, appInfo.appId)">
<image src="/static/iconImg/expand-edit.svg" mode="scaleToFill" />
编辑信息
</view>
</view>
<view class="app-info">
<view class="app-item">
<view class="title">应用名称</view>
<view class="info app-list-name single-text-beyond">{{ appInfo.appName }}</view>
</view>
<view class="app-item">
<view class="title">AppId</view>
<view class="info">{{ appInfo.appId }}</view>
</view>
<view class="app-item">
<view class="title">是否默认</view>
<view class="info">{{ appInfo.defaultFlag == 1 ? '是' : '否' }}</view>
</view>
<view class="app-item">
<view class="title">应用状态</view>
<view class="info">
<switch :checked="appInfo.state == 1" style="margin: 0; transform: scale(1.2); padding: 0" color="#BF80FF" @change="stateChange" />
</view>
</view>
</view>
<view class="app-button" @tap="toPayChannel(appInfo.appId)"> 支付渠道配置 </view>
</view>
<JPopupCard ref="refPay" />
<jeepayConfirm ref="refConfirm" />
</template>
<script setup>
import { reactive, ref } from 'vue'
import { onLoad, onPageScroll, onUnload } from '@dcloudio/uni-app'
import { $getAppDetails, $savePayConfig, $editApp } from '@/http/apiManager.js'
import JHeaderTitle from '@/components/newComponents/JHeaderTitle/JHeaderTitle'
import JPopupCard from './components/JPopupCard.vue'
onLoad((options) => {
getDetails(options.appId)
uni.$on('upDateAppDetails', () => {
getDetails(appInfo.appId)
uni.$emit('upDateList')
})
})
const vdata = reactive({
headerBgColor: 'transparent',
})
const refConfirm = ref(null)
const appInfo = reactive({})
const refPay = ref(null)
// 获取详情
const getDetails = (appId) => {
$getAppDetails(appId).then(({ bizData }) => {
Object.assign(appInfo, bizData)
})
}
// 支付渠道配置页面
const toPayChannel = (appId) => uni.navigateTo({ url: '/pageWork/appManage/payChannel?appId=' + appId })
// 编辑应用页面
const toEdit = (name, appId) => {
uni.navigateTo({
url: `/pageWork/appManage/editAdd?appName=${name}&appId=${appId}`,
})
}
// 保存支付渠道配置
const saveConfig = (data) => {
$savePayConfig(data).then((res) => {
uni.showToast({
title: '保存成功',
icon: 'success|none',
mask: true,
})
})
}
const stateChange = (e) => {
appInfo.state = Number(e.detail.value)
refConfirm.value.comfirmOpen(
() => {
$editApp({
appId: appInfo.appId,
state: appInfo.state,
}).then((res) => {
uni.showToast({
title: '修改成功',
icon: 'success|none',
mask: true,
})
uni.$emit('upDateList')
})
},
'确认修改状态吗?',
() => {
appInfo.state = Number(!e.detail.value)
}
)
}
onPageScroll((data) => {
if (data.scrollTop > 20) {
vdata.headerBgColor = '$primaryColor'
} else {
vdata.headerBgColor = 'transparent'
}
})
// 页面卸载移除事件侦听
onUnload(() => {
uni.$off(['upDateAppDetails'])
})
</script>
<style lang="scss" scoped>
.page-wrapper {
position: relative;
background-color: $primaryColor;
min-height: 100vh;
.header-bg-img {
position: absolute;
top: 0;
right: 0;
left: 50;
width: 100%;
height: 600rpx;
}
.header-card {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 75rpx;
image {
width: 93rpx;
height: 93rpx;
}
.app-name {
margin: 20rpx 0 15rpx 0;
width: 500rpx;
text-align: center;
font-size: 33rpx;
font-weight: 500;
color: #fff;
}
.app-no {
color: rgba(255, 255, 255, 0.6);
font-size: 26rpx;
font-weight: 500;
}
.app-edit {
position: relative;
z-index: 40;
display: flex;
justify-content: center;
align-items: center;
margin-top: 30rpx;
width: 236rpx;
height: 90rpx;
border-radius: 10rpx;
font-size: 28rpx;
font-weight: 500;
color: $primaryColor;
background-color: #fff;
image {
margin-right: 10rpx;
width: 26rpx;
height: 26rpx;
}
}
}
.app-info {
margin: 50rpx 50rpx 35rpx 50rpx;
padding: 10rpx 0;
height: 338rpx;
border-radius: 20rpx;
background: rgba(0, 0, 0, 0.1);
.app-item {
display: flex;
justify-content: space-between;
margin: 30rpx 0;
padding: 0 40rpx;
font-size: 30rpx;
font-weight: 500;
.title {
white-space: nowrap;
color: rgba(255, 255, 255, 0.6);
}
.info {
flex: 1;
text-align: right;
color: #fff;
}
}
}
.app-button {
display: flex;
justify-content: center;
align-items: center;
margin: 0 50rpx;
height: 110rpx;
border-radius: 20rpx;
font-size: 33rpx;
font-weight: 500;
color: $primaryColor;
background-color: #fff;
}
}
.app-list-name {
width: 440rpx;
margin-left: 15rpx;
}
</style>

View File

@@ -0,0 +1,107 @@
<template>
<view class="page-wrapper">
<view class="search-header">
<JSearchInput place="搜索应用名称、应用AppId、用户号、用户名称" @search="searchApp" @resetSearch="resetSearch" />
</view>
<template v-for="v in appList" :key="v.appId">
<appCard v-bind="v" @tap="toDetails(v.appId)" />
</template>
<jeepayListNull :isShow="!hasNext" :list="[]" />
<view class="select-footer">
<JButton pd="30rpx 30rpx 50rpx 30rpx" @HandleTouch="toCreated">创建应用</JButton>
</view>
</view>
</template>
<script setup>
import { onLoad, onUnload, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import JSearchInput from '@/components/newComponents/JSearchInput/JSearchInput.vue' //自定义搜索框
import { $getAppList } from '@/http/apiManager.js'
import appCard from './components/appCard.vue'
import JButton from '@/components/newComponents/JButton/JButton'
import { reactive } from 'vue'
const appList = reactive([])
const params = {
pageNumber: 1,
pageSize: 10,
}
// 是否有下一页
let hasNext = undefined
const getList = () => {
$getAppList(params).then(({ bizData }) => {
hasNext = bizData.hasNext
appList.push(...bizData.records)
uni.stopPullDownRefresh()
})
}
const toDetails = (appId) => {
uni.navigateTo({
url: '/pageWork/appManage/appDetails?appId=' + appId,
success: () => {},
})
}
// 搜索
const searchApp = (val) => {
params.unionSearchId = val
params.pageNumber = 1
appList.length = 0
getList()
}
// 重置搜索
const resetSearch = () => {
params.unionSearchId = ''
params.pageNumber = 1
appList.length = 0
getList()
}
onPullDownRefresh(() => {
params.pageNumber = 1
appList.length = 0
getList()
})
onLoad(() => {
getList()
uni.$on('upDateList', () => {
params.pageNumber = 1
appList.length = 0
console.log('appList', appList)
getList()
})
})
// 去创建应用页面
const toCreated = () => {
uni.navigateTo({
url: '/pageWork/appManage/createdAppId',
})
}
// 页面卸载移除事件侦听
onUnload(() => {
uni.$off(['upDateList'])
})
onReachBottom(() => {
if (!hasNext) return
params.pageNumber++
getList()
})
</script>
<style lang="scss" scoped>
.page-wrapper {
background-color: #f7f7f7;
min-height: calc(100vh - 88rpx);
}
.search-header {
position: sticky;
top: 0;
right: 0;
left: 0;
z-index: 10;
background-color: #f7f7f7;
}
.select-footer {
position: fixed;
right: 0;
left: 0;
bottom: 0;
}
</style>

View File

@@ -0,0 +1,134 @@
<template>
<uni-popup ref="popup" type="bottom" mask-background-color="rgba(0,0,0,.5)" :safe-area="false">
<!-- 通用弹窗 -->
<view class="card-wrapper">
<view class="card-title disFlexCenter">选择支付渠道</view>
<view class="card-main">
<block v-for="v in payConfigList" :key="v.ifCode">
<payCard :ifName="v.ifName" :paywayFee="v.paywayFee" :bgColor="v.bgColor" :icon="v.icon">
<template #right>
<view class="state"> <switch :checked="v.configState == 1" style="margin: 0; transform: scale(1.2)" color="#7737fe" @change="stateChange($event, v)" /> </view>
</template>
</payCard>
</block>
</view>
</view>
</uni-popup>
<jeepayConfirm ref="refConfirm" />
</template>
<script setup>
import { onMounted, reactive, ref } from 'vue'
import { $getPayChannelList, $savePayConfig } from '@/http/apiManager.js'
import payCard from './payCard.vue'
const emits = defineEmits(['upDataList'])
// 支付应用的列表
const payConfigList = reactive([])
const refConfirm = ref(null)
const popup = ref(null)
const params = {
appId: undefined,
wayCode: undefined,
}
let index = undefined
const open = (appId, wayCode, i) => {
index = i
params.appId = appId
params.wayCode = wayCode
getConfigList(appId, wayCode)
}
const stateChange = (e, val) => {
val.configState = Number(e.detail.value)
refConfirm.value.comfirmOpen(
() => {
$savePayConfig({
appId: params.appId,
wayCode: params.wayCode,
ifCode: val.ifCode,
state: val.configState,
}).then((res) => {
uni.showToast({
title: '保存成功',
icon: 'success|none',
mask: true,
})
getConfigList(params.appId, params.wayCode, true)
emits('upDataList', { index, state: val.configState })
})
},
`${val.configState == 1 ? '确认启用该通道?开启后将会将其他通道关闭' : '确认关闭该渠道?'}`,
() => {
val.configState = Number(!e.detail.value)
}
)
}
// 获取可配置渠道
const getConfigList = (appId, wayCode, ifOpen) => {
$getPayChannelList(appId, wayCode).then(({ bizData }) => {
if (bizData.records.length != 0) {
payConfigList.length = 0
Object.assign(payConfigList, bizData.records)
if (ifOpen) return
popup.value.open()
} else {
uni.showToast({ title: '暂无可配置渠道', icon: 'none' })
}
})
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.card-wrapper {
max-height: 70vh;
border-radius: 32rpx 32rpx 0 0;
background-color: #fff;
.card-main {
height: calc(70vh - 110rpx - 170rpx);
padding-bottom: 60rpx;
overflow-y: auto;
}
.card-title {
margin-bottom: 10rpx;
height: 110rpx;
font-size: 30rpx;
font-weight: 400;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.07);
}
.card-button {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
height: 170rpx;
border-top: 1rpx solid #ededed;
button {
flex: 1;
height: 110rpx;
border-radius: 20rpx;
font-size: 33rpx;
font-weight: 500;
&::after {
border: none;
}
}
.cancel {
margin-right: 30rpx;
color: rgba(0, 0, 0, 0.5);
background-color: #f7f7f7;
}
.confirm {
color: #fff;
background: linear-gradient(270deg, rgba(35, 143, 252, 1) 0%, rgba(26, 102, 255, 1) 100%);
}
}
}
.disFlexCenter {
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@@ -0,0 +1,114 @@
<template>
<view class="card-wrapper" :style="{ '--state-bg-color': state == 1 ? '#7737FE' : '#B3B3B3' }">
<view class="app-header">
<image src="/static/navImg/icon-app.svg" mode="scaleToFill" />
<view class="app-info">
<view class="app-title">
<view class="app-name single-text-beyond">{{ appName }}</view>
<view class="app-state">{{ state == 1 ? '已启用' : '已禁用' }}</view>
</view>
<view class="sub-title">{{ appId }}</view>
</view>
</view>
<view class="mch-info">
<view class="left">
<image src="/pageWork/static/images/icon-mch-black.svg" mode="scaleToFill" />
<view class="mch-title"> {{ mchName }} </view>
</view>
<view class="right"> {{ mchNo }}</view>
</view>
</view>
</template>
<script setup>
const props = defineProps({
appName: { type: String }, //应用名称
mchNo: { type: String }, // 用户号
state: [String, Number], //状态
appId: { type: String }, //应用id
mchName: { type: String }, // 用户名称
})
</script>
<style lang="scss" scoped>
.card-wrapper {
padding: 0.1rpx 30rpx;
height: 257rpx;
background-color: #fff;
border-bottom: 1rpx solid #ededed;
.app-header {
display: flex;
margin-top: 30rpx;
height: 92rpx;
image {
margin-right: 20rpx;
width: 92rpx;
height: 92rpx;
}
.app-info {
flex: 1;
.app-title {
display: flex;
justify-content: space-between;
font-size: 30rpx;
font-weight: 400;
text {
font-size: 33rpx;
font-weight: 500;
}
}
.app-name{
width: 440rpx;
}
.app-state {
display: flex;
align-items: center;
white-space: nowrap;
font-size: 30rpx;
color: #666;
&::before {
content: '';
display: block;
margin-right: 15rpx;
width: 10rpx;
height: 10rpx;
border-radius: 50%;
background-color: var(--state-bg-color);
}
}
}
.sub-title {
margin-top: 15rpx;
font-size: 26rpx;
font-weight: 400;
color: #808080;
}
}
.mch-info {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20rpx;
margin-top: 20rpx;
height: 80rpx;
background-color: #f7f7f7;
border-radius: 10rpx;
font-size: 29rpx;
.left {
display: flex;
align-items: center;
image {
margin-right: 10rpx;
width: 40rpx;
height: 40rpx;
}
.mch-title {
width: 232rpx;
}
}
.right {
color: #8c8c8c;
}
}
}
</style>

View File

@@ -0,0 +1,73 @@
<template>
<view class="pay-wrapper">
<view class="pay-info">
<view class="pay-logo disFlexCenter" :style="{ backgroundColor: bgColor }">
<image :src="icon" mode="scaleToFill" />
</view>
<view class="info-main">
<view class="pay-title">
<text>{{ ifName }}</text>
<slot name="right" />
</view>
<view class="pay-rate">单笔费率{{ paywayFee.feeRate * 100 }}%</view>
</view>
</view>
</view>
</template>
<script setup>
const props = defineProps({
ifName: { typ: String }, //通道标题
bgColor: { type: String }, //logo 背景颜色
icon: { type: String }, // logo地址
paywayFee: { type: Object, default: () => ({}) }, //费率
})
</script>
<style lang="scss" scoped>
.pay-wrapper {
display: flex;
align-items: center;
padding: 0 40rpx;
height: 170rpx;
.pay-info {
flex: 1;
display: flex;
.pay-logo {
margin-right: 20rpx;
width: 90rpx;
height: 90rpx;
border-radius: 20rpx;
background-color: #07112d;
image {
width: 50rpx;
height: 50rpx;
}
}
.info-main {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.pay-title {
display: flex;
justify-content: space-between;
font-size: 30rpx;
font-weight: 400;
}
.pay-rate {
margin-top: 15rpx;
font-size: 26rpx;
font-weight: 400;
color: #999;
}
}
}
.disFlexCenter {
display: flex;
align-items: center;
justify-content: center;
}
</style>

View File

@@ -0,0 +1,171 @@
<template>
<view class="page-wrapper global-wrapper bgF2">
<view class="select-title">商户</view>
<JMainCard pd="0" wrapPd="30rpx">
<view class="select-wrapper" @tap="jumpPage('mch')">
<view class="select-mch" v-if="vdata.mchNo == undefined"> 请选择商户 </view>
<view class="mch-info" v-else>
<image src="/static/equipmentImg/mch-list.svg" mode="scaleToFill" />
<view>{{ vdata.mchName }} <text>{{ vdata.mchNo }}</text>
</view>
</view>
<image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
</view>
</JMainCard>
<JMainCard pd="0" wrapPd="15rpx 30rpx">
<JInput name="应用名称" :isBorder="true" v-model:value="vdata.appName" place="请输入应用名称"></JInput>
<JInput name="备注" v-model:value="vdata.remark" place="请输入备注"></JInput>
</JMainCard>
<JMainCard pd="0" wrapPd="15rpx 30rpx">
<JInput name="是否设置为默认应用" :isBorder="true">
<switch :checked="vdata.defaultFlag == 1 ? true : false" style="margin-left: 20rpx; transform: scale(1.2)"
color="#7737fe" @change="switchState($event, 'defaultFlag')" />
</JInput>
<JInput name="状态">
<switch :checked="vdata.state == 1 ? true : false" style="margin-left: 20rpx; transform: scale(1.2)"
color="#7737fe" @change="switchState($event, 'state')" />
</JInput>
</JMainCard>
<!-- <input placeholder="请输入" v-model="vdata.appName" /> -->
<JButton pd="30rpx 30rpx 50rpx 30rpx" @HandleTouch="submit">确认创建</JButton>
</view>
</template>
<script setup>
import { reactive } from 'vue'
import { onShow, onLoad, onUnload } from '@dcloudio/uni-app'
import { $addApp } from '@/http/apiManager.js'
import JMainCard from '@/components/newComponents/JMainCard/JMainCard.vue'
import JInput from "@/components/newComponents/JInput/JInput"
import JButton from '@/components/newComponents/JButton/JButton'
import useStore from '@/hooks/useStore.js'
const { getStore, clearItem } = useStore()
onShow(() => {
if (getStore('mch') && getStore('mch').mchNo && getStore('mch').mchNo !== vdata.mchNo) {
delete getStore('mch').remark
Object.assign(vdata, getStore('mch'))
}
})
const vdata = reactive({
appName: '',
state: 1,
defaultFlag: 1,
})
function randomKey (randomFlag, min, max) { // 生成随机128位私钥
let str = ''
let range = min
const arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
// 随机产生
if (randomFlag) {
range = Math.round(Math.random() * (max - min)) + min
}
for (var i = 0; i < range; i++) {
var pos = Math.round(Math.random() * (arr.length - 1))
str += arr[pos]
}
return str
}
const switchState = (e, v) => {
vdata[v] = e.detail.value ? 1 : 0
}
const jumpPage = (val) => {
uni.navigateTo({
url: `/pageWork/SelectedList/SelectedList?title=${val}&selected=${vdata.mchNo}`,
})
}
const submit = () => {
const params = {
appSignType: 'MD5',
mchNo: vdata.mchNo,
appName: vdata.appName,
appSecret: randomKey(false, 128, 0),
defaultFlag: vdata.defaultFlag,
state: vdata.state,
}
console.log(params);
$addApp(params).then(r => {
uni.showToast({
title: '创建成功',
icon: 'none',
duration: 2000,
success: () => {
uni.$emit('upDateList')
uni.navigateBack()
},
})
})
}
onUnload(() => {
clearItem('mch')
})
</script>
<style lang="scss" scoped>
.page-wrapper {
padding: .1rpx;
box-sizing: border-box;
}
.select-title {
margin-top: 30rpx;
margin-left: 50rpx;
font-size: 33rpx;
}
.select-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
.select-mch {
margin: 20rpx;
}
.mch-info {
display: flex;
image {
width: 93rpx;
height: 93rpx;
margin-right: 10rpx;
}
view {
display: flex;
flex-direction: column;
font-size: 33rpx;
font-weight: 700;
text {
margin-top: 15rpx;
color: #8c8c8c;
font-size: 25rpx;
font-weight: 500;
}
}
}
image {
width: 40rpx;
height: 40rpx;
}
.img-wrapper {
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
width: 93rpx;
height: 93rpx;
margin-right: 20rpx;
image {
width: 60rpx;
height: 66rpx;
}
}
}
</style>

View File

@@ -0,0 +1,45 @@
<template>
<view class="page-wrapper">
<JMainCard wrapPd="0 30rpx" pd="0">
<JInput v-model:value="appInfo.appName" name="应用名称" place="请输入应用名称" :isBorder="true"></JInput>
</JMainCard>
<JButton pd="30rpx" @HandleTouch="saveApp" pdTop="30rpx">保存</JButton>
</view>
</template>
<script setup>
import { reactive, ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { $editApp } from '@/http/apiManager.js'
import JMainCard from '@/components/newComponents/JMainCard/JMainCard'
import JInput from '@/components/newComponents/JInput/JInput'
import JButton from '@/components/newComponents/JButton/JButton'
onLoad((options) => {
appInfo.appName = options.appName
appInfo.appId = options.appId
})
const appInfo = reactive({
appName: '',
})
// 保存App
const saveApp = () => {
$editApp(appInfo).then((res) => {
// 修改成功 通知 详情页面更新
uni.$emit('upDateAppDetails')
uni.navigateBack({
success: () => {
uni.showToast({
title: '保存成功',
})
},
})
})
}
</script>
<style lang="scss" scoped>
.page-wrapper {
min-height: calc(100vh - 88rpx);
background-color: #f7f7f7;
}
</style>

View File

@@ -0,0 +1,127 @@
<template>
<view class="page-wrapper">
<view class="page-header">
<JHeaderTitle title="应用支付配置" bgColor="#f7f7f7" />
<JSearchInput place="搜索应用支付方式代码、名称" @search="searchChannel" @resetSearch="resetSearch" />
</view>
<block v-for="(v, i) in configList" key="v.wayType">
<view class="pay-wrapper" @tap="refPay.open(params.appId, v.wayCode, i)">
<view class="title">
<view class="name">{{ v.wayName }}</view>
<view class="state" :class="{ 'no-config': v.isConfig == 0 }">{{ v.isConfig == 1 ? '已配置' : '未配置' }}</view>
</view>
<view class="sub-title">{{ v.wayCode }}</view>
</view>
</block>
<jeepayListNull :isShow="!hasNext" :list="[]" />
</view>
<JPopupCard ref="refPay" @upDataList="upDataList" />
</template>
<script setup>
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { reactive, ref } from 'vue'
import { $getPayConfig, $getPayChannelList } from '@/http/apiManager.js'
import JSearchInput from '@/components/newComponents/JSearchInput/JSearchInput.vue' //自定义搜索框
import JPopupCard from './components/JPopupCard.vue'
import JHeaderTitle from '@/components/newComponents/JHeaderTitle/JHeaderTitle'
onLoad((options) => {
params.appId = options.appId
getPayList()
})
const refPay = ref(null)
const configList = reactive([])
const params = {
pageSize: 10,
pageNumber: 1,
}
// 是否有下一页
let hasNext = undefined
const getPayList = () => {
$getPayConfig(params).then(({ bizData }) => {
hasNext = bizData.hasNext
configList.push(...bizData.records)
uni.stopPullDownRefresh()
})
}
// 更新列表
const upDataList = (val) => {
configList[val.index].isConfig = val.state
}
// 搜索
const searchChannel = (val) => {
configList.length = 0
params.pageNumber = 1
params.unionSearchId = val
getPayList()
}
// 重置搜索
const resetSearch = () => {
configList.length = 0
params.pageNumber = 1
params.unionSearchId = ''
getPayList()
}
onPullDownRefresh(() => {
configList.length = 0
params.pageNumber = 1
getPayList()
})
onReachBottom(() => {
if (!hasNext) return
params.pageNumber++
getPayList()
})
</script>
<style lang="scss" scoped>
.page-wrapper {
min-height: calc(100vh - 80rpx);
background-color: #f7f7f7;
.page-header {
position: sticky;
top: 0;
left: 0;
right: 0;
background-color: #f7f7f7;
}
.pay-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 40rpx;
height: 170rpx;
background-color: #fff;
.title {
display: flex;
justify-content: space-between;
.name {
font-size: 30rpx;
}
.state {
display: flex;
align-items: center;
font-size: 30rpx;
color: #808080;
&::after {
content: '';
display: block;
margin-left: 20rpx;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background-color: #168fff;
}
}
.no-config::after {
background-color: #d9d9d9;
}
}
.sub-title {
margin-top: 16rpx;
font-size: 26rpx;
color: #999;
}
}
}
</style>