codeMan 1 год назад
Родитель
Сommit
091ba2ce54

+ 457 - 3
cloud/businessCard/edit.vue

@@ -1,13 +1,467 @@
 <template>
-    <view>
-        编辑名片
+    <view style="background: #ffffff;">
+        <my_form ref="form" :form="form" @isUncomplete="isUncomplete" @onUploading="onUploading" @isShowAll="isShowAll">
+            <template v-if="isShow" slot="head">
+                <view class="headportrait" hover-class="navigator-hover">
+                    <view class="content">
+                        <My_upload maxCount="1" ref="upload" @onLoading="imageOnLoading" @uploadCallback="uploadCallback"></My_upload>
+                        <button class="avatar-box" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
+                        </button>
+                        <view style="display: flex;align-items: center;">
+                            <view style="border-radius: 50%;width: 56px;height: 56px;border:2px solid #ffffff">
+                                <u--image :width="56" :height="56" shape="circle" :src="headportrait">
+                                    <template v-slot:loading>
+                                        <u-loading-icon />
+                                    </template>
+                                </u--image>
+                            </view>
+                            
+                            <view :style="'width:'+tovw(255)" />
+                            <view class="iconfont icon-a-wodetiaozhuan" />
+                        </view>
+                    </view>
+                </view>
+            </template>
+        </my_form>
+
+        <view style="height: 70px;" />
+        <view class="footer">
+            <view class="add" :class="uncomplete ? 'forbidden' : ''" hover-class="navigator-hover"
+                @click="uncomplete || loading ? '' : submit()">
+                <u-loading-icon v-if="loading" />
+                <block v-else>
+                    保存名片
+                </block>
+            </view>
+        </view>
     </view>
 </template>
 
 <script>
