ソースを参照

新增 我的收益模块 所有订单页面 完善客服中心 修改商品详情跳转

zxl 1 年間 前
コミット
f3feceab8d

+ 18 - 6
src/pages.json

@@ -37,6 +37,24 @@
         "navigationBarTitleText": "我的",
         "navigationStyle": "custom"
       }
+    },
+    {
+      "path": "pages/tabbar/mine/allorder",
+      "style": {
+        "navigationBarTitleText": "我的订单"
+      }
+    },
+    {
+      "path": "pages/tabbar/mine/profit/index",
+      "style": {
+        "navigationBarTitleText": "我的收益"
+      }
+    },
+    {
+      "path": "pages/tabbar/mine/profit/widthdraw",
+      "style": {
+        "navigationBarTitleText": "余额提现"
+      }
     },
     {
       "path": "pages/login/register",
@@ -134,12 +152,6 @@
             "navigationBarTitleText": "我的团队"
           }
         },
-        {
-          "path": "privacypolicy/index",
-          "style": {
-            "navigationBarTitleText": "隐私条款"
-          }
-        },
         {
           "path": "servicecenter/index",
           "style": {

+ 24 - 8
src/pages/business/service/detail.vue

@@ -35,7 +35,7 @@
 						<view class="tip">有效期仅剩</view>
 						<view class="time">{{resetTime}}</view>
 					</view>
-					<view v-else class="coupon-right-get">可领取</view>
+					<view v-else class="coupon-right-get" @click="handlerGetCoupon(item,index)">可领取</view>
 				</view>
 			</view>
 		</view>
@@ -74,7 +74,7 @@
 					size="24" />
 				<text class="user-operate-text">{{item.name}}</text>
 			</view>
-			<view class="buyNow">立即购买</view>
+			<view class="buyNow" @click="handlerImmediateBy">立即购买</view>
 		</view>
 	</view>
 </template>
@@ -159,12 +159,26 @@
 				]
 			};
 		},
-		methods: {
+		methods: {
+      // 选择底部tab 店铺 收藏 咨询
 			collect(index) {
 				if (index === 2) {
 					this.hascollect = !this.hascollect
 				}
-			}
+			},
+      // 点击领取优惠卷
+      handlerGetCoupon(){
+        uni.showToast({
+          title:"没有",
+          icon:'none'
+        })
+      },
+      // 点击购买按钮
+      handlerImmediateBy(){
+        uni.navigateTo({
+          url:'/pages/order/order'
+        })
+      },
 		}
 	};
 </script>
@@ -321,8 +335,8 @@
 				background-color: #E8A87C;
 				height: 55rpx;
 				text-align: center;
-				line-height: 1.5;
-				margin-top: 15rpx;
+				line-height: 55rpx;
+				margin-top: 15rpx;
 			}
 		}
 	}
@@ -404,7 +418,9 @@
 		.u-icon {
 			justify-content: center !important;
 		}
-
+    .user-operate{
+      text-align: center;
+    }
 		.user-operate-text {
 			font-size: 24rpx;
 			font-weight: 600;
@@ -419,4 +435,4 @@
 			background-color: #f0d318;
 		}
 	}
-</style>
+</style>

+ 66 - 0
src/pages/tabbar/mine/allorder.vue

