diff --git a/page_vip/card_his.vue b/page_vip/card_his.vue new file mode 100644 index 0000000..0341694 --- /dev/null +++ b/page_vip/card_his.vue @@ -0,0 +1,140 @@ +<template> + <view class="page"> + <u-navbar title="购买记录" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' + height='45'></u-navbar> + + <view class="cont"> + <view class="vip_card"> + <view class="top"> + <view class="txt"> + 电单车15天5次卡 + </view> + <view class="txt"> + 3.9 <span style="font-size: 32rpx;">元</span> + </view> + </view> + <view class="bot"> + 2024-07-28 17:39:50 + </view> + </view> + </view> + </view> +</template> + +<script> + export default { + data() { + return { + bgc: { + backgroundColor: '#fff' + }, + sn: '', + istrue: false, + CouponLists:[] + } + }, + onShow() { + this.getinfo() + }, + methods: { + getinfo() { + // uni.showLoading({ + // title:'加载中' + // }) + this.$u.get("/getAppInfo").then((res) => { + + if (res.code == 200) { + + this.$store.commit('SET_USERID', res.user.userId); + this.userinfo = res.user + this.getcard() + } else { + + } + }); + }, + formatDate(dateString) { + if (!dateString) return ''; + const date = new Date(dateString); + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始,需要加1 + const day = date.getDate().toString().padStart(2, '0'); + return `${year}-${month}-${day}`; + }, + getcard(){ + let data={ + userId:this.userinfo.userId + } + this.$u.get("/appVerify/getCouponListByUserId?",data ).then((res) => { + + if (res.code == 200) { + this.CouponLists = res.data + + } else { + // uni.showToast({ + // title: res.msg, + // icon: 'none', + // duration: 2000 + // }); + } + }); + } + } + } +</script> + +<style lang="scss"> + page { + background-color: #fff; + } + + .page { + width: 750rpx; + + .cont { + display: flex; + justify-content: center; + flex-wrap: wrap; + + .tit1 { + font-weight: 500; + font-size: 32rpx; + color: #FFFFFF; + } + + .tit2 { + margin-top: 10rpx; + font-weight: 500; + font-size: 24rpx; + color: #FFFFFF; + } + .vip_card{ + + width: 95%; + padding: 10rpx 12rpx; + // margin: 0 auto; + border-bottom: 1rpx solid #D8D8D8 ; + .top{ + display: flex; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + .txt{ + font-weight: 500; + font-size: 40rpx; + color: #2F3240; + } + } + .bot{ + margin-top: 14rpx; + font-weight: 400; + font-size: 28rpx; + color: #808080; + } + } + + } + + + } +</style> \ No newline at end of file diff --git a/page_vip/myVip_index.vue b/page_vip/myVip_index.vue index 6eb0bb7..681257e 100644 --- a/page_vip/myVip_index.vue +++ b/page_vip/myVip_index.vue @@ -4,36 +4,36 @@ height='45'></u-navbar> <view class="cont"> - <view class="card1"> + <view class="card1" v-for="(item,index) in CouponLists" :key="index" v-show="(item.couponType==3||item.couponType==4)&&item.status==1"> <view class="tit1"> - 电单车15天5次卡 + {{item.couponName}} </view> <view class="tit2"> - 有效期至2024-08-04 + 有效期至{{formatDate(item.expirationTime) }} </view> <view class="txt3"> - 剩余次数 <span>5</span> + 剩余次数 <span>{{item.limitNum}}</span> </view> </view> - <view class="card2"> + <view class="card2" v-for="(item,index) in CouponLists" :key="index" v-show="(item.couponType==3||item.couponType==4)&&item.status==3"> <view class="tit1"> - 电单车15天5次卡 + {{item.couponName}} </view> <view class="tit2"> - 有效期至2024-08-04 + 有效期至{{formatDate(item.expirationTime) }} </view> <view class="txt3"> <span style="font-size: 64rpx;">已过期</span> </view> </view> - <view class="card3"> + <view class="card3" v-for="(item,index) in CouponLists" :key="index" v-show="item.couponType==2"> <view class="txt4"> - 有效期至2024-08-28 + 有效期至{{formatDate(item.expirationTime) }} </view> </view> - <view class="card4"> + <view class="card4" v-for="(item,index) in CouponLists" :key="index" v-show="item.couponType==1"> <view class="txt4"> - 有效期至2024-08-28 + 有效期至{{formatDate(item.expirationTime) }} </view> </view> </view> @@ -72,6 +72,14 @@ } }); }, + formatDate(dateString) { + if (!dateString) return ''; + const date = new Date(dateString); + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始,需要加1 + const day = date.getDate().toString().padStart(2, '0'); + return `${year}-${month}-${day}`; + }, getcard(){ let data={ userId:this.userinfo.userId @@ -81,7 +89,7 @@ if (res.code == 200) { this.CouponLists = res.data - } else { + } else { // uni.showToast({ // title: res.msg, // icon: 'none', diff --git a/page_vip/vip_his.vue b/page_vip/vip_his.vue new file mode 100644 index 0000000..ef1d639 --- /dev/null +++ b/page_vip/vip_his.vue @@ -0,0 +1,173 @@ +<template> + <view class="page"> + <u-navbar title="购买记录" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' + height='45'></u-navbar> + + <view class="cont"> + <view class="vip_card"> + <view class="top"> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uac2wTu5kmOGPkonvNcl" mode=""></image> + 月卡会员 + </view> + <view class="bot"> + <view class="left"> + <image src=" https://lxnapi.ccttiot.com/bike/img/static/uvGHCob7uexyCsuMCt2c" mode=""></image> + </view> + <view class="right"> + <view class="tit"> + 购买时长:1个月 + </view> + <view class="data"> + 有效期:2024-07-29 至 2024-08-29 + </view> + <view class="data"> + 支付时间:2024-07-29 13:59 + </view> + </view> + </view> + </view> + </view> + </view> +</template> + +<script> + export default { + data() { + return { + bgc: { + backgroundColor: '#fff' + }, + sn: '', + istrue: false, + CouponLists:[] + } + }, + onShow() { + this.getinfo() + }, + methods: { + getinfo() { + // uni.showLoading({ + // title:'加载中' + // }) + this.$u.get("/getAppInfo").then((res) => { + + if (res.code == 200) { + + this.$store.commit('SET_USERID', res.user.userId); + this.userinfo = res.user + this.getcard() + } else { + + } + }); + }, + formatDate(dateString) { + if (!dateString) return ''; + const date = new Date(dateString); + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始,需要加1 + const day = date.getDate().toString().padStart(2, '0'); + return `${year}-${month}-${day}`; + }, + getcard(){ + let data={ + userId:this.userinfo.userId + } + this.$u.get("/appVerify/getCouponListByUserId?",data ).then((res) => { + + if (res.code == 200) { + this.CouponLists = res.data + + } else { + // uni.showToast({ + // title: res.msg, + // icon: 'none', + // duration: 2000 + // }); + } + }); + } + } + } +</script> + +<style lang="scss"> + page { + background-color: #fff; + } + + .page { + width: 750rpx; + + .cont { + display: flex; + justify-content: center; + flex-wrap: wrap; + + .tit1 { + font-weight: 500; + font-size: 32rpx; + color: #FFFFFF; + } + + .tit2 { + margin-top: 10rpx; + font-weight: 500; + font-size: 24rpx; + color: #FFFFFF; + } + .vip_card{ + // margin: 0 auto; + width: 680rpx; + padding: 16rpx 24rpx; + background: #FFFFFF; + box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08); + border-radius: 20rpx 20rpx 20rpx 20rpx; + .top{ + display: flex; + flex-wrap: nowrap; + align-items: center; + font-weight: 900; + font-size: 40rpx; + color: #3B3838; + image{ + margin-right: 24rpx; + width: 58rpx; + height: 58rpx; + } + } + .bot{ + margin-top: 20rpx; + display: flex; + flex-wrap: nowrap; + .left{ + margin-right: 24rpx; + image{ + width: 194rpx; + height: 194rpx; + } + } + .right{ + .tit{ + width: 100%; + font-weight: 600; + font-size: 32rpx; + color: #2F3240; + } + .data{ + margin-top: 16rpx; + width: 100%; + font-weight: 400; + font-size: 28rpx; + color: #808080; + } + } + } + } + + } + + + } +</style> \ No newline at end of file diff --git a/page_vip/vip_index.vue b/page_vip/vip_index.vue index cca9e8d..a56159f 100644 --- a/page_vip/vip_index.vue +++ b/page_vip/vip_index.vue @@ -26,7 +26,7 @@ <view class="txts" v-if="userinfo.vipType==1&&userinfo"> 月卡会员{{ daysUntilExpiration }}天后到期 </view> - <view class="topage"> + <view class="topage" @click="topage(1)"> 购买记录 > </view> </view> @@ -104,6 +104,11 @@ this.getCouponLists() }, methods: { + topage(){ + uni.navigateTo({ + url:'/page_vip/vip_his' + }) + }, calculateDaysUntilExpiration() { const currentDate = new Date(); const expirationDate = new Date(this.userinfo.expirationTime); diff --git a/pages.json b/pages.json index 33b680c..dc97f81 100644 --- a/pages.json +++ b/pages.json @@ -241,6 +241,24 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } + }, + { + "path" : "vip_his", + "style" : + { + "navigationBarTitleText": "上传", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path" : "card_his", + "style" : + { + "navigationBarTitleText": "上传", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } } diff --git a/pages/index/index.vue b/pages/index/index.vue index 38a9ef6..ff896a0 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4404,7 +4404,7 @@ }); }, fail(err) { - that.closePay() + // that.closePay() that.ispaid = false // 支付失败逻辑 uni.showToast({ diff --git a/pages/my.vue b/pages/my.vue index 76062f9..8b4f26e 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -1,12 +1,14 @@ <template> <view class="page"> <view class="fixed"> - <u-navbar title="个人中心" :border-bottom="false" :background="background" title-color='#fff' title-size='36' back-icon-color='#fff' - height='45'></u-navbar> + <u-navbar title="个人中心" :border-bottom="false" :background="background" title-color='#fff' title-size='36' + back-icon-color='#fff' height='45'></u-navbar> </view> - <image class="backimg" src="https://lxnapi.ccttiot.com/bike/img/static/uJVTiExwVDJJzYywmoLc" mode="" v-if="deptId==101"></image> - <image class="backimg" src="https://lxnapi.ccttiot.com/bike/img/static/uvRt04OhPwHf2MRkU6mk" mode="" v-if="deptId==100"></image> + <image class="backimg" src="https://lxnapi.ccttiot.com/bike/img/static/uJVTiExwVDJJzYywmoLc" mode="" + v-if="deptId==101"></image> + <image class="backimg" src="https://lxnapi.ccttiot.com/bike/img/static/uvRt04OhPwHf2MRkU6mk" mode="" + v-if="deptId==100"></image> <view class="statusBar" :style="{ paddingTop:statusBarHeight+'px' }"></view> <view class="statusBars" :style="{ height:navBarHeight+'px' }"></view> <view class="topbg"> @@ -31,14 +33,14 @@ </view> </view> </view> - + <view class="btnbg" v-if="false"> <view class="btnbox"> <view class="btncard"> - <view class="card_li" @click="topage(1)" v-if="areaInfo.deposit!=0"> + <view class="card_li" @click="topage(1)" v-if="areaInfo.deposit!=0"> <view class="card_left"> <image src="https://api.ccttiot.com/smartmeter/img/static/u3ILM6aE0MdFo3ZKiYPH" mode=""> - + </image> <view class="text"> 押金 @@ -54,7 +56,7 @@ <view class="card_li" @click="topage(2)"> <view class="card_left"> <image src="https://api.ccttiot.com/smartmeter/img/static/u4Y4UAai9GLSaCBMMIsv" mode=""> - + </image> <view class="text"> 我的订单 @@ -191,44 +193,60 @@ </view> <view class="tocont"> <view class="cont_li" @click="topage(1)" v-if="areaInfo.deposit!=0"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uYfTj4a3NkSNY0AqYHFc" mode="" v-if="deptId==100"></image> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uixPe8LlgKO7aUauIPVG" mode="" v-else style="width:59.46rpx;height: 49.87rpx;"></image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uYfTj4a3NkSNY0AqYHFc" mode="" v-if="deptId==100"> + </image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uixPe8LlgKO7aUauIPVG" mode="" v-else + style="width:59.46rpx;height: 49.87rpx;"></image> <view class="txt"> 押金 </view> </view> <view class="cont_li" @click="topage(11)"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/unrltNyYYRXUutaqtuJY" mode="" v-if="deptId==100"></image> - <image src="https://lxnapi.ccttiot.com/bike/img/static/ujxTS92ZiZolG2CimtTF" mode="" v-else style="width:69.05rpx;height: 44.12rpx;"></image> - + <image src="https://lxnapi.ccttiot.com/bike/img/static/unrltNyYYRXUutaqtuJY" mode="" v-if="deptId==100"> + </image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/ujxTS92ZiZolG2CimtTF" mode="" v-else + style="width:69.05rpx;height: 44.12rpx;"></image> + <view class="txt"> 实名认证 </view> </view> <view class="cont_li" @click="topage(4)"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/ucR0pDCg1vDshatphlUb" mode="" v-if="deptId==100"></image> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uRRKE06XlWBjxhjBuGbE" mode="" v-else style="width:47.95rpx;height: 49.87rpx;"></image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/ucR0pDCg1vDshatphlUb" mode="" v-if="deptId==100"> + </image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uRRKE06XlWBjxhjBuGbE" mode="" v-else + style="width:47.95rpx;height: 49.87rpx;"></image> <view class="txt"> 用车指南 </view> </view> <view class="cont_li" @click="topage(10)"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uLHRXFuIPhMy0EDgPdVr" mode="" v-if="deptId==100"></image> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uUsAb1dSN92FkJmlT40Q" mode="" v-else style="width: 30.69rpx;height: 44.12rpx;"></image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uLHRXFuIPhMy0EDgPdVr" mode="" v-if="deptId==100"> + </image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uUsAb1dSN92FkJmlT40Q" mode="" v-else + style="width: 30.69rpx;height: 44.12rpx;"></image> <view class="txt"> 客服服务 </view> </view> </view> - <view class="vip_box"> + <view class="vip_box" v-if="info.vipType==0&&false"> <view class="txt1">月卡会员</view> - <view class="txt2" v-if="CarkTypeList[0].retailPrice"> 仅需¥{{CarkTypeList[0].retailPrice }},可享30天免费骑行权益</view> + <view class="txt2" v-if="CarkTypeList[0].retailPrice"> 仅需¥{{CarkTypeList[0].retailPrice }},可享30天免费骑行权益 + </view> </view> - <view class="fee_box"> + <view class="vip_box1" v-if="info.vipType==1&&false"> + <view class="txt1">月卡会员</view> + <view class="txt2"> 月卡会员{{ daysUntilExpiration }}天后到期</view> + <view class="btn"> + 立即续费 + </view> + </view> + <view class="fee_box" v-if="false"> <view class="auto_box"> <view class="auto_li" v-for="(item,index) in CouponList" :key="index" @click="tobuy()"> <view class="txt1"> - {{item.name}} + {{item.name}} </view> <view class="txt1"> {{item.retailPrice}}元 @@ -244,36 +262,42 @@ </view> </view> <view class="type_cont"> - <view class="type_li" @click="topage(2)"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uG1iB3C69uNIr9Zx7qH6" mode="" v-if="deptId==100"></image> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uDMXuZiiktkF0EWBrZv3" mode="" v-else style="width: 49.87rpx;height: 44.12rpx;"></image> + <view class="type_li" @click="topage(2)"> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uG1iB3C69uNIr9Zx7qH6" mode="" v-if="deptId==100"> + </image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uDMXuZiiktkF0EWBrZv3" mode="" v-else + style="width: 49.87rpx;height: 44.12rpx;"></image> 我的订单 - <view class="iconfont icon-xiangyou1" ></view> + <view class="iconfont icon-xiangyou1"></view> </view> - <view class="type_li" style="margin-top: 70rpx;" @click="topage(3)"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uqsALXg6QXh9Yf6wIddS" mode="" v-if="deptId==100"></image> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uhy9Mp5SoiTQoogpCI3T" mode="" v-else style="width: 59.46rpx;height: 47.95rpx;"></image> + <view class="type_li" style="margin-top: 70rpx;" @click="topage(3)"> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uqsALXg6QXh9Yf6wIddS" mode="" v-if="deptId==100"> + </image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uhy9Mp5SoiTQoogpCI3T" mode="" v-else + style="width: 59.46rpx;height: 47.95rpx;"></image> 问题上报 - <view class="iconfont icon-xiangyou1" ></view> + <view class="iconfont icon-xiangyou1"></view> </view> <view class="type_li" style="margin-top: 70rpx;" @click="topage(10)"> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uuVBPGs95GoM8RZ1FfVx" mode="" v-if="deptId==100"></image> - <image src="https://lxnapi.ccttiot.com/bike/img/static/uN9B5Nu05ynxDQkaO9jE" mode="" v-else style="width: 53.71rpx;height: 47.95rpx;"></image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uuVBPGs95GoM8RZ1FfVx" mode="" v-if="deptId==100"> + </image> + <image src="https://lxnapi.ccttiot.com/bike/img/static/uN9B5Nu05ynxDQkaO9jE" mode="" v-else + style="width: 53.71rpx;height: 47.95rpx;"></image> 帮助中心 - <view class="iconfont icon-xiangyou1" ></view> + <view class="iconfont icon-xiangyou1"></view> </view> </view> <view class="type_cont" v-if="info.role==3||info.role==2||info.role==9"> - <view class="type_li" @click="topage(8)" v-if="info.role==3||info.role==2||info.role==9"> + <view class="type_li" @click="topage(8)" v-if="info.role==3||info.role==2||info.role==9"> <image src="https://lxnapi.ccttiot.com/bike/img/static/uyA3Cjjryy4Z9fCjs15Z" mode=""></image> 运维人员 - <view class="iconfont icon-xiangyou1" ></view> + <view class="iconfont icon-xiangyou1"></view> </view> - + <view class="type_li" style="margin-top: 70rpx;" @click="topage(9)" v-if="info.role==3||info.role==9"> <image src="https://lxnapi.ccttiot.com/bike/img/static/uC0nQVG6EK7OCYefw1Ws" mode=""></image> 管理人员 - <view class="iconfont icon-xiangyou1" ></view> + <view class="iconfont icon-xiangyou1"></view> </view> </view> <view class="btns" @click="layout"> @@ -293,8 +317,8 @@ background: { backgroundColor: 'transparent' }, - backcolor:{ - color:'#ffffff' + backcolor: { + color: '#ffffff' }, info: {}, totype: 0, @@ -303,9 +327,10 @@ deptId: 0, statusBarHeight: 0, navBarHeight: 0, - areaInfo:{}, - CouponList:[], - CarkTypeList:[] + areaInfo: {}, + CouponList: [], + CarkTypeList: [], + daysUntilExpiration: 0 // 剩余天数 @@ -344,18 +369,28 @@ } }, methods: { - tobuy(){ + calculateDaysUntilExpiration() { + const currentDate = new Date(); + const expirationDate = new Date(this.userinfo.expirationTime); + + // 计算时间差(毫秒) + const timeDifference = expirationDate - currentDate; + + // 将毫秒转换为天 + this.daysUntilExpiration = Math.ceil(timeDifference / (1000 * 60 * 60 * 24)); + }, + tobuy() { uni.navigateTo({ - url:'/page_vip/buyCard' + url: '/page_vip/buyCard' }) }, getarea() { let id = uni.getStorageSync('areaId'); this.$u.get("/app/area/" + id).then((res) => { - + if (res.code == 200) { this.areaInfo = res.data - + } else { // uni.showToast({ // title: res.msg, @@ -365,15 +400,15 @@ } }); }, - getCouponList(){ - let data={ - type:'3,4' + getCouponList() { + let data = { + type: '3,4' } - this.$u.get("/app/couponList",data ).then((res) => { - + this.$u.get("/app/couponList", data).then((res) => { + if (res.code == 200) { this.CouponList = res.data - + } else { // uni.showToast({ // title: res.msg, @@ -383,15 +418,15 @@ } }); }, - getCarkType(){ - let data={ - type:'1' + getCarkType() { + let data = { + type: '1' } - this.$u.get("/app/couponList",data ).then((res) => { - + this.$u.get("/app/couponList", data).then((res) => { + if (res.code == 200) { this.CarkTypeList = res.data - + } else { // uni.showToast({ // title: res.msg, @@ -401,31 +436,31 @@ } }); }, - layout(){ + layout() { this.$u.post('/logout').then((res) => { if (res.code == 200) { // 获取所有缓存键 - const keys = uni.getStorageInfoSync().keys; - - // 指定要保留的缓存键 - const preserveKey = 'deptId'; // 替换为你想要保留的缓存键 - - // 遍历所有缓存键并删除除指定键以外的所有键 - keys.forEach(key => { - if (key !== preserveKey) { - uni.removeStorageSync(key); - } - }); - - // 进行重定向 - uni.redirectTo({ - url: '/pages/index/index' - }); + const keys = uni.getStorageInfoSync().keys; + + // 指定要保留的缓存键 + const preserveKey = 'deptId'; // 替换为你想要保留的缓存键 + + // 遍历所有缓存键并删除除指定键以外的所有键 + keys.forEach(key => { + if (key !== preserveKey) { + uni.removeStorageSync(key); + } + }); + + // 进行重定向 + uni.redirectTo({ + url: '/pages/index/index' + }); } }).catch(error => { console.error("Error fetching area data:", error); }); - + }, topage(num) { if (num == 0) { @@ -484,18 +519,18 @@ url: '/page_user/khfw/khfw' }) } else if (num == 11) { - if(info.idCard==''){ + if (info.idCard == '') { uni.navigateTo({ url: '/page_user/idcard_test' }) - }else{ + } else { uni.showToast({ title: '实名授权已完成', icon: 'none', duration: 2000 }); } - + } }, @@ -541,6 +576,7 @@ this.getCarkType() this.$store.commit('SET_USERID', res.user.userId); this.info = res.user + // this.calculateDaysUntilExpiration() if (info.role != 1) { this.getareaList() } @@ -615,80 +651,142 @@ .page { width: 750rpx; + .fee_box { - margin-top: 18rpx; - position: relative; - margin-left: 38rpx; - width: 680rpx; - height: 288rpx; - background-image: url('https://lxnapi.ccttiot.com/bike/img/static/ugciMYClSGgJxP8HYoRU'); - background-size: cover; - background-position: center; - background-repeat: no-repeat; + margin-top: 18rpx; + position: relative; + margin-left: 38rpx; + width: 680rpx; + height: 288rpx; + background-image: url('https://lxnapi.ccttiot.com/bike/img/static/ugciMYClSGgJxP8HYoRU'); + background-size: cover; + background-position: center; + background-repeat: no-repeat; + .auto_box::-webkit-scrollbar { display: none; } - .auto_box { - padding-left: 24rpx; - display: flex; - overflow-x: auto; /* 允许横向滚动 */ - flex-wrap: nowrap; /* 禁止换行,保持所有元素在一行 */ - position: absolute; - top: 90rpx; - width: 100%; /* 根据需要调整宽度 */ - height: auto; /* 根据内容自动调整高度 */ - - .auto_li { - position: relative; - padding: 24rpx 28rpx; - margin-right: 22rpx; - width: 408rpx; - height: 176rpx; - flex-shrink: 0; /* 防止子元素被压缩 */ - background-image: url('https://lxnapi.ccttiot.com/bike/img/static/ui88NWy9R1j2zFGojdHU'); - background-size: cover; - background-position: center; - .txt1{ - width: 100%; - font-weight: 600; - font-size: 32rpx; - color: #495E74; - } - .txt2{ - font-weight: 400; - font-size: 24rpx; - color: #495E74; - } - .buy_btn{ - position: absolute; - right: 26rpx; - bottom: 38rpx; - display: flex; - align-items: center; - justify-content: center; - width: 132rpx; - height: 50rpx; - background: #495E74; - border-radius: 25rpx 25rpx 25rpx 25rpx; - font-weight: 500; - font-size: 28rpx; - color: #FFF3DB; - } - } - } + + .auto_box { + padding-left: 24rpx; + display: flex; + overflow-x: auto; + /* 允许横向滚动 */ + flex-wrap: nowrap; + /* 禁止换行,保持所有元素在一行 */ + position: absolute; + top: 90rpx; + width: 100%; + /* 根据需要调整宽度 */ + height: auto; + /* 根据内容自动调整高度 */ + + .auto_li { + position: relative; + padding: 24rpx 28rpx; + margin-right: 22rpx; + width: 408rpx; + height: 176rpx; + flex-shrink: 0; + /* 防止子元素被压缩 */ + background-image: url('https://lxnapi.ccttiot.com/bike/img/static/ui88NWy9R1j2zFGojdHU'); + background-size: cover; + background-position: center; + + .txt1 { + width: 100%; + font-weight: 600; + font-size: 32rpx; + color: #495E74; + } + + .txt2 { + font-weight: 400; + font-size: 24rpx; + color: #495E74; + } + + .buy_btn { + position: absolute; + right: 26rpx; + bottom: 38rpx; + display: flex; + align-items: center; + justify-content: center; + width: 132rpx; + height: 50rpx; + background: #495E74; + border-radius: 25rpx 25rpx 25rpx 25rpx; + font-weight: 500; + font-size: 28rpx; + color: #FFF3DB; + } + } + } } - .vip_box{ + + .vip_box1 { + position: relative; + margin-left: 38rpx; + width: 680rpx; + height: 158rpx; + background-image: url('https://lxnapi.ccttiot.com/bike/img/static/uiaiNkMy7221n3bk2ta0'); + background-size: cover; + /* 背景图片等比缩放以覆盖整个容器 */ + background-position: center; + /* 背景图片居中显示 */ + background-repeat: no-repeat; + + .txt1 { + top: 20rpx; + left: 17 + + 1rpx; + position: absolute; + font-weight: 500; + font-size: 39rpx; + color: #B07C1E; + } + + .txt2 { + position: absolute; + left: 171rpx; + bottom: 20rpx; + font-weight: 400; + font-size: 25rpx; + color: #B07C1E; + } + + .btn { + display: flex; + align-items: center; + justify-content: center; + position: absolute; + top: 18rpx; + right: 23rpx; + width: 150rpx; + height: 43rpx; + border-radius: 31rpx 31rpx 31rpx 31rpx; + border: 1rpx solid #B07C1E; + font-weight: 400; + font-size: 25rpx; + color: #B07C1E; + } + } + + .vip_box { position: relative; margin-left: 38rpx; width: 680rpx; height: 158rpx; background-image: url('https://lxnapi.ccttiot.com/bike/img/static/uw6bYgjn1bS1ayNm6VI9'); - background-size: cover; + background-size: cover; /* 背景图片等比缩放以覆盖整个容器 */ background-position: center; /* 背景图片居中显示 */ background-repeat: no-repeat; - .txt1{ + + .txt1 { top: 20rpx; left: 100rpx; position: absolute; @@ -696,7 +794,8 @@ font-size: 44rpx; color: #FFE09E; } - .txt2{ + + .txt2 { position: absolute; right: 74rpx; bottom: 10rpx; @@ -705,18 +804,20 @@ color: #FFE09E; } } - .btns{ + + .btns { display: flex; align-items: center; justify-content: center; width: 680rpx; height: 90rpx; - background: #64B6A7 ; + background: #64B6A7; color: #fff; font-size: 36rpx; border-radius: 20rpx; margin: 40rpx auto; } + .fixed { z-index: 999; position: fixed; @@ -734,7 +835,7 @@ width: 750rpx; // background: #fff; height: 184rpx; - + .topbox { width: 750rpx; // background: #fff; @@ -763,7 +864,7 @@ font-size: 32rpx; color: #FFFFFF; width: 100%; - text-shadow: 0px 8px 20px rgba(0,0,0,0.3); + text-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3); } .phone { @@ -772,22 +873,24 @@ font-weight: 400; font-size: 20rpx; color: #FFFFFF; - text-shadow: 0px 8px 20px rgba(0,0,0,0.3); + text-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3); } } } } } - .type_cont{ - + + .type_cont { + width: 680rpx; padding: 58rpx 54rpx; // height: 608rpx; background: #FFFFFF; border-radius: 20rpx 20rpx 20rpx 20rpx; - margin: 0 auto; + margin: 0 auto; margin-top: 30rpx; - .type_li{ + + .type_li { width: 100%; display: flex; align-items: center; @@ -795,42 +898,47 @@ font-weight: 400; font-size: 32rpx; color: #2F3240; - image{ + + image { width: 44rpx; height: 44rpx; margin-right: 20rpx; } - .icon-xiangyou1{ + + .icon-xiangyou1 { margin-left: auto; color: #2F3240; font-size: 36rpx; } - + } } - .tocont{ + + .tocont { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-around; - margin: 0 auto; + margin: 0 auto; margin-top: 100rpx; width: 680rpx; height: 176rpx; background: #fff; border-radius: 20rpx 20rpx 20rpx 20rpx; - .cont_li{ + + .cont_li { width: 112rpx; display: flex; flex-wrap: wrap; justify-content: center; - - image{ + + image { margin-top: 10rpx; width: 44rpx; height: 44rpx; } - .txt{ + + .txt { width: 112rpx; text-align: center; font-weight: 400; @@ -839,6 +947,7 @@ } } } + .btnbg { width: 750rpx; // background: #4C97E7; diff --git a/pages_admin/admin_worke.vue b/pages_admin/admin_worke.vue index 0456911..6779586 100644 --- a/pages_admin/admin_worke.vue +++ b/pages_admin/admin_worke.vue @@ -30,7 +30,7 @@ 财务报表 </view> </view> - <view class="cont" @click="topage(2)"> + <view class="cont" @click="topage(2)" v-if="userinfo.sysUserId==1"> <image src="https://lxnapi.ccttiot.com/bike/img/static/uNfRjhtxYmMPKaX4DqTS" mode=""></image> <view class="text"> 设备管理