瀏覽代碼

Merge branch 'master' of http://124.70.211.186:3000/zxh/YXGJ

codeMan 1 年之前
父節點
當前提交
d66ea24c6b

+ 534 - 452
cloud/businessCard/edit.vue

@@ -1,505 +1,587 @@
 <template>
-    <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="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 v-if="!origin" 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>
-                    {{ origin == 'my' ? '保存' : '保存名片' }}
-                </block>
+              <view :style="'width:' + tovw(255)" />
+              <view class="iconfont icon-a-wodetiaozhuan" />
             </view>
+          </view>
         </view>
+      </template>
+    </my_form>
+
+    <view v-if="!origin" 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>
+          {{ origin == "my" ? "保存" : "保存名片" }}
+        </block>
+      </view>
     </view>
+  </view>
 </template>
 
 <script>
-import { formattedFiles } from '../../utils/settleFiles.js'
+import { formattedFiles } from "../../utils/settleFiles.js";
 export default {
-    data() {
-        return {
-            sys_enterpriseid: 0,
-            form: [],
-            attachmentids: [],
-            uncomplete: true,
-            onUpload: false,
-            loading: false,
-            headportrait: "https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp",
-            userid: 0,
-            isShow: true,
-            isSubmit: false,
-            origin: ''
-        }
+  data() {
+    return {
+      sys_enterpriseid: 0,
+      form: [],
+      attachmentids: [],
+      uncomplete: true,
+      onUpload: false,
+      loading: false,
+      headportrait:
+        "https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp",
+      userid: 0,
+      isShow: true,
+      isSubmit: false,
+      origin: "",
+    };
+  },
+  onLoad(options) {
+    this.userid = options.id;
+    this.origin = options.origin;
+    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] });
     },
-    onLoad(options) {
-        this.userid = options.id
-        this.origin = options.origin
-        this.init()
-        uni.setNavigationBarTitle({
-            title: '修改名片'
+
+    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
+      });
     },
-    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,
         },
-        /* 请求类型 */
-        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",
         },
-        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"
-                    })
-                }
+        success() {
+          that.$Http
+            .basic({
+              classname: "system.attachment.huawei.OBS",
+              method: "uploadSuccess",
+              content: {
+                serialfilename: res.serialfilename,
+              },
             })
-        },
-        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()
+            .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);
+            });
         },
-        /* 上传成功反馈 */
-        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)
-                }
-            })
+        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: "",
-            },];
-            if (!this.origin) {
-                form.push({
-                    key: "remarks",
-                    type: "textarea",
-                    label: "自我介紹",
-                    isMust: false,//是否必填
-                    value: '',
-                }, {
-                    key: "tag",
-                    type: "tag",
-                    label: "印象标签",
-                    isMust: false,//是否必填
-                    marginTop: 10,
-                    maxlength:10,
-                    placeholder: '请填写,最多十个字',
-                    verify: [{
-                        reg: '^.{1,10}$',
-                        errText: "限制1-10字!"
-                    }],
-                    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;
-            })
-
+    init() {
+      let form = [
+        {
+          key: "name",
+          type: "text",
+          label: "姓名",
+          isMust: true, //是否必填
+          value: "",
         },
-        onUploading(ing) {
-            this.onUpload = ing;
+        {
+          key: "phonenumber",
+          type: "text",
+          label: "手机号",
+          isMust: true, //是否必填
+          value: "",
+          placeholder: "请输入手机号",
+          inputmode: "number",
+          verify: [this.getReg("phonenumber")],
+          getPhoneNumber: true,
         },
-        isUncomplete(uncomplete) {
-            console.log(uncomplete);
-            this.uncomplete = uncomplete;
+        {
+          key: "email",
+          type: "text",
+          label: "邮箱",
+          isMust: false, //是否必填
+          value: "",
+          verify: [this.getReg("email")],
         },
-        submit() {
-            this.loading = true;
-            let that = this;
-            this.$refs.form.submit().then(data => {
-                this.$Http.basic({
-                    "id": 20220929090901,
-                    "content": {
-                        "ownertable": "sys_users",
-                        "ownerid": this.userid,
-                        "datatag": data.tag
-                    },
+        {
+          key: "address",
+          type: "text",
+          label: "地址",
+          isMust: false, //是否必填
+          value: "",
+        },
+      ];
+      if (!this.origin) {
+        form.push(
+          {
+            key: "remarks",
+            type: "textarea",
+            label: "自我介紹",
+            isMust: false, //是否必填
+            value: "",
+          },
+          {
+            key: "tag",
+            type: "tag",
+            label: "印象标签",
+            isMust: false, //是否必填
+            marginTop: 10,
+            maxlength: 10,
+            placeholder: "请填写,最多十个字",
+            verify: [
+              {
+                reg: "^.{1,10}$",
+                errText: "限制1-10字!",
+              },
+            ],
+            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) {
+      console.log(uncomplete);
+      this.uncomplete = uncomplete;
+    },
+    submit() {
+      this.loading = true;
+      let that = this;
+      this.$refs.form.submit().then((data) => {
+        this.$Http.basic({
+          id: 20220929090901,
+          content: {
+            ownertable: "sys_users",
+            ownerid: this.userid,
+            datatag: data.tag,
+          },
+        });
+        this.$Http
+          .basic({
+            id: 20240511151602,
+            content: {
+              ...data,
+            },
+          })
+          .then(async (res) => {
+            this.loading = false;
+            console.log("修改信息", res);
+            if (this.cutoff(res.msg)) return;
+            if (!this.origin && 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,
+                  },
                 })
-                this.$Http.basic({
-                    "id": 20240511151602,
-                    "content": {
-                        ...data
-                    }
-                }).then(async res => {
-                    this.loading = false;
-                    console.log("修改信息", res)
-                    if (this.cutoff(res.msg)) return;
-                    if (!this.origin && 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 (!this.origin && 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)
-                            }
-                        })
+                .then(async (s) => {
+                  this.isSubmit = true;
+                  this.onUpload = false;
+                  console.log("绑定附加", s);
+                  if (this.cutoff(s.msg)) return;
+                });
+            }
+            this.loading = true;
 
-                    } else {
-                        this.$Http.editUser(res.data.userid)
-                        uni.navigateBack()
+            if (!this.origin && data.files.linksids.length) {
+              await this.$Http.basic({
+                classname: "system.attachment.Attachment",
+                method: "deleteFileLink",
+                content: {
+                  linksids: data.files.linksids,
+                },
+              });
+            }
 
-                    }
-                    //刷新首页用户信息
-                    this.$Http.refreshUserInfoData && this.$Http.refreshUserInfoData()
-                })
-            })
-        },
-        isShowAll(e) {
-            this.isShow = !e;
-        },
-        imageOnLoading(e) {
-            if (e) {
-                this.uncomplete = true;
+            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.$refs.form.verify();
+              this.$Http.editUser(res.data.userid);
+              uni.navigateBack();
             }
-        },
-        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;
-                    }
+            //刷新首页用户信息
+            this.$Http.refreshUserInfoData && this.$Http.refreshUserInfoData();
+          });
+      });
+    },
+    isShowAll(e) {
+      this.isShow = !e;
+    },
+    imageOnLoading(e) {
+      if (e) {
+        this.uncomplete = true;
+      } else {
+        this.$refs.form.verify();
+      }
+    },
+    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 lang="scss" scoped>
 .headportrait {
-    width: 100vw;
-    padding-left: 10px;
-    background: #fff;
-    box-sizing: border-box;
-
-    .content {
-        display: flex;
-        align-items: center;
-        border-bottom: 1px solid #DDDDDD;
-        box-sizing: border-box;
-        height: 76px;
-        padding: 10px;
-        padding-left: 0;
-        position: relative;
+  width: 100vw;
+  padding-left: 10px;
+  background: #fff;
+  box-sizing: border-box;
 
-        .avatar-box {
-            width: 100%;
-            height: 76px;
-            position: absolute;
-            left: 0;
-            top: 0;
-            opacity: 0;
-        }
+  .content {
+    display: flex;
+    align-items: center;
+    border-bottom: 1px solid #dddddd;
+    box-sizing: border-box;
+    height: 76px;
+    padding: 10px;
+    padding-left: 0;
+    position: relative;
 
-        .label {
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 14px;
-            color: #666666;
-            width: 110px;
-        }
+    .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;
+  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;
+  .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;
+    .line-1 {
+      display: flex;
+      align-items: center;
+      align-content: center;
 
-            text {
-                margin-right: 10px;
-            }
+      text {
+        margin-right: 10px;
+      }
 
-            image {
-                width: 24px !important;
-                height: 24px !important;
-            }
-        }
-
-        text {}
+      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;
-    display: flex;
+  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;
+  display: flex;
 
-    .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;
-    }
+  .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;
-    }
+  .forbidden {
+    opacity: 0.6;
+  }
 }
 </style>

+ 674 - 595
cloud/businessCard/index.vue

@@ -1,682 +1,761 @@
 <template>
-    <view class="self-card" :style="{ '--height': tovw(+CustomBar + 10) }">
-        <view class="footer" :style="{ height: (tovw(CustomBar).replace('vw', '')) * 375 / 100 + 'px' }"
-            style="background: linear-gradient( 225deg, #F43A50 0%, #C30D23 100%);top: 0;">
-            <view class="custom"
-                :style="{ height: (tovw(Custom.height).replace('vw', '')) * 375 / 100 + 'px', top: (tovw(Custom.top).replace('vw', '')) * 375 / 100 + 'px' }">
-                <view v-if="userInfo.name">{{ userInfo.name }}的名片</view>
-                <view v-else>暂无信息</view>
-                <view class="back" :style="{ lineHeight: (tovw(Custom.height).replace('vw', '')) * 375 / 100 + 'px' }"
-                    @click="onBack">
-                    <text class=" iconfont icon-a-wodetiaozhuan" />
-                </view>
-            </view>
+  <view class="self-card" :style="{ '--height': tovw(+CustomBar + 10) }">
+    <view
+      class="footer"
+      :style="{
+        height: (tovw(CustomBar).replace('vw', '') * 375) / 100 + 'px',
+      }"
+      style="
+        background: linear-gradient(225deg, #f43a50 0%, #c30d23 100%);
+        top: 0;
+      "
+    >
+      <view
+        class="custom"
+        :style="{
+          height: (tovw(Custom.height).replace('vw', '') * 375) / 100 + 'px',
+          top: (tovw(Custom.top).replace('vw', '') * 375) / 100 + 'px',
+        }"
+      >
+        <view v-if="userInfo.name">{{ userInfo.name }}的名片</view>
+        <view v-else>暂无信息</view>
+        <view
+          class="back"
+          :style="{
+            lineHeight:
+              (tovw(Custom.height).replace('vw', '') * 375) / 100 + 'px',
+          }"
+          @click="onBack"
+        >
+          <text class="iconfont icon-a-wodetiaozhuan" />
         </view>
-        <view class="head" :style="[{ height: tovw(+CustomBar + 184) }]"
-            style="background: linear-gradient( 225deg, #F43A50 0%, #C30D23 100%)">
-            <image class="bg-bottom" mode="aspectFill" src="/static/workbench/减去.svg">
-            </image>
-            <view class="card">
-                <view class="header">
-                    <view class="left">
-                        <view class="title">
-                            <text>{{ userInfo.name || '暂无' }}</text>
-                            <text>{{ userInfo.rolenames || '暂无' }}</text>
-                        </view>
-                        <text class="phone">{{ userInfo.phonebumber || '暂无' }}</text>
-                        <view class="redline"></view>
-                    </view>
-                    <navigator class="right">
-                        <image
-                            :src="userInfo.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'"
-                            mode="aspectFill">
-                        </image>
-                    </navigator>
-                </view>
-                <view class="bottom">
-                    <view class="left">
-                        <view>
-                            <i class="iconfont icon-qiye-hui"></i>
-                            <view class="text">{{ userInfo.enterprisename || '暂无' }}</view>
-                        </view>
-                        <view>
-                            <i class="iconfont icon-youxiang"></i>
-                            <view class="text">{{ userInfo.email || '暂无' }}</view>
-                        </view>
-                        <view style="margin-bottom: 0 !important;">
-                            <i class="iconfont icon-dizhi_xian"></i>
-                            <view class="text u-line-2">{{ userInfo.address || '暂无' }}</view>
-                        </view>
-                    </view>
-                    <navigator class="right" :url="'/cloud/businessCard/share?id=' + userid">
-                        <image class="code" src="/static/workbench/二维码.svg" />
-                        <text>名片码</text>
-                    </navigator>
-                </view>
-            </view>
-        </view>
-        <view class="card-handle">
-            <view class="top">
-                <view class="left">
-                    <view class="avatar">
-                        <block v-for="item in userInfo.readusers" :key="item.rowindex">
-                            <image
-                                :src="item.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'"
-                                v-if="item.rowindex < 4" :key="item.rowindex" />
-                        </block>
-                        <text style="color:#BBBBBB">...</text>
-                    </view>
-                    <view class="readcount">浏览了{{ userInfo.count_read }}</view>
-                </view>
-                <navigator url="#" class="right" @click="goodClick">
-                    <i :class="['iconfont', userInfo.islike == 1 ? ' icon-yidianzan' : ' icon-weidianzan']"
-                        :style="{ color: userInfo.islike ? '#C30D23' : '#666666' }"></i>
-                    <text>点赞{{ userInfo.count_like }}</text>
-                </navigator>
-            </view>
-            <view class="bottom">
-                <view class="but" hover-class="navigator-hover" @click="copy">
-                    <i class="iconfont icon-fuzhi" style="color: #C30D23;"></i>
-                    复制电话
-                </view>
-                <view class="but" hover-class="navigator-hover" @click="shareClick">
-                    <i class="iconfont icon-zhuanfa"></i>
-                    转发名片
-                </view>
+      </view>
+    </view>
+    <view
+      class="head"
+      :style="[{ height: tovw(+CustomBar + 184) }]"
+      style="background: linear-gradient(225deg, #f43a50 0%, #c30d23 100%)"
+    >
+      <image
+        class="bg-bottom"
+        mode="aspectFill"
+        src="/static/workbench/减去.svg"
+      >
+      </image>
+      <view class="card">
+        <view class="header">
+          <view class="left">
+            <view class="title">
+              <text>{{ userInfo.name || "暂无" }}</text>
+              <text>{{ userInfo.rolenames || "暂无" }}</text>
             </view>
+            <text class="phone">{{ userInfo.phonebumber || "暂无" }}</text>
+            <view class="redline"></view>
+          </view>
+          <navigator class="right">
+            <image
+              :src="
+                userInfo.headpic ||
+                'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'
+              "
+              mode="aspectFill"
+            >
+            </image>
+          </navigator>
         </view>
-
-        <view class="user-info">
-            <text class="title-max">简介</text>
-            <view class="tag-box">
-                <text class="title-min">印象标签</text>
-                <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 class="bottom">
+          <view class="left">
+            <view>
+              <i class="iconfont icon-qiye-hui"></i>
+              <view class="text">{{ userInfo.enterprisename || "暂无" }}</view>
             </view>
-            <view class="descript-box">
-                <text class="title-min">自我介绍</text>
-                <text class="descript">{{ userInfo.remarks || '暂无' }}</text>
+            <view>
+              <i class="iconfont icon-youxiang"></i>
+              <view class="text">{{ userInfo.email || "暂无" }}</view>
             </view>
-            <view class="image-box">
-                <text class="title-min">照片墙</text>
-                <block v-if="userInfo.images.length">
-                    <view class="image" v-for="item in userInfo.images" :key="item.attachmentid" @click="preview(item.url)">
-                        <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 style="margin-bottom: 0 !important">
+              <i class="iconfont icon-dizhi_xian"></i>
+              <view class="text u-line-2">{{
+                userInfo.address || "暂无"
+              }}</view>
             </view>
+          </view>
+          <navigator
+            class="right"
+            :url="'/cloud/businessCard/share?id=' + userid"
+          >
+            <image class="code" src="/static/workbench/二维码.svg" />
+            <text>名片码</text>
+          </navigator>
+        </view>
+      </view>
+    </view>
+    <view class="card-handle">
+      <view class="top">
+        <view class="left">
+          <view class="avatar">
+            <block v-for="item in userInfo.readusers" :key="item.rowindex">
+              <image
+                :src="
+                  item.headpic ||
+                  'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'
+                "
+                v-if="item.rowindex < 4"
+                :key="item.rowindex"
+              />
+            </block>
+            <text style="color: #bbbbbb">...</text>
+          </view>
+          <view class="readcount">浏览了{{ userInfo.count_read }}</view>
         </view>
+        <navigator url="#" class="right" @click="goodClick">
+          <i
+            :class="[
+              'iconfont',
+              userInfo.islike == 1 ? ' icon-yidianzan' : ' icon-weidianzan',
+            ]"
+            :style="{ color: userInfo.islike ? '#C30D23' : '#666666' }"
+          ></i>
+          <text>点赞{{ userInfo.count_like }}</text>
+        </navigator>
+      </view>
+      <view class="bottom">
+        <view class="but" hover-class="navigator-hover" @click="copy">
+          <i class="iconfont icon-fuzhi" style="color: #c30d23"></i>
+          复制电话
+        </view>
+        <view class="but" hover-class="navigator-hover" @click="shareClick">
+          <i class="iconfont icon-zhuanfa"></i>
+          转发名片
+        </view>
+      </view>
+    </view>
 
-        <view class="footer2">
-            <navigator class="but" :url="'/cloud/businessCard/edit?id=' + userid" @click="goEditPage">
-                <text>修改名片</text>
-            </navigator>
+    <view class="user-info">
+      <text class="title-max">简介</text>
+      <view class="tag-box">
+        <text class="title-min">印象标签</text>
+        <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">{{ userInfo.remarks || "暂无" }}</text>
+      </view>
+      <view class="image-box">
+        <text class="title-min">照片墙</text>
+        <block v-if="userInfo.images.length">
+          <view
+            class="image"
+            v-for="item in userInfo.images"
+            :key="item.attachmentid"
+            @click="preview(item.url)"
+          >
+            <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>
 
-        <u-popup :show="shareShow" mode="bottom" @close="shareShow = false">
-            <view class="share-box">
-                <contact openType="share">
-                    <view class="item" hover-class="navigator-hover" @click="shareWx">
-                        <image mode="widthFix" src="/static/workbench/微信好友.svg" />
-                        <text>微信好友</text>
-                    </view>
-                </contact>
-
-                <navigator class="item" :url="'/cloud/businessCard/share?id=' + userid">
-                    <image mode="widthFix" src="/static/workbench/名片海报.svg" />
-                    <text>名片海报</text>
-                </navigator>
-            </view>
-        </u-popup>
+    <view class="footer2">
+      <navigator
+        class="but"
+        :url="'/cloud/businessCard/edit?id=' + userid"
+        @click="goEditPage"
+      >
+        <text>修改名片</text>
+      </navigator>
     </view>
+
+    <u-popup :show="shareShow" mode="bottom" @close="shareShow = false">
+      <view class="share-box">
+        <contact openType="share">
+          <view class="item" hover-class="navigator-hover" @click="shareWx">
+            <image mode="widthFix" src="/static/workbench/微信好友.svg" />
+            <text>微信好友</text>
+          </view>
+        </contact>
+
+        <navigator class="item" :url="'/cloud/businessCard/share?id=' + userid">
+          <image mode="widthFix" src="/static/workbench/名片海报.svg" />
+          <text>名片海报</text>
+        </navigator>
+      </view>
+    </u-popup>
+  </view>
 </template>
 
 <script>
