浏览代码

2024-05-15

codeMan 1 年之前
父节点
当前提交
0ea98deef0
共有 4 个文件被更改,包括 202 次插入17 次删除
  1. 70 4
      cloud/mySubscription/index.vue
  2. 122 0
      cloud/mySubscription/list.vue
  3. 10 13
      pages/index/cloud/workbench.vue
  4. 0 0
      static/workbench/预约名单.svg

+ 70 - 4
cloud/mySubscription/index.vue

@@ -1,13 +1,79 @@
 <template>
-    <view>
-        我的预约
+    <view class="self-order">
+        <view class="type-tabs">
+            <u-tabs :scrollable="true" lineColor="#C30D23" :activeStyle="{ color: '#C30D23', fontWeight: 'bold' }" :list="types"
+            @click="changeType" :current="current" />
+        </view>
+
+        <My_listbox ref="List" @getlist="getList" :bottomHeight="70">
+            <List :list="list"></List>
+        </My_listbox>
     </view>
 </template>
 
 <script>
+import { onLoad } from 'uview-ui/libs/mixin/mixin';
+import List from './list.vue'
 export default {
-
+    components:{List},
+    data () {
+        return {
+            current:0,
+            content: {
+                "pageNumber": 1,
+                "pageSize": 20,
+                "where": {
+                    "type": "",
+                }
+            },
+            list:[],
+            types:[]
+        }
+    },
+    methods: {
+        changeType (type) {
+            this.current = type.index
+            this.content.where.type = type.value
+            this.getList(true)
+        },
+        getList(init = false) {
+            return new Promise((resolve, reject) => {
+                if (this.paging(this.content, init)) return resolve();
+                this.$Http.basic({
+                    "id": "20240513162802",
+                    content: this.content
+                }).then(res => {
+                    this.$refs.List.setHeight()
+                    this.$refs.List.RefreshToComplete()
+                    console.log("获取预约列表", res)
+                    resolve();
+                    if (this.cutoff(res.msg)) return;
+                    this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+                    this.content = this.$refs.List.paging(this.content, res)
+                })
+            })
+        },
+        callPhoneFun (phonenumber) {
+            this.callPhone(phonenumber)
+        }
+    },
+    created() {
+        this.getCustomClass('appointmenttype').then(res => {
+            res.forEach(v => v.name = v.remarks)
+            res.unshift({name:'全部',value:''})
+            this.types = res
+            console.log(this.types,'分类');
+        })
+        this.getList()
+    },
+    onLoad (option) {
+        uni.setNavigationBarTitle({
+            title:'我的预约',
+        })
+    }
 }
 </script>
 
-<style></style>
+<style lang="scss">
+    
+</style>

+ 122 - 0
cloud/mySubscription/list.vue

