完成地址管理新增、删除、编辑、设置默认地址,修改navbar组件
| | |
| | | export function searchAddress(data){ |
| | | return request('/userAddress/search',data,'POST') |
| | | } |
| | | //编辑地址 |
| | | export function editAddressApi(data){ |
| | | return request('/userAddress/modify',data,'POST') |
| | | } |
| | | //根据id获取地址 |
| | | export function getAddressApi(id){ |
| | | return request(`/userAddress/get?id=${id}`,{},'GET') |
| | | } |
| | | //删除 |
| | | export function deleteAddressApi(id){ |
| | | return request(`/userAddress/remove?id=${id}`,{},'GET') |
| | | } |
| | | //设置默认值 |
| | | export function setAddressDefaultApi(id){ |
| | | return request(`/userAddress/editDefault?id=${id}`,{},'GET') |
| | | } |
| | | |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref } from 'vue' |
| | | import { onMounted, ref ,watch} from 'vue' |
| | | function navBackTo(){ |
| | | uni.navigateBack() |
| | | } |
| | |
| | | default:'' |
| | | } |
| | | }) |
| | | const title = ref(props.title) |
| | | const pageTitle = ref(props.title) |
| | | watch(props.title,(New, Old)=>{ |
| | | pageTitle.value = New |
| | | }, |
| | | {immediate: true}, |
| | | ) |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/scanWater/index", |
| | | "style": { |
| | | "navigationStyle":"custom" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/recharge/index", |
| | | "style": { |
| | | "navigationStyle":"custom" |
| | |
| | | }, |
| | | { |
| | | "path" : "pages/address/index", |
| | | "style": { |
| | | "navigationStyle":"custom" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/addressEdit/index", |
| | | "style": { |
| | | "navigationStyle":"custom" |
| | | } |
| | |
| | | <script setup> |
| | | import { ref ,onMounted } from 'vue' |
| | | import { searchAddress } from '../../api/index.js'; |
| | | import { searchAddress,editAddress,setAddressDefaultApi,deleteAddressApi } from '../../api/index.js'; |
| | | import { onShow } from "@dcloudio/uni-app" |
| | | const addressList = ref([]) |
| | | async function getAddressList(){ |
| | | await searchAddress({limit:100,page:1}).then((res) =>{ |
| | | if(res.code == 200){ |
| | | res.data.list.forEach((item) =>{ |
| | | res.data.list.forEach((item) =>{ |
| | | if(item.isDefault == 1){ |
| | | item.isDefault = true |
| | | }else{ |
| | | item.isDefault = false |
| | | } |
| | | item.isDefault = item.isDefault == 1 ? true : false |
| | | item.addressWhole = item.regionName.replace(/[,#]/g,' ') + item.address |
| | | }) |
| | | }) |
| | |
| | | } |
| | | }) |
| | | } |
| | | function navTo(){ |
| | | let title = '新增地址' |
| | | let id = 0 |
| | | uni.navigateTo({ |
| | | url:'/pages/addressAdd/index' |
| | | async function setDefault(isDefault,id,index1){ |
| | | if(isDefault == true){ |
| | | console.log('true') |
| | | }else{ |
| | | console.log('false') |
| | | await setAddressDefaultApi(id).then((res) =>{ |
| | | if(res.code == 200){ |
| | | getAddressList() |
| | | }else{ |
| | | uni.showToast({ |
| | | title: '设置失败', |
| | | image: '../../static/images/other/success.svg', |
| | | duration:500 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | async function deleteAddress(id){ |
| | | await deleteAddressApi(id).then((res) =>{ |
| | | if(res.code == 200){ |
| | | uni.showToast({ |
| | | title: '删除成功', |
| | | image: '../../static/images/other/success.svg', |
| | | duration:500 |
| | | }) |
| | | getAddressList() |
| | | } |
| | | }) |
| | | } |
| | | onMounted(()=>{ |
| | | |
| | | function navToModify(id){ |
| | | uni.navigateTo({ |
| | | url:`/pages/addressAdd/index?id=${id}` |
| | | }) |
| | | } |
| | | function navToAdd(){ |
| | | let id = null |
| | | uni.navigateTo({ |
| | | url:`/pages/addressAdd/index?id=${id}` |
| | | }) |
| | | } |
| | | onShow(async() =>{ |
| | | getAddressList() |
| | | }) |
| | | </script> |
| | |
| | | <view class="address-divide"></view> |
| | | <view class="handel"> |
| | | <view class="handel-left"> |
| | | <radio color = "#4996E3" :value="item.id" :checked="item.isDefault"></radio> |
| | | <radio color = "#4996E3" :value="item.id" :checked="item.isDefault" @click="setDefault(item.isDefault,item.id,index)"></radio> |
| | | <text>设为默认</text> |
| | | </view> |
| | | <view class="handel-right"> |
| | | <view> |
| | | <view @click="navToModify(item.id)"> |
| | | <image src="../../static/images/address/edit.png" alt=""></image> |
| | | <text>编辑</text> |
| | | </view> |
| | | <view> |
| | | <view @click="deleteAddress(item.id)"> |
| | | <image src="../../static/images/address/delete.png" alt=""></image> |
| | | <text>删除</text> |
| | | </view> |
| | |
| | | </view> |
| | | </block> |
| | | </view> |
| | | <view class="subBtn" @click="navTo()">新增收货地址</view> |
| | | <view class="subBtn" @click="navToAdd()">新增收货地址</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | <script setup> |
| | | import { onMounted, ref } from 'vue'; |
| | | import { getRegionApi,creatUserArchive } from '../../api/index.js'; |
| | | import { onMounted, ref, watchEffect } from 'vue'; |
| | | import { getRegionApi,creatUserArchive,getAddressApi,editAddressApi } from '../../api/index.js'; |
| | | import { onLoad } from "@dcloudio/uni-app" |
| | | |
| | | const addressId = ref() |
| | | const pageTitle = ref('新增地址') |
| | | const isCheckedDefault =ref(false) |
| | | const form = ref({ |
| | | userName:'', |
| | | userPhone:'', |
| | | listRegion:[], |
| | | userAddress:'', |
| | | isDefault:null, |
| | | }) |
| | | //获取地址 |
| | | async function getAddress(){ |
| | | if(addressId.value){ |
| | | pageTitle.value = "编辑地址" |
| | | await getAddressApi(addressId.value).then((res) =>{ |
| | | form.value.id = res.data.id |
| | | form.value.userName = res.data.userName |
| | | form.value.userPhone = res.data.userPhone |
| | | form.value.listRegion = res.data.region.replace(/#/g,'').split(',') |
| | | form.value.userAddress = res.data.address |
| | | form.value.isDefault = res.data.isDefault |
| | | regionName.value = res.data.regionName.replace(/[#,]/g,' ') |
| | | isCheckedDefault.value = form.value.isDefault == 1 ? true : false |
| | | pageTitle.value = "编辑地址" |
| | | console.log('form',form.value) |
| | | }) |
| | | } |
| | | } |
| | | onLoad(async(option)=>{ |
| | | addressId.value = option.id |
| | | console.log('1') |
| | | }) |
| | | onMounted(()=>{ |
| | | getAddress() |
| | | }) |
| | | function change(e){ |
| | | form.value.isDefault = e.detail.value ? 1 : 0 |
| | | } |
| | | //提交表单数据 |
| | | async function submit(){ |
| | | //修改地址 |
| | | if(form.value.id){ |
| | | await editAddressApi(form.value).then((res) =>{ |
| | | if(res.code == 200){ |
| | | uni.showToast({ |
| | | title: '修改成功', |
| | | image: '../../static/images/other/success.svg', |
| | | duration:500 |
| | | }) |
| | | setTimeout(() =>{ |
| | | uni.navigateBack() |
| | | form.value = {} |
| | | },500) |
| | | } |
| | | }) |
| | | }else{ |
| | | //新增地址 |
| | | await creatUserArchive(form.value).then((res) =>{ |
| | | if(res.code == 200){ |
| | | uni.showToast({ |
| | | title: '新增成功', |
| | | image: '../../static/images/other/success.svg', |
| | | duration:500 |
| | | }) |
| | | setTimeout(() =>{ |
| | | uni.navigateBack() |
| | | form.value = {} |
| | | },500) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const DaTreeRef = ref() |
| | | const treeListData = ref([]) |
| | | const selectRegionName = ref() |
| | | const isExpandIcon = ref(false) |
| | | const regionName = ref('') |
| | | //展开关闭选择框 |
| | | function expandRegion(){ |
| | | if(isExpandIcon.value){ |
| | | isExpandIcon.value = false |
| | |
| | | nodeList.forEach((item)=>{ |
| | | nameList.push(item.label) |
| | | }) |
| | | selectRegionName.value = nameList |
| | | regionName.value = selectRegionName.value.join() |
| | | regionName.value = nameList.join() |
| | | } |
| | | //选中区域 |
| | | function handleTreeChange(e,e2){ |
| | |
| | | DaTreeRef.value.setExpandedKeys([item.key],true) |
| | | } |
| | | } |
| | | const isCheckedDefault =ref(false) |
| | | const form = ref({ |
| | | userName:'', |
| | | userPhone:'', |
| | | listRegion:[], |
| | | userAddress:'', |
| | | isDefault:null, |
| | | }) |
| | | //提交表单数据 |
| | | async function submit(){ |
| | | console.log('form',form.value) |
| | | await creatUserArchive(form.value).then((res) =>{ |
| | | if(res.code == 200){ |
| | | uni.showToast({ |
| | | title: '新增成功', |
| | | image: '../../static/images/other/success.svg', |
| | | duration:500 |
| | | }) |
| | | setTimeout(() =>{ |
| | | uni.navigateBack() |
| | | form.value = {} |
| | | },500) |
| | | } |
| | | }) |
| | | } |
| | | function change(e){ |
| | | console.log('e',e) |
| | | form.value.isDefault = e.detail.value ? 1 : null |
| | | } |
| | | |
| | | onMounted(async() =>{ |
| | | await getRegion() |
| | | }) |
| | | </script> |
| | | <template> |
| | | <view class="container"> |
| | | <navbar title ='新增地址'></navbar> |
| | | <navbar :title ='pageTitle'></navbar> |
| | | <view class="content"> |
| | | <view class="main"> |
| | | <view class="item"> |
| | |
| | | if(res.data.userInfo.waterCardNumber){ |
| | | let res1 = await getVipInfoApi() |
| | | vipInfo.value = res1.data |
| | | isVip.value = false |
| | | isVip.value = true |
| | | }else{ |
| | | isVip.value = false |
| | | } |
| | | } |
| | | /** |
| | | * 扫码取水相关 |
| | | */ |
| | | function toScan(){ |
| | | uni.navigateTo({ |
| | | url:'/pages/scanWater/index' |
| | | }) |
| | | } |
| | | /** |
| | | * 功能列表相关 |
| | |
| | | 充值 |
| | | </view> |
| | | </view> |
| | | <view class="box1-bg box1-three"> |
| | | <view class="box1-bg box1-three" @click="toScan()"> |
| | | <image src="../../static/images/index/icon23.png" alt=""></image> |
| | | <view>扫码取水</view> |
| | | </view> |
| | |
| | | //支付方式 |
| | | const payMethod = ref() |
| | | const payList = ref([ |
| | | {text:"支付宝支付",value:1,checked:true,img:'../../static/images/recharge/pay.png'}, |
| | | // {text:"支付宝支付",value:1,checked:true,img:'../../static/images/recharge/pay.png'}, |
| | | {text:"微信支付",value:2,checked:false,img:'../../static/images/recharge/wx.png'}, |
| | | {text:"余额",value:3,checked:false,img:'../../static/images/recharge/balance.png'}, |
| | | ]) |
| | |
| | | padding: 0 20rpx; |
| | | box-sizing: border-box; |
| | | // background: #49B4E3; |
| | | height:216rpx; |
| | | height:130rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
对比新文件 |
| | |
| | | <template> |
| | | <view> |
| | | <navbar title ='设备详情'></navbar> |
| | | 扫码后跳转的页面 |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | | |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | 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"); |
| | | } |
| | | function setAddressDefaultApi(id) { |
| | | return util_request.request(`/userAddress/editDefault?id=${id}`, {}, "GET"); |
| | | } |
| | | exports.creatUserArchive = creatUserArchive; |
| | | exports.deleteAddressApi = deleteAddressApi; |
| | | exports.editAddressApi = editAddressApi; |
| | | exports.getAddressApi = getAddressApi; |
| | | exports.getRegionApi = getRegionApi; |
| | | exports.getUserInfo = getUserInfo; |
| | | exports.getVipInfoApi = getVipInfoApi; |
| | | exports.searchAddress = searchAddress; |
| | | exports.setAddressDefaultApi = setAddressDefaultApi; |
| | | exports.wxLoginApi = wxLoginApi; |
| | |
| | | "./pages/index/index.js"; |
| | | "./pages/addCard/index.js"; |
| | | "./pages/balanceRecord/index.js"; |
| | | "./pages/scanWater/index.js"; |
| | | "./pages/recharge/index.js"; |
| | | "./pages/sendWater/index.js"; |
| | | "./pages/preSendWater/index.js"; |
| | | "./pages/address/index.js"; |
| | | "./pages/addressEdit/index.js"; |
| | | "./pages/addressAdd/index.js"; |
| | | "./pages/addressLocate/index.js"; |
| | | "./pages/success/index.js"; |
| | |
| | | "pages/index/index", |
| | | "pages/addCard/index", |
| | | "pages/balanceRecord/index", |
| | | "pages/scanWater/index", |
| | | "pages/recharge/index", |
| | | "pages/sendWater/index", |
| | | "pages/preSendWater/index", |
| | | "pages/address/index", |
| | | "pages/addressEdit/index", |
| | | "pages/addressAdd/index", |
| | | "pages/addressLocate/index", |
| | | "pages/success/index" |
| | |
| | | common_vendor.index.navigateBack(); |
| | | } |
| | | const props = __props; |
| | | const title = common_vendor.ref(props.title); |
| | | const pageTitle = common_vendor.ref(props.title); |
| | | common_vendor.watch( |
| | | props.title, |
| | | (New, Old) => { |
| | | pageTitle.value = New; |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | return (_ctx, _cache) => { |
| | | return { |
| | | a: common_assets._imports_0, |
| | | b: common_vendor.o(($event) => navBackTo()), |
| | | c: common_vendor.t(title.value) |
| | | c: common_vendor.t(__props.title) |
| | | }; |
| | | }; |
| | | } |
| | |
| | | if (res.code == 200) { |
| | | res.data.list.forEach((item) => { |
| | | res.data.list.forEach((item2) => { |
| | | if (item2.isDefault == 1) { |
| | | item2.isDefault = true; |
| | | } else { |
| | | item2.isDefault = false; |
| | | } |
| | | item2.isDefault = item2.isDefault == 1 ? true : false; |
| | | item2.addressWhole = item2.regionName.replace(/[,#]/g, " ") + item2.address; |
| | | }); |
| | | }); |
| | |
| | | } |
| | | }); |
| | | } |
| | | function navTo() { |
| | | common_vendor.index.navigateTo({ |
| | | url: "/pages/addressAdd/index" |
| | | async function setDefault(isDefault, id, index1) { |
| | | if (isDefault == true) { |
| | | console.log("true"); |
| | | } else { |
| | | console.log("false"); |
| | | await api_index.setAddressDefaultApi(id).then((res) => { |
| | | if (res.code == 200) { |
| | | getAddressList(); |
| | | } else { |
| | | common_vendor.index.showToast({ |
| | | title: "设置失败", |
| | | image: "../../static/images/other/success.svg", |
| | | duration: 500 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | async function deleteAddress(id) { |
| | | await api_index.deleteAddressApi(id).then((res) => { |
| | | if (res.code == 200) { |
| | | common_vendor.index.showToast({ |
| | | title: "删除成功", |
| | | image: "../../static/images/other/success.svg", |
| | | duration: 500 |
| | | }); |
| | | getAddressList(); |
| | | } |
| | | }); |
| | | } |
| | | common_vendor.onMounted(() => { |
| | | function navToModify(id) { |
| | | common_vendor.index.navigateTo({ |
| | | url: `/pages/addressAdd/index?id=${id}` |
| | | }); |
| | | } |
| | | function navToAdd() { |
| | | let id = null; |
| | | common_vendor.index.navigateTo({ |
| | | url: `/pages/addressAdd/index?id=${id}` |
| | | }); |
| | | } |
| | | common_vendor.onShow(async () => { |
| | | getAddressList(); |
| | | }); |
| | | return (_ctx, _cache) => { |
| | |
| | | b: common_vendor.t(item.userPhone), |
| | | c: common_vendor.t(item.addressWhole), |
| | | d: item.id, |
| | | e: item.isDefault |
| | | e: item.isDefault, |
| | | f: common_vendor.o(($event) => setDefault(item.isDefault, item.id)), |
| | | g: common_vendor.o(($event) => navToModify(item.id)), |
| | | h: common_vendor.o(($event) => deleteAddress(item.id)) |
| | | }; |
| | | }), |
| | | c: common_assets._imports_0$3, |
| | | d: common_assets._imports_1$1, |
| | | e: common_vendor.o(($event) => navTo()) |
| | | e: common_vendor.o(($event) => navToAdd()) |
| | | }; |
| | | }; |
| | | } |
| | |
| | | <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}}"></radio><text>设为默认</text></view><view class="handel-right"><view><image src="{{c}}" alt=""></image><text>编辑</text></view><view><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" bindtap="{{e}}">新增收货地址</view></view></view> |
| | |
| | | if (res.data.userInfo.waterCardNumber) { |
| | | let res1 = await api_index.getVipInfoApi(); |
| | | vipInfo.value = res1.data; |
| | | isVip.value = false; |
| | | isVip.value = true; |
| | | } else { |
| | | isVip.value = false; |
| | | } |
| | | } |
| | | function toScan() { |
| | | common_vendor.index.navigateTo({ |
| | | url: "/pages/scanWater/index" |
| | | }); |
| | | } |
| | | const functionList = common_vendor.ref([ |
| | | { text: "余额记录", icon: "../../static/images/index/icon31.png", url: "/pages/balanceRecord/index" }, |
| | |
| | | i: common_vendor.o(($event) => navTo("/pages/sendWater/index")), |
| | | j: common_vendor.o(($event) => navTo("/pages/recharge/index")), |
| | | k: common_assets._imports_5, |
| | | l: common_vendor.f(functionList.value, (item, index, i0) => { |
| | | l: common_vendor.o(($event) => toScan()), |
| | | m: common_vendor.f(functionList.value, (item, index, i0) => { |
| | | return { |
| | | a: item.icon, |
| | | b: common_vendor.t(item.text), |
| | |
| | | d: index |
| | | }; |
| | | }), |
| | | m: common_assets._imports_6, |
| | | n: common_assets._imports_7, |
| | | o: common_assets._imports_8, |
| | | p: common_assets._imports_9, |
| | | q: common_assets._imports_8 |
| | | n: common_assets._imports_6, |
| | | o: common_assets._imports_7, |
| | | p: common_assets._imports_8, |
| | | q: common_assets._imports_9, |
| | | r: common_assets._imports_8 |
| | | }); |
| | | }; |
| | | } |
| | |
| | | <view class="container data-v-1cf27b2a"><view class="content data-v-1cf27b2a"><view class="card-box data-v-1cf27b2a" style="{{'padding-top:' + g}}"><view class="card data-v-1cf27b2a"><view class="card-content data-v-1cf27b2a"><view wx:if="{{a}}" class="card-title data-v-1cf27b2a"><view class="data-v-1cf27b2a">会员卡</view><image class="data-v-1cf27b2a" src="{{b}}" alt=""></image></view><view wx:else class="card-add data-v-1cf27b2a"><view class="data-v-1cf27b2a" bindtap="{{d}}"><image class="data-v-1cf27b2a" src="{{c}}" alt=""></image><text class="data-v-1cf27b2a">添加会员卡</text></view></view><view class="card-info data-v-1cf27b2a"><view class="info-head data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{e}}" alt=""></image></view><view class="info-content data-v-1cf27b2a"><view class="info-content-top data-v-1cf27b2a"><view class="data-v-1cf27b2a">张大左</view><view class="data-v-1cf27b2a">vip1</view></view><view class="info-content-bottom data-v-1cf27b2a">YL123654987521</view></view><view class="info-more data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{f}}"></image></view></view><view class="card-bottom data-v-1cf27b2a"><view class="data-v-1cf27b2a">我的积分:200</view><view class="data-v-1cf27b2a">消费折扣:9.9折</view></view></view></view></view><view class="function-box1 data-v-1cf27b2a"><view class="box1-bg box1-one data-v-1cf27b2a" bindtap="{{i}}"><image class="data-v-1cf27b2a" src="{{h}}" alt=""></image><view class="data-v-1cf27b2a">送水到家</view></view><view class="box1-bg box1-two data-v-1cf27b2a"><view class="data-v-1cf27b2a">账户余额(元)</view><view class="recharge data-v-1cf27b2a"><text class="data-v-1cf27b2a">¥</text><text class="data-v-1cf27b2a">120.00</text></view><view class="data-v-1cf27b2a" bindtap="{{j}}"> 充值 </view></view><view class="box1-bg box1-three data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{k}}" 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="{{l}}" wx:for-item="item" wx:key="d"><view class="box2-item data-v-1cf27b2a" bindtap="{{item.c}}"><image class="data-v-1cf27b2a" src="{{item.a}}" alt=""></image><view class="box2-item-text data-v-1cf27b2a">{{item.b}}</view></view></block></view></view><view class="advertisement-box data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{m}}" 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"><view class="data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{n}}" 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="{{o}}" alt=""></image></view></view><view class="service-bg data-v-1cf27b2a"><view class="data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{p}}" 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="{{q}}" 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:' + g}}"><view class="card data-v-1cf27b2a"><view class="card-content data-v-1cf27b2a"><view wx:if="{{a}}" class="card-title data-v-1cf27b2a"><view class="data-v-1cf27b2a">会员卡</view><image class="data-v-1cf27b2a" src="{{b}}" alt=""></image></view><view wx:else class="card-add data-v-1cf27b2a"><view class="data-v-1cf27b2a" bindtap="{{d}}"><image class="data-v-1cf27b2a" src="{{c}}" alt=""></image><text class="data-v-1cf27b2a">添加会员卡</text></view></view><view class="card-info data-v-1cf27b2a"><view class="info-head data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{e}}" alt=""></image></view><view class="info-content data-v-1cf27b2a"><view class="info-content-top data-v-1cf27b2a"><view class="data-v-1cf27b2a">张大左</view><view class="data-v-1cf27b2a">vip1</view></view><view class="info-content-bottom data-v-1cf27b2a">YL123654987521</view></view><view class="info-more data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{f}}"></image></view></view><view class="card-bottom data-v-1cf27b2a"><view class="data-v-1cf27b2a">我的积分:200</view><view class="data-v-1cf27b2a">消费折扣:9.9折</view></view></view></view></view><view class="function-box1 data-v-1cf27b2a"><view class="box1-bg box1-one data-v-1cf27b2a" bindtap="{{i}}"><image class="data-v-1cf27b2a" src="{{h}}" alt=""></image><view class="data-v-1cf27b2a">送水到家</view></view><view class="box1-bg box1-two data-v-1cf27b2a"><view class="data-v-1cf27b2a">账户余额(元)</view><view class="recharge data-v-1cf27b2a"><text class="data-v-1cf27b2a">¥</text><text class="data-v-1cf27b2a">120.00</text></view><view class="data-v-1cf27b2a" bindtap="{{j}}"> 充值 </view></view><view class="box1-bg box1-three data-v-1cf27b2a" bindtap="{{l}}"><image class="data-v-1cf27b2a" src="{{k}}" 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="{{m}}" wx:for-item="item" wx:key="d"><view class="box2-item data-v-1cf27b2a" bindtap="{{item.c}}"><image class="data-v-1cf27b2a" src="{{item.a}}" alt=""></image><view class="box2-item-text data-v-1cf27b2a">{{item.b}}</view></view></block></view></view><view class="advertisement-box data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{n}}" 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"><view class="data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{o}}" 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="{{p}}" alt=""></image></view></view><view class="service-bg data-v-1cf27b2a"><view class="data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{q}}" 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="{{r}}" alt=""></image></view></view></view></view></view></view> |
| | |
| | | const otherMoney = common_vendor.ref(); |
| | | const payMethod = common_vendor.ref(); |
| | | const payList = common_vendor.ref([ |
| | | { text: "支付宝支付", value: 1, checked: true, img: "../../static/images/recharge/pay.png" }, |
| | | // {text:"支付宝支付",value:1,checked:true,img:'../../static/images/recharge/pay.png'}, |
| | | { text: "微信支付", value: 2, checked: false, img: "../../static/images/recharge/wx.png" }, |
| | | { text: "余额", value: 3, checked: false, img: "../../static/images/recharge/balance.png" } |
| | | ]); |
| | |
| | | width: 100%; |
| | | padding: 0 20rpx; |
| | | box-sizing: border-box; |
| | | height: 216rpx; |
| | | height: 130rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |