123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>已绑详情-已绑收款码-创业帮</title>
- <meta name="keywords" content="已绑详情-已绑收款码-创业帮">
- <meta name="description" content="已绑详情-已绑收款码-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="已绑详情-已绑收款码-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- </head>
- <body class="bgcf5f5f5 pb0 ovh" style="padding-top:0; height:100vh;">
- <div id="app" v-cloak>
- <van-nav-bar class="mall_title bottom_line" title="已绑收款码" v-if="toptitleisshow" @click-left="goback">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <div class="ovx-y">
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="min-height:90vh;" :class="codelist.length === 0 ? 'isnodata':''">
- <van-empty class="custom-image" image="./static/images/no-data.png" description="您的门店暂未绑定收款码" v-if="codelist.length === 0 && flag"> </van-empty>
- <div class="bind_detail_collection">
- <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad" :immediate-check="false">
- <div class="bind_detail_collection_card df bgcfff" v-for="item,index in codelist" :key="index"><img src="./static/images/index-collectioncode.png" alt="">
- <div class="card_info">
- <div class="df">
- <div class="f14 c333 name">绑定门店: {{item.MerchantName}}</div>
- </div>
- <div class="df">
- <nobr class="f12 c999 title">绑定时间</nobr>
- <div class="f12 c999 content">{{item.BindDate}}</div>
- </div>
- <div class="df">
- <nobr class="f12 c999 title">SN码</nobr>
- <div class="f12 c999 content">{{item.SnNo}}</div>
- </div>
- <div class="df"></div>
- </div>
- <div class="card_btn f14" v-if="item.BindFlag === 0" @click="gorelation(item.Id)">去关联</div>
- <div class="card_btn_un f14" v-else @click="removecollection(item.Id)">解除关联</div>
- </div>
- </van-list>
- </div>
- </van-pull-refresh>
- </div>
- <van-dialog style="border-radius:10px;" confirm-button-color="#FD824D" width="300" theme="round-button" confirm-button-text="确定" v-model="examinedialogisshow" title="解除关联失败" message="此收款码为音响码,替换后方可解除关联" @confirm="examinedialogisshow = false"> </van-dialog>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script>
- function OnStart(){
- app.onstartcollectionlist();
- };
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- flag:false,
- toptitleisshow:false,
- examinedialogisshow:false,
- loading: false,
- finished: false,
- refreshing: false,
- codelist:[],
- pageinfo:{
- PageSize:10,
- PageNum:1,
- },
- unbindid:'',
- };
- },
- created() {
- this.toptitleisshow = toptitleisshow;
- this.getcollectionlist();
- },
- methods: {
- goback(){
- PublicLib.GoBack({Level:1});
- },
- onRefresh(){
- this.loading = true;
- this.refreshing = true;
- this.onLoad();
- },
- onLoad() {
- if (this.refreshing) {
- this.codelist = [];
- this.refreshing = false;
- this.pageinfo.PageNum = 0;
- }
- this.pageinfo.PageNum++;
- this.getcollectionlist();
- },
- gorelation(id){
- this.codelist = [];
- PublicLib.putCookieInfo('collectionId', id);
- PublicLib.Goto({Url:'bind-detail-sound-relation'});
- },
- //- 已绑二维码列表
- async getcollectionlist(){
- let MerchantId = PublicLib.getCookieInfo('userId')
- const res = await getRequest('/api/v1/merchantqrcode/list?t='+Math.random(6),JSON.stringify({...this.pageinfo,MerchantId}));
- if(res.status !== '1') return tips(res.info);
- if(res.data.length < this.pageinfo.PageSize){
- this.finished = true;
- };
- this.flag = true;
- this.codelist.push(...res.data);
- this.loading = false;
- },
- //- 已绑二维码列表
- async onstartcollectionlist(){
- this.pageinfo.PageNum = 1;
- let MerchantId = PublicLib.getCookieInfo('userId')
- const res = await getRequest('/api/v1/merchantqrcode/list?t='+Math.random(6),JSON.stringify({...this.pageinfo,MerchantId}));
- if(res.status !== '1') return tips(res.info);
- if(res.data.length < this.pageinfo.PageSize){
- this.finished = true;
- };
- this.flag = true;
- this.codelist = res.data;
- this.loading = false;
- },
- //- 解除二维码绑定
- removecollection(Id){
- PublicLib.putCookieInfo('unbindqrcode', Id);
- PublicLib.ShowDialog({
- Title:'解除关联',
- Message:'是否解除关联二维码?',
- ConfirmText:'解除关联',
- CancelText:'暂不解除',
- ConfirmAction:'app.removefn()',
- CanelAction:''
- });
- },
- async removefn(){
- const Id = PublicLib.getCookieInfo("unbindqrcode")
- const MerchantId = PublicLib.getCookieInfo('userId')
- const res = await postRequest('/api/v1/merchantqrcode/remove?t='+Math.random(6),JSON.stringify({Id,MerchantId}));
- if(res.status !== '1') {
- this.examinedialogisshow = true
- }else{
- tips('解除关联成功')
- //- 解除关联操作
- this.codelist.forEach(item=>{
- if(item.Id == Id){
- item.BindFlag = 0;
- };
- });
- };
- },
- }
- });
- </script>
- </body>
- </html>
|