-import contact from "../../components/contact"
-import { viewImage } from "../../utils/settleFiles.js"
+import contact from "../../components/contact";
+import { viewImage } from "../../utils/settleFiles.js";
+import { winTheCustomer } from "../../utils/share";
 export default {
-    components: { contact },
-    data() {
-        return {
-            userInfo: { tag: [], images: [] ,readusers:[]},
-            userid: uni.getStorageSync('userMsg').userid,
-            shareShow: false
-        }
+  components: { contact },
+  data() {
+    return {
+      userInfo: { tag: [], images: [], readusers: [] },
+      userid: uni.getStorageSync("userMsg").userid,
+      shareShow: false,
+    };
+  },
+  onUnload() {
+    delete this.$Http.refreshUserInfoData;
+  },
+  methods: {
+    preview(url) {
+      viewImage(url);
     },
-    computed: {
+    goEditPage() {
+      this.$Http.editUser = function (id) {
+        this.getuserInfo(id);
+        delete this.$Http.editUser;
+      }.bind(this);
     },
-    onUnload () {
-        delete this.$Http.refreshUserInfoData
-    },
-    methods: {
-        preview(url) {
-            viewImage(url)
-        },
-        goEditPage() {
-            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,
+        content: {
+          userid: id,
         },
-        async getuserInfo(id) {
-            let res = await this.$Http.basic({
-                "id": 20240514161502,
-                "content": {
-                    userid: id
-                },
-            })
-            if (this.cutoff(res.msg)) return
-            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() {
-            this.shareShow = true
-        },
-        onBack() {
-            let curPages = getCurrentPages()
-            if (curPages.length == 1) {
-                uni.redirectTo({
-                    url:'/pages/index/index',
-                })
-            } else {
-                uni.navigateBack()
-            }
-        },
-        async goodClick() {
-            let res = await this.$Http.basic({
-                "id": 20240416133702,
-                "content": {
-                    "ownertable": "sys_users",
-                    "ownerid": this.userid,
-                    "type": 2//1:收藏,2:点赞
-                },
-            })
-            if (this.cutoff(res.msg)) return;
-            this.getuserInfo(this.userid)
-        },
-        copy() {
-            uni.setClipboardData({
-                data: this.userInfo.phonenumber,
-                success: (result) => {
-                    uni.showToast({
-                        title: "已复制",
-                        icon: "none",
-                        duration: 1500,
-                    })
-                }
-            });
-        }
+      });
+      if (this.cutoff(res.msg)) return;
+      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, "用户信息");
     },
-    onShareAppMessage(res) {
-        return {
-            title: this.userInfo.name, // 标题
-            path: "/cloud/businessCard/index?id=" + this.userid, // 分享路径
-            imageUrl: ""// 分享图
-        };
+    shareClick() {
+      this.shareShow = true;
     },
-    onLoad(options) {
-        this.isInitializeLogin(render.bind(this))
-        function render() {
-            if (options.q) {
-                let params = this.getUrlParams(options.q);
-                user.wechatBindUserid = params.userid;
-                this.userid = params.userid
-            }
-            this.getuserInfo(this.userid)
-        }
+    onBack() {
+      let curPages = getCurrentPages();
+      if (curPages.length == 1) {
+        uni.redirectTo({
+          url: "/pages/index/index",
+        });
+      } else {
+        uni.navigateBack();
+      }
     },
-}
+    async goodClick() {
+      let res = await this.$Http.basic({
+        id: 20240416133702,
+        content: {
+          ownertable: "sys_users",
+          ownerid: this.userid,
+          type: 2, //1:收藏,2:点赞
+        },
+      });
+      if (this.cutoff(res.msg)) return;
+      this.getuserInfo(this.userid);
+    },
+    copy() {
+      uni.setClipboardData({
+        data: this.userInfo.phonenumber,
+        success: (result) => {
+          uni.showToast({
+            title: "已复制",
+            icon: "none",
+            duration: 1500,
+          });
+        },
+      });
+    },
+  },
+  onShareAppMessage(res) {
+    return {
+      title: this.userInfo.name,
+      path:
+        "/cloud/businessCard/index?id=" +
+        this.userid +
+        "&shareUserid=" +
+        this.shareUserid,
+      imageUrl: "",
+    };
+  },
+  onLoad(options) {
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      if (options.q) {
+        let params = this.getUrlParams(options.q);
+        this.userid = params.userid;
+      }
+      this.getuserInfo(this.userid);
+      this.shareUserid = winTheCustomer(options.shareUserid || 0, "个人名片", {
+        ownertable: "sys_users",
+        ownerid: this.userid,
+      });
+    }
+  },
+};
 </script>
 
 <style lang="scss">
 .self-card {
-    .head {
-        position: relative;
-        width: 100vw;
+  .head {
+    position: relative;
+    width: 100vw;
 
-        .bg-bottom {
-            position: absolute;
-            bottom: -1px;
-            left: 0;
-            width: 100vw;
+    .bg-bottom {
+      position: absolute;
+      bottom: -1px;
+      left: 0;
+      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);
+      }
+    }
 
-        .custom {
-            position: absolute;
-            width: 100vw;
+    .card {
+      width: 355px;
+      height: 220px;
+      box-sizing: border-box;
+      background: #ffffff;
+      box-shadow: 0px 2px 10px 1px rgba(0, 0, 0, 0.16);
+      border-radius: 8px 8px 8px 8px;
+      position: absolute;
+      top: var(--height);
+      left: 10px;
+      padding: 20px;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+
+      .header {
+        display: flex;
+        justify-content: space-between;
+        .left {
+          display: flex;
+          flex-direction: column;
+          justify-content: space-between;
+
+          .title {
             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);
-            }
-        }
 
-        .card {
-            width: 355px;
-            height: 220px;
-            box-sizing: border-box;
-            background: #FFFFFF;
-            box-shadow: 0px 2px 10px 1px rgba(0, 0, 0, 0.16);
-            border-radius: 8px 8px 8px 8px;
-            position: absolute;
-            top: var(--height);
-            left: 10px;
-            padding: 20px;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-
-            .header {
-                display: flex;
-                justify-content: space-between;
-                .left {
-                    display: flex;
-                    flex-direction: column;
-                    justify-content: space-between;
-
-                    .title {
-                        display: flex;
-                        align-items: center;
-
-                        text {
-                            &:first-child {
-                                font-weight: 500;
-                                font-size: 18px;
-                                color: #333333;
-                            }
-
-                            &:last-child {
-                                font-weight: 400;
-                                font-size: 12px;
-                                color: #999999;
-                                margin-left: 10px;
-                            }
-                        }
-
-                        margin-bottom: 5px;
-                    }
-
-                    .phone {
-                        font-weight: 500;
-                        font-size: 16px;
-                        color: #333333;
-                    }
-
-                    .redline {
-                        width: 24px;
-                        height: 2px;
-                        background: #C30D23;
-                        margin-top: 15px;
-                    }
-                }
-
-                .right {
-                    width: 56px;
-                    height: 56px;
-                    background: #DCEBF8;
-                    box-shadow: 0px 3px 6px 1px #E0D6D7;
-                    border: 2px solid #FFFFFF;
-                    border-radius: 50%;
-                    image {
-                        width: 100%;
-                        height: 100%;
-                        border-radius: 50%;
-                    }
-                }
-            }
+            text {
+              &:first-child {
+                font-weight: 500;
+                font-size: 18px;
+                color: #333333;
+              }
 
-            .bottom {
-                display: flex;
-                justify-content: space-between;
-                align-items: flex-start;
-                font-family: Source Han Sans SC, Source Han Sans SC;
+              &:last-child {
                 font-weight: 400;
                 font-size: 12px;
-                color: #666666;
-                margin-top: 22px;
-
-                .left {
-                    display: flex;
-                    flex-direction: column;
-
-                    >view {
-                        margin-bottom: 13px;
-                        display: flex;
-                        align-content: center;
-                        align-items: center;
-
-                        i {
-                            font-size: 16px;
-                        }
-
-                        .text {
-                            margin-left: 10px;
-                            max-width: 211px;
-                        }
-                    }
-                }
-
-                .right {
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    align-content: center;
-                    padding: 3px;
-                    border-radius: 5px;
-                    text {
-                        font-weight: 400;
-                        font-size: 12px;
-                        color: #666666;
-
-                    }
-
-                    .code {
-                        width: 32px;
-                        height: 32px;
-                        margin-bottom: 4px;
-                    }
-                }
+                color: #999999;
+                margin-left: 10px;
+              }
             }
+
+            margin-bottom: 5px;
+          }
+
+          .phone {
+            font-weight: 500;
+            font-size: 16px;
+            color: #333333;
+          }
+
+          .redline {
+            width: 24px;
+            height: 2px;
+            background: #c30d23;
+            margin-top: 15px;
+          }
         }
-    }
 
-    .card-handle {
-        padding: 50px 10px 20px 10px;
-        background: #ffffff;
-        margin-top: 15px;
+        .right {
+          width: 56px;
+          height: 56px;
+          background: #dcebf8;
+          box-shadow: 0px 3px 6px 1px #e0d6d7;
+          border: 2px solid #ffffff;
+          border-radius: 50%;
+          image {
+            width: 100%;
+            height: 100%;
+            border-radius: 50%;
+          }
+        }
+      }
 
-        .top {
+      .bottom {
+        display: flex;
+        justify-content: space-between;
+        align-items: flex-start;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-weight: 400;
+        font-size: 12px;
+        color: #666666;
+        margin-top: 22px;
+
+        .left {
+          display: flex;
+          flex-direction: column;
+
+          > view {
+            margin-bottom: 13px;
             display: flex;
-            justify-content: space-between;
-            align-items: center;
             align-content: center;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 12px;
-            color: #999999;
-
-            .left {
-                display: flex;
-                flex-direction: column;
-
-                .avatar {
-                    display: flex;
-                    align-items: flex-start;
-                    align-content: center;
-
-                    image {
-                        margin-right: 5px;
-                        width: 24px;
-                        height: 24px;
-                        border-radius: 50%;
-                    }
-
-                    text {
-                        transform: scale(1.5);
-                    }
-                }
-
-                .readcount {
-                    margin-top: 5px;
-                    display: block;
-                }
+            align-items: center;
+
+            i {
+              font-size: 16px;
             }
 
-            .right {
-                display: flex;
-                flex-direction: column;
-                align-content: center;
-                align-items: center;
-                width: 35px;
-                height: 40px;
-                border-radius: 3px;
-                i {
-                    display: block;
-                    color: #666666;
-                }
-
-                text {
-                    margin-top: 5px;
-                    display: block;
-                }
+            .text {
+              margin-left: 10px;
+              max-width: 211px;
             }
+          }
         }
 
-        .bottom {
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            align-content: center;
-            margin-top: 25px;
-
-            .but {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                box-sizing: border-box;
-                border-radius: 8px 8px 8px 8px;
-                font-family: Source Han Sans SC, Source Han Sans SC;
-                font-weight: 400;
-                font-size: 16px;
-                width: 173px;
-                height: 50px;
-                line-height: 50px;
-                text-align: center;
-
-                &:nth-child(1) {
-                    background: #FFFFFF;
-                    border: 1px solid #CCCCCC;
-                    color: #666666;
-                }
-
-                &:nth-child(2) {
-                    background: #C30D23;
-                    color: #FFFFFF;
-                }
-
-                view {
-                    margin-right: 10px;
-                }
-            }
+        .right {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          align-content: center;
+          padding: 3px;
+          border-radius: 5px;
+          text {
+            font-weight: 400;
+            font-size: 12px;
+            color: #666666;
+          }
+
+          .code {
+            width: 32px;
+            height: 32px;
+            margin-bottom: 4px;
+          }
         }
+      }
     }
+  }
+
+  .card-handle {
+    padding: 50px 10px 20px 10px;
+    background: #ffffff;
+    margin-top: 15px;
+
+    .top {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      align-content: center;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-size: 12px;
+      color: #999999;
+
+      .left {
+        display: flex;
+        flex-direction: column;
 
-    .user-info {
-        padding: 12px 10px 70px 10px;
-        font-family: PingFang SC, PingFang SC;
-        background: #ffffff;
-        margin-top: 10px;
+        .avatar {
+          display: flex;
+          align-items: flex-start;
+          align-content: center;
+
+          image {
+            margin-right: 5px;
+            width: 24px;
+            height: 24px;
+            border-radius: 50%;
+          }
+
+          text {
+            transform: scale(1.5);
+          }
+        }
 
-        .title-min {
-            margin-bottom: 10px;
-            font-weight: 500;
-            font-size: 14px;
-            color: #666666;
-            display: block;
+        .readcount {
+          margin-top: 5px;
+          display: block;
         }
+      }
 
-        .title-max {
-            margin-bottom: 21px;
-            font-weight: 500;
-            font-size: 16px;
-            color: #333333;
-            display: block;
+      .right {
+        display: flex;
+        flex-direction: column;
+        align-content: center;
+        align-items: center;
+        width: 35px;
+        height: 40px;
+        border-radius: 3px;
+        i {
+          display: block;
+          color: #666666;
         }
 
-        .tag-box {
-            display: flex;
-            flex-direction: column;
-            margin-bottom: 20px;
-
-            .title-min {}
-
-            .tag-list {
-                display: flex;
-                align-content: center;
-                align-items: center;
-                flex-wrap: wrap;
-
-                .tag {
-                    margin-right: 10px;
-                    padding: 6px 10px;
-                    background: #F2F2F2;
-                    border-radius: 5px 5px 5px 5px;
-                    margin-right: 10px;
-                    font-weight: 400;
-                    font-size: 14px;
-                    color: #333333;
-
-                    &:last-child {
-                        margin-right: 0;
-                    }
-                }
-            }
+        text {
+          margin-top: 5px;
+          display: block;
         }
+      }
+    }
 
-        .descript-box {
-            margin-bottom: 20px;
-            display: flex;
-            flex-direction: column;
+    .bottom {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      align-content: center;
+      margin-top: 25px;
 
-            .descript {
-                font-weight: 400;
-                font-size: 14px;
-                color: #666666;
-            }
+      .but {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        box-sizing: border-box;
+        border-radius: 8px 8px 8px 8px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-weight: 400;
+        font-size: 16px;
+        width: 173px;
+        height: 50px;
+        line-height: 50px;
+        text-align: center;
+
+        &:nth-child(1) {
+          background: #ffffff;
+          border: 1px solid #cccccc;
+          color: #666666;
         }
 
-        .image-box {
-            display: flex;
-            flex-direction: column;
+        &:nth-child(2) {
+          background: #c30d23;
+          color: #ffffff;
+        }
 
-            .image {
-                width: 100%;
-                height: 240px;
-                margin-bottom: 10px;
-            }
+        view {
+          margin-right: 10px;
         }
+      }
+    }
+  }
+
+  .user-info {
+    padding: 12px 10px 70px 10px;
+    font-family: PingFang SC, PingFang SC;
+    background: #ffffff;
+    margin-top: 10px;
+
+    .title-min {
+      margin-bottom: 10px;
+      font-weight: 500;
+      font-size: 14px;
+      color: #666666;
+      display: block;
     }
 
-    .footer {
-        display: flex;
-        position: fixed;
-        bottom: 0;
-        left: 0;
-        width: 375px;
-        height: 64px;
-        background: #FFFFFF;
-        box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
-        box-sizing: border-box;
-        z-index: 9;
-        padding: 5px 10px;
+    .title-max {
+      margin-bottom: 21px;
+      font-weight: 500;
+      font-size: 16px;
+      color: #333333;
+      display: block;
+    }
 
-        .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);
-            }
-        }
+    .tag-box {
+      display: flex;
+      flex-direction: column;
+      margin-bottom: 20px;
 
-        .but {
-            width: 355px;
-            height: 45px;
-            font-family: PingFang SC, PingFang SC;
-            font-weight: 500;
-            font-size: 14px;
-            color: #FFFFFF;
-            background: #C30D23;
-            border-radius: 5px 5px 5px 5px;
-            border: 1px solid #FFFFFF;
-            display: flex;
-            align-items: center;
-            align-content: center;
-            justify-content: space-evenly;
+      .title-min {
+      }
+
+      .tag-list {
+        display: flex;
+        align-content: center;
+        align-items: center;
+        flex-wrap: wrap;
+
+        .tag {
+          margin-right: 10px;
+          padding: 6px 10px;
+          background: #f2f2f2;
+          border-radius: 5px 5px 5px 5px;
+          margin-right: 10px;
+          font-weight: 400;
+          font-size: 14px;
+          color: #333333;
+
+          &:last-child {
+            margin-right: 0;
+          }
         }
+      }
     }
-}
 
-.footer2 {
+    .descript-box {
+      margin-bottom: 20px;
+      display: flex;
+      flex-direction: column;
+
+      .descript {
+        font-weight: 400;
+        font-size: 14px;
+        color: #666666;
+      }
+    }
+
+    .image-box {
+      display: flex;
+      flex-direction: column;
+
+      .image {
+        width: 100%;
+        height: 240px;
+        margin-bottom: 10px;
+      }
+    }
+  }
+
+  .footer {
+    display: flex;
     position: fixed;
     bottom: 0;
-    width: 100vw;
-    height: 65px;
-    background: #FFFFFF;
+    left: 0;
+    width: 375px;
+    height: 64px;
+    background: #ffffff;
     box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
     box-sizing: border-box;
+    z-index: 9;
     padding: 5px 10px;
-    display: flex;
 
-    .but {
-        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;
+    .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);
+      }
     }
 
-    .forbidden {
-        opacity: .6;
+    .but {
+      width: 355px;
+      height: 45px;
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 500;
+      font-size: 14px;
+      color: #ffffff;
+      background: #c30d23;
+      border-radius: 5px 5px 5px 5px;
+      border: 1px solid #ffffff;
+      display: flex;
+      align-items: center;
+      align-content: center;
+      justify-content: space-evenly;
     }
+  }
+}
+
+.footer2 {
+  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;
+  display: flex;
+
+  .but {
+    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: 0.6;
+  }
 }
 
 .share-box {
-    padding: 30px 0;
+  padding: 30px 0;
+  display: flex;
+  align-items: center;
+  align-content: center;
+  justify-content: space-evenly;
+
+  .item {
     display: flex;
+    flex-direction: column;
     align-items: center;
     align-content: center;
-    justify-content: space-evenly;
-
-    .item {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        align-content: center;
-        border-radius: 5px;
-        image {
-            width: 50px;
-            height: 50px;
-        }
+    border-radius: 5px;
+    image {
+      width: 50px;
+      height: 50px;
+    }
 
-        text {
-            margin-top: 5px;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-weight: 400;
-            font-size: 12px;
-            color: #333333;
-        }
+    text {
+      margin-top: 5px;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-weight: 400;
+      font-size: 12px;
+      color: #333333;
     }
+  }
 }
 </style>

+ 327 - 171
cloud/businessCard/share.vue

@@ -1,194 +1,350 @@
 <template>
-    <view class="card-box">
-        <lPainter ref="painter" css="position:relative;">
-            <lPainterView :css="'background:#ffffff;border-radius:'+tovw(8)+';width:'+tovw(280)+';height:'+tovw(463)">
-                <lPainterImage :src="imageUrl" :css="'width:'+tovw(280)+';height:'+tovw(200)+';border-radius:'+tovw(8)" object-fit="fill" />
+  <view class="card-box">
+    <lPainter ref="painter" css="position:relative;">
+      <lPainterView
+        :css="
+          'background:#ffffff;border-radius:' +
+          tovw(8) +
+          ';width:' +
+          tovw(280) +
+          ';height:' +
+          tovw(463)
+        "
+      >
+        <lPainterImage
+          :src="imageUrl"
+          :css="
+            'width:' +
+            tovw(280) +
+            ';height:' +
+            tovw(200) +
+            ';border-radius:' +
+            tovw(8)
+          "
+          object-fit="fill"
+        />
 
-                <lPainterView :css="'display: flex;flex-direction: column;margin:auto;align-items: center;position: absolute;bottom: '+tovw(25)+';width:'+tovw(140)">
-                    <lPainterView :css="'width:'+tovw(56)+';height:'+tovw(56)+';border-radius:50%;background:#ffffff'">
-                        <lPainterImage :src="userInfo.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'" :css="'width:'+tovw(56)+';height:'+tovw(56)+';border-radius:50%;border: 2px solid #FFFFFF'" object-fit="fill" />
-                    </lPainterView>
-                    <lPainterView :css="'display: flex;align-items: center;align-content: center;font-family: Source Han Sans SC, Source Han Sans SC;padding-top:'+tovw(10)">
-                        <lPainterText :text="userInfo.name||'暂无'" :css="'font-weight: 500;font-size: '+tovw(18)+';color: #333333;'"></lPainterText>
-                        <lPainterView :css="'border: 1px solid #C30D23;padding-top:'+tovw(5)+';padding-bottom:'+tovw(5)+';padding-left:'+tovw(5)+';padding-right:'+tovw(5)+';margin-top:'+tovw(15)+';margin-bottom:'+tovw(15)+';margin-left:'+tovw(12)+';margin-right:'+tovw(12)+';color: #C30D23;border-radius:'+tovw(10)"><lPainterText :text="userInfo.rolenames||'暂无'" :css="'font-size:'+tovw(10)"></lPainterText></lPainterView>
-                    </lPainterView>
+        <lPainterView
+          :css="
+            'display: flex;flex-direction: column;margin:auto;align-items: center;position: absolute;bottom: ' +
+            tovw(25) +
+            ';width:' +
+            tovw(140)
+          "
+        >
+          <lPainterView
+            :css="
+              'width:' +
+              tovw(56) +
+              ';height:' +
+              tovw(56) +
+              ';border-radius:50%;background:#ffffff'
+            "
+          >
+            <lPainterImage
+              :src="
+                userInfo.headpic ||
+                'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'
+              "
+              :css="
+                'width:' +
+                tovw(56) +
+                ';height:' +
+                tovw(56) +
+                ';border-radius:50%;border: 2px solid #FFFFFF'
+              "
+              object-fit="fill"
+            />
+          </lPainterView>
+          <lPainterView
+            :css="
+              'display: flex;align-items: center;align-content: center;font-family: Source Han Sans SC, Source Han Sans SC;padding-top:' +
+              tovw(10)
+            "
+          >
+            <lPainterText
+              :text="userInfo.name || '暂无'"
+              :css="
+                'font-weight: 500;font-size: ' + tovw(18) + ';color: #333333;'
+              "
+            ></lPainterText>
+            <lPainterView
+              :css="
+                'border: 1px solid #C30D23;padding-top:' +
+                tovw(5) +
+                ';padding-bottom:' +
+                tovw(5) +
+                ';padding-left:' +
+                tovw(5) +
+                ';padding-right:' +
+                tovw(5) +
+                ';margin-top:' +
+                tovw(15) +
+                ';margin-bottom:' +
+                tovw(15) +
+                ';margin-left:' +
+                tovw(12) +
+                ';margin-right:' +
+                tovw(12) +
+                ';color: #C30D23;border-radius:' +
+                tovw(10)
+              "
+              ><lPainterText
+                :text="userInfo.rolenames || '暂无'"
+                :css="'font-size:' + tovw(10)"
+              ></lPainterText
+            ></lPainterView>
+          </lPainterView>
 
-                    <lPainterView :css="'margin-bottom: '+tovw(10)+';display: flex;align-items: center;align-content: center;align-self: self-start'">
-                        <lPainterImage src="/static/workbench/手机.svg" :css="'width:'+tovw(14)+';height:'+tovw(14)"></lPainterImage>
-                        <lPainterText :css="'margin-left: '+tovw(10)+';font-weight: 400;font-size: '+tovw(12)+';color: #666666;'" :text="userInfo.phonebumber||'暂无'"></lPainterText>
-                    </lPainterView>
+          <lPainterView
+            :css="
+              'margin-bottom: ' +
+              tovw(10) +
+              ';display: flex;align-items: center;align-content: center;align-self: self-start'
+            "
+          >
+            <lPainterImage
+              src="/static/workbench/手机.svg"
+              :css="'width:' + tovw(14) + ';height:' + tovw(14)"
+            ></lPainterImage>
+            <lPainterText
+              :css="
+                'margin-left: ' +
+                tovw(10) +
+                ';font-weight: 400;font-size: ' +
+                tovw(12) +
+                ';color: #666666;'
+              "
+              :text="userInfo.phonebumber || '暂无'"
+            ></lPainterText>
+          </lPainterView>
 
-                    <lPainterView :css="'margin-bottom: '+tovw(21)+';display: flex;align-items: center;align-content: center;align-self: self-start'">
-                        <lPainterImage src="/static/workbench/邮箱.svg" :css="'width:'+tovw(14)+';height:'+tovw(14)"></lPainterImage>
-                        <lPainterText :css="'margin-left: '+tovw(10)+';font-weight: 400;font-size: '+tovw(12)+';color: #666666;'" :text="userInfo.email||'暂无'"></lPainterText>
-                    </lPainterView>
+          <lPainterView
+            :css="
+              'margin-bottom: ' +
+              tovw(21) +
+              ';display: flex;align-items: center;align-content: center;align-self: self-start'
+            "
+          >
+            <lPainterImage
+              src="/static/workbench/邮箱.svg"
+              :css="'width:' + tovw(14) + ';height:' + tovw(14)"
+            ></lPainterImage>
+            <lPainterText
+              :css="
+                'margin-left: ' +
+                tovw(10) +
+                ';font-weight: 400;font-size: ' +
+                tovw(12) +
+                ';color: #666666;'
+              "
+              :text="userInfo.email || '暂无'"
+            ></lPainterText>
+          </lPainterView>
 
-                    <lPainterView :css="'display: flex;flex-direction: column;align-content: center;align-items: center;font-weight: 400;font-size: '+tovw(10)+';color: #999999'">
-                        <lPainterQrcode :text="qrCode + 'callingCard?userid=' + userid" :css="'width: '+tovw(70)+'; height: '+tovw(70)+';color:#000;'" />
-                        <lPainterText :css="'font-weight: 400;font-size: '+tovw(12)+';color: #666666;margin-top:'+tovw(5)" :text="'请长按扫码'"></lPainterText>
-                    </lPainterView>
-                </lPainterView>
-            </lPainterView>
-            
-        </lPainter>
-        <view class="bottom">
-            <view class="but" @click="loading?'':saveTheImage()" hover-class="navigator-hover">
-                <u-loading-icon v-if="loading" color="#fff" />
-                <text v-else>保存名片海报</text>
-            </view>
-        </view>
-        
+          <lPainterView
+            :css="
+              'display: flex;flex-direction: column;align-content: center;align-items: center;font-weight: 400;font-size: ' +
+              tovw(10) +
+              ';color: #999999'
+            "
+          >
+            <lPainterQrcode
+              :text="qrCode + 'callingCard?userid=' + userid"
+              :css="
+                'width: ' + tovw(70) + '; height: ' + tovw(70) + ';color:#000;'
+              "
+            />
+            <lPainterText
+              :css="
+                'font-weight: 400;font-size: ' +
+                tovw(12) +
+                ';color: #666666;margin-top:' +
+                tovw(5)
+              "
+              :text="'请长按扫码'"
+            ></lPainterText>
+          </lPainterView>
+        </lPainterView>
+      </lPainterView>
+    </lPainter>
+    <view class="bottom">
+      <view
+        class="but"
+        @click="loading ? '' : saveTheImage()"
+        hover-class="navigator-hover"
+      >
+        <u-loading-icon v-if="loading" color="#fff" />
+        <text v-else>保存名片海报</text>
+      </view>
     </view>
+  </view>
 </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 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 {
-            userInfo:{},
-            userid:'',
-            imageUrl:'',
-            qrCode: this.qrCodePrefix,
-            loading:false
-        }
-    },
-    methods: {
-        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;
-                        },
-                        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,
-                                })
-                            }
-                        },
+  components: {
+    lPainter,
+    lPainterView,
+    lPainterText,
+    lPainterImage,
+    lPainterQrcode,
+  },
+  data() {
+    return {
+      userInfo: {},
+      userid: "",
+      imageUrl: "",
+      qrCode: this.qrCodePrefix,
+      loading: false,
+    };
+  },
+  methods: {
+    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;
+            },
+            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,
+                });
+              }
+            },
+          });
         },
-        async getuserInfo (id) {
-            let res = await this.$Http.basic({
-                "id": 20240514161502,
-                "content": {
-                    userid:this.userid
-                },
-            })
-            if (this.cutoff(res.msg)) return;
-            this.userInfo = res.data
-            this.userInfo.headpic = this.userInfo.attinfos.find(v => v.usetype == "headportrait") && this.userInfo.attinfos.find(v => v.usetype == "headportrait").url || '';
-            console.log(this.userInfo,'用户信息');
+      });
+    },
+    async getuserInfo(id) {
+      let res = await this.$Http.basic({
+        id: 20240514161502,
+        content: {
+          userid: this.userid,
         },
-        async getImages () {
-            let res = await this.$Http.basic({
-                id:20240426154302,
-                content: {
-                    systemclient:'wechatsaletool',
-                    locations:['business_card']
-                }
-            })
-            if (res.data.business_card.length) {
-                this.imageUrl = res.data.business_card[0].attinfos.length && res.data.business_card[0].attinfos[0].url
-            }
-            console.log(this.imageUrl,'海报广告图');
-        }  
+      });
+      if (this.cutoff(res.msg)) return;
+      this.userInfo = res.data;
+      this.userInfo.headpic =
+        (this.userInfo.attinfos.find((v) => v.usetype == "headportrait") &&
+          this.userInfo.attinfos.find((v) => v.usetype == "headportrait")
+            .url) ||
+        "";
+      console.log(this.userInfo, "用户信息");
     },
