Liuyi
2024-11-12 0ed8e370659ad4e0582301ae31cfa155da114590
添加柜台充值,修改扫码取水支付方式
已修改21个文件
已添加3个文件
1017 ■■■■ 文件已修改
App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/address/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/counterRecharge/index.vue 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/functionList/balanceRecord/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/functionList/paymentRecord/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/functionList/rechargeRecord/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.vue 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/recharge/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/scanSuccess/index.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/scanWater/index.vue 356 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/success/index.vue 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/images/other/icon_pay.png 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/api/index.js 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/app.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/app.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/common/assets.js 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/common/vendor.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/pages/address/index.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/pages/address/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/pages/index/index.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/pages/index/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/mp-weixin/pages/recharge/index.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
App.vue
@@ -4,7 +4,7 @@
    
    //用户打开小程序默认授权
    function wxLogin(){
        uni.removeStorageSync('openId');
        // uni.removeStorageSync('openId');
        if(!uni.getStorageSync('openId')){
            wx.login({
                success:async (res1)=>{
api/index.js
@@ -102,4 +102,13 @@
export function buyWaterApi(data){
    return request('/api/facility/buyWater',data,'POST')
}
//水卡充值
export function rechargeApi(data){
    return request('/rechargeRecords/fees',data,'POST')
}
pages.json
@@ -6,12 +6,12 @@
                "navigationStyle":"custom"
            }
        },
        {
            "path" : "pages/addCard/index",
            "style": {
                "navigationStyle":"custom"
            }
        },
        // {
        //     "path" : "pages/addCard/index",
        //     "style": {
        //         "navigationStyle":"custom"
        //     }
        // },
        {
            "path" : "pages/userInfo/index",
            "style": {
@@ -84,12 +84,12 @@
                "navigationStyle":"custom"
            }
        },
        {
            "path" : "pages/addressAdd/index",
            "style": {
                "navigationStyle":"custom"
            }
        },
        // {
        //     "path" : "pages/addressAdd/index",
        //     "style": {
        //         "navigationStyle":"custom"
        //     }
        // },
        {
            "path" : "pages/addressLocate/index",
            "style": {
@@ -125,6 +125,18 @@
            "style": {
                "navigationStyle":"custom"
            }
        },
        {
            "path" : "pages/scanSuccess/index",
            "style": {
                "navigationStyle":"custom"
            }
        },
        {
            "path" : "pages/counterRecharge/index",
            "style": {
                "navigationStyle":"custom"
            }
        }
    ],
    "globalStyle": {
pages/address/index.vue
@@ -94,7 +94,8 @@
                    </view>
                </block>
            </view>
            <view class="subBtn" @click="navToAdd()">新增收货地址</view>
            <!-- <view class="subBtn" @click="navToAdd()">新增收货地址</view> -->
            <view class="subBtn">新增收货地址</view>
        </view>
    </view>
</template>
pages/counterRecharge/index.vue
对比新文件
@@ -0,0 +1,105 @@
<template>
    <view class="container">
        <navbar title="柜台充值"></navbar>
        <view class="content">
            <view class="title1">青河直饮水</view>
            <image src='../../static/images/other/icon_pay.png'></image>
            <view class="title2">柜台充值</view>
        </view>
    </view>
</template>
<script setup>
    import { onLoad } from "@dcloudio/uni-app"
    import{ ref ,onMounted} from 'vue'
    import { wxPayApi } from '../../api/index.js'
    const orderId = ref()
    onLoad((query) =>{
        let url = decodeURIComponent(query.q)
        orderId.value = url.split('=')[1]
        console.log('订单号',orderId.value)
    })
    async function counterRecharge(){
        let data = {
            businessType:1,
            businessNo:orderId.value
            }
        //发起支付
        await wxPayApi(data).then((res) =>{
            if(res.code == 200){
                //调用微信官方支付接口弹出付款界面,输入密码扣款
                wx.requestPayment({
                  //预支付订单信息
                  // appId: res.data.appId,
                  timeStamp: res.data.timeStamp,     //时间戳
                  nonceStr: res.data.nonceStr,      //随机串
                  package: res.data.package,        //prepay_id
                  signType: res.data.signType,        //签名算法MD5
                  paySign: res.data.paySign ,//微信签名
                 success (res) {
                   if (res.errMsg == "requestPayment:ok"){
                      console.log('支付成功', res)
                      uni.showToast({
                        title: '支付成功',
                        duration: 2000,
                      });
                      uni.navigateTo({
                          url:'/pages/success/index'
                      })
                   }else{
                      uni.showToast({
                        title: '支付失败',
                        duration: 2000,
                        icon:'none'
                      });
                   }
                 },
                 fail (res) {
                   uni.showToast({
                        title: '微信支付失败',
                        duration: 2000,
                        icon:'none'
                   });
                 }
                })
            }
        })
    }
    onMounted(async() =>{
        await counterRecharge()
    })
</script>
<style lang="scss" scoped>
    .container{
        width: 100%;
        height: 100vh;
        .content{
            width: 100%;
            height:calc(100vh - 176rpx);
            background:linear-gradient(to top,#FFFFFF,#d5e3ff);
            overflow-y:scroll;
            display:flex;
            justify-content:flex-start;
            align-items:center;
            flex-direction: column;
            padding-top:60rpx;
            box-sizing: border-box;
            .title1{
                margin-bottom:20rpx;
                color: #3f85da;
                font-size:50rpx;
            }
            .title2{
                margin-bottom:20rpx;
                color: #696c6f;
                font-size:32rpx;
            }
            image{
                width:256rpx;
                height:256rpx;
                opacity:0.6;
            }
            }
    }
</style>
pages/functionList/balanceRecord/index.vue
@@ -71,8 +71,8 @@
                </picker>
            </view>
            <view class="date-money">
                <text>支出¥{{expendSta}}</text>
                <text>充值¥{{rechargeSta}}</text>
                <text>支出:{{expendSta}}元</text>
                <text>充值:{{rechargeSta}}元</text>
            </view>
        </view>
        <view class="main" v-if="banlanceList.length > 0">
@@ -88,7 +88,7 @@
                            <text class="money" :style="setStyleMoney(item.business)">{{item.changeMoney}}</text>
                            <text>元</text>
                        </view>
                        <text>{{item.beforeMoney}}</text>
                        <text>余额:{{item.afterMoney}}</text>
                    </view>
                </view>
            </block>
pages/functionList/paymentRecord/index.vue
@@ -62,7 +62,7 @@
                    </view>
                </picker>
            </view>
            <view class="payAll">消费¥:{{expendSta}}</view>
            <view class="payAll">消费:{{expendSta}}元</view>
        </view>
        <view class="main" v-if="banlanceList.length > 0">
            <block v-for="(item,index) in banlanceList">
pages/functionList/rechargeRecord/index.vue
@@ -62,7 +62,7 @@
                    </view>
                </picker>
            </view>
            <view class="rechargeAll">充值¥:{{rechargeSta}}</view>
            <view class="rechargeAll">充值:{{rechargeSta}}元</view>
        </view>
        <view class="main" v-if="banlanceList.length > 0">
            <block v-for="(item,index) in banlanceList">
pages/index/index.vue
@@ -24,6 +24,7 @@
        balance:'',
        count:'',
        state:'',//state:true:挂失,false:正常
        cardType:'',//卡类型01卡消费 02计次消费 03游客消费 04电子卡
        userCardType:'',//userCardType:true:共享卡,false:正常卡
    })
    // const showHeadImg = ref(BASE_URL + '/upload' + cardInfo.value.headImg)
@@ -76,23 +77,26 @@
            scanType: ['qrCode'],
            success: async function (res) {
                console.log('条码内容:' + res.result);
                let data = {
                    cardType:cardInfo.value.cardType,
                    card:cardInfo.value.waterCardNumber,
                    sn:res.result
                }
                await buyWaterApi(data).then((res) =>{
                    if(res.code == 200){
                        uni.navigateTo({
                            url:'/pages/scanWater/index'
                // let data = {
                //     cardType:cardInfo.value.cardType,
                //     card:cardInfo.value.waterCardNumber,
                //     sn:res.result
                // }
                // await buyWaterApi(data).then((res) =>{
                //     if(res.code == 200){
                //         uni.navigateTo({
                //             url:'/pages/scanWater/index'
                //         })
                //     }else{
                //         uni.showToast({
                //             title:'扫码失败!',
                //             icon:'none'
                //         })
                //     }
                // })
                uni.navigateTo({
                            url:`/pages/scanWater/index?facilityCode=${res.result}`
                        })
                    }else{
                        uni.showToast({
                            title:'扫码失败!',
                            icon:'none'
                        })
                    }
                })
            }
        });
    }
@@ -107,7 +111,7 @@
        {text:'故障上报',icon:'../../static/images/index/icon35.png',bgColor:'#a88ff1',url:'/pages/infoBreakdown/index',isUrl:1},
        {text:'优惠卷',icon:'../../static/images/index/icon36.png',bgColor:'#18bfc4',url:'',isUrl:4},
        {text:'会员卡挂失',icon:'../../static/images/index/icon37.png',bgColor:'#4875f0',url:'',isUrl:2},
        {text:'会员卡注销',icon:'../../static/images/index/icon38.png',bgColor:'#f45088',url:'',isUrl:3},
        {text:'会员卡解绑',icon:'../../static/images/index/icon38.png',bgColor:'#f45088',url:'',isUrl:3},
    ])
    function navTo(itemUrl){
        if(itemUrl){
@@ -249,7 +253,8 @@
                    <image v-else class="user-img" src='../../static/images/index/head.png' alt=''></image>
                    <text @click="navTo('/pages/userInfo/index')">{{cardInfo.userName}}</text>
                    <image @click="navTo('/pages/userInfo/index')" class="user-more"src="../../static/images/index/back.png"></image>
                    <view class="user-add-card" @click="navTo('/pages/addCard/index')">
                    <!-- <view class="user-add-card" @click="navTo('/pages/addCard/index')"> -->
                    <view class="user-add-card">
                        <image src='../../static/images/index/vip-add.png' alt=''></image>
                        <text>添加会员卡</text>
                    </view>
@@ -285,21 +290,13 @@
                </view>
            </view>
            <view class="function-box1">
                <view class="box1-bg box1-one" @click="upGrade()">
                <view class="box1-bg box1-one" @click="navTo('/pages/sendWater/index')">
                    <image src="../../static/images/index/home21.png" alt=""></image>
                    <view>送水到家</view>
                </view>
                <view @click="navTo('/pages/facilityList/index')" class="box1-bg box1-two">
                    <image src="../../static/images/index/icon22.png" alt=""></image>
                    <view>附近设备</view>
                    <!-- <view>账户余额(元)</view>
                    <view class="recharge">
                        <text>¥</text>
                        <text>120.00</text>
                    </view>
                    <view @click="navTo('/pages/recharge/index')">
                        充值
                    </view> -->
                </view>
                <view class="box1-bg box1-three" @click="toScan()">
                    <image src="../../static/images/index/icon23.png" alt=""></image>
@@ -332,7 +329,8 @@
                            <image src="../../static/images/index/more-info5.png" alt=""></image>
                        </view>
                    </view>
                    <view class="service-bg" @click="upGrade">
                    <!-- <view class="service-bg" @click="upGrade"> -->
                    <view class="service-bg" @click="navTo('/pages/counterRecharge/index')">
                            <view>
                                <image src="../../static/images/index/notice5.png" alt=""></image>
                                <text>公示公告</text>
pages/recharge/index.vue
@@ -1,9 +1,10 @@
<script setup>
    import{ ref ,onMounted} from 'vue'
    import { wxPayApi } from '../../api/index.js'
    import { wxPayApi,rechargeApi } from '../../api/index.js'
    
    const choosedMoney = ref(50)
    const disabled = ref(true)
    const userInfo = JSON.parse(uni.getStorageSync('userInfo'))
    //选择金额
    const moneyList = ref([
        {value:50,active:true},
@@ -58,7 +59,27 @@
        }else{
            money = Number(otherMoney.value)
        }
        await wxPayApi({businessType:1,tradeAmount:money}).then((res) =>{
        let data = {
                cardNumber:userInfo.waterCardNumber,
                paymentMethod:1,
                rechargeAmount:money
            }
        //生成订单
        await rechargeApi(data).then(async(res) =>{
            if(res.code == 200){
                let data = {
                    businessType:1,
                    businessNo:res.data
                    }
                //发起支付
                await wxPay(data)
            }
        })
    }
    //微信支付
    async function wxPay(data){
        await wxPayApi(data).then((res) =>{
            if(res.code == 200){
                //调用微信官方支付接口弹出付款界面,输入密码扣款
                wx.requestPayment({
pages/scanSuccess/index.vue
对比新文件
@@ -0,0 +1,63 @@
<template>
    <view class="container">
        <navbar title ='扫码成功'></navbar>
        <view class="content">
            <view class="img-box">
                <image class="img" src="../../static/images/other/success.png" alt=""></image>
                <view class="text text1">操作成功~</view>
            </view>
            <view class="text">请在设备上操作</view>
            <view class="back" @click="navBack()">返回首页</view>
        </view>
    </view>
</template>
<script setup>
    function navBack(){
        uni.navigateBack()
    }
</script>
<style lang="scss">
    .container{
        width: 100%;
        height: 100vh;
        .content{
            width: 100%;
            height:calc(100vh - 176rpx);
            background:linear-gradient(to top,#FFFFFF,#E8EFFF);
            box-sizing: border-box;
            display: flex;
            padding:200rpx 0 600rpx;
            justify-content: space-between;
            flex-direction: column;
            align-items: center;
            .img-box{
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
            }
             .img{
                 width:580rpx;
                 height: 385rpx;
             }
             .text{
                 font-weight: 300;
                 font-size: 32rpx;
                 color: #548AFF;
             }
             .back{
                 width: 300rpx;
                 height: 80rpx;
                 background: #FFFFFF;
                 border:1rpx solid rgba(95, 117, 244, 0.6);
                 color: #548AFF;
                 border-radius:40rpx;
                 line-height:80rpx;
                 text-align: center;
             }
        }
    }
</style>
pages/scanWater/index.vue
@@ -1,63 +1,329 @@
<script setup>
    import{ ref ,onMounted} from 'vue'
    import { wxPayApi,buyWaterApi } from '../../api/index.js'
    import { onLoad } from "@dcloudio/uni-app"
    const choosedMoney = ref(1)
    //选择金额
    const moneyList = ref([
        {value:1,volume:2.5,active:true},
        {value:2,volume:5,active:false},
        {value:3,volume:7.5,active:false},
    ])
    const activeStyle = ref({
        backgroundColor:'rgba(148,201,243)',
        color:'#fff'
    })
    function chooseMoney(index1){
        moneyList.value.forEach((item,index) =>{
            if(item.active == true){
                item.active = false
            }
        })
        moneyList.value[index1].active = true
        choosedMoney.value = moneyList.value[index1].value
        // if(index1 == 5){
        //     disabled.value = false
        //     choosedMoney.value = ''
        // }else{
        //     choosedMoney.value = moneyList.value[index1].value
        //     otherMoney.value = ''
        //     disabled.value = true
        // }
    }
    //输入金额
    // const otherMoney = ref()
    //支付方式
    const userBalance = ref(JSON.parse(uni.getStorageSync('userInfo')).balance)
    const payMethod = ref(2)
    const payList = ref([
        // {text:"支付宝支付",value:1,checked:true,img:'../../static/images/recharge/pay.png'},
        {text:"微信支付",value:2,checked:true,img:'../../static/images/recharge/wx.png'},
        {text:"余额",value:1,checked:false,img:'../../static/images/recharge/balance.png'},
    ])
    function choosePay(index1){
        payList.value.forEach((item,index) =>{
            if(item.checked == true){
                item.checked = false
            }
        })
        payList.value[index1].checked = true
        payMethod.value = payList.value[index1].value
        console.log('index',index1,payMethod.value)
    }
    async function submit(){
        // let money = ''
        // if(disabled.value){
            // money = choosedMoney.value
        // }else{
        //     money = Number(otherMoney.value)
        // }
        if(payMethod.value == 1){
            let data = {
                payType:payMethod.value,
                card:JSON.parse(uni.getStorageSync('userInfo')).waterCardNumber,
                amount:choosedMoney.value,
                // sn:1060003979
                sn:facilityCode.value
                }
            await buyWaterApi(data).then((res) =>{
                console.log('余额',res,data)
                if(res.code == 200){
                        uni.navigateTo({
                            url:'/pages/scanSuccess/index'
                        })
                    }else{
                        uni.showToast({
                            title:'支付失败!',
                            icon:'none'
                        })
                    }
            })
        }else if(payMethod.value == 2){
            let data = {
                businessType:3,
                tradeAmount:choosedMoney.value,
                // facilityCode:'1066012684',
                facilityCode:facilityCode.value,
                }
                console.log('data',data)
            await wxPayApi(data).then((res) =>{
                console.log('微信',res,'data',data)
                if(res.code == 200){
                    //调用微信官方支付接口弹出付款界面,输入密码扣款
                    wx.requestPayment({
                      //预支付订单信息
                      // appId: res.data.appId,
                      timeStamp: res.data.timeStamp,     //时间戳
                      nonceStr: res.data.nonceStr,      //随机串
                      package: res.data.package,        //prepay_id
                      signType: res.data.signType,        //签名算法MD5
                      paySign: res.data.paySign ,//微信签名
                     success (res) {
                       if (res.errMsg == "requestPayment:ok"){
                          console.log('支付成功', res)
                          uni.showToast({
                            title: '支付成功',
                            duration: 2000,
                          });
                         uni.navigateTo({
                             url:'/pages/scanSuccess/index'
                         })
                       }else{
                          uni.showToast({
                            title: '支付失败',
                            duration: 2000,
                            icon:'none'
                          });
                       }
                     },
                     fail (res) {
                       uni.showToast({
                            title: '微信支付失败',
                            duration: 2000,
                            icon:'none'
                       });
                     }
                    })
                }
            })
        }
    }
    const facilityCode = ref()
    onLoad((option) =>{
        facilityCode.value = option.facilityCode
    })
</script>
<template>
    <view class="container">
        <navbar title ='扫码成功'></navbar>
        <navbar title="扫码取水"></navbar>
        <view class="content">
            <view class="img-box">
                <image class="img" src="../../static/images/other/success.png" alt=""></image>
                <view class="text text1">操作成功~</view>
            <view class="main">
                <view class="money">
                    <view class="money-title">
                        <view class="title-icon"></view>
                        <view class="title-text">选择</view>
                    </view>
                    <view class="money-list">
                        <block v-for="(item,index) in moneyList" :key="index">
                            <view class="money-box" :style="item.active ? activeStyle : ''" @click="chooseMoney(index)">
                                <view>{{item.value}}<span>元</span></view>
                                <view>{{item.volume}}<span>L</span></view>
                            </view>
                        </block>
                    </view>
                </view>
                <!-- <view class="other-money">
                    <view class="money-title">
                        <view class="title-icon"></view>
                        <view class="title-text">其他金额</view>
                    </view>
                    <view class="money-input">
                        <input :disabled = 'disabled' :focus = '!disabled'  placeholder="请输入其他金额" v-model="otherMoney"/>
                    </view>
                </view> -->
                <view class="pay-methods">
                    <view class="money-title">
                        <view class="title-icon"></view>
                        <view class="title-text">请选择支付方式</view>
                    </view>
                    <view class="methods-list">
                        <block v-for="(item,index) in payList">
                            <view class="pay-item">
                                <view class="pay-item-right">
                                    <image :src="item.img" alt=""></image>
                                    <view>{{item.text}}</view>
                                    <view style="margin-left:10rpx;color:#5EA1FA;" v-if="item.value == 1">({{userBalance}})</view>
                                </view>
                                <radio :value="item.value" :checked="item.checked" @click="choosePay(index)"/>
                            </view>
                        </block>
                    </view>
                </view>
            </view>
            <view class="text">请在设备上操作</view>
            <view class="back" @click="navBack()">返回首页</view>
            <view class="submit-btn" @click="submit()">确认支付</view>
        </view>
    </view>
</template>
<script setup>
    function navBack(){
        uni.navigateBack()
    }
</script>
<style lang="scss">
<style lang="scss" scoped>
    .container{
        width: 100%;
        height: 100vh;
        .content{
            width: 100%;
            height:calc(100vh - 176rpx);
            background:linear-gradient(to top,#FFFFFF,#E8EFFF);
            box-sizing: border-box;
            display: flex;
            padding:200rpx 0 600rpx;
            justify-content: space-between;
            flex-direction: column;
            align-items: center;
            .img-box{
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
            background:linear-gradient(to top,#FFFFFF,#E8EFFF);
            overflow-y: scroll;
            .main{
                width: 686rpx;
                height:1262rpx;
                background: #FFFFFF;
                border-top-right-radius: 24rpx;
                border-top-left-radius: 24rpx;
                margin: 20rpx auto 0;
                padding:0 25rpx;
                box-sizing: border-box;
                .money{
                    width: 100%;
                    height:420rpx;
                    padding-top: 58rpx;
                    // background: #65ffb2;
                    box-sizing: border-box;
                    .money-list{
                        margin-top:30rpx;
                        width:100%;
                        height: 290rpx;
                        padding: 0 20rpx;
                        box-sizing: border-box;
                        display: flex;
                        flex-direction: column;
                        justify-content: space-between;
                        align-items: center;
                        .money-box{
                            width:94%;
                            height:86rpx;
                            border:2rpx solid #75C8EB;
                            border:2rpx solid rgba(148,201,243);
                            border-radius: 8rpx;
                            font-weight: 300;
                            font-size: 28rpx;
                            color: #4EB6E3;
                            display: flex;
                            align-items: center;
                            padding: 0 20px;
                            box-sizing: border-box;
                            justify-content:space-between;
                            font-weight:600;
                            letter-spacing:5rpx;
                            font-size:32rpx;
                        }
                    }
                }
                // .other-money{
                //     width: 100%;
                //     height:164rpx;
                //     margin-top:58rpx;
                //     .money-input{
                //         margin:40rpx auto 0;
                //         width:calc(100% - 40rpx);
                //         height: 80rpx;
                //         box-sizing: border-box;
                //         border-radius:8rpx;
                //         border: 2rpx solid #75C8EB;
                //         input{
                //             width:94%;
                //             height: 80rpx;
                //             margin-left:6%;
                //         }
                //     }
                // }
                .pay-methods{
                    width: 100%;
                    margin-top:58rpx;
                    .methods-list{
                        margin-top:40rpx;
                        width: 100%;
                        padding: 0 20rpx;
                        box-sizing: border-box;
                        // background: #49B4E3;
                        height:130rpx;
                        display: flex;
                        flex-direction: column;
                        justify-content: space-between;
                        align-items: flex-start;
                        .pay-item{
                            width:100%;
                            display: flex;
                            justify-content:space-between;
                            align-items: center;
                            .pay-item-right{
                                display: flex;
                                image{
                                    width: 42rpx;
                                    height: 42rpx;
                                    margin-right:34rpx;
                                }
                                view{
                                    font-weight: 300;
                                    font-size: 28rpx;
                                    color: #111111;
                                }
                            }
                        }
                    }
                }
            }
             .img{
                 width:580rpx;
                 height: 385rpx;
             }
             .text{
                 font-weight: 300;
                 font-size: 32rpx;
                 color: #548AFF;
             }
             .back{
                 width: 300rpx;
                 height: 80rpx;
                 background: #FFFFFF;
                 border:1rpx solid rgba(95, 117, 244, 0.6);
                 color: #548AFF;
                 border-radius:40rpx;
                 line-height:80rpx;
                 text-align: center;
             }
        }
        .submit-btn{
            width: 686rpx;
            height: 98rpx;
            background:#5EA1FA;
            border-radius:50rpx;
            text-align: center;
            line-height: 98rpx;
            letter-spacing:3rpx;
            margin:0 auto;
            font-weight: 300;
            font-size: 36rpx;
            color: #FFFFFF;
        }
    }
    .money-title{
        display: flex;
        align-items: center;
        .title-icon{
            width:8rpx;
            height:36rpx;
            background:#49B4E3;
            margin-right:12rpx;
        }
        .title-text{
            font-weight: 300;
            font-size: 28rpx;
            color: #000000;
        }
    }
</style>
pages/success/index.vue
@@ -1,104 +1,64 @@
<script  setup>
    import { ref } from 'vue'
    import { onShow } from '@dcloudio/uni-app';
    const title = ref(1)
    const back = () => {
        uni.navigateBack()
    }
    const toIndex = () => {
        uni.navigateTo({
            url:"/pages/index/index"
        })
    }
    // const toRecord = () => {
    //     uni.navigateTo({
    //         url:"/pages/function/paymentRecord/index"
    //     })
    // }
</script>
<template>
    <view :class="title == 1?'contbox':'contbox2'">
        <navbar title ='新增地址'></navbar>
        <view class="main-box">
            <view class="success-img">
                <img src="../../static/images/other/success.svg" alt=""/>
    <view class="container">
        <navbar title =''></navbar>
        <view class="content">
            <view class="img-box">
                <image class="img" src="../../static/images/other/success.png" alt=""></image>
                <view class="text text1">支付成功~</view>
            </view>
            <view class="txt1">缴费成功</view>
            <view class="txt2">
                缴费成功,您可去
                <text class="txt-hl" @click="toRecord()">缴费记录</text>
                中查看充值详情
            </view>
            <view class="button-box">
                <button class="button1" @click="back()">继续缴费</button>
                <button class="button2" @click="toIndex()">返回首页</button>
            </view>
            <view class="back" @click="navTo()">返回首页</view>
        </view>
    </view>
</template>
<script setup>
    function navTo(){
        uni.navigateTo({
            url:'/pages/index/index'
        })
    }
</script>
<style lang="scss" scoped>
    .h-cl-777 {
        color: #777777;
    }
    .contbox {
        width: 750rpx;
        height: 1624rpx;
        // background: linear-gradient(1deg, #FFFFFF 0%, #E8F9FF 100%);
        margin: 0 auto;
        box-sizing: border-box;
    }
    .contbox2 {
        width: 750rpx;
        height: 1624rpx;
        // background: linear-gradient(1deg, #FFFFFF 0%, #F5F5F5 100%);
        margin: 0 auto;
        box-sizing: border-box;
    }
    .main-box {
        text-align: center;
    }
    .success-img {
        width: 150rpx;
        margin: 130rpx auto 20rpx;
        img {
<style lang="scss">
    .container{
        width: 100%;
        height: 100vh;
        .content{
            width: 100%;
            height:calc(100vh - 176rpx);
            background:linear-gradient(to top,#FFFFFF,#E8EFFF);
            box-sizing: border-box;
            display: flex;
            padding:200rpx 0 600rpx;
            justify-content: space-between;
            flex-direction: column;
            align-items: center;
            .img-box{
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
            }
             .img{
                 width:580rpx;
                 height: 385rpx;
             }
             .text{
                 font-weight: 300;
                 font-size: 32rpx;
                 color: #548AFF;
             }
             .back{
                 width: 300rpx;
                 height: 80rpx;
                 background: #FFFFFF;
                 border:1rpx solid rgba(95, 117, 244, 0.6);
                 color: #548AFF;
                 border-radius:40rpx;
                 line-height:80rpx;
                 text-align: center;
             }
        }
    }
    .txt1 {
        font-size: 36rpx;
        margin-bottom: 20rpx;
    }
    .txt2 {
        font-size: 28rpx;
    }
    .txt-hl {
        color: #5CBCE6;
        margin: 0 5rpx;
        text-decoration: underline;
    }
    .button-box {
        display: flex;
        justify-content: center;
        margin-top: 130rpx;
        button {
            width: 300rpx;
            height: 85rpx;
            line-height: 85rpx;
            margin: 10rpx;
        }
        .button1 {
            background-color: #5CBCE6;
            color: #ffffff;
        }
        .button2 {
            background-color: #ffffff;
            color: #5CBCE6;
            border: 1px solid #5CBCE6;
        }
    }
</style>
static/images/other/icon_pay.png
unpackage/dist/dev/mp-weixin/api/index.js
@@ -9,20 +9,8 @@
function getUserInfo() {
  return util_request.request("/user/loginUser", {}, "GET");
}
function getRegionApi(code) {
  return util_request.request(`/sysRegion/getListChild?code=${code}`, {}, "GET");
}
function creatUserArchive(data) {
  return util_request.request("/userArchives/realName", data, "POST");
}
function searchAddress(data) {
  return util_request.request("/userAddress/search", data, "POST");
}
function editAddressApi(data) {
  return util_request.request("/userAddress/modify", data, "POST");
}
function getAddressApi(id) {
  return util_request.request(`/userAddress/get?id=${id}`, {}, "GET");
}
function deleteAddressApi(id) {
  return util_request.request(`/userAddress/remove?id=${id}`, {}, "GET");
@@ -75,22 +63,22 @@
function buyWaterApi(data) {
  return util_request.request("/api/facility/buyWater", data, "POST");
}
function rechargeApi(data) {
  return util_request.request("/rechargeRecords/fees", data, "POST");
}
exports.askShareApi = askShareApi;
exports.askShareListApi = askShareListApi;
exports.balanceChangeApi = balanceChangeApi;
exports.balanceStatisticsApi = balanceStatisticsApi;
exports.buyWaterApi = buyWaterApi;
exports.creatUserArchive = creatUserArchive;
exports.deleteAddressApi = deleteAddressApi;
exports.editAddressApi = editAddressApi;
exports.editShareTypeApi = editShareTypeApi;
exports.editUserInfoApi = editUserInfoApi;
exports.getAddressApi = getAddressApi;
exports.getRegionApi = getRegionApi;
exports.getUserInfo = getUserInfo;
exports.getVipInfoApi = getVipInfoApi;
exports.infoBreakdownApi = infoBreakdownApi;
exports.paymentChangeApi = paymentChangeApi;
exports.rechargeApi = rechargeApi;
exports.rechargeChangeApi = rechargeChangeApi;
exports.removeCardApi = removeCardApi;
exports.reportLossApi = reportLossApi;
unpackage/dist/dev/mp-weixin/app.js
@@ -4,7 +4,6 @@
const api_index = require("./api/index.js");
if (!Math) {
  "./pages/index/index.js";
  "./pages/addCard/index.js";
  "./pages/userInfo/index.js";
  "./pages/functionList/balanceRecord/index.js";
  "./pages/functionList/paymentRecord/index.js";
@@ -17,19 +16,19 @@
  "./pages/sendWater/index.js";
  "./pages/preSendWater/index.js";
  "./pages/address/index.js";
  "./pages/addressAdd/index.js";
  "./pages/addressLocate/index.js";
  "./pages/success/index.js";
  "./pages/facilityList/index.js";
  "./pages/station/index.js";
  "./pages/infoBreakdown/index.js";
  "./pages/scanRecharge/index.js";
  "./pages/scanSuccess/index.js";
  "./pages/counterRecharge/index.js";
}
const _sfc_main = {
  __name: "App",
  setup(__props) {
    function wxLogin() {
      common_vendor.index.removeStorageSync("openId");
      if (!common_vendor.index.getStorageSync("openId")) {
        common_vendor.wx$1.login({
          success: async (res1) => {
unpackage/dist/dev/mp-weixin/app.json
@@ -1,7 +1,6 @@
{
  "pages": [
    "pages/index/index",
    "pages/addCard/index",
    "pages/userInfo/index",
    "pages/functionList/balanceRecord/index",
    "pages/functionList/paymentRecord/index",
@@ -14,13 +13,14 @@
    "pages/sendWater/index",
    "pages/preSendWater/index",
    "pages/address/index",
    "pages/addressAdd/index",
    "pages/addressLocate/index",
    "pages/success/index",
    "pages/facilityList/index",
    "pages/station/index",
    "pages/infoBreakdown/index",
    "pages/scanRecharge/index"
    "pages/scanRecharge/index",
    "pages/scanSuccess/index",
    "pages/counterRecharge/index"
  ],
  "window": {
    "navigationStyle": "custom"
unpackage/dist/dev/mp-weixin/common/assets.js
@@ -1,8 +1,8 @@
"use strict";
const _imports_0$a = "/static/images/index/head.png";
const _imports_0$9 = "/static/images/index/head.png";
const _imports_1$5 = "/static/images/index/back.png";
const _imports_2 = "/static/images/index/vip-add.png";
const _imports_0$9 = "/static/images/index/card11.png";
const _imports_0$8 = "/static/images/index/card11.png";
const _imports_4 = "/static/images/index/code1.png";
const _imports_5 = "/static/images/index/home21.png";
const _imports_1$4 = "/static/images/index/icon22.png";
@@ -11,30 +11,28 @@
const _imports_9 = "/static/images/index/icon51.png";
const _imports_10 = "/static/images/index/more-info5.png";
const _imports_11 = "/static/images/index/notice5.png";
const _imports_0$8 = "/static/images/addCard/code.png";
const _imports_1$3 = "/static/images/other/more.png";
const _imports_0$7 = "/static/images/other/expand.png";
const _imports_1$2 = "/static/images/other/nodata.png";
const _imports_0$6 = "/static/images/other/code-none.png";
const _imports_0$5 = "/static/images/other/success.png";
const _imports_0$4 = "/static/images/address/edit.png";
const _imports_0$5 = "/static/images/address/edit.png";
const _imports_1$1 = "/static/images/address/delete.png";
const _imports_0$3 = "/static/images/address/expand.png";
const _imports_0$2 = "/static/images/other/success.svg";
const _imports_0$1 = "/static/logo.png";
const _imports_0$4 = "/static/images/other/success.png";
const _imports_0$3 = "/static/logo.png";
const _imports_0$2 = "/static/images/addCard/code.png";
const _imports_1 = "/static/images/other/img-add.png";
const _imports_0$1 = "/static/images/other/icon_pay.png";
const _imports_0 = "/static/images/addCard/back.png";
exports._imports_0 = _imports_0;
exports._imports_0$1 = _imports_0$9;
exports._imports_0$10 = _imports_0$1;
exports._imports_0$2 = _imports_0$a;
exports._imports_0$3 = _imports_0$8;
exports._imports_0$4 = _imports_0$7;
exports._imports_0$5 = _imports_0$6;
exports._imports_0$6 = _imports_0$5;
exports._imports_0$7 = _imports_0$4;
exports._imports_0$8 = _imports_0$3;
exports._imports_0$9 = _imports_0$2;
exports._imports_0$1 = _imports_0$8;
exports._imports_0$2 = _imports_0$9;
exports._imports_0$3 = _imports_0$7;
exports._imports_0$4 = _imports_0$6;
exports._imports_0$5 = _imports_0$5;
exports._imports_0$6 = _imports_0$4;
exports._imports_0$7 = _imports_0$3;
exports._imports_0$8 = _imports_0$2;
exports._imports_0$9 = _imports_0$1;
exports._imports_1 = _imports_1$4;
exports._imports_1$1 = _imports_1$5;
exports._imports_1$2 = _imports_1$3;
unpackage/dist/dev/mp-weixin/common/vendor.js
@@ -7677,12 +7677,6 @@
    }
  },
  {
    path: "pages/addCard/index",
    style: {
      navigationStyle: "custom"
    }
  },
  {
    path: "pages/userInfo/index",
    style: {
      navigationStyle: "custom"
@@ -7755,12 +7749,6 @@
    }
  },
  {
    path: "pages/addressAdd/index",
    style: {
      navigationStyle: "custom"
    }
  },
  {
    path: "pages/addressLocate/index",
    style: {
      navigationStyle: "custom"
@@ -7795,6 +7783,18 @@
    style: {
      navigationStyle: "custom"
    }
  },
  {
    path: "pages/scanSuccess/index",
    style: {
      navigationStyle: "custom"
    }
  },
  {
    path: "pages/counterRecharge/index",
    style: {
      navigationStyle: "custom"
    }
  }
];
const globalStyle = {
unpackage/dist/dev/mp-weixin/pages/address/index.js
@@ -62,12 +62,6 @@
        url: `/pages/addressAdd/index?id=${id}`
      });
    }
    function navToAdd() {
      let id = "";
      common_vendor.index.navigateTo({
        url: `/pages/addressAdd/index?id=${id}`
      });
    }
    common_vendor.onShow(async () => {
      getAddressList();
    });
@@ -88,9 +82,8 @@
            h: common_vendor.o(($event) => deleteAddress(item.id))
          };
        }),
        c: common_assets._imports_0$7,
        d: common_assets._imports_1$4,
        e: common_vendor.o(($event) => navToAdd())
        c: common_assets._imports_0$5,
        d: common_assets._imports_1$4
      };
    };
  }
unpackage/dist/dev/mp-weixin/pages/address/index.wxml
@@ -1 +1 @@
<view class="container"><navbar wx:if="{{a}}" u-i="696da406-0" bind:__l="__l" u-p="{{a}}"></navbar><view class="content"><view class="main"><block wx:for="{{b}}" wx:for-item="item"><view class="address-item"><view class="user-info"><text>{{item.a}}</text><text>{{item.b}}</text></view><view class="address-info">{{item.c}}</view><view class="address-divide"></view><view class="handel"><view class="handel-left"><radio color="#4996E3" value="{{item.d}}" checked="{{item.e}}" bindtap="{{item.f}}"></radio><text>设为默认</text></view><view class="handel-right"><view bindtap="{{item.g}}"><image src="{{c}}" alt=""></image><text>编辑</text></view><view bindtap="{{item.h}}"><image src="{{d}}" alt=""></image><text>删除</text></view></view></view></view></block></view><view class="subBtn" bindtap="{{e}}">新增收货地址</view></view></view>
<view class="container"><navbar wx:if="{{a}}" u-i="696da406-0" bind:__l="__l" u-p="{{a}}"></navbar><view class="content"><view class="main"><block wx:for="{{b}}" wx:for-item="item"><view class="address-item"><view class="user-info"><text>{{item.a}}</text><text>{{item.b}}</text></view><view class="address-info">{{item.c}}</view><view class="address-divide"></view><view class="handel"><view class="handel-left"><radio color="#4996E3" value="{{item.d}}" checked="{{item.e}}" bindtap="{{item.f}}"></radio><text>设为默认</text></view><view class="handel-right"><view bindtap="{{item.g}}"><image src="{{c}}" alt=""></image><text>编辑</text></view><view bindtap="{{item.h}}"><image src="{{d}}" alt=""></image><text>删除</text></view></view></view></view></block></view><view class="subBtn">新增收货地址</view></view></view>
unpackage/dist/dev/mp-weixin/pages/index/index.js
@@ -22,6 +22,8 @@
      count: "",
      state: "",
      //state:true:挂失,false:正常
      cardType: "",
      //卡类型01卡消费 02计次消费 03游客消费 04电子卡
      userCardType: ""
      //userCardType:true:共享卡,false:正常卡
    });
@@ -65,22 +67,8 @@
        scanType: ["qrCode"],
        success: async function(res) {
          console.log("条码内容:" + res.result);
          let data = {
            cardType: cardInfo.value.cardType,
            card: cardInfo.value.waterCardNumber,
            sn: res.result
          };
          await api_index.buyWaterApi(data).then((res2) => {
            if (res2.code == 200) {
              common_vendor.index.navigateTo({
                url: "/pages/scanWater/index"
              });
            } else {
              common_vendor.index.showToast({
                title: "扫码失败!",
                icon: "none"
              });
            }
          common_vendor.index.navigateTo({
            url: `/pages/scanWater/index?facilityCode=${res.result}`
          });
        }
      });
@@ -93,7 +81,7 @@
      { text: "故障上报", icon: "../../static/images/index/icon35.png", bgColor: "#a88ff1", url: "/pages/infoBreakdown/index", isUrl: 1 },
      { text: "优惠卷", icon: "../../static/images/index/icon36.png", bgColor: "#18bfc4", url: "", isUrl: 4 },
      { text: "会员卡挂失", icon: "../../static/images/index/icon37.png", bgColor: "#4875f0", url: "", isUrl: 2 },
      { text: "会员卡注销", icon: "../../static/images/index/icon38.png", bgColor: "#f45088", url: "", isUrl: 3 }
      { text: "会员卡解绑", icon: "../../static/images/index/icon38.png", bgColor: "#f45088", url: "", isUrl: 3 }
    ]);
    function navTo(itemUrl) {
      if (itemUrl) {
@@ -233,44 +221,43 @@
        f: common_vendor.o(($event) => navTo("/pages/userInfo/index")),
        g: common_assets._imports_1$1,
        h: common_assets._imports_2,
        i: common_vendor.o(($event) => navTo("/pages/addCard/index")),
        j: common_assets._imports_0$1,
        k: isShareCard.value
        i: common_assets._imports_0$1,
        j: isShareCard.value
      }, isShareCard.value ? {
        l: common_vendor.t(cardInfo.value.waterCardNumber)
        k: common_vendor.t(cardInfo.value.waterCardNumber)
      } : {}, {
        m: !isShareCard.value
        l: !isShareCard.value
      }, !isShareCard.value ? common_vendor.e({
        n: isVip.value
        m: isVip.value
      }, isVip.value ? {
        o: common_assets._imports_4
        n: common_assets._imports_4
      } : {}, {
        p: isLoss.value && isVip.value
        o: isLoss.value && isVip.value
      }, isLoss.value && isVip.value ? {} : {}, {
        q: isVip.value
        p: isVip.value
      }, isVip.value ? {
        r: common_vendor.t(cardInfo.value.waterCardNumber)
        q: common_vendor.t(cardInfo.value.waterCardNumber)
      } : {}, {
        s: isVip.value
        r: isVip.value
      }, isVip.value ? {} : {}, {
        t: !isVip.value
        s: !isVip.value
      }, !isVip.value ? {} : {}, {
        v: isVip.value
        t: isVip.value
      }, isVip.value ? {
        w: common_vendor.t(cardInfo.value.balance)
        v: common_vendor.t(cardInfo.value.balance)
      } : {}, {
        x: isVip.value
        w: isVip.value
      }, isVip.value ? {
        y: common_vendor.o(($event) => navTo("/pages/recharge/index"))
        x: common_vendor.o(($event) => navTo("/pages/recharge/index"))
      } : {}) : {}, {
        z: topHeight.value + "rpx",
        A: common_assets._imports_5,
        B: common_vendor.o(($event) => upGrade()),
        C: common_assets._imports_1,
        D: common_vendor.o(($event) => navTo("/pages/facilityList/index")),
        E: common_assets._imports_7,
        F: common_vendor.o(($event) => toScan()),
        G: common_vendor.f(functionList.value, (item, index, i0) => {
        y: topHeight.value + "rpx",
        z: common_assets._imports_5,
        A: common_vendor.o(($event) => navTo("/pages/sendWater/index")),
        B: common_assets._imports_1,
        C: common_vendor.o(($event) => navTo("/pages/facilityList/index")),
        D: common_assets._imports_7,
        E: common_vendor.o(($event) => toScan()),
        F: common_vendor.f(functionList.value, (item, index, i0) => {
          return {
            a: item.icon,
            b: item.bgColor,
@@ -279,14 +266,14 @@
            e: index
          };
        }),
        H: common_assets._imports_8,
        I: common_vendor.o(upGrade),
        J: common_assets._imports_9,
        K: common_assets._imports_10,
        L: common_vendor.o(($event) => navTo("/pages/station/index")),
        M: common_assets._imports_11,
        N: common_assets._imports_10,
        O: common_vendor.o(upGrade)
        G: common_assets._imports_8,
        H: common_vendor.o(upGrade),
        I: common_assets._imports_9,
        J: common_assets._imports_10,
        K: common_vendor.o(($event) => navTo("/pages/station/index")),
        L: common_assets._imports_11,
        M: common_assets._imports_10,
        N: common_vendor.o(($event) => navTo("/pages/counterRecharge/index"))
      });
    };
  }
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
@@ -1 +1 @@
<view class="container data-v-1cf27b2a"><view class="content data-v-1cf27b2a"><view class="card-box data-v-1cf27b2a" style="{{'padding-top:' + z}}"><view class="user-info data-v-1cf27b2a"><image wx:if="{{a}}" class="user-img data-v-1cf27b2a" src="{{b}}" alt=""></image><image wx:else class="user-img data-v-1cf27b2a" src="{{c}}" alt=""></image><text class="data-v-1cf27b2a" bindtap="{{e}}">{{d}}</text><image bindtap="{{f}}" class="user-more data-v-1cf27b2a" src="{{g}}"></image><view class="user-add-card data-v-1cf27b2a" bindtap="{{i}}"><image class="data-v-1cf27b2a" src="{{h}}" alt=""></image><text class="data-v-1cf27b2a">添加会员卡</text></view></view><view class="card data-v-1cf27b2a"><image class="card-bg data-v-1cf27b2a" src="{{j}}" alt=""></image><view wx:if="{{k}}" class="share-card data-v-1cf27b2a">共享卡号:{{l}}</view><view wx:if="{{m}}" class="card-content data-v-1cf27b2a"><view class="card-left data-v-1cf27b2a"><view class="left-top data-v-1cf27b2a"><view class="data-v-1cf27b2a"><image wx:if="{{n}}" class="data-v-1cf27b2a" src="{{o}}" alt=""></image><text class="data-v-1cf27b2a">会员卡 </text><text wx:if="{{p}}" class="lossed data-v-1cf27b2a"> [已挂失]</text></view><view wx:if="{{q}}" class="data-v-1cf27b2a">ID:{{r}}</view></view></view><view class="card-right data-v-1cf27b2a"><view class="card-right-top data-v-1cf27b2a"><text wx:if="{{s}}" class="data-v-1cf27b2a">金额卡</text><text wx:if="{{t}}" class="data-v-1cf27b2a">未绑定会员卡</text><text wx:if="{{v}}" class="data-v-1cf27b2a">{{w}}元</text></view><view wx:if="{{x}}" class="card-right-bottom data-v-1cf27b2a" bindtap="{{y}}">充值</view></view></view></view></view><view class="function-box1 data-v-1cf27b2a"><view class="box1-bg box1-one data-v-1cf27b2a" bindtap="{{B}}"><image class="data-v-1cf27b2a" src="{{A}}" alt=""></image><view class="data-v-1cf27b2a">送水到家</view></view><view bindtap="{{D}}" class="box1-bg box1-two data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{C}}" alt=""></image><view class="data-v-1cf27b2a">附近设备</view></view><view class="box1-bg box1-three data-v-1cf27b2a" bindtap="{{F}}"><image class="data-v-1cf27b2a" src="{{E}}" alt=""></image><view class="data-v-1cf27b2a">扫码取水</view></view></view><view class="function-box2 data-v-1cf27b2a"><view class="box2-title data-v-1cf27b2a"><text class="data-v-1cf27b2a">功能列表</text></view><view class="box2-content data-v-1cf27b2a"><block wx:for="{{G}}" wx:for-item="item" wx:key="e"><view class="box2-item data-v-1cf27b2a" bindtap="{{item.d}}"><view class="box2-item-img data-v-1cf27b2a" style="{{'background:' + item.b}}"><image class="data-v-1cf27b2a" src="{{item.a}}" alt=""></image></view><view class="box2-item-text data-v-1cf27b2a">{{item.c}}</view></view></block></view></view><view class="advertisement-box data-v-1cf27b2a" bindtap="{{I}}"><image class="data-v-1cf27b2a" src="{{H}}" alt=""></image></view><view class="service-box data-v-1cf27b2a"><view class="service-title data-v-1cf27b2a"><text class="data-v-1cf27b2a">服务指南</text></view><view class="service-content data-v-1cf27b2a"><view class="service-bg data-v-1cf27b2a" bindtap="{{L}}"><view class="data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{J}}" alt=""></image><text class="data-v-1cf27b2a">附近站点</text></view><view class="service-info data-v-1cf27b2a">服务中心正在营业中……</view><view class="data-v-1cf27b2a"><text class="data-v-1cf27b2a">查看更多</text><image class="data-v-1cf27b2a" src="{{K}}" alt=""></image></view></view><view class="service-bg data-v-1cf27b2a" bindtap="{{O}}"><view class="data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{M}}" alt=""></image><text class="data-v-1cf27b2a">公示公告</text></view><view class="service-info data-v-1cf27b2a">停水公告的部分摘要的内容展示……</view><view class="data-v-1cf27b2a"><text class="data-v-1cf27b2a">查看更多</text><image class="data-v-1cf27b2a" src="{{N}}" alt=""></image></view></view></view></view></view></view>
<view class="container data-v-1cf27b2a"><view class="content data-v-1cf27b2a"><view class="card-box data-v-1cf27b2a" style="{{'padding-top:' + y}}"><view class="user-info data-v-1cf27b2a"><image wx:if="{{a}}" class="user-img data-v-1cf27b2a" src="{{b}}" alt=""></image><image wx:else class="user-img data-v-1cf27b2a" src="{{c}}" alt=""></image><text class="data-v-1cf27b2a" bindtap="{{e}}">{{d}}</text><image bindtap="{{f}}" class="user-more data-v-1cf27b2a" src="{{g}}"></image><view class="user-add-card data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{h}}" alt=""></image><text class="data-v-1cf27b2a">添加会员卡</text></view></view><view class="card data-v-1cf27b2a"><image class="card-bg data-v-1cf27b2a" src="{{i}}" alt=""></image><view wx:if="{{j}}" class="share-card data-v-1cf27b2a">共享卡号:{{k}}</view><view wx:if="{{l}}" class="card-content data-v-1cf27b2a"><view class="card-left data-v-1cf27b2a"><view class="left-top data-v-1cf27b2a"><view class="data-v-1cf27b2a"><image wx:if="{{m}}" class="data-v-1cf27b2a" src="{{n}}" alt=""></image><text class="data-v-1cf27b2a">会员卡 </text><text wx:if="{{o}}" class="lossed data-v-1cf27b2a"> [已挂失]</text></view><view wx:if="{{p}}" class="data-v-1cf27b2a">ID:{{q}}</view></view></view><view class="card-right data-v-1cf27b2a"><view class="card-right-top data-v-1cf27b2a"><text wx:if="{{r}}" class="data-v-1cf27b2a">金额卡</text><text wx:if="{{s}}" class="data-v-1cf27b2a">未绑定会员卡</text><text wx:if="{{t}}" class="data-v-1cf27b2a">{{v}}元</text></view><view wx:if="{{w}}" class="card-right-bottom data-v-1cf27b2a" bindtap="{{x}}">充值</view></view></view></view></view><view class="function-box1 data-v-1cf27b2a"><view class="box1-bg box1-one data-v-1cf27b2a" bindtap="{{A}}"><image class="data-v-1cf27b2a" src="{{z}}" alt=""></image><view class="data-v-1cf27b2a">送水到家</view></view><view bindtap="{{C}}" class="box1-bg box1-two data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{B}}" alt=""></image><view class="data-v-1cf27b2a">附近设备</view></view><view class="box1-bg box1-three data-v-1cf27b2a" bindtap="{{E}}"><image class="data-v-1cf27b2a" src="{{D}}" alt=""></image><view class="data-v-1cf27b2a">扫码取水</view></view></view><view class="function-box2 data-v-1cf27b2a"><view class="box2-title data-v-1cf27b2a"><text class="data-v-1cf27b2a">功能列表</text></view><view class="box2-content data-v-1cf27b2a"><block wx:for="{{F}}" wx:for-item="item" wx:key="e"><view class="box2-item data-v-1cf27b2a" bindtap="{{item.d}}"><view class="box2-item-img data-v-1cf27b2a" style="{{'background:' + item.b}}"><image class="data-v-1cf27b2a" src="{{item.a}}" alt=""></image></view><view class="box2-item-text data-v-1cf27b2a">{{item.c}}</view></view></block></view></view><view class="advertisement-box data-v-1cf27b2a" bindtap="{{H}}"><image class="data-v-1cf27b2a" src="{{G}}" alt=""></image></view><view class="service-box data-v-1cf27b2a"><view class="service-title data-v-1cf27b2a"><text class="data-v-1cf27b2a">服务指南</text></view><view class="service-content data-v-1cf27b2a"><view class="service-bg data-v-1cf27b2a" bindtap="{{K}}"><view class="data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{I}}" alt=""></image><text class="data-v-1cf27b2a">附近站点</text></view><view class="service-info data-v-1cf27b2a">服务中心正在营业中……</view><view class="data-v-1cf27b2a"><text class="data-v-1cf27b2a">查看更多</text><image class="data-v-1cf27b2a" src="{{J}}" alt=""></image></view></view><view class="service-bg data-v-1cf27b2a" bindtap="{{N}}"><view class="data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{L}}" alt=""></image><text class="data-v-1cf27b2a">公示公告</text></view><view class="service-info data-v-1cf27b2a">停水公告的部分摘要的内容展示……</view><view class="data-v-1cf27b2a"><text class="data-v-1cf27b2a">查看更多</text><image class="data-v-1cf27b2a" src="{{M}}" alt=""></image></view></view></view></view></view></view>
unpackage/dist/dev/mp-weixin/pages/recharge/index.js
@@ -14,6 +14,7 @@
  setup(__props) {
    const choosedMoney = common_vendor.ref(50);
    const disabled = common_vendor.ref(true);
    const userInfo = JSON.parse(common_vendor.index.getStorageSync("userInfo"));
    const moneyList = common_vendor.ref([
      { value: 50, active: true },
      { value: 100, active: false },
@@ -56,7 +57,23 @@
      } else {
        money = Number(otherMoney.value);
      }
      await api_index.wxPayApi({ businessType: 1, tradeAmount: money }).then((res) => {
      let data = {
        cardNumber: userInfo.waterCardNumber,
        paymentMethod: 1,
        rechargeAmount: money
      };
      await api_index.rechargeApi(data).then(async (res) => {
        if (res.code == 200) {
          let data2 = {
            businessType: 1,
            businessNo: res.data
          };
          await wxPay(data2);
        }
      });
    }
    async function wxPay(data) {
      await api_index.wxPayApi(data).then((res) => {
        if (res.code == 200) {
          common_vendor.wx$1.requestPayment({
            //预支付订单信息