فهرست منبع

新增积分记录,修改样式修复bug

chenrong 1 سال پیش
والد
کامیت
5655226d89

+ 10 - 0
api/integralRecord.js

@@ -0,0 +1,10 @@
+import { request } from '@/api/config.js'
+
+// 积分记录列表
+export function integralListApi(data) {
+  return request({
+    url: '/wx/bkm/integral/list',
+    method: 'get',
+    data: data,
+  })
+}

+ 2 - 1
component/paymentPopup.vue

@@ -254,7 +254,8 @@ export default {
     },
     refresh() {
       // 刷新组件状态
-      ;(this.selestCouponId = null), (this.selestCoupon = {})
+      this.selestCouponId = null
+      this.selestCoupon = {}
       this.prizes = []
       this.checkbox1 = false
       this.checkbox2 = false

+ 1 - 1
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "宝可梦小程序",
+    "name" : "潮米卡牌小程序",
     "appid" : "__UNI__642FD30",
     "description" : "",
     "versionName" : "1.0.0",

+ 13 - 4
pages.json

@@ -6,13 +6,13 @@
     {
       "path": "pages/index/index",
       "style": {
-        "navigationBarTitleText": "宝可梦"
+        "navigationBarTitleText": "潮米卡牌"
       }
     },
     {
       "path": "pages/index2/index",
       "style": {
-        "navigationBarTitleText": "宝可梦",
+        "navigationBarTitleText": "潮米卡牌",
         //  自定义导航栏
         "navigationStyle": "custom"
       }
@@ -27,7 +27,7 @@
     {
       "path": "pages/first2/index",
       "style": {
-        "navigationBarTitleText": "宝可梦",
+        "navigationBarTitleText": "潮米卡牌",
         //  自定义导航栏
         "navigationStyle": "custom"
       }
@@ -224,7 +224,16 @@
         "enablePullDownRefresh": false
       }
     }
-  ],
+      ,{
+            "path" : "pages/integralRecord/integralRecord",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "积分记录",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
   "globalStyle": {
     "navigationBarTextStyle": "black",
     "navigationBarTitleText": "uni-app",

+ 1 - 1
pages/drawCard_box/drawCard_box.vue

@@ -24,7 +24,7 @@
     </view>
 
     <view class="rightButtons">
-      <view class="button">规则</view>
+      <view class="button" @click="$navigateTo('/pages/rule/rule', { type: 4 })">规则</view>
       <view class="button" style="top: 44px" @click="toKnapsack">背包</view>
     </view>
   </view>

+ 17 - 13
pages/drawCard_box/drawCard_boxDetail.vue

@@ -25,11 +25,23 @@
       </view>
     </view>
     <view class="buttons">
-      <view class="button button1" @click="currentChange">换一包</view>
-      <view class="button button2" @click="buy" style="color: #6a3d11">就买它</view>
+      <image
+        class="button"
+        @click="currentChange"
+        src="https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_box/button1.png"
+        mode="heightFix"
+      ></image>
+      <image
+        class="button"
+        @click="buy"
+        src="https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_box/button2.png"
+        mode="heightFix"
+      ></image>
+      <!-- <view class="button button1" @click="currentChange">换一包</view> -->
+      <!-- <view class="button button2" @click="buy" style="color: #6a3d11">就买它</view> -->
     </view>
     <view class="rightButtons">
-      <view class="button">规则</view>
+      <view class="button" @click="$navigateTo('/pages/rule/rule', { type: 4 })">规则</view>
       <view class="button" @click="toKnapsack" style="top: 44px">背包</view>
       <view class="button" @click="toWinningRecord" style="bottom: 0">中奖记录</view>
     </view>
@@ -243,9 +255,9 @@ export default {
     justify-content: space-around;
 
     .button {
-      width: 35vw;
+      // width: 35vw;
       height: 40px;
-      padding: 0 20px;
+      // padding: 0 20px;
       border-radius: 20px;
       line-height: 40px;
       color: #fff;
@@ -253,14 +265,6 @@ export default {
       font-size: 18px;
       text-align: center;
     }
-
-    .button1 {
-      background: linear-gradient(180deg, #89a9fa 0%, #716ff5 100%);
-    }
-
-    .button2 {
-      background: linear-gradient(180deg, #fae5af 0%, #f3ba8e 100%);
-    }
   }
 
   .rightButtons {

+ 3 - 3
pages/drawCard_fullSet/drawCard_fullSet.vue

@@ -184,6 +184,7 @@
       mode="widthFix"
     ></image>
     <paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
+    <view style="height: 40px; width: 100%"></view>
   </view>
 </template>
 
@@ -449,7 +450,6 @@ export default {
 
   .refresh {
     position: fixed;
-    display: none;
     right: 4px;
     top: 75%;
     width: 40px;
@@ -531,7 +531,7 @@ export default {
   }
 
   .cardList {
-    margin: 10px 10px 0 10px;
+    margin: 10px;
     border-radius: 12px;
     position: relative;
     background: linear-gradient(180deg, #31b7fd 10%, #6478fd 90%);
@@ -697,7 +697,7 @@ export default {
     padding: 0 10px;
 
     .button1 {
-      height: 40px;
+      height: 52px;
     }
   }
 

+ 12 - 3
pages/drawCard_infinite/drawCard_infinite.vue

@@ -47,7 +47,9 @@
         <img src="https://file.rongcyl.cn/festatic/bkm/x.png" class="w-10 h-10" v-else />
         <div class="ml-1" :style="{ color: detail.subType.includes('111') ? '' : '#a9bcd1' }">
           <div class="fontPFSCS" style="font-size: 15px">随机掉落</div>
-          <div style="font-size: 12px">未开启</div>
+          <div style="font-size: 12px">
+            {{ detail.subType.includes('111') ? '已开启' : '未开启' }}
+          </div>
         </div>
       </div>
       <div class="flex items-center">
@@ -59,7 +61,9 @@
         <img src="https://file.rongcyl.cn/festatic/bkm/free.png" class="w-10 h-10" v-else />
         <div class="ml-1" :style="{ color: detail.subType.includes('112') ? '' : '#a9bcd1' }">
           <div class="fontPFSCS" style="font-size: 15px">随机免单</div>
-          <div style="font-size: 12px">未开启</div>
+          <div style="font-size: 12px">
+            {{ detail.subType.includes('112') ? '已开启' : '未开启' }}
+          </div>
         </div>
       </div>
     </div>
@@ -347,7 +351,11 @@ export default {
       }
     },
     getOuKingList() {
-      getOuList({ raffleId: this.raffleId, page: 1, limit: 1000 }).then(rs => {
+      getOuList({
+        raffleId: this.raffleId,
+        page: 1,
+        limit: 1000,
+      }).then(rs => {
         this.ouList = rs.data
       })
     },
@@ -427,6 +435,7 @@ export default {
   overflow: hidden;
   position: relative;
 }
+
 .container {
   background: #9ec8f9;
   padding-top: 15px;

+ 28 - 4
pages/index/index.vue

@@ -32,7 +32,7 @@
         <image :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/button3.png'" @click="toInvite" />
       </view>
       <view class="right">
-        <image :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/button1.png'" />
+        <image :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/button1.png'" @click="showQRcode" />
         <image
           :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/button2.png'"
           @click="$navigateTo('/pages/raffle/raffle')"
@@ -54,6 +54,15 @@
         </view>
       </view>
     </view>
+
+    <uni-popup class="popup" ref="popup" type="center">
+      <image
+        class="qrcodeImg"
+        :show-menu-by-longpress="true"
+        :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/QRcode.png'"
+        mode="widthFix"
+      />
+    </uni-popup>
   </view>
 </template>
 
@@ -115,6 +124,9 @@ export default {
     clearInterval(this.timer)
   },
   methods: {
+    showQRcode() {
+      this.$refs.popup.open()
+    },
     drawCard(value) {
       let url = ''
       if (value.type == 1) {
@@ -128,7 +140,9 @@ export default {
       } else if (value.type == 5) {
         url = '/pages/drawCard_first/drawCard_first'
       }
-      this.$navigateTo(url, { id: value.id })
+      this.$navigateTo(url, {
+        id: value.id,
+      })
     },
     getHot() {
       let params = {
@@ -170,7 +184,9 @@ export default {
       // console.log(this.barrageIndex, 'this.barrageIndex')
       if (this.messageList.length > 0) {
         this.timeOut = setTimeout(() => {
-          let barrage = { text: this.messageList[this.barrageIndex].content }
+          let barrage = {
+            text: this.messageList[this.barrageIndex].content,
+          }
           this.$set(barrage, 'right', -400)
           this.$set(barrage, 'top', this.randomTop())
           this.$set(barrage, 'tag', false)
@@ -220,7 +236,8 @@ export default {
   height: 180px;
   position: relative;
   overflow: hidden;
-  background-color: rgba(0, 0, 0, 0.2); /* 背景色,可根据需要调整 */
+  background-color: rgba(0, 0, 0, 0.2);
+  /* 背景色,可根据需要调整 */
 }
 
 .barrage-item {
@@ -234,6 +251,7 @@ export default {
   border-radius: 15px;
   background-color: rgba(0, 0, 0, 0.3);
 }
+
 .container {
   /* padding: 20px; */
   font-size: 14px;
@@ -244,6 +262,7 @@ export default {
   height: 180px;
   width: 100%;
 }
+
 .headBarrage {
   height: 180px;
   width: 100%;
@@ -355,6 +374,7 @@ export default {
     }
   }
 }
+
 .bullet {
   height: 30px;
   line-height: 30px;
@@ -363,4 +383,8 @@ export default {
   background-color: rgba(0, 0, 0, 0.3);
   color: #fff;
 }
+.qrcodeImg {
+  width: 70vw;
+  border-radius: 5px;
+}
 </style>

+ 114 - 0
pages/integralRecord/integralRecord.vue

@@ -0,0 +1,114 @@
+<template>
+  <view class="container">
+    <view class="massage" v-for="(item, index) in list">
+      <!-- <view class="time">
+        {{ item.createTime }}
+      </view> -->
+      <view class="info">
+        <view class="title row">
+          <span>{{ item.eventDesc }}</span>
+          <span>{{ item.inOut == 1 ? '+' : '-' }}{{ item.integral }}</span>
+        </view>
+        <view class="text row">
+          <span>{{ item.createTime }}</span>
+          <!-- <span>积分余额:{{ 5 }}</span> -->
+        </view>
+      </view>
+    </view>
+    <uni-load-more
+      v-if="list.length > 0"
+      :status="loadMore"
+      @clickLoadMore="load"
+      :contentText="contentText"
+    ></uni-load-more>
+    <noData v-else />
+  </view>
+</template>
+
+<script>
+import noData from '@/component/noData.vue'
+import { integralListApi } from '@/api/integralRecord.js'
+export default {
+  components: {
+    noData,
+  },
+  data() {
+    return {
+      value: 1,
+      // more/loading/noMore
+      loadMore: 'more',
+      contentText: {
+        contentdown: '点击加载更多',
+      },
+      params: {
+        limit: 10,
+        page: 1,
+      },
+      list: [],
+    }
+  },
+  onShow() {
+    this.getList()
+  },
+  methods: {
+    load() {
+      if (this.loadMore == 'more') {
+        this.params.page += 1
+        this.getList()
+      }
+    },
+    getList() {
+      this.loadMore = 'loading'
+      integralListApi(this.params).then(res => {
+        this.list.push(...res.data.list)
+        // 判断是否还有更多数据
+        let listNum = this.params.limit * this.params.page
+        let total = res.data.total
+        if (total > listNum) {
+          this.loadMore = 'more'
+        } else {
+          this.loadMore = 'noMore'
+        }
+      })
+    },
+  },
+}
+</script>
+
+<style scoped lang="scss">
+.container {
+  height: 100vh;
+
+  .massage {
+    margin: 5px 10px;
+
+    .time {
+      font-size: 12px;
+      padding: 6px 0;
+      text-align: center;
+    }
+
+    .info {
+      background: #fff;
+      border-radius: 5px;
+      padding: 10px;
+
+      .row {
+        display: flex;
+        justify-content: space-between;
+      }
+
+      .title {
+        font-size: 16px;
+        // font-weight: 600;
+        padding: 5px 0;
+      }
+
+      .text {
+        font-size: 12px;
+        color: #9999;
+      }
+    }
+  }
+}
+</style>

+ 1 - 1
pages/invite/invite.vue

@@ -87,7 +87,7 @@ export default {
   onShareAppMessage() {
     let userId = wx.getStorageSync('userId')
     return {
-      title: this.userInfo.nickName + '邀请你来宝可梦卡牌抽取喜欢的卡牌',
+      title: this.userInfo.nickName + '邀请你来潮米卡牌卡牌抽取喜欢的卡牌',
       path: '/pages/index/index?inviteId=' + userId,
     }
   },

+ 1 - 1
pages/knapsack/knapsack.vue

@@ -54,7 +54,7 @@
                   <view class="row text">获得时间:{{ item.creatTime }}</view>
                   <view class="row" style="color: #ff2c43">
                     回收积分:{{ item.integral }}
-                    <span class="status">{{ item.prizeStatus }}</span>
+                    <!-- <span class="status">{{ item.prizeStatus }}</span> -->
                   </view>
                   <view class="row button">
                     <span></span>

+ 1 - 1
pages/knapsackTab/knapsack.vue

@@ -54,7 +54,7 @@
                   <view class="row text">获得时间:{{ item.creatTime }}</view>
                   <view class="row" style="color: #ff2c43">
                     回收积分:{{ item.integral }}
-                    <span class="status">{{ item.prizeStatus }}</span>
+                    <!-- <span class="status">{{ item.prizeStatus }}</span> -->
                   </view>
                   <view class="row button">
                     <span></span>

+ 1 - 1
pages/login/login.vue

@@ -9,7 +9,7 @@
         <radio :checked="checkbox1" @click="checkbox1 = !checkbox1" style="transform: scale(0.6)" color="#333333" />
         <view class="text">
           我已阅读并同意
-          <span class="textColor2">《用户协议》</span>
+          <span class="textColor2" @click="$navigateTo('/pages/userAgreement/userAgreement')">《用户协议》</span>
         </view>
       </view>
     </view>

+ 7 - 2
pages/mine/mine.vue

@@ -28,7 +28,7 @@
         </view>
       </view>
       <view class="row">
-        <view class="box">
+        <view class="box" @click="$navigateTo('/pages/integralRecord/integralRecord')">
           <view class="value" style="color: #ff2c43">
             {{ userInfoDetail.integral || 0 }}
           </view>
@@ -74,7 +74,12 @@
       </view>
     </view>
     <uni-popup class="popup" ref="popup" type="center">
-      <image class="qrcodeImg" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/QRcode.png'" mode="widthFix" />
+      <image
+        class="qrcodeImg"
+        :show-menu-by-longpress="true"
+        :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/QRcode.png'"
+        mode="widthFix"
+      />
     </uni-popup>
   </view>
 </template>