| | |
| | | <script setup> |
| | | import { onMounted, ref } from "vue"; |
| | | import { BASE_URL } from '../../config/baseUrl'; |
| | | import { getVipInfoApi,getUserInfo,reportLossApi,removeCardApi,buyWaterApi } from '../../api/index.js' |
| | | import { getVipInfoApi,getUserInfo,reportLossApi,removeBindingApi,buyWaterApi } from '../../api/index.js' |
| | | import { onShow,getCurrentPages } from '@dcloudio/uni-app' |
| | | //状态栏高度 |
| | | const topHeight = ref(0) |
| | |
| | | cardInfo.value.userPhone = res.data.userInfo.userPhone |
| | | cardInfo.value.id = res.data.userInfo.id |
| | | await getVipInfo() |
| | | console.log('00000',cardInfo.value) |
| | | console.log('用户信息响应',res) |
| | | console.log('用户信息',cardInfo.value) |
| | | uni.setStorageSync('userInfo',JSON.stringify(cardInfo.value)) |
| | | } |
| | | }) |
| | |
| | | * 功能列表相关 |
| | | */ |
| | | const functionList = ref([ |
| | | //isUrl:1:页面跳转,2:弹窗功能,3:弹窗功能,4:未开发 |
| | | {text:'余额记录',icon:'../../static/images/index/icon31.png',bgColor:'#16b387',url:'/pages/functionList/balanceRecord/index',isUrl:1}, |
| | | {text:'消费记录',icon:'../../static/images/index/icon32.png',bgColor:'#329ae8',url:'/pages/functionList/paymentRecord/index',isUrl:1}, |
| | | {text:'充值记录',icon:'../../static/images/index/icon33.png',bgColor:'#f0a50e',url:'/pages/functionList/rechargeRecord/index',isUrl:1}, |
| | |
| | | } |
| | | }else if(isUrl == 3){ |
| | | if(cardInfo.value.waterCardNumber){ |
| | | //判断是否是分享卡:分享卡不许注销 |
| | | if(!isShareCard.value){ |
| | | uni.showModal({ |
| | | title: '会员卡注销', |
| | | content: '确认注销会员卡?', |
| | | success: async function(res) { |
| | | if (res.confirm) { |
| | | await removeCardApi(cardInfo.value.waterCardNumber).then(async(res) =>{ |
| | | await removeBindingApi(cardInfo.value.waterCardNumber).then(async(res) =>{ |
| | | if(res.code == 200){ |
| | | uni.showToast({ |
| | | title: '已注销', |
| | |
| | | </block> |
| | | </view> |
| | | </view> |
| | | <!-- <view @click="navTo('/pages/wxScanWater/index')">测试扫码取水</view> --> |
| | | <!-- 积分商城 --> |
| | | <view class="advertisement-box" @click="navTo('/pagesPoints/pointsMall/index')"> |
| | | <view class="point-advert"> |