natasha 1 år sedan
förälder
incheckning
ffe313b823

BIN
src/assets/cover-order-huakan.png


+ 167 - 109
src/components/common/BookCard.vue

@@ -1,33 +1,61 @@
 <template>
-    <div>
-        <el-skeleton style="width: 240px" :loading="true" animated v-if="item.skeleton">
-            <template slot="template">
-                <el-skeleton-item
-                    variant="image"
-                    style="width: 200px; height: 280px;"
-                />
-                <div style="padding: 12px;width: 200px;">
-                    <el-skeleton-item variant="h3" style="width: 100%; height: 22px" />
-                    <el-skeleton-item variant="text" style="margin: 4px 0 12px 0; height: 16px; width:50%;" />
-                    <el-skeleton-item variant="text" style="height: 21px; width:70%;" v-if="!type||type!='bookShelf'" />
-                </div>
-            </template>
-        </el-skeleton>
-        <div class="BookCard" @click="handleLink" v-else>
-            <!-- <div
+  <div>
+    <el-skeleton
+      style="width: 240px"
+      :loading="true"
+      animated
+      v-if="item.skeleton"
+    >
+      <template slot="template">
+        <el-skeleton-item variant="image" style="width: 200px; height: 280px" />
+        <div style="padding: 12px; width: 200px">
+          <el-skeleton-item variant="h3" style="width: 100%; height: 22px" />
+          <el-skeleton-item
+            variant="text"
+            style="margin: 4px 0 12px 0; height: 16px; width: 50%"
+          />
+          <el-skeleton-item
+            variant="text"
+            style="height: 21px; width: 70%"
+            v-if="!type || type != 'bookShelf'"
+          />
+        </div>
+      </template>
+    </el-skeleton>
+    <div class="BookCard" @click="handleLink" v-else>
+      <!-- <div
             class="image"
             :style="{height:height?height:'280px'}"
             ></div> -->
-            <span class="isNew" v-if="item.is_new&&item.is_new==='true'">NEW</span>
-            <span class="isReservation" v-if="item.is_reservation&&item.is_reservation==='true'">订阅</span>
-            <el-image
-                class="image"
-                :src="item.cover_image_url?item.cover_image_url:item.course_type==='baozhi'||goodsTypeList[item.type]&&goodsTypeList[item.type].type==='baozhi'?require('../../assets/baozhi'+(Math.floor(Math.random()*2)+1)+'.png'):require('../../assets/kecheng'+(Math.floor(Math.random()*3)+1)+'.png')"
-                :fit="'cover'">
-            </el-image>
-            <div class="bottom">
-            <p class="name">{{item.name}}</p>
-            <!-- <template>
+      <span class="isNew" v-if="item.is_new && item.is_new === 'true'"
+        >NEW</span
+      >
+      <span
+        class="isReservation"
+        v-if="item.is_reservation && item.is_reservation === 'true'"
+        >订阅</span
+      >
+      <el-image
+        class="image"
+        :src="
+          item.cover_image_url
+            ? item.cover_image_url
+            : item.course_type === 'baozhi' ||
+              (goodsTypeList[item.type] &&
+                goodsTypeList[item.type].type === 'baozhi')
+            ? require('../../assets/baozhi' +
+                (Math.floor(Math.random() * 2) + 1) +
+                '.png')
+            : require('../../assets/kecheng' +
+                (Math.floor(Math.random() * 3) + 1) +
+                '.png')
+        "
+        :fit="'cover'"
+      >
+      </el-image>
+      <div class="bottom">
+        <p class="name">{{ item.name }}</p>
+        <!-- <template>
                 <el-rate
                 v-model="item.score"
                 disabled
@@ -37,49 +65,82 @@
                 >
                 </el-rate>
             </template> -->
