Procházet zdrojové kódy

红人服务管理调整

qymljy před 1 rokem
rodič
revize
0364e2756a
1 změnil soubory, kde provedl 37 přidání a 29 odebrání
  1. 37 29
      cloud/serviceAdmin/redskinsServiceAdmin.vue

+ 37 - 29
cloud/serviceAdmin/redskinsServiceAdmin.vue

@@ -1,26 +1,27 @@
 <template>
     <view>
-      <view class="border-style" v-for="item in list" :key="item.rowindex">
-        <view style="padding: 10px">
-          <view class="content-style">
-            <u--image :src="item.attinfos[0].url" :width="tovw(355)" :height="tovw(180)"   :lazy-load="true">
-              <template v-slot:loading>
-                <u-loading-icon color="red"></u-loading-icon>
-              </template>
-            </u--image>
+      <My_listbox ref="listRef" @getlist="getList" bottomHeight="30px">
+        <view class="border-style" v-for="item in list" :key="item.rowindex">
+          <view style="padding: 10px">
+            <view class="content-style">
+              <u--image :src="item.attinfos[0].url" :width="tovw(355)" :height="tovw(180)"   :lazy-load="true">
+                <template v-slot:loading>
+                  <u-loading-icon color="red"></u-loading-icon>
+                </template>
+              </u--image>
+            </view>
           </view>
-        </view>
-        <view class="button-style">
-          <view>
-            <span style="color: #666666;font-size: 14px">状态:</span>
-            <span :style="{color: item.isonsale=='1'?'#E3041F':'#999999',fontSize: '14px'}">{{item.isonsale == '1'?'上架':'下架'}}</span>
-          </view>
-          <view style="width: 100px;height: 40px;line-height: 40px;margin-top:5px;vertical-align: middle">
-            <u-button :text="item.isonsale == '0'?'上架':'下架'" :color="item.isonsale == '0'?'#C30D23':'#999999'" @click="clickSale(item)"></u-button>
+          <view class="button-style">
+            <view>
+              <span style="color: #666666;font-size: 14px">状态:</span>
+              <span :style="{color: item.isonsale=='1'?'#E3041F':'#999999',fontSize: '14px'}">{{item.isonsale == '1'?'上架':'下架'}}</span>
+            </view>
+            <view style="width: 100px;height: 40px;line-height: 40px;margin-top:5px;vertical-align: middle">
+              <u-button :text="item.isonsale == '0'?'上架':'下架'" :color="item.isonsale == '0'?'#C30D23':'#999999'" @click="clickSale(item)" :loading="loading"></u-button>
+            </view>
           </view>
-
         </view>
-      </view>
+      </My_listbox>
     </view>
 </template>
 
@@ -28,9 +29,12 @@
 export default {
   data(){
     return {
-      buttonText:'下架',
-      title:'',
-      list:[]
+      list:[],
+      loading:false,
+      current: 0,
+      "content": {
+        "title":''
+      },
     }
   },
   onLoad(options){
@@ -44,25 +48,29 @@ export default {
   },
   methods:{
     getList(init = false){
-      this.$Http.base({
+      this.content.title = this.title?this.title:"6C红人服务"
+      if (this.paging(this.content, init)) return;
+      this.$Http.basic({
         "id": 20240511110302,
-        "content": {
-          "title": this.title?this.title:"6C红人服务"
-        },
+        "content": this.content
       }).then(res =>{
-        console.log(res.data,'红人服务管理')
-        this.list = res.data
+        this.$refs.listRef.RefreshToComplete()
+        if (this.cutoff(res.msg)) return
+        this.list = res.pageNumber == 1? res.data:this.list.concat(res.data)
+        this.content = this.$refs.listRef.paging(this.content, res)
       })
     },
     clickSale(item){
-      console.log(item,'数据上下架')
-      this.$Http.base({
+      this.loading = true
+      this.$Http.basic({
         "id": 20240511133302,
         "content": {
           "linksids": [item.linksid],
           "isonsale":item.isonsale == '1'?0:1
         },
       }).then(res =>{
+        if (this.cutoff(res.msg)) return
+        this.loading = false
         this.getList(true)
       })
     }