谢杰标 2 年 前
コミット
027111d534
3 ファイル変更229 行追加1 行削除
  1. 7 0
      pages.json
  2. 215 0
      pages/comdetail/index.vue
  3. 7 1
      pages/commission/index.vue

+ 7 - 0
pages.json

@@ -56,6 +56,13 @@
         "enablePullDownRefresh": false
       }
     },
+    {
+      "path": "pages/comdetail/index",
+      "style": {
+        "navigationBarTitleText": "详情",
+        "enablePullDownRefresh": false
+      }
+    },
     {
       "path": "pages/cashout/index",
       "style": {

+ 215 - 0
pages/comdetail/index.vue

@@ -0,0 +1,215 @@
+<template>
+  <view class="actdetail-ward">
+    <view class="actdetail-ward-tbg">
+      <view class="actdetail-ward-top">
+        <!-- <view class="info fl_b">
+          <view class="title">{{ detailInfo.name }}</view>
+          <view class="act-status" v-if="detailInfo.status == 1">进行中</view>
+          <view class="act-status grey" v-else>已结束</view>
+        </view>
+        <view class="time"
+          >{{ detailInfo.startTime | formate("yyyy-mm-dd hh:mm") }} 到
+          {{ detailInfo.endTime | formate("yyyy-mm-dd hh:mm") }}</view
+        > -->
+        <text class="money">1200.00</text>
+        <text class="op8">佣金金额</text>
+        <!-- <text style="padding: 0 20rpx">|</text> -->
+        <text class="op8">冻结</text>
+      </view>
+    </view>
+    <view class="actdetail-ward-main">
+      <view class="actdetail-ward-goods detail-box">
+        <view class="title">商品及佣金</view>
+        <view class="goods-list">
+          <view
+            class="goods-list-item"
+            v-for="item in detailInfo.goodsList"
+            :key="item.id"
+          >
+            <view class="fl lebel">
+              <view>商品名称:</view>
+              <view>{{ item.goodsName }}</view>
+            </view>
+            <view class="fl lebel">
+              <view>商品价格:</view>
+              <view>{{ item.goodsPrice }}元</view>
+            </view>
+            <view class="fl lebel">
+              <view>分佣方式:</view>
+              <view>{{ ["百分比", "固定金额"][item.profitType - 1] }}</view>
+            </view>
+            <view class="fl lebel">
+              <view>数值:</view>
+              <view
+                >{{ item.profitMax }}{{ item.profitType == 1 ? "%" : "" }}</view
+              >
+            </view>
+            <view class="fl lebel">
+              <view>一级佣金:</view>
+              <view>{{ item.profitOne }}</view>
+            </view>
+            <view class="fl lebel">
+              <view>二级佣金:</view>
+              <view>{{ item.profitTwo }}</view>
+            </view>
+            <view class="fl lebel">
+              <view>三级级佣金:</view>
+              <view>{{ item.profitThree }}</view>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="actdetail-ward-bom detail-box">
+        <view class="title">活动详情</view>
+        <view class="fl_b time u-border-bottom">
+          <text>佣金冻结期</text>
+          <text>{{ detailInfo.freezingPeriod }}天</text>
+        </view>
+        <view class="desc">
+          <view class="desc-title">描述</view>
+          <text>{{ detailInfo.remark }}</text>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import { getActDetail, getLinkCode } from "@/utils/act";
+export default {
+  name: "SaasManagerIndex",
+
+  data() {
+    return {
+      detailInfo: {},
+    };
+  },
+  onLoad(options) {
+    this.getActDetail(options.id);
+  },
+  methods: {
+    getActDetail(id) {
+      getActDetail(id).then((res) => {
+        this.detailInfo = res;
+      });
+    },
+    getLinkCode() {
+      let { distributionId } = this.detailInfo;
+      getLinkCode({ distributionId }).then(({ linkCode, shareCode }) => {
+        uni.navigateTo({
+          url:
+            "/pages/bill/index?distributionId=" +
+            distributionId +
+            "&linkCode=" +
+            linkCode +
+            "&shareCode=" +
+            shareCode,
+        });
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+page {
+  background-color: #f6f7fb;
+}
+.actdetail-ward {
+  .actdetail-ward-tbg {
+    width: 100%;
+    height: 429rpx;
+    top: 80rpx;
+    background: linear-gradient(180deg, #3f8dfd 49%, rgba(0, 105, 255, 0) 100%);
+    padding: 44rpx 24rpx 0;
+    box-sizing: border-box;
+
+    .actdetail-ward-top {
+      color: #ffffff;
+      font-size: 28rpx;
+      .money {
+        font-size: 72rpx;
+        margin-right: 16rpx;
+      }
+      text {
+      }
+      .op8 {
+        line-height: 16rpx;
+        border-right: 2rpx solid #ccc;
+        opacity: 0.8;
+      }
+    }
+  }
+  .actdetail-ward-main {
+    padding: 24rpx;
+    position: absolute;
+    top: 180rpx;
+    width: 100%;
+    box-sizing: border-box;
+    .actdetail-ward-goods {
+      margin-bottom: 24rpx;
+      .goods-list {
+        .goods-list-item {
+          background: #fafafa;
+          border-radius: 8rpx;
+          padding: 32rpx 32rpx 0;
+          color: #7e7d83;
+          font-size: 26rpx;
+          margin-bottom: 24rpx;
+          .lebel {
+            align-items: flex-start;
+            view {
+              margin-bottom: 20rpx;
+              &:nth-of-type(1) {
+                width: 170rpx;
+              }
+              &:nth-of-type(2) {
+                flex: 1;
+                line-height: 40rpx;
+              }
+            }
+          }
+        }
+      }
+    }
+    .actdetail-ward-bom {
+      .time {
+        color: #484848;
+        font-size: 32rpx;
+        padding-bottom: 32rpx;
+      }
+    }
+    .detail-box {
+      background: #ffffff;
+      border-radius: 16rpx;
+      padding: 32rpx 24rpx 1rpx;
+      .title {
+        font-weight: bold;
+        color: #24263d;
+        font-size: 32rpx;
+        margin-bottom: 32rpx;
+      }
+      .desc {
+        padding-bottom: 40rpx;
+        .desc-title {
+          padding: 32rpx 0 24rpx;
+        }
+        text {
+          color: #484848;
+          font-size: 28rpx;
+          opacity: 0.7;
+        }
+      }
+    }
+  }
+  .actdetail-btn {
+    width: 100%;
+    background: #ffffff;
+    height: 144rpx;
+    padding: 24rpx;
+    position: fixed;
+    bottom: 0;
+    box-sizing: border-box;
+  }
+}
+</style>

+ 7 - 1
pages/commission/index.vue

@@ -4,7 +4,8 @@
       <view
         class="com-ward-list-item u-border-bottom"
         v-for="item in list"
-        :key="item.id"
+        :key="item.orderSn"
+        @click="toDetail(item)"
       >
         <view class="fl_b com-ward-list-item-top">
           <image src="../../static/image/icon_com.png" mode="" />
@@ -47,6 +48,11 @@ export default {
     this.getCashList();
   },
   methods: {
+    toDetail(data) {
+      uni.navigateTo({
+        url: "/pages/comdetail/index?id=" + 28,
+      });
+    },
     reset() {
       this.list = [];
       this.param = {