liuyao 1 год назад
Родитель
Сommit
d294ccd92f

+ 5 - 1
components/dkbase/dk-navbar/dk-navbar.js

@@ -36,7 +36,11 @@ Component({
       customStyle:{
         type: String,
         value: ''
-      }
+      },
+      leftButtonHide:{
+        type: Boolean,
+        value: false
+      },
     },
 
     /**

+ 1 - 1
components/dkbase/dk-navbar/dk-navbar.wxml

@@ -1,6 +1,6 @@
 <!--components/dkbase/dk-navbar/dk-navbar.wxml-->
 <van-nav-bar z-index="10000" bind:click-left="clickLeft" fixed="{{fixed}}" custom-style="{{customStyle}}" border="{{false}}" class="van-nav-bar">
-  <van-icon custom-style="position: absolute;font-weight:bold" size="20" name="arrow-left" color="{{ fixed ? '#ffffff' : '#000000' }}" slot="left" />
+  <van-icon wx:if="{{!leftButtonHide}}" custom-style="position: absolute;font-weight:bold" size="20" name="arrow-left" color="{{ fixed ? '#ffffff' : '#000000' }}" slot="left" />
   <view slot="title">
     <view class="title">
       <text style="color: {{titleFontColor}};font-size: 14px;">{{navbarTitle}}</text>

+ 36 - 2
package-basic-data/pages/share-power/share-power.js

@@ -9,7 +9,8 @@ Page({
      */
     data: {
       needHelpUserNumber: 5,
-      powerModelShowFlag: true
+      powerModelShowFlag: true,
+      menuButtonTop: 48,
     },
 
     /**
@@ -31,14 +32,47 @@ Page({
      */
     onShow() {
       this.showPowerModel()
+      this.getSystemButtonLocation()
     },
-
+    getSystemButtonLocation(){
+      const res = wx.getMenuButtonBoundingClientRect()
+      this.setData({
+        menuButtonTop: res.top
+      })
+    },
+    /**
+    * @desc : 打开助力弹窗
+    * @author : 刘尧
+    * @date : 2024/7/29 09:26
+    */
     showPowerModel() {
       this.setData({
         powerModelShowFlag: true
       })
     },
     /**
+    * @desc : 关闭小程序
+    * @author : 刘尧
+    * @date : 2024/7/29 09:49
+    */
+    closeMiniProgram() {
+      wx.exitMiniProgram({
+        success: function () {
+          console.log('关闭小程序触发');
+        }	
+      })
+    },
+    /**
+    * @desc : 打开助力弹窗
+    * @author : 刘尧
+    * @date : 2024/7/29 09:26
+    */
+    closePowerModel() {
+      this.setData({
+        powerModelShowFlag: false
+      })
+    },
+    /**
      * 生命周期函数--监听页面隐藏
      */
     onHide() {

+ 18 - 6
package-basic-data/pages/share-power/share-power.wxml

@@ -4,8 +4,11 @@
     <image fit="fill" src="{{imageUrl+'/powerPage_backgorund.png'}}"></image>
   </view>
   <van-sticky scroll-top="0" id="sticky">
-    <dk-navbar titleFontColor="#000000" operateShow="{{false}}" fixed="{{true}}" navbarTitle="助力抢劵"
-      customStyle="background-color:transparent;" titleFontColor="#ffffff" />
+      <view style="margin-top: {{menuButtonTop}}px;padding: 15rpx;">
+          <van-icon class="back-button-view" wx:if="{{!leftButtonHide}}"  size="20" name="arrow-left" color="#ffffff" slot="left" bind:tap="closeMiniProgram" />
+      </view>
+      <dk-navbar titleFontColor="#000000" leftButtonHide="{{true}}" operateShow="{{false}}" fixed="{{true}}"
+        navbarTitle="助力抢劵" customStyle="background-color:transparent;" titleFontColor="#ffffff" />
   </van-sticky>
   <view class="content">
     <view class="content-title">
@@ -38,13 +41,21 @@
         </view>
       </view>
       <view class="button-view">
-        <van-button size="normal" color="#FF7B1A" custom-style="width:100%;margin-top:30rpx;border-radio:50rpx;" >帮我点一下</van-button>
-        <van-button size="normal" color="#FF7B1A1A;" custom-style="width:100%;margin-top:30rpx;margin-bottom:50rpx;border-radio:50rpx;">了解软件</van-button>
+        <van-button size="normal" color="#FF7B1A" custom-style="width:100%;margin-top:30rpx;border-radio:50rpx;">帮我点一下
+        </van-button>
+        <van-button size="normal" color="#FF7B1A1A;"
+          custom-style="width:100%;margin-top:30rpx;margin-bottom:50rpx;border-radio:50rpx;">了解软件</van-button>
       </view>
     </view>
+    <van-overlay show="{{ powerModelShowFlag }}" z-index="100" bind:click="onClickHide" />
     <view wx:if="{{powerModelShowFlag}}" class="power-model">
       <view class="model-view">
-        <view class="title">助力好友抢券</view>
+        <view class="close-view" bind:tap="closePowerModel">
+          <view class="close-button">
+            <van-icon name="cross" />
+          </view>
+        </view>
+        <view class="title stroke">助力好友抢券</view>
         <view class="title-view">
           <view class="user-avatar">
             <image fit="fill" src="{{imageUrl+'/user_icon.png'}}"></image>
@@ -58,7 +69,8 @@
           <view class="font">优惠劵</view>
         </view>
         <view class="button-view">
-          <van-button size="normal" color="#FF7B1A" custom-style="width:100%;margin-top:30rpx;border-radio:50rpx;" >点击帮助ta助力</van-button>
+          <van-button size="normal" color="#FF7B1A" custom-style="width:100%;margin-top:30rpx;border-radio:50rpx;">
+            点击帮助ta助力</van-button>
         </view>
       </view>
     </view>

+ 34 - 2
package-basic-data/pages/share-power/share-power.wxss

@@ -11,11 +11,16 @@
   z-index: 10;
 }
 
