瀏覽代碼

我的信息编辑

codeMan 1 年之前
父節點
當前提交
9c5cc26f17

+ 30 - 24
cloud/businessCard/edit.vue

@@ -24,13 +24,13 @@
             </template>
         </my_form>
 
-        <view style="height: 70px;" />
+        <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>
@@ -53,10 +53,12 @@ export default {
             userid: 0,
             isShow: true,
             isSubmit:false,
+            origin:''
         }
     },
     onLoad(options) {
         this.userid = options.id
+        this.origin = options.origin
         this.init()
         uni.setNavigationBarTitle({
             title: '修改名片'
@@ -208,26 +210,29 @@ export default {
                 label: "地址",
                 isMust: false,//是否必填
                 value: "",
-            },{
-                key: "remarks",
-                type: "textarea",
-                label: "自我介紹",
-                isMust: true,//是否必填
-                value: '',
-            },{
-                key: "attachmentids",
-                type: "upload",
-                label: "图片",
-                placeholder: "可上传多个图片",
-                accept: "image*/",
-                ownertable: "temporary",
-                ownerid: 999,
-                usetype: 'default',
-                allowUpload: true,
-                allowDelete: true,
-                value: [],
-                marginTop: 10
-            }];
+            },];
+            if (!this.origin) {
+                form.push({
+                    key: "remarks",
+                    type: "textarea",
+                    label: "自我介紹",
+                    isMust: false,//是否必填
+                    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": {
@@ -257,6 +262,7 @@ export default {
             this.onUpload = ing;
         },
         isUncomplete(uncomplete) {
+            console.log(uncomplete);
             this.uncomplete = uncomplete;
         },
         submit() {
@@ -272,7 +278,7 @@ export default {
                     this.loading = false;
                     console.log("修改信息", res)
                     if (this.cutoff(res.msg)) return;
-                    if (data.files.temporarys.length) {
+                    if (!this.origin && data.files.temporarys.length) {
                         this.onUpload = true;
                         await this.$Http.basic({
                             "classname": "system.attachment.Attachment",
@@ -292,7 +298,7 @@ export default {
                     };
                     this.loading = true;
 
-                    if (data.files.linksids.length) {
+                    if (!this.origin && data.files.linksids.length) {
                         await this.$Http.basic({
                             "classname": "system.attachment.Attachment",
                             "method": "deleteFileLink",

+ 3 - 3
cloud/businessCard/index.vue

@@ -100,7 +100,7 @@
         </view>
 
         <view class="footer">
-            <navigator class="but" :url="'/cloud/businessCard/edit?id='+userid" @click="aaa">
+            <navigator class="but" :url="'/cloud/businessCard/edit?id='+userid" @click="goEditPage">
                 <text>修改名片</text>
             </navigator>
         </view>
@@ -137,7 +137,7 @@ export default {
     computed: {
     },
     methods: {  
-        aaa () {
+        goEditPage () {
             this.$Http.editUser = function (id){
                 this.getuserInfo (id)
                 delete this.$Http.editUser
@@ -175,7 +175,7 @@ export default {
         },
         copy() {
             uni.setClipboardData({
-                data:this.userInfo.phonebumber,
+                data:this.userInfo.phonenumber,
                 success: (result) => {
                     uni.showToast({
                         title: "已复制",

+ 1 - 0
cloud/businessCard/share.vue

@@ -54,6 +54,7 @@ export default {
             userInfo:{},
             userid:'',
             imageUrl:'',
+            qrCode: this.qrCodePrefix,
             loading:false
         }
     },

+ 23 - 6
pages/index/cloud/userInfo.vue

@@ -2,9 +2,11 @@
   <view class="work-panel_userinfo">
       <view class="userinfo-left">
           <view class="avatar">
-              <image class="image" src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg" mode="widthFix"></image>
-              <text class="title">{{ userInfoValue.rolenames }}</text>
-              <text class="title2">{{ userInfoValue.rolenames }}</text>
+                <view class="image">
+                    <image :src="userInfoValue.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'" mode="aspectFill"></image>
+                </view>
+                <text class="title">{{ userInfoValue.rolenames }}</text>
+                <text class="title2">{{ userInfoValue.rolenames }}</text>
           </view>
           <view class="info">
               <text class="title">{{ userInfoValue.name || userInfoValue.remarks }}</text>
@@ -12,7 +14,7 @@
           </view>
       </view>
       <view class="userinfo-right">
-          <navigator :url="isCode?'/cloud/businessCard/index':'/team/userCenter/personal'" class="info-card">
+          <navigator :url="isCode?'/cloud/businessCard/index':'/cloud/businessCard/edit?origin=my&id='+userInfoValue.userid" class="info-card" @click="goEdit">
               <image class="image" src="/static/workbench/个人名片.svg" mode="widthFix"></image>
               <text class="title">{{isCode?'个人名片':'个人信息'}}</text>
           </navigator>
@@ -43,7 +45,15 @@ export default {
   data () {
     return {
     }
-  }
+  },
+  methods: {
+    goEdit () {
+        this.$Http.editUser = function (id){
+            this.$emit('upData',id)
+            delete this.$Http.editUser
+        }.bind(this)
+    }
+  },
 }
 </script>
 
@@ -65,7 +75,14 @@ export default {
             .image{
                 width: 44px;
                 height: 44px;
-                box-shadow: #F7F7F7 0 5px;
+                border: 2px solid #FFFFFF;
+                border-radius: 50%;
+                box-shadow: 0px 3px 6px 1px #E0D6D7;
+                image {
+                    width: 100%;
+                    height: 100%;
+                    border-radius: 50%;
+                }
             }
             .title{
                 font-family: PingFang SC, PingFang SC;

+ 29 - 12
pages/index/index/userCenter.vue

@@ -1,5 +1,8 @@
 <template>
     <view>
+			<view class="user-info">
+				<UserInfo @upData="getUserInfo()" :isCode="false" :userInfoValue="userInfoValue"></UserInfo>
+			</view>
       <view class="border-list-box">
         <navigator class="border-list-top" url="/packageA/shop/history?title=我访问的店铺" hover-class="navigator-hover">
           <view class="text-style">
@@ -38,27 +41,39 @@
 </template>
 
 <script>
+import UserInfo from '../cloud/userInfo.vue'
 export default {
+	components:{UserInfo},
     data() {
         return {
             updatePage: true,
-			isWinning:true
+						isWinning:true,
+						userInfoValue:{}
         }
     },
     methods: {
         init(callBack) {
             callBack()
             this.updatePage = false;
-			this.queryAuth()
+						this.queryAuth()
+						this.getUserInfo()
         },
-        queryAuth(){
-          let auth=uni.getStorageSync("authList")
-		  if (auth.工作台导航.中奖明细) {
-			  this.isWinning = true
-		  }else {
-			  this.isWinning = false
-		  }
-        }
+				async getUserInfo () {
+            let res = await this.$Http.basic({
+                "id": "20240510104102",
+                "content": {}
+            })
+            this.userInfoValue = res.data
+            console.log(this.userInfoValue,'用户信息')
+        },
+			queryAuth(){
+				let auth=uni.getStorageSync("authList")
+				if (auth.工作台导航.中奖明细) {
+					this.isWinning = true
+				}else {
+					this.isWinning = false
+				}
+					}
     },
 
 
@@ -70,8 +85,10 @@ export default {
 		width: 355px;
 		border-radius: 8px;
 		background: #FFFFFF;
-		margin: 84px 10px 0px 10px;
-		overflow: hidden;
+		margin: 20px 10px 0px 10px;
+	}
+	.user-info {
+		margin: 0 0 0 10px;
 	}
 	.border-list-top{
 		background: #FFFFFF;

+ 4 - 3
store/storeQRCode/index.vue

@@ -19,7 +19,7 @@
 
                     <l-painter-text text="扫码进入店铺"
                         css="width:96px;line-height:17px;position: absolute;left:50%;bottom:269px;z-index:2;margin-left:-48px;font-size: 12px;color: #666666;font-family: PingFang SC, PingFang SC;" />
-                    <l-painter-qrcode :text="qrCode + 'getStore?id=' + userMsg.sys_enterpriseid "
+                    <l-painter-qrcode :text="qrCode + 'getStore?id=' +  storeid"
                         css="width: 200px; height: 200px;position: absolute;left:50%;bottom:55px;z-index:2;margin-left:-100px;" />
                 </l-painter>
             </view>
@@ -28,7 +28,7 @@
         <view style="height: 70px;" />
         <view class="footer">
             <view class="add" hover-class="navigator-hover"
-                @click="submit()">
+                @click="saveTheImage()">
                 <block>
                     保存图片
                     
@@ -54,7 +54,8 @@ export default {
                 userid: 0
             },
             qrCode: this.qrCodePrefix,
-            name: ""
+            name: "",
+            storeid:uni.getStorageSync('shop').sa_storeid
         }
     },
     onLoad() {