+import {formattedFiles} from '../../utils/settleFiles.js'
 export default {
+    data() {
+        return {
+            sys_enterpriseid: 0,
+            form: [],
+            attachmentids: [],
+            uncomplete: true,
+            onUpload:false,
+            copyUncomplete: false,
+            loading: false,
+            headportrait: "https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg",
+            userid: 0,
+            isShow: true,
+            isSubmit:false,
+        }
+    },
+    onLoad(options) {
+        this.userid = options.id
+        this.init()
+        uni.setNavigationBarTitle({
+            title: '修改名片'
+        });
+    },
+    onUnload() {
+        if (!this.isSubmit) this.$refs.form.deleteFiles()
+    },
+    methods: {
+        onChooseAvatar (e) {
+            let ext = e.detail.avatarUrl.substr(e.detail.avatarUrl.lastIndexOf('.')+1)
+            let name = `${Date.now()}.${ext}`
+            let temp = {
+                name:name,
+                type:'image',
+                url:e.detail.avatarUrl
+            }
+            this.afterRead({file:[temp]})
+        },
+
+        afterRead({ file }) {
+            const that = this;
+            file.forEach(v => {
+                // #ifdef H5
+                this.getArrayBuffer(v).then(data => that.handleUploadFile(this.requestType(v), data))
+                // #endif
+                // #ifndef H5
+                uni.getFileSystemManager().readFile({
+                    filePath: v.url,
+                    success: data => that.handleUploadFile(this.requestType(v), data.data),
+                    fail: console.error
+                })
+                // #endif
+            });
+        },
+        /* 请求类型 */
+        requestType(file) {
+            // #ifdef H5
+            var ext = file.name.substr(file.name.lastIndexOf(".") + 1);
+            // #endif
+            // #ifndef H5
+            var ext = file.type.split("/")[1] || file.url.substr(file.url.lastIndexOf(".") + 1) || file.name.substr(file.name.lastIndexOf(".") + 1);
+            // #endif
+            //文件名称
+            return {
+                "classname": "system.attachment.huawei.OBS",
+                "method": "getFileName",
+                "content": {
+                    "filename": `${Date.now()}.${ext}`,
+                    "filetype": ext,
+                    "parentid": uni.getStorageSync('siteP').appfolderid
+                }
+            }
+        },
+        handleUploadFile(file, data) {
+            this.loading = true;
+            this.$Http.basic(file).then(res => {
+                if (res.msg == "成功") {
+                    this.uploadFile(res.data, data)
+                } else {
+                    uni.showToast({
+                        title: `${data.filename}.${data.serialfilename}`,
+                        icon: "none"
+                    })
+                }
+            })
+        },
+        getArrayBuffer(file) {
+            return new Promise((resolve, reject) => {
+                let xhr = new XMLHttpRequest()
+                xhr.open('GET', file.url, true)
+                xhr.responseType = 'blob'
+                xhr.onload = function () {
+                    if (this.status == 200) {
+                        let myBlob = this.response
+                        let files = new window.File([myBlob], file.name, { type: file.url.substr(file.url.lastIndexOf(".") + 1) }) // myBlob.type 自定义文件名
+                        const reader = new FileReader();
+                        reader.readAsArrayBuffer(files);
+                        reader.onload = () => resolve(reader.result);
+                        reader.onerror = (error) => reject(error);
+                    } else {
+                        reject(false)
+                    }
+                }
+                xhr.send()
+            })
+        },
+        /* 上传成功反馈 */
+        uploadFile(res, data) {
+            var that = this;
+            that.loading = true;
+            uni.request({
+                url: res.uploadurl,
+                method: "PUT",
+                data,
+                header: {
+                    'content-type': 'application/octet-stream'
+                },
+                success() {
+                    that.$Http.basic({
+                        "classname": "system.attachment.huawei.OBS",
+                        "method": "uploadSuccess",
+                        "content": {
+                            "serialfilename": res.serialfilename
+                        }
+                    }).then(s => {
+                        console.log("文件上传反馈", s)
+                        that.loading = false;
+                        if (!that.cutoff(s.msg)) that.uploadCallback(s.data.attachmentids, "sys_users", that.userid)
+                    }).catch(err => {
+                        that.loading = false;
+                        console.error(err)
+                    })
+                },
+                fail(err) {
+                    that.loading = false;
+                    console.log(err)
+                }
+            })
+        },
+
+        
+        init() {
+            let form = [{
+                key: "name",
+                type: "text",
+                label: "姓名",
+                isMust: true,//是否必填
+                value: "",
+            }, {
+                key: "phonenumber",
+                type: "text",
+                label: "手机号",
+                isMust: true,//是否必填
+                value: "",
+                placeholder: "请输入手机号",
+                inputmode: 'number',
+                verify: [this.getReg("phonenumber")]
+            }, {
+                key: "email",
+                type: "text",
+                label: "邮箱",
+                isMust: false,//是否必填
+                value: "",
+                verify: [this.getReg("email")]
+            }, {
+                key: "address",
+                type: "text",
+                label: "地址",
+                isMust: false,//是否必填
+                value: "",
+            },{
+                key: "remarks",
+                type: "textarea",
+                label: "自我介紹",
+                isMust: true,//是否必填
+                value: '',
+            },{
+                key: "attachmentids",
+                type: "upload",
+                label: "图片",
+                placeholder: "可上传多个图片",
+                accept: "image*/",
+                ownertable: "temporary",
+                ownerid: 999,
+                usetype: 'default',
+                allowUpload: true,
+                allowDelete: true,
+                value: [],
+                marginTop: 10
+            }];
+            this.$Http.basic({
+                "id": 20240514161502,
+                "content": {
+                    userid:this.userid
+                },
+            }).then(res => {
+                console.log("获取个人信息", res)
+                // if (this.cutoff(res.msg)) return;
+                if (res.msg == '成功') {
+                    this.headportraits = res.data.attinfos;
+                    this.headportrait = this.headportraits.find(v => v.usetype == "headportrait") && this.headportraits.find(v => v.usetype == "headportrait").url || this.headportrait;
+                    form = form.map(v => {
+                        if (v.key == 'attachmentids') {
+                            v.value = formattedFiles(res.data.attinfos.filter(item => item.usetype != 'headportrait'))
+                        } else {
+                            v.value = res.data[v.key] || v.value
+                        }
+                        return v
+                    })
+
+                }
+                this.form = form;
+            })
+
+        },
+        onUploading(ing) {
+            this.onUpload = ing;
+        },
+        isUncomplete(uncomplete) {
+            this.uncomplete = uncomplete;
+        },
+        submit() {
+            this.loading = true;
+            let that = this;
+            this.$refs.form.submit().then(data => {
+                this.$Http.basic({
+                    "id": 20240511151602,
+                    "content": {
+                        ...data
+                    }
+                }).then(async res => {
+                    this.loading = false;
+                    console.log("修改信息", res)
+                    if (this.cutoff(res.msg)) return;
+                    if (data.files.temporarys.length) {
+                        this.onUpload = true;
+                        await this.$Http.basic({
+                            "classname": "system.attachment.Attachment",
+                            "method": "createFileLink",
+                            "content": {
+                                ownertable: 'sys_users',
+                                ownerid: res.data.userid,
+                                usetype: 'default',
+                                attachmentids: data.files.temporarys
+                            }
+                        }).then(async s => {
+                            this.isSubmit = true;
+                            this.onUpload = false;
+                            console.log("绑定附加", s)
+                            if (this.cutoff(s.msg)) return;
+                        })
+                    };
+                    this.loading = true;
+
+                    if (data.files.linksids.length) {
+                        await this.$Http.basic({
+                            "classname": "system.attachment.Attachment",
+                            "method": "deleteFileLink",
+                            "content": {
+                                linksids: data.files.linksids
+                            }
+                        })
+                    }
+
+                    if (this.attachmentids.length) {
+                        this.uploadCallback(this.attachmentids, "sys_users", this.userid).then(s => {
+                            if (s) getUserMsg()
+                        });
+                        if (this.headportraits.length) this.$Http.basic({
+                            "classname": "system.attachment.Attachment",
+                            "method": "deleteFileLink",
+                            "content": {
+                                linksids: this.headportraits.map(v => v.linksid)
+                            }
+                        })
+
+                    } else {
+                        this.$Http.editUser(res.data.userid)
+                        uni.navigateBack()
+
+                    }
+                })
+            })
+        },
+        isShowAll(e) {
+            this.isShow = !e;
+        },
+        imageOnLoading(e) {
+            if (e) {
+                this.copyUncomplete = this.uncomplete;
+                this.uncomplete = true;
+            } else {
+                this.uncomplete = this.copyUncomplete;
+            }
+        },
+        uploadCallback(attachmentids, ownertable = 'temporary', ownerid = '99999999') {
+            if (ownertable == 'temporary') this.imageOnLoading(true)
+            return new Promise((resolve, reject) => {
+                this.$Http.basic({
+                    "classname": "system.attachment.Attachment",
+                    "method": "createFileLink",
+                    "content": {
+                        "usetype": "headportrait",
+                        ownertable,
+                        ownerid,
+                        attachmentids
+                    },
+                }).then(res => {
+                    console.log('绑定附件', res)
+                    if (ownertable == 'temporary') this.imageOnLoading(false)
+                    if (this.cutoff(res.msg)) return resolve(false);
+                    this.headportrait = res.data[0].url;
+                    resolve(true)
+                    if (ownertable == 'temporary' && this.linksid) this.$Http.basic({
+                        "classname": "system.attachment.Attachment",
+                        "method": "deleteFileLink",
+                        "content": {
+                            linksids: [this.linksid]
+                        }
+                    }).then(res => {
+                        console.log("处理删除附件", res)
+                        if (this.cutoff(res.msg)) return;
+                    });
+                    if (ownertable == 'temporary') {
+                        this.attachmentids = attachmentids;
+                        console.log(res.data[0],'结果');
+                        this.headportrait = res.data[0].url;
+                        this.linksid = res.data[0].linksid;
+                    }
+                })
+            })
 
+        },
+    },
 }
 </script>
 
