姜永辉 1 vuosi sitten
vanhempi
commit
0b47d1ccc0

+ 4 - 4
components/dkbase/dk-timeclock-calendar/dk-timeclock-calendar.wxml

@@ -30,13 +30,13 @@
 	<view class="flex-start flex-wrap calendar-main" style="height:{{dateList.length/7*89}}rpx;  ">
 		<view wx:for="{{dateList}}" wx:key="dateList" class="day">
 			<view
-				class="bg {{(item.year === selectDay.year && item.month === selectDay.month) ? (item.day === selectDay.day?'select':''): 'other-month'}}"
-				catchtap="selectChange" data-day="{{item.day}}" data-year="{{item.year}}" data-month="{{item.month}}"
+				class="bg {{(item.year === selectDay.year && item.month === selectDay.month) ? (item.day === selectDay.day?'':''): 'other-month'}}"
+				  data-day="{{item.day}}" data-year="{{item.year}}" data-month="{{item.month}}"
 				data-date-string="{{item.dateString}}">
 				{{item.day}}
 			</view>
-			<!--isnormal 0 正常 1 异常  wx:if="{{item.spot}}"-->
-			<view class="notnormalspot" style="{{'color:' + (item.isnormal?'#EBC07F':'#ac0909')}}">
+			<!--isnormal 0 正常 1 异常  -->
+			<view class="notnormalspot" wx:if="{{!item.spot}}" style="{{'color:' + (item.isnormal?'#EBC07F':'#ac0909')}}">
 			漏签
 			</view>
 		</view>

+ 24 - 1
package-basic-data/pages/register/company-register/company-register.js

@@ -280,6 +280,10 @@ Page({
       params.extendDays = summaryInfo.extendDays;
       params.buyLong = curentAdItem.activityItemName
     }
+    // 从好有分享过来的数据 好友互利共赢  shareType=1 cpid userid startdate enddate 
+    if (this.data.shareType) {
+
+    }
     return params
   },
 
