Browse Source

通讯录

codeMan 1 year ago
parent
commit
679adfd56c

+ 36 - 3
cloud/businessCard/index.vue

@@ -1,5 +1,14 @@
 <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>
         <view class="head" :style="[{ height: tovw(+CustomBar+184) }]" style="background: linear-gradient( 225deg, #F43A50 0%, #C30D23 100%)">
             <view class="custom" :style="{ height: tovw(Custom.height), top: tovw(Custom.top - 3) }">
                 <view v-if="userInfo.name">{{userInfo.name}}的名片</view>
@@ -91,7 +100,7 @@
             <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">
+                    <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>
@@ -125,6 +134,7 @@
 
 <script>
 import contact from "../../components/contact"
+import { viewImage } from "../../utils/settleFiles.js"
 export default {
     components:{contact},
     data () {
@@ -137,6 +147,9 @@ export default {
     computed: {
     },
     methods: {  
+        preview (url) {
+            viewImage(url)
+        },
         goEditPage () {
             this.$Http.editUser = function (id){
                 this.getuserInfo (id)
@@ -511,8 +524,28 @@ export default {
         background: #FFFFFF;
         box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
         box-sizing: border-box;
-        z-index: 9999;
-        padding: 10px;
+        z-index: 9;
+        padding: 5px 10px;
+        .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);
+            }
+        }
         .but { 
             width: 355px;
             height: 45px;

+ 116 - 4
cloud/contacts/index.vue

@@ -1,13 +1,125 @@
 <template>
-    <view>
-        通讯录列表
+    <view class="cantacts">
+        <view style="padding: 10px;">
+            <My_search placeholder="搜索名称,手机号" @onSearch="onSearch"></My_search>
+        </view>
+        <view class="content">
+            <view class="type-list">
+                <u-list>
+                    <u-list-item v-for="(item,index) in groupList" :key="item.sys_phonebookgroupid">
+                        <view :class="['type-item',act == index ? 'active' : '']" @click="typeClick(index,item)">
+                            {{ item.groupname }}
+                        </view>
+                    </u-list-item>
+                </u-list>
+            </view>
+            
+            <view class="list">
+                <My_listbox ref="List" @getlist="getList" :bottomHeight="70">
+                    <List :list="list"></List>
+                </My_listbox>
+            </view>
+        </view>
     </view>
 </template>
 
 <script>
+import List from './list.vue'
 export default {
-
+    components:{List},
+    data () {
+        return {
+            list:[],
+            content: {
+                "pageNumber": 1,
+                "pageSize": 20,
+                "where": {
+                    "condition": "",
+                    "groupname": ""
+                }
+            },
+            groupParam: {
+                "id": "20240516135202",
+                "content": {
+                    "pageNumber": 1,
+                    "pageSize": 99999,
+                    "where": {
+                        "isenable": 1
+                    }
+                },
+            },
+            groupList:[],
+            act:0
+        }
+    },
+    methods: {
+        onSearch (condition) {
+            this.content.where.condition = condition
+            this.getList(true)
+        },
+        typeClick (index,item) {
+            this.act = index
+            this.content.where.groupname = item.groupname
+            this.getList(true)
+        },
+        getList(init = false) {
+            return new Promise((resolve, reject) => {
+                if (this.paging(this.content, init)) return resolve();
+                this.$Http.basic({
+                    "id": "20240516144502",
+                    content: this.content
+                }).then(res => {
+                    this.$refs.List.setHeight()
+                    this.$refs.List.RefreshToComplete()
+                    resolve();
+                    if (this.cutoff(res.msg)) return;
+                    this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+                    console.log("获取通讯录列表", this.list)
+                    this.content = this.$refs.List.paging(this.content, res)
+                })
+            })
+        },
+        async getGroup () {
+            let res = await this.$Http.basic(this.groupParam)
+            this.groupList = res.data
+            if (this.groupList.length) this.content.where.groupname = this.groupList[0].groupname
+            this.getList()
+            console.log(this.groupList,'分组列表');
+        },
+        onLoad () {
+            this.getGroup()
+        }
+    },
 }
 </script>
 
-<style></style>
+<style lang="scss">
+.cantacts {
+    box-sizing: border-box;
+    background: #ffffff;
+    .content {
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        display: flex;
+        .type-list {
+            background: #F7F7F7;
+            width: 90px;
+            .type-item {
+                font-weight: 400;
+                font-size: 14px;
+                color: #333333;
+                display: flex;
+                align-items: center;
+                background: #F7F7F7;
+                align-content: center;
+                padding: 12px 16px;
+            }
+        }
+        .active {
+            background: #ffffff !important;
+        }
+        .list { 
+            flex: 1;
+        }
+    }
+}
+</style>

+ 69 - 0
cloud/contacts/list.vue

@@ -0,0 +1,69 @@
+<template>
+    <view class="list-box">
+        <navigator url="#" class="item-box" v-for="item in list" :key="item.sys_phonebookid">
+            <view class="box">
+                <view class="left">
+                    <view class="title">{{ item.name }}</view>
+                    <view class="remarks">{{ item.remarks }}</view>
+                </view>
+                <navigator url="#" class="right" @click="callPhoneFun(item)">
+                    <i class="iconfont icon-dianhua-hong" style="color:#C30D23"></i>
+                </navigator>
+            </view>
+            
+        </navigator>
+    </view>
+</template>
+
+<script>
+export default {
+    props:['list'],
+  data () {
+    return {
+    }
+  },
+  methods: {
+    callPhoneFun (item) {
+        console.log(item);
+        this.callPhone(item.phonenumber)
+    }
+  },
+}
+</script>
+
+<style  lang="scss">
+.list-box {
+    background: #ffffff;
+    .item-box {
+        display: flex;
+        padding: 10px 0 0 10px;
+        .box {
+            border-bottom: 1px solid #DDDDDD;
+            display: flex;
+            align-items: center;
+            align-content: center;
+            justify-content: space-between;
+            width: 100%;
+            padding-bottom: 10px;
+            .left {
+                display: flex;
+                flex-direction: column;
+                .title {
+                    font-weight: bold;
+                    font-size: 14px;
+                    color: #333333;
+                    margin-bottom: 5px;
+                }
+                .remarks {
+                    font-weight: 400;
+                    font-size: 12px;
+                    color: #999999;
+                }
+            }
+            .right {
+                padding: 10px 10px 10px 20px;
+            }
+        }
+    }
+}
+</style>

+ 7 - 2
cloud/mySubscription/list.vue

@@ -19,7 +19,7 @@
         </navigator>
         <view class="footer-info">
             <view class="left">来源:{{ item.type }}</view>
-                <navigator class="right" url="#" @click="callPhoneFun('17757302859')">
+                <navigator class="right" url="#" @click="callPhoneFun(item.phonenumber)">
                     <i class="iconfont icon-dianhua-hong" style="color:#C30D23"></i>
                     <text>{{ item.phonenumber }}</text>
                 </navigator>
@@ -34,7 +34,12 @@ export default {
   data () {
     return {
     }
-  }
+  },
+  methods: {
+    callPhoneFun (phone) {
+        this.callPhone(phone)
+    }
+  },
 }
 </script>
 

+ 4 - 4
pages/index/cloud/workbench.vue

@@ -119,7 +119,7 @@ export default {
             }, {
                 label: "通讯录",
                 itemId: "cloud",
-                name:'1',
+                name:'contacts',
             }, {
                 label: "考试成绩",
                 itemId: "cloud",
@@ -185,11 +185,11 @@ export default {
                 }
             }
 
-            let keys2 = Object.keys(this.roles.工作台)
+            let keys2 = Object.keys(this.roles.工作台导航)
             for (let index = 0; index < this.list2.length; index++) {
                 for (let index2 = 0; index2 < keys2.length; index2++) {
-                    if (this.roles.工作台[keys2[index2]] && this.roles.工作台[keys2[index2]].name == this.list2[index].name) {
-                        this.list2[index] = Object.assign({},this.list2[index],this.roles.工作台[keys2[index2]])
+                    if (this.roles.工作台导航[keys2[index2]] && this.roles.工作台导航[keys2[index2]].name == this.list2[index].name) {
+                        this.list2[index] = Object.assign({},this.list2[index],this.roles.工作台导航[keys2[index2]])
                         break;
                     }
                 }

+ 3 - 0
store/storeQRCode/index.vue

@@ -59,6 +59,9 @@ export default {
         }
     },
     onLoad() {
+        uni.setNavigationBarTitle({
+            title:'店铺码',
+        })
         this.getUserMsg()
     },
     methods: {