Browse Source

线上版本

wenjie 20 hours ago
parent
commit
ebeebca3d5

+ 0 - 1
app.json

@@ -141,7 +141,6 @@
       "desc": "你的位置信息将用于小程序位置接口的效果展示"
     }
   },
-  "useSkyline": true,
   "sitemapLocation": "sitemap.json",
   "usingComponents": {
     "van-button": "@vant/weapp/button/index",

+ 3 - 0
components/tabbar/tabbar.js

@@ -1,5 +1,8 @@
 // components/tabbar/tabbar.js
 Component({
+  options: {
+    styleIsolation: 'apply-shared' // 页面样式影响组件,组件样式不影响页面
+  },
   properties:{
     active: { // 属性名
       type: Number,

+ 1 - 1
components/tabbar/tabbar.wxss

@@ -2,7 +2,7 @@
 .tabbar{
   display: flex;
   justify-content: space-between;
-  padding: 24rpx 74rpx;
+  padding: 34rpx 74rpx 0;
   width: 750rpx;
   height: 166rpx;
   background: #fff;

+ 7 - 3
pages/DetailsOfRefund/DetailsOfRefund.js

@@ -18,6 +18,9 @@ Page({
     refundAmount: '', //退款金额
     goodsTotal:0,
     records:[],//退款流程
+    offsetPoints:0,//退还积分
+    refundExpiredScore:0,//过期积分
+    freightAmount:0,
     refundStatusObj:{
       1:'申请原因',
       2:'商家待审核',
@@ -138,10 +141,11 @@ Page({
           orderItems: res.orderItems, //订单项 
           orderNumber: res.orderNumber, //订单项 
           refundSn: res.refundSn, //退款编号
-          refundAmount: res.refundAmount, //退款金额
-          goodsTotal:res.goodsTotal,
+          refundAmount: res.refundAmount, //实际退款金额
+          goodsTotal:res.goodsTotal,//总共退款价值
           records:res.records,//退款流程
-          offsetPoints:res.offsetPoints,
+          offsetPoints:res.offsetPoints,//退还积分
+          refundExpiredScore:res.refundExpiredScore,//过期积分
           freightAmount:res.freightAmount,
           refundDelivery: res.refundDelivery, //收货地址对象
           refundId: res.refundId, //记录ID

+ 1 - 1
pages/DetailsOfRefund/DetailsOfRefund.wxml

@@ -9,7 +9,7 @@
       <view class="title small">退款金额</view>
       <view class="price">¥{{goodsTotal}}</view>
     </view>
-      <view class="desc" wx:if="{{returnMoneySts == 70}}">推荐金额:20 退还积分:100(已过期20)</view>
+      <view class="desc" wx:if="{{returnMoneySts == 70}}">退还金额:{{refundAmount}}元 退还积分:{{offsetPoints}}(已过期{{refundExpiredScore}})</view>
       <view class="desc" wx:else>申请通过后,将退回至原账户</view>
     </view>
   </view>

+ 1 - 1
pages/applyRefund/applyRefund.js

@@ -349,7 +349,7 @@ Page({
         }
       })
       if(num == this.data.refundItem.totalNum){//全部商品退款 +运费
-        total+=this.data.refundItem.transfee
+        total= (total*100+ this.data.refundItem.transfee*100)/100
       }
 
       this.setData({

+ 2 - 2
pages/basket/basket.wxml

@@ -1,5 +1,5 @@
 <!--pages/basket/basket.wxml-->
-	<view class='container'>
+	<view class='container basket'>
 		<view class="prod-list">
 			<view wx:for="{{shopCartOrders}}" wx:for-item="shopCart" wx:for-index="topIndex" wx:key="index" class="shop-item">
 				<!-- 头部店铺 -->
@@ -155,7 +155,7 @@
 			<view class="empty-text">您还没有添加商品到购物车哦~</view>
 		</view>
 
-    <tabbar active="2"></tabbar>
+    <tabbar class="my-tabbar" active="2" style="box-shadow: none;"></tabbar>
 
 	</view>
 

+ 5 - 0
pages/basket/basket.wxss

@@ -5,6 +5,11 @@ page {
   background: #f4f4f4;
 }
 
+.my-tabbar .tabbar{
+  box-shadow: none!important;
+  border-radius: 0!important;
+}
+
 .container {
   padding-bottom: 120rpx;
   height: auto;

+ 3 - 3
pages/category/category.js

@@ -56,7 +56,7 @@ Page({
   },
   scrollTop(){
     console.log('top',);
-    if(this.data.subIndex==0||this.data.subCategoryList.length==0) return
+    if(this.data.subIndex==0||this.data.subCategoryList.length==0||this.data.productList.length == 0) return
     this.setData({
       type:'top'
     })
@@ -71,8 +71,8 @@ Page({
     // })
   },
   scrollBottom(){
-    console.log('bottom');
-    if(this.data.subIndex==(this.data.subCategoryList.length-1)||this.data.subCategoryList.length==0) return
+    // this.data.productList 新增判断  避免为空自动滚动
+    if(this.data.subIndex==(this.data.subCategoryList.length-1)||this.data.subCategoryList.length==0||this.data.productList.length == 0) return
     this.setData({
       type:'bottom'
     })

+ 7 - 2
pages/category/category.wxml

@@ -68,7 +68,8 @@
   <!-- 滚动内容区 -->
   <view class="main" wx:if="{{categoryList.length>0}}">
     <!-- 左侧菜单start -->
-    <scroll-view scroll-y="true" class='leftmenu'  scroll-into-view="{{'item'+subIndex}}">
+    <!-- <scroll-view scroll-y="true" class='leftmenu'  scroll-into-view="{{'item'+subIndex}}"> -->
+    <scroll-view scroll-y="true" class='leftmenu' >
       <view wx:for='{{subCategoryList}}' id="{{'item'+index}}" wx:key='categoryId'>
         <view class='menu-item {{subIndex==index?"active":""}} ' data-index="{{index}}" data-id="{{item.categoryId}}" bindtap='onleftMenuTab'>
         <image wx:if="{{index == 0}}" class="icon" src="../../images/icon/good-icon.png" mode=""/>
@@ -124,7 +125,11 @@
             </view>
           </view>
         </view>
-        <view id="empty" class="block" style="height: 90vh;"></view>
+        <view wx:if="{{subCategoryList.length!=0&&productList.length == 0}}">
+          <van-empty image="error" description="暂无商品" />
+        </view>
+        <view id="empty" class="block" style="height: 90vh;">
+        </view>
         <view class="sub-cate-title not-category-data" wx:if="{{subCategoryList.length==0}}">
           <view class="sub-cate-text">无二级分类</view>
         </view>

+ 2 - 0
pages/category/category.wxss

@@ -197,6 +197,8 @@ color: #222222;
   background-color: #f5f6f7;
   overflow: scroll;
   z-index: 2;
+  padding-bottom: 166rpx;
+
 }
 scroll-view ::-webkit-scrollbar {
   width: 0;

+ 3 - 3
pages/category1/category.js

@@ -56,7 +56,7 @@ Page({
   },
   scrollTop(){
     console.log('top',);
-    if(this.data.subIndex==0||this.data.subCategoryList.length==0) return
+    if(this.data.subIndex==0||this.data.subCategoryList.length==0||this.data.productList.length == 0) return
     this.setData({
       type:'top'
     })
@@ -71,8 +71,8 @@ Page({
     // })
   },
   scrollBottom(){
-    console.log('bottom');
-    if(this.data.subIndex==(this.data.subCategoryList.length-1)||this.data.subCategoryList.length==0) return
+    // this.data.productList 新增判断  避免为空自动滚动
+    if(this.data.subIndex==(this.data.subCategoryList.length-1)||this.data.subCategoryList.length==0||this.data.productList.length == 0) return
     this.setData({
       type:'bottom'
     })

+ 5 - 1
pages/category1/category.wxml

@@ -124,7 +124,11 @@
             </view>
           </view>
         </view>
-        <view id="empty" class="block" style="height: 90vh;"></view>
+        <view wx:if="{{subCategoryList.length!=0&&productList.length == 0}}">
+          <van-empty image="error" description="暂无商品" />
+        </view>
+        <view id="empty" class="block" style="height: 90vh;">
+        </view>
         <view class="sub-cate-title not-category-data" wx:if="{{subCategoryList.length==0}}">
           <view class="sub-cate-text">无二级分类</view>
         </view>

+ 2 - 0
pages/category1/category.wxss

@@ -197,6 +197,8 @@ color: #222222;
   background-color: #f5f6f7;
   overflow: scroll;
   z-index: 2;
+  padding-bottom: 166rpx;
+
 }
 scroll-view ::-webkit-scrollbar {
   width: 0;

+ 3 - 1
pages/index/index.wxss

@@ -38,7 +38,7 @@ color: transparent;
 
 .bg-box{
   position: absolute;
-  z-index: -1;
+  z-index: 1;
   top: 0;
   left: 0;
   width: 100%;
@@ -159,6 +159,8 @@ swiper.pic-swiper .banner {
   display: flex;
   padding-bottom: 20rpx;
   margin-top: 20rpx;
+  position: relative;
+  z-index: 99;
 }
 
 .top-search-input {

+ 3 - 2
pages/orderList/orderList.wxml

@@ -109,8 +109,9 @@
             <!-- <text class='big-num' wx:if="{{item.orderType==3}}">{{item.orderItemDtos[0].useScore}} <text class='small-num'>积分</text></text> -->
             <!-- 纯积分支付的普通订单(积分抵扣了所有金额) -->
             <!-- <text class='big-num' wx:if="{{item.orderType==0 && item.actualTotal==0}}"> -->
-            <text class='big-num' wx:if="{{item.orderType==3 && item.actualTotal==0}}">
-            {{item.offsetPoints}} <text class='small-num'>积分</text></text>
+            <text class='big-num' wx:if="{{item.orderType==3}}">
+              <text>{{item.offsetPoints}}</text>
+             <text class='small-num'>积分</text></text>
           </view>
         </view>
         <!-- end 商品列表 -->

+ 2 - 0
pages/orderList/orderList.wxss

@@ -315,6 +315,8 @@ padding: 0 24rpx;
 
 .prod-item .total-num .prodprice {
   color: #333;
+  display: flex;
+  align-items: center;
 }
 
 .prod-item .total-num .prodcount {