1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <template>
- <view>
- <van-radio-group >
- <van-cell-group
- v-for="(item, index) in list"
- :key="index"
- >
- <van-cell
- :title="item.title"
- @click="onChange(index)"
- >
- <template slot="icon" style="padding-right: 10upx;">
- <van-radio-group :value="radio" >
- <van-radio checked-color="#D9332E" :name="index" >
- </van-radio>
- </van-radio-group>
- </template>
- </van-cell>
- </van-cell-group>
- </van-radio-group>
- <view class="payMoney">支付</view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- list:[
- {title:'微信支付'},
- {title:'支付宝支付'},
- {title:'圈币支付'}
- ],
- radio: 0
- }
- },
- methods: {
- onChange(index) {
- this.radio = index;
- },
- payMoney() {
- if(this.radio == 0) {
- // 微信支付
- }else if(this.radio == 1) {
- // 支付宝支付
- }else {
- // 圈币支付
- }
- }
- }
- }
- </script>
- <style>
- .payMoney {
- width: 90%;
- color: #fff;
- background-color: #D9332E;
- position: fixed;
- text-align: center;
- padding: 20upx 0;
- bottom: 5%;
- left: 5%;
- }
- </style>
|