qymljy hai 1 ano
pai
achega
84581b419d
Modificáronse 2 ficheiros con 114 adicións e 4 borrados
  1. 101 3
      cloud/winningNews/index.vue
  2. 13 1
      pages/index/index/userCenter.vue

+ 101 - 3
cloud/winningNews/index.vue

@@ -1,13 +1,111 @@
 <template>
     <view>
-        中奖信息
+      <view class="text-top">
+        <view class="text">奖项</view>
+        <view class="text">共{{total}}个</view>
+      </view>
+        <My_listbox ref="List" @getlist="getList" >
+          <view class="list-box">
+            <navigator class="item" v-for="item in list" :key="item.sa_awardmxid"
+                       url="">
+              <view class="text">
+                <view class="title u-line-2">{{ item.awardname || '--' }}</view>
+                <view class="count u-line-1">
+                  <text style="margin-right: 118px">类型:{{ item.type || '--' }}</text>
+                  <text>金额:{{ CNY(item.price,'',false) || '--' }}元</text>
+                </view>
+                <view class="count u-line-1">来源:{{ item.awardheadname || '--' }}</view>
+              </view>
+            </navigator>
+          </view>
+        </My_listbox>
+
     </view>
 </template>
 
 <script>
 export default {
-
+  data() {
+    return {
+      list: [],
+      total:0,
+      "content": {
+      },
+    }
+  },
+  onLoad(options){
+    this.getList(true)
+    uni.setNavigationBarTitle({
+      title: '我的中奖信息'
+    });
+  },
+  methods:{
+    getList(init = false) {
+      if (this.paging(this.content, init)) return;
+      this.$Http.basic({
+        "id": 20240515140302,
+        content: this.content
+      }).then(res => {
+        this.$refs.List.RefreshToComplete()
+        console.log("中奖信息", res)
+        if (this.cutoff(res.msg)) return;
+        this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+        this.total = res.total
+        this.content = this.$refs.List.paging(this.content, res)
+      })
+    },
+  }
 }
 </script>
 
-<style></style>
+<style lang="scss">
+.text-top{
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  padding: 10px;
+  .text{
+    font-family: Source Han Sans SC, Source Han Sans SC;
+    font-weight: 400;
+    font-size: 12px;
+    color: #666666;
+    line-height: 0px;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    margin-top: 10px;
+  }
+}
+.list-box {
+  width: 100vw;
+  box-sizing: border-box;
+
+    .item {
+      display: flex;
+      width: 100vw;
+      border-radius: 5px;
+      overflow: hidden;
+      margin-top: 10px;
+      background: #FFFFFF;
+      padding: 10px;
+    .text {
+      flex: 1;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+
+      .title {
+        font-weight: bold;
+        font-size: 14px;
+        color: #333333;
+        line-height: 24px;
+      }
+      .count {
+        font-size: 12px;
+        color: #999999;
+        line-height: 17px;
+        margin-top: 8px;
+      }
+    }
+
+  }
+}
+</style>

+ 13 - 1
pages/index/index/userCenter.vue

@@ -21,7 +21,7 @@
           <view class="text-style">收货地址</view>
           <view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
         </navigator>
-        <navigator class="border-list-content" url="/cloud/winningNews/index" hover-class="navigator-hover">
+        <navigator class="border-list-content" url="/cloud/winningNews/index" hover-class="navigator-hover" v-if="isWinning">
           <view class="text-style">中奖信息</view>
           <view class="iconfont icon-a-wodetiaozhuan icon-style"></view>
         </navigator>
@@ -42,14 +42,26 @@ export default {
     data() {
         return {
             updatePage: true,
+			isWinning:true
         }
     },
     methods: {
         init(callBack) {
             callBack()
             this.updatePage = false;
+			this.queryAuth()
         },
+        queryAuth(){
+          let auth=uni.getStorageSync("authList")
+		  if (auth.工作台导航.中奖明细) {
+			  this.isWinning = true
+		  }else {
+			  this.isWinning = false
+		  }
+        }
     },
+
+
 }
 </script>