Преглед изворни кода

删除任务相关代码与开发兑换激活码

bayi пре 2 година
родитељ
комит
cc889cef8d
8 измењених фајлова са 60 додато и 15 уклоњено
  1. 0 2
      api/global.js
  2. 9 10
      pages/my/index.js
  3. 23 0
      pages/my/index.less
  4. 5 0
      pages/my/index.wxml
  5. 20 0
      pages/my/index.wxss
  6. BIN
      static/task2.png
  7. BIN
      static/task3.png
  8. 3 3
      utils/request.js

+ 0 - 2
api/global.js

@@ -6,8 +6,6 @@ module.exports = {
   getProducts: data => request('/v3/product', 'get', data),
   // 领取代金卷
   getVoucher: data => request('/v3/activity/voucher', 'post', data),
-  // 获取任务配置
-  getTasks: data => request('/v3/task', 'get', data),
   // 获取轮播图列表
   getBannerList: data => request('/v3/banner', 'get', data),
   // 获取官方活动

+ 9 - 10
pages/my/index.js

@@ -1,6 +1,5 @@
 import {
   getProducts,
-  getTasks,
 } from '~/api/global'
 import {
   buyVip,
@@ -54,18 +53,11 @@ Page({
     let userInfo = await getMyInfo()
     let vipTime = await getVipInfo()
     this.setUser(userInfo.user)
-    this.getTasks()
     this.setData({
       userInfo,
       vipTime,
     })
   },
-  async getTasks() {
-    let tasks = await getTasks()
-    this.setData({
-      tasks
-    })
-  },
   async getProducts() {
     let products = await getProducts()
     let productVip = products.find(item => {
@@ -140,7 +132,15 @@ Page({
       }
     })
   },
- 
+  activationCode() {
+    wx.showModal({
+      title: '请输入激活码',
+      editable: true,
+      success(res) {
+        console.log(res);
+      }
+    })
+  },
   jump({
     currentTarget
   }) {
@@ -149,7 +149,6 @@ Page({
       url: url
     });
   },
-
   clipboar() {
     wx.setClipboardData({
       data: this.data.userInfo.user.eid,

+ 23 - 0
pages/my/index.less

@@ -178,6 +178,29 @@
     }
   }
 
+  .activation {
+    margin-top: 20rpx;
+    padding: 13rpx 40rpx;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    background-color: white;
+    border-radius: 50rpx;
+
+    .tips {
+      font-size: 28rpx;
+      color: #666666;
+    }
+
+    .subBtn {
+      padding: 10rpx 50rpx;
+      border-radius: 50rpx;
+      color: white;
+      font-size: 25rpx;
+      background-color: #FC614E;
+    }
+  }
+
   .payBox {
     margin-top: 20rpx;
     padding: 13rpx 30rpx;

+ 5 - 0
pages/my/index.wxml

@@ -61,6 +61,11 @@
       <image src="/static/concern.png" class="medal" wx:for="{{5}}" wx:key="index" />
     </view>
   </view> -->
+  <!-- 激活码 -->
+  <view class="activation" bindtap="activationCode">
+    <view class="tips">请输入学习卡激活码</view>
+    <view class="subBtn">激活</view>
+  </view>
   <!-- 支付 -->
   <view class="payBox" wx:if="{{!isIos}}">
     <view class="title">

+ 20 - 0
pages/my/index.wxss

@@ -148,6 +148,26 @@
   width: 112rpx;
   height: 94rpx;
 }
+.container .activation {
+  margin-top: 20rpx;
+  padding: 13rpx 40rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  background-color: white;
+  border-radius: 50rpx;
+}
+.container .activation .tips {
+  font-size: 28rpx;
+  color: #666666;
+}
+.container .activation .subBtn {
+  padding: 10rpx 50rpx;
+  border-radius: 50rpx;
+  color: white;
+  font-size: 25rpx;
+  background-color: #FC614E;
+}
 .container .payBox {
   margin-top: 20rpx;
   padding: 13rpx 30rpx;



+ 3 - 3
utils/request.js

@@ -6,13 +6,13 @@ const {
     envVersion
   }
 } = wx.getAccountInfoSync();
-/* if (envVersion == 'develop') {
+if (envVersion == 'develop') {
   baseUrl = 'https://reader-api.efunbox.cn/wx'
   oldUrl = 'https://reader-api.efunbox.cn'
-} else { */
+} else {
   baseUrl = 'https://reader-api.ai160.com/wx'
   oldUrl = 'https://reader-api.ai160.com'
-// }
+}
 
 function request(url, method, data, oldBaseUrl = false) {
   let header = {