-            <p class="author">{{item.shelve_date||item.typeName||item.classperiod||item.author||'暂无'}}</p>
-            <template v-if="!type||type!='bookShelf'">
-                <p class="price">
-                <span class="OPPOSans">¥{{item.hasOwnProperty('price_discount')?item.price_discount:item.price|cutMoneyFiter}}</span>
-                <s v-if="item.hasOwnProperty('price_discount')&&item.price_discount!==item.price">¥{{item.price|cutMoneyFiter}}</s>
-                </p>
-            </template>
-            </div>
-        </div> 
+        <p class="author">
+          {{
+            item.shelve_date ||
+            item.typeName ||
+            item.classperiod ||
+            item.author ||
+            "暂无"
+          }}
+        </p>
+        <template v-if="!type || type != 'bookShelf'">
+          <p class="price">
+            <span class="OPPOSans"
+              >¥{{
+                item.hasOwnProperty("price_discount")
+                  ? item.price_discount
+                  : item.price | cutMoneyFiter
+              }}</span
+            >
+            <s
+              v-if="
+                item.hasOwnProperty('price_discount') &&
+                item.price_discount !== item.price
+              "
+              >¥{{ item.price | cutMoneyFiter }}</s
+            >
+          </p>
+        </template>
+      </div>
     </div>
+  </div>
 </template>
 
 <script>
 //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》from ‘《组件路径》';
