美文网首页
二选一 选择支付方式 vue实现

二选一 选择支付方式 vue实现

作者: daoqing99 | 来源:发表于2017-03-08 15:31 被阅读0次
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
    .paymentweixin {
        width: 100%;
        height: 72px;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
    }
    
    .paymentweixinimg {
        width: 45px;
        margin-top: 15px;
        margin-left: 10px;
    }
    
    .queren {
        width: 25px;
        position: absolute;
        top: 25px;
        right: 15px;
    }
    </style>
</head>

<body>
    <div id='payMethod'>
        <div class="paymentweixin" @click="weixin">
            <img Arc="weixin.png" class="paymentweixinimg" />
            <img Arc="quren.png" v-show="isShowA" class="queren" />
            <img Arc="cancel.png" v-show="isShowB" class="queren" />
        </div>
        <div class="paymentweixin" @click="zhifubao">
            <img Arc="zhifubao.png" class="paymentweixinimg" />
            <img Arc="cancel.png" v-show="isShowA" class="queren" />
            <img Arc="quren.png" v-show="isShowB" class="queren" />
        </div>
    </div>
    <script src="http://cdn.bootcss.com/vue/1.0.28/vue.js"></script>
    <script type="text/javascript">
    //http://om1gg1n7c.bkt.clouddn.com/quren.png
    //http://om1gg1n7c.bkt.clouddn.com/cancel.png
    //http://om1gg1n7c.bkt.clouddn.com/zhifubao.png
    //http://om1gg1n7c.bkt.clouddn.com/weixin.png
    //          选择支付方式
    var vm = new Vue({
        el: "#payMethod",
        data: {
            isShowA: true,
            isShowB: false
        },
        methods: {
            weixin: function() {
                if (this.isShowA) {
                    this.isShowA = true;
                    this.isShowB = false;
                } else {
                    this.isShowA = true;
                    this.isShowB = false;
                }
            },
            zhifubao: function() {
                if (this.isShowA) {
                    this.isShowA = false;
                    this.isShowB = true;
                }
            }
        }
    })
    </script>
</body>

</html>

相关文章

  • 二选一 选择支付方式 vue实现

  • vue项目的创建

    一、vue create 项目名称 二、选择项目配置(以下是根据自己情况选择) 2.1、选择vue版本,这里选vu...

  • 组件的v-model

    1.组件的v-model App.vue HyInput.vue 2. 实现v-model 方式一: 方式二: 3...

  • 二、Vue数据绑定

    一、环境准备 jQuery依赖环境 Vue依赖环境 二、计数器 jQuery实现方式html js css Vue...

  • 新手支付对接流程重点

    一,选择适合自己支付方式 不同场景选择不同的支付方式,手机端选择H5支付,PC端选择扫码支付或者网银支付。...

  • IOS接入Stripe支付

    简单写一下,能最快的实现支付。 步骤为:加卡->选择支付方式->发起支付(或使用ApplePay) 1.加卡 加卡...

  • 11Vue.js实现全选与反选

    vue实现全选与反选 示例效果: 实现代码:

  • vue总结

    vue路由守卫 vue实现双向绑定原理 Vue生命周期: vue跨域方式 vue-router实现原理 vue-r...

  • 再一次实战策略模式,真是太好用了

    前言 之前做三方支付系统的时候经常用到策略模式,比如用户会选择不同的支付方式,不同的支付方式又有不同的实现方法或银...

  • 银联支付实现(简述)

    Apple Pay 支付的实现方式 Apple Pay 支付的实现方式 1-2. 商户生成订单,通过商户 SERV...

网友评论

      本文标题:二选一 选择支付方式 vue实现

      本文链接:https://www.haomeiwen.com/subject/pdbbgttx.html