Browse Source

保存进度

xiaohaizhao 1 year ago
parent
commit
99136bafe0
6 changed files with 168 additions and 10 deletions
  1. 5 5
      App.vue
  2. 6 1
      pages.json
  3. 124 0
      team/team/InviteUser.vue
  4. 2 2
      team/team/getInvite.vue
  5. 1 1
      team/team/modules/users.vue
  6. 30 1
      utils/tool.js

+ 5 - 5
App.vue

@@ -1,7 +1,10 @@
 <script>
 export default {
 	onLaunch: function () {
-		require("./utils/tool").mount();
+		let { mount, setBar } = require("./utils/tool");
+		mount()
+		setBar()
+
 		/* uni.addInterceptor('navigateTo', {//监听跳转
 			success(e) {
 				console.log("监听页面跳转", e)
@@ -16,11 +19,8 @@ export default {
 
 	},
 	onHide: function () {
-		
+
 	},
-	globalData: {
-		qrCodePrefix: "https://www.jiushengboard.cc/"
-	}
 }
 </script>
 

+ 6 - 1
pages.json

@@ -88,12 +88,17 @@
 			"path": "team/index"
 		}, {
 			"path": "team/getInvite"
+		}, {
+			"path": "team/InviteUser",
+			"style": {
+				"navigationStyle": "custom"
+			}
 		}]
 	}],
 	"preloadRule": {
 		"pages/index/index": {
 			"network": "all",
-			"packages": ["packageCase", "packageA", "store", "cloud"]
+			"packages": ["packageCase", "packageA", "store", "cloud", "team"]
 		}
 	},
 	"globalStyle": {

+ 124 - 0
team/team/InviteUser.vue

@@ -0,0 +1,124 @@
+<template>
+    <My_listbox ref="List" :pullDown="false" boxBackground="linear-gradient( 225deg, #F7CA9D 0%, #FF5757 100%)">
+        <view class="head" :style="{ height: tovw(CustomBar) }">
+            <view class="custom" :style="{ height: tovw(Custom.height), top: tovw(Custom.top - 3) }">
+                邀请人员
+                <view class="back" :style="{ lineHeight: tovw(Custom.height) }" @click="onBack">
+                    <text class=" iconfont icon-a-wodetiaozhuan" />
+                </view>
+            </view>
+        </view>
+
+
+        <view class="painter-box" v-if="userMsg.userid" style="">
+            <view>
+                <l-painter ref="painter" css="position: relative;width: 280px; height: 426px">
+                    <l-painter-image
+                        src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405151715752754485B32052a86.webp"
+                        css="width: 280px; height: 426px;position: absolute;" />
+
+                    <l-painter-image
+                        :src="userMsg.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
+                        css="width: 56px; height:56px;border-radius: 50%;position: absolute;top:20px;left:20px;z-index:2;"
+                        object-fit="fill" />
+                    <l-painter-text :text="name"
+                        css="width:180px;line-height:24px;height:24px;position: absolute;left:86px;top:21px;z-index:2;font-family: Source Han Sans SC, Source Han Sans SC;font-weight: 500;font-size: 16px;color: #333333;  overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" />
+
+                    <l-painter-text :text="userMsg.areaname"
+                        css="width:180px;line-height:20px;height:20px;position: absolute;left:86px;top:55px;z-index:2;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-family: Source Han Sans SC, Source Han Sans SC;font-size: 14px;color: #666666;" />
+
+                    <l-painter-text text="扫码登记人员信息"
+                        css="width:96px;line-height:17px;position: absolute;left:50%;bottom:269px;z-index:2;margin-left:-48px;font-size: 12px;color: #666666;font-family: PingFang SC, PingFang SC;" />
+                    <l-painter-qrcode :text="qrCode + 'teamInvite?id=' + userMsg.sys_enterpriseid"
+                        css="width: 200px; height: 200px;position: absolute;left:50%;bottom:55px;z-index:2;margin-left:-100px;" />
+                </l-painter>
+            </view>
+        </view>
+    </My_listbox>
+</template>
+
+<script>
+import lPainter from "../../uni_modules/lime-painter/components/l-painter/l-painter.vue"
+import lPainterView from "../../uni_modules/lime-painter/components/l-painter-view/l-painter-view.vue"
+import lPainterText from "../../uni_modules/lime-painter/components/l-painter-text/l-painter-text.vue"
+import lPainterImage from "../../uni_modules/lime-painter/components/l-painter-image/l-painter-image.vue"
+import lPainterQrcode from "../../uni_modules/lime-painter/components/l-painter-qrcode/l-painter-qrcode.vue"
+export default {
+    components: { lPainter, lPainterView, lPainterText, lPainterImage, lPainterQrcode },
+    data() {
+        return {
+            userMsg: {
+                userid: 0
+            },
+            qrCode: this.qrCodePrefix,
+            name: ""
+        }
+    },
+    onLoad() {
+        this.getUserMsg()
+    },
+    methods: {
+        getUserMsg() {
+            this.$Http.basic({
+                "id": 20240510104102,
+                "content": {},
+            }).then(res => {
+                console.log("获取个人信息", res)
+                if (this.cutoff(res.msg)) return;
+                this.userMsg = res.data;
+                this.name = res.data.enterprise_hr.name ? res.data.enterprise_hr.name + ',邀请您加入' : '邀请您加入'
+            })
+        },
+        onBack() {
+            uni.navigateBack();
+        },
+        getSheraDate() {
+            return {
+                title: this.name, // 标题
+                path: "/team/team/getInvite?id=" + this.userMsg.sys_enterpriseid, // 分享路径
+                imageUrl: ""// 分享图
+            };
+        }
+    },
+    onShareAppMessage(res) {
+        return this.getSheraDate()
+    },
+    onShareTimeline() {
+        return this.getSheraDate()
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.head {
+    position: relative;
+    width: 100vw;
+
+    .custom {
+        position: absolute;
+        width: 100vw;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        font-family: PingFang SC, PingFang SC;
+        font-weight: 500;
+        font-size: 17px;
+        color: #FFFFFF;
+
+        .back {
+            position: absolute;
+            padding: 0 10px;
+            left: 0;
+            color: #fff;
+            font-size: 12px;
+            transform: rotateY(180deg);
+        }
+    }
+}
+
+.painter-box {
+    display: flex;
+    justify-content: center;
+    margin-top: 25px;
+}
+</style>

+ 2 - 2
team/team/getInvite.vue

@@ -1,6 +1,5 @@
 <template>
     <view>
-
         <my_form ref="form" :form="form" @isUncomplete="isUncomplete" @isShowAll="isShowAll" requiredFieldOnly>
             <template v-if="isShow" slot="head">
                 <view class="headportrait" hover-class="navigator-hover">
@@ -41,7 +40,7 @@
 export default {
     data() {
         return {
-            sys_enterpriseid: 8691,
+            sys_enterpriseid: 0,
             form: [],
             attachmentids: [],
             uncomplete: true,
@@ -54,6 +53,7 @@ export default {
     },
     onLoad(options) {
         console.log("被邀请加入团队", options)
+        this.sys_enterpriseid = options.id;
         const systemInitIsComplete = this.$Http.systemInitIsComplete;
         if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
             this.$Http.HomePageStartRendering = render(this)

+ 1 - 1
team/team/modules/users.vue

@@ -21,7 +21,7 @@
             <navigator class="insert" url="">
                 新增人员
             </navigator>
-            <navigator class="invite" url="">
+            <navigator class="invite" url="/team/team/InviteUser">
                 邀请人员
             </navigator>
         </view>

+ 30 - 1
utils/tool.js

@@ -1,6 +1,34 @@
 import Vue from 'vue'
 
+function setBar() {
+    uni.getSystemInfo({
+        success: function (e) {
+            // #ifndef MP
+            Vue.prototype.usePort = 'h5';
+            Vue.prototype.StatusBar = e.statusBarHeight;
+            if (e.platform == 'android') {
+                Vue.prototype.CustomBar = e.statusBarHeight + 50;
+            } else {
+                Vue.prototype.CustomBar = e.statusBarHeight + 45;
+            };
+            // #endif
+            // #ifdef MP-WEIXIN
+            Vue.prototype.usePort = 'wechat';
+            Vue.prototype.StatusBar = e.statusBarHeight;
+            let custom = wx.getMenuButtonBoundingClientRect();
+            Vue.prototype.Custom = custom;
+            Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
+            // #endif       
+            // #ifdef MP-ALIPAY
+            Vue.prototype.StatusBar = e.statusBarHeight;
+            Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
+            // #endif
+        }
+    })
+}
+
 function mount() {
+    Vue.prototype.qrCodePrefix = "https://www.jiushengboard.cc/";
     Vue.prototype.getLocation = (isReverseGeocoder = false) => {
         return new Promise((resolve, reject) => {
             let that = this;
@@ -211,5 +239,6 @@ function mount() {
 }
 
 module.exports = {
-    mount
+    mount,
+    setBar
 }