-import { cutMoneyFiter } from '@/utils/defined';
+import { cutMoneyFiter } from "@/utils/defined";
 import { getLogin } from "@/api/ajax";
 export default {
   name: "BookCard",
   //import引入的组件需要注入到对象中才能使用
   components: {},
-  props: ["item", "height","type","LoginNavIndex","userBg","headerBorder","headerBg","previousPage","isBuy"],
-  filters:{
-    cutMoneyFiter
+  props: [
+    "item",
+    "height",
+    "type",
+    "LoginNavIndex",
+    "userBg",
+    "headerBorder",
+    "headerBg",
+    "previousPage",
+    "isBuy",
+  ],
+  filters: {
+    cutMoneyFiter,
   },
   data() {
     //这里存放数据
     return {
-      goodsTypeList:{
-        0:{
-            type: 'LB'
+      goodsTypeList: {
+        0: {
+          type: "LB",
         },
-        2:{
-            type: 'baozhi'
-        }
-      }
-    }
+        2: {
+          type: "baozhi",
+        },
+        4: {
+          type: "huakan",
+        },
+      },
+    };
   },
   //计算属性 类似于data概念
   computed: {
     score() {
-      return this.item.score.toFixed(1)
-    }
+      return this.item.score.toFixed(1);
+    },
   },
   //监控data中数据变化
   watch: {},
@@ -87,84 +148,81 @@ export default {
   methods: {
     changeData(data) {
       var datasort = data.sort((a, b) => a.date.localeCompare(b.date));
-      var timeArr = new Set(datasort.map(it => it.date))
-      let newarr = []
-      let rateArr = []
-      timeArr.forEach(item => {
+      var timeArr = new Set(datasort.map((it) => it.date));
+      let newarr = [];
+      let rateArr = [];
+      timeArr.forEach((item) => {
         let a = {
           date: "",
-          arr: []
-        }
-        data.forEach(items => {
+          arr: [],
+        };
+        data.forEach((items) => {
           if (item == items.date) {
-            a.date = items.date
-            a.arr.push(items.weight)
-            rateArr.push(items.rate)
+            a.date = items.date;
+            a.arr.push(items.weight);
+            rateArr.push(items.rate);
           }
-        })
-        newarr.push(a)
-      })
-      newarr.forEach(item => {
+        });
+        newarr.push(a);
+      });
+      newarr.forEach((item) => {
         if (item.arr.length < 3) {
           for (let i = 0; i < 3 - (item.arr.length - 1); i++) {
-            item.arr.push(0)
+            item.arr.push(0);
           }
         }
-      })
-      return { newarr, timeArr, rateArr }
+      });
+      return { newarr, timeArr, rateArr };
     },
-    async handleLink(){
-        let url  = this.LoginNavIndex +'&&&1&&&2&&&3&&&' + this.previousPage
-        if(this.LoginNavIndex===1){
-            let MethodName = "/ShopServer/Client/BookshelfQuery/SetMyGoodsIsLooked";
-            let data = {
-                goods_id: this.item.id,
-                goods_type: this.item.type
+    async handleLink() {
+      let url = this.LoginNavIndex + "&&&1&&&2&&&3&&&" + this.previousPage;
+      if (this.LoginNavIndex === 1) {
+        let MethodName = "/ShopServer/Client/BookshelfQuery/SetMyGoodsIsLooked";
+        let data = {
+          goods_id: this.item.id,
+          goods_type: this.item.type,
+        };
+        await getLogin(MethodName, data)
+          .then((res) => {
+            if (res.status === 1) {
             }
-            await getLogin(MethodName, data)
-            .then((res) => {
-                if(res.status===1){
-                    
-                }
-            })
-            .catch(() => {
-                
-            }); 
-        }
-        this.$router.push({
-            path: "/bookItem",
-            query: {
-                headerConfig: encodeURIComponent(url),
-                isBuy:this.isBuy,
-                cardType: this.item.course_type||this.goodsTypeList[this.item.type].type,
-                id: this.item.id
-            },
-        });
-    }
+          })
+          .catch(() => {});
+      }
+
+      this.$router.push({
+        path: "/bookItem",
+        query: {
+          headerConfig: encodeURIComponent(url),
+          isBuy: this.isBuy,
+          cardType:
+            this.item.course_type || this.goodsTypeList[this.item.type].type,
+          id: this.item.id,
+        },
+      });
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
     // let data = this.changeData(this.dataContext)
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-
-  },
+  mounted() {},
   //生命周期-创建之前
-  beforeCreated() { },
+  beforeCreated() {},
   //生命周期-挂载之前
-  beforeMount() { },
+  beforeMount() {},
   //生命周期-更新之前
-  beforUpdate() { },
+  beforUpdate() {},
   //生命周期-更新之后
-  updated() { },
+  updated() {},
   //生命周期-销毁之前
-  beforeDestory() { },
+  beforeDestory() {},
   //生命周期-销毁完成
-  destoryed() { },
+  destoryed() {},
   //如果页面有keep-alive缓存功能,这个函数会触发
-  activated() { }
-}
+  activated() {},
+};
 </script>
 <style lang="scss" scoped>
 /* @import url(); 引入css类 */
@@ -189,7 +247,7 @@ export default {
     font-weight: 400;
     font-size: 14px;
     line-height: 22px;
-    color: #2F3742;
+    color: #2f3742;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
@@ -199,7 +257,7 @@ export default {
     font-weight: 400;
     font-size: 12px;
     line-height: 20px;
-    color: #929CA8;
+    color: #929ca8;
   }
   .price {
     margin-top: 12px;
@@ -209,16 +267,16 @@ export default {
       font-weight: 700;
       font-size: 14px;
       line-height: 22px;
-      color: #EC5E41;
+      color: #ec5e41;
     }
     :nth-child(2) {
       font-weight: 400;
       font-size: 12px;
       line-height: 20px;
       text-decoration-line: line-through;
-      color: #929CA8;
+      color: #929ca8;
       margin-left: 8px;
     }
   }
 }
-</style>
+</style>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1099 - 825
src/views/bookStore/Subscribe.vue


+ 300 - 286
src/views/personalCenter/components/OrderList.vue

@@ -2,98 +2,115 @@
   <div class="my-share personal-info">
     <h2>订单管理</h2>
     <el-table
-        :data="orderList"
-        @sort-change="handleSort"
-        :default-sort = dataSort
-        v-loading="tableLoading"
-        :max-height="tableHeight"
+      :data="orderList"
+      @sort-change="handleSort"
+      :default-sort="dataSort"
+      v-loading="tableLoading"
+      :max-height="tableHeight"
     >
-        <el-table-column
-            type="index"
-            label="#"
-            width="48"
-            :index="(pageNumber-1)*pageSize+1">
-        </el-table-column>
-        <el-table-column
-            prop="sn"
-            label="交易单号"
-            width="200">
-        </el-table-column>
-        <el-table-column
-            prop="pay_time"
-            label="交易时间"
-            width="180"
-            sortable="custom">
-            <template slot-scope="scope">
-                {{scope.row.pay_time?scope.row.pay_time.substring(0,16):'-'}}
-            </template>
-        </el-table-column>
-        <el-table-column
-            prop="name"
-            label="购买商品"
-            min-width="220">
-        </el-table-column>
-        <el-table-column
-            label="类型"
-            width="72">
-            <template slot-scope="scope" v-if="scope.row.goods_type>=0">
-                <span class="items-type" :style="{background:typeList[scope.row.goods_type]?typeList[scope.row.goods_type].bg:'', color:typeList[scope.row.goods_type]?typeList[scope.row.goods_type].color:''}">{{typeList[scope.row.goods_type]?typeList[scope.row.goods_type].text:'-'}}</span>
-            </template>
-        </el-table-column>
-        <el-table-column
-            prop="goods_study_phase_name"
-            label="学段"
-            width="64">
-        </el-table-column>
-        <el-table-column
-            prop="study"
-            label="价格"
-            width="154">
-            <template slot-scope="scope">
-                <span class="currectPrice">¥{{scope.row.hasOwnProperty('goods_price_discount')?scope.row.goods_price_discount:scope.row.goods_price | cutMoneyFiter}}</span>
-                <span class="oldPrice" v-if="scope.row.hasOwnProperty('goods_price_discount')&&scope.row.goods_price_discount!==scope.row.goods_price">(¥{{scope.row.goods_price | cutMoneyFiter}})</span>
-            </template>
-        </el-table-column>
-        <el-table-column
-            label="兑换码"
-            width="194">
-            <template slot-scope="scope">
-                <template v-if="scope.row.is_use_discount_code=='false'">
-                    未使用
-                </template>
-                <template v-else>
-                    <template v-if="scope.row.discount_code">
-                        <span class="code" :id="'copy-'+scope.row.discount_code">{{scope.row.discount_code}}</span>
-                        <svg-icon icon-class="copy" class="copy" @click="CopyToClipboard('copy-'+scope.row.discount_code)"></svg-icon>
-                    </template>
-                    <template v-else>-</template>
-                </template>
-            </template>
-        </el-table-column>
-        <el-table-column
-            label="支付金额"
-            width="96">
-            <template slot-scope="scope">
-                <span>¥{{scope.row.order_amount | cutMoneyFiter}}</span>
-            </template>
-        </el-table-column>
-        <el-table-column
-            prop="pay_type_name"
-            label="支付渠道"
-            width="104">
-        </el-table-column>
-        <el-table-column
-            prop="status"
-            label="交易状态"
-            width="112">
-            <template slot-scope="scope">
-                <div class="status-box">
-                    <span :style="{background:statusList[scope.row.order_status].bg}"></span>
-                    <b :style="{color:statusList[scope.row.order_status].textColor}">{{scope.row.order_status_name}}</b>
-                </div>
+      <el-table-column
+        type="index"
+        label="#"
+        width="48"
+        :index="(pageNumber - 1) * pageSize + 1"
+      >
+      </el-table-column>
+      <el-table-column prop="sn" label="交易单号" width="200">
+      </el-table-column>
+      <el-table-column
+        prop="pay_time"
+        label="交易时间"
+        width="180"
+        sortable="custom"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.pay_time ? scope.row.pay_time.substring(0, 16) : "-" }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="name" label="购买商品" min-width="220">
+      </el-table-column>
+      <el-table-column label="类型" width="72">
+        <template slot-scope="scope" v-if="scope.row.goods_type >= 0">
+          <span
+            class="items-type"
+            :style="{
+              background: typeList[scope.row.goods_type]
+                ? typeList[scope.row.goods_type].bg
+                : '',
+              color: typeList[scope.row.goods_type]
+                ? typeList[scope.row.goods_type].color
+                : '',
+            }"
+            >{{
+              typeList[scope.row.goods_type]
+                ? typeList[scope.row.goods_type].text
+                : "-"
+            }}</span
+          >
+        </template>
+      </el-table-column>
+      <el-table-column prop="goods_study_phase_name" label="学段" width="64">
+      </el-table-column>
+      <el-table-column prop="study" label="价格" width="154">
+        <template slot-scope="scope">
+          <span class="currectPrice"
+            >¥{{
+              scope.row.hasOwnProperty("goods_price_discount")
+                ? scope.row.goods_price_discount
+                : scope.row.goods_price | cutMoneyFiter
+            }}</span
+          >
+          <span
+            class="oldPrice"
+            v-if="
+              scope.row.hasOwnProperty('goods_price_discount') &&
+              scope.row.goods_price_discount !== scope.row.goods_price
+            "
+            >(¥{{ scope.row.goods_price | cutMoneyFiter }})</span
+          >
+        </template>
+      </el-table-column>
+      <el-table-column label="兑换码" width="194">
+        <template slot-scope="scope">
+          <template v-if="scope.row.is_use_discount_code == 'false'">
+            未使用
+          </template>
+          <template v-else>
+            <template v-if="scope.row.discount_code">
+              <span class="code" :id="'copy-' + scope.row.discount_code">{{
+                scope.row.discount_code
+              }}</span>
+              <svg-icon
+                icon-class="copy"
+                class="copy"
+                @click="CopyToClipboard('copy-' + scope.row.discount_code)"
+              ></svg-icon>
             </template>