-<style></style>
+<style lang="scss" scoped>
+.headportrait {
+    width: 100vw;
+    padding-left: 10px;
+    background: #fff;
+    .content {
+        display: flex;
+        align-items: center;
+        border-bottom: 1px solid #DDDDDD;
+        box-sizing: border-box;
+        height: 76px;
+        padding: 10px;
+        padding-left: 0;
+        position: relative;
+        .avatar-box {
+            width: 100%;
+            height: 76px;
+            position: absolute;
+            left: 0;
+            top: 0;
+            opacity: 0;
+        }
+        .label {
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 14px;
+            color: #666666;
+            width: 110px;
+        }
+
+    }
+}
+
+.upload-type {
+    display: flex;
+    flex-direction: column;
+    font-family: Source Han Sans SC, Source Han Sans SC;
+    font-weight: 400;
+    font-size: 16px;
+    color: #333333;
+    .type-line {
+        padding: 12px 0;
+        display: flex;
+        justify-content: space-evenly;
+        align-items: center;
+        border-bottom: 1px #DDDDDD solid;
+        .line-1 {
+            display: flex;
+            align-items: center;
+            align-content: center;
+            text {
+                margin-right: 10px;
+            }
+            image {
+                width: 24px !important;
+                height: 24px !important;
+            }
+        }
+        text {}
+        
+    }
+}
+
+.footer {
+    position: fixed;
+    bottom: 0;
+    width: 100vw;
+    height: 65px;
+    background: #FFFFFF;
+    box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
+    box-sizing: border-box;
+    padding: 5px 10px;
+
+    .add {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 100%;
+        height: 45px;
+        background: #C30D23;
+        border-radius: 5px;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #FFFFFF;
+    }
+
+    .forbidden {
+        opacity: .6;
+    }
+}
+</style>

