姜永辉 hai 1 ano
pai
achega
f483fe90c5

+ 1 - 0
api/pages/sharesign/couponSend.js

@@ -11,6 +11,7 @@ module.exports = {
 	couponSendService: { 
 		// 前缀
 		prefix: 'oauth-server/oauth/couponSend/',
+		selectByCondHis :'list_by_history',
 	},
 	routeUrl: {
 		couponSend: {

+ 44 - 65
package-basic-data/pages/sign-share-history/coupon-receive-history.js

@@ -1,69 +1,48 @@
-// package-basic-data/pages/sign-share-history/coupon-receive-history.js
-const Constants = require('@/utils/Constants.js'); 
-const mixins = require('@/mixins/index.js'); 
+/*******************************************************************************
+* Copyright(c) 2022 dongke All rights reserved. / Confidential
+* 类的信息:
+*		1.程序名称:
+*		2.功能描述:历史助力记录
+* 编辑履历:
+*		作者				日期					版本				修改内容
+*		姜永辉		  	2022-11-22			1.00		   	新建
+*******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const mixins = require('@/mixins/index.js');
+const config = require('@/config/config.js');
 const app = getApp()
 Page({
-    mixins: [mixins],
-    /**
-     * 页面的初始数据
-     */
-    data: {
-      needHelpUserNumber: 5
-    },
+  mixins: [mixins],
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    needHelpUserNumber: 5,
+    // 路由
+    routeObjName: 'couponSend',
+    itemList:[],
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) { 
+  },
+  /** 
+  * @desc : 查询 
+  * @date : 2024年3月8日
+  * @author : jyh 
+  */
+  getData() {
+    let _this = this
+    return this.excute(this.data.service, this.data.service.selectByCondHis, {}).then(res => {
+      if (res.data.code == Constants.SUCESS_CODE) {
+        console.log(res.data.data,"getData");
+        this.setData({
+          itemList: res.data.data.list
+        })
+      }
+    })
+  },
 
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
-    }
 })

+ 11 - 38
package-basic-data/pages/sign-share-history/coupon-receive-history.wxml

@@ -1,53 +1,26 @@
 <!--package-basic-data/pages/sign-share-history/coupon-receive-history.wxml-->
 <view class="content">
   <view class="content-card">
-    <view class="card-content">
-      <view class="title-info">  
+    <view class="card-content" wx:for="{{itemList}}" wx:key="index" wx:for-item="item" data-item="{{item}}">
+      <view class="title-info">
         <view>助力</view>
         <view class="icon-view">
-          <view class="user-icon" wx:for="{{needHelpUserNumber}}">
-            <image fit="fill" src="{{imageUrl+'/user_icon.png'}}"/>
+          <view class="user-icon" wx:for="{{item.couponReceiveCount}}">
+            <image fit="fill" src="{{imageUrl+'/user_icon.png'}}" />
           </view>
-        </view>
-      </view>
-      <view class="user-info">  
-        <view class="time-view">2024-07-06/李小双</view>
-        <view class="state-view">
-          助力成功
-        </view>
-      </view>
-    </view>
-    <view class="card-content">
-      <view class="title-info">  
-        <view>助力</view>
-        <view class="icon-view">
-          <view class="user-icon"  wx:for="{{needHelpUserNumber}}">
-            <image fit="fill" src="{{imageUrl+'/user_icon.png'}}"/>
-          </view>
-        </view>
-      </view>
-      <view class="user-info">  
-        <view class="time-view">2024-07-06/李小双</view>
-        <view class="state-view">
-          助力成功
-        </view>
-      </view>
-    </view>
-    <view class="card-content">
-      <view class="title-info">  
-        <view>助力</view>
-        <view class="icon-view">
-          <view class="user-icon" wx:for="{{needHelpUserNumber}}">
+          <view class="user-icon" wx:for="{{needHelpUserNumber-item.couponReceiveCount}}">
             <van-icon class="icon" name="add-o" />
           </view>
+
         </view>
       </view>