-        </el-table-column>
-        <!-- <el-table-column
+            <template v-else>-</template>
+          </template>
+        </template>
+      </el-table-column>
+      <el-table-column label="支付金额" width="96">
+        <template slot-scope="scope">
+          <span>¥{{ scope.row.order_amount | cutMoneyFiter }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="pay_type_name" label="支付渠道" width="104">
+      </el-table-column>
+      <el-table-column prop="status" label="交易状态" width="112">
+        <template slot-scope="scope">
+          <div class="status-box">
+            <span
+              :style="{ background: statusList[scope.row.order_status].bg }"
+            ></span>
+            <b
+              :style="{ color: statusList[scope.row.order_status].textColor }"
+              >{{ scope.row.order_status_name }}</b
+            >
+          </div>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column
             prop="status"
             label="操作"
             width="150"
@@ -113,14 +130,15 @@
         </el-table-column> -->
     </el-table>
     <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="pageNumber"
-        :page-sizes="[10, 20, 30, 40, 50]"
-        :page-size="pageSize"
-        layout="total, prev, pager, next, sizes, jumper"
-        :total="total_count">
+      background
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="pageNumber"
+      :page-sizes="[10, 20, 30, 40, 50]"
+      :page-size="pageSize"
+      layout="total, prev, pager, next, sizes, jumper"
+      :total="total_count"
+    >
     </el-pagination>
   </div>
 </template>
@@ -128,97 +146,95 @@
 <script>
 //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》from ‘《组件路径》';
-import { cutMoneyFiter } from '@/utils/defined';
+import { cutMoneyFiter } from "@/utils/defined";
 import { getLogin } from "@/api/ajax";
 export default {
   //import引入的组件需要注入到对象中才能使用
-  components: { },
+  components: {},
   props: [],
-  filters:{
-    cutMoneyFiter
+  filters: {
+    cutMoneyFiter,
   },
   data() {
     //这里存放数据
     return {
-        pageSize: 10, 
-        pageNumber: 1,
-        statusList:{
-            1:{
-                text:'支付成功',
-                bg:'#00B42A',
-                textColor:'#1D2129'
-            },
-            2:{
-                text:'兑换成功',
-                bg:'#165DFF',
-                textColor:'#1D2129'
-            },
-            3:{
-                text:'已退款',
-                bg:'#EF21DA',
-                textColor:'#EF21DA'
-            },
-            4:{
-                text:'支付失败',
-                bg:'#FF7D00',
-                textColor:'#1D2129'
-            },
-            0:{
-                text:'申请退款中',
-                bg:'#F53F3F',
-                textColor:'#F53F3F'
-            }
+      pageSize: 10,
+      pageNumber: 1,
+      statusList: {
+        1: {
+          text: "支付成功",
+          bg: "#00B42A",
+          textColor: "#1D2129",
         },
-        typeList:{
-            2:{
-                text:'报纸',
-                color:'#165DFF',
-                bg:'#E8F7FF'
-            },
-            // '2':{
-            //     text:'画刊',
-            //     color:'#F53F3F',
-            //     bg:'#FFECE8'
-            // },
-            '3':{
-                text:'精读',
-                color:'#0FC6C2',
-                bg:'#E8FFFB'
-            },
-            0:{
-                text:'课程',
-                color:'#722ED1',
-                bg:'#F5E8FF'
-            },
-            1:{
-                text:'课程',
-                color:'#722ED1',
-                bg:'#F5E8FF'
-            },
-            // '5':{
-            //     text:'报纸专辑',
-            //     color:'#165DFF',
-            //     bg:'#E8F7FF'
-            // },
-            // '6':{
-            //     text:'画刊专辑',
-            //     color:'#F53F3F',
-            //     bg:'#FFECE8'
-            // }
+        2: {
+          text: "兑换成功",
+          bg: "#165DFF",
+          textColor: "#1D2129",
         },
-        orderList:[],
-        total_count: 0,
-        dataSort: {},
-        tableLoading: false,
-        tableHeight: "", // 表格高度
-    }
+        3: {
+          text: "已退款",
+          bg: "#EF21DA",
+          textColor: "#EF21DA",
+        },
+        4: {
+          text: "支付失败",
+          bg: "#FF7D00",
+          textColor: "#1D2129",
+        },
+        0: {
+          text: "申请退款中",
+          bg: "#F53F3F",
+          textColor: "#F53F3F",
+        },
+      },
+      typeList: {
+        2: {
+          text: "报纸",
+          color: "#165DFF",
+          bg: "#E8F7FF",
+        },
+        4: {
+          text: "画刊",
+          color: "#F53F3F",
+          bg: "#FFECE8",
+        },
+        3: {
+          text: "精读",
+          color: "#0FC6C2",
+          bg: "#E8FFFB",
+        },
+        0: {
+          text: "课程",
+          color: "#722ED1",
+          bg: "#F5E8FF",
+        },
+        1: {
+          text: "课程",
+          color: "#722ED1",
+          bg: "#F5E8FF",
+        },
+        // '5':{
+        //     text:'报纸专辑',
+        //     color:'#165DFF',
+        //     bg:'#E8F7FF'
+        // },
+        // '6':{
+        //     text:'画刊专辑',
+        //     color:'#F53F3F',
+        //     bg:'#FFECE8'
+        // }
+      },
+      orderList: [],
+      total_count: 0,
+      dataSort: {},
+      tableLoading: false,
+      tableHeight: "", // 表格高度
+    };
   },
   //计算属性 类似于data概念
   computed: {},
   //监控data中数据变化
-  watch: {
-
-  },
+  watch: {},
   //方法集合
   methods: {
     //计算table高度(动态设置table高度)
@@ -231,22 +247,22 @@ export default {
         this.tableHeight = window.innerHeight - tableH;
       }
     },
-    handleSort(value){
-        let dataSort = {
-            prop: value.prop,
-            order: value.order
-        }
-        this.dataSort = dataSort
-        this.getList()
+    handleSort(value) {
+      let dataSort = {
+        prop: value.prop,
+        order: value.order,
+      };
+      this.dataSort = dataSort;
+      this.getList();
     },
     handleSizeChange(val) {
-        this.pageSize = val
-        this.pageNumber = 1
-        this.getList()
+      this.pageSize = val;
+      this.pageNumber = 1;
+      this.getList();
     },
     handleCurrentChange(val) {
-        this.pageNumber = val
-        this.getList()
+      this.pageNumber = val;
+      this.getList();
     },
     CopyToClipboard(element) {
       var doc = document,
@@ -271,126 +287,124 @@ export default {
       });
       window.getSelection().removeAllRanges();
     },
-    getList(){
-        this.tableLoading = true
-        let MethodName = "/ShopServer/Client/OrderManager/PageQueryMyOrderList";
-        let order_column_list = []
-        if(this.dataSort != {}){
-            if(this.dataSort.order=='descending'){
-                order_column_list = [this.dataSort.prop + ':desc']
-            }else if(this.dataSort.order=='ascending'){
-                // 升序不传值
-                order_column_list = [this.dataSort.prop]
-            }
-        }
-        let data = {
-            page_capacity:this.pageSize,
-            cur_page:this.pageNumber,
-            order_column_list: order_column_list,
-            pay_status:1
+    getList() {
+      this.tableLoading = true;
+      let MethodName = "/ShopServer/Client/OrderManager/PageQueryMyOrderList";
+      let order_column_list = [];
+      if (this.dataSort != {}) {
+        if (this.dataSort.order == "descending") {
+          order_column_list = [this.dataSort.prop + ":desc"];
+        } else if (this.dataSort.order == "ascending") {
+          // 升序不传值
+          order_column_list = [this.dataSort.prop];
         }
-        getLogin(MethodName, data)
+      }
+      let data = {
+        page_capacity: this.pageSize,
+        cur_page: this.pageNumber,
+        order_column_list: order_column_list,
+        pay_status: 1,
+      };
+      getLogin(MethodName, data)
         .then((res) => {
-            this.tableLoading = false
-            if(res.status===1){
-               this.orderList = res.order_list
-               this.total_count = res.total_count
-            }
+          this.tableLoading = false;
+          if (res.status === 1) {
+            this.orderList = res.order_list;
+            this.total_count = res.total_count;
+          }
         })
         .catch(() => {
-            this.tableLoading = false
+          this.tableLoading = false;
         });
-    }
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    this.getTableHeight()
-    this.getList()
+    this.getTableHeight();
+    this.getList();
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-  },
+  mounted() {},
   //生命周期-创建之前
-  beforeCreated() { },
+  beforeCreated() {},
   //生命周期-挂载之前
-  beforeMount() { },
+  beforeMount() {},
   //生命周期-更新之前
-  beforUpdate() { },
+  beforUpdate() {},
   //生命周期-更新之后
-  updated() { },
+  updated() {},
   //生命周期-销毁之前
-  beforeDestory() { },
+  beforeDestory() {},
   //生命周期-销毁完成
-  destoryed() { },
+  destoryed() {},
   //如果页面有keep-alive缓存功能,这个函数会触发
-  activated() { }
-}
+  activated() {},
+};
 </script>
 <style lang="scss" scoped>
 /* @import url(); 引入css类 */
-.my-share{
-    background: #FFFFFF;
-    border-radius: 4px;
-    padding: 24px;
-    h2{
-        font-weight: 500;
-        font-size: 20px;
-        line-height: 28px;
-        color: #1D2129;
-        margin: 0;
-    }
-    .el-table{
-        margin: 24px 0;
-        max-width: 100%;
+.my-share {
+  background: #ffffff;
+  border-radius: 4px;
+  padding: 24px;
+  h2 {
+    font-weight: 500;
+    font-size: 20px;
+    line-height: 28px;
+    color: #1d2129;
+    margin: 0;
+  }
+  .el-table {
+    margin: 24px 0;
+    max-width: 100%;
+  }
+  .el-pagination {
+    text-align: right;
+  }
+  .status-box {
+    display: flex;
+    align-items: center;
+    span {
+      width: 6px;
+      height: 6px;
+      border-radius: 3px;
+      margin-right: 8px;
+      margin-top: 2px;
     }
-    .el-pagination{
-        text-align: right;
-    }
-    .status-box{
-        display: flex;
-        align-items: center;
-        span{
-            width: 6px;
-            height: 6px;
-            border-radius: 3px;
-            margin-right: 8px;
-            margin-top: 2px;
-        }
-        b{
-            font-weight: 400;
-            font-size: 14px;
-            line-height: 22px;
-            color: #1D2129;
-        }
-    }
-    .order-detail{
-        color: #165DFF;
-        margin-right: 8px;
-    }
-    .apply{
-        font-size: 14px;
-        line-height: 22px;
-        color: #86909C;
-    }
-    .items-type{
-        padding: 1px 8px;
-        font-weight: 500;
-        font-size: 14px;
-        line-height: 22px;
-        border-radius: 2px;
-    }
-    .oldPrice{
-        color: #86909C;
-        margin-left: 8px;
-    }
-    .code{
-        color: #175DFF;
-    }
-    .copy{
-        color: #C9CDD4;
-        margin-left: 8px;
-        cursor: pointer;
+    b {
+      font-weight: 400;
+      font-size: 14px;
+      line-height: 22px;
+      color: #1d2129;
     }
+  }
+  .order-detail {
+    color: #165dff;
+    margin-right: 8px;
+  }
+  .apply {
+    font-size: 14px;
+    line-height: 22px;
+    color: #86909c;
+  }
+  .items-type {
+    padding: 1px 8px;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 22px;
+    border-radius: 2px;
+  }
+  .oldPrice {
+    color: #86909c;
+    margin-left: 8px;
+  }
+  .code {
+    color: #175dff;
+  }
+  .copy {
+    color: #c9cdd4;
+    margin-left: 8px;
+    cursor: pointer;
+  }
 }
 </style>
-

Vissa filer visades inte eftersom för många filer har ändrats