+ 25 - 22
cloud/businessCard/index.vue

@@ -21,7 +21,7 @@
                         <view class="redline"></view>
                     </view>
                     <view class="right">
-                        <image :src="userInfo.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'" mode="widthFix">
+                        <image :src="userInfo.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'" mode="aspectFill">
                         </image>
                     </view>
                 </view>
@@ -79,33 +79,28 @@
             <text class="title-max">简介</text>
             <view class="tag-box">
                 <text class="title-min">印象标签</text>
-                <view class="tag-list">
-                    <view class="tag">标签1</view>
-                    <view class="tag">标签1</view>
-                    <view class="tag">标签1</view>
-                    <view class="tag">标签1</view>
+                <view class="tag-list" v-if="userInfo.tag.length">
+                    <view class="tag" v-for="(item,index) in userInfo.tag" :key="index">{{ item }}</view>
                 </view>
+                <text v-else style="font-weight: 500;font-size: 14px;color: #666666;">暂无</text>
             </view>
             <view class="descript-box">
                 <text class="title-min">自我介绍</text>
-                <text class="descript">自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍自我介绍</text>
+                <text class="descript">{{ userInfo.remarks || '暂无' }}</text>
             </view>
             <view class="image-box">
                 <text class="title-min">照片墙</text>
-                <view class="image">
-                    <u--image width="100%" :lazy-load="true" src="https://ccyosg20230413.obs.cn-east-3.myhuaweicloud.com:443/202405131715570665544B7eaa08cb.png" radius="5"></u--image>
-                </view>
-                <view class="image">
-                    <u--image width="100%" :lazy-load="true" src="https://ccyosg20230413.obs.cn-east-3.myhuaweicloud.com:443/202405131715570665544B7eaa08cb.png" radius="5"></u--image>
-                </view>
-                <view class="image">
-                    <u--image width="100%" :lazy-load="true" src="https://ccyosg20230413.obs.cn-east-3.myhuaweicloud.com:443/202405131715570665544B7eaa08cb.png" radius="5"></u--image>
-                </view>
+                <block v-if="userInfo.images.length">
+                    <view class="image" v-for="item in userInfo.images" :key="item.attachmentid">
+                        <u--image width="100%" :lazy-load="true" :src="item.url" radius="5"></u--image>
+                    </view>
+                </block>
+                <text v-else style="font-weight: 500;font-size: 14px;color: #666666;">暂无</text>
             </view>
         </view>
 
         <view class="footer">
-            <navigator class="but" url="#">
+            <navigator class="but" :url="'/cloud/businessCard/edit?id='+userid" @click="aaa">
                 <text>修改名片</text>
             </navigator>
         </view>