-      <view class="user-info">  
-        <view class="time-view">2024-07-06/李小双</view>
-        <view class="state-view error">
-          助力失败
+      <view class="user-info">
+        <view class="time-view">{{item.sendDate}}/{{item.sendStaff?item.sendStaff:''}}</view>
+        <view class="state-view">
+          {{item.couponReceiveCount == needHelpUserNumber?'助力成功':'助力失败'}}
         </view>
       </view>
     </view>
+
   </view>
 </view>

+ 29 - 52
package-basic-data/pages/sign-share-history/integral-history.js

@@ -1,6 +1,15 @@
-// package-basic-data/pages/sign-share-history/coupon-receive-history.js
-const Constants = require('@/utils/Constants.js'); 
-const mixins = require('@/mixins/index.js'); 
+/*******************************************************************************
+* Copyright(c) 2022 dongke All rights reserved. / Confidential
+* 类的信息:
+*		1.程序名称:
+*		2.功能描述:历史邀请记录
+* 编辑履历:
+*		作者				日期					版本				修改内容
+*		姜永辉		  	2022-11-22			1.00		   	新建
+*******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const mixins = require('@/mixins/index.js');
+const config = require('@/config/config.js');
 const app = getApp()
 Page({
     mixins: [mixins],
@@ -8,62 +17,30 @@ Page({
      * 页面的初始数据
      */
     data: {
-
+        // 路由
+        routeObjName: 'couponSend',
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad(options) { 
     },
 
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
+    /** 
+    * @desc : 查询 
+    * @date : 2024年3月8日
+    * @author : jyh 
+    */
+    getData() {
+        let _this = this
+        return this.excute(this.data.service, this.data.service.selectByCondHis, {}).then(res => {
+            if (res.data.code == Constants.SUCESS_CODE) {
+                this.setData({
+                    itemList: res.data.data.list
+                })
+            }
+        })
     },
 
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
-    }
 })

+ 14 - 35
package-basic-data/pages/sign-share-history/integral-history.wxml

@@ -1,47 +1,26 @@
 <!--package-basic-data/pages/sign-share-history/coupon-receive-history.wxml-->
 <view class="content">
   <view class="content-card">
-    <view class="card-content">
-      <view class="title-info">  
+    <view class="card-content" wx:for="{{itemList}}" wx:key="index" wx:for-item="item" data-item="{{item}}">
+      <view class="title-info">
         <view>邀请</view>
-        <view class="user-icon">
-          <image fit="fill" src="{{imageUrl+'/user_icon.png'}}"/>
+        <view class="icon-view">
+          <view class="user-icon" wx:if="{{item.couponReceiveCount==1}}">
+            <image fit="fill" src="{{imageUrl+'/user_icon.png'}}" />
+          </view>
+          <view class="user-icon" wx:if="{{item.couponReceiveCount==0}}">
+            <van-icon class="icon" name="add-o" />
+          </view>
+
         </view>
       </view>
-      <view class="user-info">  
-        <view class="time-view">2024-07-06/李小双</view>
+      <view class="user-info">
+        <view class="time-view">{{item.sendDate}}/{{item.sendStaff?item.sendStaff:''}}</view>
         <view class="state-view">
-          注册成功
-        </view>
-      </view>
-    </view>
-    <view class="card-content">
-      <view class="title-info">  
-        <view>邀请</view>
-        <view class="user-icon">
-          <image fit="fill" src="{{imageUrl+'/user_icon.png'}}"/>
-        </view>
-      </view>
-      <view class="user-info">  
-        <view class="time-view">2024-07-06/李小双</view>
-        <view class="state-view">
-          注册成功
-        </view>
-      </view>
-    </view>
-    <view class="card-content">
-      <view class="title-info">  
-        <view>邀请</view>
-        <view class="user-icon">
-          <van-icon class="icon" name="add-o" />
-        </view>
-      </view>
-      <view class="user-info">  
-        <view class="time-view">2024-07-06/李小双</view>
-        <view class="state-view error">
-          注册失败
+          {{item.couponReceiveCount == needHelpUserNumber?'注册成功':'注册失败'}}
         </view>
       </view>
     </view>
+
   </view>
 </view>