From 0608fcf01c958dd6953fda2d2b84fe5513ce206b Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 12 May 2022 17:29:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E3=80=81=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/modules/order.js | 34 +++++++ apis/request.js | 2 +- components/sl-filter/sl-filter.vue | 2 +- pages.json | 71 +++++++------ pages/addStaff/addStaff.vue | 29 +++++- pages/clientDetail/clientDetail.vue | 21 ++-- pages/clients/clients.vue | 18 ++-- pages/index/index.vue | 28 ++++- pages/invite/invite.vue | 152 ++++++++++++++++++++++++++++ pages/orderDetail/orderDetail.vue | 15 ++- pages/orders/orders.vue | 132 +++++++++++++++++------- pages/send/send.vue | 23 +++-- static/house.png | Bin 0 -> 331 bytes static/qrcode.png | Bin 0 -> 666 bytes 14 files changed, 417 insertions(+), 110 deletions(-) create mode 100644 apis/modules/order.js create mode 100644 pages/invite/invite.vue create mode 100644 static/house.png create mode 100644 static/qrcode.png diff --git a/apis/modules/order.js b/apis/modules/order.js new file mode 100644 index 0000000..14567c9 --- /dev/null +++ b/apis/modules/order.js @@ -0,0 +1,34 @@ +import request from '@/apis/request.js' +const { get, post } = request + +export const queryCustomer = (data) => { + return post('nakadai/nakadai/customer/queryCustomer', data) +} + +export const queryCustomerDetails = (data) => { + return get('nakadai/nakadai/customer/queryCustomerDetails', data) +} + +export const querySchool = (data) => { + return get('nakadai/nakadai/school/querySchool', data) +} + +export const queryIndustryClass = (data) => { + return get('nakadai/nakadai/hrIndustryClass/queryIndustryClass', data) +} + +export const queryIndustry = (data) => { + return get('nakadai/nakadai/hrIndustry/queryIndustry', data) +} + +export const queryCustomerIsExists = (data) => { + return get('nakadai/nakadai/customer/queryCustomerIsExists', data) +} + +export const addCustomer = (data) => { + return post('nakadai/nakadai/customer/addCustomer', data) +} + +export const updateCustomer = (data) => { + return post('nakadai/nakadai/customer/updateCustomer', data) +} \ No newline at end of file diff --git a/apis/request.js b/apis/request.js index 4ede338..ba05b81 100644 --- a/apis/request.js +++ b/apis/request.js @@ -12,7 +12,7 @@ const request = options => { }) } const header = Object.assign({}, config.headers, { - token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjUyMjM0OTM2LCJleHAiOjE2NTIyNzgxMzYsImFjY291bnRJZCI6IjEifQ.QwmlBM6uDfRpW4xV8b0r3aBOqXQu5gWLj5Jbrlnrtcg' + token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjUyMzIxMzkwLCJleHAiOjE2NTIzNjQ1OTAsImFjY291bnRJZCI6IjEifQ.TbdyqfODzJngOzLavF3Pb79eGzhuiCDeviRbj8ClU30' }) return new Promise((resolve, reject)=>{ uni.request({ diff --git a/components/sl-filter/sl-filter.vue b/components/sl-filter/sl-filter.vue index 42b3118..c0fcce9 100644 --- a/components/sl-filter/sl-filter.vue +++ b/components/sl-filter/sl-filter.vue @@ -2,7 +2,7 @@ - + {{item.title}} diff --git a/pages.json b/pages.json index 2e02728..77ac90b 100644 --- a/pages.json +++ b/pages.json @@ -1,28 +1,44 @@ { "pages": [ - { - "path" : "pages/clients/clients", + { + "path" : "pages/send/send", "style" : { - "navigationBarTitleText": "客户列表", - "enablePullDownRefresh": true + "navigationBarTitleText": "下载发送", + "enablePullDownRefresh": false } }, { - "path" : "pages/orderDetail/orderDetail", + "path" : "pages/invite/invite", "style" : { - "navigationBarTitleText": "订单详情", + "navigationBarTitleText": "加入团队", "enablePullDownRefresh": false } }, { - "path" : "pages/orders/orders", + "path" : "pages/addStaff/addStaff", "style" : { - "navigationBarTitleText": "订单列表", + "navigationBarTitleText": "添加成员", + "enablePullDownRefresh": false + } + }, + { + "path" : "pages/addMember/addMember", + "style" : + { + "navigationBarTitleText": "添加成员", "enablePullDownRefresh": false } + }, + { + "path" : "pages/clients/clients", + "style" : + { + "navigationBarTitleText": "客户列表", + "enablePullDownRefresh": true + } }, { "path": "pages/index/index", @@ -31,26 +47,34 @@ } }, { - "path" : "pages/password/password", + "path" : "pages/orders/orders", "style" : { - "navigationBarTitleText": "修改密码", + "navigationBarTitleText": "订单列表", "enablePullDownRefresh": false } }, { - "path" : "pages/setting/setting", + "path" : "pages/orderDetail/orderDetail", "style" : { - "navigationBarTitleText": "设置", + "navigationBarTitleText": "订单详情", "enablePullDownRefresh": false } }, { - "path" : "pages/send/send", + "path" : "pages/password/password", "style" : { - "navigationBarTitleText": "下载发送", + "navigationBarTitleText": "修改密码", + "enablePullDownRefresh": false + } + }, + { + "path" : "pages/setting/setting", + "style" : + { + "navigationBarTitleText": "设置", "enablePullDownRefresh": false } }, @@ -102,25 +126,6 @@ "navigationBarTitleText": "我的", "enablePullDownRefresh": false } - - } - ,{ - "path" : "pages/addMember/addMember", - "style" : - { - "navigationBarTitleText": "添加成员", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/addStaff/addStaff", - "style" : - { - "navigationBarTitleText": "添加成员", - "enablePullDownRefresh": false - } - }, { "path" : "pages/detail/detail", diff --git a/pages/addStaff/addStaff.vue b/pages/addStaff/addStaff.vue index 9c0232d..3954068 100644 --- a/pages/addStaff/addStaff.vue +++ b/pages/addStaff/addStaff.vue @@ -1,7 +1,18 @@ @@ -23,6 +34,18 @@ } - diff --git a/pages/clientDetail/clientDetail.vue b/pages/clientDetail/clientDetail.vue index 50715d0..58e59db 100644 --- a/pages/clientDetail/clientDetail.vue +++ b/pages/clientDetail/clientDetail.vue @@ -58,7 +58,7 @@ - + 编辑 @@ -159,8 +159,19 @@ this.isDetail = !!option.show option.customerId && this.getInfo() - this.getSchool() - this.getIndustryClass() + // 非详情才需要查询学校和行业 + if (!this.isDetail) { + this.getSchool() + this.getIndustryClass() + } + // 设置标题 + uni.setNavigationBarTitle({ + title: option.customerId ? + (option.show ? + '客户详情' : + '编辑客户') : + '新增客户' + }) }, methods: { // 获取详情 @@ -243,9 +254,7 @@ }, 1500) }).catch(res => {}) } - }).catch(err => { - console.log('err', err); - }) + }).catch(err => {}) }, } } diff --git a/pages/clients/clients.vue b/pages/clients/clients.vue index 538e815..1a80446 100644 --- a/pages/clients/clients.vue +++ b/pages/clients/clients.vue @@ -4,10 +4,13 @@
  • {{ tab.name }}
  • - + - + + + +
      @@ -93,12 +96,14 @@ }, 500) } }, + // 下拉刷新 onPullDownRefresh() { this.initList() setTimeout(() => { uni.stopPullDownRefresh() }, 1500) }, + // 上拉加载 onReachBottom() { if (this.reachBottom >= 0) { this.reachBottom = 1 @@ -152,15 +157,16 @@ .page { padding-bottom: 90px; } -.top { +.filter { display: flex; align-items: center; - padding: 5px 15px 5px 5px; - margin-bottom: 10px; - background-color: #fff; .search { flex: 1; } + .sl-filter { + width: 30%; + margin-left: 10%; + } } .list { margin-top: 10px; diff --git a/pages/index/index.vue b/pages/index/index.vue index 44fb2b1..2912ca4 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,6 +1,9 @@ @@ -8,18 +11,35 @@ export default { data() { return { - + text: '' } }, onLoad() { }, methods: { - + login1() { + uni.login({ + provider: 'weixin', + success: function (loginRes) { + console.log(loginRes); + // 获取用户信息 + uni.getUserInfo({ + provider: 'weixin', + success: function (infoRes) { + console.log('用户昵称为:' + JSON.stringify(infoRes)); + } + }); + } + }); + } } } diff --git a/pages/invite/invite.vue b/pages/invite/invite.vue new file mode 100644 index 0000000..ffa2c37 --- /dev/null +++ b/pages/invite/invite.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/pages/orderDetail/orderDetail.vue b/pages/orderDetail/orderDetail.vue index 745c983..4027c91 100644 --- a/pages/orderDetail/orderDetail.vue +++ b/pages/orderDetail/orderDetail.vue @@ -6,9 +6,6 @@ - - - @@ -16,25 +13,25 @@ - + - + - + - + - + - + diff --git a/pages/orders/orders.vue b/pages/orders/orders.vue index 72fef9f..fc4d88d 100644 --- a/pages/orders/orders.vue +++ b/pages/orders/orders.vue @@ -4,15 +4,16 @@
    • {{ tab.name }}
    - + + + - - +
      -
    • - 中山大学 +
    • + 1652163515968 客户名称:海文 @@ -28,53 +29,47 @@
    - +