@@ -134,12 +129,20 @@ export default {
     components:{contact},
     data () {
         return {
-            userInfo:{},
+            userInfo:{tag:[],images:[]},
             userid:uni.getStorageSync('userMsg').userid,
             shareShow:false
         }
     },
+    computed: {
+    },
     methods: {  
+        aaa () {
+            this.$Http.editUser = function (id){
+                this.getuserInfo (id)
+                delete this.$Http.editUser
+            }.bind(this)
+        },
         async getuserInfo (id) {
             let res = await this.$Http.basic({
                 "id": 20240514161502,
@@ -148,6 +151,8 @@ export default {
                 },
             })
             this.userInfo = res.data
+            this.userInfo.headpic = this.userInfo.attinfos.find(v => v.usetype == "headportrait") && this.userInfo.attinfos.find(v => v.usetype == "headportrait").url || '';
+            this.userInfo.images = this.userInfo.attinfos.filter(v => v.usetype != "headportrait")
             console.log(this.userInfo,'用户信息');
         },
         shareClick () {
@@ -166,7 +171,7 @@ export default {
                 },
             })
             if (this.cutoff(res.msg)) return;
-            this.getuserInfo()
+            this.getuserInfo(this.userid)
         },
         copy() {
             uni.setClipboardData({
@@ -201,8 +206,6 @@ export default {
                 let params = that.getUrlParams(options.q);
                 user.wechatBindUserid = params.wechatBindUserid;
                 that.userid = params.wechatBindUserid
-            } else {
-                that.userid = uni.getStorageSync('userMsg').userid
             }
             that.getuserInfo(that.userid)
         }
@@ -508,7 +511,7 @@ export default {
         background: #FFFFFF;
         box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
         box-sizing: border-box;
-        z-index: 9999999;
+        z-index: 9999;
         padding: 10px;
         .but { 
             width: 355px;

+ 7 - 1
cloud/businessCard/share.vue

@@ -143,7 +143,13 @@ export default {
         this.userid = option.id
         this.getImages()
         this.getuserInfo()
-    }   
+    },
+    onShareAppMessage(res) {
+        return {
+            title:this.userInfo.name+'的名片',
+            path:'/cloud/businessCard/share?id='+this.userInfo.userid
+        }
+    }
 }
 </script>
 

+ 2 - 2
pages/index/cloud/userInfo.vue

@@ -20,10 +20,10 @@
               <image class="image" src="/static/workbench/咨询消息.svg" mode="widthFix"></image>
               <text class="title">咨询消息</text>
           </view>
-          <view class="info-card" v-if="isCode">
+          <navigator :url="'/store/storeQRCode/index?id='+userInfoValue.userid" class="info-card" v-if="isCode">
               <image class="image" src="/static/workbench/店铺码.svg" mode="widthFix"></image>
               <text class="title">店铺码</text>
-          </view>
+          </navigator>
       </view>
   </view>
 </template>

+ 230 - 4
store/storeQRCode/index.vue

@@ -1,13 +1,239 @@
 <template>
-    <view>
-        店铺二维码
-    </view>
+    <My_listbox ref="List" :pullDown="false">
+        <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/202405151715764356769B1a729abd.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 + 'getStore?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>
+
+        <view style="height: 70px;" />
+        <view class="footer">
+            <view class="add" hover-class="navigator-hover"
+                @click="submit()">
+                <block>
+                    保存图片
+                    
+                </block>
+            </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"
+import contact from "../../components/contact"
+
 export default {
+    components: { lPainter, lPainterView, lPainterText, lPainterImage, lPainterQrcode, contact },
+    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.name ? res.data.name + ',邀请您加入' : '邀请您加入'
+            })
+        },
+        saveTheImage() {
+            let that = this;
+            this.loading = true;
+            this.$refs.painter.canvasToTempFilePathSync({
+                fileType: "jpg",
+                // 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url
+                pathType: 'url',
+                quality: 1,
+                success: (res) => {
+                    // 非H5 保存到相册
+                    // H5 提示用户长按图另存
+                    uni.saveImageToPhotosAlbum({
+                        filePath: res.tempFilePath,
+                        success: function (e) {
+                            uni.showModal({
+                                title: '提示',
+                                content: '图片已保存到系统相册',
+                                showCancel: false
+                            })
+                            that.loading = false;
+                            this.$Http.basic({
+                                "id": 20240319142702,
+                                "content": {
+                                    sat_sharematerialid: that.detail.sat_sharematerialid, type: 1
+                                }
+                            }).then(res => {
+                                console.log(type, '记录', res)
+                            })
 
+                        },
+                        fail: ({ errMsg }) => {
+                            if (errMsg == 'saveImageToPhotosAlbum:fail auth deny') {
+                                uni.showModal({
+                                    title: '提示',
+                                    content: '请授权添加到相册权限后再试!',
+                                    showCancel: false,
+                                    complete: (complete) => {
+                                        uni.openSetting({
+                                            success: res => {
+                                                that.loading = false;
+                                                if (res.authSetting['scope.writePhotosAlbum']) {
+                                                    this.saveTheImage()
+                                                } else {
+                                                    uni.showModal({
+                                                        title: '提示',
+                                                        content: '未获取授权!已取消保存',
+                                                        showCancel: false,
+                                                    })
+                                                }
+                                            }
+                                        })
+                                    },
+                                })
+                            } else {
+                                that.loading = false;
+                                uni.showModal({
+                                    title: '提示',
+                                    content: '已取消保存',
+                                    showCancel: false,
+                                })
+                            }
+                        },
+                    });
+                },
+            });
+        },
+        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></style>
+<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;
+}
+
+.share {
+    display: flex;
+    justify-content: space-around;
+    width: 275px;
+    margin: 30px auto 0;
+
+    .item {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 48px;
+        height: 48px;
+        border-radius: 50%;
+        background: rgba(255, 255, 255, 0.3);
+        overflow: hidden;
+
+        .iconfont {
+            font-size: 28px;
+            color: #fff;
+        }
+    }
+}
+.footer {
+    position: fixed;
+    bottom: 0;
+    width: 100vw;
+    height: 65px;
+    background: #FFFFFF;
+    box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
+    box-sizing: border-box;
+    padding: 5px 10px;
+
+    .add {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 100%;
+        height: 45px;
+        background: #C30D23;
+        border-radius: 5px;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #FFFFFF;
+    }
+}
+</style>