基于alipay用到的

1.在map。js里面新增路由组件

// 个人信息
import PersonMsg from '@/PersonMsg/PersonMsg'
import Risk from '@/Risk/Risk'

export default [{
  {
  path: '/personMsg',
  component: PersonMsg
}, {
  path: '/Risk',
  component: Risk
}

跳转到下一个页面

news.vue

this.$router.push('news/idverify')  (当前页面/要跳转的页面)

map.js

{
  path: 'center/news/idverify',  path:父页面/父页面/路由组件
  component: IdVerify
},

 

 

2.拼接字符串(密码)

data () {
      return {
        pwd1: '',
        pwd2: '',
        pwd3: '',
        pwd4: '',
        pwd5: '',
        pwd6: '',
        accountNo: '',
        isShow: false,
        passwords: ''
      }
    }
const passwords = `${that.pwd1}`
        const { accountNo, $router } = this
        window.Alipay.JSBridge.call('rpc', {
          operationType: 'com.ifp.bzs.flow.server.authenticationPasswordAction',
          requestData: [{
            accountNo,
            password: passwords
          }],
          headers: {}
        }, function (res) {
          if (res.dataMap.returnCode === ERR_OK) {
            if (res.dataMap.isBind === '1') {
              that.show()
              $router.push('PersonMsg')
            }
          }
        })

 input银行卡四位一个空格

 手机号码中间隐藏,显示两端

第一种:

{{msg.slice(0, 3)}}******{{msg.slice(-4)}}


第二种:使用filters过滤器
filters: {
    sum (str) {
      let start = str.slice(0, 3)
      let end = str.slice(-4)
      return `${start}******${end}`
    }
  },

 



  

转载于:https://www.cnblogs.com/summerXll/p/7647049.html

你可能感兴趣的:(基于alipay用到的)