| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <template>
- <view class="page">
- <!-- 钱包 -->
- <view class="recharge-me ">
- <view class="wallet-content">
- <view class="h-balance-wrap">
- <view class="h-balance">
- <!-- <view v-if="type == 1" class="recharge-balance">-->
- <!-- <view class="name">已用额度</view>-->
- <!-- <view class="Number" style="font-size: 48rpx">{{ data.amount || 0 }}</view>-->
- <!-- </view>-->
- <!-- <view v-if="type == 2" class="recharge-balance">-->
- <!-- <view class="name">剩余额度</view>-->
- <!-- <view class="Number" style="font-size: 48rpx">{{ data.totalBalance || 0 }}</view>-->
- <!-- </view>-->
- <view class="recharge-balance">
- <view class="name">累计消费</view>
- <view class="Number" style="font-size: 48rpx">{{ data.totalAmount || 0 }}</view>
- </view>
- <text class="openUnbind" @click="openUnbindpopup">解绑</text>
- </view>
- <view class="cardMsg flex-row">
- <text>赠送会员编号:</text>
- <text>{{ data.userNo }}</text>
- </view>
- <view class="cardMsg flex-row ">
- <text v-if="type == 1">赠送时间:</text>
- <text v-if="type == 2">收到时间:</text>
- <text>{{ data.createTime }}</text>
- </view>
- </view>
- <view v-if="data.id && type == 1">
- <text class="record">使用记录</text>
- <mescroll-item ref="MescrollItem" :i="0" :index="0" :cardId="data.id" :height="scrollViewHeight">
- </mescroll-item>
- </view>
- </view>
- </view>
- <uni-popup ref="unbindpopup" type="dialog">
- <uni-popup-dialog type="warn" title="警告" content="请确认是否要解除绑定该亲情卡" @confirm="untieCard"
- ></uni-popup-dialog>
- </uni-popup>
- </view>
- </template>
- <script>
- import MescrollItem from "./module/mescrollUni-item.vue";
- export default {
- components: {
- MescrollItem
- },
- data() {
- return {
- type:0,
- data: {},
- scrollViewHeight: '',
- };
- },
- onLoad(option) {
- this.type = option.type;
- this.data = JSON.parse(option.data)
- console.log(this.data)
- let sysInfo = uni.getSystemInfoSync()
- this.scrollViewHeight = sysInfo.windowHeight - (sysInfo.windowWidth / 750) * 500 + 'px'
- console.log(' this.scrollViewHeight', this.scrollViewHeight)
- },
- onShow() {
- },
- methods: {
- openUnbindpopup() {
- this.$refs.unbindpopup.open()
- },
- //解除绑定
- untieCard() {
- console.log(this.data)
- this.$api.untieCard({
- cardId: this.data.id
- }).then((res) => {
- uni.showToast({
- icon: 'success',
- duration: 2000,
- title: '解绑成功'
- });
- setTimeout(() => {
- uni.redirectTo({
- url: '/myPages/familyCard/index'
- });
- }, 2000)
- })
- },
- },
- };
- </script>
- <style scoped lang="scss">
- @import '../../../common/css/common.css';
- @import './familyCard.scss';
- </style>
|