@@ -0,0 +1,122 @@
+<template>
+    <view class="list-box">
+    <view class="item-box" v-for="item in list" :key="item.shareuserid">
+        <navigator class="item-top" url="'#">
+            <view class="avatar-info">
+                <u--image shape="circle" :width="tovw(44)" :height="tovw(44)" :lazy-load="true" :src="item.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'" mode="widthFix"></u--image>
+                <view class="detail-info">
+                    <text class="title">{{ item.name }}</text>
+                    <view class="address">
+                        <i class="iconfont icon-dizhi-hui1"></i>
+                        <text>{{ item.province+item.city+item.county+item.address }}</text>
+                    </view>
+                </view>
+            </view>
+            <view class="origin-info">
+                <text class="origin">来自:{{ item.sharename }}</text>
+                <text class="createdate">{{ item.createdate }}</text>
+            </view>
+        </navigator>
+        <view class="footer-info">
+            <view class="left">来源:{{ item.type }}</view>
+                <navigator class="right" url="#" @click="callPhoneFun('17757302859')">
+                    <i class="iconfont icon-dianhua-hong" style="color:#C30D23"></i>
+                    <text>{{ item.phonenumber }}</text>
+                </navigator>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    props:['list'],
+  data () {
+    return {
+    }
+  }
+}
+</script>
+
+<style  lang="scss">
+.list-box {
+  padding: 10px 10px 0 10px;
+  .item-box {
+      background: #ffffff;
+      padding: 10px 0 10px 10px;
+      display: flex;
+      flex-direction: column;
+      border-radius: 8px 8px 8px 8px;
+      .item-top {
+          display: flex;
+          flex-direction: column;
+          padding-bottom: 10px;
+          border-bottom: 1px solid #DDDDDD;
+          font-family: Source Han Sans SC, Source Han Sans SC;
+          .avatar-info {
+              display: flex;
+              .avatar {
+                  width: 44px;
+                  height: 44px;
+                  margin-right: 10px;
+              }
+              .detail-info {
+                  display: flex;
+                  flex-direction: column;
+                  margin-left: 10px;
+                  .title {
+                      font-weight: 500;
+                      font-size: 16px;
+                      color: #333333;
+                      margin-bottom: 5px;
+                  }
+                  .address {
+                      font-weight: 400;
+                      font-size: 12px;
+                      color: #666666;
+                      display: flex;
+                      align-items: center;
+                      align-content: center;
+                      text {
+                          margin-left: 5px;
+                      }
+                  }
+              }
+          }
+          .origin-info {
+              display: flex;
+              justify-content: space-between;
+              font-size: 14px;
+              color: #888888;
+              margin-top: 6px;
+              .origin {
+                  margin-left: 64px;
+              }
+              .createdate {
+                  margin-right: 10px;
+              }
+          }
+      }
+      .footer-info {
+          display: flex;
+          justify-content: space-between;
+          margin-top: 10px;
+          .left{
+          font-weight: 400;
+          font-size: 14px;
+          color: #888888;
+          } 
+          .right{
+          display: flex;
+          align-items: center;
+          align-content: center;
+          text {
+              font-size: 14px;
+              color: #333333;
+              margin: 0 10px 0 10px;
+          }
+          }
+      }
+  }
+}
+</style>

+ 10 - 13
pages/index/cloud/workbench.vue

@@ -28,7 +28,7 @@
         </view>
         <view class="work-panel_options">
             <template v-for="(item,index) in list2">
-                <navigator class="option" :key="index" url="#" hover-class="navigator-hover" open-type="navigate" v-if="path">
+                <navigator class="option" :key="index" :url="item.path" hover-class="navigator-hover" open-type="navigate" v-if="item.path">
                     <view class="box">
                         <text class="left">{{ item.label }}</text>
                         <view class="right">
@@ -52,9 +52,9 @@ export default {
         return {
             updatePage: true,
             list: [{
-                label: "报名信息",
+                label: "预约名单",
                 itemId: "cloud",
-                name:'1'
+                name:'orderList'
             }, {
                 label: "企业公告",
                 itemId: "index",
@@ -104,7 +104,7 @@ export default {
                 label: "我的预约",
                 itemId: "index",
                 page: "活动",
-                name:'1',
+                name:'selfOrder',
             }, {
                 label: "收货地址",
                 itemId: "index",
@@ -114,9 +114,6 @@ export default {
                 label: "我的收藏",
                 itemId: "index",
                 page: "案例",
-                params: {
-                    active: '实景案例'
-                },
                 name:'1',
             }, {
                 label: "通讯录",
@@ -128,11 +125,9 @@ export default {
                 name:'1',
             }, {
                 label: "问卷调查",
-                path: "/packageA/advertising/unshareable?id=505",
                 name:'1',
             }, {
                 label: "意见反馈",
-                path: "/packageA/advertising/unshareable?id=505",
                 name:'1',
             }],
             colors: ['background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%)',
@@ -185,15 +180,17 @@ export default {
                 }
             }
 
+            let keys2 = Object.keys(this.roles.工作台)
             for (let index = 0; index < this.list2.length; index++) {
-                for (let index2 = 0; index2 < keys.length; index2++) {
-                    if (this.roles.工作台[keys[index2]] && this.roles.工作台[keys[index2]].name == this.list2[index].name) {
-                        this.list2[index] = Object.assign({},this.list2[index],this.roles.工作台[keys[index2]])
+                for (let index2 = 0; index2 < keys2.length; index2++) {
+                    console.log(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;
                     }
                 }
             }
-            console.log(this.roles,this.list,'权限');
+            console.log(this.roles,this.list2,'权限');
             
         },
         onSearch () {

+ 0 - 0
static/workbench/报名信息.svg → static/workbench/预约名单.svg