-    onLoad (option) {
-        this.userid = option.id
-        this.getImages()
-        this.getuserInfo()
+    async getImages() {
+      let res = await this.$Http.basic({
+        id: 20240426154302,
+        content: {
+          systemclient: "wechatsaletool",
+          locations: ["business_card"],
+        },
+      });
+      if (res.data.business_card.length) {
+        this.imageUrl =
+          res.data.business_card[0].attinfos.length &&
+          res.data.business_card[0].attinfos[0].url;
+      }
+      console.log(this.imageUrl, "海报广告图");
     },
-    onShareAppMessage(res) {
-        return {
-            title:this.userInfo.name+'的名片',
-            path:'/cloud/businessCard/share?id='+this.userInfo.userid
-        }
-    }
-}
+  },
+  onLoad(option) {
+    this.userid = option.id;
+    this.getImages();
+    this.getuserInfo();
+  },
+  onShareAppMessage(res) {
+    return {
+      title: this.userInfo.name + "的名片",
+      path:
+        "/cloud/businessCard/index?id=" +
+        this.userid +
+        "&shareUserid=" +
+        this.userid,
+    };
+  },
+};
 </script>
 
 <style lang="scss">
 .card-box {
-    width:280px;
-    height: 463px;
-    margin: 20px auto 0 auto;
+  width: 280px;
+  height: 463px;
+  margin: 20px auto 0 auto;
+  box-sizing: border-box;
+  .bottom {
+    display: flex;
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 375px;
+    height: 64px;
+    background: #ffffff;
+    box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
     box-sizing: border-box;
-    .bottom {
-        display: flex;
-        position: fixed;
-        bottom: 0;
-        left: 0;
-        width: 375px;
-        height: 64px;
-        background: #FFFFFF;
-        box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
-        box-sizing: border-box;
-        z-index: 9999999;
-        padding: 10px;
-        .but { 
-            width: 355px;
-            height: 45px;
-            font-family: PingFang SC, PingFang SC;
-            font-weight: 500;
-            font-size: 14px;
-            color: #FFFFFF;
-            background: #C30D23;
-            border-radius: 5px 5px 5px 5px;
-            border: 1px solid #FFFFFF;
-            display: flex;
-            align-items: center;
-            align-content: center;
-            justify-content: space-evenly;
-        }
+    z-index: 9999999;
+    padding: 10px;
+    .but {
+      width: 355px;
+      height: 45px;
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 500;
+      font-size: 14px;
+      color: #ffffff;
+      background: #c30d23;
+      border-radius: 5px 5px 5px 5px;
+      border: 1px solid #ffffff;
+      display: flex;
+      align-items: center;
+      align-content: center;
+      justify-content: space-evenly;
     }
+  }
 }
 </style>

+ 44 - 35
components/bottomForm.vue

@@ -1,46 +1,55 @@
 <template>
-    <view>
-        <bottom1 v-if="bottomType == '默认黑色预约报名样式'" :ownertable="ownertable" :ownerid="ownerid" :type="type" :typemx="typemx"
-            :extrajson="extrajson" />
-        <bottom2 v-else-if="bottomType == '装修预算'" />
-    </view>
+  <view>
+    <bottom1
+      v-if="bottomType == '默认黑色预约报名样式'"
+      :ownertable="ownertable"
+      :ownerid="ownerid"
+      :type="type"
+      :typemx="typemx"
+      :extrajson="extrajson"
+      :shareuserid="shareuserid"
+    />
+    <bottom2 v-else-if="bottomType == '装修预算'" />
+  </view>
 </template>
 
 <script>
-import bottom1 from "./bottomModules/bottom1.vue"
-import bottom2 from "./bottomModules/bottom2.vue"
+import bottom1 from "./bottomModules/bottom1.vue";
+import bottom2 from "./bottomModules/bottom2.vue";
 export default {
-    components: {
-        bottom1,
-        bottom2
+  components: {
+    bottom1,
+    bottom2,
+  },
+  props: {
+    bottomType: {
+      type: String,
+      default: "默认黑色预约报名样式",
     },
-    props: {
-        bottomType: {
-            type: String,
-            default: "默认黑色预约报名样式"
-        },
-        ownertable: {
-            type: String
-        },
-        ownerid: {
-            type: [String, Number]
-        },
-        type: {
-            type: String
-        },
-        typemx: {
-            type: String
-        },
-        extrajson: {
-            type: Object
-        }
+    shareuserid: {
+      type: [String, Number],
+      default: 0,
     },
-    data() {
-        return {
-
-        }
+    ownertable: {
+      type: String,
+    },
+    ownerid: {
+      type: [String, Number],
+    },
+    type: {
+      type: String,
+    },
+    typemx: {
+      type: String,
+    },
+    extrajson: {
+      type: Object,
     },
-}
+  },
+  data() {
+    return {};
+  },
+};
 </script>
 
 <style></style>

+ 309 - 263
components/bottomModules/bottom1.vue

@@ -1,297 +1,343 @@
 <template>
-    <view class="box">
-        <image class="image"
-            src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404111712812810046B1fbafed9.png"
-            lazy-load="true" mode="aspectFill" />
-        <view class="function">
-            <view class="cn-title">预约免费设计</view>
-            <view class="en-title">Appointment Free Design</view>
-            <view class="form">
-                <view class="text" @click="setFocus('姓名')">
-                    <view class="bg" />
-                    <view class="iconfont icon-renyuan-hui" />
-                    <input class="input" :focus="focus == '姓名'" type="text" v-model="content.name" placeholder="请输入您的姓名">
-                </view>
-                <view class="text" @click="setFocus('手机号')">
-                    <view class="bg" />
-                    <view class="iconfont icon-dianhua-hui" />
-                    <input class="input" :focus="focus == '手机号'" :disabled="!manualOperation" type="number"
-                        v-model="content.phonenumber" placeholder="请输入您的电话号码">
-                    <button v-if="!manualOperation" class="button" open-type="getPhoneNumber"
-                        @getphonenumber="getphonenumber">123123323223323222222</button>
-                </view>
-                <picker mode='region' @change="getRegion">
-                    <view class="text">
-                        <view class="bg" />
-                        <view class="iconfont icon-dizhi-hui1" />
-                        <view style="color: #fff;" v-if="content.province">
-                            {{ this.getCity(content, false) }}
-                        </view>
-                        <view v-else style="opacity: .3;color: #fff;font-size: 14px;">
-                            请选择城市
-                        </view>
-                    </view>
-                </picker>
-                <view class="text textarea-box">
-                    <view class="bg" />
-                    <view class="iconfont icon-dizhi-hui1" />
-                    <textarea class="textarea" v-model="content.address" placeholder="请输入您的具体地址(街道、楼号、门牌号等)" />
-                </view>
-                <view v-if="!content.name || !content.phonenumber || !content.province" class="but forbidden"
-                    hover-class="navigator-hover" @click="reminder">
-                    立即免费预约 >
-                </view>
-                <view v-else class="but" hover-class="navigator-hover" @click="loading ? '' : submit()">
-                    <u-loading-icon v-if="loading" />
-                    <text v-else>
-                        立即免费预约 >
-                    </text>
-                </view>
+  <view class="box">
+    <image
+      class="image"
+      src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404111712812810046B1fbafed9.png"
+      lazy-load="true"
+      mode="aspectFill"
+    />
+    <view class="function">
+      <view class="cn-title">预约免费设计</view>
+      <view class="en-title">Appointment Free Design</view>
+      <view class="form">
+        <view class="text" @click="setFocus('姓名')">
+          <view class="bg" />
+          <view class="iconfont icon-renyuan-hui" />
+          <input
+            class="input"
+            :focus="focus == '姓名'"
+            type="text"
+            v-model="content.name"
+            placeholder="请输入您的姓名"
+          />
+        </view>
+        <view class="text" @click="setFocus('手机号')">
+          <view class="bg" />
+          <view class="iconfont icon-dianhua-hui" />
+          <input
+            class="input"
+            :focus="focus == '手机号'"
+            :disabled="!manualOperation"
+            type="number"
+            v-model="content.phonenumber"
+            placeholder="请输入您的电话号码"
+          />
+          <button
+            v-if="!manualOperation"
+            class="button"
+            open-type="getPhoneNumber"
+            @getphonenumber="getphonenumber"
+          >
+            123123323223323222222
+          </button>
+        </view>
+        <picker mode="region" @change="getRegion">
+          <view class="text">
+            <view class="bg" />
+            <view class="iconfont icon-dizhi-hui1" />
+            <view style="color: #fff" v-if="content.province">
+              {{ this.getCity(content, false) }}
+            </view>
+            <view v-else style="opacity: 0.3; color: #fff; font-size: 14px">
+              请选择城市
             </view>
+          </view>
+        </picker>
+        <view class="text textarea-box">
+          <view class="bg" />
+          <view class="iconfont icon-dizhi-hui1" />
+          <textarea
+            class="textarea"
+            v-model="content.address"
+            placeholder="请输入您的具体地址(街道、楼号、门牌号等)"
+          />
         </view>
+        <view
+          v-if="!content.name || !content.phonenumber || !content.province"
+          class="but forbidden"
+          hover-class="navigator-hover"
+          @click="reminder"
+        >
+          立即免费预约 >
+        </view>
+        <view
+          v-else
+          class="but"
+          hover-class="navigator-hover"
+          @click="loading ? '' : submit()"
+        >
+          <u-loading-icon v-if="loading" />
+          <text v-else> 立即免费预约 > </text>
+        </view>
+      </view>
     </view>
+  </view>
 </template>
 <script>
-import contact from "../contact.vue"
+import contact from "../contact.vue";
 export default {
-    components: { contact },
-    name: "bottom1",
-    props: {
-        ownertable: {
-            type: String
-        },
-        ownerid: {
-            type: [String, Number]
-        },
-        type: {
-            type: String
-        },
-        typemx: {
-            type: String
-        },
-        extrajson: {
-            type: Object,
-            default: {}
-        }
+  components: { contact },
+  name: "bottom1",
+  props: {
+    ownertable: {
+      type: String,
     },
-    data() {
-        return {
-            focus: '',
-            loading: false,
-            manualOperation: false,
-            content: {
-                name: "",
-                phonenumber: "",
-                address: "",
-                "province": "",
-                "city": "",
-                "county": "",
-            }
-        }
+    ownerid: {
+      type: [String, Number],
+    },
+    shareuserid: {
+      type: [String, Number],
+      default: 0,
+    },
+    type: {
+      type: String,
+    },
+    typemx: {
+      type: String,
     },
-    methods: {
-        setFocus(name) {
-            this.focus = '';
-            setTimeout(() => {
-                this.focus = name;
-            })
-        },
-        submit() {
-            let content = this.content;
-            content.ownertable = this.ownertable;
-            content.ownerid = this.ownerid;
-            content.type = this.type;
-            content.typemx = this.typemx;
-            content.extrajson = this.extrajson;
-            if (!new RegExp('^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\\d{8}$').test(content.phonenumber)) return uni.showModal({
-                title: '提示',
-                content: '手机号码格式错误',
-                showCancel: false,
-            })
-            this.loading = true;
-            this.$Http.basic({
-                "id": 20240513144602,
-                content
-            }).then(res => {
-                console.log("提交预约单", res)
-                this.loading = false;
-                if (this.cutoff(res.msg)) return;
-                uni.showModal({
-                    title: '提交成功',
-                    content: '感谢您的支持,工作人员会第一时间跟您联系!',
-                    showCancel: false,
-                    confirmColor: '#C30D23',
-                })
-                this.content = {
-                    name: "",
-                    phoneNumber: "",
-                    address: "",
-                    "province": "",
-                    "city": "",
-                    "county": "",
-                };
-            })
-        },
-        getRegion(e) {
-            this.content.province = e.detail.value[0];
-            this.content.city = e.detail.value[1];
-            this.content.county = e.detail.value[2];
-        },
-        reminder() {
-            uni.showToast({
-                title: "请先完成填写后提交",
-                icon: "none",
-                duration: 1500,
-            })
-        },
-        getphonenumber(e) {
-            if (e.detail.code) {
-                this.$Http.basic({
-                    "id": 20240520110702,
-                    "content": {
-                        "systemclient": "marketingtool",
-                        "code": e.detail.code
-                    }
-                }).then(res => {
-                    console.log("获取手机号", res)
-                    this.manualOperation = true;
-                    try {
-                        this.content.phonenumber = res.data.purePhoneNumber;
-                    } catch (error) {
-                        this.focus = '手机号';
-                    }
-                })
-            } else {
-                this.manualOperation = true;
-                this.focus = '手机号';
+    extrajson: {
+      type: Object,
+      default: {},
+    },
+  },
+  data() {
+    return {
+      focus: "",
+      loading: false,
+      manualOperation: false,
+      content: {
+        name: "",
+        phonenumber: "",
+        address: "",
+        province: "",
+        city: "",
+        county: "",
+      },
+    };
+  },
+  methods: {
+    setFocus(name) {
+      this.focus = "";
+      setTimeout(() => {
+        this.focus = name;
+      });
+    },
+    submit() {
+      let content = this.content;
+      content.ownertable = this.ownertable;
+      content.ownerid = this.ownerid;
+      content.type = this.type;
+      content.typemx = this.typemx;
+      content.extrajson = this.extrajson;
+      content.shareuserid = this.shareuserid;
+      if (
+        !new RegExp(
+          "^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\\d{8}$"
+        ).test(content.phonenumber)
+      )
+        return uni.showModal({
+          title: "提示",
+          content: "手机号码格式错误",
+          showCancel: false,
+        });
+      this.loading = true;
+      this.$Http
+        .basic({
+          id: 20240513144602,
+          content,
+        })
+        .then((res) => {
+          console.log("提交预约单", res);
+          this.loading = false;
+          if (this.cutoff(res.msg)) return;
+          uni.showModal({
+            title: "提交成功",
+            content: "感谢您的支持,工作人员会第一时间跟您联系!",
+            showCancel: false,
+            confirmColor: "#C30D23",
+          });
+          this.content = {
+            name: "",
+            phoneNumber: "",
+            address: "",
+            province: "",
+            city: "",
+            county: "",
+          };
+        });
+    },
+    getRegion(e) {
+      this.content.province = e.detail.value[0];
+      this.content.city = e.detail.value[1];
+      this.content.county = e.detail.value[2];
+    },
+    reminder() {
+      uni.showToast({
+        title: "请先完成填写后提交",
+        icon: "none",
+        duration: 1500,
+      });
+    },
+    getphonenumber(e) {
+      if (e.detail.code) {
+        this.$Http
+          .basic({
+            id: 20240520110702,
+            content: {
+              systemclient: "marketingtool",
+              code: e.detail.code,
+            },
+          })
+          .then((res) => {
+            console.log("获取手机号", res);
+            if (this.cutoff(res.msg)) return;
+            this.manualOperation = true;
+            try {
+              this.content.phonenumber = res.data.purePhoneNumber;
+            } catch (error) {
+              this.focus = "手机号";
             }
-        }
+          });
+      } else {
+        this.manualOperation = true;
+        this.focus = "手机号";
+      }
     },
-}
+  },
+};
 </script>
 <style lang="scss" scoped>
 .box {
-    position: relative;
-    width: 100vw;
-    height: 436px;
+  position: relative;
+  width: 100vw;
+  height: 436px;
 
-    .image {
-        width: 100%;
-        height: 100%;
-        display: block;
-        vertical-align: bottom;
-    }
+  .image {
+    width: 100%;
+    height: 100%;
+    display: block;
+    vertical-align: bottom;
+  }
 
-    .function {
-        position: absolute;
-        top: 0;
-        left: 0;
-        width: 100%;
-        height: 100%;
-        z-index: 1;
-
-        .cn-title {
-            width: 100%;
-            text-align: center;
-            line-height: 22px;
-            font-family: PingFang SC, PingFang SC;
-            font-weight: 500;
-            font-size: 16px;
-            color: #FFFFFF;
-            margin-top: 30px;
-        }
+  .function {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 1;
 
-        .en-title {
-            width: 100%;
-            text-align: center;
-            font-family: PingFang SC, PingFang SC;
-            font-size: 10px;
-            color: #FFFFFF;
-        }
+    .cn-title {
+      width: 100%;
+      text-align: center;
+      line-height: 22px;
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 500;
+      font-size: 16px;
+      color: #ffffff;
+      margin-top: 30px;
+    }
 
-        .form {
-            width: 260px;
-            margin: 0 auto;
-            margin-top: 20px;
+    .en-title {
+      width: 100%;
+      text-align: center;
+      font-family: PingFang SC, PingFang SC;
+      font-size: 10px;
+      color: #ffffff;
+    }
 
-            .text {
-                position: relative;
-                display: flex;
-                align-items: center;
-                width: 260px;
-                height: 45px;
-                border: 1px solid rgba(255, 255, 255, 0.4);
-                border-radius: 2px;
-                overflow: hidden;
-                padding: 0 10px;
-                box-sizing: border-box;
-                margin-bottom: 10px;
+    .form {
+      width: 260px;
+      margin: 0 auto;
+      margin-top: 20px;
 
-                .button {
-                    width: 100%;
-                    height: 100%;
-                    position: absolute;
-                    top: 0;
-                    left: 0;
-                    z-index: 2;
-                    opacity: 0;
-                }
+      .text {
+        position: relative;
+        display: flex;
+        align-items: center;
+        width: 260px;
+        height: 45px;
+        border: 1px solid rgba(255, 255, 255, 0.4);
+        border-radius: 2px;
+        overflow: hidden;
+        padding: 0 10px;
+        box-sizing: border-box;
+        margin-bottom: 10px;
 
-                .input {
-                    color: #fff;
-                    flex: 1;
-                }
+        .button {
+          width: 100%;
+          height: 100%;
+          position: absolute;
+          top: 0;
+          left: 0;
+          z-index: 2;
+          opacity: 0;
+        }
 
-                .textarea {
-                    color: #fff;
-                    flex: 1;
-                    height: 62px;
-                }
+        .input {
+          color: #fff;
+          flex: 1;
+        }
 
-                .iconfont {
-                    color: #fff;
-                    font-size: 20px;
-                    margin-right: 10px;
-                }
+        .textarea {
+          color: #fff;
+          flex: 1;
+          height: 62px;
+        }
 
-            }
+        .iconfont {
+          color: #fff;
+          font-size: 20px;
+          margin-right: 10px;
+        }
+      }
 
-            .textarea-box {
-                padding-top: 13px;
-                height: 90px;
-                align-items: flex-start;
-            }
+      .textarea-box {
+        padding-top: 13px;
+        height: 90px;
+        align-items: flex-start;
+      }
 
-            .text::after {
-                content: "";
-                position: absolute;
-                top: 0;
-                left: 0;
-                width: 100%;
-                height: 100%;
-                background: #fff;
-                opacity: .2;
-            }
+      .text::after {
+        content: "";
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        background: #fff;
+        opacity: 0.2;
+      }
 
-            .but {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                width: 260px;
-                height: 45px;
-                background: #C30D23;
-                border-radius: 2px;
+      .but {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 260px;
+        height: 45px;
+        background: #c30d23;
+        border-radius: 2px;
 
-                font-family: PingFang SC, PingFang SC;
-                font-weight: 500;
-                font-size: 14px;
-                color: #FFFFFF;
-            }
-        }
+        font-family: PingFang SC, PingFang SC;
+        font-weight: 500;
+        font-size: 14px;
+        color: #ffffff;
+      }
     }
+  }
 }
 
 .forbidden {
-    opacity: .6;
+  opacity: 0.6;
 }
 </style>

+ 255 - 185
components/bottomModules/bottom2.vue

@@ -1,214 +1,284 @@
 <template>
-    <view class="box">
-        <view class="title">
-            免费帮您获取装修预算
-        </view>
-        <view class="total">
-            今日已有 <text class="num">258</text>位业主申请
-        </view>
-        <view class="input-box" hover-class="navigator-hover" @click="showBathroom = true">
-            <input type="digit" @input="onInput" placeholder="您房子的面积是多少?" style="color: #fff;"
-                placeholder-class="placeholder" />
-            <text class="unit">
-                m²
-            </text>
-        </view>
-        <view class="input-box" hover-class="navigator-hover" @click="showBathroom = true">
-            <view class="value">
-                {{ submitData.bathroom }}
-            </view>
-            <text class="iconfont icon-a-wodetiaozhuan" />
-        </view>
-        <u-action-sheet :actions="bathroomList" :show="showBathroom" cancelText="取消" @close="showBathroom = false"
-            @select="onSelect($event, 'bathroom')" />
-
-        <view class="input-box" hover-class="navigator-hover" @click="showWall = true">
-            <view class="value">
-                {{ submitData.wall }}
-            </view>
-            <text class="iconfont icon-a-wodetiaozhuan" />
-        </view>
-
-        <u-action-sheet :actions="wallList" :show="showWall" cancelText="取消" @close="showWall = false"
-            @select="onSelect($event, 'wall')" />
-
-        <view class="radio-box">
-            <u-radio-group v-model="submitData.type">
-                <u-radio v-for="item in radioList" style="margin-right: 20px;" :key="item.name" activeColor="#E3041F"
-                    labelColor="#FFFFFF" :customStyle="item.customStyle" :labelSize="tovw(14)" :label="item.name"
-                    :name="item.name" />
-            </u-radio-group>
-        </view>
-        <view class="submit" hover-class="navigator-hover" @click="toEstimate">
-            立即估算报价 <text class="iconfont icon-a-wodetiaozhuan" />
-        </view>
-        <view class="evenMore">
-            更多阳台空间、全屋顶墙柜门等报价,请咨询当地专卖店
-        </view>
+  <view class="box">
+    <view class="title"> 免费帮您获取装修预算 </view>
+    <view class="total">
+      今日已有 <text class="num">{{ applyForCount }}</text
+      >位业主申请
     </view>
+    <view
+      class="input-box"
+      hover-class="navigator-hover"
+      @click="areaFocus = true"
+    >
+      <input
+        type="digit"
+        @input="onInput"
+        :focus="areaFocus"
+        @blur="areaFocus = false"
+        placeholder="您房子的面积是多少?"
+        style="color: #fff"
+        placeholder-class="placeholder"
+      />
+      <text class="unit"> m² </text>
+    </view>
+    <view
+      class="input-box"
+      hover-class="navigator-hover"
+      @click="showBathroom = true"
+    >
+      <view class="value">
+        {{ submitData.bathroom }}
+      </view>
+      <text class="iconfont icon-a-wodetiaozhuan" />
+    </view>
+    <u-action-sheet
+      :actions="bathroomList"
+      :show="showBathroom"
+      cancelText="取消"
+      @close="showBathroom = false"
+      @select="onSelect($event, 'bathroom')"
+    />
+
+    <view
+      class="input-box"
+      hover-class="navigator-hover"
+      @click="showWall = true"
+    >
+      <view class="value">
+        {{ submitData.wall }}
+      </view>
+      <text class="iconfont icon-a-wodetiaozhuan" />
+    </view>
+
+    <u-action-sheet
+      :actions="wallList"
+      :show="showWall"
+      cancelText="取消"
+      @close="showWall = false"
+      @select="onSelect($event, 'wall')"
+    />
+
+    <view class="radio-box">
+      <u-radio-group v-model="submitData.type">
+        <u-radio
+          v-for="item in radioList"
+          style="margin-right: 20px"
+          :key="item.name"
+          activeColor="#E3041F"
+          labelColor="#FFFFFF"
+          :customStyle="item.customStyle"
+          :labelSize="tovw(14)"
+          :label="item.name"
+          :name="item.name"
+        />
+      </u-radio-group>
+    </view>
+    <view class="submit" hover-class="navigator-hover" @click="toEstimate">
+      立即估算报价 <text class="iconfont icon-a-wodetiaozhuan" />
+    </view>
+    <view class="evenMore">
+      更多阳台空间、全屋顶墙柜门等报价,请咨询当地专卖店
+    </view>
+  </view>
 </template>
 
 <script>
 export default {
-    name: "bottom2",
-    data() {
-        return {
-            submitData: {
-                "area": "100",
-                "wall": "1个背景墙",
-                "bathroom": "1厨1卫",
-                "type": "毛坯房装修"
-            },
-            radioList: [{
-                name: "毛坯房装修",
-                customStyle: { marginRight: this.tovw(26) }
-            }, {
-                name: "旧房装修",
-                customStyle: { marginRight: this.tovw(26) }
-            }, {
-                name: "精装房焕新"
-            }],
-            showWall: false,
-            showBathroom: false,
-            bathroomList: [{
-                name: '0厨0卫',
-            }, {
-                name: '1厨1卫',
-            }, {
-                name: '1厨2卫',
-            }, {
-                name: '1厨3卫',
-            }, {
-                name: '1厨>3卫',
-            }],
-            wallList: [{
-                name: '0个背景墙',
-            }, {
-                name: '1个背景墙',
-            }, {
-                name: '2个背景墙',
-            }, {
-                name: '3个背景墙',
-            }, {
-                name: '>3个背景墙',
-            }]
-        }
-    },
-    methods: {
-        onSelect({ name }, key) {
-            this.submitData[key] = name;
+  name: "bottom2",
+  data() {
+    return {
+      applyForCount: 0,
+      areaFocus: false,
+      submitData: {
+        area: "100",
+        wall: "1个背景墙",
+        bathroom: "1厨1卫",
+        type: "毛坯房装修",
+      },
+      radioList: [
+        {
+          name: "毛坯房装修",
+          customStyle: { marginRight: this.tovw(26) },
+        },
+        {
+          name: "旧房装修",
+          customStyle: { marginRight: this.tovw(26) },
+        },
+        {
+          name: "精装房焕新",
+        },
+      ],
+      showWall: false,
+      showBathroom: false,
+      bathroomList: [
+        {
+          name: "0厨0卫",
+        },
+        {
+          name: "1厨1卫",
+        },
+        {
+          name: "1厨2卫",
+        },
+        {
+          name: "1厨3卫",
+        },
+        {
+          name: "1厨>3卫",
+        },
+      ],
+      wallList: [
+        {
+          name: "0个背景墙",
+        },
+        {
+          name: "1个背景墙",
+        },
+        {
+          name: "2个背景墙",
+        },
+        {
+          name: "3个背景墙",
         },
-        onInput(e) {
-            this.submitData.area = e.detail.value;
-            console.log("submitData", this.submitData)
+        {
+          name: ">3个背景墙",
         },
-        toEstimate() {
-            uni.navigateTo({
-                url: '/store/budget/result?data=' + JSON.stringify(this.submitData)
-            });
+      ],
+    };
+  },
+  created() {
+    this.$Http
+      .basic({
+        classname: "sysmanage.develop.datafunction.datafunction",
+        method: "execute",
+        content: {
+          functionname: "appointmentcount",
+          parameter: {},
+        },
+      })
+      .then((res) => {
+        if (this.cutoff(res.msg)) return;
+        console.log("获取申请数量", res);
+        if (res.data.length) {
+          this.applyForCount = res.data[0].count;
         }
+      });
+  },
+  methods: {
+    onSelect({ name }, key) {
+      this.submitData[key] = name;
     },
-}
+    onInput(e) {
+      this.submitData.area = e.detail.value;
+      console.log("submitData", this.submitData);
+    },
+    toEstimate() {
+      uni.navigateTo({
+        url: "/store/budget/result?data=" + JSON.stringify(this.submitData),
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
 .box {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    width: 100vw;
-    padding: 30px 0;
-    background: radial-gradient(100% 0% at 50% 50%, #7E7E7E 0%, #787878 100%);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  width: 100vw;
+  padding: 30px 0;
+  background: radial-gradient(100% 0% at 50% 50%, #7e7e7e 0%, #787878 100%);
 
-    /deep/.placeholder {
-        color: #fff;
-        opacity: .6;
-    }
+  /deep/.placeholder {
+    color: #fff;
+    opacity: 0.6;
+  }
 
-    .title {
-        line-height: 22px;
-        font-family: PingFang SC, PingFang SC;
-        font-weight: 500;
-        font-size: 16px;
-        color: #FFFFFF;
-        letter-spacing: 1px;
-    }
+  .title {
+    line-height: 22px;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 500;
+    font-size: 16px;
+    color: #ffffff;
+    letter-spacing: 1px;
+  }
 
-    .total {
-        line-height: 17px;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 12px;
-        color: #FFFFFF;
-        margin-top: 5px;
-        letter-spacing: 1.5px;
-
-        .num {
-            color: #FC9228;
-            padding: 0 5px;
-            letter-spacing: 0px;
-        }
-    }
+  .total {
+    line-height: 17px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 12px;
+    color: #ffffff;
+    margin-top: 5px;
+    letter-spacing: 1.5px;
 
-    .input-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        width: 315px;
-        height: 45px;
-        background: rgba(255, 255, 255, 0.2);
-        border-radius: 2px;
-        border: 1px solid rgba(255, 255, 255, 0.2);
-        box-sizing: border-box;
-        padding: 0 10px;
-        margin-top: 10px;
-
-        .value {
-            color: #FFFFFF;
-            font-size: 14px;
-        }
+    .num {
+      color: #fc9228;
+      padding: 0 5px;
+      letter-spacing: 0px;
+    }
+  }
 
-        .iconfont {
-            color: #FFFFFF;
-            transform: rotate(90deg);
-        }
+  .input-box {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    width: 315px;
+    height: 45px;
+    background: rgba(255, 255, 255, 0.2);
+    border-radius: 2px;
+    border: 1px solid rgba(255, 255, 255, 0.2);
+    box-sizing: border-box;
+    padding: 0 10px;
+    margin-top: 10px;
 
-        .unit {
-            color: #FFFFFF;
-        }
+    .value {
+      color: #ffffff;
+      font-size: 14px;
     }
 
-    .radio-box {
-        height: 20px;
-        line-height: 20px;
-        margin-top: 20px;
+    .iconfont {
+      color: #ffffff;
+      transform: rotate(90deg);
     }
 
-    .submit {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        width: 315px;
-        height: 45px;
-        background: #FC9228;
-        border-radius: 2px;
-        font-family: PingFang SC, PingFang SC;
-        font-weight: 500;
-        font-size: 14px;
-        color: #FFFFFF;
-        margin-top: 20px;
-
-        .iconfont {
-            font-size: 12px;
-            margin-left: 4px;
-        }
+    .unit {
+      color: #ffffff;
     }
+  }
 
-    .evenMore {
-        margin-top: 10px;
-        line-height: 17px;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 12px;
-        color: rgba(255, 255, 255, 0.8);
+  .radio-box {
+    height: 20px;
+    line-height: 20px;
+    margin-top: 20px;
+  }
+
+  .submit {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 315px;
+    height: 45px;
+    background: #fc9228;
+    border-radius: 2px;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 500;
+    font-size: 14px;
+    color: #ffffff;
+    margin-top: 20px;
+
+    .iconfont {
+      font-size: 12px;
+      margin-left: 4px;
     }
+  }
+
+  .evenMore {
+    margin-top: 10px;
+    line-height: 17px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 12px;
+    color: rgba(255, 255, 255, 0.8);
+  }
 }
 </style>

+ 1073 - 837
components/my_form.vue

@@ -1,317 +1,522 @@
 <template>
-    <view>
-        <view class="requiredFieldOnly-head" v-if="requiredFieldOnly">
+  <view>
+    <view class="requiredFieldOnly-head" v-if="requiredFieldOnly">
+      <view class="label"> 基本信息 </view>
+      <view class="content">
+        仅显示必填信息<text style="padding: 0 2.5px" />
+        <u-switch activeColor="#C40C24" v-model="unShowAll" />
+      </view>
+    </view>
+    <slot name="head" />
+    <block v-for="(item, index) in list" :key="item.key">
+      <block v-if="item.isMust || !unShowAll">
+        <!-- 文本输入 -->
+        <view
+          class="input-box"
+          v-if="item.type == 'text'"
+          :style="{
+            marginTop: tovw(item.marginTop || 0),
+            opacity: item.disabled ? 0.7 : 1,
+          }"
+          @click="focusLabel = item.label"
+        >
+          <view class="box" :class="item.unBorBot ? '' : 'borBot'">
             <view class="label">
-                基本信息
+              <text class="must" v-if="item.isMust">*</text>
+              {{ item.label }}:
             </view>
-            <view class="content">
-                仅显示必填信息<text style="padding: 0 2.5px;" /> <u-switch activeColor="#C40C24" v-model="unShowAll" />
+            <view class="content-box" style="flex: 1">
+              <view
+                class="content"
+                style="display: flex; flex: 1; box-sizing: border-box"
+              >
+                <input
+                  v-if="item.inputmode == 'number'"
+                  type="number"
+                  :disabled="item.disabled"
+                  placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
+                  :focus="focusLabel == item.label"
+                  :placeholder="item.placeholder || '请填写' + item.label"
+                  :value="item.value"
+                  style="flex: 1"
+                  @input="onInput($event, index)"
+                  :maxlength="item.maxlength || '499'"
+                  confirm-type="done"
+                />
+                <input
+                  v-else-if="item.inputmode == 'digit'"
+                  type="digit"
+                  :disabled="item.disabled"
+                  placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
+                  :focus="focusLabel == item.label"
+                  :placeholder="item.placeholder || '请填写' + item.label"
+                  :value="item.value"
+                  style="flex: 1"
+                  @input="onInput($event, index)"
+                  :maxlength="item.maxlength || '499'"
+                  confirm-type="done"
+                />
+                <textarea
+                  v-else
+                  :disabled="item.disabled"
+                  placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
+                  auto-height
+                  type="text"
+                  :focus="focusLabel == item.label"
+                  :placeholder="item.placeholder || '请填写' + item.label"
+                  :value="item.value"
+                  style="flex: 1; width: 0; box-sizing: border-box"
+                  @input="onInput($event, index)"
+                  :maxlength="item.maxlength || '499'"
+                  confirm-type="done"
+                />
+                <icon
+                  v-if="item.value && !item.disabled"
+                  class="icon"
+                  type="clear"
+                  size="3.733vw"
+                  @click="onClearInput(index)"
+                />
+                <view style="margin-left: 6px" v-if="item.getPhoneNumber">
+                  <u-button
+                    color="#C30D23"
+                    size="small"
+                    open-type="getPhoneNumber"
+                    @click.stop=""
+                    @getphonenumber="butGetphonenumber($event, index)"
+                  >
+                    获取微信
+                    <text
+                      class="iconfont icon-dianhua-hui"
+                      style="font-size: 12px; margin-left: 3px"
+                    />
+                  </u-button>
+                </view>
+              </view>
+              <view v-if="item.errText" class="err-text">
+                <icon
+                  class="icon"
+                  color="#E3041F"
+                  type="clear"
+                  size="2.733vw"
+                />
+                {{ item.errText }}
+              </view>
             </view>
+          </view>
         </view>
-        <slot name="head" />
-        <block v-for="(item, index) in  list " :key="item.key">
-            <block v-if="item.isMust || !unShowAll">
-                <!-- 文本输入 -->
-                <view class="input-box" v-if="item.type == 'text'"
-                    :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }"
-                    @click="focusLabel = item.label">
-                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
-                        <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
-                            {{ item.label }}:
-                        </view>
-                        <view class="content-box">
-                            <view class="content">
-                                <input v-if="item.inputmode == 'number'" type="number" :disabled="item.disabled"
-                                    placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
-                                    :focus="focusLabel == item.label" :placeholder="item.placeholder || '请填写' + item.label"
-                                    :value="item.value" :style="{ width: item.value ? '220px' : '240px' }"
-                                    @input="onInput($event, index)" :maxlength="item.maxlength || '499'"
-                                    confirm-type="done" />
-                                <input v-else-if="item.inputmode == 'digit'" type="digit" :disabled="item.disabled"
-                                    placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
-                                    :focus="focusLabel == item.label" :placeholder="item.placeholder || '请填写' + item.label"
-                                    :value="item.value" :style="{ width: item.value ? '220px' : '240px' }"
-                                    @input="onInput($event, index)" :maxlength="item.maxlength || '499'"
-                                    confirm-type="done" />
-                                <textarea v-else :disabled="item.disabled"
-                                    placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
-                                    auto-height type="text" :focus="focusLabel == item.label"
-                                    :placeholder="item.placeholder || '请填写' + item.label" :value="item.value"
-                                    :style="{ width: item.value ? '220px' : '240px' }" @input="onInput($event, index)"
-                                    :maxlength="item.maxlength || '499'" confirm-type="done" />
-                                <icon v-if="item.value && !item.disabled" class="icon" type="clear" size="3.733vw"
-                                    @click="onClearInput(index)" />
-                            </view>
-                            <view v-if="item.errText" class="err-text">
-                                <icon class="icon" color="#E3041F" type="clear" size="2.733vw" />
-                                {{ item.errText }}
-                            </view>
-                        </view>
-                    </view>
-                </view>
-                <!-- 文本域 -->
-                <view class="textarea-box" v-else-if="item.type == 'textarea'">
-                    <textarea class="textarea" :class="item.unBorBot ? '' : 'borBot'" :disabled="item.disabled"
-                        placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;" type="text"
-                        :placeholder="item.placeholder || '请填写' + item.label" :value="item.value"
-                        @input="onInput($event, index)" :maxlength="item.maxlength || '499'" confirm-type="done" />
-                </view>
-                <!-- 文本域2 -->
-                <view class="textarea-box2" v-else-if="item.type == 'textarea2'" :style="{ marginTop: tovw(item.marginTop || 0)}">
-                    <view class="label">
-                        <text class="must" v-if="item.isMust">*</text>
-                        {{ item.label }}:
-                    </view>
-                    <textarea class="textarea" :class="item.unBorBot ? '' : 'borBot'" :disabled="item.disabled"
-                        placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;" type="text"
-                        :placeholder="item.placeholder || '请填写' + item.label" :value="item.value"
-                        @input="onInput($event, index)" :maxlength="item.maxlength || '499'" confirm-type="done" />
-                </view>
-                <!-- 自定义选项分类 -->
-                <view class="custom-class-box" v-else-if="item.type == 'customClass'"
-                    :style="{ marginTop: tovw(item.marginTop || 0) }">
-                    <view class="head">
-                        <view class="label">
-                            <text class="must" style="color: #E3041F;" v-if="item.isMust">*</text>
-                            {{ item.label }}
-                        </view>
-                        <view class="state">
-                            {{ item.isMultipleChoice ? '可多选' : '仅单选' }}
-                        </view>
-                    </view>
-                    <view class="options">
-                        <view class="option"
-                            :class="item.isMultipleChoice ? (item.value.includes(option.value) ? 'active' : '') : (item.value == option.value ? 'active' : '')"
-                            v-for=" option  in  item.list " :key="option.value" hover-class="navigator-hover"
-                            @click="changOptions(option.value, index)">
-                            {{ option.remarks }}
-                        </view>
-                    </view>
-                </view>
-                <!-- 选择所在地区 -->
-                <picker class="region" @change="selectRegion($event, index)" mode='region' :disabled="item.disabled"
-                    :value="item.value" v-else-if="item.type == 'region'"
-                    :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }">
-                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
-                        <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
-                            {{ item.label }}:
-                        </view>
-                        <view class="content-box">
-                            <view class="value" v-if="item.value.length">
-                                {{ item.value.join(",") }}
-                            </view>
-                            <view v-else class="placeholder" hover-class="none">
-                                {{ item.placeholder || '请选择' + item.label }}
-                            </view>
-                            <view v-if="!item.disabled" class="iconfont icon-a-wodetiaozhuan" />
-                        </view>
-                    </view>
-                </picker>
-                <!-- 日期 -->
-                <picker class="region" @change="selectRegion($event, index)" mode='date' :disabled="item.disabled"
-                    :value="item.value" v-else-if="item.type == 'date'"
-                    :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }">
-                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
-                        <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
-                            {{ item.label }}:
-                        </view>
-                        <view class="content-box">
-                            <view class="value" v-if="item.value">
-                                {{ item.value }}
-                            </view>
-                            <view v-else class="placeholder" hover-class="none">
-                                {{ item.placeholder || '请选择' + item.label }}
-                            </view>
-                            <view v-if="!item.disabled" class="iconfont icon-a-wodetiaozhuan" />
-                        </view>
-                    </view>
-                </picker>
-                <!-- 上传附件 -->
-                <view class="custom-class-box" v-else-if="item.type == 'upload'"
-                    :style="{ marginTop: tovw(item.marginTop || 0) }">
-                    <view class="head">
-                        <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
-                            {{ item.label }}
-                        </view>
-                        <view class="state">
-                            {{ item.placeholder }}
-                        </view>
-                    </view>
-                    <view class="content">
-                        <view class="file-box" v-for="file in item.value" :key="file.attachmentid">
-                            <image class="image" v-if="file.fileType == 'image'" :src="file.url" mode="aspectFill"
-                                lazy-load="true" @click="previewImg(file)" />
-                            <video v-else-if="file.fileType == 'video'" class="video" :poster="file.subfiles[0].url"
-                                :src="file.url" />
-                            <image class="delete" @click.stop="deleteFile(file, index)"
-                                src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404241713944430197B47af9b2f.png"
-                                mode="widthFix" />
-                        </view>
-                        <My_upload v-if="item.allowUpload" :showLoading="false" :maxCount="item.maxCount || 99"
-                            :accept="item.accept" @uploadCallback="uploadCallback($event, index)"
-                            @onLoading="onUploadLoading($event, index)">
-                            <view class="upload-box"
-                                v-if="item.maxCount ? item.value.length != item.maxCount : item.value.length != 99"
-                                hover-class="navigator-hover">
-                                <u-loading-icon v-if="item.loading" />
-                                <text v-else class="iconfont icon-xiazai" />
-                                <text style="margin-left: 5px;">上传</text>
-                            </view>
-                        </My_upload>
-                    </view>
-                </view>
-                <!-- 开关 -->
-                <view class="region" v-else-if="item.type == 'switch'">
-                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
-                        <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
-                            {{ item.label }}:
-                        </view>
-                        <view class="content-box">
-                            <view />
-                            <u-switch activeColor="#70D95D" v-model="item.value" :disabled="item.disabled"
-                                @change="switchChange($event, index)" />
-                        </view>
-                    </view>
-                </view>
-                <!-- 性别 -->
-                <view class="region" v-else-if="item.type == 'sex'">
-                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
-                        <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
-                            {{ item.label }}:
-                        </view>
-                        <u-radio-group v-model="item.value" placement="row" @change="groupChange($event, index)">
-                            <u-radio :customStyle="{ marginRight: tovw(60) }" label="男" name="男" />
-                            <u-radio label="女" name="女" />
-                        </u-radio-group>
-                    </view>
-                </view>
-                <!-- 单选 -->
-                <view class="region" v-else-if="item.type == 'radio'">
-                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
-                        <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
-                            {{ item.label }}:
-                        </view>
-                        <u-radio-group v-model="item.value" :placement="item.placement || 'row'"
-                            @change="groupChange($event, index)">
-                            <u-radio v-for="option in item.options"
-                                :customStyle="{ marginRight: tovw(option.marginRight || item.marginRight || 0), marginTop: tovw(option.marginTop || item.marginTop || 0) }"
-                                :key="option.label" :label="option.label" :name="option.name" />
-                        </u-radio-group>
-                    </view>
-                </view>
-                <!-- 路由选择器 -->
-                <view class="region" v-else-if="item.type == 'route'"
-                    :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }"
-                    @click="item.disabled ? '' : toRoute(item, index)">
-                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
-                        <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
-                            {{ item.label }}:
-                        </view>
-                        <view class="content-box">
-                            <view class="value" v-if="item.showValue.length">
-                                {{ item.showValue.join(",") }}
-                            </view>
-                            <view v-else class="placeholder" hover-class="none">
-                                {{ item.placeholder || '请选择' + item.label }}
-                            </view>
-                            <view v-if="!item.disabled" class="iconfont icon-a-wodetiaozhuan" />
-                        </view>
-                    </view>
-                </view>
-                <!-- 标签 -->
-                <view class="tag-box custom-class-box " v-else-if="item.type == 'tag'"
-                    :style="{ marginTop: tovw(item.marginTop || 0) }">
-                    <text class="label">{{ item.label }}</text>
-                    <view class="tag-list">
-                        <view class="tag" v-for="tag in item.value" :key="tag">
-                            <text>{{ tag }}</text>
-                            <view @click="delTag(tag, index)" class="del">x</view>
-                        </view>
-                        <view>
-                            <u-modal :title="item.label" :show="showTagModal" style="flex: 0 !important;"
-                                confirmColor='#C30D23' ref="uModal" showCancelButton :asyncClose="false"
-                                @confirm="addTagSend(index)" @cancel="showTagModal = false">
-                                <view class="slot-content">
-                                    <view v-if="item.errText" class="err-text" style="margin-bottom: 10px;">
-                                        <icon class="icon" color="#E3041F" type="clear" size="2.733vw" />
-                                        {{ item.errText }}
-                                    </view>
-                                    <u--input :maxlength="item.maxlength?item.maxlength:'99999'" :focus="showUModal" @input="onTagInput($event, index)"
-                                        :placeholder="item.placeholder || '请输入'" v-model="tagValue" border="bottom"
-                                        clearable />
-                                </view>
-                            </u-modal>
-                            <view class="add-tag" @click="showTagModal = true">+ 添加</view>
-                        </view>
-
-                    </view>
+        <!-- 文本域 -->
+        <view class="textarea-box" v-else-if="item.type == 'textarea'">
+          <textarea
+            class="textarea"
+            :class="item.unBorBot ? '' : 'borBot'"
+            :disabled="item.disabled"
+            placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
+            type="text"
+            :placeholder="item.placeholder || '请填写' + item.label"
+            :value="item.value"
+            @input="onInput($event, index)"
+            :maxlength="item.maxlength || '499'"
+            confirm-type="done"
+          />
+        </view>
+        <!-- 显示标题文本域 参考意见反馈 -->
+        <view
+          class="textarea-box2"
+          v-else-if="item.type == 'textarea2'"
+          :style="{ marginTop: tovw(item.marginTop || 0) }"
+        >
+          <view class="label">
+            <text class="must" v-if="item.isMust">*</text>
+            {{ item.label }}:
+          </view>
+          <textarea
+            class="textarea"
+            :class="item.unBorBot ? '' : 'borBot'"
+            :disabled="item.disabled"
+            placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
+            type="text"
+            :placeholder="item.placeholder || '请填写' + item.label"
+            :value="item.value"
+            @input="onInput($event, index)"
+            :maxlength="item.maxlength || '499'"
+            confirm-type="done"
+          />
+        </view>
+        <!-- 自定义选项分类 -->
+        <view
+          class="custom-class-box"
+          v-else-if="item.type == 'customClass'"
+          :style="{ marginTop: tovw(item.marginTop || 0) }"
+        >
+          <view class="head">
+            <view class="label">
+              <text class="must" style="color: #e3041f" v-if="item.isMust"
+                >*</text
+              >
+              {{ item.label }}
+            </view>
+            <view class="state">
+              {{ item.isMultipleChoice ? "可多选" : "仅单选" }}
+            </view>
+          </view>
+          <view class="options">
+            <view
+              class="option"
+              :class="
+                item.isMultipleChoice
+                  ? item.value.includes(option.value)
+                    ? 'active'
+                    : ''
+                  : item.value == option.value
+                  ? 'active'
+                  : ''
+              "
+              v-for="option in item.list"
+              :key="option.value"
+              hover-class="navigator-hover"
+              @click="changOptions(option.value, index)"
+            >
+              {{ option.remarks }}
+            </view>
+          </view>
+        </view>
+        <!-- 选择所在地区 -->
+        <picker
+          class="region"
+          @change="selectRegion($event, index)"
+          mode="region"
+          :disabled="item.disabled"
+          :value="item.value"
+          v-else-if="item.type == 'region'"
+          :style="{
+            marginTop: tovw(item.marginTop || 0),
+            opacity: item.disabled ? 0.7 : 1,
+          }"
+        >
+          <view class="box" :class="item.unBorBot ? '' : 'borBot'">
+            <view class="label">
+              <text class="must" v-if="item.isMust">*</text>
+              {{ item.label }}:
+            </view>
+            <view class="content-box">
+              <view class="value" v-if="item.value.length">
+                {{ item.value.join(",") }}
+              </view>
+              <view v-else class="placeholder" hover-class="none">
+                {{ item.placeholder || "请选择" + item.label }}
+              </view>
+              <view
+                v-if="!item.disabled"
+                class="iconfont icon-a-wodetiaozhuan"
+              />
+            </view>
+          </view>
+        </picker>
+        <!-- 日期 -->
+        <picker
+          class="region"
+          @change="selectRegion($event, index)"
+          mode="date"
+          :disabled="item.disabled"
+          :value="item.value"
+          v-else-if="item.type == 'date'"
+          :style="{
+            marginTop: tovw(item.marginTop || 0),
+            opacity: item.disabled ? 0.7 : 1,
+          }"
+        >
+          <view class="box" :class="item.unBorBot ? '' : 'borBot'">
+            <view class="label">
+              <text class="must" v-if="item.isMust">*</text>
+              {{ item.label }}:
+            </view>
+            <view class="content-box">
+              <view class="value" v-if="item.value">
+                {{ item.value }}
+              </view>
+              <view v-else class="placeholder" hover-class="none">
+                {{ item.placeholder || "请选择" + item.label }}
+              </view>
+              <view
+                v-if="!item.disabled"
+                class="iconfont icon-a-wodetiaozhuan"
+              />
+            </view>
+          </view>
+        </picker>
+        <!-- 上传附件 -->
+        <view
+          class="custom-class-box"
+          v-else-if="item.type == 'upload'"
+          :style="{ marginTop: tovw(item.marginTop || 0) }"
+        >
+          <view class="head">
+            <view class="label">
+              <text class="must" v-if="item.isMust">*</text>
+              {{ item.label }}
+            </view>
+            <view class="state">
+              {{ item.placeholder }}
+            </view>
+          </view>
+          <view class="content">
+            <view
+              class="file-box"
+              v-for="file in item.value"
+              :key="file.attachmentid"
+            >
+              <image
+                class="image"
+                v-if="file.fileType == 'image'"
+                :src="file.url"
+                mode="aspectFill"
+                lazy-load="true"
+                @click="previewImg(file)"
+              />
+              <video
+                v-else-if="file.fileType == 'video'"
+                class="video"
+                :poster="file.subfiles[0].url"
+                :src="file.url"
+              />
+              <image
+                class="delete"
+                @click.stop="deleteFile(file, index)"
+                src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404241713944430197B47af9b2f.png"
+                mode="widthFix"
+              />
+            </view>
+            <My_upload
+              v-if="item.allowUpload"
+              :showLoading="false"
+              :maxCount="item.maxCount || 99"
+              :accept="item.accept"
+              @uploadCallback="uploadCallback($event, index)"
+              @onLoading="onUploadLoading($event, index)"
+            >
+              <view
+                class="upload-box"
+                v-if="
+                  item.maxCount
+                    ? item.value.length != item.maxCount
+                    : item.value.length != 99
+                "
+                hover-class="navigator-hover"
+              >
+                <u-loading-icon v-if="item.loading" />
+                <text v-else class="iconfont icon-xiazai" />
+                <text style="margin-left: 5px">上传</text>
+              </view>
+            </My_upload>
+          </view>
+        </view>
+        <!-- 开关 -->
+        <view class="region" v-else-if="item.type == 'switch'">
+          <view class="box" :class="item.unBorBot ? '' : 'borBot'">
+            <view class="label">
+              <text class="must" v-if="item.isMust">*</text>
+              {{ item.label }}:
+            </view>
+            <view class="content-box">
+              <view />
+              <u-switch
+                activeColor="#70D95D"
+                v-model="item.value"
+                :disabled="item.disabled"
+                @change="switchChange($event, index)"
+              />
+            </view>
+          </view>
+        </view>
+        <!-- 性别 -->
+        <view class="region" v-else-if="item.type == 'sex'">
+          <view class="box" :class="item.unBorBot ? '' : 'borBot'">
+            <view class="label">
+              <text class="must" v-if="item.isMust">*</text>
+              {{ item.label }}:
+            </view>
+            <u-radio-group
+              v-model="item.value"
+              placement="row"
+              @change="groupChange($event, index)"
+            >
+              <u-radio
+                :customStyle="{ marginRight: tovw(60) }"
+                label="男"
+                name="男"
+              />
+              <u-radio label="女" name="女" />
+            </u-radio-group>
+          </view>
+        </view>
+        <!-- 单选 -->
+        <view class="region" v-else-if="item.type == 'radio'">
+          <view class="box" :class="item.unBorBot ? '' : 'borBot'">
+            <view class="label">
+              <text class="must" v-if="item.isMust">*</text>
+              {{ item.label }}:
+            </view>
+            <u-radio-group
+              v-model="item.value"
+              :placement="item.placement || 'row'"
+              @change="groupChange($event, index)"
+            >
+              <u-radio
+                v-for="option in item.options"
+                :customStyle="{
+                  marginRight: tovw(
+                    option.marginRight || item.marginRight || 0
+                  ),
+                  marginTop: tovw(option.marginTop || item.marginTop || 0),
+                }"
+                :key="option.label"
+                :label="option.label"
+                :name="option.name"
+              />
+            </u-radio-group>
+          </view>
+        </view>
+        <!-- 路由选择器 -->
+        <view
+          class="region"
+          v-else-if="item.type == 'route'"
+          :style="{
+            marginTop: tovw(item.marginTop || 0),
+            opacity: item.disabled ? 0.7 : 1,
+          }"
+          @click="item.disabled ? '' : toRoute(item, index)"
+        >
+          <view class="box" :class="item.unBorBot ? '' : 'borBot'">
+            <view class="label">
+              <text class="must" v-if="item.isMust">*</text>
+              {{ item.label }}:
+            </view>
+            <view class="content-box">
+              <view class="value" v-if="item.showValue.length">
+                {{ item.showValue.join(",") }}
+              </view>
+              <view v-else class="placeholder" hover-class="none">
+                {{ item.placeholder || "请选择" + item.label }}
+              </view>
+              <view
+                v-if="!item.disabled"
+                class="iconfont icon-a-wodetiaozhuan"
+              />
+            </view>
+          </view>
+        </view>
+        <!-- 标签 -->
+        <view
+          class="tag-box custom-class-box"
+          v-else-if="item.type == 'tag'"
+          :style="{ marginTop: tovw(item.marginTop || 0) }"
+        >
+          <text class="label">{{ item.label }}</text>
+          <view class="tag-list">
+            <view class="tag" v-for="tag in item.value" :key="tag">
+              <text>{{ tag }}</text>
+              <view @click="delTag(tag, index)" class="del">x</view>
+            </view>
+            <view>
+              <u-modal
+                :title="item.label"
+                :show="showTagModal"
+                style="flex: 0 !important"
+                confirmColor="#C30D23"
+                ref="uModal"
+                showCancelButton
+                :asyncClose="false"
+                @confirm="addTagSend(index)"
+                @cancel="showTagModal = false"
+              >
+                <view class="slot-content">
+                  <view
+                    v-if="item.errText"
+                    class="err-text"
+                    style="margin-bottom: 10px"
+                  >
+                    <icon
+                      class="icon"
+                      color="#E3041F"
+                      type="clear"
+                      size="2.733vw"
+                    />
+                    {{ item.errText }}
+                  </view>
+                  <u--input
+                    :maxlength="item.maxlength ? item.maxlength : '99999'"
+                    :focus="showUModal"
+                    @input="onTagInput($event, index)"
+                    :placeholder="item.placeholder || '请输入'"
+                    v-model="tagValue"
+                    border="bottom"
+                    clearable
+                  />
                 </view>
-            </block>
-        </block>
-    </view>
+              </u-modal>
+              <view class="add-tag" @click="showTagModal = true">+ 添加</view>
+            </view>
+          </view>
+        </view>
+      </block>
+    </block>
+  </view>
 </template>
 
 <script>
-import { formattedFiles, viewImage } from "../utils/settleFiles.js"
+import { formattedFiles, viewImage } from "../utils/settleFiles.js";
 
 export default {
-    name: "my_form",
-    props: {
-        form: {
-            type: Array,
-            default: []
-        },
-        isUncomplete: {
-            type: Function
-        },
-        onUploading: {
-            type: Function
-        },
-        requiredFieldOnly: {
-            type: Boolean
-        },
-        isShowAll: {
-            type: Function
-        },
-        interrupt: {
-            type: Function
-        }
+  name: "my_form",
+  props: {
+    form: {
+      type: Array,
+      default: [],
     },
-    data() {
-        return {
-            list: [],
-            focusLabel: "",
-            unShowAll: false,
-            showTagModal: false,
-            tagValue: ''
-        }
+    isUncomplete: {
+      type: Function,
     },
-    watch: {
-        form: {
-            handler: function (newVal) {
-                if (newVal) {
-                    this.list = JSON.parse(JSON.stringify(newVal));
-                    setTimeout(() => {
-                        this.verify()
-                    }, 200);
-                }
-            },
-            immediate: true,
-        },
-        unShowAll: function (newVal) {
-            this.$emit("isShowAll", newVal)
+    onUploading: {
+      type: Function,
+    },
+    requiredFieldOnly: {
+      type: Boolean,
+    },
+    isShowAll: {
+      type: Function,
+    },
+    interrupt: {
+      type: Function,
+    },
+  },
+  data() {
+    return {
+      list: [],
+      focusLabel: "",
+      unShowAll: false,
+      showTagModal: false,
+      tagValue: "",
+    };
+  },
+  watch: {
+    form: {
+      handler: function (newVal) {
+        if (newVal) {
+          this.list = JSON.parse(JSON.stringify(newVal));
+          setTimeout(() => {
+            this.verify();
+          }, 200);
         }
+      },
+      immediate: true,
+    },
+    unShowAll: function (newVal) {
+      this.$emit("isShowAll", newVal);
     },
-    async created() {
-        /*     let list = [{
+  },
+  async created() {
+    /*     let list = [{
                 key: "name",
                 type: "text",
                 label: "标题",
@@ -364,615 +569,646 @@ export default {
                 isNum: true,
                 unBorBot: true
             }] */
+  },
+  methods: {
+    delTag(tag, index) {
+      let item = this.list[index];
+      console.log(tag);
+      item.value.splice(item.value.indexOf(tag), 1);
+      this.$set(this.list[index], "value", item.value);
     },
-    methods: {
-        delTag(tag, index) {
-            let item = this.list[index];
-            console.log(tag);
-            item.value.splice(item.value.indexOf(tag), 1)
-            this.$set(this.list[index], 'value', item.value)
-        },
-        addTagSend(index) {
-            let item = this.list[index]
-            if (!item.errText) {
-                item.value.push(this.tagValue)
-                this.$set(this.list[index], 'value', item.value)
-                this.tagValue = ''
-                this.showTagModal = false
-            }
-        },
-        toRoute(item, index) {
-            let url = item.path;
-            if (item.showValue.length) {
-                let obj = JSON.stringify({
-                    value: item.value,
-                    showValue: item.showValue
-                })
-                url += (url.indexOf("?") == -1 ? '?alreadySelecteds=' : '&alreadySelecteds=') + obj
+    addTagSend(index) {
+      let item = this.list[index];
+      if (!item.errText) {
+        item.value.push(this.tagValue);
+        this.$set(this.list[index], "value", item.value);
+        this.tagValue = "";
+        this.showTagModal = false;
+      }
+    },
+    toRoute(item, index) {
+      let url = item.path;
+      if (item.showValue.length) {
+        let obj = JSON.stringify({
+          value: item.value,
+          showValue: item.showValue,
+        });
+        url +=
+          (url.indexOf("?") == -1
+            ? "?alreadySelecteds="
+            : "&alreadySelecteds=") + obj;
+      }
+      uni.navigateTo({
+        url,
+      });
+      this.$Http.routeSelected = function (selected) {
+        this.$emit("interrupt", item, selected, index);
+        delete this.$Http.routeSelected;
+      }.bind(this);
+    },
+    onTagInput(e, index) {
+      let item = this.list[index];
+      item.errText = "";
+      if (item.verify && item.verify.length && this.tagValue != "") {
+        let err = item.verify.find(
+          (r) => !new RegExp(r.reg).test(this.tagValue)
+        );
+        if (err) this.$set(this.list[index], "errText", err.errText);
+      }
+      this.verify();
+    },
+    butGetphonenumber(e, index) {
+      if (e.detail.code) {
+        this.$Http
+          .basic({
+            id: 20240520110702,
+            content: {
+              systemclient: "marketingtool",
+              code: e.detail.code,
+            },
+          })
+          .then((res) => {
+            console.log("获取手机号", res);
+            if (this.cutoff(res.msg)) return;
+            this.$set(this.list[index], "value", res.data.phoneNumber);
+            this.verify();
+          });
+      }
+    },
+    onInput(e, index) {
+      let item = this.list[index];
+      item.errText = "";
+      this.$set(this.list[index], "value", e.detail.value);
+      if (item.verify && item.verify.length && item.value != "") {
+        let err = item.verify.find((r) => !new RegExp(r.reg).test(item.value));
+        if (err) this.$set(this.list[index], "errText", err.errText);
+      }
+      this.verify();
+    },
+    setItem(index, item, back = false) {
+      this.$set(this.list, index, item);
+      this.verify();
+      if (back) uni.navigateBack();
+    },
+    setValue(index, value, back = false) {
+      this.$set(this.list[index], "value", value);
+      this.verify();
+      if (back) uni.navigateBack();
+    },
+    onClearInput(index) {
+      let item = this.list[index];
+      item.errText = "";
+      this.$set(this.list[index], "value", "");
+      this.verify();
+    },
+    switchChange(e, index) {
+      this.$set(this.list[index], "value", e);
+      this.verify();
+    },
+    changOptions(value, index) {
+      let item = this.list[index];
+      if (item.isMultipleChoice) {
+        let i = -1;
+        try {
+          i = item.value.findIndex((v) => v == value);
+        } catch (error) {}
+        if (i == -1) {
+          item.value.push(value);
+        } else {
+          item.value.splice(i, 1);
+        }
+        this.$set(this.list[index], "value", item.value);
+      } else {
+        this.$set(this.list[index], "value", value);
+      }
+      this.verify();
+    },
+    verify() {
+      let list = this.list.filter((v) => v.isMust);
+      let Uncomplete = false;
+      if (list.length)
+        Uncomplete = list.some((v) => {
+          let res = false;
+          if (v.type == "customClass") {
+            if (v.isMultipleChoice) {
+              res = v.value.length == 0;
+            } else {
+              res = v.value == "";
             }
-            uni.navigateTo({
-                url
-            });
-            this.$Http.routeSelected = function (selected) {
-                this.$emit('interrupt', item, selected, index)
-                delete this.$Http.routeSelected;
-            }.bind(this)
-        },
-        onTagInput(e, index) {
-            let item = this.list[index];
-            item.errText = "";
-            if (item.verify && item.verify.length && this.tagValue != '') {
-                let err = item.verify.find(r => !new RegExp(r.reg).test(this.tagValue));
-                if (err) this.$set(this.list[index], 'errText', err.errText)
+          } else if (v.type == "upload") {
+            res = v.value.length == 0;
+          } else if (v.type == "text") {
+            res = v.value == "";
+            if (v.errText) res = true;
+          } else if (v.type == "route") {
+            res = v.showValue.length == 0;
+          } else {
+            res = v.value == "";
+          }
+          return res;
+        });
+      if (!Uncomplete)
+        Uncomplete = this.list.filter((v) => !v.isMust).some((v) => v.errText);
+      this.$emit("isUncomplete", Uncomplete);
+    },
+    previewImg(item) {
+      viewImage(item.url);
+    },
+    uploadCallback(attachmentids, index) {
+      let item = this.list[index];
+      this.$Http
+        .basic({
+          classname: "system.attachment.Attachment",
+          method: "createFileLink",
+          content: {
+            ownertable: item.ownertable,
+            ownerid: item.ownerid,
+            usetype: item.usetype,
+            attachmentids,
+          },
+        })
+        .then((res) => {
+          console.log("绑定附件", res);
+          if (this.cutoff(res.msg)) return;
+          res.data = formattedFiles(res.data);
+          item.value.push(res.data[0]);
+
+          //临时文件
+          if (res.data[0].ownertable == "temporary")
+            try {
+              item.temporarys.push(attachmentids[0]);
+            } catch (error) {
+              item.temporarys = [attachmentids[0]];
             }
-            this.verify()
-        },
-        onInput(e, index) {
-            let item = this.list[index];
-            item.errText = "";
-            this.$set(this.list[index], 'value', e.detail.value)
-            if (item.verify && item.verify.length && item.value != '') {
-                let err = item.verify.find(r => !new RegExp(r.reg).test(item.value));
-                if (err) this.$set(this.list[index], 'errText', err.errText)
+
+          this.$set(this.list[index], "value", item.value);
+          this.verify();
+        });
+    },
+    deleteFiles() {
+      this.list.forEach((v) => {
+        if (v.type == "upload") {
+          let linksids = v.value
+            .filter((v) => v.ownertable == "temporary")
+            .map((v) => v.linksid);
+          if (linksids.length)
+            this.$Http
+              .basic({
+                classname: "system.attachment.Attachment",
+                method: "deleteFileLink",
+                content: {
+                  linksids,
+                },
+              })
+              .then((res) => {
+                console.log("处理删除附件", res);
+                if (this.cutoff(res.msg)) return;
+              });
+        }
+      });
+    },
+    onUploadLoading(e, index) {
+      this.$set(this.list[index], "loading", e);
+      this.$emit("onUploading", e);
+    },
+    groupChange(e, index) {
+      this.$set(this.list[index], "loading", e);
+      this.verify();
+    },
+    selectRegion({ detail }, index) {
+      this.$set(this.list[index], "value", detail.value);
+      this.verify();
+    },
+    deleteFile(flie, index) {
+      let item = this.list[index];
+      item.value = item.value.filter(
+        (v) => v.attachmentid != flie.attachmentid
+      );
+      //临时文件
+      if (flie.ownertable == "temporary") {
+        item.temporarys = item.temporarys.filter((v) => v != flie.attachmentid);
+        this.$Http
+          .basic({
+            classname: "system.attachment.Attachment",
+            method: "deleteFileLink",
+            content: {
+              linksids: [flie.linksid],
+            },
+          })
+          .then((res) => {
+            console.log("处理删除附件", res);
+            if (this.cutoff(res.msg)) return;
+          });
+      } else {
+        try {
+          item.linksids.push(flie.linksid);
+        } catch (error) {
+          item.linksids = [flie.linksid];
+        }
+      }
+      this.$set(this.list[index], "value", item.value);
+      this.verify();
+    },
+    submit() {
+      return new Promise((resolve, reject) => {
+        let res = {};
+        this.list.forEach((v) => {
+          if (v.type == "upload") {
+            res.files = {
+              temporarys: [],
+              linksids: [],
+            };
+            try {
+              res.files.temporarys = v.temporarys || [];
+            } catch (error) {}
+            try {
+              res.files.linksids = v.linksids || [];
+            } catch (error) {}
+          } else if (v.type == "region") {
+            if (v.value.length) {
+              res.province = v.value[0];
+              res.city = v.value[1];
+              res.county = v.value[2];
+            } else {
+              res.province = "";
+              res.city = "";
+              res.county = "";
             }
-            this.verify()
-        },
-        setItem(index, item, back = false) {
-            this.$set(this.list, index, item)
-            this.verify()
-            if (back) uni.navigateBack();
-        },
-        setValue(index, value, back = false) {
-            this.$set(this.list[index], 'value', value)
-            this.verify()
-            if (back) uni.navigateBack();
-        },
-        onClearInput(index) {
-            let item = this.list[index];
-            item.errText = ''
-            this.$set(this.list[index], 'value', '')
-            this.verify()
-        },
-        switchChange(e, index) {
-            this.$set(this.list[index], 'value', e)
-            this.verify()
-        },
-        changOptions(value, index) {
-            let item = this.list[index];
-            if (item.isMultipleChoice) {
-                let i = -1;
-                try {
-                    i = item.value.findIndex(v => v == value)
-                } catch (error) {
-                }
-                if (i == -1) {
-                    item.value.push(value)
-                } else {
-                    item.value.splice(i, 1)
-                }
-                this.$set(this.list[index], 'value', item.value)
+          } else if (v.type == "switch") {
+            if (v.isNum) {
+              res[v.key] = v.value ? 1 : 0;
             } else {
-                this.$set(this.list[index], 'value', value)
+              res[v.key] = v.value;
             }
-            this.verify()
-        },
-        verify() {
-            let list = this.list.filter(v => v.isMust);
-            let Uncomplete = false;
-            if (list.length) Uncomplete = list.some(v => {
-                let res = false;
-                if (v.type == 'customClass') {
-                    if (v.isMultipleChoice) {
-                        res = v.value.length == 0;
-                    } else {
-                        res = v.value == "";
-                    }
-                } else if (v.type == 'upload') {
-                    res = v.value.length == 0;
-                } else if (v.type == 'text') {
-                    res = v.value == "";
-                    if (v.errText) res = true;
-                } else if (v.type == 'route') {
-                    res = v.showValue.length == 0;
-                } else {
-                    res = v.value == "";
-                }
-                return res
-            })
-            if (!Uncomplete) Uncomplete = this.list.filter(v => !v.isMust).some(v => v.errText);
-            this.$emit("isUncomplete", Uncomplete)
-        },
-        previewImg(item) {
-            viewImage(item.url)
-        },
-        uploadCallback(attachmentids, index) {
-            let item = this.list[index];
-            this.$Http.basic({
-                "classname": "system.attachment.Attachment",
-                "method": "createFileLink",
-                "content": {
-                    ownertable: item.ownertable,
-                    ownerid: item.ownerid,
-                    usetype: item.usetype,
-                    attachmentids
-                }
-            }).then(res => {
-                console.log('绑定附件', res)
-                if (this.cutoff(res.msg)) return;
-                res.data = formattedFiles(res.data)
-                item.value.push(res.data[0]);
-
-                //临时文件
-                if (res.data[0].ownertable == "temporary") try {
-                    item.temporarys.push(attachmentids[0])
-                } catch (error) {
-                    item.temporarys = [attachmentids[0]]
-                }
-
-                this.$set(this.list[index], 'value', item.value)
-                this.verify()
-            })
-        },
-        deleteFiles() {
-            this.list.forEach(v => {
-                if (v.type == 'upload') {
-                    let linksids = v.value.filter(v => v.ownertable == "temporary").map(v => v.linksid)
-                    if (linksids.length) this.$Http.basic({
-                        "classname": "system.attachment.Attachment",
-                        "method": "deleteFileLink",
-                        "content": {
-                            linksids
-                        }
-                    }).then(res => {
-                        console.log("处理删除附件", res)
-                        if (this.cutoff(res.msg)) return;
-                    });
-                }
-            });
-        },
-        onUploadLoading(e, index) {
-            this.$set(this.list[index], 'loading', e)
-            this.$emit("onUploading", e)
-        },
-        groupChange(e, index) {
-            this.$set(this.list[index], 'loading', e)
-            this.verify()
-        },
-        selectRegion({ detail }, index) {
-            this.$set(this.list[index], 'value', detail.value)
-            this.verify()
-        },
-        deleteFile(flie, index) {
-            let item = this.list[index];
-            item.value = item.value.filter(v => v.attachmentid != flie.attachmentid)
-            //临时文件
-            if (flie.ownertable == "temporary") {
-                item.temporarys = item.temporarys.filter(v => v != flie.attachmentid)
-                this.$Http.basic({
-                    "classname": "system.attachment.Attachment",
-                    "method": "deleteFileLink",
-                    "content": {
-                        linksids: [flie.linksid]
-                    }
-                }).then(res => {
-                    console.log("处理删除附件", res)
-                    if (this.cutoff(res.msg)) return;
+          } else if (v.type == "route") {
+            if (v.isRadio) {
+              const routeValue =
+                typeof v.value.length == "number"
+                  ? v.value.length
+                    ? v.value[0]
+                    : ""
+                  : v.value || {};
+              if (v.keys) {
+                v.keys.forEach((e) => {
+                  res[e] = routeValue ? routeValue[e] || "" : "";
                 });
+              } else {
+                res[v.key] = {
+                  name: v.showValue[0] || "",
+                  value: routeValue,
+                };
+              }
             } else {
-                try {
-                    item.linksids.push(flie.linksid)
-                } catch (error) {
-                    item.linksids = [flie.linksid]
-                }
+              res[v.key] = {
+                name: v.showValue || [],
+                value: v.value || [],
+              };
             }
-            this.$set(this.list[index], 'value', item.value)
-            this.verify()
-        },
-        submit() {
-            return new Promise((resolve, reject) => {
-                let res = {};
-                this.list.forEach(v => {
-                    if (v.type == 'upload') {
-                        res.files = {
-                            temporarys: [],
-                            linksids: [],
-                        }
-                        try {
-                            res.files.temporarys = v.temporarys || []
-                        } catch (error) {
-
-                        }
-                        try {
-                            res.files.linksids = v.linksids || []
-                        } catch (error) {
-
-                        }
-                    } else if (v.type == 'region') {
-                        if (v.value.length) {
-                            res.province = v.value[0];
-                            res.city = v.value[1];
-                            res.county = v.value[2];
-                        } else {
-                            res.province = ''
-                            res.city = ''
-                            res.county = ''
-                        }
-                    } else if (v.type == 'switch') {
-                        if (v.isNum) {
-                            res[v.key] = v.value ? 1 : 0;
-                        } else {
-                            res[v.key] = v.value;
-                        }
-                    } else if (v.type == 'route') {
-                        if (v.isRadio) {
-                            const routeValue = typeof v.value.length == 'number' ? v.value.length ? v.value[0] : '' : v.value || {}
-                            if (v.keys) {
-                                v.keys.forEach(e => {
-                                    res[e] = routeValue ? routeValue[e] || '' : ''
-                                })
-                            } else {
-                                res[v.key] = {
-                                    name: v.showValue[0] || '',
-                                    value: routeValue
-                                };
-                            }
-                        } else {
-                            res[v.key] = {
-                                name: v.showValue || [],
-                                value: v.value || []
-                            };;
-                        }
-                    } else {
-                        try {
-                            res[v.key] = v.value.trim();
-                        } catch (error) {
-                            res[v.key] = v.value;
-                        }
-                    }
-                })
-                resolve(res)
-            })
-        }
+          } else {
+            try {
+              res[v.key] = v.value.trim();
+            } catch (error) {
+              res[v.key] = v.value;
+            }
+          }
+        });
+        resolve(res);
+      });
     },
-}
+  },
+};
 </script>
 
 
 <style lang="scss">
 .requiredFieldOnly-head {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    width: 100vw;
-    height: 45px;
-    background: #F7F7F7;
-    padding: 0 10px;
-    box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 100vw;
+  height: 45px;
+  background: #f7f7f7;
+  padding: 0 10px;
+  box-sizing: border-box;
 
-    .label {
-        font-family: PingFang SC, PingFang SC;
-        font-weight: bold;
-        font-size: 15px;
-        color: #333333;
-        line-height: 22px;
-    }
+  .label {
+    font-family: PingFang SC, PingFang SC;
+    font-weight: bold;
+    font-size: 15px;
+    color: #333333;
+    line-height: 22px;
+  }
 
-    .content {
-        display: flex;
-        align-items: center;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 14px;
-        color: #999999;
-    }
+  .content {
+    display: flex;
+    align-items: center;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 14px;
+    color: #999999;
+  }
 }
 
 .borBot {
-    border-bottom: 1px #DDDDDD solid;
+  border-bottom: 1px #dddddd solid;
 }
 
 .custom-class-box {
-    width: 100%;
-    background: #fff;
-    padding: 15px 0 15px 10px;
-    box-sizing: border-box;
+  width: 100%;
+  background: #fff;
+  padding: 15px 0 15px 10px;
+  box-sizing: border-box;
 
-    .head {
-        width: 355px;
-        height: 20px;
-        display: flex;
-        justify-content: space-between;
-        align-items: flex-end;
-
-        .label {
-            font-size: 14px;
-            color: #333333;
-            line-height: 20px;
-        }
+  .head {
+    width: 355px;
+    height: 20px;
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-end;
 
-        .state {
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 12px;
-            color: #999999;
-        }
+    .label {
+      font-size: 14px;
+      color: #333333;
+      line-height: 20px;
     }
 
-    .options {
-        display: flex;
-        flex-wrap: wrap;
-
-        .option {
-            padding: 6px 10px;
-            text-align: center;
-            min-width: 81px;
-            font-family: PingFang SC, PingFang SC;
-            font-size: 14px;
-            color: #333333;
-            border-radius: 5px;
-            background: #F2F2F2;
-            margin-top: 10px;
-            margin-right: 10px;
-            box-sizing: border-box;
-        }
+    .state {
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-size: 12px;
+      color: #999999;
+    }
+  }
 
-        .active {
-            background: #C30D23;
-            color: #fff;
-        }
+  .options {
+    display: flex;
+    flex-wrap: wrap;
+
+    .option {
+      padding: 6px 10px;
+      text-align: center;
+      min-width: 81px;
+      font-family: PingFang SC, PingFang SC;
+      font-size: 14px;
+      color: #333333;
+      border-radius: 5px;
+      background: #f2f2f2;
+      margin-top: 10px;
+      margin-right: 10px;
+      box-sizing: border-box;
     }
 
-    .content {
-        .file-box {
-            position: relative;
-            width: 355px;
-            height: 240px;
-            margin-top: 10px;
-
-            .video,
-            .image {
-                width: 355px;
-                height: 240px;
-                border-radius: 5px;
-            }
+    .active {
+      background: #c30d23;
+      color: #fff;
+    }
+  }
 
-            .delete {
-                position: absolute;
-                width: 30px;
-                top: 0;
-                right: 0;
-                z-index: 1;
-            }
-        }
+  .content {
+    .file-box {
+      position: relative;
+      width: 355px;
+      height: 240px;
+      margin-top: 10px;
 
-        .upload-box {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            width: 355px;
-            height: 45px;
-            background: #FFFFFF;
-            border-radius: 5px;
-            border: 1px dashed #C30D23;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 14px;
-            color: #C30D23;
-            margin-top: 10px;
-        }
+      .video,
+      .image {
+        width: 355px;
+        height: 240px;
+        border-radius: 5px;
+      }
+
+      .delete {
+        position: absolute;
+        width: 30px;
+        top: 0;
+        right: 0;
+        z-index: 1;
+      }
+    }
+
+    .upload-box {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      width: 355px;
+      height: 45px;
+      background: #ffffff;
+      border-radius: 5px;
+      border: 1px dashed #c30d23;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-size: 14px;
+      color: #c30d23;
+      margin-top: 10px;
     }
+  }
 }
 
 .textarea-box {
-    width: 100%;
+  width: 100%;
 
-    .textarea {
-        width: 355px;
-        height: 160px;
-        padding: 15px 10px;
-        box-sizing: border-box;
-        margin: 0 auto;
-    }
+  .textarea {
+    width: 355px;
+    height: 160px;
+    padding: 15px 10px;
+    box-sizing: border-box;
+    margin: 0 auto;
+  }
 }
 .textarea-box2 {
-    width: 100%;
-    display: flex;
-    flex-direction: column;
-    background: #ffffff;
-    padding: 15px 0 15px 10px;
-    .label {
-        width: 100px;
-        margin-right: 10px;
-        line-height: 20px;
-        font-family: Source Han Sans SC, Source Han Sans SC;
-        font-size: 14px;
-        color: #666666;
-        flex-shrink: 0;
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  background: #ffffff;
+  padding: 15px 0 15px 10px;
+  .label {
+    width: 100px;
+    margin-right: 10px;
+    line-height: 20px;
+    font-family: Source Han Sans SC, Source Han Sans SC;
+    font-size: 14px;
+    color: #666666;
+    flex-shrink: 0;
 
-        .must {
-            color: #E3041F;
-            margin-right: 5px;
-        }
-    }
-    .textarea {
-        width: 355px;
-        height: 160px;
-        padding: 15px 10px;
-        box-sizing: border-box;
-        margin: 0 auto;
+    .must {
+      color: #e3041f;
+      margin-right: 5px;
     }
+  }
+  .textarea {
+    width: 355px;
+    height: 160px;
+    padding: 15px 10px;
+    box-sizing: border-box;
+    margin: 0 auto;
+  }
 }
 
 .input-box {
-    width: 100vw;
-    background: #fff;
+  width: 100vw;
+  background: #fff;
+  box-sizing: border-box;
+  padding-left: 10px;
+
+  .box {
+    display: flex;
+    width: 100%;
+    min-height: 54.4px;
+    padding: 15px 0;
     box-sizing: border-box;
-    padding-left: 10px;
-
-    .box {
-        display: flex;
-        width: 100%;
-        min-height: 54.4px;
-        padding: 15px 0;
-        box-sizing: border-box;
-        align-items: center;
-    }
+    align-items: center;
+  }
 
-    .label {
-        width: 100px;
-        margin-right: 10px;
-        line-height: 20px;
-        font-family: Source Han Sans SC, Source Han Sans SC;
-        font-size: 14px;
-        color: #666666;
-        flex-shrink: 0;
+  .label {
+    width: 100px;
+    margin-right: 10px;
+    line-height: 20px;
+    font-family: Source Han Sans SC, Source Han Sans SC;
+    font-size: 14px;
+    color: #666666;
+    flex-shrink: 0;
 
-        .must {
-            color: #E3041F;
-            margin-right: 5px;
-        }
+    .must {
+      color: #e3041f;
+      margin-right: 5px;
     }
+  }
 
-    .content-box {
-        padding-right: 10px;
-
-        .content {
-            flex: 1;
-            display: flex;
-            align-items: center;
-            box-sizing: border-box;
-
+  .content-box {
+    padding-right: 10px;
 
+    .content {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      box-sizing: border-box;
 
-            .icon {
-                padding: 5px;
-            }
-        }
-
-        .err-text {
-            font-size: 12px;
-            color: #E3041F;
-            margin-bottom: -12px;
+      .icon {
+        padding: 5px;
+      }
+    }
 
-            .icon {
-                margin-right: 2px;
-            }
-        }
+    .err-text {
+      font-size: 12px;
+      color: #e3041f;
+      margin-bottom: -12px;
 
+      .icon {
+        margin-right: 2px;
+      }
     }
+  }
 }
 
 .region {
-    width: 100vw;
-    background: #fff;
-    box-sizing: border-box;
-    padding: 15px 0 0 10px;
-
-    .box {
-        display: flex;
-        padding-bottom: 15px;
-        padding-right: 10px;
-        box-sizing: border-box;
-
-        .label {
-            width: 100px;
-            margin-right: 10px;
-            line-height: 20px;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 14px;
-            color: #666666;
-            flex-shrink: 0;
-
-            .must {
-                color: #E3041F;
-                margin-right: 5px;
-            }
-        }
+  width: 100vw;
+  background: #fff;
+  box-sizing: border-box;
+  padding: 15px 0 0 10px;
 
-        .content-box {
-            flex: 1;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            height: 20px;
-            line-height: 20px;
-
-            .placeholder {
-                font-family: Source Han Sans SC, Source Han Sans SC;
-                font-size: 14px;
-                color: #BBBBBB;
-            }
+  .box {
+    display: flex;
+    padding-bottom: 15px;
+    padding-right: 10px;
+    box-sizing: border-box;
 
+    .label {
+      width: 100px;
+      margin-right: 10px;
+      line-height: 20px;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-size: 14px;
+      color: #666666;
+      flex-shrink: 0;
 
-        }
+      .must {
+        color: #e3041f;
+        margin-right: 5px;
+      }
     }
 
-}
+    .content-box {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      height: 20px;
+      line-height: 20px;
 
-.tag-box {
-    .label {
-        width: 100px;
-        margin-right: 10px;
-        line-height: 20px;
+      .placeholder {
         font-family: Source Han Sans SC, Source Han Sans SC;
         font-size: 14px;
-        color: #666666;
-        flex-shrink: 0;
+        color: #bbbbbb;
+      }
+    }
+  }
+}
 
-        .must {
-            color: #E3041F;
-            margin-right: 5px;
-        }
+.tag-box {
+  .label {
+    width: 100px;
+    margin-right: 10px;
+    line-height: 20px;
+    font-family: Source Han Sans SC, Source Han Sans SC;
+    font-size: 14px;
+    color: #666666;
+    flex-shrink: 0;
+
+    .must {
+      color: #e3041f;
+      margin-right: 5px;
     }
+  }
 
-    .tag-list {
-        display: flex;
-        align-content: center;
-        align-items: center;
-        flex-wrap: wrap;
-        font-family: PingFang SC, PingFang SC;
-        margin-top: 10px;
-
-        .err-text {
-            font-size: 12px;
-            color: #E3041F;
-            margin-bottom: -12px;
-
-            .icon {
-                margin-right: 2px;
-            }
-        }
+  .tag-list {
+    display: flex;
+    align-content: center;
+    align-items: center;
+    flex-wrap: wrap;
+    font-family: PingFang SC, PingFang SC;
+    margin-top: 10px;
 
-        .tag {
-            padding: 6px 10px;
-            background: #F2F2F2;
-            border-radius: 5px 5px 5px 5px;
-            margin-right: 10px;
-            margin-bottom: 10px;
-            font-weight: 400;
-            font-size: 14px;
-            color: #333333;
-            display: flex;
-            align-items: center;
-            align-content: center;
-            text-align: center;
-
-            &:last-child {
-                margin-right: 0 !important;
-            }
+    .err-text {
+      font-size: 12px;
+      color: #e3041f;
+      margin-bottom: -12px;
 
-            .del {
-                margin-left: 10px;
-                padding: 2px;
-            }
-        }
+      .icon {
+        margin-right: 2px;
+      }
+    }
 
-        .add-tag {
-            border-radius: 5px 5px 5px 5px;
-            border: 1px dashed #C30D23;
-            padding: 6px 20px;
-            color: #C30D23;
-            font-weight: 400;
-            margin-bottom: 10px;
-            font-size: 14px;
-        }
+    .tag {
+      padding: 6px 10px;
+      background: #f2f2f2;
+      border-radius: 5px 5px 5px 5px;
+      margin-right: 10px;
+      margin-bottom: 10px;
+      font-weight: 400;
+      font-size: 14px;
+      color: #333333;
+      display: flex;
+      align-items: center;
+      align-content: center;
+      text-align: center;
+
+      &:last-child {
+        margin-right: 0 !important;
+      }
+
+      .del {
+        margin-left: 10px;
+        padding: 2px;
+      }
+    }
+
+    .add-tag {
+      border-radius: 5px 5px 5px 5px;
+      border: 1px dashed #c30d23;
+      padding: 6px 20px;
+      color: #c30d23;
+      font-weight: 400;
+      margin-bottom: 10px;
+      font-size: 14px;
     }
+  }
 }
 </style>

+ 92 - 72
packageA/advertising/modules/page.vue

@@ -1,96 +1,116 @@
 <template>
-    <view>
-        <block v-if="detail.type == 1">
-            <image v-for="(item, index) in detail.attinfos_pic" :key="item.attachmentid" class="image"
-                :src="item.attinfos[0].url" mode="widthFix" hover-class="navigator-hover" lazy-load="true"
-                @click="onClick(item, index)" />
-        </block>
-        <u-parse v-else-if="detail.type == 3" :content="detail.content" />
-        <bottomForm v-if="detail.sharepagecontrol.style_bottom" :bottomType="detail.sharepagecontrol.style_bottom"
-            :type="detail.sharepagecontrol.style_signup" ownertable="sat_sharematerial" :ownerid="detail.sat_sharematerialid" />
-        <view v-else style="height: 10px;" />
-    </view>
+  <view>
+    <block v-if="detail.type == 1">
+      <image
+        v-for="(item, index) in detail.attinfos_pic"
+        :key="item.attachmentid"
+        class="image"
+        :src="item.attinfos[0].url"
+        mode="widthFix"
+        hover-class="navigator-hover"
+        lazy-load="true"
+        @click="onClick(item, index)"
+      />
+    </block>
+    <u-parse v-else-if="detail.type == 3" :content="detail.content" />
+    <bottomForm
+      v-if="detail.sharepagecontrol.style_bottom"
+      :shareuserid="shareuserid"
+      :bottomType="detail.sharepagecontrol.style_bottom"
+      :type="detail.sharepagecontrol.style_signup"
+      ownertable="sat_sharematerial"
+      :ownerid="detail.sat_sharematerialid"
+    />
+    <view v-else style="height: 10px" />
+  </view>
 </template>
 
 <script>
 import { viewImage } from "../../../utils/settleFiles";
 export default {
-    name: "advertisingPage",
-    data() {
-        return {
-            detail: {
-                type: 1,//1图片 2视频 3图文
-                content: ""
-            },
-        }
+  name: "advertisingPage",
+  props: {
+    shareuserid: {
+      type: [String, Number],
+      default: 0,
     },
-    methods: {
-        getDetail(id) {
-            return new Promise((resolve, reject) => {
-                this.$Http.basic({
-                    "id": "20240408131902",
-                    "content": {
-                        "sat_sharematerialid": id
-                    }
-                }).then(res => {
-                    console.log('获取长图文详情', res)
-                    if (this.cutoff(res.msg)) return;
-                    let tips = '';
-                    if (!res.data.status) {
-                        tips = '数据已过期'
-                    } else {
-                        if (res.data.status != '发布') tips = '敬请期待!'
-                    };
-
-                    if (tips) {
-                        uni.showModal({
-                            title: '提示',
-                            content: tips,
-                            showCancel: false,
-                            complete: (complete) => {
-                                uni.navigateBack();
-                            },
-                        })
-                    } else {
-                        this.detail = res.data;
-                        resolve(res.data)
-                        uni.setNavigationBarTitle({
-                            title: res.data.title,
-                        })
-                    }
-                })
-            })
+  },
+  data() {
+    return {
+      detail: {
+        type: 1, //1图片 2视频 3图文
+        content: "",
+      },
+    };
+  },
+  methods: {
+    getDetail(id) {
+      return new Promise((resolve, reject) => {
+        this.$Http
+          .basic({
+            id: "20240408131902",
+            content: {
+              sat_sharematerialid: id,
+            },
+          })
+          .then((res) => {
+            console.log("获取长图文详情", res);
+            if (this.cutoff(res.msg)) return;
+            let tips = "";
+            if (!res.data.status) {
+              tips = "数据已过期";
+            } else {
+              if (res.data.status != "发布") tips = "敬请期待!";
+            }
 
-        },
-        onClick(item, index) {
-            console.log(item, index)
-            if (item.jumpurl) {
-                uni.navigateTo({
-                    url: item.jumpurl,
-                    fail: (fail) => {
-                        viewImage(item.attinfos[0].url)
-                    },
-                })
+            if (tips) {
+              uni.showModal({
+                title: "提示",
+                content: tips,
+                showCancel: false,
+                complete: (complete) => {
+                  uni.navigateBack();
+                },
+              });
             } else {
-                viewImage(item.attinfos[0].url)
+              this.detail = res.data;
+              resolve(res.data);
+              uni.setNavigationBarTitle({
+                title: res.data.title,
+              });
             }
-        }
+          });
+      });
     },
-}
+    onClick(item, index) {
+      console.log(item, index);
+      if (item.jumpurl) {
+        uni.navigateTo({
+          url: item.jumpurl,
+          fail: (fail) => {
+            viewImage(item.attinfos[0].url);
+          },
+        });
+      } else {
+        viewImage(item.attinfos[0].url);
+      }
+    },
+  },
+};
 </script>
 
 <style lang="scss" >
 image,
 img {
-    display: block;
-    vertical-align: bottom;
+  display: block;
+  vertical-align: bottom;
 }
 
 .image {
-    width: 100vw;
+  width: 100vw;
 }
 
 .image:first-child {
-    margin-top: 0;
+  margin-top: 0;
 }
 </style>

+ 46 - 40
packageA/advertising/shareable.vue

@@ -1,47 +1,53 @@
 <template>
-    <view>
-        <page ref="list" />
-    </view>
+  <view>
+    <page :shareuserid="shareUserid" ref="list" />
+  </view>
 </template>
 
 <script>
 import page from "./modules/page.vue";
+import { winTheCustomer } from "../../utils/share";
 export default {
-    components: { page },
-    data() {
-        return {
-            id: "",
-            detail: {}
-        }
-    },
-    onLoad(options) {
-        if (options.id) {
-            this.id = options.id - 0;
-            setTimeout(() => {
-                this.$refs.list.getDetail(this.id).then(detail => {
-                    this.detail = detail;
-                })
-            }, 100)
-        }
-    },
-
-    methods: {
-        getSheraDate() {
-            let detail = this.detail
-            return {
-                title: detail.title, // 标题
-                path: "/packageA/advertising/shareable?id=" + detail.sat_sharematerialid, // 分享路径
-                imageUrl: this.detail.attinfos.find(v => v.usetype == "avatar").url || ""// 分享图
-            };
-        }
-    },
-    onShareAppMessage(res) {
-        return this.getSheraDate()
-    },
-    onShareTimeline() {
-        return this.getSheraDate()
+  components: { page },
+  data() {
+    return {
+      id: "",
+      detail: {},
+      shareUserid: 0,
+    };
+  },
+  onLoad(options) {
+    this.id = options.id - 0;
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      this.$refs.list.getDetail(this.id).then((detail) => {
+        this.detail = detail;
+      });
+      this.shareUserid = winTheCustomer(options.shareUserid || 0, "长图文", {
+        ownertable: "sat_sharematerial",
+        ownerid: this.id,
+      });
     }
-}
-</script>
-
-<style></style>
+  },
+  methods: {
+    getSheraDate() {
+      let detail = this.detail;
+      return {
+        title: detail.title, // 标题
+        path:
+          "/packageA/advertising/shareable?id=" +
+          detail.sat_sharematerialid +
+          "&shareUserid=" +
+          this.shareUserid, // 分享路径
+        imageUrl: "", // 分享图
+      };
+    },
+  },
+  onShareAppMessage(res) {
+    return this.getSheraDate();
+  },
+  onShareTimeline() {
+    return this.getSheraDate();
+  },
+};
+</script>

+ 21 - 19
packageA/advertising/unshareable.vue

@@ -1,29 +1,31 @@
 <template>
-    <view>
-        <page ref="list" />
-    </view>
+  <view>
+    <page ref="list" />
+  </view>
 </template>
 
 <script>
 import page from "./modules/page.vue";
+import { winTheCustomer } from "../../utils/share";
 export default {
-    components: { page },
-    data() {
-        return {
-
-        }
-    },
-    onLoad(options) {
-        if (options.id) {
-            this.id = options.id - 0;
-            setTimeout(() => {
-                this.$refs.list.getDetail(this.id).then(detail => {
-                    this.detail = detail;
-                })
-            }, 100)
-        }
+  components: { page },
+  data() {
+    return {};
+  },
+  onLoad(options) {
+    this.id = options.id - 0;
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      this.$refs.list.getDetail(this.id).then((detail) => {
+        this.detail = detail;
+      });
+      this.shareUserid = winTheCustomer(options.shareUserid || 0, "长图文", {
+        ownertable: "sat_sharematerial",
+        ownerid: this.id,
+      });
     }
-}
+  },
+};
 </script>
 
 <style></style>

+ 408 - 336
packageCase/imgs/detail.vue

@@ -1,384 +1,456 @@
 <template>
-    <view>
-
-        <swiper class="swiper" circular v-if="slides.length" :indicator-dots="slides.length > 1" indicator-color="#DC808B"
-            indicator-active-color="#C30D23">
-            <swiper-item class="swiper-item" v-for="item in slides" :key="item.url">
-                <image class="image" :src="item.cover" mode="aspectFill" lazy-load="true" />
-                <view class="qrcode" @click="saveQrcode">
-                    <text class="iconfont icon-xiazai" />
-                    二维码
-                </view>
-            </swiper-item>
-        </swiper>
-        <view class="head">
-            <view class="line1">
-                <view class="left">
-                    <text class="iconfont icon-biaoqian" />
-                    {{ detail.renderingstype }}
-                </view>
-                <view class="right" hover-class="navigator-hover"
-                    @click="collectLoading ? '' : handleCollect(detail.iscollect)">
-                    <u-loading-icon v-if="collectLoading" size="20" />
-                    <block v-else>
-                        <text v-if="detail.iscollect == 0" class="iconfont icon-weishoucang" />
-                        <text v-else class="iconfont icon-yishoucang" style="color: #FFC300;" />
-                        收藏
-                    </block>
-                </view>
-            </view>
-            <view class="title">{{ detail.title }}</view>
-            <view class="subtitle" v-if="detail.subtitle">{{ detail.subtitle }}</view>
+  <view>
+    <swiper
+      class="swiper"
+      circular
+      v-if="slides.length"
+      :indicator-dots="slides.length > 1"
+      indicator-color="#DC808B"
+      indicator-active-color="#C30D23"
+    >
+      <swiper-item class="swiper-item" v-for="item in slides" :key="item.url">
+        <image
+          class="image"
+          :src="item.cover"
+          mode="aspectFill"
+          lazy-load="true"
+        />
+        <view class="qrcode" @click="saveQrcode">
+          <text class="iconfont icon-xiazai" />
+          二维码
         </view>
-
-
-        <scroll-view v-if="productList.length" class="product-list" scroll-x lower-threshold="200" enable-flex
-            @scrolltolower="scrolltolower">
-            <navigator class="product" v-for="item in productList" :key="item.sa_fadid"
-                :url="'/packageCase/product/detail?id=' + item.sa_fadid" hover-class="navigator-hover">
-                <u--image :src="item.cover" :lazy-load="true" :width="tovw(112)" :height="tovw(112)" radius="5">
-                    <template v-slot:loading>
-                        <u-loading-icon color="red"></u-loading-icon>
-                    </template>
-                </u--image>
-                <view class="label u-line-1">
-                    {{ item.name }}
-                </view>
-            </navigator>
-        </scroll-view>
-
-
-        <view class="introduce" v-if="detail.notes">
-            <view class="introduce-title">
-                产品介绍
-            </view>
-            <view class="introduce-text">
-                {{ detail.notes }}
-            </view>
+      </swiper-item>
+    </swiper>
+    <view class="head">
+      <view class="line1">
+        <view class="left">
+          <text class="iconfont icon-biaoqian" />
+          {{ detail.renderingstype }}
         </view>
-        <storeInfo />
-        <view style="position: absolute;z-index: -999;top: 0;">
-            <l-painter ref="painter" hidden css="padding:10px;background:#fff;width: 148px;">
-                <l-painter-view>
-                    <l-painter-view css="margin: 0 auto;width: 128px;">
-                        <l-painter-qrcode :text="detail.appleturl" css="width: 128px; height: 128px;color:#000;" />
-                    </l-painter-view>
-                    <l-painter-view css="width: 108px;text-align: center;margin: 10px auto 0;">
-                        <l-painter-text :text="detail.title" />
-                    </l-painter-view>
-                </l-painter-view>
-            </l-painter>
+        <view
+          class="right"
+          hover-class="navigator-hover"
+          @click="collectLoading ? '' : handleCollect(detail.iscollect)"
+        >
+          <u-loading-icon v-if="collectLoading" size="20" />
+          <block v-else>
+            <text
+              v-if="detail.iscollect == 0"
+              class="iconfont icon-weishoucang"
+            />
+            <text
+              v-else
+              class="iconfont icon-yishoucang"
+              style="color: #ffc300"
+            />
+            收藏
+          </block>
         </view>
-        <bottomForm type="效果图" ownertable="sat_sharematerial" :ownerid="sat_sharematerialid" />
+      </view>
+      <view class="title">{{ detail.title }}</view>
+      <view class="subtitle" v-if="detail.subtitle">{{ detail.subtitle }}</view>
     </view>
+
+    <scroll-view
+      v-if="productList.length"
+      class="product-list"
+      scroll-x
+      lower-threshold="200"
+      enable-flex
+      @scrolltolower="scrolltolower"
+    >
+      <navigator
+        class="product"
+        v-for="item in productList"
+        :key="item.sa_fadid"
+        :url="'/packageCase/product/detail?id=' + item.sa_fadid"
+        hover-class="navigator-hover"
+      >
+        <u--image
+          :src="item.cover"
+          :lazy-load="true"
+          :width="tovw(112)"
+          :height="tovw(112)"
+          radius="5"
+        >
+          <template v-slot:loading>
+            <u-loading-icon color="red"></u-loading-icon>
+          </template>
+        </u--image>
+        <view class="label u-line-1">
+          {{ item.name }}
+        </view>
+      </navigator>
+    </scroll-view>
+
+    <view class="introduce" v-if="detail.notes">
+      <view class="introduce-title"> 产品介绍 </view>
+      <view class="introduce-text">
+        {{ detail.notes }}
+      </view>
+    </view>
+    <storeInfo />
+    <view style="position: absolute; z-index: -999; top: 0">
+      <l-painter
+        ref="painter"
+        hidden
+        css="padding:10px;background:#fff;width: 148px;"
+      >
+        <l-painter-view>
+          <l-painter-view css="margin: 0 auto;width: 128px;">
+            <l-painter-qrcode
+              :text="detail.appleturl"
+              css="width: 128px; height: 128px;color:#000;"
+            />
+          </l-painter-view>
+          <l-painter-view
+            css="width: 108px;text-align: center;margin: 10px auto 0;"
+          >
+            <l-painter-text :text="detail.title" />
+          </l-painter-view>
+        </l-painter-view>
+      </l-painter>
+    </view>
+    <bottomForm
+      type="效果图"
+      :shareuserid="shareUserid"
+      ownertable="sat_sharematerial"
+      :ownerid="sat_sharematerialid"
+    />
+  </view>
 </template>
 
 <script>
-import lPainter from "../../uni_modules/lime-painter/components/l-painter/l-painter.vue"
-import lPainterText from "../../uni_modules/lime-painter/components/l-painter-text/l-painter-text.vue"
-import lPainterView from "../../uni_modules/lime-painter/components/l-painter-view/l-painter-view.vue"
-import lPainterQrcode from "../../uni_modules/lime-painter/components/l-painter-qrcode/l-painter-qrcode.vue"
+import { winTheCustomer } from "../../utils/share";
+import lPainter from "../../uni_modules/lime-painter/components/l-painter/l-painter.vue";
+import lPainterText from "../../uni_modules/lime-painter/components/l-painter-text/l-painter-text.vue";
+import lPainterView from "../../uni_modules/lime-painter/components/l-painter-view/l-painter-view.vue";
+import lPainterQrcode from "../../uni_modules/lime-painter/components/l-painter-qrcode/l-painter-qrcode.vue";
 export default {
-    components: { lPainter, lPainterQrcode, lPainterText, lPainterView },
-    data() {
-        return {
-            sat_sharematerialid: null,
-            detail: {},
-            slides: [],
-            collectLoading: false,
-            content: {
-                "pageNumber": 1,
-                "pageTotal": 1,
-                "pageSize": 20,
-                "where": {
-                    "condition": ""
-                }
-            },
-            productList: []
-        }
-    },
-    onLoad(options) {
-        this.sat_sharematerialid = options.id;
-        this.getDetail(true);
-        this.scrolltolower()
-    },
-    methods: {
-        getDetail(init = false) {
-            if (!init) return;
-            this.$Http.basic({
-                "id": 20240415164302,
-                "content": {
-                    "sat_sharematerialid": this.sat_sharematerialid
-                },
-            }).then(res => {
-                console.log("获取效果图详情", res)
-                if (this.cutoff(res.msg)) return;
-                this.detail = res.data;
-                this.slides = res.data.attinfos_pic.map(v => {
-                    return {
-                        cover: this.getSpecifiedImage(v.attinfos[0], 'compressed'),
-                        url: v.attinfos[0].url
-                    }
-                })
-                uni.setNavigationBarTitle({
-                    title: res.data.title
-                });
-            })
-        },
-        handleCollect(iscollect) {
-            this.collectLoading = true;
-            this.$Http.basic({
-                "id": 20240416133702,
-                "content": {
-                    "ownertable": "sat_sharematerial",
-                    "ownerid": this.detail.sat_sharematerialid,
-                    "type": 1
-                },
-            }).then(res => {
-                console.log("收藏", res)
-                this.collectLoading = false;
-                if (this.cutoff(res.msg)) return;
-                this.detail.iscollect = iscollect ? 0 : 1
-            })
-        },
-        saveQrcode() {
-            let that = this;
-            that.$refs.painter.canvasToTempFilePathSync({
-                fileType: "jpg",
-                // 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url
-                pathType: 'url',
-                quality: 1,
-                success: (res) => {
-                    console.log(res.tempFilePath);
-                    // 非H5 保存到相册
-                    // H5 提示用户长按图另存
-                    uni.saveImageToPhotosAlbum({
-                        filePath: res.tempFilePath,
-                        success: function (e) {
-                            uni.showModal({
-                                title: '提示',
-                                content: '图片已保存到系统相册',
-                                showCancel: false
-                            })
-                            that.loading = false;
-                        },
-                        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,
-                                })
-                            }
-                        },
-                    });
-                },
-            });
+  components: { lPainter, lPainterQrcode, lPainterText, lPainterView },
+  data() {
+    return {
+      sat_sharematerialid: null,
+      detail: {},
+      slides: [],
+      collectLoading: false,
+      content: {
+        pageNumber: 1,
+        pageTotal: 1,
+        pageSize: 20,
+        where: {
+          condition: "",
         },
-        getSheraDate() {
-            let detail = this.detail
+      },
+      productList: [],
+      shareUserid: 0,
+    };
+  },
+  onLoad(options) {
+    this.sat_sharematerialid = options.id;
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      this.getDetail(true);
+      this.scrolltolower();
+      this.shareUserid = winTheCustomer(options.shareUserid || 0, "效果图", {
+        ownertable: "sat_sharematerial",
+        ownerid: this.sat_sharematerialid,
+      });
+    }
+  },
+  methods: {
+    getDetail(init = false) {
+      if (!init) return;
+      this.$Http
+        .basic({
+          id: 20240415164302,
+          content: {
+            sat_sharematerialid: this.sat_sharematerialid,
+          },
+        })
+        .then((res) => {
+          console.log("获取效果图详情", res);
+          if (this.cutoff(res.msg)) return;
+          this.detail = res.data;
+          this.slides = res.data.attinfos_pic.map((v) => {
             return {
-                title: detail.title, // 标题
-                path: "/packageCase/imgs/detail?id=" + detail.sat_sharematerialid, // 分享路径
-                imageUrl: this.detail.attinfos.find(v => v.usetype == "sat_sharematerial").url || ""// 分享图
+              cover: this.getSpecifiedImage(v.attinfos[0], "compressed"),
+              url: v.attinfos[0].url,
             };
+          });
+          uni.setNavigationBarTitle({
+            title: res.data.title,
+          });
+        });
+    },
+    handleCollect(iscollect) {
+      this.collectLoading = true;
+      this.$Http
+        .basic({
+          id: 20240416133702,
+          content: {
+            ownertable: "sat_sharematerial",
+            ownerid: this.detail.sat_sharematerialid,
+            type: 1,
+          },
+        })
+        .then((res) => {
+          console.log("收藏", res);
+          this.collectLoading = false;
+          if (this.cutoff(res.msg)) return;
+          this.detail.iscollect = iscollect ? 0 : 1;
+        });
+    },
+    saveQrcode() {
+      let that = this;
+      that.$refs.painter.canvasToTempFilePathSync({
+        fileType: "jpg",
+        // 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url
+        pathType: "url",
+        quality: 1,
+        success: (res) => {
+          console.log(res.tempFilePath);
+          // 非H5 保存到相册
+          // H5 提示用户长按图另存
+          uni.saveImageToPhotosAlbum({
+            filePath: res.tempFilePath,
+            success: function (e) {
+              uni.showModal({
+                title: "提示",
+                content: "图片已保存到系统相册",
+                showCancel: false,
+              });
+              that.loading = false;
+            },
+            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,
+                });
+              }
+            },
+          });
         },
-        scrolltolower() {
-            let content = this.content;
-            content.sat_sharematerialid = this.sat_sharematerialid;
-            if (content.pageNumber > content.pageTotal) return console.log("已加载全部单品")
-            this.$Http.basic({
-                "id": 20240419135802,
-                content
-            }).then(res => {
-                console.log("关联单品", res)
-                if (this.cutoff(res.msg)) return;
-                res.data = res.data.map(v => {
-                    v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "sa_fad") || v.attinfos[0]) : uni.getStorageSync("site").logo || ''
-                    return v
-                })
-                this.productList = res.pageNumber == 1 ? res.data : this.productList.concat(res.data);
-                content.pageNumber = res.pageNumber + 1;
-                content.pageTotal = res.pageTotal;
-            })
-        }
+      });
     },
-    onShareAppMessage(res) {
-        return this.getSheraDate()
+    getSheraDate() {
+      let detail = this.detail;
+      return {
+        title: detail.title, // 标题
+        path:
+          "/packageCase/imgs/detail?id=" +
+          detail.sat_sharematerialid +
+          "&shareUserid=" +
+          this.shareUserid, // 分享路径
+        imageUrl:
+          this.detail.attinfos.find((v) => v.usetype == "sat_sharematerial")
+            .url || "", // 分享图
+      };
     },
-    onShareTimeline() {
-        return this.getSheraDate()
-    }
-}
+    scrolltolower() {
+      let content = this.content;
+      content.sat_sharematerialid = this.sat_sharematerialid;
+      if (content.pageNumber > content.pageTotal)
+        return console.log("已加载全部单品");
+      this.$Http
+        .basic({
+          id: 20240419135802,
+          content,
+        })
+        .then((res) => {
+          console.log("关联单品", res);
+          if (this.cutoff(res.msg)) return;
+          res.data = res.data.map((v) => {
+            v.cover = v.attinfos.length
+              ? this.getSpecifiedImage(
+                  v.attinfos.find((s) => s.usetype == "sa_fad") || v.attinfos[0]
+                )
+              : uni.getStorageSync("site").logo || "";
+            return v;
+          });
+          this.productList =
+            res.pageNumber == 1 ? res.data : this.productList.concat(res.data);
+          content.pageNumber = res.pageNumber + 1;
+          content.pageTotal = res.pageTotal;
+        });
+    },
+  },
+  onShareAppMessage(res) {
+    return this.getSheraDate();
+  },
+  onShareTimeline() {
+    return this.getSheraDate();
+  },
+};
 </script>
 
 <style lang="scss">
 .swiper {
-    width: 375px;
-    height: 231px;
-    background: #F5F5F5;
-    border-radius: 5px;
-    box-sizing: border-box;
+  width: 375px;
+  height: 231px;
+  background: #f5f5f5;
+  border-radius: 5px;
+  box-sizing: border-box;
 
-    .swiper-item {
-        position: relative;
-        width: 100%;
-        height: 100%;
+  .swiper-item {
+    position: relative;
+    width: 100%;
+    height: 100%;
 
-        .image {
-            width: 100%;
-            height: 100%;
-        }
-
-        .qrcode {
-            position: absolute;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            top: 10px;
-            right: 10px;
-            width: 70px;
-            height: 25px;
-            background: rgba($color: #333333, $alpha: 0.5);
-            font-size: 12px;
-            color: #FFFFFF;
-
-            .iconfont {
-                margin-right: 4px;
-            }
-        }
+    .image {
+      width: 100%;
+      height: 100%;
     }
 
+    .qrcode {
+      position: absolute;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      top: 10px;
+      right: 10px;
+      width: 70px;
+      height: 25px;
+      background: rgba($color: #333333, $alpha: 0.5);
+      font-size: 12px;
+      color: #ffffff;
 
+      .iconfont {
+        margin-right: 4px;
+      }
+    }
+  }
 }
 
 .head {
-    background: #fff;
-    padding: 8px 10px 15px;
-    margin-bottom: 10px;
+  background: #fff;
+  padding: 8px 10px 15px;
+  margin-bottom: 10px;
 
-    .line1 {
-        display: flex;
-        justify-content: space-between;
-        align-items: flex-end;
+  .line1 {
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-end;
 
-        .left {
-            .iconfont {
-                margin-right: 4px;
-                font-size: 12px;
-            }
+    .left {
+      .iconfont {
+        margin-right: 4px;
+        font-size: 12px;
+      }
 
-            line-height: 17px;
-            font-size: 12px;
-            color: #999999;
-        }
+      line-height: 17px;
+      font-size: 12px;
+      color: #999999;
+    }
 
-        .right {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            width: 80px;
-            height: 24px;
-            border-radius: 12px;
-            border: 1px solid #CCCCCC;
-            font-family: PingFang SC, PingFang SC;
-            font-size: 12px;
-            color: #333333;
+    .right {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 80px;
+      height: 24px;
+      border-radius: 12px;
+      border: 1px solid #cccccc;
+      font-family: PingFang SC, PingFang SC;
+      font-size: 12px;
+      color: #333333;
 
-            .iconfont {
-                margin-right: 5px;
-            }
-        }
+      .iconfont {
+        margin-right: 5px;
+      }
     }
+  }
 
-    .title {
-        line-height: 20px;
-        font-family: PingFang SC, PingFang SC;
-        font-weight: bold;
-        font-size: 14px;
-        color: #333333;
-        margin: 10px 0;
-    }
+  .title {
+    line-height: 20px;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: bold;
+    font-size: 14px;
+    color: #333333;
+    margin: 10px 0;
+  }
 
-    .subtitle {
-        line-height: 17px;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 12px;
-        color: #666666;
-    }
+  .subtitle {
+    line-height: 17px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 12px;
+    color: #666666;
+  }
 }
 
 .product-list {
-    display: flex;
-    width: 100vw;
-    height: 162px;
-    white-space: nowrap;
-    box-sizing: border-box;
-    padding-top: 10px;
-    background: #fff;
-    margin-bottom: 10px;
+  display: flex;
+  width: 100vw;
+  height: 162px;
+  white-space: nowrap;
+  box-sizing: border-box;
+  padding-top: 10px;
+  background: #fff;
+  margin-bottom: 10px;
 
-    .product {
-        width: 112px;
-        height: 142px;
-        margin-left: 10px;
-        flex-shrink: 0;
-        background: #fff;
+  .product {
+    width: 112px;
+    height: 142px;
+    margin-left: 10px;
+    flex-shrink: 0;
+    background: #fff;
 
-        .label {
-            width: 112px;
-            line-height: 20px;
-            font-family: PingFang SC, PingFang SC;
-            font-size: 14px;
-            color: #333333;
-            margin-top: 10px;
-            white-space: Normal;
-        }
+    .label {
+      width: 112px;
+      line-height: 20px;
+      font-family: PingFang SC, PingFang SC;
+      font-size: 14px;
+      color: #333333;
+      margin-top: 10px;
+      white-space: Normal;
     }
+  }
 }
 
 .introduce {
-    background: #fff;
-    padding: 0 10px;
+  background: #fff;
+  padding: 0 10px;
 
-    &-title {
-        line-height: 45px;
-        background: #FFFFFF;
-        font-family: PingFang SC, PingFang SC;
-        font-weight: bold;
-        font-size: 16px;
-        color: #333333;
-    }
+  &-title {
+    line-height: 45px;
+    background: #ffffff;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: bold;
+    font-size: 16px;
+    color: #333333;
+  }
 
-    &-text {
-        line-height: 20px;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 14px;
-        color: #333333;
-        padding-bottom: 10px;
-    }
+  &-text {
+    line-height: 20px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 14px;
+    color: #333333;
+    padding-bottom: 10px;
+  }
 }
 </style>

+ 318 - 269
packageCase/product/detail.vue

@@ -1,311 +1,360 @@
 <template>
-    <view>
-        <swiper class="swiper" v-if="slides.length" :indicator-dots="slides.length > 1" indicator-color="#DC808B"
-            indicator-active-color="#C30D23">
-            <swiper-item class="swiper-item" v-for="item in slides" :key="item.url">
-                <image class="image" :src="item.cover" mode="aspectFill" lazy-load="true" />
-                <view class="qrcode" @click="saveQrcode">
-                    <text class="iconfont icon-xiazai" />
-                    二维码
-                </view>
-            </swiper-item>
-        </swiper>
-        <view class="head">
-            <view class="line1">
-                <view class="left">
-                    <text class="iconfont icon-biaoqian" />
-                    {{ detail.mainclassnames }}
-                </view>
-                <view class="right" hover-class="navigator-hover"
-                    @click="collectLoading ? '' : handleCollect(detail.iscollect)">
-                    <u-loading-icon v-if="collectLoading" size="20" />
-                    <block v-else>
-                        <text v-if="detail.iscollect == 0" class="iconfont icon-weishoucang" />
-                        <text v-else class="iconfont icon-yishoucang" style="color: #FFC300;" />
-                        收藏
-                    </block>
-                </view>
-            </view>
-            <view class="title">{{ detail.name }}</view>
-            <view class="subtitle">型号:{{ detail.model || '--' }}</view>
-            <view class="subtitle">尺寸:{{ detail.spec || '--' }}</view>
-            <view class="subtitle">价格:{{ CNY(detail.price) || '--' }}</view>
+  <view>
+    <swiper
+      class="swiper"
+      v-if="slides.length"
+      :indicator-dots="slides.length > 1"
+      indicator-color="#DC808B"
+      indicator-active-color="#C30D23"
+    >
+      <swiper-item class="swiper-item" v-for="item in slides" :key="item.url">
+        <image
+          class="image"
+          :src="item.cover"
+          mode="aspectFill"
+          lazy-load="true"
+        />
+        <view class="qrcode" @click="saveQrcode">
+          <text class="iconfont icon-xiazai" />
+          二维码
         </view>
-        <view class="introduce">
-            <block v-if="detail.content">
-                <view class="introduce-title">
-                    产品介绍
-                </view>
-                <view class="introduce-text">
-                    <u-parse :content="detail.content" />
-                </view>
-            </block>
+      </swiper-item>
+    </swiper>
+    <view class="head">
+      <view class="line1">
+        <view class="left">
+          <text class="iconfont icon-biaoqian" />
+          {{ detail.mainclassnames }}
         </view>
-        <storeInfo />
-        <view style="position: absolute;z-index: -999;top: 0;">
-            <l-painter ref="painter" hidden css="padding:10px;background:#fff;width: 148px;">
-                <l-painter-view>
-                    <l-painter-view css="margin: 0 auto;width: 128px;">
-                        <l-painter-qrcode :text="detail.appleturl" css="width: 128px; height: 128px;color:#000;" />
-                    </l-painter-view>
-                    <l-painter-view css="width: 108px;text-align: center;margin: 10px auto 0;">
-                        <l-painter-text :text="detail.name" />
-                    </l-painter-view>
-                </l-painter-view>
-            </l-painter>
+        <view
+          class="right"
+          hover-class="navigator-hover"
+          @click="collectLoading ? '' : handleCollect(detail.iscollect)"
+        >
+          <u-loading-icon v-if="collectLoading" size="20" />
+          <block v-else>
+            <text
+              v-if="detail.iscollect == 0"
+              class="iconfont icon-weishoucang"
+            />
+            <text
+              v-else
+              class="iconfont icon-yishoucang"
+              style="color: #ffc300"
+            />
+            收藏
+          </block>
         </view>
-        <bottomForm type="产品" ownertable="sa_fad" :ownerid="sa_fadid" />
+      </view>
+      <view class="title">{{ detail.name }}</view>
+      <view class="subtitle">型号:{{ detail.model || "--" }}</view>
+      <view class="subtitle">尺寸:{{ detail.spec || "--" }}</view>
+      <view class="subtitle">价格:{{ CNY(detail.price) || "--" }}</view>
     </view>
+    <view class="introduce">
+      <block v-if="detail.content">
+        <view class="introduce-title"> 产品介绍 </view>
+        <view class="introduce-text">
+          <u-parse :content="detail.content" />
+        </view>
+      </block>
+    </view>
+    <storeInfo />
+    <view style="position: absolute; z-index: -999; top: 0">
+      <l-painter
+        ref="painter"
+        hidden
+        css="padding:10px;background:#fff;width: 148px;"
+      >
+        <l-painter-view>
+          <l-painter-view css="margin: 0 auto;width: 128px;">
+            <l-painter-qrcode
+              :text="detail.appleturl"
+              css="width: 128px; height: 128px;color:#000;"
+            />
+          </l-painter-view>
+          <l-painter-view
+            css="width: 108px;text-align: center;margin: 10px auto 0;"
+          >
+            <l-painter-text :text="detail.name" />
+          </l-painter-view>
+        </l-painter-view>
+      </l-painter>
+    </view>
+    <bottomForm
+      :shareuserid="shareUserid"
+      type="产品"
+      ownertable="sa_fad"
+      :ownerid="sa_fadid"
+    />
+  </view>
 </template>
 
 <script>
-import lPainter from "../../uni_modules/lime-painter/components/l-painter/l-painter.vue"
-import lPainterText from "../../uni_modules/lime-painter/components/l-painter-text/l-painter-text.vue"
-import lPainterView from "../../uni_modules/lime-painter/components/l-painter-view/l-painter-view.vue"
-import lPainterQrcode from "../../uni_modules/lime-painter/components/l-painter-qrcode/l-painter-qrcode.vue"
+import { winTheCustomer } from "../../utils/share";
+import lPainter from "../../uni_modules/lime-painter/components/l-painter/l-painter.vue";
+import lPainterText from "../../uni_modules/lime-painter/components/l-painter-text/l-painter-text.vue";
+import lPainterView from "../../uni_modules/lime-painter/components/l-painter-view/l-painter-view.vue";
+import lPainterQrcode from "../../uni_modules/lime-painter/components/l-painter-qrcode/l-painter-qrcode.vue";
 export default {
-    components: { lPainter, lPainterQrcode, lPainterText, lPainterView },
-    data() {
-        return {
-            sa_fadid: null,
-            detail: {},
-            slides: [],
-            collectLoading: false
-        }
+  components: { lPainter, lPainterQrcode, lPainterText, lPainterView },
+  data() {
+    return {
+      sa_fadid: null,
+      detail: {},
+      slides: [],
+      collectLoading: false,
+      shareUserid: 0,
+    };
+  },
+  onLoad(options) {
+    this.sa_fadid = options.id;
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      this.getDetail(true);
+      this.shareUserid = winTheCustomer(options.shareUserid || 0, "单品", {
+        ownertable: "sa_fad",
+        ownerid: this.sa_fadid,
+      });
+    }
+  },
+  methods: {
+    getDetail(init = false) {
+      if (!init) return;
+      this.$Http
+        .basic({
+          id: 20240418141002,
+          content: {
+            sa_fadid: this.sa_fadid,
+          },
+        })
+        .then((res) => {
+          console.log("获取单品详情", res);
+          if (this.cutoff(res.msg)) return;
+          this.detail = res.data;
+          this.slides = res.data.attinfos_pic.map((v) => {
+            return {
+              cover: this.getSpecifiedImage(v.attinfos[0], "compressed"),
+              url: v.attinfos[0].url,
+            };
+          });
+          uni.setNavigationBarTitle({
+            title: res.data.name,
+          });
+        });
     },
-    onLoad(options) {
-        this.sa_fadid = options.id;
-        this.getDetail(true);
+    handleCollect(iscollect) {
+      this.collectLoading = true;
+      this.$Http
+        .basic({
+          id: 20240416133702,
+          content: {
+            ownertable: "sa_fad",
+            ownerid: this.detail.sa_fadid,
+            type: 1,
+          },
+        })
+        .then((res) => {
+          console.log("收藏", res);
+          this.collectLoading = false;
+          if (this.cutoff(res.msg)) return;
+          this.detail.iscollect = iscollect ? 0 : 1;
+        });
     },
-    methods: {
-        getDetail(init = false) {
-            if (!init) return;
-            this.$Http.basic({
-                "id": 20240418141002,
-                "content": {
-                    "sa_fadid": this.sa_fadid
-                },
-            }).then(res => {
-                console.log("获取单品详情", res)
-                if (this.cutoff(res.msg)) return;
-                this.detail = res.data;
-                this.slides = res.data.attinfos_pic.map(v => {
-                    return {
-                        cover: this.getSpecifiedImage(v.attinfos[0], 'compressed'),
-                        url: v.attinfos[0].url
-                    }
-                })
-                uni.setNavigationBarTitle({
-                    title: res.data.name
+    saveQrcode() {
+      let that = this;
+      that.$refs.painter.canvasToTempFilePathSync({
+        fileType: "jpg",
+        // 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url
+        pathType: "url",
+        quality: 1,
+        success: (res) => {
+          console.log(res.tempFilePath);
+          // 非H5 保存到相册
+          // H5 提示用户长按图另存
+          uni.saveImageToPhotosAlbum({
+            filePath: res.tempFilePath,
+            success: function (e) {
+              uni.showModal({
+                title: "提示",
+                content: "图片已保存到系统相册",
+                showCancel: false,
+              });
+              that.loading = false;
+            },
+            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,
+                          });
+                        }
+                      },
+                    });
+                  },
                 });
-            })
-        },
-        handleCollect(iscollect) {
-            this.collectLoading = true;
-            this.$Http.basic({
-                "id": 20240416133702,
-                "content": {
-                    "ownertable": "sa_fad",
-                    "ownerid": this.detail.sa_fadid,
-                    "type": 1
-                },
-            }).then(res => {
-                console.log("收藏", res)
-                this.collectLoading = false;
-                if (this.cutoff(res.msg)) return;
-                this.detail.iscollect = iscollect ? 0 : 1
-            })
+              } else {
+                that.loading = false;
+                uni.showModal({
+                  title: "提示",
+                  content: "已取消保存",
+                  showCancel: false,
+                });
+              }
+            },
+          });
         },
-        saveQrcode() {
-            let that = this;
-            that.$refs.painter.canvasToTempFilePathSync({
-                fileType: "jpg",
-                // 如果返回的是base64是无法使用 saveImageToPhotosAlbum,需要设置 pathType为url
-                pathType: 'url',
-                quality: 1,
-                success: (res) => {
-                    console.log(res.tempFilePath);
-                    // 非H5 保存到相册
-                    // H5 提示用户长按图另存
-                    uni.saveImageToPhotosAlbum({
-                        filePath: res.tempFilePath,
-                        success: function (e) {
-                            uni.showModal({
-                                title: '提示',
-                                content: '图片已保存到系统相册',
-                                showCancel: false
-                            })
-                            that.loading = false;
-                        },
-                        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,
-                                })
-                            }
-                        },
-                    });
-                },
-            });
-        }, getSheraDate() {
-            let detail = this.detail
-            return {
-                title: detail.name, // 标题
-                path: "/packageCase/product/detail?id=" + detail.sa_fadid, // 分享路径
-                imageUrl: this.detail.attinfos.find(v => v.usetype == "sa_fad").url || ""// 分享图
-            };
-        }
+      });
     },
-    onShareAppMessage(res) {
-        return this.getSheraDate()
+    getSheraDate() {
+      let detail = this.detail;
+      return {
+        title: detail.name, // 标题
+        path:
+          "/packageCase/product/detail?id=" +
+          detail.sa_fadid +
+          "&shareUserid=" +
+          this.shareUserid, // 分享路径
+        imageUrl:
+          this.detail.attinfos.find((v) => v.usetype == "sa_fad").url || "", // 分享图
+      };
     },
-    onShareTimeline() {
-        return this.getSheraDate()
-    }
-}
+  },
+  onShareAppMessage(res) {
+    return this.getSheraDate();
+  },
+  onShareTimeline() {
+    return this.getSheraDate();
+  },
+};
 </script>
 
 <style lang="scss">
 .swiper {
-    width: 375px;
-    height: 231px;
-    background: #F5F5F5;
-    border-radius: 5px;
-    box-sizing: border-box;
-
-    .swiper-item {
-        position: relative;
-        width: 100%;
-        height: 100%;
+  width: 375px;
+  height: 231px;
+  background: #f5f5f5;
+  border-radius: 5px;
+  box-sizing: border-box;
 
-        .image {
-            width: 100%;
-            height: 100%;
-        }
+  .swiper-item {
+    position: relative;
+    width: 100%;
+    height: 100%;
 
-        .qrcode {
-            position: absolute;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            top: 10px;
-            right: 10px;
-            width: 70px;
-            height: 25px;
-            background: rgba($color: #333333, $alpha: 0.5);
-            font-size: 12px;
-            color: #FFFFFF;
-
-            .iconfont {
-                margin-right: 4px;
-            }
-        }
+    .image {
+      width: 100%;
+      height: 100%;
     }
 
+    .qrcode {
+      position: absolute;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      top: 10px;
+      right: 10px;
+      width: 70px;
+      height: 25px;
+      background: rgba($color: #333333, $alpha: 0.5);
+      font-size: 12px;
+      color: #ffffff;
 
+      .iconfont {
+        margin-right: 4px;
+      }
+    }
+  }
 }
 
 .head {
-    background: #fff;
-    padding: 8px 10px 15px;
+  background: #fff;
+  padding: 8px 10px 15px;
 
-    .line1 {
-        display: flex;
-        justify-content: space-between;
-        align-items: flex-end;
+  .line1 {
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-end;
 
-        .left {
-            .iconfont {
-                margin-right: 4px;
-                font-size: 12px;
-            }
+    .left {
+      .iconfont {
+        margin-right: 4px;
+        font-size: 12px;
+      }
 
-            line-height: 17px;
-            font-size: 12px;
-            color: #999999;
-        }
+      line-height: 17px;
+      font-size: 12px;
+      color: #999999;
+    }
 
-        .right {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            width: 80px;
-            height: 24px;
-            border-radius: 12px;
-            border: 1px solid #CCCCCC;
-            font-family: PingFang SC, PingFang SC;
-            font-size: 12px;
-            color: #333333;
+    .right {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 80px;
+      height: 24px;
+      border-radius: 12px;
+      border: 1px solid #cccccc;
+      font-family: PingFang SC, PingFang SC;
+      font-size: 12px;
+      color: #333333;
 
-            .iconfont {
-                margin-right: 5px;
-            }
-        }
+      .iconfont {
+        margin-right: 5px;
+      }
     }
+  }
 
-    .title {
-        line-height: 20px;
-        font-family: PingFang SC, PingFang SC;
-        font-weight: bold;
-        font-size: 14px;
-        color: #333333;
-        margin: 10px 0;
-    }
+  .title {
+    line-height: 20px;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: bold;
+    font-size: 14px;
+    color: #333333;
+    margin: 10px 0;
+  }
 
-    .subtitle {
-        line-height: 17px;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 12px;
-        color: #666666;
-        margin-top: 5px;
-    }
+  .subtitle {
+    line-height: 17px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 12px;
+    color: #666666;
+    margin-top: 5px;
+  }
 }
 
 .introduce {
-    background: #fff;
-    margin-top: 10px;
-    padding: 0 10px;
+  background: #fff;
+  margin-top: 10px;
+  padding: 0 10px;
 
-    &-title {
-        line-height: 45px;
-        background: #FFFFFF;
-        font-family: PingFang SC, PingFang SC;
-        font-weight: bold;
-        font-size: 16px;
-        color: #333333;
-    }
+  &-title {
+    line-height: 45px;
+    background: #ffffff;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: bold;
+    font-size: 16px;
+    color: #333333;
+  }
 
-    &-text {
-        line-height: 20px;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 14px;
-        color: #333333;
-        padding-bottom: 10px;
-    }
+  &-text {
+    line-height: 20px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 14px;
+    color: #333333;
+    padding-bottom: 10px;
+  }
 }
 </style>

+ 172 - 152
pages/index/index/casePages/design.vue

@@ -1,173 +1,193 @@
 <template>
-    <view>
-        <tabs ref="tabs" typename="renderingstype" @getList="getList" />
-        <float-but @onClick="toUpload" />
-        <My_listbox ref="List" @getlist="getList" :bottomHeight="70">
-            <design-list ref="designList" :list="list" @toDetail="toDetail" />
-        </My_listbox>
-    </view>
+  <view>
+    <tabs ref="tabs" typename="renderingstype" @getList="getList" />
+    <float-but @onClick="toUpload" />
+    <My_listbox ref="List" @getlist="getList" :bottomHeight="70">
+      <design-list ref="designList" :list="list" @toDetail="toDetail" />
+    </My_listbox>
+  </view>
 </template>
 
 <script>
-import tabs from "./tabs.vue"
+import tabs from "./tabs.vue";
 import designList from "../../../../components/designList.vue";
 
 export default {
-    components: { tabs, designList },
-    props: {
-        pageType: {
-            type: String,
-            default: "设计"
-        }
+  components: { tabs, designList },
+  props: {
+    pageType: {
+      type: String,
+      default: "设计",
     },
-    name: "design",
-    data() {
-        return {
-            "content": {
-                isnationwide: 1,
-                "where": {
-                    "condition": "",
-                    "style": "",
-                    "space": "",
-                    "spec": "",
-                }
-            },
-            list: [],
-            isInitialize: false
-        }
+  },
+  name: "design",
+  data() {
+    return {
+      content: {
+        where: {
+          condition: "",
+          style: "",
+          space: "",
+          spec: "",
+        },
+      },
+      list: [],
+      isInitialize: false,
+    };
+  },
+  methods: {
+    init() {
+      if (this.isInitialize) return;
+      this.setTypes();
+      this.getList();
     },
-    methods: {
-        init() {
-            if (this.isInitialize) return;
-            this.setTypes();
-            this.getList();
+    setTypes() {
+      let types = [
+        {
+          value: "1",
+          remarks: "全国精选",
         },
-        setTypes() {
-            let types = [{
-                value: "1",
-                remarks: "全国精选"
-            }];
-            types.push([21, 22].includes(uni.getStorageSync('userMsg').usertype) ? {
-                value: "0",
-                remarks: "门店" + this.pageType
-            } : {
-                value: "0",
-                remarks: "全国" + this.pageType
+      ];
+      //经销商和经销商员工
+      if ([21, 22].includes(uni.getStorageSync("userMsg").usertype)) {
+        types.push({
+          value: "2",
+          remarks: "门店" + this.pageType,
+        });
+      } else if (99 == uni.getStorageSync("userMsg").usertype) {
+        //消费者
+      } else {
+        //其他
+        types.push({
+          value: "2",
+          remarks: "门店" + this.pageType,
+        });
+        types.push({
+          value: "3",
+          remarks: "全国" + this.pageType,
+        });
+      }
+      this.$refs.tabs.tabs = types;
+      this.$refs.tabs.active = types[0].value;
+      this.$refs.tabs.setWidths();
+    },
+    getList(init = false) {
+      return new Promise((resolve, reject) => {
+        if (this.paging(this.content, init)) return;
+        let content = this.content;
+        let ref = this.$refs.tabs;
+        if (ref.active == null) this.setTypes();
+        content.querytype = ref.active;
+        content.where = {
+          ...content.where,
+          ...ref.where,
+          type: this.pageType == "设计" ? "4" : "5",
+        };
+        this.$Http
+          .basic({
+            id: 20240417144702,
+            content: this.content,
+          })
+          .then((res) => {
+            resolve();
+            this.$refs.List.RefreshToComplete();
+            this.$refs.List.setHeight();
+            console.log(`获取${this.pageType}列表`, res);
+            if (this.cutoff(res.msg)) return;
+            this.isInitialize = true;
+            this.$refs.designList.handleList(res.data);
+            this.list =
+              res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+            this.content = this.$refs.List.paging(this.content, res);
+          });
+      });
+    },
+    updateList(data = null) {
+      if (this.content.pageNumber && this.content.pageNumber >= 2) {
+        let that = this;
+        let content = this.paging(this.content, true, true);
+        this.$Http
+          .basic({
+            id: "20240417144702",
+            content,
+          })
+          .then((res) => {
+            console.log("更新列表", res);
+            if (this.cutoff(res.msg)) return;
+            res.data = res.data.map((v) => {
+              v.cover = v.attinfos.length
+                ? this.getSpecifiedImage(
+                    v.attinfos.find((s) => s.usetype == "sat_sharematerial") ||
+                      v.attinfos[0]
+                  )
+                : uni.getStorageSync("site").logo || "";
+              return v;
             });
-            this.$refs.tabs.tabs = types;
-            this.$refs.tabs.active = "1";
-            this.$refs.tabs.setWidths();
-        },
-        getList(init = false) {
-            return new Promise((resolve, reject) => {
-                if (this.paging(this.content, init)) return;
-                let content = this.content;
-                let ref = this.$refs.tabs;
-                if (ref.active == null) this.setTypes()
-                content.isnationwide = ref.active;
-                content.where = {
-                    ...content.where,
-                    ...ref.where,
-                    "type": this.pageType == '设计' ? "4" : '5',
-                }
-                this.$Http.basic({
-                    "id": 20240417144702,
-                    content: this.content
-                }).then(res => {
-                    resolve()
-                    this.$refs.List.RefreshToComplete()
-                    this.$refs.List.setHeight()
-                    console.log(`获取${this.pageType}列表`, res)
-                    if (this.cutoff(res.msg)) return;
-                    this.isInitialize = true;
-                    this.$refs.designList.handleList(res.data)
-                    this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
-                    this.content = this.$refs.List.paging(this.content, res)
-                })
-            })
-        },
-        updateList(data = null) {
-            if (this.content.pageNumber && this.content.pageNumber >= 2) {
-                let that = this;
-                if (data.isnationwide != this.content.isnationwide) return handle();
-                let content = this.paging(this.content, true, true)
-
-                this.$Http.basic({
-                    "id": "20240417144702",
-                    content
-                }).then(res => {
-                    console.log("更新列表", res)
-                    if (this.cutoff(res.msg)) return;
-                    res.data = res.data.map(v => {
-                        v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "sat_sharematerial") || v.attinfos[0]) : uni.getStorageSync("site").logo || ''
-                        return v
-                    })
-                    this.list = res.data;
-                    this.$refs.List.paging(content, res, true)
-                    if (data) handle();
-
-                })
-                function handle() {
-                    uni.showModal({
-                        title: '提示',
-                        content: '新建成功,是否立即查看',
-                        cancelText: '返回列表',
-                        confirmText: '查看详情',
-                        success: ({ confirm }) => {
-                            if (confirm) {
-                                let index = that.list.findIndex(v => v.sat_sharematerialid == data.sat_sharematerialid);
-                                if (index == -1) {
-                                    uni.redirectTo({
-                                        url: `/packageA/fullView/detail?id=${data.sat_sharematerialid}`
-                                    });
-                                    that.$Http.setCount = null;
-                                } else {
-                                    that.toDetail(index, 2)
-                                }
-                            } else {
-                                uni.navigateBack();
-                            }
-                        },
-                    })
+            this.list = res.data;
+            this.$refs.List.paging(content, res, true);
+            if (data) handle();
+          });
+        function handle() {
+          uni.showModal({
+            title: "提示",
+            content: "新建成功,是否立即查看",
+            cancelText: "返回列表",
+            confirmText: "查看详情",
+            success: ({ confirm }) => {
+              if (confirm) {
+                let index = that.list.findIndex(
+                  (v) => v.sat_sharematerialid == data.sat_sharematerialid
+                );
+                if (index == -1) {
+                  uni.redirectTo({
+                    url: `/packageA/fullView/detail?id=${data.sat_sharematerialid}`,
+                  });
+                  that.$Http.setCount = null;
+                } else {
+                  that.toDetail(index, 2);
                 }
-
-
-            }
-        },
-        toDetail(index, type = 1) {
-            let item = this.list[index]
-            if (type == 1) {
-                uni.navigateTo({
-                    url: `/packageA/fullView/detail?id=${item.sat_sharematerialid}`,
-                });
-            } else {
-                uni.redirectTo({
-                    url: `/packageA/fullView/detail?id=${item.sat_sharematerialid}`,
-                });
-            }
-            this.$Http.setCount = function (detail) {
-                item.collectcount = detail.collectcount;
-                item.commentcount = detail.commentcount;
-                item.likecount = detail.likecount;
-                item.islike = detail.islike;
-                item.iscollect = detail.iscollect;
-                this.$set(this.list, index, item)
-            }.bind(this)
-        },
-        toUpload() {
-            uni.navigateTo({
-                url: '/packageA/fullView/upload?pageType=' + this.pageType,
-            })
-            this.$Http.updateList = this.updateList.bind(this);
+              } else {
+                uni.navigateBack();
+              }
+            },
+          });
         }
+      }
     },
-}
+    toDetail(index, type = 1) {
+      let item = this.list[index];
+      if (type == 1) {
+        uni.navigateTo({
+          url: `/packageA/fullView/detail?id=${item.sat_sharematerialid}`,
+        });
+      } else {
+        uni.redirectTo({
+          url: `/packageA/fullView/detail?id=${item.sat_sharematerialid}`,
+        });
+      }
+      this.$Http.setCount = function (detail) {
+        item.collectcount = detail.collectcount;
+        item.commentcount = detail.commentcount;
+        item.likecount = detail.likecount;
+        item.islike = detail.islike;
+        item.iscollect = detail.iscollect;
+        this.$set(this.list, index, item);
+      }.bind(this);
+    },
+    toUpload() {
+      uni.navigateTo({
+        url: "/packageA/fullView/upload?pageType=" + this.pageType,
+      });
+      this.$Http.updateList = this.updateList.bind(this);
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
 page,
 body {
-    height: 100vh;
-    overflow: hidden;
+  height: 100vh;
+  overflow: hidden;
 }
 </style>

+ 1 - 1
select/store/store.vue

@@ -70,7 +70,7 @@ export default {
                 "where": {
                     "condition": "",
                     "storetype": "",
-                    "status": ""
+                    "status": "审核"
                 }
             },
             selectList: [],

+ 155 - 139
store/budget/result.vue

@@ -1,162 +1,178 @@
 <template>
-    <view>
-        <view class="box">
-            <view class="title">
-                您的装修报价是:
-            </view>
+  <view>
+    <view class="box">
+      <view class="title"> 您的装修报价是: </view>
 
-            <view class="price-box">
-                <view class="price">
-                    {{ CNY(price.min, '') }}
-                </view>
-                <view class="link">
-                    ~
-                </view>
-                <view class="price">
-                    {{ CNY(price.max, '') }}
-                </view>
-                <view class="unit">
-                    元
-                </view>
-            </view>
+      <view class="price-box">
+        <view class="price">
+          {{ CNY(price.min, "") }}
         </view>
-        <bottomForm submitType="品质服务" :extrajson="extrajson" typemx="装修预算" />
+        <view class="link"> ~ </view>
+        <view class="price">
+          {{ CNY(price.max, "") }}
+        </view>
+        <view class="unit"> 元 </view>
+      </view>
     </view>
+    <bottomForm
+      submitType="品质服务"
+      :extrajson="extrajson"
+      :shareuserid="shareUserid"
+      typemx="装修预算"
+      type="装修预算"
+    />
+  </view>
 </template>
 
 <script>
+import { winTheCustomer } from "../../utils/share";
 export default {
-    data() {
-        return {
-            extrajson: {},
-            price: {
-                min: 0,
-                max: 0
-            },
-            sa_storeid: 0
-        }
-    },
-    onLoad(options) {
-        console.log("options", options)
-        let data = JSON.parse(options.data);
-        this.extrajson = data;
-        uni.setNavigationBarTitle({
-            title: '装修预算'
+  data() {
+    return {
+      extrajson: {},
+      price: {
+        min: 0,
+        max: 0,
+      },
+      sa_storeid: 0,
+      shareUserid: 0,
+    };
+  },
+  onLoad(options) {
+    console.log("options", options);
+    let data = JSON.parse(options.data);
+    this.extrajson = data;
+    uni.setNavigationBarTitle({
+      title: "装修预算",
+    });
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      this.calculate(
+        options.sa_storeid || uni.getStorageSync("shop").sa_storeid
+      );
+      this.shareUserid = winTheCustomer(options.shareUserid || 0, "装修预算", {
+        ownertable: "sa_store",
+        ownerid: this.sa_storeid,
+      });
+    }
+  },
+  methods: {
+    calculate(sa_storeid) {
+      this.$Http
+        .basic({
+          id: 20240515131702,
+          content: {
+            sa_storeid,
+          },
+        })
+        .then((res) => {
+          console.log("获取门店装修预算", res);
+          if (this.cutoff(res.msg)) return;
+          let extrajson = this.extrajson;
+          let obj = {
+            min: 0,
+            max: 0,
+          };
+          res.data.forEach((v) => {
+            switch (v.type) {
+              case "厨房":
+                obj.min += v.min_price * 6 * extrajson.bathroom[0];
+                obj.max += v.max_price * 6 * extrajson.bathroom[0];
+                break;
+              case "卫浴":
+                let num = extrajson.bathroom[2];
+                if (num == ">") num = 4;
+                obj.min += v.min_price * 4 * num;
+                obj.max += v.max_price * 4 * num;
+                break;
+              case "背景墙":
+                let bjq = extrajson.wall[0];
+                if (bjq == ">") bjq = 4;
+                obj.min += v.min_price * 4 * bjq;
+                obj.max += v.max_price * 4 * bjq;
+                break;
+            }
+          });
+          this.price = obj;
+          this.sa_storeid = sa_storeid;
+          console.log(obj);
         });
-        this.isInitializeLogin(render.bind(this))
-        function render(that) {
-            that.calculate(options.sa_storeid || uni.getStorageSync('shop').sa_storeid)
-        }
     },
-    methods: {
-        calculate(sa_storeid) {
-            this.$Http.basic({
-                "id": 20240515131702,
-                "content": {
-                    sa_storeid
-                }
-            }).then(res => {
-                console.log("获取门店装修预算", res)
-                if (this.cutoff(res.msg)) return;
-                let extrajson = this.extrajson
-                let obj = {
-                    min: 0,
-                    max: 0
-                }
-                res.data.forEach(v => {
-                    switch (v.type) {
-                        case "厨房":
-                            obj.min += v.min_price * 6 * extrajson.bathroom[0]
-                            obj.max += v.max_price * 6 * extrajson.bathroom[0]
-                            break;
-                        case "卫浴":
-                            let num = extrajson.bathroom[2];
-                            if (num == '>') num = 4;
-                            obj.min += v.min_price * 4 * num;
-                            obj.max += v.max_price * 4 * num;
-                            break;
-                        case "背景墙":
-                            let bjq = extrajson.wall[0];
-                            if (bjq == '>') bjq = 4;
-                            obj.min += v.min_price * 4 * bjq;
-                            obj.max += v.max_price * 4 * bjq;
-                            break;
-                    }
-                })
-                this.price = obj;
-                this.sa_storeid = sa_storeid;
-                console.log(obj)
-            })
-        },
-        getSheraDate() {
-            return {
-                title: '您的装修报价是:', // 标题
-                path: "/store/budget/result?data=" + JSON.stringify(this.extrajson) + '&sa_storeid=' + this.sa_storeid, // 分享路径
-                imageUrl: ""// 分享图
-            };
-        }
+    getSheraDate() {
+      return {
+        title: "您的装修报价是:", // 标题
+        path:
+          "/store/budget/result?data=" +
+          JSON.stringify(this.extrajson) +
+          "&sa_storeid=" +
+          this.sa_storeid +
+          "&shareUserid=" +
+          this.shareUserid, // 分享路径
+        imageUrl: "", // 分享图
+      };
     },
-    onShareAppMessage(res) {
-        return this.getSheraDate()
-    },
-    onShareTimeline() {
-        return this.getSheraDate()
-    }
-}
+  },
+  onShareAppMessage(res) {
+    return this.getSheraDate();
+  },
+  onShareTimeline() {
+    return this.getSheraDate();
+  },
+};
 </script>
 
 <style lang="scss" scoped>
 .box {
-    width: 100vw;
-    padding: 30px 20px;
-    box-sizing: border-box;
-    background: radial-gradient(100% 0% at 50% 50%, #7E7E7E 0%, #787878 100%);
+  width: 100vw;
+  padding: 30px 20px;
+  box-sizing: border-box;
+  background: radial-gradient(100% 0% at 50% 50%, #7e7e7e 0%, #787878 100%);
 
-    .title {
-        line-height: 22px;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 16px;
-        color: #FFFFFF;
-    }
+  .title {
+    line-height: 22px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 16px;
+    color: #ffffff;
+  }
 
-    .price-box {
-        display: flex;
-        width: 100%;
-        margin-top: 15px;
-        align-items: center;
+  .price-box {
+    display: flex;
+    width: 100%;
+    margin-top: 15px;
+    align-items: center;
 
-        .price {
-            width: 146px;
-            height: 45px;
-            line-height: 45px;
-            text-align: center;
-            box-sizing: border-box;
-            background: rgba(255, 255, 255, 0.2);
-            border-radius: 2px;
-            border: 1px solid rgba(255, 255, 255, 0.2);
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-weight: bold;
-            font-size: 24px;
-            color: #FFFFFF;
-        }
+    .price {
+      width: 146px;
+      height: 45px;
+      line-height: 45px;
+      text-align: center;
+      box-sizing: border-box;
+      background: rgba(255, 255, 255, 0.2);
+      border-radius: 2px;
+      border: 1px solid rgba(255, 255, 255, 0.2);
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-weight: bold;
+      font-size: 24px;
+      color: #ffffff;
+    }
 
-        .link {
-            width: 14px;
-            text-align: center;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-weight: bold;
-            font-size: 24px;
-            color: #FFFFFF;
-            margin: 0 4px;
-            margin-right: 6px;
-        }
+    .link {
+      width: 14px;
+      text-align: center;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-weight: bold;
+      font-size: 24px;
+      color: #ffffff;
+      margin: 0 4px;
+      margin-right: 6px;
+    }
 
-        .unit {
-            font-family: PingFang SC, PingFang SC;
-            font-size: 14px;
-            color: #FFFFFF;
-            margin-left: 10px;
-        }
+    .unit {
+      font-family: PingFang SC, PingFang SC;
+      font-size: 14px;
+      color: #ffffff;
+      margin-left: 10px;
     }
+  }
 }
 </style>

+ 1 - 1
store/insert/store.vue

@@ -96,7 +96,7 @@ export default {
             key: "markettype",
             type: "customClass",
             label: "门店卖场类型",
-            isMust: false,//是否必填
+            isMust: true,//是否必填
             isMultipleChoice: false,//是否多选
             value: '',// 多选[] 单选 ""
             list: await this.getCustomClass('storetype')

+ 410 - 355
store/lottery/modules/sudoku.vue

@@ -1,395 +1,450 @@
 <template>
-    <view class="box">
-        <view class="lottery-box">
-            <navigator class="my-list" url="/cloud/winningNews/index">
-                我的奖品
-            </navigator>
-            <image class="bg-image"
-                src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405281716860202553Be55ba55.webp" />
-            <view class="lottery" v-if="prizes.length && showPrizes">
-                <view>
-                    <LuckyGrid ref="myLucky" width="590rpx" height="590rpx" :prizes="prizes" :buttons="buttons"
-                        :defaultStyle="defaultStyle" @start="startCallBack" @end="endCallBack" />
-                </view>
-            </view>
-            <view class="usable-count">
-                您还有<text class="count">{{ usableCount }}</text>抽奖机会
-            </view>
+  <view class="box">
+    <view class="lottery-box">
+      <navigator class="my-list" url="/cloud/winningNews/index">
+        我的奖品
+      </navigator>
+      <image
+        class="bg-image"
+        src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405281716860202553Be55ba55.webp"
+      />
+      <view class="lottery" v-if="prizes.length && showPrizes">
+        <view>
+          <LuckyGrid
+            ref="myLucky"
+            width="590rpx"
+            height="590rpx"
+            :prizes="prizes"
+            :buttons="buttons"
+            :defaultStyle="defaultStyle"
+            @start="startCallBack"
+            @end="endCallBack"
+          />
         </view>
-        <view class="winners-list" v-if="winningList.length">
-            <image class="image"
-                src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405281716863577428B1faf5081.webp"
-                mode="widthFix" />
-            <view class="content">
-                <view class="title">
-                    <view class="text">
-                        抽奖名单
-                    </view>
-                </view>
-                <swiper class="swiper" autoplay easing-function="linear" interval="1000" duration="1000" circular vertical
-                    :display-multiple-items="7">
-                    <swiper-item v-for="item in winningList" :key="item.sa_awardmxid">
-                        <view v-if="item.createuserid" class="swiper-item u-line-2">
-                            {{ item.name ? item.name : '用户' + item.createuserid }} <text
-                                style="padding: 0 5px;">抽中了</text>{{ item.awardname }}
-                        </view>
-                        <view v-else></view>
-                    </swiper-item>
-                </swiper>
-            </view>
+      </view>
+      <view class="usable-count">
+        您还有<text class="count">{{ usableCount }}</text
+        >抽奖机会
+      </view>
+    </view>
+    <view class="winners-list" v-if="winningList.length">
+      <image
+        class="image"
+        src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405281716863577428B1faf5081.webp"
+        mode="widthFix"
+      />
+      <view class="content">
+        <view class="title">
+          <view class="text"> 抽奖名单 </view>
         </view>
+        <swiper
+          class="swiper"
+          autoplay
+          easing-function="linear"
+          interval="1000"
+          duration="1000"
+          circular
+          vertical
+          :display-multiple-items="7"
+        >
+          <swiper-item v-for="item in winningList" :key="item.sa_awardmxid">
+            <view v-if="item.createuserid" class="swiper-item u-line-2">
+              {{ item.name ? item.name : "用户" + item.createuserid }}
+              <text style="padding: 0 5px">抽中了</text>{{ item.awardname }}
+            </view>
+            <view v-else></view>
+          </swiper-item>
+        </swiper>
+      </view>
     </view>
+  </view>
 </template>
 
 <script>
-import LuckyGrid from '@/components/@lucky-canvas/uni/lucky-grid'
+import LuckyGrid from "@/components/@lucky-canvas/uni/lucky-grid";
 export default {
-    components: { LuckyGrid },
-    props: {
-        sa_awardid: {
-            type: [Number || String]
-        },
-        shareuserid: {
-            type: [Number || String]
-        }
+  components: { LuckyGrid },
+  props: {
+    detail: {
+      type: Object,
     },
-    data() {
-        return {
-            prizes: [],
-            buttons: [{
-                background: 'rgba(0,0,0,0)',
-                x: 1, y: 1,
-                imgs: [{
-                    src: 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405281716861339513B3a575413.webp',
-                    width: '183.34rpx',
-                    height: '183.34rpx',
-                }],
-            }],
-            defaultStyle: {
-                background: '#FFFFFF',
-                width: '183.34rpx',
-                height: '183.34rpx',
-            },
-            usableCount: 0,
-            loading: false,
-            winningList: [],
-            tips: '',
-            showPrizes: true,
-        }
+    sa_awardid: {
+      type: [Number || String],
     },
-    methods: {
-        init() {
-            console.log("this.sa_awardid", this.sa_awardid)
-            try {
-                this.$Http.basic({
-                    "id": 20240514131402,
-                    content: {
-                        "sa_awardid": this.sa_awardid,
-                        "where": {
-                            "condition": "",
-                            "type": ""
-                        }
-                    }
-                }).then(res => {
-                    console.log("奖品列表", res)
-                    if (this.cutoff(res.msg)) return;
-                    let prizes = [
-                        { index: 0, x: 0, y: 0 },
-                        { index: 2, x: 2, y: 0 },
-                        { index: 6, x: 0, y: 2 },
-                        { index: 4, x: 2, y: 2 },
-                        { index: 1, x: 1, y: 0 },
-                        { index: 3, x: 2, y: 1 },
-                        { index: 5, x: 1, y: 2 },
-                        { index: 7, x: 0, y: 1 },
-                    ].map(v => {
-                        v.borderRadius = '20rpx';
-                        v.imgs = [{
-                            src: 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405291716965428111B4602d616.webp',
-                            width: '50%',
-                            top: '20%'
-                        }]
-                        return v
-                    })
-                    res.data.forEach((v, i) => {
-                        v.imgs = v.attinfos.map(img => {
-                            return {
-                                src: img.url,
-                                width: '50%',
-                                top: '25%'
-                            }
-                        })
-                        prizes[i] = Object.assign(prizes[i], v);
-                    });
-                    this.prizes = prizes.sort((a, b) => {
-                        return a.index - b.index
-                    });
-                })
-            } catch (error) { }
-            this.queryAwardCount();
-            this.getWinningList();
+    shareuserid: {
+      type: [Number || String],
+    },
+  },
+  data() {
+    return {
+      prizes: [],
+      buttons: [
+        {
+          background: "rgba(0,0,0,0)",
+          x: 1,
+          y: 1,
+          imgs: [
+            {
+              src: "https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405281716861339513B3a575413.webp",
+              width: "183.34rpx",
+              height: "183.34rpx",
+            },
+          ],
         },
-        startCallBack() {
-            let that = this;
-            if (this.tips) return uni.showToast({
-                title: this.tips,
-                icon: 'none',
-                duration: 1500,
-            });
-            if (this.loading || this.usableCount == 0) return;
-            this.loading = true;
-            this.$refs.myLucky.play()
-            that.$Http.basic({
-                "content": {
-                    "sa_awardid": that.sa_awardid,
-                    "shareuserid": that.shareuserid,
+      ],
+      defaultStyle: {
+        background: "#FFFFFF",
+        width: "183.34rpx",
+        height: "183.34rpx",
+      },
+      usableCount: 0,
+      loading: false,
+      winningList: [],
+      tips: "",
+      showPrizes: true,
+    };
+  },
+  methods: {
+    init() {
+      console.log("this.sa_awardid", this.sa_awardid);
+      try {
+        this.$Http
+          .basic({
+            id: 20240514131402,
+            content: {
+              sa_awardid: this.sa_awardid,
+              where: {
+                condition: "",
+                type: "",
+              },
+            },
+          })
+          .then((res) => {
+            console.log("奖品列表", res);
+            if (this.cutoff(res.msg)) return;
+            let prizes = [
+              { index: 0, x: 0, y: 0 },
+              { index: 2, x: 2, y: 0 },
+              { index: 6, x: 0, y: 2 },
+              { index: 4, x: 2, y: 2 },
+              { index: 1, x: 1, y: 0 },
+              { index: 3, x: 2, y: 1 },
+              { index: 5, x: 1, y: 2 },
+              { index: 7, x: 0, y: 1 },
+            ].map((v) => {
+              v.borderRadius = "20rpx";
+              v.imgs = [
+                {
+                  src: "https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202405291716965428111B4602d616.webp",
+                  width: "50%",
+                  top: "20%",
                 },
-                "id": 20240514134002,
-            }).then(res => {
-                console.log('抽奖结果', res)
-                if (this.cutoff(res.msg)) {
-                    this.showPrizes = false;
-                    setTimeout(() => {
-                        this.showPrizes = true;
-                    })
-                    that.queryAwardCount();
-                    that.getWinningList();
-                    return
+              ];
+              return v;
+            });
+            res.data.forEach((v, i) => {
+              v.imgs = v.attinfos.map((img) => {
+                return {
+                  src: img.url,
+                  width: "50%",
+                  top: "25%",
                 };
-                const index = that.prizes.findIndex(v => v.sa_awarditemsid == res.data.sa_awarditemsid);
-                that.$refs.myLucky.stop(index)
-                that.queryAwardCount();
-                that.getWinningList();
-                setTimeout(() => {
-                    that.loading = false;
-                    that.showWinningResult(res.data, index);
-                }, 5000);
-            })
-        },
-        showWinningResult(data, index) {
-            console.log("中奖结果", data)
-            let that = this;
-            uni.showModal({
-                title: '恭喜您抽中',
-                content: data.awardname,
-                showCancel: false,
-                confirmText: '选择地址',
-                success: function ({ confirm }) {
-                    if (confirm) {
-                        uni.navigateTo({
-                            url: '/store/deliveryAddress/index?tips=奖项根据收货信息发放,请选择并提交收货地址'
-                        })
-                        that.$Http.selectAddress = (item) => {
-                            uni.showModal({
-                                title: '提示',
-                                content: `是否确定选择“${item.address}”作为收货地址?`,
-                                success: (success) => {
-                                    if (success.confirm) that.$Http.basic({
-                                        id: "2024052910464202",
-                                        content: {
-                                            sa_awardmxid: data.sa_awardmxid,
-                                            name: item.name,
-                                            phonenumber: item.phonenumber,
-                                            province: item.province,
-                                            city: item.city,
-                                            county: item.county,
-                                            address: item.address,
-                                        }
-                                    }).then(s => {
-                                        if (that.cutoff(s.msg, '设置成功', true, '1000')) return;
-                                    })
-                                },
-                            })
-                        }
-                    }
-                },
-                fail: (err) => {
-                    console.log(err)
-                }
+              });
+              prizes[i] = Object.assign(prizes[i], v);
             });
-        },
-        getWinningList() {
-            this.$Http.basic({
-                "content": {
-                    "sa_awardid": this.sa_awardid,
-                    "pageNumber": 1,
-                    "pageSize": 20
+            this.prizes = prizes.sort((a, b) => {
+              return a.index - b.index;
+            });
+          });
+      } catch (error) {}
+      this.queryAwardCount();
+      this.getWinningList();
+    },
+    startCallBack() {
+      let that = this;
+      if (this.detail.begdate > this.formatTime())
+        this.tips = `活动开始时间为“${this.detail.begdate}”敬请期待!`;
+      if (this.detail.enddate < this.formatTime())
+        this.tips = `活动已在“${this.detail.enddate}”结束!`;
+      if (this.tips)
+        return uni.showToast({
+          title: this.tips,
+          icon: "none",
+          duration: 1500,
+        });
+      if (this.loading || this.usableCount == 0) return;
+      this.loading = true;
+      this.$refs.myLucky.play();
+      that.$Http
+        .basic({
+          content: {
+            sa_awardid: that.sa_awardid,
+            shareuserid: that.shareuserid,
+          },
+          id: 20240514134002,
+        })
+        .then((res) => {
+          console.log("抽奖结果", res);
+          if (this.cutoff(res.msg)) {
+            this.showPrizes = false;
+            setTimeout(() => {
+              this.showPrizes = true;
+            });
+            that.queryAwardCount();
+            that.getWinningList();
+            return;
+          }
+          const index = that.prizes.findIndex(
+            (v) => v.sa_awarditemsid == res.data.sa_awarditemsid
+          );
+          that.$refs.myLucky.stop(index);
+          that.queryAwardCount();
+          setTimeout(() => {
+            that.loading = false;
+            that.showWinningResult(res.data, index);
+          }, 5000);
+        });
+    },
+    showWinningResult(data, index) {
+      console.log("中奖结果", data);
+      let that = this;
+      that.getWinningList();
+      uni.showModal({
+        title: "恭喜您抽中",
+        content: data.awardname,
+        showCancel: false,
+        confirmText: "选择地址",
+        success: function ({ confirm }) {
+          if (confirm) {
+            uni.navigateTo({
+              url: "/store/deliveryAddress/index?tips=奖项根据收货信息发放,请选择并提交收货地址",
+            });
+            that.$Http.selectAddress = (item) => {
+              uni.showModal({
+                title: "提示",
+                content: `是否确定选择“${item.address}”作为收货地址?`,
+                success: (success) => {
+                  if (success.confirm)
+                    that.$Http
+                      .basic({
+                        id: "2024052910464202",
+                        content: {
+                          sa_awardmxid: data.sa_awardmxid,
+                          name: item.name,
+                          phonenumber: item.phonenumber,
+                          province: item.province,
+                          city: item.city,
+                          county: item.county,
+                          address: item.address,
+                        },
+                      })
+                      .then((s) => {
+                        if (that.cutoff(s.msg, "设置成功", true, "1000"))
+                          return;
+                      });
                 },
-                "id": 20240514133902
-            }).then(res => {
-                console.log("中奖人员", res)
-                if (this.cutoff(res.msg)) return;
-                if (res.data.length < 7) {
-                    let len = res.data.length;
-                    for (let index = 0; index < (7 - len); index++) {
-                        res.data.push({})
-                    }
-                }
-                this.winningList = res.data;
-            })
+              });
+            };
+          }
         },
-        queryAwardCount() {
-            if (uni.getStorageSync('userMsg').usertype == 99) {
-                this.$Http.basic({
-                    "classname": "sysmanage.develop.datafunction.datafunction",
-                    "method": "execute",
-                    "content": {
-                        "functionname": "queryAwardCount",
-                        "parameter": {
-                            "sa_awardid": this.sa_awardid
-                        }
-                    }
-                }).then(res => {
-                    console.log("抽奖可用次数", res)
-                    if (this.cutoff(res.msg)) return;
-                    this.usableCount = res.data.length ? res.data[0].count : 0;
-                })
-            } else {
-                this.tips = '内部人员不可参与抽奖';
-            }
+        fail: (err) => {
+          console.log(err);
         },
-        endCallBack(prize) {
-            console.log("抽到的奖品", prize)
-        }
-    }
-}
+      });
+    },
+    getWinningList() {
+      this.$Http
+        .basic({
+          content: {
+            sa_awardid: this.sa_awardid,
+            pageNumber: 1,
+            pageSize: 20,
+          },
+          id: 20240514133902,
+        })
+        .then((res) => {
+          console.log("中奖人员", res);
+          if (this.cutoff(res.msg)) return;
+          if (res.data.length < 7) {
+            let len = res.data.length;
+            for (let index = 0; index < 7 - len; index++) {
+              res.data.push({});
+            }
+          }
+          this.winningList = res.data;
+        });
+    },
+    queryAwardCount() {
+      if (uni.getStorageSync("userMsg").usertype == 99) {
+        this.$Http
+          .basic({
+            classname: "sysmanage.develop.datafunction.datafunction",
+            method: "execute",
+            content: {
+              functionname: "queryAwardCount",
+              parameter: {
+                sa_awardid: this.sa_awardid,
+              },
+            },
+          })
+          .then((res) => {
+            console.log("抽奖可用次数", res);
+            if (this.cutoff(res.msg)) return;
+            this.usableCount = res.data.length ? res.data[0].count : 0;
+          });
+      } else {
+        this.tips = "内部人员不可参与抽奖";
+      }
+    },
+    endCallBack(prize) {
+      console.log("抽到的奖品", prize);
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
 .box {
-    width: 100vw;
-    min-height: 100vh;
-    background: linear-gradient(90deg, #FE5A46 0%, #F11F46 100%);
-
-    .lottery-box {
-        position: relative;
-        width: 100vw;
-        height: 511px;
+  width: 100vw;
+  min-height: 100vh;
+  background: linear-gradient(90deg, #fe5a46 0%, #f11f46 100%);
 
-        .my-list {
-            position: absolute;
-            top: 20px;
-            left: 0;
-            width: 86px;
-            height: 40px;
-            line-height: 40px;
-            text-align: center;
-            background: linear-gradient(180deg, #FAD96D 0%, #FFC300 4%, #FFCD2B 16%, #FFDF77 42%, #FFD241 70%, #FFC300 94%, #FC9228 100%);
-            border-radius: 0px 20px 20px 0px;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-weight: bold;
-            font-size: 14px;
-            color: #C30D23;
-            z-index: 2;
-        }
-
-        .bg-image {
-            position: absolute;
-            width: 100vw;
-            height: 511px;
-            top: 0;
-            left: 0;
-            z-index: 1;
-            vertical-align: bottom;
-        }
+  .lottery-box {
+    position: relative;
+    width: 100vw;
+    height: 511px;
 
-        .lottery {
-            position: absolute;
-            width: 100%;
-            z-index: 2;
-            top: 140px;
-        }
+    .my-list {
+      position: absolute;
+      top: 20px;
+      left: 0;
+      width: 86px;
+      height: 40px;
+      line-height: 40px;
+      text-align: center;
+      background: linear-gradient(
+        180deg,
+        #fad96d 0%,
+        #ffc300 4%,
+        #ffcd2b 16%,
+        #ffdf77 42%,
+        #ffd241 70%,
+        #ffc300 94%,
+        #fc9228 100%
+      );
+      border-radius: 0px 20px 20px 0px;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-weight: bold;
+      font-size: 14px;
+      color: #c30d23;
+      z-index: 2;
+    }
 
-        .usable-count {
-            position: absolute;
-            bottom: 15px;
-            width: 100vw;
-            text-align: center;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-weight: bold;
-            font-size: 14px;
-            color: #FFFFFF;
+    .bg-image {
+      position: absolute;
+      width: 100vw;
+      height: 511px;
+      top: 0;
+      left: 0;
+      z-index: 1;
+      vertical-align: bottom;
+    }
 
-            .count {
-                height: 29px;
-                font-family: Source Han Sans SC, Source Han Sans SC;
-                font-weight: 800;
-                font-size: 20px;
-                color: #FAD96D;
-                padding: 0 10px;
-            }
-        }
+    .lottery {
+      position: absolute;
+      width: 100%;
+      z-index: 2;
+      top: 140px;
     }
 
+    .usable-count {
+      position: absolute;
+      bottom: 15px;
+      width: 100vw;
+      text-align: center;
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-weight: bold;
+      font-size: 14px;
+      color: #ffffff;
 
+      .count {
+        height: 29px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-weight: 800;
+        font-size: 20px;
+        color: #fad96d;
+        padding: 0 10px;
+      }
+    }
+  }
 
-    .winners-list {
-        width: 100vw;
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        padding-bottom: 20px;
+  .winners-list {
+    width: 100vw;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding-bottom: 20px;
 
-        .image {
-            width: 355px;
-        }
+    .image {
+      width: 355px;
+    }
 
-        .title {
-            position: relative;
-            width: 80px;
-            height: 29px;
-            margin: 0 auto;
+    .title {
+      position: relative;
+      width: 80px;
+      height: 29px;
+      margin: 0 auto;
 
-            .text {
-                position: absolute;
-                top: 0px;
-                left: 0;
-                width: 80px;
-                line-height: 29px;
-                text-align: center;
-                font-family: Source Han Sans SC, Source Han Sans SC;
-                font-weight: bold;
-                font-size: 20px;
-                color: #333333;
-                z-index: 2;
-            }
-        }
+      .text {
+        position: absolute;
+        top: 0px;
+        left: 0;
+        width: 80px;
+        line-height: 29px;
+        text-align: center;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-weight: bold;
+        font-size: 20px;
+        color: #333333;
+        z-index: 2;
+      }
+    }
 
-        .title::after {
-            content: '';
-            position: absolute;
-            bottom: 0px;
-            left: 0;
-            width: 80px;
-            height: 8px;
-            background: #FAD96D;
-            border-radius: 5px;
-            z-index: 1;
-        }
+    .title::after {
+      content: "";
+      position: absolute;
+      bottom: 0px;
+      left: 0;
+      width: 80px;
+      height: 8px;
+      background: #fad96d;
+      border-radius: 5px;
+      z-index: 1;
+    }
 
-        .content {
-            background: #fff;
-            padding: 0 15px 20px;
-            width: 669.7672675rpx;
-            box-sizing: border-box;
+    .content {
+      background: #fff;
+      padding: 0 15px 20px;
+      width: 669.7672675rpx;
+      box-sizing: border-box;
 
-            .swiper {
-                width: 100%;
-                height: 300px;
-                margin-top: 20px;
+      .swiper {
+        width: 100%;
+        height: 300px;
+        margin-top: 20px;
 
-                .swiper-item {
-                    width: 100%;
-                    height: 40px;
-                    text-align: center;
-                    line-height: 20px;
-                    font-family: Source Han Sans SC, Source Han Sans SC;
-                    font-size: 14px;
-                    color: #666666;
-                    overflow: hidden;
-                }
-            }
+        .swiper-item {
+          width: 100%;
+          height: 40px;
+          text-align: center;
+          line-height: 20px;
+          font-family: Source Han Sans SC, Source Han Sans SC;
+          font-size: 14px;
+          color: #666666;
+          overflow: hidden;
         }
+      }
     }
+  }
 }
 </style>

+ 72 - 46
store/lottery/shareable.vue

@@ -1,57 +1,83 @@
 <template>
-    <view>
-        <sudoku ref="sudoku" :sa_awardid="sa_awardid" :shareuserid="shareuserid" />
-    </view>
+  <view>
+    <sudoku
+      ref="sudoku"
+      :detail="detail"
+      :sa_awardid="sa_awardid"
+      :shareuserid="shareuserid"
+    />
+  </view>
 </template>
 
 <script>
-import sudoku from "./modules/sudoku"
+import sudoku from "./modules/sudoku";
+import { winTheCustomer } from "../../utils/share";
 export default {
-    components: { sudoku },
-    data() {
-        return {
-            sa_awardid: 0,
-            shareuserid: 0,
-            detail: {},
-        }
-    },
-    onLoad(options) {
-        console.log("options", options)
-        this.sa_awardid = options.sa_awardid || 0;
-        this.shareuserid = options.userid || 0;
-        uni.setNavigationBarTitle({
-            title: '活动抽奖'
-        });
-    },
-    onShow() {
-        this.$Http.basic({
-            "id": 20240514101502,
-            "content": {
-                "sa_awardid": this.sa_awardid,
-            }
-        }).then(res => {
-            console.log("抽奖详情", res)
-            if (this.cutoff(res.msg)) return;
-            this.detail = res.data;
-            this.$refs.sudoku.init();
+  components: { sudoku },
+  data() {
+    return {
+      sa_awardid: 0,
+      shareuserid: 0,
+      detail: {},
+      initialize: true,
+    };
+  },
+  onLoad(options) {
+    console.log("options", options);
+    this.sa_awardid = options.sa_awardid || 0;
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      this.getDetail();
+      this.shareUserid = winTheCustomer(options.shareUserid || 0, "活动抽奖", {
+        ownertable: "sa_award",
+        ownerid: this.sa_awardid,
+      });
+    }
+
+    uni.setNavigationBarTitle({
+      title: "活动抽奖",
+    });
+  },
+  onShow() {
+    if (!this.initialize) this.getDetail();
+  },
+  methods: {
+    getDetail() {
+      this.$Http
+        .basic({
+          id: 20240514101502,
+          content: {
+            sa_awardid: this.sa_awardid,
+          },
         })
-    }, methods: {
-        getSheraDate() {
-            let detail = this.detail;;
-            return {
-                title: detail.name, // 标题
-                path: "/store/lottery/shareable?sa_awardid=" + detail.sa_awardid + '&shareuserid=' + uni.getStorageSync('userMsg').userid, // 分享路径
-                imageUrl: ""// 分享图
-            };
-        }
+        .then((res) => {
+          console.log("抽奖详情", res);
+          if (this.cutoff(res.msg)) return;
+          this.initialize = false;
+          this.detail = res.data;
+          this.$refs.sudoku.init();
+        });
     },
-    onShareAppMessage() {
-        return this.getSheraDate()
+    getSheraDate() {
+      let detail = this.detail;
+      return {
+        title: detail.name, // 标题
+        path:
+          "/store/lottery/shareable?sa_awardid=" +
+          detail.sa_awardid +
+          "&shareUserid=" +
+          this.shareUserid, // 分享路径
+        imageUrl: "", // 分享图
+      };
     },
-    onShareTimeline() {
-        return this.getSheraDate()
-    }
-}
+  },
+  onShareAppMessage() {
+    return this.getSheraDate();
+  },
+  onShareTimeline() {
+    return this.getSheraDate();
+  },
+};
 </script>
 
 <style lang="scss" scoped></style>

+ 55 - 31
store/lottery/unshareable.vue

@@ -1,41 +1,65 @@
 <template>
-    <view>
-        <sudoku ref="sudoku" :sa_awardid="sa_awardid" :shareuserid="shareuserid" />
-    </view>
+  <view>
+    <sudoku
+      ref="sudoku"
+      :detail="detail"
+      :sa_awardid="sa_awardid"
+      :shareuserid="shareuserid"
+    />
+  </view>
 </template>
 
 <script>
-import sudoku from "./modules/sudoku"
+import sudoku from "./modules/sudoku";
+import { winTheCustomer } from "../../utils/share";
 export default {
-    components: { sudoku },
-    data() {
-        return {
-            sa_awardid: 0,
-            shareuserid: 0,
-            detail: {},
-        }
-    },
-    onLoad(options) {
-        this.sa_awardid = options.id || 0;
-        this.shareuserid = options.userid || 0;
-        uni.setNavigationBarTitle({
-            title: '活动抽奖'
-        });
-    },
-    onShow() {
-        this.$Http.basic({
-            "id": 20240514101502,
-            "content": {
-                "sa_awardid": this.sa_awardid,
-            }
-        }).then(res => {
-            console.log("抽奖详情", res)
-            if (this.cutoff(res.msg)) return;
-            this.detail = res.data;
-            this.$refs.sudoku.init();
+  components: { sudoku },
+  data() {
+    return {
+      sa_awardid: 0,
+      shareuserid: 0,
+      detail: {},
+      initialize: true,
+    };
+  },
+  onLoad(options) {
+    console.log("options", options);
+    this.sa_awardid = options.sa_awardid || 0;
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      this.getDetail();
+      this.shareUserid = winTheCustomer(options.shareUserid || 0, "活动抽奖", {
+        ownertable: "sa_award",
+        ownerid: this.sa_awardid,
+      });
+    }
+
+    uni.setNavigationBarTitle({
+      title: "活动抽奖",
+    });
+  },
+  onShow() {
+    if (!this.initialize) this.getDetail();
+  },
+  methods: {
+    getDetail() {
+      this.$Http
+        .basic({
+          id: 20240514101502,
+          content: {
+            sa_awardid: this.sa_awardid,
+          },
         })
+        .then((res) => {
+          console.log("抽奖详情", res);
+          if (this.cutoff(res.msg)) return;
+          this.initialize = false;
+          this.detail = res.data;
+          this.$refs.sudoku.init();
+        });
     },
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped></style>

+ 236 - 191
team/team/InviteUser.vue

@@ -1,225 +1,270 @@
 <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>
+  <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 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;" />
+      </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/202405151715764356769B1a729abd.webp"
+            css="width: 280px; height: 426px;position: absolute;"
+          />
 
-                    <l-painter-image
-                        :src="userMsg.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'"
-                        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-image
+            :src="
+              userMsg.headpic ||
+              'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'
+            "
+            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="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>
+          <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>
+    <view class="share">
+      <contact openType="share">
+        <view class="item">
+          <text class="iconfont icon-weixin" />
         </view>
-        <view class="share">
-            <contact openType="share">
-                <view class="item">
-                    <text class="iconfont icon-weixin" />
-                </view>
-            </contact>
+      </contact>
 
-            <view class="item" @click="saveTheImage">
-                <text class="iconfont icon-baocunbendi" />
-            </view>
-        </view>
-    </My_listbox>
+      <view class="item" @click="saveTheImage">
+        <text class="iconfont icon-baocunbendi" />
+      </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"
-
+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()
+  components: {
+    lPainter,
+    lPainterView,
+    lPainterText,
+    lPainterImage,
+    lPainterQrcode,
+    contact,
+  },
+  data() {
+    return {
+      userMsg: {
+        userid: 0,
+      },
+      qrCode: this.qrCodePrefix,
+      name: "",
+    };
+  },
+  onLoad() {
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      this.getUserMsg();
+    }
+  },
+  methods: {
+    getUserMsg() {
+      this.$Http
+        .basic({
+          id: 20240510104102,
+          content: {},
+        })
+        .then((res) => {
+          console.log("获取个人信息", res);
+          if (this.cutoff(res.msg)) return;
+          res.data.headpic =
+            (res.data.attinfos.find((v) => v.usetype == "headportrait") &&
+              res.data.attinfos.find((v) => v.usetype == "headportrait").url) ||
+            "";
+          this.userMsg = res.data;
+          this.name = res.data.enterprise_hr.name
+            ? res.data.enterprise_hr.name + ",邀请您加入"
+            : "邀请您加入";
+        });
     },
-    methods: {
-        getUserMsg() {
-            this.$Http.basic({
-                "id": 20240510104102,
-                "content": {},
-            }).then(res => {
-                console.log("获取个人信息", res)
-                if (this.cutoff(res.msg)) return;
-                res.data.headpic = res.data.attinfos.find(v => v.usetype == "headportrait") && res.data.attinfos.find(v => v.usetype == "headportrait").url || '';
-                this.userMsg = res.data;
-                this.name = res.data.enterprise_hr.name ? res.data.enterprise_hr.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;
-                            that.$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,
-                                })
-                            }
-                        },
+    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;
+              that.$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,
+                          });
+                        }
+                      },
                     });
-                },
-            });
-        },
-        onBack() {
-            uni.navigateBack();
+                  },
+                });
+              } else {
+                that.loading = false;
+                uni.showModal({
+                  title: "提示",
+                  content: "已取消保存",
+                  showCancel: false,
+                });
+              }
+            },
+          });
         },
-        getSheraDate() {
-            return {
-                title: this.name, // 标题
-                path: "/team/team/getInvite?id=" + this.userMsg.sys_enterpriseid, // 分享路径
-                imageUrl: ""// 分享图
-            };
-        }
+      });
     },
-    onShareAppMessage(res) {
-        return this.getSheraDate()
+    onBack() {
+      uni.navigateBack();
     },
-    onShareTimeline() {
-        return this.getSheraDate()
-    }
-}
+    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;
+  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;
+  .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);
-        }
+    .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;
+  display: flex;
+  justify-content: center;
+  margin-top: 25px;
 }
 
 .share {
-    display: flex;
-    justify-content: space-around;
-    width: 275px;
-    margin: 30px auto 0;
+  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;
+  .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;
-        }
+    .iconfont {
+      font-size: 28px;
+      color: #fff;
     }
+  }
 }
 </style>

+ 321 - 279
team/team/getInvite.vue

@@ -1,309 +1,351 @@
 <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">
-                    <view class="content">
-                        <view class="label">
-                            头像:
-                        </view>
-                        <My_upload maxCount="1" @onLoading="imageOnLoading" @uploadCallback="uploadCallback">
-                            <view style="display: flex;align-items: center;">
-                                <u--image :width="56" :height="56" shape="circle" :src="headportrait">
-                                    <template v-slot:loading>
-                                        <u-loading-icon />
-                                    </template>
-                                </u--image>
-                                <view style="width: 183px;" />
-                                <view class="iconfont icon-a-wodetiaozhuan" />
-                            </view>
-                        </My_upload>
-                    </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>
+    <my_form
+      ref="form"
+      :form="form"
+      @isUncomplete="isUncomplete"
+      @isShowAll="isShowAll"
+      requiredFieldOnly
+    >
+      <template v-if="isShow" slot="head">
+        <view class="headportrait" hover-class="navigator-hover">
+          <view class="content">
+            <view class="label"> 头像: </view>
+            <My_upload
+              maxCount="1"
+              @onLoading="imageOnLoading"
+              @uploadCallback="uploadCallback"
+            >
+              <view style="display: flex; align-items: center">
+                <u--image
+                  :width="56"
+                  :height="56"
+                  shape="circle"
+                  :src="headportrait"
+                >
+                  <template v-slot:loading>
+                    <u-loading-icon />
+                  </template>
+                </u--image>
+                <view style="width: 183px" />
+                <view class="iconfont icon-a-wodetiaozhuan" />
+              </view>
+            </My_upload>
+          </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>
-
 export default {
-    data() {
-        return {
-            sys_enterpriseid: 0,
-            form: [],
-            attachmentids: [],
-            uncomplete: true,
-            loading: false,
-            headportrait: "https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp",
-            userid: 0,
-            isShow: true,
-        }
-    },
-    onLoad(options) {
-        this.isInitializeLogin(render.bind(this))
-        function render() {
-            let that = this;
-            let count = setInterval(() => {
-                if (uni.getStorageSync('userMsg').token) {
-                    clearInterval(count)
-                    let user = uni.getStorageSync('userMsg');
-                    that.userid = user.userid;
-                    if (options.id) that.sys_enterpriseid = options.id;
-                    if (options.q) that.sys_enterpriseid = this.getUrlParams(options.q).id;
-                    if (user.usertype == 99) {
-                        that.init();
-                    } else {
-                        uni.showModal({
-                            title: '提示',
-                            content: '您已加入过团队',
-                            showCancel: false,
-                            confirmText: '确定',
-                            confirmColor: '#C40C24',
-                            success: ({ confirm }) => {
-                                if (confirm) uni.redirectTo({
-                                    url: '/pages/index/index',
-                                })
-                            }
-                        });
-                    }
-                }
-            }, 100);
-            setTimeout(() => {
-                clearInterval(count)
-            }, 3000)
+  data() {
+    return {
+      sys_enterpriseid: 0,
+      form: [],
+      attachmentids: [],
+      uncomplete: true,
+      loading: false,
+      headportrait:
+        "https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp",
+      userid: 0,
+      isShow: true,
+    };
+  },
+  onLoad(options) {
+    this.isInitializeLogin(render.bind(this));
+    function render() {
+      let that = this;
+      let count = setInterval(() => {
+        if (uni.getStorageSync("userMsg").token) {
+          clearInterval(count);
+          let user = uni.getStorageSync("userMsg");
+          that.userid = user.userid;
+          if (options.id) that.sys_enterpriseid = options.id;
+          if (options.q)
+            that.sys_enterpriseid = this.getUrlParams(options.q).id;
+          if (user.usertype == 99) {
+            that.init();
+          } else {
+            uni.showModal({
+              title: "提示",
+              content: "您已加入过团队",
+              showCancel: false,
+              confirmText: "确定",
+              confirmColor: "#C40C24",
+              success: ({ confirm }) => {
+                if (confirm)
+                  uni.redirectTo({
+                    url: "/pages/index/index",
+                  });
+              },
+            });
+          }
         }
-        uni.setNavigationBarTitle({
-            title: '人员信息'
-        });
-    },
-    methods: {
-        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: "sex",
-                type: "sex",
-                label: "性别",
-                value: "男",
-            }, {
-                key: "birthday",
-                type: "date",
-                label: "生日",
-                value: "",
-                placeholder: "请选择出生日期",
-            }, {
-                key: "email",
-                type: "text",
-                label: "邮箱",
-                isMust: false,//是否必填
-                value: "",
-                verify: [this.getReg("email")]
-            }, {
-                key: "position",
-                type: "text",
-                label: "店内职位",
-                isMust: false,//是否必填
-                value: "",
-            }];
-            this.$Http.basic({
-                "id": 20240510104102,
-                "content": {},
-            }).then(res => {
-                console.log("获取个人信息", res)
-                // if (this.cutoff(res.msg)) return;
-                if (res.msg == '成功') {
-                    this.headportraits = res.data.attinfos;
-                    if (this.headportraits.length) {
-                        this.headportrait = this.headportraits.find(v => v.usetype == "headportrait").url || this.headportrait;
-                    }
-                    form = form.map(v => {
-                        v.value = res.data[v.key] || v.value
-                        return v
-                    })
-                }
-                this.form = form;
-                console.log("this.form ", this.form)
-            })
-
+      }, 100);
+      setTimeout(() => {
+        clearInterval(count);
+      }, 3000);
+    }
+    uni.setNavigationBarTitle({
+      title: "人员信息",
+    });
+  },
+  methods: {
+    init() {
+      let form = [
+        {
+          key: "name",
+          type: "text",
+          label: "姓名",
+          isMust: true, //是否必填
+          value: "",
         },
-        isUncomplete(uncomplete) {
-            this.uncomplete = uncomplete;
+        {
+          key: "phonenumber",
+          type: "text",
+          label: "手机号",
+          isMust: true, //是否必填
+          value: "",
+          placeholder: "",
+          inputmode: "number",
+          verify: [this.getReg("phonenumber")],
+          getphonenumber: true,
         },
-        submit() {
-            this.loading = true;
-            let that = this;
-            this.$refs.form.submit().then(data => {
-                this.$Http.basic({
-                    "id": 20240428111902,
-                    "content": {
-                        "sys_enterpriseid": this.sys_enterpriseid,
-                        ...data
-                    }
-                }).then(res => {
-                    this.loading = false;
-                    console.log("加入团队", res)
-                    if (this.cutoff(res.msg)) return;
-                    this.loading = true;
-                    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 {
-                        getUserMsg()
-                    }
-                    function getUserMsg() {
-                        that.$Http.wechatLogin().then(token => {
-                            that.loading = false;
-                            uni.showModal({
-                                title: '提示',
-                                content: '成功加入团队',
-                                showCancel: false,
-                                confirmText: '确定',
-                                confirmColor: '#C40C24',
-                                success: ({ confirm }) => {
-                                    if (confirm) uni.redirectTo({
-                                        url: '/pages/index/index',
-                                    })
-                                }
-                            });
-                        })
-                    }
-                })
-            })
+        {
+          key: "sex",
+          type: "sex",
+          label: "性别",
+          value: "男",
         },
-        isShowAll(e) {
-            this.isShow = !e;
+        {
+          key: "birthday",
+          type: "date",
+          label: "生日",
+          value: "",
+          placeholder: "请选择出生日期",
         },
-        imageOnLoading(e) {
-            if (e) {
-                this.uncomplete = true;
-            } else {
-                this.$refs.form.verify();
-            }
+        {
+          key: "email",
+          type: "text",
+          label: "邮箱",
+          isMust: false, //是否必填
+          value: "",
+          verify: [this.getReg("email")],
+        },
+        {
+          key: "position",
+          type: "text",
+          label: "店内职位",
+          isMust: false, //是否必填
+          value: "",
         },
-        uploadCallback(attachmentids, ownertable = 'temporary', ownerid = '99999999') {
-            if (ownertable == 'temporary') this.imageOnLoading(true)
-            return new Promise((resolve, reject) => {
+      ];
+      this.$Http
+        .basic({
+          id: 20240510104102,
+          content: {},
+        })
+        .then((res) => {
+          console.log("获取个人信息", res);
+          // if (this.cutoff(res.msg)) return;
+          if (res.msg == "成功") {
+            this.headportraits = res.data.attinfos;
+            if (this.headportraits.length) {
+              this.headportrait =
+                this.headportraits.find((v) => v.usetype == "headportrait")
+                  .url || this.headportrait;
+            }
+            form = form.map((v) => {
+              v.value = res.data[v.key] || v.value;
+              return v;
+            });
+          }
+          this.form = form;
+          console.log("this.form ", this.form);
+        });
+    },
+    isUncomplete(uncomplete) {
+      this.uncomplete = uncomplete;
+    },
+    submit() {
+      this.loading = true;
+      let that = this;
+      this.$refs.form.submit().then((data) => {
+        this.$Http
+          .basic({
+            id: 20240428111902,
+            content: {
+              sys_enterpriseid: this.sys_enterpriseid,
+              ...data,
+            },
+          })
+          .then((res) => {
+            this.loading = false;
+            console.log("加入团队", res);
+            if (this.cutoff(res.msg)) return;
+            this.loading = true;
+            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": "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);
-                    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;
-                        this.headportrait = res.data[0].url;
-                        this.linksid = res.data[0].linksid;
-                    }
+                  classname: "system.attachment.Attachment",
+                  method: "deleteFileLink",
+                  content: {
+                    linksids: this.headportraits.map((v) => v.linksid),
+                  },
+                });
+            } else {
+              getUserMsg();
+            }
+            function getUserMsg() {
+              that.$Http.wechatLogin().then((token) => {
+                that.loading = false;
+                uni.showModal({
+                  title: "提示",
+                  content: "成功加入团队",
+                  showCancel: false,
+                  confirmText: "确定",
+                  confirmColor: "#C40C24",
+                  success: ({ confirm }) => {
+                    if (confirm)
+                      uni.redirectTo({
+                        url: "/pages/index/index",
+                      });
+                  },
+                });
+              });
+            }
+          });
+      });
+    },
+    isShowAll(e) {
+      this.isShow = !e;
+    },
+    imageOnLoading(e) {
+      if (e) {
+        this.uncomplete = true;
+      } else {
+        this.$refs.form.verify();
+      }
+    },
+    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);
+            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;
+              this.headportrait = res.data[0].url;
+              this.linksid = res.data[0].linksid;
+            }
+          });
+      });
     },
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>
 .headportrait {
-    width: 100vw;
-    padding-left: 10px;
-    background: #fff;
-    box-sizing: border-box;
+  width: 100vw;
+  padding-left: 10px;
+  background: #fff;
+  box-sizing: border-box;
 
-    .content {
-        display: flex;
-        align-items: center;
-        border-bottom: 1px solid #DDDDDD;
-        box-sizing: border-box;
-        height: 76px;
-        padding: 10px;
-        padding-left: 0;
-
-        .label {
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 14px;
-            color: #666666;
-            width: 110px;
-        }
+  .content {
+    display: flex;
+    align-items: center;
+    border-bottom: 1px solid #dddddd;
+    box-sizing: border-box;
+    height: 76px;
+    padding: 10px;
+    padding-left: 0;
 
+    .label {
+      font-family: Source Han Sans SC, Source Han Sans SC;
+      font-size: 14px;
+      color: #666666;
+      width: 110px;
     }
+  }
 }
 
 .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;
+  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;
-    }
+  .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;
-    }
+  .forbidden {
+    opacity: 0.6;
+  }
 }
 </style>

+ 197 - 176
team/userCenter/insert.vue

@@ -1,98 +1,115 @@
 <template>
-    <view>
-        <my_form ref="form" :form="form" @isUncomplete="isUncomplete" @interrupt="interrupt" requiredFieldOnly />
-        <view style="height: 70px;" />
-        <view class="footer">
-            <view class="add" @click="uncomplete || loading ? '' : submit()" :class="uncomplete ? 'forbidden' : ''"
-                hover-class=" navigator-hover">
-                <u-loading-icon v-if="loading" />
-                <block v-else>
-                    提交
-                </block>
-            </view>
-        </view>
+  <view>
+    <my_form
+      ref="form"
+      :form="form"
+      @isUncomplete="isUncomplete"
+      @interrupt="interrupt"
+      requiredFieldOnly
+    />
+    <view style="height: 70px" />
+    <view class="footer">
+      <view
+        class="add"
+        @click="uncomplete || loading ? '' : submit()"
+        :class="uncomplete ? 'forbidden' : ''"
+        hover-class=" navigator-hover"
+      >
+        <u-loading-icon v-if="loading" />
+        <block v-else> 提交 </block>
+      </view>
     </view>
+  </view>
 </template>
 
 <script>
 export default {
-    data() {
-        return {
-            sys_enterprise_hrid: 0,
-            form: [],
-            uncomplete: true,
-            loading: false,
+  data() {
+    return {
+      sys_enterprise_hrid: 0,
+      form: [],
+      uncomplete: true,
+      loading: false,
+    };
+  },
+  async onLoad(options) {
+    uni.setNavigationBarTitle({
+      title: options.title || "新增人员",
+    });
+    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: "sex",
+        type: "sex",
+        label: "性别",
+        value: "男",
+      },
+      {
+        key: "birthday",
+        type: "date",
+        label: "生日",
+        value: "",
+        placeholder: "请选择出生日期",
+      },
+      {
+        key: "email",
+        type: "text",
+        label: "邮箱",
+        isMust: false, //是否必填
+        value: "",
+        verify: [this.getReg("email")],
+      },
+      {
+        key: "position",
+        type: "text",
+        label: "店内职位",
+        isMust: false, //是否必填
+        value: "",
+      },
+      {
+        key: "sa_storeids",
+        type: "route",
+        path: "/select/store/store",
+        isRadio: false,
+        label: "所属门店",
+        isMust: false, //是否必填
+        value: [],
+        showValue: [],
+      },
+    ];
+    if (options.data) {
+      let data = JSON.parse(options.data);
+      this.sys_enterprise_hrid = data.sys_enterprise_hrid;
+      form = form.map((v) => {
+        switch (v.key) {
+          case "sa_storeids":
+            v.showValue = data.storenames ? data.storenames.split(",") : [];
+            v.value = data.sa_storeids || [];
+            break;
+          default:
+            v.value = data[v.key] || "";
+            break;
         }
-    },
-    async onLoad(options) {
-        uni.setNavigationBarTitle({
-            title: options.title || '新增人员'
-        });
-        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: "sex",
-            type: "sex",
-            label: "性别",
-            value: "男",
-        }, {
-            key: "birthday",
-            type: "date",
-            label: "生日",
-            value: "",
-            placeholder: "请选择出生日期",
-        }, {
-            key: "email",
-            type: "text",
-            label: "邮箱",
-            isMust: false,//是否必填
-            value: "",
-            verify: [this.getReg("email")]
-        }, {
-            key: "position",
-            type: "text",
-            label: "店内职位",
-            isMust: false,//是否必填
-            value: "",
-        }, {
-            key: "sa_storeids",
-            type: "route",
-            path: "/select/store/store",
-            isRadio: false,
-            label: "所属门店",
-            isMust: false,//是否必填
-            value: [],
-            showValue: [],
-        }];
-        if (options.data) {
-            let data = JSON.parse(options.data);
-            this.sys_enterprise_hrid = data.sys_enterprise_hrid;
-            form = form.map(v => {
-                switch (v.key) {
-                    case 'sa_storeids':
-                        v.showValue = data.storenames ? data.storenames.split(",") : []
-                        v.value = data.sa_storeids || []
-                        break;
-                    default:
-                        v.value = data[v.key] || ''
-                        break;
-                }
-                return v
-            })
-            /*  if (data.iswechatbind) form.splice(6, 0, {
+        if (data.status == "启用" && v.isMust) v.disabled = true;
+        return v;
+      });
+      /*  if (data.iswechatbind) form.splice(6, 0, {
                  key: "roleids",
                  type: "route",
                  path: "/select/roleid/roleid?sys_enterprise_hrid=" + data.sys_enterprise_hrid,
@@ -102,103 +119,107 @@ export default {
                  value: data.roleids || [],
                  showValue: data.rolenames ? data.rolenames.split(",") : [],
              }) */
-        }
-        this.form = form;
+    }
+    this.form = form;
+  },
+  methods: {
+    isUncomplete(uncomplete) {
+      this.uncomplete = uncomplete;
     },
-    methods: {
-        isUncomplete(uncomplete) {
-            this.uncomplete = uncomplete;
-        },
-        interrupt(item, selected, index) {
-            switch (item.key) {
-                default:
-                    item.showValue = selected.showValue || [];
-                    item.value = selected.value || [];
-                    this.$refs.form.setItem(index, item, true)
-                    break;
-            }
-        },
-        submit() {
+    interrupt(item, selected, index) {
+      switch (item.key) {
+        default:
+          item.showValue = selected.showValue || [];
+          item.value = selected.value || [];
+          this.$refs.form.setItem(index, item, true);
+          break;
+      }
+    },
+    submit() {
+      this.loading = true;
+      let that = this;
+      this.$refs.form.submit().then((data) => {
+        data.sa_storeids = data.sa_storeids.value;
+        if (data.roleids) data.roleids = data.roleids.value;
+        this.$Http
+          .basic({
+            id: 20240410164102,
+            content: {
+              sys_enterprise_hrid: this.sys_enterprise_hrid,
+              ...data,
+            },
+          })
+          .then((res) => {
+            this.loading = false;
+            console.log("加入团队", res);
+            if (this.cutoff(res.msg)) return;
             this.loading = true;
-            let that = this;
-            this.$refs.form.submit().then(data => {
-                data.sa_storeids = data.sa_storeids.value
-                if (data.roleids) data.roleids = data.roleids.value
-                this.$Http.basic({
-                    "id": 20240410164102,
-                    "content": {
-                        "sys_enterprise_hrid": this.sys_enterprise_hrid,
-                        ...data
-                    }
-                }).then(res => {
-                    this.loading = false;
-                    console.log("加入团队", res)
-                    if (this.cutoff(res.msg)) return;
-                    this.loading = true;
 
-                    this.$Http.uploadUserList && this.$Http.uploadUserList();
-                    if (this.sys_enterprise_hrid == 0) {
-                        uni.showModal({
-                            title: '新增成功',
-                            content: '人员新增成功!是否立即查看',
-                            cancelText: '返回',
-                            confirmText: '查看',
-                            success: ({ confirm }) => {
-                                if (confirm) {
-                                    uni.redirectTo({
-                                        url: '/team/userCenter/personal?id=' + res.data.sys_enterprise_hrid,
-                                    })
-                                } else {
-                                    uni.navigateBack();
-                                }
-                            },
-                        })
-                    } else {
-                        this.$Http.uploadUserDetail && this.$Http.uploadUserDetail();
-                        uni.showToast({
-                            title: "编辑成功",
-                            icon: "none",
-                            duration: 1500,
-                            mask: true
-                        })
-                        setTimeout(() => {
-                            uni.navigateBack();
-                        }, 800)
-                    }
-                })
-            })
-        },
+            this.$Http.uploadUserList && this.$Http.uploadUserList();
+            if (this.sys_enterprise_hrid == 0) {
+              uni.showModal({
+                title: "新增成功",
+                content: "人员新增成功!是否立即查看",
+                cancelText: "返回",
+                confirmText: "查看",
+                success: ({ confirm }) => {
+                  if (confirm) {
+                    uni.redirectTo({
+                      url:
+                        "/team/userCenter/personal?id=" +
+                        res.data.sys_enterprise_hrid,
+                    });
+                  } else {
+                    uni.navigateBack();
+                  }
+                },
+              });
+            } else {
+              this.$Http.uploadUserDetail && this.$Http.uploadUserDetail();
+              uni.showToast({
+                title: "编辑成功",
+                icon: "none",
+                duration: 1500,
+                mask: true,
+              });
+              setTimeout(() => {
+                uni.navigateBack();
+              }, 800);
+            }
+          });
+      });
     },
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>
 .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;
-    z-index: 999;
+  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;
+  z-index: 999;
 
-    .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;
-    }
+  .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;
-    }
+  .forbidden {
+    opacity: 0.6;
+  }
 }
 </style>

+ 174 - 0
utils/share.js

@@ -0,0 +1,174 @@
+import Vue from 'vue'
+
+//判断进入的场景值 
+function sceneInfo(scene) {
+    const sceneList = {
+        '1000': '其他',
+        '1001': '发现页小程序「最近使用」列表',
+        '1005': '微信首页顶部搜索框的搜索结果页',
+        '1006': '发现栏小程序主入口搜索框的搜索结果页',
+        '1007': '单人聊天会话中的小程序消息卡片',
+        '1008': '群聊会话中的小程序消息卡片',
+        '1010': '收藏夹',
+        '1011': '扫描二维码',
+        '1012': '长按图片识别二维码',
+        '1013': '扫描手机相册中选取的二维码',
+        '1014': '小程序订阅消息(与1107相同)',
+        '1017': '前往小程序体验版的入口页',
+        '1019': '微信钱包(微信客户端7.0.0版本改为支付入口)',
+        '1020': '公众号 profile 页相关小程序列表(已废弃)',
+        '1022': '聊天顶部置顶小程序入口',
+        '1023': '安卓系统桌面图标',
+        '1024': '小程序 profile 页	',
+        '1025': '扫描一维码',
+        '1026': '发现栏小程序主入口,「附近的小程序」列表',
+        '1027': '微信首页顶部搜索框搜索结果页「使用过的小程序」列表',
+        '1028': '我的卡包',
+        '1029': '小程序中的卡券详情页',
+        '1030': '自动化测试下打开小程序',
+        '1031': '长按图片识别一维码',
+        '1032': '扫描手机相册中选取的一维码',
+        '1034': '微信支付完成页',
+        '1035': '公众号自定义菜单',
+        '1036': 'App 分享消息卡片',
+        '1037': '小程序打开小程序',
+        '1038': '从另一个小程序返回',
+        '1039': '摇电视',
+        '1042': '添加好友搜索框的搜索结果页',
+        '1043': '公众号模板消息',
+        '1044': '带 shareTicket 的小程序消息卡片',
+        '1045': '朋友圈广告',
+        '1046': '朋友圈广告详情页',
+        '1047': '扫描小程序码',
+        '1048': '长按图片识别小程序码',
+        '1049': '扫描手机相册中选取的小程序码',
+        '1052': '卡券的适用门店列表',
+        '1053': '搜一搜的结果页',
+        '1054': '顶部搜索框小程序快捷入口',
+        '1056': '聊天顶部音乐播放器右上角菜单',
+        '1057': '钱包中的银行卡详情页',
+        '1058': '公众号文章',
+        '1059': '体验版小程序绑定邀请页',
+        '1060': '微信支付完成页(与1034相同)',
+        '1064': '微信首页连Wi-Fi状态栏',
+        '1065': 'URL scheme',
+        '1067': '公众号文章广告',
+        '1068': '附近小程序列表广告(已废弃)',
+        '1069': '移动应用通过openSDK进入微信,打开小程序',
+        '1071': '钱包中的银行卡列表页',
+        '1072': '二维码收款页面',
+        '1073': '客服消息列表下发的小程序消息卡片',
+        '1074': '公众号会话下发的小程序消息卡片',
+        '1077': '摇周边',
+        '1078': '微信连Wi-Fi成功提示页',
+        '1079': '微信游戏中心',
+        '1081': '客服消息下发的文字链',
+        '1082': '公众号会话下发的文字链',
+        '1084': '朋友圈广告原生页',
+        '1088': '会话中,系统消息,打开小程序',
+        '1089': '微信聊天主界面下拉,「最近使用」栏',
+        '1090': '长按小程序右上角菜单唤出最近使用历史',
+        '1091': '公众号文章商品卡片',
+        '1092': '城市服务入口',
+        '1095': '小程序广告组件',
+        '1096': '聊天记录,打开小程序',
+        '1097': '微信支付签约原生页,打开小程序',
+        '1099': '页面内嵌插件',
+        '1100': '红包封面详情页打开小程序',
+        '1101': '远程调试热更新(开发者工具中,预览 -> 自动预览 -> 编译并预览)',
+        '1102': '公众号 profile 页服务预览',
+        '1103': '发现页小程序「我的小程序」列表',
+        '1104': '微信聊天主界面下拉,「我的小程序」栏',
+        '1106': '聊天主界面下拉,从顶部搜索结果页,打开小程序',
+        '1107': '订阅消息,打开小程序',
+        '1113': '安卓手机负一屏,打开小程序(三星)',
+        '1114': '安卓手机侧边栏,打开小程序(三星)',
+        '1119': '【企业微信】工作台内打开小程序',
+        '1120': '【企业微信】个人资料页内打开小程序',
+        '1121': '【企业微信】聊天加号附件框内打开小程序',
+        '1124': '扫“一物一码”打开小程序',
+        '1125': '长按图片识别“一物一码”',
+        '1126': '扫描手机相册中选取的“一物一码”',
+        '1129': '微信爬虫访问',
+        '1131': '浮窗',
+        '1133': '硬件设备打开小程序',
+        '1135': '小程序profile页相关小程序列表,打开小程序',
+        '1144': '公众号文章 - 视频贴片',
+        '1145': '发现栏 - 发现小程序',
+        '1146': '地理位置信息打开出行类小程序',
+        '1148': '卡包-交通卡,打开小程序',
+        '1150': '扫一扫商品条码结果页打开小程序',
+        '1151': '发现栏 - 我的订单',
+        '1152': '订阅号视频打开小程序',
+        '1153': '“识物”结果页打开小程序',
+        '1154': '朋友圈内打开“单页模式”',
+        '1155': '“单页模式”打开小程序',
+        '1157': '服务号会话页打开小程序',
+        '1158': '群工具打开小程序',
+        '1160': '群待办',
+        '1167': 'H5 通过开放标签打开小程序',
+        '1168': '移动/网站应用直接运行小程序',
+        '1169': '发现栏小程序主入口,各个生活服务入口(例如快递服务、出行服务等)',
+        '1171': '微信运动记录(仅安卓)',
+        '1173': '聊天素材用小程序打开 详情',
+        '1175': '视频号主页商店入口',
+        '1176': '视频号直播间主播打开小程序',
+        '1177': '视频号直播商品',
+        '1178': '在电脑打开手机上打开的小程序',
+        '1179': '#话题页打开小程序',
+        '1181': '网站应用打开PC小程序',
+        '1183': 'PC微信 - 小程序面板 - 发现小程序 - 搜索',
+        '1184': '视频号链接打开小程序',
+        '1185': '群公告',
+        '1186': '收藏 - 笔记',
+        '1187': '浮窗',
+        '1189': '表情雨广告',
+        '1191': '视频号活动',
+        '1192': '企业微信联系人profile页',
+        '1193': '视频号主页服务菜单打开小程序',
+        '1194': 'URL Link 详情',
+        '1195': '视频号主页商品tab',
+        '1196': '个人状态打开小程序',
+        '1197': '视频号主播从直播间返回小游戏',
+        '1198': '视频号开播界面打开小游戏',
+        '1200': '视频号广告打开小程序',
+        '1201': '视频号广告详情页打开小程序',
+        '1202': '企微客服号会话打开小程序卡片',
+        '1203': '微信小程序压测工具的请求',
+        '1206': '视频号小游戏直播间打开小游戏',
+        '1207': '企微客服号会话打开小程序文字链',
+        '1208': '聊天打开商品卡片',
+        '1212': '青少年模式申请页打开小程序',
+        '1215': '广告预约打开小程序',
+        '1216': '视频号订单中心打开小程序',
+        '1223': '安卓桌面Widget打开小程序',
+        '1228': '视频号原生广告组件打开小程序',
+        '1230': '订阅号H5广告进入小程序',
+        '1231': '动态消息提醒入口打开小程序',
+        '1242': '小程序发现页门店快送模块频道页进入小程序',
+        '1245': '小程序发现页门店快送搜索结果页进入小程序',
+        '1252': '搜一搜小程序搜索页「小功能」模块进入小程序'
+    }
+    let channel = sceneList[scene ? scene + '' : uni.getLaunchOptionsSync().scene + ''] || '未知';
+    return channel;
+}
+
+function winTheCustomer(shareUserid = 0, appname, replenish = {}, scene = '') {
+    if (!shareUserid) return uni.getStorageSync('userMsg').userid;
+    Vue.prototype.$Http.basic({
+        "id": "2024061113525202",
+        "content": {
+            shareuserid: shareUserid,
+            channel: sceneInfo(scene), //渠道
+            appname, //应用名称
+            ...replenish
+        }
+    }).then(res => {
+        console.log(`${appname}记录获客`, res)
+    })
+    return shareUserid;
+}
+
+module.exports = {
+    winTheCustomer
+}