新增了商户入驻,交易的独立页面
This commit is contained in:
parent
42145b1ab6
commit
18285ec6ac
@ -1,154 +1,144 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="all_box">
|
||||||
<u-sticky bgColor="#0022C7">
|
<u-sticky bgColor="#0022C7">
|
||||||
<u-tabs :list="tabLists" @click="changeCurrent" lineColor='white' :scrollable="false" lineWidth='20'
|
<u-tabs :list="tabLists" @click="changeCurrent" lineColor='white' :scrollable="false" lineWidth='20'
|
||||||
inactiveStyle='color:white' activeStyle="color:white"></u-tabs>
|
inactiveStyle='color:white' activeStyle="color:white"></u-tabs>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<view class="p_list">
|
<!-- <u-tabs style="background-color: #fff;" :list="typeTabLists" @click="changeTypeCurrent" lineColor='#0022C7' lineWidth='40'
|
||||||
<view class="card">
|
inactiveStyle='color:#0022C7' activeStyle="color:#0022C7"></u-tabs> -->
|
||||||
<view class="nav_bar">
|
<view v-if="check_status==2||check_status==3" class="p_list">
|
||||||
<view class="left">
|
<block v-for="(item,index) in list" :key="index">
|
||||||
<image src="../../static/img/company/company.png"></image>
|
<merchantAudit :datas="item"></merchantAudit>
|
||||||
<view>爱读蛋糕</view>
|
</block>
|
||||||
</view>
|
|
||||||
<view class="right" @click="navTo(`/subpkg/merchantDetails/merchantDetails?id=${id=1}`)">
|
|
||||||
<text>查看</text>
|
|
||||||
<u-icon name="arrow-right" size="12" color="#fff"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="body">
|
|
||||||
<view class="b_item name">
|
|
||||||
<view class="text"><view>商户姓名:</view> <view>某moods v你的伤口v技能大赛空军第三空间</view></view>
|
|
||||||
<view class="type">
|
|
||||||
<text v-if="true" style="color: #ff7c32;">未审核</text>
|
|
||||||
<text v-else-if="true" style="color: #47be62;">已通过</text>
|
|
||||||
<text v-else style="color: #FF0000;">未通过</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="b_item"><view>商户分类:</view> <view>商超</view></view>
|
|
||||||
<view class="b_item"><view>店铺分类:</view> <view>分类</view></view>
|
|
||||||
<view class="b_item"><view>镇街店铺:</view> <view>店铺</view></view>
|
|
||||||
<view class="b_item"><view>联系方式:</view> <view>1999999999</view></view>
|
|
||||||
<view class="b_item"><view>申请时间:</view> <view>2023-09-09</view></view>
|
|
||||||
<view class="img">
|
|
||||||
<image src="../../uni_modules/guyue-updater/assets/bg1.png"></image>
|
|
||||||
<image src="../../uni_modules/guyue-updater/assets/bg1.png"></image>
|
|
||||||
<image src="../../uni_modules/guyue-updater/assets/bg1.png"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<u-empty v-if="list.length==0&&loadConfig.status=='nomore'" icon="/static/img/empty/data.png"></u-empty>
|
||||||
|
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||||
|
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { Toast } from '@/libs/uniApi.js'
|
||||||
|
import { approveLists, approveTypes } from "@/api/approve.js"
|
||||||
|
import merchantAudit from '@/components/merchantAudit/merchantAudit.vue'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
merchantAudit
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabLists: [ {
|
tabLists: [ {
|
||||||
|
name: '审核中',
|
||||||
|
id: 1
|
||||||
|
}, {
|
||||||
|
name: '已通过',
|
||||||
|
id: 2
|
||||||
|
}, {
|
||||||
|
name: '未通过',
|
||||||
|
id: 3
|
||||||
|
}, {
|
||||||
name: '全部',
|
name: '全部',
|
||||||
}, {
|
id: 0
|
||||||
name: '未审核'
|
},],
|
||||||
}, {
|
typeTabLists: [],
|
||||||
name: '已开通'
|
current: 0,
|
||||||
|
currentID: 1, // 审核中,已通过,为通过,全部
|
||||||
|
typeCurrent: 0,
|
||||||
|
check_status: 0, // 审批类型
|
||||||
|
list: [],
|
||||||
|
loadConfig: {
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
lastpage: '',
|
||||||
|
loadingText: '努力加载中',
|
||||||
|
loadmoreText: '轻轻上拉',
|
||||||
|
nomoreText: '我也是有底线的~~',
|
||||||
|
status: 'loadmore'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: '未通过'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad() {
|
||||||
onShow() {},
|
// this.initType();
|
||||||
onPullDownRefresh() {
|
this.check_status = 2;
|
||||||
uni.stopPullDownRefresh()
|
this.initList();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
if(this.typeTabLists.length>0){
|
||||||
|
this.loadConfig.page = 1;
|
||||||
|
this.loadConfig.status = "loading";
|
||||||
|
this.list = [];
|
||||||
|
this.$u.sleep(200).then(()=>{
|
||||||
|
this.loadList();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onPullDownRefresh() {
|
||||||
|
await this.initList();
|
||||||
|
this.$u.sleep(200).then(()=>{
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.loadList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async initType(){
|
||||||
|
let res = await approveTypes();
|
||||||
|
res.data.forEach((item)=>{
|
||||||
|
if(item.id!=1) this.typeTabLists.push({
|
||||||
|
id: item.id,
|
||||||
|
name: item.title
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.check_status = this.typeTabLists[0].id;
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.initList();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async initList(){
|
||||||
|
this.loadConfig.page = 1;
|
||||||
|
this.loadConfig.status = "loadmore";
|
||||||
|
this.list = [];
|
||||||
|
await this.loadList();
|
||||||
|
},
|
||||||
|
async loadList(){
|
||||||
|
if (this.loadConfig.status == "nomore") return;
|
||||||
|
this.loadConfig.status = "loading";
|
||||||
|
let query = {
|
||||||
|
type: this.check_status,
|
||||||
|
page: this.loadConfig.page,
|
||||||
|
limit: this.loadConfig.limit
|
||||||
|
}
|
||||||
|
this.currentID?query.check_status=this.currentID:null;
|
||||||
|
let res = await approveLists(query);
|
||||||
|
this.loadConfig.status = "loadmore"
|
||||||
|
if (res.data.lists.length < this.loadConfig.limit) {
|
||||||
|
this.loadConfig.status = "nomore"
|
||||||
|
} else {
|
||||||
|
this.loadConfig.page++;
|
||||||
|
}
|
||||||
|
this.list = [...this.list, ...res.data?.lists];
|
||||||
|
},
|
||||||
changeCurrent(e) {
|
changeCurrent(e) {
|
||||||
this.current = e.index;
|
this.current = e.index;
|
||||||
|
this.currentID = e.id;
|
||||||
|
this.initList();
|
||||||
},
|
},
|
||||||
navTo (url) {
|
changeTypeCurrent(e) {
|
||||||
if (url) {
|
this.typeCurrent = e.index;
|
||||||
uni.navigateTo({
|
this.check_status = e.id;
|
||||||
url: url,
|
this.initList();
|
||||||
})
|
|
||||||
} else Toast('暂未开放')
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
|
.all_box {
|
||||||
|
padding-bottom: 21rpx;
|
||||||
|
}
|
||||||
.p_list{
|
.p_list{
|
||||||
padding-top: 28rpx;
|
padding-top: 28rpx;
|
||||||
.card{
|
|
||||||
margin: 0 auto;
|
|
||||||
margin-bottom: 28rpx;
|
|
||||||
width: 694rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 26rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
.nav_bar{
|
|
||||||
background-color: #0122c7;
|
|
||||||
padding: 28rpx;
|
|
||||||
color: #fff;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
.left{
|
|
||||||
display: flex;
|
|
||||||
font-size: 32rpx;
|
|
||||||
image{
|
|
||||||
width: 40rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
margin-right: 16rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.right{
|
|
||||||
display: flex;
|
|
||||||
font-size: 28rpx;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.body{
|
|
||||||
font-size: 28rpx;
|
|
||||||
padding: 28rpx;
|
|
||||||
.b_item{
|
|
||||||
padding-bottom: 16rpx;
|
|
||||||
display: flex;
|
|
||||||
view:nth-child(1){
|
|
||||||
flex-shrink: 0;
|
|
||||||
padding-right: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.name{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
.text{
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
view:nth-child(1){
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.type{
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.img{
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
image{
|
|
||||||
width: 200rpx;
|
|
||||||
height: 150rpx;
|
|
||||||
margin-right: 19rpx;
|
|
||||||
&:last-child{
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -1,23 +1,144 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class=""></view>
|
<view class="all_box">
|
||||||
|
<u-sticky bgColor="#0022C7">
|
||||||
|
<u-tabs :list="tabLists" @click="changeCurrent" lineColor='white' :scrollable="false" lineWidth='20'
|
||||||
|
inactiveStyle='color:white' activeStyle="color:white"></u-tabs>
|
||||||
|
</u-sticky>
|
||||||
|
<!-- <u-tabs style="background-color: #fff;" :list="typeTabLists" @click="changeTypeCurrent" lineColor='#0022C7' lineWidth='40'
|
||||||
|
inactiveStyle='color:#0022C7' activeStyle="color:#0022C7"></u-tabs> -->
|
||||||
|
<view v-if="check_status==2||check_status==3" class="p_list">
|
||||||
|
<block v-for="(item,index) in list" :key="index">
|
||||||
|
<merchantAudit :datas="item"></merchantAudit>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<u-empty v-if="list.length==0&&loadConfig.status=='nomore'" icon="/static/img/empty/data.png"></u-empty>
|
||||||
|
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||||
|
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { Toast } from '@/libs/uniApi.js'
|
||||||
|
import { approveLists, approveTypes } from "@/api/approve.js"
|
||||||
|
import merchantAudit from '@/components/merchantAudit/merchantAudit.vue'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
merchantAudit
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tabLists: [ {
|
||||||
|
name: '审核中',
|
||||||
|
id: 1
|
||||||
|
}, {
|
||||||
|
name: '已通过',
|
||||||
|
id: 2
|
||||||
|
}, {
|
||||||
|
name: '未通过',
|
||||||
|
id: 3
|
||||||
|
}, {
|
||||||
|
name: '全部',
|
||||||
|
id: 0
|
||||||
|
},],
|
||||||
|
typeTabLists: [],
|
||||||
|
current: 0,
|
||||||
|
currentID: 1, // 审核中,已通过,为通过,全部
|
||||||
|
typeCurrent: 0,
|
||||||
|
check_status: 0, // 审批类型
|
||||||
|
list: [],
|
||||||
|
loadConfig: {
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
lastpage: '',
|
||||||
|
loadingText: '努力加载中',
|
||||||
|
loadmoreText: '轻轻上拉',
|
||||||
|
nomoreText: '我也是有底线的~~',
|
||||||
|
status: 'loadmore'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad() {
|
||||||
onShow() {},
|
// this.initType();
|
||||||
methods: {},
|
this.check_status = 3;
|
||||||
onPullDownRefresh() {
|
this.initList();
|
||||||
uni.stopPullDownRefresh()
|
},
|
||||||
|
onShow() {
|
||||||
|
if(this.typeTabLists.length>0){
|
||||||
|
this.loadConfig.page = 1;
|
||||||
|
this.loadConfig.status = "loading";
|
||||||
|
this.list = [];
|
||||||
|
this.$u.sleep(200).then(()=>{
|
||||||
|
this.loadList();
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
async onPullDownRefresh() {
|
||||||
|
await this.initList();
|
||||||
|
this.$u.sleep(200).then(()=>{
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.loadList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async initType(){
|
||||||
|
let res = await approveTypes();
|
||||||
|
res.data.forEach((item)=>{
|
||||||
|
if(item.id!=1) this.typeTabLists.push({
|
||||||
|
id: item.id,
|
||||||
|
name: item.title
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.check_status = this.typeTabLists[0].id;
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.initList();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async initList(){
|
||||||
|
this.loadConfig.page = 1;
|
||||||
|
this.loadConfig.status = "loadmore";
|
||||||
|
this.list = [];
|
||||||
|
await this.loadList();
|
||||||
|
},
|
||||||
|
async loadList(){
|
||||||
|
if (this.loadConfig.status == "nomore") return;
|
||||||
|
this.loadConfig.status = "loading";
|
||||||
|
let query = {
|
||||||
|
type: this.check_status,
|
||||||
|
page: this.loadConfig.page,
|
||||||
|
limit: this.loadConfig.limit
|
||||||
|
}
|
||||||
|
this.currentID?query.check_status=this.currentID:null;
|
||||||
|
let res = await approveLists(query);
|
||||||
|
this.loadConfig.status = "loadmore"
|
||||||
|
if (res.data.lists.length < this.loadConfig.limit) {
|
||||||
|
this.loadConfig.status = "nomore"
|
||||||
|
} else {
|
||||||
|
this.loadConfig.page++;
|
||||||
|
}
|
||||||
|
this.list = [...this.list, ...res.data?.lists];
|
||||||
|
},
|
||||||
|
changeCurrent(e) {
|
||||||
|
this.current = e.index;
|
||||||
|
this.currentID = e.id;
|
||||||
|
this.initList();
|
||||||
|
},
|
||||||
|
changeTypeCurrent(e) {
|
||||||
|
this.typeCurrent = e.index;
|
||||||
|
this.check_status = e.id;
|
||||||
|
this.initList();
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
|
.all_box {
|
||||||
|
padding-bottom: 21rpx;
|
||||||
|
}
|
||||||
|
.p_list{
|
||||||
|
padding-top: 28rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
x
Reference in New Issue
Block a user