bobo 3 yıl önce
ebeveyn
işleme
946784291f
3 değiştirilmiş dosya ile 13 ekleme ve 2 silme
  1. 5 0
      pages/luckDraw/index.js
  2. 6 0
      pages/luckDraw/index.wxss
  3. 2 2
      utils/request.js

+ 5 - 0
pages/luckDraw/index.js

@@ -105,6 +105,11 @@ Page({
             }
             beginTime && (v._beginTime = parseTime(beginTime, "{y}.{m}.{d} {h}:{i}:{s}"))
             endTime && (v._endTime = parseTime(endTime, "{y}.{m}.{d} {h}:{i}:{s}"))
+
+            if (v.activityTitle && v.activityTitle.length > 20) {
+                v.activityTitle = v.activityTitle.substr(0, 20) + "..."
+            }
+
         })
         this.data.activityList = this.data.activityList.concat(...data)
         this.setData({

+ 6 - 0
pages/luckDraw/index.wxss

@@ -50,6 +50,7 @@ page {
     font-size: 36rpx;
     color: #000;
     margin-bottom: 16rpx;
+    width: 390rpx;
 }
 
 ._subtitle {
@@ -57,6 +58,11 @@ page {
     color: #8c8c8c;
     font-size: 24rpx;
     margin-bottom: 4rpx;
+    width: 400rpx;
+    height: 32rpx;
+    overflow: hidden;
+    text-overflow:ellipsis;
+    white-space: nowrap;
 }
 ._time {
     font-size: 28rpx;

+ 2 - 2
utils/request.js

@@ -2,9 +2,9 @@ import util from './util.js'
 class request {
 
     //本地的
- static BASE_URL = 'http://localhost:8014/'
+ // static BASE_URL = 'http://localhost:8014/'
 //   pre环境的
-//   static BASE_URL = 'https://oapi.shpr.top/'
+   static BASE_URL = 'https://oapi.shpr.top/'
 //   正式的
 //   static BASE_URL = 'https://vapi.hsayi.com/'