''
liukangdong
2024-07-24 18b0c32356c91c355d3ffae1d3f99c1043ba203e
''
已修改20个文件
421 ■■■■■ 文件已修改
wechat_jiaxuan/app.js 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disProduct/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disProduct/index.less 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disProduct/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disProduct/index.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/package-lock.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/consult/detail.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/consult/detail.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/index/index.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/kefu/index.wxss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/sets/index.js 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/project.private.config.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/api/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.js 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.less 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.wxml 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.wxss 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/project.private.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/utils/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/app.js
@@ -13,37 +13,32 @@
      this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom;
    }
    // 授权登录
    const member = wx.getStorageSync('member')
    if (member && member.token) {
    } else {
      wx.login({
        timeout: 5000,
        success(res) {
          if (res.code) {
            //发起网络请求
            wxLoginCustomer({
              code: res.code
            }).then(res => {
              console.log(res)
              if (res && res.data.member) {
                wx.setStorageSync('member', res.data.member)
                wx.setStorageSync('openid', res.data.member.openid)
                wx.setStorageSync('sessionKey', res.data.sessionKey)
                wx.setStorageSync('token', res.data.token)
              } else {
                console.log('登录失败!')
              }
            })
          } else {
            console.log('登录失败!' + res)
          }
        },
        fail(err) {
          console.log(err)
    wx.login({
      timeout: 5000,
      success(res) {
        if (res.code) {
          //发起网络请求
          wxLoginCustomer({
            code: res.code
          }).then(res => {
            console.log(res)
            if (res && res.data.member) {
              wx.setStorageSync('member', res.data.member)
              wx.setStorageSync('openid', res.data.member.openid)
              wx.setStorageSync('sessionKey', res.data.sessionKey)
              wx.setStorageSync('token', res.data.token)
            } else {
              console.log('登录失败!')
            }
          })
        } else {
          console.log('登录失败!' + res)
        }
      })
    }
      },
      fail(err) {
        console.log(err)
      }
    })
wechat_jiaxuan/components/disProduct/index.js
@@ -96,7 +96,7 @@
    },
    cateClick(e) {
      const catalogCode = e.currentTarget.dataset.code
      this.setData({ catalogCode })
      this.setData({ catalogCode, tagCodes: [] })
      this.setData({ pageNum: 1,datalist: [],total: 0})
      this.getTag()
      this.getList()
wechat_jiaxuan/components/disProduct/index.less
@@ -213,7 +213,7 @@
          }
          .num {
            margin-right: 16rpx;
            margin-right: 28rpx;
          }
          .primary {
wechat_jiaxuan/components/disProduct/index.wxml
@@ -40,7 +40,7 @@
            <view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail">
              <view class="img_wrap">
                <image src="{{ item.coverImage }}" class="img" mode="widthFix"></image>
                <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
                <image wx:if="{{ item.isNew }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
              </view>
              <view class="name">{{ item.title }}</view>
              <view class="info">
wechat_jiaxuan/components/disProduct/index.wxss
@@ -193,7 +193,7 @@
  margin-right: 8rpx;
}
.main_content .main_right .goods_list .item .info .num {
  margin-right: 16rpx;
  margin-right: 28rpx;
}
.main_content .main_right .goods_list .item .info .primary {
  color: var(--themeColor);
wechat_jiaxuan/package-lock.json
@@ -11,6 +11,7 @@
      "dependencies": {
        "@vant/area-data": "^1.1.3",
        "@vant/weapp": "^1.11.6",
        "hy-event-store": "^1.3.1",
        "mp-html": "^2.5.0",
        "vant-weapp": "^0.5.28"
      }
@@ -25,6 +26,11 @@
      "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.6.tgz",
      "integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw=="
    },
    "node_modules/hy-event-store": {
      "version": "1.3.1",
      "resolved": "https://registry.npmjs.org/hy-event-store/-/hy-event-store-1.3.1.tgz",
      "integrity": "sha512-uD+14mz4ONiAs9cX/csjUJ2pHTPFciE3JvIbZ+lsbaXopZWbnETEjwJ0a4l5GqNGcltcW3gJjlnUXCJPBoABfg=="
    },
    "node_modules/mp-html": {
      "version": "2.5.0",
      "resolved": "https://registry.npmjs.org/mp-html/-/mp-html-2.5.0.tgz",
wechat_jiaxuan/package.json
@@ -5,6 +5,7 @@
  "dependencies": {
    "@vant/area-data": "^1.1.3",
    "@vant/weapp": "^1.11.6",
    "hy-event-store": "^1.3.1",
    "mp-html": "^2.5.0",
    "vant-weapp": "^0.5.28"
  },
wechat_jiaxuan/pages/consult/detail.js
@@ -22,6 +22,11 @@
    })
    this.getDetail(options.id)
  },
  handleDesign() {
    wx.navigateTo({
      url: '/pages/design/design',
    })
  },
  getDetail(id) {
    getProductNewsInfo({ id }).then(res => {
      this.setData({ info: res.data })
wechat_jiaxuan/pages/consult/detail.wxml
@@ -18,7 +18,7 @@
        <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image>
        <view class="name">分享</view>
      </button>
      <view class="sub_btn">
      <view class="sub_btn" bindtap="handleDesign">
        <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image>
        <view>免费预约专属设计</view>
      </view>
wechat_jiaxuan/pages/index/index.js
@@ -8,6 +8,8 @@
  getZhongTaiVideoPage,
  getZhongTaiProductNewsPage
} from '../../api/index'
const { HYEventBus } = require('hy-event-store')
const eventBus = new HYEventBus()
Page({
  /**
@@ -45,6 +47,7 @@
    HOME_CLASS_C: '',
  },
  onShow() {
    let that = this
    const member = wx.getStorageSync('member')
    if (member && (member.authStatus == '1' || member.authStatus == '2')) {
      getMemberInfo().then(res => {
@@ -57,17 +60,17 @@
        member
      })
    }
    eventBus.on("reloadHome", () => {
      console.log('reloadHome');
      this.onLoad()
    })
  },
  onLoad(options) {
    const member = wx.getStorageSync('member')
    this.initDictData()
    if (member && member.token) {
    setTimeout(() => {
      this.initData()
    } else {
      setTimeout(() => {
        this.initData()
      }, 1200)
    }
    }, 1200)
  },
  changePath(e) {
    let index = e.currentTarget.dataset.type
wechat_jiaxuan/pages/kefu/index.wxss
@@ -12,6 +12,9 @@
  height: 100rpx;
  padding: 12rpx 40rpx;
}
.footer .btns .btn {
  padding-top: 20rpx;
}
.footer .sub_btn {
  flex: 1;
  display: flex;
wechat_jiaxuan/pages/sets/index.js
@@ -1,4 +1,9 @@
import { wxLogOff } from '../../api/index'
import {
  wxLogOff,
  wxLoginCustomer
} from '../../api/index'
const { HYEventBus } = require('hy-event-store')
const eventBus = new HYEventBus()
Page({
  /**
@@ -15,26 +20,63 @@
  },
  showLogout() {
    this.setData({show: true})
    this.setData({
      show: true
    })
  },
  onClose() {
    this.setData({show: false})
    this.setData({
      show: false
    })
  },
  onSubLgout() {
    let that = this
    wxLogOff().then(res => {
      wx.removeStorageSync('token')
      wx.removeStorageSync('member')
      wx.removeStorageSync('code')
      wx.showToast({
        title: '注销成功',
      })
      wx.switchTab({
        url: '/pages/index/index',
      wx.clearStorage()
      wx.login({
        timeout: 5000,
        success(res) {
          if (res.code) {
            //发起网络请求
            wxLoginCustomer({
              code: res.code
            }).then(res => {
              console.log(res)
              if (res && res.data.token) {
                wx.setStorageSync('sessionKey', res.data.sessionKey)
                wx.setStorageSync('token', res.data.token)
                wx.showToast({
                  title: '注销成功',
                })
                setTimeout(() => {
                  wx.switchTab({
                    url: '/pages/index/index',
                  })
                }, 500)
                setTimeout(() => {
                  eventBus.emit("reloadHome")
                }, 1000)
              } else {
                console.log('登录失败!')
              }
            })
          } else {}
        },
        fail(err) {
          wx.showToast({
            title: '注销失败',
          })
          wx.switchTab({
            url: '/pages/index/index',
          })
        }
      })
    })
  },
  changeDeal(e){
    const { label } = e.currentTarget.dataset
  changeDeal(e) {
    const {
      label
    } = e.currentTarget.dataset
    wx.navigateTo({
      url: '/pages/sets/protocol?label=' + label,
    })
wechat_jiaxuan/project.private.config.json
@@ -53,8 +53,8 @@
        },
        {
          "name": "",
          "pathName": "pages/homeId/index",
          "query": "code=zb_deco_jdid&name=%E5%AE%B6%E7%9A%84iD",
          "pathName": "pages/kefu/index",
          "query": "",
          "launchMode": "default",
          "scene": null
        }
wechat_staff/api/index.js
@@ -127,6 +127,14 @@
    data
  })
}
// 获取客户-潜客列表
export const getCustomerList = (data) => {
  return request({
    url: '/web/personnel/getCustomerList',
    method: "POST",
    data
  })
}
export const getUserCard = (data) => {
  return request({
    url: '/web/personnel/getUserCard',
wechat_staff/pages/kefu/select.js
@@ -1,12 +1,19 @@
// pages/discover/discover.js
import { getCustomerList } from '../../api/index'
Page({
  /**
   * 页面的初始数据
   */
  data: {
    activeTabs: '0',
    bottomLift: 0
    bottomLift: 0,
    keyWords: '',
    dataList: [],
    total: 0,
    flag: 0,
    page: 1,
    pageSize: 10,
  },
  /**
@@ -17,10 +24,49 @@
    this.setData({
      bottomLift: app.bottomLift
    })
    this.getList()
  },  
  tabsClick(e) {
    const activeTabs = e.currentTarget.dataset.tab
    this.setData({activeTabs})
    const flag = e.currentTarget.dataset.tab
    this.setData({flag})
    this.setData({total: 0,dataList: [], page: 1})
    this.getList()
  },
  reloadList() {
    this.setData({total: 0,dataList: [], page: 1})
    this.getList()
  },
  scrolltolower() {
    console.log('触底事件');
    const { total, dataList, page } = this.data
    if(total > dataList.length){
      this.setData({ page: page + 1 })
      this.getList()
    }else{
      wx.showToast({
        title: '暂无更多数据',
        icon: 'none'
      })
    }
  },
  getList() {
    const { flag, page, pageSize, keyWords } = this.data
    getCustomerList({
      flag, page, pageSize, keyWords
    }).then(res => {
      if(res.data){
        this.setData({
          total: res.data.total,
          dataList: [...this.data.dataList, ...res.data.data]
        })
      }
    })
  },
  jumpClient() {
    wx.switchTab({
      url: '/pages/client/index',
    })
  },
  handleSub() {
    console.log('点击饿了');
wechat_staff/pages/kefu/select.less
@@ -55,9 +55,9 @@
      width: 100%;
    }
    .icon{
      width: 26rpx;
      width: 28rpx;
      margin-top: 4rpx;
      margin-right: 16rpx;
      margin-right: 14rpx;
    }
  }
  .kehu{
@@ -66,15 +66,35 @@
  }
}
.list{
  padding: 0 40rpx;
  height: calc( 100vh - 188rpx );
  padding: 0 40rpx 160rpx;
  background-color: #fff;
  .line{
    display: flex;
    align-items: center;
    height: 148rpx;
  .item{
    border-bottom: 1rpx solid #e5e5e5;
    padding: 30rpx 0 20rpx;
    .item_content{
      display: flex;
    }
    .checked_wrap{
      display: flex;
      align-items: center;
    }
    &:nth-last-child(1){
      border: none;
    }
    .line{
      display: flex;
      font-size: 26rpx;
      .label{
        color: #999999;
        margin-right: 20rpx;
      }
      .val{
        color: #333333;
      }
    }
    .source{
      margin-top: 12rpx;
    }
    .icon{
      width: 40rpx;
@@ -84,7 +104,6 @@
      width: 88rpx;
      height: 88rpx;
      border-radius: 50%;
      border: 1px solid;
      margin-right: 20rpx;
    }
    .content{
@@ -111,13 +130,14 @@
          color: #666666;
        }
      }
      .desc{
        display: flex;
        justify-content: space-between;
        font-size: 24rpx;
        color: #999999;
        margin-top: 14rpx;
      }
    }
    .desc{
      display: flex;
      justify-content: space-between;
      font-size: 24rpx;
      color: #999999;
      margin-top: 24rpx;
      padding-left: 70rpx;
    }
  }
}
wechat_staff/pages/kefu/select.wxml
@@ -1,10 +1,10 @@
<view class="container" id="myCanvas">
  <view class="main_tab">
    <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-tab="0" bindtap="tabsClick">
    <view class="item {{ flag == '0' ? 'active' : '' }}" data-tab="{{0}}" bindtap="tabsClick">
      <view class="name">客户列表</view>
      <view class="border"></view>
    </view>
    <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-tab="1" bindtap="tabsClick">
    <view class="item {{ flag == '1' ? 'active' : '' }}" data-tab="{{1}}" bindtap="tabsClick">
      <view class="name">潜客列表</view>
      <view class="border"></view>
    </view>
@@ -13,49 +13,65 @@
  <view class="search_wrap">
    <view class="input_wrap">
      <image class="icon" src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
      <input type="text" placeholder="搜索客户昵称、导购、备注名" />
      <input model:value="{{keyWords}}" bindblur="reloadList" type="text" placeholder="搜索客户昵称、导购、备注名" />
    </view>
    <image class="kehu" src="../../static/icon/kehu_ic_new@2x.png" mode="widthFix"></image>
    <image bindtap="jumpClient" class="kehu" src="../../static/icon/kehu_ic_new@2x.png" mode="widthFix"></image>
  </view>
  <!--  -->
  <view class="list">
    <view class="line">
      <image class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
      <image class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
      <image class="avatar" src=""></image>
      <view class="content">
        <view class="header">
          <view class="left">
            <view class="name">王德发</view>
            <view class="tag">@微信</view>
  <scroll-view bindscrolltolower="scrolltolower" scroll-y    enable-passive enable-flex class="list">
    <block wx:for="{{ dataList }}">
      <view wx:if="{{ flag == 0 }}" class="item">
        <view class="item_content">
          <view class="checked_wrap">
            <image wx:if="{{ item.checked }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
            <image wx:else class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
            <image class="avatar" src="../../static/images/default_avatar.png"></image>
          </view>
          <view class="remark">备注名:王哥</view>
          <!--  -->
          <view class="content">
            <view class="name">{{ item.customerName }}</view>
            <view class="line">
              <view class="label">手机</view>
              <view class="val">{{ item.customerPhone }}</view>
            </view>
            <view class="line">
              <view class="label">品类</view>
              <view class="val">{{ item.productCodeName }}</view>
            </view>
            <view class="line">
              <view class="label">地址</view>
              <view class="val">{{ item.address }}</view>
            </view>
          </view>
        </view>
        <view class="desc">
          <view>导购:王某某</view>
          <view>创建时间:2002</view>
          <view>创建时间:</view>
          <view>导购:{{ item.dgName }}</view>
        </view>
      </view>
    </view>
    <view class="line">
      <image class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
      <image class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
      <image class="avatar" src=""></image>
      <view class="content">
        <view class="header">
          <view class="left">
            <view class="name">王德发</view>
            <view class="tag">@微信</view>
      <view wx:if="{{ flag == 1 }}" class="item">
        <view class="item_content">
          <view class="checked_wrap">
            <image wx:if="{{ item.checked }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
            <image wx:else class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
            <image class="avatar" src=""></image>
          </view>
          <view class="remark">备注名:王哥</view>
          <!--  -->
          <view class="content">
            <view class="name">{{ item.customerName }}</view>
            <view class="line source">
              <view class="label">来源</view>
              <view class="val">{{ item.orgName }}</view>
            </view>
          </view>
        </view>
        <view class="desc">
          <view>导购:王某某</view>
          <view>创建时间:2002</view>
          <view>创建时间:</view>
          <view>导购:{{ item.dgName }}</view>
        </view>
      </view>
    </view>
  </view>
    </block>
  </scroll-view>
  <!-- footer -->
  <view class="footer" style="padding-bottom: {{bottomLift}}px;">
    <view class="btns">
wechat_staff/pages/kefu/select.wxss
@@ -56,69 +56,89 @@
  width: 100%;
}
.search_wrap .input_wrap .icon {
  width: 26rpx;
  width: 28rpx;
  margin-top: 4rpx;
  margin-right: 16rpx;
  margin-right: 14rpx;
}
.search_wrap .kehu {
  width: 48rpx;
  margin-left: 30rpx;
}
.list {
  padding: 0 40rpx;
  height: calc(100vh - 188rpx);
  padding: 0 40rpx 160rpx;
  background-color: #fff;
}
.list .line {
.list .item {
  border-bottom: 1rpx solid #e5e5e5;
  padding: 30rpx 0 20rpx;
}
.list .item .item_content {
  display: flex;
}
.list .item .checked_wrap {
  display: flex;
  align-items: center;
  height: 148rpx;
  border-bottom: 1rpx solid #e5e5e5;
}
.list .line:nth-last-child(1) {
.list .item:nth-last-child(1) {
  border: none;
}
.list .line .icon {
.list .item .line {
  display: flex;
  font-size: 26rpx;
}
.list .item .line .label {
  color: #999999;
  margin-right: 20rpx;
}
.list .item .line .val {
  color: #333333;
}
.list .item .source {
  margin-top: 12rpx;
}
.list .item .icon {
  width: 40rpx;
  margin-right: 30rpx;
}
.list .line .avatar {
.list .item .avatar {
  width: 88rpx;
  height: 88rpx;
  border-radius: 50%;
  border: 1px solid;
  margin-right: 20rpx;
}
.list .line .content {
.list .item .content {
  flex: 1;
}
.list .line .content .header {
.list .item .content .header {
  display: flex;
  justify-content: space-between;
}
.list .line .content .header .left {
.list .item .content .header .left {
  display: flex;
  align-items: center;
}
.list .line .content .header .left .name {
.list .item .content .header .left .name {
  font-weight: 500;
  font-size: 30rpx;
  color: #111111;
  margin-right: 10rpx;
}
.list .line .content .header .left .tag {
.list .item .content .header .left .tag {
  font-size: 24rpx;
  color: #57BE6A;
}
.list .line .content .header .remark {
.list .item .content .header .remark {
  font-size: 26rpx;
  color: #666666;
}
.list .line .content .desc {
.list .item .desc {
  display: flex;
  justify-content: space-between;
  font-size: 24rpx;
  color: #999999;
  margin-top: 14rpx;
  margin-top: 24rpx;
  padding-left: 70rpx;
}
.footer {
  position: fixed;
wechat_staff/project.private.config.json
@@ -38,7 +38,7 @@
        },
        {
          "name": "",
          "pathName": "pages/download/index",
          "pathName": "pages/kefu/select",
          "query": "",
          "launchMode": "default",
          "scene": null
wechat_staff/utils/config.js
@@ -1,7 +1,7 @@
export const baseUrl = 'http://192.168.0.135:10027' 
// export const baseUrl = 'https://dmtest.ahapp.net/web_interface/' // 本地
// export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // 本地
// export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //测试服务器
// export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/'