| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660 |
- <template>
- <view class="content">
- <top-title
- :titleValue="title"
- :pageScroll="scrollVal"
- :btnTop="btnPos"
- style="width: 100%"
- ></top-title>
- <view class="page-section-spacing" style="width: 100%; position: relative">
- <view class="content-box">
- <view class="content-font"> </view>
- <view class="call-font"> </view>
- </view>
- <swiper
- class="swiper"
- indicator-dots="false"
- autoplay="true"
- duration="500"
- style="height: 440rpx"
- >
- <swiper-item
- v-for="(item, index) in swiperList"
- :key="index"
- class="swiper-content"
- >
- <image :src="item.img" mode="aspectFill" style="width: 100%; height: 100%"></image>
- </swiper-item>
- </swiper>
- <image src="../../static/Intersect.svg" class="groove-img"></image>
- <view class="rowDot">
- <view v-for="(item, index) in swiperList" :key="index" class="dots">
- <view
- :class="['dot', index === swiperCurrent ? 'active' : '']"
- ></view>
- </view>
- </view>
- </view>
- <view class="page-nav-box">
- <view v-for="(item, index) in navList" :key="index" class="nav-content" @click="goOtherPage(item)">
- <image :src="item.url" mode="aspectFit" style="width: 38px; height: 38px"></image>
- <view>{{ item.content }}</view>
- </view>
- </view>
- <view class="notice-box" style="width:90%;">
- <view class="notice-title-box" style="margin: 0 auto;margin-bottom: 30rpx;">
- <view class="notice-font">缴费订单</view>
- <view class="notice-more-font">
- <view style="margin-right: 8rpx; font-size: 26rpx" @click="goPayList">更多</view>
- <image
- src="/static/right-arrow-blue.png"
- mode="aspectFill"
- style="width: 12rpx; height: 16rpx"
- ></image>
- </view>
- </view>
- <view
- class="notice-content-box"
- v-for="(item, index) in heatList"
- :key="index"
- style="justify-content: start; padding: 30rpx 0 30rpx 30rpx;border-radius: 0;"
- @click="goPayDeatil(item.code)" >
- <image
- src="/static/order-poster.svg"
- style="
- width: 112rpx;
- height: 112rpx;
- margin-right: 20rpx;
- border-radius: 10%;
- "
- ></image>
- <view class="notice-content" style="width: 75%">
- <view class="notice-content-font">{{
- item.name
- }}</view>
- <view class="display-flex-start" style="margin-top: 20rpx">
- <view class="notice-content-time color-a7adba">
- {{item.estate_name + item.building_name + item.unit + item.room}}
- </view>
- <view class="notice-content-time display-flex-start">
- <text class="color-a7adba">¥:</text>
- <text class="order-money">{{item.total_fee}}</text>
- </view>
- </view>
- <view class="display-between" style="margin-top: 20rpx">
- <view class="notice-content-time color-a7adba" style="visibility: hidden;">
- {{item.time}}
- </view>
- <view class="display-flex-start">
- <view class="notice-content-time" :style="{color:statusColor[item.status]}">{{statusObj[item.status]}}</view>
- </view>
- </view>
- </view>
- </view>
- <view class="noLogin-box" v-if="owner_id == 0">
- <view v-show="isShow">{{!isAuth ? '未登录': '未关联'}}</view>
- <view v-show="isShow">{{!isAuth ? '请先完成授权登录': '请先完成关联住房'}}</view>
- <view class="withHouseBtn" @click="goHouse" v-show="isAuth && isShow">关联住房</view>
- <button type='primary' class="withHouseBtn" v-show="!isAuth && isShow" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">授权登录</button>
- </view>
- </view>
-
- <foot-tabs :selectedIndex="0" :isShow="footFlag"></foot-tabs>
- </view>
- </template>
- <script>
- import md5 from "@/common/md5.js";
- import topTitle from "@/components/top-title/top-title.vue";
- import footTabs from "@/components/foot-tabs/footTabs.vue";
- export default {
- components: {
- "foot-tabs": footTabs,
- "top-title": topTitle,
- },
- data() {
- return {
- title: "",
- isAuth: false,
- scrollVal: Number,
- footFlag: true,
- btnPos:uni.getMenuButtonBoundingClientRect().top + 6,
- shareImgUrl:'',
- swiperList: [
- {
- img: "/static/cainuan.jpeg",
- },
- /*
- {
- img: "/static/poster-bg.png",
- },
- */
- ],
- swiperCurrent: 0,
- navList: [
- {
- url: "/static/navList/appeal.png",
- path: "/pages/heatingPage/list",
- content: "供暖缴费",
- },
- {
- url: "/static/navList/policy.png",
- path: "/pages/heatingPage/reportFix",
- content: "一键报修",
- },
- ],
- heatList: [],
- statusObj:getApp().globalData.statusObj,
- statusColor:getApp().globalData.statusColor,
- owner_id : 0,
- isShow : false,
- };
- },
- onShow() {
- uni.hideTabBar({});
-
- let that = this;
- this.isAuth = getApp().globalData.isAuth;
- if (this.isAuth){
- that.getHeatList();
- }
- else{
- this.reset();
- setTimeout(function() {
- that.getUserInfo();
- }, 100);
- setTimeout(function() {
- that.getUserInfo();
- }, 500);
- setTimeout(function() {
- that.getUserInfo();
- }, 800);
- setTimeout(function() {
- that.getUserInfo();
- }, 1000);
- setTimeout(function() {
- that.getUserInfo();
- }, 1500);
- setTimeout(function() {
- that.getUserInfo();
- }, 2000);
- }
- },
- onLoad() {
- // uni.showLoading({
- // title: "加载中",
- // mask: true,
- // });
- //this.getSwiperList();
- //this.getUserInfo();
- //this.getUserInfo();
- this.isAuth = getApp().globalData.isAuth;
- if (this.isAuth){
- that.getHeatList();
- }
-
- },
- onShareAppMessage() {
- // url: "/pages/index/index";
- return {
- title: '缴费系统',
- path: '/pages/index/index',
- imageUrl:'/static/shareImg2.png',
- }
- },
- methods: {
- reset(){
- this.isAuth = false;
- this.owner_id = 0;
- this.isShow = false;
- this.heatList = [];
- },
- getUserInfo(){
- let openId = getApp().globalData.open_id ? getApp().globalData.open_id : uni.getStorageSync('openId');
- if (this.isShow || openId === ''){
- return;
- }
- let that = this;
- let url = getApp().makeApiUrl("user",'user','info_by_openid');
- uni.request({
- url:url,
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- openId: openId
- },
-
-
- success: (res) => {
- console.log(res)
- if(res.data.code === 200){
-
- if (res.data.data.phone === ''){
- //必须有手机号才算登录成功,系统才可用。
- // console.log("res.data.data.phone="+res.data.data.phone);
- getApp().globalData.isAuth = false;
- that.isAuth = false;
-
- }
- else{
- getApp().globalData.isAuth = true;
- that.isAuth = true;
- if (res.data.data.owner_id > 0){
- that.owner_id = res.data.data.owner_id;
- }
- that.getHeatList();
- }
- that.isShow = true;
- // uni.hideLoading()
- }
- },
- fail: () => {
- console.log("连接失败");
- }
- });
- },
- getPhoneNumber(e){
- let res = getApp().getPhoneNumber(e);
- if (res){
- this.isShow = false;
- this.goHouse();
- }
- },
- swiperChange(e) {
- this.swiperCurrent = e.detail.current;
- },
- goOtherPage(item){
- if(!this.isAuth){
- uni.showToast({
- title: "您还没有登录授权",
- duration: 2500,
- icon: "none",
- });
- return;
- }
- uni.navigateTo({
- url:item.path
- })
- },
- getSwiperList() {
- let that = this;
-
- let url = getApp().makeApiUrl("common","main_pics","list");
-
- uni.request({
- url: url,
- method: "POST",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- data: {
- order_by: "weight desc",
- s_status: 1,
- page: 1,
- page_size: 7,
- },
- success: (res) => {
- console.log(res);
- if (res.data.code === 200) {
- res.data.data.list.forEach((item) => {
- item.pic_path = getApp().globalData.shareUrl + item.pic_path;
- });
- that.swiperList = res.data.data.list;
- that.owner_id = res.data.data.owner_id;
- // this.shareImgUrl = res.data.data.list[0].pic_path
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- getHeatList() {
-
- let url = getApp().makeApiUrl("user",'user','get_order_list');
- let postData = {
- // page: 1,
- // page_size: 2,
- openId:getApp().globalData.open_id ? getApp().globalData.open_id : uni.getStorageSync('openId')
- };
- let that = this;
- uni.request({
- url: url,
- method: "POST",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- data: postData,
- success: (res) => {
- console.log(res);
- if (res.data.code === 200) {
- that.heatList = res.data.data.list;
- that.owner_id = res.data.data.owner_id;
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- goPayDeatil(id) {
- uni.navigateTo({
- url: "/pages/heatingPage/pay?id=" + id,
- });
- },
- goHouse(){
- uni.navigateTo({
- url: "/pages/selfCenter/with_house",
- });
- },
- goAuth() {
- uni.navigateTo({
- url: "/pages/auth/index",
- });
- },
- goPayList() {
- if(!this.isAuth){
- uni.showToast({
- title: "您还没有登录授权",
- duration: 2500,
- icon: "none",
- });
- return;
- }
- uni.navigateTo({
- url: "/pages/heatingPage/list",
- });
- },
- },
- onPageScroll(e) {
- this.scrollVal = e.scrollTop;
- if (e.scrollTop < uni.getSystemInfoSync().windowHeight) {
- this.footFlag = true;
- }
- },
- onReachBottom(e) {
- this.footFlag = false;
- }
- };
- </script>
- <style>
- .unclick {
- background-color: #bfbfbf !important;
- }
- .content {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- position: relative;
- }
- .logo {
- height: 200rpx;
- width: 200rpx;
- margin-top: 200rpx;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 50rpx;
- }
- .text-area {
- display: flex;
- justify-content: center;
- }
- .title {
- font-size: 36rpx;
- color: #8f8f94;
- }
- .groove-img {
- width: 100%;
- height: 100rpx;
- bottom: -22rpx;
- position: absolute;
- }
- .rowDot {
- display: flex;
- position: absolute;
- top: 310rpx;
- left: 80rpx;
- }
- .dots {
- flex-direction: row;
- justify-content: center;
- align-items: center;
- align-content: center;
- }
- .dot {
- margin-right: 8rpx;
- width: 40rpx;
- height: 8rpx;
- opacity: 1;
- border-radius: 6rpx;
- background: #fff5f9;
- }
- .dot.active {
- background: #ff4e54;
- }
- /* .swiper-content { */
- /* border-radius: 0 0 10% 10%; */
- /* } */
- .page-nav-box {
- width: 88%;
- height: 180rpx;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-around;
- align-items: center;
- padding: 20rpx 10rpx 30rpx 10rpx;
- box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
- border-radius: 16rpx;
- position: absolute;
- top: 360rpx;
- background-color: #fff;
- }
- .nav-content {
- width: 25%;
- height: 130rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-top: 20rpx;
- font-size: 28rpx;
- justify-content: space-around;
- letter-spacing: 0.02em;
- color: #0d1937;
- font-family: PingFang SC;
- font-style: normal;
- /* font-weight: 600; */
- }
- .notice-box {
- width: 90%;
- margin-top: 200rpx;
- margin-bottom: 20rpx;
- }
- .notice-title-box {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 40rpx;
- }
- .notice-font {
- font-family: PingFang SC;
- font-style: normal;
- font-weight: bold;
- font-size: 38rpx;
- letter-spacing: 0.02em;
- color: #0d1937;
- }
- .notice-more-font {
- font-size: 28rpx;
- color: #146afb;
- display: flex;
- align-items: center;
- }
- .notice-content-box {
- display: flex;
- padding: 30rpx 20rpx 30rpx 20rpx;
- background-color: #ffffff;
- box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
- border-radius: 32rpx;
- margin-top: 20rpx;
- justify-content: space-between;
- }
- .maskModal {
- width: 100%;
- position: absolute;
- background-color: rgba(0, 0, 0, 0.4);
- border-radius: 32rpx;
- height: 100%;
- top: 0;
- right: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- font-size: 32rpx;
- font-weight: bold;
- }
- .notice-content-font {
- font-size: 32rpx;
- color: #0d1937;
- /* font-weight: 600; */
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .notice-content-time {
- font-size: 26rpx;
- letter-spacing: 0.02em;
- color: #cfcfcf;
- }
- .park-box {
- border-radius: 32rpx;
- margin-right: 20rpx;
- position: relative;
- height: 500rpx;
- }
- .park-content-box {
- width: 394rpx;
- background-color: #ffffff;
- border-radius: 56rpx 0px 32rpx 32rpx;
- position: absolute;
- top: 210rpx;
- font-size: 30rpx;
- padding: 30rpx;
- box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
- }
- .park-title {
- /* font-weight: 600; */
- line-height: 36rpx;
- letter-spacing: 0.02em;
- color: #0d1937;
- }
- .park-address {
- /* font-weight: 600; */
- font-size: 26rpx;
- letter-spacing: 0.02em;
- color: #cfcfcf;
- margin-top: 10rpx;
- }
- .park-title-img {
- width: 16rpx;
- height: 16rpx;
- margin-right: 4rpx;
- }
- .park-footer-box {
- margin-top: 30rpx;
- }
- .park-footer-img {
- width: 24rpx;
- height: 24rpx;
- margin-right: 6rpx;
- }
- .park-footer-font {
- color: #cfcfcf;
- font-size: 24rpx;
- margin-top: 10rpx;
- }
- .width-30 {
- width: 30%;
- }
- .attract-content {
- color: #697594;
- /* font-weight: 600; */
- font-size: 24rpx;
- margin-top: 8rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .online-box {
- width: 12rpx;
- height: 12rpx;
- border-radius: 50%;
- background-color: #589cff;
- margin-right: 5rpx;
- }
- .offline-box {
- width: 12rpx;
- height: 12rpx;
- border-radius: 50%;
- background-color: #ffcf86;
- margin-right: 5rpx;
- }
- .color-a7adba {
- color: #a7adba;
- }
- .content-box {
- position: absolute;
- width: 100%;
- top: 150rpx;
- display: flex;
- flex-direction: column;
- z-index: 999;
- justify-content: space-around;
- height: 80px;
- align-items: center;
- }
- .content-font {
- color: #fff;
- font-weight: bold;
- font-size: 40rpx;
- }
- .call-font {
- color: #fff;
- font-size: 32rpx;
- }
- .order-money {
- color: #d9001b;
- font-size: 36rpx;
- font-weight: 500;
- }
- .noLogin-box {
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- margin-top: 160rpx;
- color: #a7adba;
- }
- .withHouseBtn {
- color: #589cff;
- cursor: pointer;
- margin-top: 40rpx;
- }
- </style>
|