@@ -0,0 +1,66 @@
+<template>
+  <view class="container">
+    <view class="top-tab">
+      <u-tabs class="tab" :list="list" :current='current' @click="handlerChangeItem"
+      :activeStyle="{
+            color: '#007AFF',
+            fontWeight: 'bold',
+            transform: 'scale(1.05)'
+        }"
+        :inactiveStyle="{
+            color: '#000',
+            transform: 'scale(1)'
+        }"
+        itemStyle="height: 34px; width:19%;" lineColor="#007AFF"></u-tabs>
+    </view>
+    
+    <view class="item-box">
+      
+      <u-empty v-if="init_list.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" ></u-empty>
+      
+    </view>
+  </view>
+</template>
+
+<script>
+  export default{
+    data(){
+      return{
+        current:0,
+        list: [
+          {
+            id: 0,
+            name: '全部订单',
+          },
+          {
+            id: 1,
+            name: '待付款',
+          },
+          {
+            id: 2,
+            name: '待发货',
+          },
+          {
+            id: 3,
+            name: '退货/售后',
+          },
+        ],
+        init_list:[],// 订单列表
+      }
+    },
+    onLoad(option){
+      this.current = option.type
+    },
+    methods:{
+      // 选择导航栏
+      handlerChangeItem(e){
+        this.current = e.index
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .container{
+  }
+</style>

+ 30 - 19
src/pages/tabbar/mine/index.vue

@@ -39,9 +39,8 @@
       <view class="order-out-box">
         <view class="order-inner-box">
           <u-grid :border="false" col="4" style="background-color: #fff">
-            <u-grid-item v-for="(listItem, listIndex) in list2" :key="listIndex">
-              <u-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="listItem.name" :size="34"
-                @tap="gotoOrder(listItem)"></u-icon>
+            <u-grid-item v-for="(listItem, listIndex) in list2" :key="listIndex" @tap="gotoOrder(listItem)">
+              <u-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="listItem.name" :size="34"></u-icon>
               <text class="grid-text">{{ listItem.title }}</text>
             </u-grid-item>
           </u-grid>
@@ -51,7 +50,7 @@
 
     <!-- 我的收益 -->
     <view class="income-out-box">
-      <view class="income-inner-box">
+      <view class="income-inner-box" @click="handlerSkipMyProfit">
         <view class="income-head">
           <text class="my-income">我的收益</text>
           <u-icon name="arrow-right" />
@@ -75,10 +74,13 @@
     <view class="other-out-box">
       <view class="other-inner-box">
         <u-cell-group :border="false">
-          <u-cell size="large" :border="false" icon="setting-fill" title="我的团队" isLink url="" @tap="$Router.push('/pages/user/mygroup/index')"></u-cell>
-          <u-cell size="large" :border="false" icon="setting-fill" title="关于我们" isLink url="" @tap="$Router.push('/pages/user/aboutmy/index')"></u-cell>
+          <u-cell size="large" :border="false" icon="setting-fill" title="我的团队" isLink url=""
+            @tap="$Router.push('/pages/user/mygroup/index')"></u-cell>
+          <u-cell size="large" :border="false" icon="setting-fill" title="关于我们" isLink url=""
+            @tap="$Router.push('/pages/user/aboutmy/index')"></u-cell>
           <!-- <u-cell size="large" :border="false" icon="setting-fill" title="隐私条款" isLink url="" @tap="$Router.push('/pages/user/privacypolicy/index')"></u-cell> -->
-          <u-cell size="large" :border="false" icon="setting-fill" title="客服中心" isLink url="" @tap="$Router.push('/pages/user/servicecenter/index')"></u-cell>
+          <u-cell size="large" :border="false" icon="setting-fill" title="客服中心" isLink url=""
+            @tap="$Router.push('/pages/user/servicecenter/index')"></u-cell>
         </u-cell-group>
       </view>
     </view>
@@ -86,7 +88,9 @@
 </template>
 <script>
   // import { mapGetters } from 'vuex';
-  import { maintainUserInfo } from "@/api/mine.js"
+  import {
+    maintainUserInfo
+  } from "@/api/mine.js"
   export default {
     data() {
       return {
@@ -114,19 +118,22 @@
         list2: [{
             name: 'photo',
             title: '我的订单',
+            type: 0
           },
           {
             name: 'lock',
             title: '待付款',
-            order: true,
+            type: 1
           },
           {
             name: 'star',
             title: '已完成',
+            type: 2
           },
           {
             name: 'hourglass',
             title: '待评价',
+            type: 3
           },
         ],
         incomeList: [{
@@ -146,27 +153,31 @@
             title: '可提现',
           },
         ],
-        user_info:[] // 个人信息
+        user_info: [] // 个人信息
       };
     },
-    computed: {
-      // ...mapGetters(['user_info']),
-    },
+
     mounted() {
       this.handlerInitUserMessage()
     },
     methods: {
       // 获取当前用户信息
-      handlerInitUserMessage(){
-        maintainUserInfo().then(res=>{
+      handlerInitUserMessage() {
+        maintainUserInfo().then(res => {
           this.user_info = res.data
-          // this.$store.dispatch("SET_MERCGANT_ID",res.data.id)
         })
       },
+      // 点击跳转到全部订单
       gotoOrder(item) {
-        if (item.order) {
-          this.$Router.push('/pages/order/order');
-        }
+        uni.navigateTo({
+          url: `/pages/tabbar/mine/allorder?type=${item.type}`
+        })
+      },
+      // 点击跳转到我的收益
+      handlerSkipMyProfit() {
+        uni.navigateTo({
+          url: '/pages/tabbar/mine/profit/index'
+        })
       },
     },
   };

+ 179 - 0
src/pages/tabbar/mine/profit/index.vue

@@ -0,0 +1,179 @@
+<template>
+  <view class="container">
+    <view class="item-box">
+      <view class="item" v-for="item of price_list1">
+        <view class="item-text">{{ item.name }}</view>
+        <view class="item-price">{{ item.price }}</view>
+      </view>
+    </view>
+
+    <view class="item-box2">
+      <view class="item" v-for="item of price_list2">
+        <view class="item-text">{{ item.name }}</view>
+        <view class="item-price">{{ item.price }}</view>
+      </view>
+    </view>
+
+    <view class="item-box3">
+      <view class="item">
+        <view class="item-text">可提现金额</view>
+        <view class="item-price">150.00</view>
+      </view>
+      <view class="btn-box">
+        <button class="btn" @click="handlerWidthdrawFunds">提现</button>
+      </view>
+    </view>
+
+    <view class="footer-item">
+      <img class="img" src="@/static/logo.png" alt="">
+      <view class="item-box4">
+        <view class="item">
+          <view class="item-text">邀请好友</view>
+          <view class="item-price">推广码:123456</view>
+        </view>
+        <view class="btn-box">
+          <button class="btn">邀请</button>
+        </view>
+      </view>
+    </view>
+
+  </view>
+</template>
+
+<script>
+  export default{
+    data(){
+      return{
+        price_list1:[
+          {
+            name:'总收益(元)',
+            price:'258.00'
+          },
+          {
+            name:'已提现(元)',
+            price:'258.00'
+          },
+          {
+            name:'待总结(元)',
+            price:'258.00'
+          },
+        ],
+        price_list2:[
+          {
+            name:'已提现',
+            price:'150.00'
+          },
+          {
+            name:'待结算',
+            price:'108.00'
+          },
+          {
+            name:'已失效',
+            price:'10.00'
+          },
+        ]
+      }
+    },
+    methods:{
+      // 点击提现
+      handlerWidthdrawFunds(){
+        uni.navigateTo({
+          url:'/pages/tabbar/mine/profit/widthdraw'
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .container{
+    background-color: #EFEFEF;
+    min-height: calc(100vh - 10rpx);
+    .item-box,.item-box2{
+      width: 90%;
+      padding: 20rpx;
+      background-color: #347CAF;
+      border-radius: 20rpx;
+      margin: 10rpx auto 0;
+      display: flex;
+      justify-content: space-around;
+      .item{
+        color: #fff;
+        text-align: center;
+        .item-text{
+          font-size:28rpx;
+        }
+        .item-price{
+          font-size:36rpx;
+          font-weight: bold;
+          margin-top: 20rpx;
+        }
+      }
+    }
+    .item-box2{
+      margin-top: 20rpx;
+    }
+    .item-box3{
+      width: 90%;
+      padding: 20rpx;
+      background-color: #347CAF;
+      border-radius: 20rpx;
+      color: #fff;
+      margin: 20rpx auto;
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      .btn{
+        width: 260rpx;
+        height: 80rpx;
+        border-radius: 60rpx;
+      }
+      .item{
+        color: #fff;
+        text-align: center;
+        .item-text{
+          font-size:28rpx;
+        }
+        .item-price{
+          font-size:36rpx;
+          font-weight: bold;
+          margin-top: 20rpx;
+        }
+      }
+    }
+
+    .footer-item{
+      width: 95%;
+      background-color: #347CAF;
+      border-radius: 20rpx;
+      color: #fff;
+      margin: 20rpx auto;
+      .img{
+        width: 100%;
+      }
+    }
+    .item-box4{
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      padding: 20rpx;
+      .btn{
+        width: 260rpx;
+        height: 80rpx;
+        border-radius: 60rpx;
+      }
+      .item{
+        color: #fff;
+        text-align: center;
+        .item-text{
+          font-size:28rpx;
+        }
+        .item-price{
+          font-size:36rpx;
+          font-weight: bold;
+          margin-top: 20rpx;
+        }
+      }
+    }
+  }
+</style>

+ 114 - 0
src/pages/tabbar/mine/profit/widthdraw.vue

@@ -0,0 +1,114 @@
+<template>
+  <view class="container">
+    <view class="draw-box">
+      <span class="title">提现金额</span>
+      <view class="draw">
+        <span class="draw-span">¥</span>
+        <u--input type='number ' placeholder="请输入提现金额" border="bottom" clearable ></u--input>
+      </view>
+      <view class="draw-footer">
+        <view class="footer-l">可提现余额¥0.00</view>
+        <view class="footer-r" @click="handlerWidthDrawBtn">全部提现</view>
+      </view>
+    </view>
+
+    <view class="draw-box margin-box item-box2">
+        <view class="item-l">
+          <view class="l-title">预估收益</view>
+          <view class="l-text">2021年4月1日 - 2021年4月30日</view>
+        </view>
+        <view class="item-t">234.56</view>
+    </view>
+
+    <view class="draw-box margin-box item-box2">
+        <view class="item-l">
+          <view class="l-title">已提现收益</view>
+          <view class="l-text">2021年1月1日 - 2021年3月30日</view>
+        </view>
+        <view class="item-t">500.56</view>
+    </view>
+  </view>
+</template>
+
+<script>
+  export default{
+    data(){
+      return{
+
+      }
+    },
+    methods:{
+      // 点击提现
+      handlerWidthDrawBtn(){
+        uni.showToast({
+          title:'没钱',
+          icon:'none'
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .container{
+    background-color: #EFEFEF;
+    padding: 20rpx;
+    min-height: calc(100vh - 40rpx);
+    .draw-box{
+      padding: 20rpx;
+      background-color: #Fff;
+      border-radius: 20rpx;
+      .title{
+        font-size:36rpx;
+        font-weight: bold;
+      }
+      .draw{
+        display: flex;
+        align-items: center;
+        margin: 40rpx 0 20rpx;
+        .draw-span{
+          font-size:36rpx;
+          font-weight: bold;
+        }
+      }
+      .draw-footer{
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        .footer-l{
+          font-size:40rpx;
+          color: #9CA3AF;
+        }
+        .footer-r{
+          color: #000;
+          font-size:28rpx;
+        }
+      }
+    }
+
+    .margin-box{
+      margin: 20rpx 0;
+    }
+
+    .item-box2{
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      .item-l{
+        font-size:28rpx;
+        .l-title{
+          color: #000;
+        }
+        .l-text{
+          color: #9CA3AF;
+          margin-top: 20rpx;
+        }
+      }
+      .item-t{
+        font-size:28rpx;
+        font-weight: bold;
+        color: #9CA3AF;
+      }
+    }
+  }
+</style>

+ 2 - 0
src/pages/user/aboutmy/index.vue

@@ -61,6 +61,8 @@
   }
   .container{
     padding: 40rpx;
+    background-color: #F3F4F6;
+    min-height: calc(100vh - 80rpx);
     .title{
       font-size: 42rpx;
       font-weight: bold;

+ 10 - 4
src/pages/user/appoint/index.vue

@@ -14,10 +14,8 @@
           </view>
         </view>
         <view class="appoint-goto">
-          <!-- <view class="detail" @tap="$Router.push('/pages/user/appointDetail/index')">详情</view> -->
-          <!-- <view class="cancel" @click="show = true">取消</view> -->
           <u-button class="detail" text="详情" @tap="$Router.push('/pages/business/service/detail')"></u-button>
-          <u-button class="cancel" text="取消"></u-button>
+          <u-button class="cancel" text="取消" @click="handlerClearItem(item,index)"></u-button>
         </view>
       </view>
     </view>
@@ -36,7 +34,7 @@
         queryParams:{
           size:10
         },
-        
+
         init_list:[]//初始化列表
       };
     },
@@ -44,11 +42,19 @@
       this.handlerInitList()
     },
     methods: {
+      // 初始化列表
       handlerInitList(){
         maintainReservations(this.queryParams).then(res=>{
           console.log('res',res);
         })
       },
+      // 点击取消商品
+      handlerClearItem(){
+        uni.showToast({
+          title:'么有',
+          icon:'none'
+        })
+      },
       confirm() {
         console.log(1111111111);
         this.show = false;

+ 2 - 8
src/pages/user/coupon/index.vue

@@ -65,11 +65,6 @@
     data() {
       return {
         list: [
-          // {
-          //   id: 0,
-          //   name: '通用',
-          //   type:''
-          // },
           {
             id: 1,
             name: '满减',
@@ -108,7 +103,6 @@
     },
     mounted() {
       this.handlerInitCouponList()
-      // console.log('merchantId',this.$store.state.merchantId);
     },
     methods: {
       // 初始化优惠卷列表
@@ -120,13 +114,13 @@
       },
       // 选择顶部导航栏
       handlerChangeTab1(e){
-        this.queryParams.couponType = e.type
+        this.queryParams.type = e.type
         this.handlerInitCouponList()
       },
       // 点击选择下层tab栏 选择是否可用
       handlerSelectTab(e){
         this.lable_type = e.index
-        this.queryParams.couponStatus = e.type
+        this.queryParams.status = e.type
         this.handlerInitCouponList()
       }
     },

+ 0 - 63
src/pages/user/privacypolicy/index.vue

@@ -1,63 +0,0 @@
-<template>
-  <view class="container">
-   <!-- <view class="title">
-      概述
-    </view>
-    <view class="text">
-      我们将非常重视您的个人信息保护。在您使用我们的服务前,请您仔细阅读并了解<隐私条款>。我们将严格按照本隐私条款使用和保护您的个人信息
-    </view>
-
-    <view class="title">
-      信息收集
-    </view>
-    <view class="text">
-      我们将非常重视您的个人信息保护。在您使用我们的服务前,请您仔细阅读并了解<隐私条款>。我们将严格按照本隐私条款使用和保护您的个人信息
-    </view>
-
-    <view class="title">
-      信息使用
-    </view>
-    <view class="text">
-      我们将非常重视您的个人信息保护。在您使用我们的服务前,请您仔细阅读并了解<隐私条款>。我们将严格按照本隐私条款使用和保护您的个人信息
-    </view>
-    
-    <view class="title">
-      信息保护
-    </view>
-    <view class="text">
-      我们将非常重视您的个人信息保护。在您使用我们的服务前,请您仔细阅读并了解<隐私条款>。我们将严格按照本隐私条款使用和保护您的个人信息
-    </view>
-    
-    <view class="title">
-      信息披露
-    </view>
-    <view class="text">
-      我们将非常重视您的个人信息保护。在您使用我们的服务前,请您仔细阅读并了解<隐私条款>。我们将严格按照本隐私条款使用和保护您的个人信息
-    </view> -->
-  </view>
-</template>
-
-<script>
-  export default{
-    data(){
-      return{
-
-      }
-    }
-  }
-</script>
-
-<style scoped lang="scss">
-  .container{
-    padding: 40rpx;
-    .title{
-      font-size: 28rpx;
-      color: #000;
-      font-weight: bold;
-    }
-    .text{
-      margin:20rpx 0 40rpx;
-      color: #6B7280;
-    }
-  }
-</style>

+ 122 - 8
src/pages/user/servicecenter/index.vue

@@ -29,19 +29,36 @@
       </view>
     </view>
 
-    <!-- <view class="title">
+    <view class="title">
       在线客服
     </view>
-    <view class="item-box hote-box">
-      <view class="item" v-for="item of 4">
+    <view class=" cust-box">
+      <view class="item" v-for="item of 3">
         <view class="item-l">
-          <img class="img" src="@/static/logo.png" alt="">
+          <img class="cust-img" src="@/static/logo.png" alt="">
         </view>
         <view class="item-r">
-          如何注销账户?
+          <view class="r-title">客服小姐姐</view>
+          <view class="r-text">在线</view>
+        </view>
+      </view>
+    </view>
+    <u-button class="contact-btn" @click="handlerCallService">联系客服</u-button>
+
+
+    <view class="footer-item">
+      <view class="item" v-for="item of footerList">
+        <view class="item-l">
+          {{ item.name }}
+        </view>
+        <view class="item-r">
+            <img class="cust-img" :src="item.imgs" alt="">
+            <span class="r-span">{{ item.text }}</span>
         </view>
       </view>
-    </view> -->
+    </view>
+    <button class="feedback-btn" @click="handlerSubmitFeedback">提交反馈</button>
+
   </view>
 </template>
 
@@ -49,8 +66,40 @@
   export default{
     data(){
       return{
-
+        footerList:[
+          {
+            name:'反馈建议',
+            imgs:'../../../static/logo.png',
+            text:'客服热线:888-8888-8888'
+          },
+          {
+            name:'反馈内容',
+            imgs:'../../../static/logo.png',
+            text:'客服邮箱:kefu@xxx.com'
+          },
+          {
+            name:'联系方式',
+            imgs:'../../../static/logo.png',
+            text:'客服时间:周一至周五9:00-20:00'
+          }
+        ]
       }
+    },
+    methods:{
+      // 点击联系客服
+      handlerCallService(){
+        uni.showToast({
+          title:'嘟...',
+          icon:'none'
+        })
+      },
+      // 点击提交反馈
+      handlerSubmitFeedback(){
+        uni.showToast({
+          title:'不给提',
+          icon:'none'
+        })
+      },
     }
   }
 </script>
@@ -62,7 +111,7 @@
       font-size: 32rpx;
       font-weight: bold;
       color: #000;
-      margin-top: 40rpx;
+      margin-top: 20rpx;
     }
     .item-box{
       display: flex;
@@ -111,5 +160,70 @@
         }
       }
     }
+
+    .cust-box{
+      .item{
+        display: flex;
+        align-items: center;
+        margin: 20rpx 10rpx;
+        .item-l{
+          .cust-img{
+            width: 80rpx;
+            height: 80rpx;
+            border-radius: 80rpx;
+          }
+        }
+        .item-r{
+          margin-left: 20rpx;
+          .r-title{
+            font-size:28rpx;
+            font-weight: bold;
+            color: #000;
+          }
+          .r-text{
+            font-size: 28rpx;
+            color: #8A909A;
+          }
+        }
+      }
+    }
+    .footer-item{
+      margin: 40rpx 0;
+      .item{
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin: 20rpx 0;
+        .item-l{
+          font-size: 32rpx;
+          font-weight: bold;
+          color: #000;
+        }
+        .item-r{
+          display: flex;
+          align-items: center;
+          .cust-img{
+            width: 30rpx;
+            height: 30rpx;
+          }
+          .r-span{
+            color: #2D3643;
+            font-size: 28rpx;
+            margin-left: 20rpx;
+          }
+        }
+      }
+    }
+
+
+    .contact-btn{
+      font-size: 28rpx;
+    }
+    .feedback-btn{
+      background-color: #5992BB;
+      color: #fff;
+      font-size: 28rpx;
+      margin-top: 20rpx;
+    }
   }
 </style>