+.back-button-view{
+  position: absolute;
+  z-index: 11000;
+}
+
 .content{
   display: flex;
   position: relative;
   flex-direction: column;
-  margin-top: 170rpx;
+  margin-top: 50rpx;
   padding: 0 50rpx;
   z-index: 100;
 }
@@ -117,6 +122,7 @@
 
 .power-model{
   position: fixed;
+  z-index: 500;
   top: 30%;
   left: 0;
   right: 0;
@@ -141,7 +147,14 @@
 
 .power-model .model-view .title{
   margin-top: 65rpx;
-  font-size: 75rpx;
+  font-size: 90rpx;
+  font-weight: 600;
+  color: #f8f8f8;
+  text-shadow:3px 3px 7px #0047FF;
+}
+
+.stroke {
+	-webkit-text-stroke: 2px #0047FF;
 }
 
 .power-model .title-view{
@@ -206,4 +219,23 @@
 
 .power-model .model-view .button-view{
   width: 100%;
+}
+
+.close-view{
+  width: 100%;
+  position: relative;
+}
+
+.close-button{
+  position: absolute;
+  right: 5px;
+  width: 20px;
+  height: 20px;
+  padding: 2rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #ffffff;
+  background-color: #8A8A8A;
+  border-radius: 50%;
 }

+ 44 - 5
package-basic-data/pages/share/share.js

@@ -9,9 +9,9 @@ Page({
    */
   data: {
     routeObjName: 'share',
-    staffName: app.globalData.user.staffName,
-    staffPhone: app.globalData.user.staffPhone,
-    companyName: app.globalData.company.cpName,
+    staffName: '',
+    staffPhone: '',
+    companyName: '',
     versionName: '',
     gradeCode: null,
     integralTacticItem: {}
@@ -28,12 +28,27 @@ Page({
   },
 
   loadInit() {
+    wx.hideShareMenu({})
     // 版本
     this.setData({
+      staffName: app.globalData.user.staffName,
+      staffPhone: app.globalData.user.staffPhone,
+      companyName: app.globalData.company.cpName,
       versionName: this.data.freeVersionFlag ? mixins.$t('standardVersion') : mixins.$t('professionalVersion')
     })
   },
 
+  /**
+    * @desc : 获取用户转发信息
+    * @author : 刘尧
+    * @date : 2024/7/29 11:37
+   */
+  getShareData(options){
+
+    if(options.scene == 1044){
+      return
+    }
+  },
 
   /**
   * @desc : 策略
@@ -131,7 +146,31 @@ Page({
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage() {
-
+  onShareAppMessage(e) {
+    const url = this.data.imageUrl + 'background.png'
+    if(e.target.dataset.detail === "toShare"){
+      return {
+        title: '分享好友获取云币',
+        desc: '分享不停歇',
+        path: '/pages/welcome/welcome',
+        imageUrl: url
+     }
+    }
+    if(e.target.dataset.detail === "toRegister"){
+      return {
+        title: '邀请好友,互利共赢',
+        desc: '邀请注册拿云币',
+        path: '/pages/welcome/welcome',
+        imageUrl: url
+     }
+    }
+    if(e.target.dataset.detail === "toPower"){
+      return {
+        title: '分享好友助力抢券',
+        desc: '助力拿福利',
+        path: '/package-basic-data/pages/share-power/share-power',
+        imageUrl: url
+     }
+    }
   }
 })

+ 5 - 5
package-basic-data/pages/share/share.wxml

@@ -47,7 +47,7 @@
         <view>分享好友,即得云币</view>
       </view>
       <view class="button-view">
-        <van-button customStyle="background-color: #EBC07F;border-radius:50rpx;color:#ffffff;">
+        <van-button customStyle="background-color: #EBC07F;border-radius:50rpx;color:#ffffff;" dataset="toShare" open-type='share'>
           <view
             style="display: flex;justify-content: center;align-content: center;justify-items: center;align-items: center;font-size: 25rpx;">
             立即分享
@@ -74,7 +74,7 @@
         <view>好友助力,得优惠券,购买更便宜</view>
       </view>
       <view class="button-view">
-        <van-button customStyle="background-color: #EBC07F;border-radius:50rpx;color:#ffffff;" data-name="toPower" bind:tap="open">
+        <van-button customStyle="background-color: #EBC07F;border-radius:50rpx;color:#ffffff;" dataset="toPower" open-type='share'>
           <view
             style="display: flex;justify-content: center;align-content: center;justify-items: center;align-items: center;font-size: 25rpx;">
             立即助力
@@ -84,7 +84,7 @@
             </view>
           </view>
         </van-button>
-        <view class="remark">
+        <view class="remark" wx:if="{{false}}">
           <view class="time-view">
             <view class="time">07</view>
             <view class="time">59</view>
@@ -108,7 +108,7 @@
         <view>邀请好友使用,互利共赢,一起得云币!</view>
       </view>
       <view class="button-view">
-        <van-button customStyle="background-color: #EBC07F;border-radius:50rpx;color:#ffffff;">
+        <van-button customStyle="background-color: #EBC07F;border-radius:50rpx;color:#ffffff;" dataset="toRegister" open-type='share'>
           <view style="display: flex;justify-content: center;align-content: center;justify-items: center;align-items: center;font-size: 25rpx;">
             立即邀请
             <view
@@ -117,7 +117,7 @@
             </view>
           </view>
         </van-button>
-        <view class="remark">
+        <view class="remark" wx:if="{{false}}">
           <view class="time-view">
             <view class="time">07</view>
             <view class="time">59</view>

+ 6 - 3
package-basic-data/pages/sign-share-detail/coupon-detail.js

@@ -15,9 +15,9 @@ Page({
   mixins: [mixins],
   data: {
     routeObjName: 'share',
-    staffName: app.globalData.user.staffName,
-    staffPhone: app.globalData.user.staffPhone,
-    companyName: app.globalData.company.cpName,
+    staffName: '',
+    staffPhone: '',
+    companyName: '',
     versionName: '',
     active: 0,
     tagList: [{ title: '使用', code: '使用' }, { title: '未使用', code: '未使用' }, { title: '失效', code: '失效' }],
@@ -53,6 +53,9 @@ Page({
    */
   onLoad(options) {
     this.setData({
+      staffName: app.globalData.user.staffName,
+      staffPhone: app.globalData.user.staffPhone,
+      companyName: app.globalData.company.cpName,
       versionName: this.data.freeVersionFlag ? mixins.$t('standardVersion') : mixins.$t('professionalVersion')
     })
     // 积分

+ 6 - 3
package-basic-data/pages/sign-share-detail/integral-detail.js

@@ -15,9 +15,9 @@ Page({
   mixins: [mixins],
   data: {
     routeObjName: 'share',
-    staffName: app.globalData.user.staffName,
-    staffPhone: app.globalData.user.staffPhone,
-    companyName: app.globalData.company.cpName,
+    staffName: '',
+    staffPhone: '',
+    companyName: '',
     versionName: '',
     active: 0,
     tagList: [{ title: '收入', code: '收入' }, { title: '使用', code: '使用' }],
@@ -53,6 +53,9 @@ Page({
    */
   onLoad(options) {
     this.setData({
+      staffName: app.globalData.user.staffName,
+      staffPhone: app.globalData.user.staffPhone,
+      companyName: app.globalData.company.cpName,
       versionName: this.data.freeVersionFlag ? mixins.$t('standardVersion') : mixins.$t('professionalVersion')
     })
     // 积分