@@ -422,7 +426,26 @@ Page({
   * @date : 2024/5/30 15:49
   * @author : 周兴
   */
-  onLoad() {
+  onLoad: function (options) {
+    // 从好有分享过来的数据 好友互利共赢  shareType=1 cpid userid startdate enddate   
+    if (options.shareType) {
+      this.setData({
+        shareType: options.shareType,
+      })
+    }
+    // 来源公司id
+    if (options.cpIdFrom) {
+      this.setData({
+        cpIdFrom: options.cpIdFrom,
+      })
+    }
+    // 截止日期
+    if (options.shareEndDate) {
+      this.setData({
+        shareEndDate: options.shareEndDate,
+      })
+    }
+
     // 查询活动
     this.getActivity();
     this.setData({

+ 5 - 2
package-basic-data/pages/sign/sign.js

@@ -1,6 +1,9 @@
-// package-basic-data/pages/sign/sign.js
-Page({
+const Constants = require('@/utils/Constants.js'); 
+const mixins = require('@/mixins/index.js'); 
+const app = getApp()
 
+Page({
+    mixins: [mixins],
     /**
      * 页面的初始数据
      */

+ 39 - 4
package-basic-data/pages/sign/sign.wxml

@@ -1,5 +1,40 @@
-<view> 
-	<dk-timeclock-calendar bind:change="dateChange">
-	</dk-timeclock-calendar>
-
+<!--package-basic-data/pages/share/share.wxml-->
+<!-- <text>package-basic-data/pages/share/share.wxml</text> -->
+<view class="content">
+	<view class="user-card">
+		<view class="user-card-info">
+			<view class="info-title">
+				<view class="cp-avatar">
+					<image fit="fill" src="{{imageUrl+'/order_billing_detail_01.png'}}"></image>
+				</view>
+				<view class="title-info">
+					<view class="cp-info">沈阳东科软件有限公司<view class="version-card">标准版</view>
+					</view>
+					<view class="user-info">张总经理 | 156 4055 6650</view>
+				</view>
+			</view>
+			<view class="info-item"></view>
+		</view>
+		<view class="integral-info">
+			<view class="integral-item">
+				<view class="item">
+					公司云币:<view class="number">10,000</view>个
+				</view>
+				<view class="item">
+					优惠券:<view class="number">1</view>张
+				</view>
+			</view>
+			<view class="rearmk-view">
+				<view class="title">云币说明:<span class="info">完成签到、分享、邀请可获得云币,云币可完全抵扣续费、购买授权、购买功能包等费用。<span style="color: #3F5CF4;text-decoration:underline;">查看云币具体规则;</span>完成助力可获得优惠券,优惠券有期限请注意使用</span></view>
+			</view>
+		</view>
+		<view class="user-card-backgorund">
+			<image class="scan-image" fit="fill" src="{{imageUrl+'/detail_sale_order.png'}}"></image>
+		</view>
+	</view>
+	<view>
+	<!-- 签到日期 -->
+		<dk-timeclock-calendar bind:change="dateChange">
+		</dk-timeclock-calendar>
+	</view>
 </view>

+ 236 - 1
package-basic-data/pages/sign/sign.wxss

@@ -1 +1,236 @@
-/* package-basic-data/pages/sign/sign.wxss */
+/* package-basic-data/pages/share/share.wxss */
+page {
+	background: #F8F9FD;
+  }
+  .content{
+	padding: 20rpx 10px 0rpx 10px;
+  }
+  
+  .user-card{
+	width: auto;
+	border: 1px solid #F3FBFF;
+	padding: 50rpx 35rpx 0rpx 35rpx;
+	border-radius: 30rpx;
+	background-color: #FFFF;
+	background: radial-gradient(65.52% 61.17% at 6.12% 18.49%, #CDD8FF 0%, #F3FAFF 100%);
+  }
+  
+  .user-card-backgorund{
+	width: auto;
+	position: relative;
+	bottom: 0;
+  }
+  
+  .user-card-backgorund .scan-image{
+	width: 200rpx;
+	height: 200rpx;
+	position: absolute;
+	bottom: 0;
+	right: 0;
+  }
+  
+  .user-card-info{
+	width: 100%;
+	display: flex;
+  }
+  
+  .user-card-info .info-title{
+	width: 100%;
+	display: flex;
+  }
+  
+  .user-card-info .title-info .cp-info{
+	display: flex;
+	font-size: 35rpx;
+	justify-content: center;
+	align-items: center;
+  }
+  
+  .user-card-info .info-title .version-card{
+	font-weight: 500;
+	font-size: 20rpx;
+	height: 2vh;
+	align-items: center;
+	display: flex;
+	border-top-left-radius: 20rpx;
+	border-bottom-right-radius: 20rpx;
+	padding: 0rpx 10rpx;
+	justify-items: center;
+	margin-left: 15rpx;
+	background: linear-gradient(0deg, #CFC9C0, #CFC9C0),
+	conic-gradient(from 154.5deg at 29.17% -8.33%, #FFE8BA -0.56deg, rgba(255, 230, 165, 0) 0.26deg, rgba(227, 184, 73, 0.34) 17.37deg, rgba(240, 187, 253, 0.23) 347.83deg, rgba(186, 234, 255, 0.38) 353.78deg, #FFE8BA 359.44deg, rgba(255, 230, 165, 0) 360.26deg);
+  }
+  
+  .user-card-info .info-title .version-card span{
+	color: #51370F;
+	box-shadow: 0px 0.56px 0px 0px #FFFB9E;
+  }
+  
+  .cp-avatar image{
+	width: 80rpx;
+	height: 80rpx;
+  }
+  
+  .title-info{
+	font-weight: bolder;
+	margin-left: 25rpx;
+  }
+  
+  .title-info .user-info{
+	margin-top: 25rpx;
+  }
+  
+  .integral-info{
+	display: flex;
+	flex-direction: column;
+	margin-bottom: 20rpx;
+  }
+  
+  .integral-item{
+	display: flex;
+	justify-content: space-between;
+	margin-top: 20rpx;
+  }
+  
+  .integral-item .item{
+	display: flex;
+	color: #1B365D;
+	font-weight: 600;
+	font-size: 35rpx;
+	align-items: center;
+  }
+  
+  .integral-item .number{
+	color: #FF7B1A;
+	font-size: 40rpx;
+	text-decoration-line:underline;
+  }
+  
+  .integral-info .rearmk-view{
+	margin-top: 15rpx;
+	font-size: 25rpx;
+  }
+  
+  .integral-info .rearmk-view .title{
+	font-weight: 600;
+	color: #1B365D;
+  }
+  
+  .integral-info .rearmk-view .info{
+	color: #95A8CB;
+	margin-left: 15rpx;
+	font-weight: 500;
+  }
+  
+  .activity-card{
+	display: flex;
+	justify-content: center;
+	align-content: center;
+	flex-direction: column;
+	align-items: center;
+	margin-top: 30rpx;
+	padding: 20rpx;
+	box-shadow: 0px 10px 20px 0px #E1E5EE99;
+	border: 1px solid #CE9965;
+	box-shadow: 0px 10px 20px 0px #0000000D;
+	box-shadow: 0px -6px 20px 0px #0000000D;
+	background: radial-gradient(66.18% 65.3% at 6.12% 18.49%, #FFF9EC 0%, #FFFFFF 100%);
+	border-radius: 20rpx;
+  }
+  
+  .activity-card .activity-title{
+	color: #A5814A;
+	font-weight: 600;
+	margin-bottom: 15rpx;
+  }
+  
+  .activity-card .card-item{
+	display: flex;
+	width: 100%;
+	flex-direction: row;
+	justify-content: space-between;
+	border: 7rpx solid rgba(255, 111, 5, 0.4); 
+	border-radius: 20rpx;
+	align-content: center;
+	align-items: center;
+	justify-items: center;
+  }
+  
+  .card-item .discount-view{
+	display: flex;
+	flex-direction: row;
+  }
+  
+  .card-item .integral-view{
+	display: flex;
+	flex-direction: column;
+  }
+  
+  .card-item .integral-view, .card-item .discount-view{
+	width: 20%;
+	height: 13vh;
+	justify-content: center;
+	align-content: center;
+	align-items: center;
+	border-top-right-radius: 15rpx;
+	border-bottom-right-radius: 15rpx;
+	border-right: 1px dashed #95A8CB;
+  }
+  
+  .card-item .discount-view .number,.card-item .integral-view .number{
+	color: #FF7B1A;
+	font-weight: 600;
+	font-size: 40rpx;
+  }
+  
+  .card-item .button-view{
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+  }
+  
+  .activity-card .title-view{
+	width: 40%;
+	color: #1B365D;
+	font-weight: 600;
+  }
+  
+  .activity-card .button-view{
+	width: 210rpx;
+	padding: 20rpx;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	height: 10vh;
+	border-top-left-radius: 15rpx;
+	border-bottom-left-radius: 15rpx;
+	border-left: 1px dashed #95A8CB;
+  }
+  
+  .activity-card .button-view .button-class{
+	border-radius: 20rpx;
+	background-color: wheat;
+  }
+  
+  .activity-card .button-view .remark{
+	display: flex;
+	width: 100%;
+	justify-content: center;
+	align-content: center;
+	align-items: center;
+	font-size: 25rpx;
+	margin-top: 15rpx;
+  }
+  
+  .activity-card .button-view .remark .time-view{
+	display: flex;
+	width: 120rpx;
+	justify-content: space-around;
+	margin-right: 10rpx;
+	color: #ffffff;
+  }
+  .activity-card .button-view .remark .time-view .time{
+	background-color: #95A8CB;
+	padding: 5rpx;
+  }

+ 38 - 13
pages/login/login.js

@@ -49,6 +49,26 @@ Page({
         flgTel: false
       })
     }
+
+    // 从好有分享过来的数据 好友互利共赢  shareType=1 cpid userid startdate enddate   
+    if (options.shareType) {
+      this.setData({
+        shareType: options.shareType,
+      })
+    }
+    // 来源公司id
+    if (options.cpIdFrom) {
+      this.setData({
+        cpIdFrom: options.cpIdFrom,
+      })
+    }
+    // 截止日期
+    if (options.shareEndDate) {
+      this.setData({
+        shareEndDate: options.shareEndDate,
+      })
+    }
+
   },
 
   /**
@@ -83,10 +103,10 @@ Page({
     // }else{
     //   url = 'https://www.dongkesoft.com/public/index/changjian/news_info/id/102.html'
     // }
-    if(e.currentTarget.dataset.type == 'user'){
-      url = config.knowledge_url +  '/agreement-index?agId=10002024-0718-0000-0000-000005c0a01e'
-    }else{
-      url = config.knowledge_url +  '/agreement-index?agId=10002024-0718-0000-0000-000005c145ff'
+    if (e.currentTarget.dataset.type == 'user') {
+      url = config.knowledge_url + '/agreement-index?agId=10002024-0718-0000-0000-000005c0a01e'
+    } else {
+      url = config.knowledge_url + '/agreement-index?agId=10002024-0718-0000-0000-000005c145ff'
     }
     let toUrl = '/pages/product/product'
     if (url) {
@@ -259,14 +279,14 @@ Page({
             // 处理操作链接
             let filters = menuList.filter(it => it.menuTags)
             if (filters && filters.length > 0) {
-                filters.forEach(t => {
-                    if (t.menuTags.value) {
-                        let val = JSON.parse(t.menuTags.value)
-                        if(val.guideUrl == 'knowledge-view' ){
-                            t.guideUrl = config.knowledge_url + '/' + val.guideUrl + '?appCode=CP-WXP&funId=' + t.funUuid
-                        }
-                    }
-                })
+              filters.forEach(t => {
+                if (t.menuTags.value) {
+                  let val = JSON.parse(t.menuTags.value)
+                  if (val.guideUrl == 'knowledge-view') {
+                    t.guideUrl = config.knowledge_url + '/' + val.guideUrl + '?appCode=CP-WXP&funId=' + t.funUuid
+                  }
+                }
+              })
             }
             app.globalData.menus = util.handleMenu(app.globalData.company.funPackage, menuList);
           }
@@ -346,8 +366,13 @@ Page({
           // }
 
         } else {
+          // 从好有分享过来的数据 好友互利共赢  shareType=1 cpid userid startdate enddate
+          let url = _this.data.shareType 
+          ? '/package-basic-data/pages/register/company-register/company-register?shareType' + _this.data.shareType + '&cpIdFrom=' + _this.data.cpIdFrom
+          + '&shareEndDate=' + _this.data.shareEndDate
+          : '/package-basic-data/pages/register/company-register/company-register'
           wx.navigateTo({
-            url: '/package-basic-data/pages/register/company-register/company-register',
+            url: url,
             events: {
               // 回调后
               refresh: function (data) {

+ 69 - 17
pages/welcome/welcome.js

@@ -59,6 +59,25 @@ Page({
             })
         }
 
+        // 从好有分享过来的数据 好友互利共赢  shareType=1 cpid userid startdate enddate   
+        if (options.shareType) {
+            this.setData({
+                shareType: options.shareType,
+            })
+        }
+        // 来源公司id
+        if (options.cpIdFrom) {
+            this.setData({
+                cpIdFrom: options.cpIdFrom,
+            })
+        }
+        // 截止日期
+        if (options.shareEndDate) {
+            this.setData({
+                shareEndDate: options.shareEndDate,
+            })
+        }
+
     },
 
     /**
@@ -160,9 +179,18 @@ Page({
                     //     url: '../../pages/company/company',
                     // })
                     // 调转选择公司
-                    wx.reLaunch({
-                        url: '../../pages/login/login',
-                    })
+                    if (this.data.shareType){
+                        wx.reLaunch({
+                            url: '../../pages/login/login?shareType=' 
+                            + this.data.shareType + '&cpIdFrom=' + this.data.cpIdFrom
+                            + '&shareEndDate=' + this.data.shareEndDate,
+                        })
+                    }else{
+                        wx.reLaunch({
+                            url: '../../pages/login/login',
+                        })
+                    }
+                   
                 }
                 else
                     if (data.company == undefined
@@ -170,9 +198,17 @@ Page({
                         || res.data.data.company.cpId == ''
                         || res.data.data.company.cpId == undefined) {
                         // 调转选择公司
-                        wx.reLaunch({
-                            url: '../../pages/login/login',
-                        })
+                        if (this.data.shareType){
+                            wx.reLaunch({
+                                url: '../../pages/login/login?shareType=' 
+                                + this.data.shareType + '&cpIdFrom=' + this.data.cpIdFrom
+                                + '&shareEndDate=' + this.data.shareEndDate,
+                            })
+                        }else{
+                            wx.reLaunch({
+                                url: '../../pages/login/login',
+                            })
+                        }
                     }
                     else {
                         // // 接口登录后获取数据
@@ -191,16 +227,32 @@ Page({
                 // 当前用户未注册 // 公司到期
                 // 调转选择公司
                 setTimeout(() => {
-                    wx.reLaunch({
-                        url: '../../pages/login/login',
-                    })
+                    if (this.data.shareType){
+                        wx.reLaunch({
+                            url: '../../pages/login/login?shareType=' 
+                            + this.data.shareType + '&cpIdFrom=' + this.data.cpIdFrom
+                            + '&shareEndDate=' + this.data.shareEndDate,
+                        })
+                    }else{
+                        wx.reLaunch({
+                            url: '../../pages/login/login',
+                        })
+                    }
                 }, 2000)
-            }else if(res.data.code == 1000){ // 令牌为空
+            } else if (res.data.code == 1000) { // 令牌为空
                 // 调转选择公司
                 setTimeout(() => {
-                    wx.reLaunch({
-                        url: '../../pages/login/login',
-                    })
+                    if (this.data.shareType){
+                        wx.reLaunch({
+                            url: '../../pages/login/login?shareType=' 
+                            + this.data.shareType + '&cpIdFrom=' + this.data.cpIdFrom
+                            + '&shareEndDate=' + this.data.shareEndDate,
+                        })
+                    }else{
+                        wx.reLaunch({
+                            url: '../../pages/login/login',
+                        })
+                    }
                 }, 2000)
             }
         })
@@ -320,16 +372,16 @@ Page({
                         if (this.data.scene) {
                             wx.reLaunch({
                                 url: '../../pages/home-page/home-page?scene=' + this.data.scene
-                                + '&loginType=' + this.data.loginType,
+                                    + '&loginType=' + this.data.loginType,
                             })
                         } else if (this.data.buy) {
                             wx.reLaunch({
                                 url: '../../pages/home-page/home-page?buy=' + this.data.buy
-                                + '&loginType=' + this.data.loginType,
+                                    + '&loginType=' + this.data.loginType,
                             })
                         } else {
                             wx.reLaunch({
-                                url: '../../pages/home-page/home-page?loginType=' + this.data.loginType ,
+                                url: '../../pages/home-page/home-page?loginType=' + this.data.loginType,
                             })
                         }
                     }
@@ -356,7 +408,7 @@ Page({
                             filters.forEach(t => {
                                 if (t.menuTags.value) {
                                     let val = JSON.parse(t.menuTags.value)
-                                    if(val.guideUrl == 'knowledge-view' ){
+                                    if (val.guideUrl == 'knowledge-view') {
                                         t.guideUrl = config.knowledge_url + '/' + val.guideUrl + '?appCode=CP-WXP&funId=' + t.funUuid
                                     }
                                 }