Selaa lähdekoodia

延迟加载用户数据

zhanghui 2 vuotta sitten
vanhempi
sitoutus
45287c0691

+ 1 - 5
myPages/ServiceObjectManagement/index.vue

@@ -64,11 +64,7 @@
           console.log(res)
           this.serviceObjectList = res.data.data
            this.getImgUrlByBannerOssId(this.serviceObjectList);
-        }).catch(() =>{
-          uni.showToast({
-            title: "操作失败"
-          })
-        });
+        })
       },
       // 获取图片
       getImgUrlByBannerOssId(items){

+ 3 - 2
orderPages/serviceItems/index.rpx.scss

@@ -269,6 +269,7 @@
   display: flex;
   justify-content: space-between;
   height: 84rpx;
+  margin-top: 20rpx;
 }
 
 .text_15 {
@@ -339,7 +340,7 @@
 }
 
 .tabBarLineHeight {
-  height: 250rpx;
+  height: 300rpx;
 }
 
 
@@ -359,8 +360,8 @@
   position: fixed;
   bottom: 0;
   width: 750rpx;
-  height: 224rpx;
   background: #FFFFFF;
+  padding-bottom: 32rpx;
 }
 .outView{
   width: 600rpx;

+ 27 - 0
orderPages/serviceItems/index.vue

@@ -40,6 +40,27 @@
             <view class="tabBarLineHeight"></view>
 
             <view class="bottomView ">
+
+                <view class="flex-row justify-center" @click="goUseRights">
+                    <view class="block_3 ">
+                        <text lines="1" class="text_15">权益卡</text>
+                        <view>
+                            <view class="flex-row justify-between" v-if="coupons.length>0">
+                                <view class="flex-row">
+                                    <text class="text-group_5" v-for="(iter,i) in coupons" :key="i">{{iter.name}}:-¥{{iter.discountsPrice}}</text>
+                                </view>
+                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>
+                            </view>
+                            <view v-else class="image-text_4 ">
+                                <text  class="text-group_4">未选择</text>
+                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>
+                            </view>
+                        </view>
+
+                    </view>
+                </view>
+
+
                 <view class="flex-row justify-center" @click="goUseCoupons">
                     <view class="block_3 ">
                         <text lines="1" class="text_15">优惠券</text>
@@ -96,6 +117,12 @@ export default {
 
     methods: {
 
+        goUseRights(){
+            uni.navigateTo({
+                url:'/storePages/useRights/index'
+            })
+        },
+
         getUseCoupons(e){
             console.log('++++++++getUseCoupons+++++++++++++++',e)
             this.coupons= e

+ 7 - 0
pages.json

@@ -347,6 +347,13 @@
 		{
 			"root": "storePages",
 			"pages": [
+				{
+					"path": "useRights/index",
+					"style": {
+						"navigationBarTitleText": "使用权益卡",
+						"enablePullDownRefresh": false
+					}
+				},
 				{
 					"path": "myRights/index",
 					"style": {

+ 8 - 4
pages/index/index.vue

@@ -281,10 +281,14 @@ export default {
     this.getSlideshowList();
 
     // 用户信息
-    this.userInfo = uni.getStorageSync('userInfo');
-    if (this.userInfo.selfPhoto) {
-      this.getImgUrlByOssId(this.userInfo.selfPhoto);
-    }
+
+    setTimeout(()=>{
+      this.userInfo = uni.getStorageSync('userInfo');
+      if (this.userInfo.selfPhoto) {
+        this.getImgUrlByOssId(this.userInfo.selfPhoto);
+      }
+    },2000)
+
   },
   // 分享到朋友圈
   onShareTimeline() {

+ 180 - 0
storePages/useRights/index.rpx.scss

@@ -0,0 +1,180 @@
+
+.page{
+  background: #F7F7F7;
+  padding: 0 32rpx;
+  border-top: 1px solid #F7F7F7 ;
+}
+.btn{
+  height: 84rpx;
+  background: #FFE05C;
+  border-radius: 54rpx;
+  margin: 32rpx 0;
+
+  font-size: 28rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #333333;
+  line-height: 84rpx;
+  text-align: center;
+}
+.noUse{
+  margin: 32rpx 0;
+  font-size: 28rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #333333;
+  line-height: 40rpx;
+}
+
+
+.row-list{
+  width: 686rpx;
+  height: 188rpx;
+  margin-top: 24rpx;
+  background-image: url('/static/coupon/u210.png');
+  background-repeat: no-repeat;
+  background-size: cover;
+}
+
+
+.h-text{
+  width: 200rpx;
+  height: 188rpx;
+}
+.h-center-content{
+  width: 298rpx;
+  height: 188rpx;
+}
+.h-right-content{
+  width: 188rpx;
+  height: 188rpx;
+}
+.money{
+  height: 52rpx;
+  font-size: 36rpx;
+  font-family: DINAlternate-Bold, DINAlternate;
+  font-weight: bold;
+  color: #333333;
+  line-height: 52rpx;
+  text-align: center;
+}
+.desc{
+  height: 36rpx;
+  font-size: 20rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #333333;
+  line-height: 36rpx;
+  text-align: center;
+}
+.h-value{
+  font-size: 28rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: bold;
+  color: #333333;
+  line-height: 44rpx;
+  margin-top: 24rpx;
+  margin-left: 24rpx;
+}
+.title{
+  font-size: 20rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #999999;
+  line-height: 36rpx;
+  margin-left: 24rpx;
+}
+.h-btn-value-use{
+  width: 156rpx;
+  height: 64rpx;
+  background: #93D21A;
+  border-radius: 32rpx;
+
+  font-size: 24rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #FFFFFF;
+  line-height: 64rpx;
+  text-align: center;
+}
+.h-btn-img{
+  width: 136rpx;
+  height: 136rpx;
+}
+.row-list:first-child{
+  margin-top: 0;
+}
+.btn{
+  width: 156rpx;
+  height: 64rpx;
+  background: #93D21A;
+  border-radius: 32rpx;
+
+  font-size: 24rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #FFFFFF;
+  line-height: 64rpx;
+  text-align: center;
+}
+
+
+
+.payView{
+  height: 638rpx;
+  background: #FFFFFF;
+  box-shadow: 0rpx -4rpx 8rpx 0rpx rgba(0,0,0,0.03);
+  border-radius: 24rpx 24rpx 0rpx 0rpx;
+  padding: 24rpx 32rpx;
+  z-index: 100;
+}
+.payType{
+  font-size: 32rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: bord;
+  color: #111111;
+  line-height: 48rpx;
+}
+.x{
+  width: 35rpx;
+  height: 35rpx;
+  border-radius: 18rpx;
+}
+.payTitle{
+  font-size: 24rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #666666;
+  line-height: 40rpx;
+  margin-top: 8rpx;
+}
+.payItem{
+  background: #FAFAFA;
+  border-radius: 20rpx;
+  padding: 34rpx 32rpx;
+  margin-top: 32rpx;
+}
+.payName{
+  margin-left: 24rpx;
+}
+.balance{
+  font-size: 24rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #999999;
+  line-height: 40rpx;
+}
+.commitBtn{
+  width: 686rpx;
+  height: 108rpx;
+  background: #FFE05C;
+  border-radius: 60rpx;
+  margin-top: 32rpx;
+
+  font-size: 32rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: bold;
+  color: #111111;
+  line-height: 108rpx;
+  text-align: center;
+}

+ 77 - 0
storePages/useRights/index.vue

@@ -0,0 +1,77 @@
+<template>
+	<view class="page" :style="{'height':windowHeight}">
+
+		<scroll-view scroll-y :style="{'height':windowHeight}">
+			<view  class="row-list flex-row justify-start" v-for="(item,index) in equityList" :key="index">
+				<view class="h-text flex-col justify-center ">
+					<view class="money">
+						<text>¥{{item.faceValue}}</text>
+					</view>
+					<!--				<view class="desc">-->
+					<!--					<text>{{item.title}}</text>-->
+					<!--				</view>-->
+				</view>
+
+				<view class="h-center-content flex-col justify-around">
+					<view class="h-value">
+						<text>{{item.description}}</text>
+					</view>
+					<view class="title">
+						使用项目:{{item.serviceProjectName || ''}}
+					</view>
+					<view class="title">
+						绑定对象:{{item.serviceObjectName}}
+					</view>
+					<view class="title">
+						结束期限:{{item.effectiveEndTime.substring(0,10)}}
+					</view>
+
+				</view>
+
+<!--				<view class="h-right-content flex-col justify-center ">-->
+<!--					<view class="btn" @click="payRights(item)">-->
+<!--						<text>购买</text>-->
+<!--					</view>-->
+<!--				</view>-->
+
+			</view>
+		</scroll-view>
+
+
+	</view>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				windowHeight:'',
+				userInfo:{},
+				equityList:[],
+			};
+		},
+		onLoad(option) {
+			let sysInfo = uni.getSystemInfoSync()
+			this.windowHeight =sysInfo.windowHeight - 44 +'px'//除标题栏栏外的屏幕可用高度
+			this.userInfo = uni.getStorageSync('userInfo')
+
+			this.myEquityCardList()
+		},
+
+		methods: {
+
+			myEquityCardList(){
+				this.$api.myEquityCardList().then(res=>{
+					console.log(res)
+					this.equityList = res.data.data
+				})
+			},
+
+		},
+	};
+</script>
+<style lang="scss" scoped>
+
+	@import '/common/css/common.css';
+	@import './index.rpx.scss';
+
+</style>