jiangping
2024-09-27 04b4bddaac0a222760113899568d20b45af701f4
Merge remote-tracking branch 'origin/master'
已添加3个文件
已修改35个文件
865 ■■■■ 文件已修改
server/service/src/main/java/com/doumee/biz/zbom/ZbomCRMService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/biz/zbom/model/crm/CRMConstants.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagChildInfoResponse.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/wx/SendWxMessage.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/wx/TemplateData.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/wx/WxMsgVO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/CustomerApi.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disProduct/index.js 128 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disProduct/index.wxml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/auth/auth.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/detailDis/case.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/detailDis/product.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/detailDis/product.wxml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/detailDis/realpic.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/index/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/utils/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/api/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disProduct/index.js 217 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disProduct/index.wxml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.wxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.less 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.wxss 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/login/index.less 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/login/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/login/index.wxss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/promotion/index.js 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/work/index.js 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/work/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/project.private.config.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/utils/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/biz/zbom/ZbomCRMService.java
@@ -22,7 +22,7 @@
    void dealCustomerLogData(CustomerLog customerLog);
    String zbomEncode(String str);
    String getCrmGoUrl(String userName,Integer type);
    String getCrmGoUrl(String userName,Integer type,String iamId);
    CRMBaseResponse<List<CRMCustomerListResponse>> getCustomerList(CrmCustomerListRequest entity );
    CRMBaseResponse<List<CRMDaogouBindListResponse>> getDaogouBindList(CrmDaogouBindListRequest entity );
server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.biz.zbom.ZbomCRMService;
import com.doumee.biz.zbom.model.crm.*;
import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse;
@@ -17,14 +18,22 @@
import com.doumee.dao.business.CustomerLogMapper;
import com.doumee.dao.business.model.CrmInterfaceLog;
import com.doumee.dao.business.model.CustomerLog;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.business.model.Users;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.util.Base64Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.util.Base64Utils;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.*;
@@ -43,6 +52,8 @@
    private CrmInterfaceLogMapper crmInterfaceLogMapper;
    @Autowired
    private RedisTemplate<String, Object> redisTemplate;
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
@@ -253,24 +264,66 @@
     * @return
     */
    @Override
    public    String getCrmGoUrl(String userName,Integer type){
    public    String getCrmGoUrl(String userName,Integer type,String iamId){
        try {
            // åˆ›å»ºStringBuffer对象用来操作字符串
            int _t = (int)(System.currentTimeMillis());
            String pageKey ="mp";//客户列表页面码
            String fileUrl = systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL_MP).getCode();
            if(Constants.equalsInteger(type,Constants.ONE)){
                pageKey = "mpAddIntention";//新增意向页面码
                fileUrl = systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL_MP_ADDINTENTION).getCode();
            }
            String  appkey =  (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_AUTH_API_KEY);
            String  url =   redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_API_URL)
                    +CRMConstants.IntegerUrl.GO_CRM_AUTH_URL
                    + "?timestamp="+_t
                    +"&agent_phone_number=" + URLEncoder.encode(userName, "UTF-8")
                    + "&bindKey="+pageKey+"&sign="+ DigestUtils.md5Hex( _t + appkey);;
                    + "?bindKey="+pageKey
                    + "&tick=" + this.getTick(iamId, fileUrl);
            return url;
        }catch (Exception e){
            e.printStackTrace();
        }
       throw  new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"获取跳转地址失败哦!");
    }
    public String getTick(String iamId, String fileUrL) throws UnsupportedEncodingException {
        Map<String,Object> map = new HashMap<>();
        //用户IAM主键
        map.put("ssouserid",iamId);
        //售前小程序appid
        map.put("appid",systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_IAM_BUSINESS_APPID).getCode());
        //跳转地址
        map.put("rediUrl",fileUrL);
        //时间戳
        map.put("timestamp",System.currentTimeMillis()/1000+"");
        //C端小程序appid
        map.put("sourceappid",systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_IAM_CUSTOMER_APPID).getCode());
        System.out.println(JSONObject.toJSONString(map));
        //获取tick
        String tick = ZbomCRMServiceImpl.encrypt(
                systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL_PRIVATE_KEY).getCode()
                ,JSONObject.toJSONString(map)
                ,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL_INIT_VECTOR).getCode());
        String tickEncoder = URLEncoder.encode(tick,"UTF-8");
        return tickEncoder;
    }
    public static String encrypt(String key, String value,String initVector) {
        try {
            IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
            SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
            Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
            cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
            byte[] encrypted = cipher.doFinal(value.getBytes());
            return Base64Utils.encodeToString(encrypted);
        }
        catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
    }
}
server/service/src/main/java/com/doumee/biz/zbom/model/crm/CRMConstants.java
@@ -16,7 +16,7 @@
        String POST_CUS_DATA_URL ="/api/public/zbom/postCusData";
        String CUS_BEFORE_PAGE_LIST_URL ="/api/public/mini/program/cusOrBeforeList";
        String DAOGOU_BIND_LIST_URL ="/api/public/mini/program/list";
        String GO_CRM_AUTH_URL ="/oauth/authorize/jump";
        String GO_CRM_AUTH_URL = "/oauth/authorize";//"/oauth/authorize/jump";
    }
    public interface IntegerName{
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTTagChildInfoResponse.java
@@ -33,4 +33,6 @@
    @ApiModelProperty(value = "标签值排序")
    private String labelValueSort;
    @ApiModelProperty(value = "子标签信息")
    private List<ZTTagInfoResponse> relLabel;
}
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -379,6 +379,12 @@
    public static final String WX_TOKEN_CUSTOMER = "WX_TOKEN_CUSTOMER";
    public static final String WX_TOKEN_PERSONNEL = "WX_TOKEN_PERSONNEL";
    public static final String ZBOM_CRM_POSTCUS_API_KEY  = "ZBOM_CRM_POSTCUS_API_KEY";
    public static final String ZBOM_CRM_API_URL_MP = "ZBOM_CRM_API_URL_MP";
    public static final String ZBOM_CRM_API_URL_MP_ADDINTENTION = "ZBOM_CRM_API_URL_MP_ADDINTENTION";
    public static final String ZBOM_CRM_API_URL_PRIVATE_KEY = "ZBOM_CRM_API_URL_PRIVATE_KEY";
    public static final String ZBOM_CRM_API_URL_INIT_VECTOR = "ZBOM_CRM_API_URL_INIT_VECTOR";
    public static final String ZBOM_IAM_CUSTOMER_APPID = "ZBOM_IAM_CUSTOMER_APPID";
    public static final String ZBOM_IAM_BUSINESS_APPID = "ZBOM_IAM_BUSINESS_APPID";
    public interface RedisKeys {
server/service/src/main/java/com/doumee/core/wx/SendWxMessage.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
package com.doumee.core.wx;
import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.dao.system.model.SystemUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2022/12/7 17:27
 */
@Service
@Slf4j
public class SendWxMessage {
    private static String programUrl = "packagesMine/meetingDetails/meetingDetails?id=";
    public  void  testMessage(String openid,String token){
        RestTemplate restTemplate = new RestTemplate();
        log.info("微信小程序 ä¼šè®®å¼€å§‹è®¢é˜…消息发送日志 -> accessToken:{}",token);
        //这里简单起见我们每次都获取最新的access_token(时间开发中,应该在access_token快过期时再重新获取)
        String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+token;
        //拼接推送的模版
        WxMsgVO wxMsgVo = new WxMsgVO();
        //用户的openid(要发送给那个用户)
        wxMsgVo.setTouser(openid);
        //订阅消息模板id
        wxMsgVo.setTemplate_id("A_jEWoyl0Uu_l5J-zwlwx_FcbUirlsS6Peu4JW6a7Gc");
        Map<String, TemplateData> m = new HashMap<>(2);
        //会议主题
        m.put("thing1", new TemplateData("又来新客户啦!"));
        //会议地点
        m.put("character_string6", new TemplateData("zhangsan01"));
        wxMsgVo.setData(m);
        ResponseEntity<String> responseEntity =
                restTemplate.postForEntity(url, wxMsgVo, String.class);
        log.info("微信小程序-> å–消通知订阅消息发送日志:{}",JSONObject.toJSONString(responseEntity));
    }
//    /**
//     * èŽ·å–token
//     */
//    private static String getAccessToken() {
//        //发送请求获取token
//        JSONObject token = null;
//        try {
//            token = JSONObject.parseObject(HttpsUtil.get(APP_ACCESS_TOKEN_URL,false));
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        JSONObject jsonObject = token;
//        String accessToken = (String) jsonObject.get("access_token");
//        Integer expiresIn = (Integer) jsonObject.get("expires_in");
//        //创建token对象,并存储
//        return new AccessToken(accessToken,String.valueOf(expiresIn)).getAccessToken();
//    }
}
server/service/src/main/java/com/doumee/core/wx/TemplateData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
package com.doumee.core.wx;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2022/12/7 17:28
 */
@Data
public class TemplateData {
    private String value;
    public TemplateData(String value) {
        this.value = value;
    }
}
server/service/src/main/java/com/doumee/core/wx/WxMsgVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.doumee.core.wx;
import lombok.Data;
import java.util.Map;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2022/12/7 17:27
 */
@Data
public class WxMsgVO {
    //用户openId
    private String touser;
    //模版id
    private String template_id;
    //推送文字
    private Map<String , TemplateData> data;
    //跳转路径 ï¼Œé»˜è®¤è·³è½¬åˆ°å°ç¨‹åºé¦–页
    private String page="pages/index/index";
}
server/web/src/main/java/com/doumee/api/web/CustomerApi.java
@@ -11,6 +11,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.core.wx.SendWxMessage;
import com.doumee.dao.business.model.*;
import com.doumee.dao.web.reqeust.*;
import com.doumee.dao.web.response.AccountResponse;
@@ -625,4 +626,17 @@
        ZTBasePageResponse<ZTCollectLikeInfoResponse>  ztBasePageResponse= getZhongTaiDataService.collectLikePage(ztCollectLikeRequest);
        return ApiResponse.success("查询成功",ztBasePageResponse);
    }
    @ApiOperation(value = "测试发送微信消息", notes = "客户端小程序")
    @GetMapping("/testSendWxMessage")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "openid", value = "小程序id", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "token", value = "token", required = true),
    })
    public ApiResponse testSendWxMessage(@RequestParam String openid,@RequestParam String token) {
        SendWxMessage sendWxMessage = new SendWxMessage();
        sendWxMessage.testMessage(openid,token);
        return ApiResponse.success("操作成功");
    }
}
server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
@@ -13,10 +13,12 @@
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.News;
import com.doumee.dao.business.model.Users;
import com.doumee.dao.web.reqeust.GenerateQRCodeRequest;
import com.doumee.dao.web.response.DailyUpdatesResponse;
import com.doumee.dao.web.response.ZSZXCatalogResponse;
@@ -120,7 +122,8 @@
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "类型 0客户列表 1跳转新增意向客户", required = true)
    })
    public ApiResponse<String> getCrmAuthUrl(@RequestParam Integer type) {
        return  ApiResponse.success(zbomCRMService.getCrmGoUrl(this.getLoginUserInfo().getIamUsername(),type));
        Users users = this.getLoginUserInfo();
        return  ApiResponse.success(zbomCRMService.getCrmGoUrl(users.getIamUsername(),type,users.getIamId()));
    }
wechat_jiaxuan/components/disProduct/index.js
@@ -196,71 +196,141 @@
    tagClick(e) {
      const code = e.currentTarget.dataset.code
      const paramIndex = e.currentTarget.dataset.index
      const { secondCateList, tagCodes, activeParam, activeIndex } = this.data
      const index = tagCodes.indexOf(code)
      console.log('code', code)
      console.log('tagCodes', tagCodes)
      console.log(secondCateList)
      const {
        secondCateList,
        tagCodes,
        activeParam,
        activeIndex
      } = this.data
      // ç‚¹å‡»å­æ ‡ç­¾
      console.log('openRelLabel', secondCateList[activeIndex].openRelLabel);
      if (secondCateList[activeIndex].openRelLabel) {
        if (secondCateList[activeIndex].tempParamRelIndex == null || secondCateList[activeIndex].tempParamRelIndex != paramIndex) {
          secondCateList[activeIndex].tempParamRelIndex = paramIndex
          secondCateList[activeIndex].tempParamRelCode = code
          secondCateList[activeIndex].tempParamRelName = activeParam[paramIndex].labelValueName
        } else {
          secondCateList[activeIndex].tempParamRelIndex = -1
          secondCateList[activeIndex].tempParamRelCode = ''
          secondCateList[activeIndex].tempParamRelName = ''
        }
        console.log('secondCateList', secondCateList);
      } else {
        // ç‚¹å‡»çˆ¶æ ‡ç­¾
        const relLabel = secondCateList[activeIndex].valueVos[paramIndex].relLabel || []
        if (relLabel.length > 0 && relLabel[0].labelCode) {
          secondCateList[activeIndex].relLabel = relLabel[0]
        }else{
          secondCateList[activeIndex].relLabel = null
        }
        secondCateList[activeIndex].tempParamRelIndex = -1
        secondCateList[activeIndex].tempParamRelCode = ''
        secondCateList[activeIndex].tempParamRelName = ''
      if ( secondCateList[activeIndex].tempParamIndex==null ||      secondCateList[activeIndex].tempParamIndex != paramIndex) {
        // åŒparam里code重复
        // if (activeParam && activeParam.length > 0) {
        //   activeParam.forEach(item => {
        //     const indexTemp = tagCodes.indexOf(item.labelValueCode)
        //     if (indexTemp > -1) {
        //       tagCodes.splice(indexTemp, 1)
        //     }
        //   })
        // }
        //tagCodes.push(code)
        secondCateList[activeIndex].tempParamIndex = paramIndex
        secondCateList[activeIndex].tempParamCode = code
        secondCateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName
      } else {
      //  tagCodes.splice(index, 1)
        secondCateList[activeIndex].tempParamIndex = -1
        secondCateList[activeIndex].tempParamCode = ''
        secondCateList[activeIndex].tempParamName = ''
      }
      this.setData({secondCateList })
      }
      this.setData({
        tagCodes,
        secondCateList
      })
    },
    changeShowParams(e) {
      const { secondCateList } = this.data
      const {
        secondCateList,
        activeParam
      } = this.data
      const activeIndex = e.currentTarget.dataset.index
      console.log('activeIndex', activeIndex)
      console.log('secondCateList', secondCateList)
      if (activeIndex === this.data.activeIndex) {
        this.setData({ activeIndex: -1, activeParam: [] })
      const type = e.currentTarget.dataset.type || ''
      // console.log('activeIndex', activeIndex);
      // é’ˆå¯¹æœ‰å­é›†çš„label
      if (type && type == 'child') {
        if (secondCateList[activeIndex].openRelLabel) {
          secondCateList[activeIndex].openRelLabel = false
          this.setData({
            activeIndex,
            activeParam: [],
            secondCateList
          })
        } else {
          secondCateList[activeIndex].openRelLabel = true
          this.setData({
            activeParam: secondCateList[activeIndex].relLabel.valueVos,
            secondCateList,
            activeIndex
          })
        }
        return
      }
      // éžå­é›†çš„label
      secondCateList[activeIndex].openRelLabel = false
      this.setData({ secondCateList })
      if (activeIndex === this.data.activeIndex && activeParam.length > 0) {
        this.setData({
          activeIndex: -1,
          activeParam: []
        })
      } else {
        this.setData({
          activeIndex,
          activeParam: secondCateList[activeIndex].valueVos
        })
      }
      // this.setData({showTwo: false})
    },
    cancelParam() {
      const { secondCateList } = this.data
      const {
        secondCateList
      } = this.data
      secondCateList.forEach(item => { 
        item.tempParamIndex = item.paramIndex
        item.tempParamName =   item.paramName
        item.tempParamCode =  item.paramCode 
        item.relLabel = null
        item.openRelLabel = false
        item.tempParamRelIndex = null
        item.tempParamRelCode = null
        item.tempParamRelName = null
      })
      // this.setData({ tagCodes: [], activeParam: [], secondCateList, activeIndex: -1 }) 
      this.setData({ activeParam: [],activeIndex: -1 ,secondCateList})
      this.setData({
        activeParam: [],
        activeIndex: -1,
        secondCateList
      })
    },
    subParam() {
      const { secondCateList } = this.data
      const {
        secondCateList
      } = this.data
      var codes = []
      secondCateList.forEach(item => {
        item.paramIndex =  item.tempParamIndex 
        item.paramName = item.tempParamName  
        item.paramCode = item.tempParamCode
        item.openRelLabel = false
        if(item.tempParamRelIndex > -1 && item.tempParamRelCode){
          return codes.push(item.tempParamRelCode)
        }
        if( item.paramIndex>-1 && item.tempParamCode){
          codes.push( item.tempParamCode)
          codes.push(item.paramCode)
        } 
      })  
      this.setData({tagCodes:codes})
      this.setData({ pageNum: 1, activeParam: [] ,activeIndex: -1, datalist: [], total: 0 })
      this.setData({
        tagCodes: codes
      })
      this.setData({
        pageNum: 1,
        activeParam: [],
        activeIndex: -1,
        datalist: [],
        total: 0
      })
      this.getList()
    },
  }
wechat_jiaxuan/components/disProduct/index.wxml
@@ -15,15 +15,21 @@
      <view class="main_right">
        <scroll-view class="query_wrap_scroll" scroll-x>
          <view class="query_wrap">
            <view data-index="{{index}}" wx:for="{{ secondCateList }}" class="item" bindtap="changeShowParams">
            <block wx:for="{{ secondCateList }}">
              <view class="item" data-index="{{index}}"  bindtap="changeShowParams">
              <view class="name">{{ item.tempParamName || item.labelName }}</view>
              <van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" />
                <van-icon name="{{ index == activeIndex && !item.openRelLabel && activeParam.length > 0 ? 'arrow-up' : 'arrow-down' }}" />
            </view>
              <view wx:if="{{item.relLabel && item.relLabel.labelCode}}" data-type="child" data-index="{{index}}" class="item" bindtap="changeShowParams">
                <view class="name">{{ item.tempParamRelName || item.relLabel.labelName }}</view>
                <van-icon name="{{ index == activeIndex && item.openRelLabel && activeParam.length > 0? 'arrow-up' : 'arrow-down' }}" />
              </view>
            </block>
          </view>
        </scroll-view>
        <view wx:if="{{ activeParam.length > 0 }}" class="query_form">
          <view class="list">
            <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
            <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ (!secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamIndex === index) || (secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamRelIndex === index)  ? 'active' : '' }}">{{ item.labelValueName }}</view>
          </view>
          <view class="btns">
            <view class="btn" bindtap="cancelParam">取消</view>
wechat_jiaxuan/pages/auth/auth.js
@@ -9,6 +9,7 @@
   */
  data: {
    agreementFalg: false,
    tempPath: '',
    primary: '',
    bottomLift: 0,
@@ -75,10 +76,9 @@
          phone: res.data
        }).then((res) => {
          if (res.code == 200) {
            const tempPath = wx.getStorageSync('tempPath') || ''
            const { tempPath } = this.data
            wx.setStorageSync('member', res.data)
            if (tempPath) {
              wx.setStorageSync('tempPath', '')
              if (tempPath == '/pages/webView/index') {
                wx.navigateTo({
                  url: '/pages/webView/index',
@@ -129,23 +129,22 @@
  },
  onLoad(options) {
    var app = getApp().globalData
    this.setData({
      primary: app.primary
    })
    this.initData()
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow() {
    const tempPath = wx.getStorageSync('tempPath') || ''
    this.setData({tempPath})
    setTimeout(() => {
      wx.setStorageSync('tempPath', '')
    })
  },
wechat_jiaxuan/pages/detailDis/case.js
@@ -82,9 +82,15 @@
      info
    } = this.data
    console.log('点击了分享')
    if(info.users && info.users.id){
    return {
      path: '/pages/detailDis/case?id=' + info.id + '&userId=' + info.users.id
    }
    }else{
      return {
        path: '/pages/detailDis/case?id=' + info.id
      }
    }
  },
  handleAction(e) {
    const actionType = e.currentTarget.dataset.code
wechat_jiaxuan/pages/detailDis/product.js
@@ -15,6 +15,7 @@
    origin: '',
    isFold: false,
    info: {},
    isCollection: false,
    member: {},
    showShare: false,
    options: {
@@ -77,8 +78,8 @@
  },
  handleAction(e) {
    const actionType = e.currentTarget.dataset.code
    const {
      info, member
    let {
      info, member, isCollection
    } = this.data
    if (!member.phone) {
      return wx.navigateTo({
@@ -90,8 +91,9 @@
      id: this.data.info.id
    }).then(res => {
      info.isCollection = !info.isCollection
      isCollection = !isCollection
      this.setData({
        info
        isCollection
      })
      wx.showToast({
        title: actionType == 'collect' ? '收藏成功' : '取消收藏',
@@ -105,7 +107,8 @@
      salesId: userId || null
    }).then(res => {
      this.setData({
        info: res.data
        info: res.data,
        isCollection: res.data.isCollection
      })
      wx.setNavigationBarTitle({
        title: res.data.title
@@ -167,9 +170,15 @@
  onShareAppMessage: function () {
    let { info } = this.data
    console.log('点击了分享')
    if(info.users && info.users.id){
    return {
      path: '/pages/detailDis/product?id=' + info.id + '&userId=' + info.users.id
    }
    }else{
      return {
        path: '/pages/detailDis/product?id=' + info.id
      }
    }
  },
  onClose() {
    this.setData({
wechat_jiaxuan/pages/detailDis/product.wxml
@@ -49,8 +49,8 @@
  <view class="spaceList">
    <view class="item" wx:for="{{ info.spaceList }}">
      <!-- <view class="name">{{ item.spaceName }}</view> -->
      <image data-url="{{ item.spaceImg }}" bindtap="priviewSpace" src="{{ item.spaceImg }}" mode="widthFix" class="img"></image>
      <!-- <mp-html content="{{item.spaceContent}}"></mp-html> -->
      <!-- <image data-url="{{ item.spaceImg }}" bindtap="priviewSpace" src="{{ item.spaceImg }}" mode="widthFix" class="img"></image> -->
      <mp-html content="{{item.spaceContent}}"></mp-html>
    </view>
  </view>
  <!-- footer -->
@@ -59,8 +59,8 @@
  </view>
  <view wx:else class="footer" style="padding-bottom: {{bottomLift}}px;">
    <view class="btns">
      <button hover-class="none" data-code="{{ info.isCollection ? 'collect_cancel' : 'collect' }}" bindtap="handleAction" class="item btn">
        <image wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
      <button hover-class="none" data-code="{{ isCollection ? 'collect_cancel' : 'collect' }}" bindtap="handleAction" class="item btn">
        <image wx:if="{{ isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <image wx:else class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
        <view class="name">收藏</view>
      </button>
wechat_jiaxuan/pages/detailDis/realpic.js
@@ -149,13 +149,6 @@
    //   this.setData({showShare: false})
    // })
  },
  // onShareAppMessage: function () {
  //   // let { productDetail, userInfo } = this.data
  //   return {
  //     title: productDetail.title,
  //     path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
  //   }
  // },
  onClose() {
    this.setData({
      showShare: false
@@ -214,8 +207,14 @@
      info
    } = this.data
    console.log('点击了分享')
    if(info.users && info.users.id){
    return {
      path: '/pages/detailDis/realpic?id=' + info.id + '&userId=' + info.users.id
    }
    }else{
      return {
        path: '/pages/detailDis/realpic?id=' + info.id
      }
    }
  },
})
wechat_jiaxuan/pages/index/index.js
@@ -78,7 +78,7 @@
          windowHeight: windowInfo.windowHeight
        })
      })
    }, 2000)
    }, 3000)
  },
  onShow() {
    const member = wx.getStorageSync('member')
wechat_jiaxuan/utils/config.js
@@ -1,7 +1,7 @@
// export const baseUrl = 'http://192.168.0.135:10027' // æœ¬åœ°
// export const baseUrl = 'http://192.168.0.136:10027' // æœ¬åœ°
// export const baseUrl = 'https://dmtest.ahapp.net/web_interface' //测试服务器
// æµ‹è¯•服务器
wechat_staff/api/index.js
@@ -82,7 +82,8 @@
export const saveShareRecord = (data) => {
  return request({
    url: '/web/customer/saveShareRecord?id='+data,
    data
    data,
    loading: '0'
  })
}
// äº§å“è§†é¢‘
wechat_staff/components/disProduct/index.js
@@ -1,4 +1,8 @@
import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index'
import {
  getCatalogList,
  getCataLogTagList,
  getZhongTaiProductPage
} from '../../api/index'
let touchDot = 0
Component({
  /**
@@ -32,7 +36,9 @@
    var app = getApp()
    console.log('globalData', app.globalData);
    if(app.globalData.catalogCode){
      this.setData({ catalogCode: app.globalData.catalogCode })
      this.setData({
        catalogCode: app.globalData.catalogCode
      })
      setTimeout(() => {
        console.log('catalogCode', this.data.catalogCode);
        getApp().globalData.catalogCode = ''
@@ -45,7 +51,9 @@
  },
  methods: {
    bindscrolltoupper() {
      this.setData({ showTouch: true })
      this.setData({
        showTouch: true
      })
      this.fadeIn();
    },
    touchstart(e){
@@ -60,7 +68,9 @@
      if(touchDot - touchMove > 24){
        touchDot = touchMove
        setTimeout(() => {
          this.setData({ showTouch: true })
          this.setData({
            showTouch: true
          })
          this.fadeIn();
        }, 200)
      }
@@ -77,7 +87,9 @@
        animationData: this.animation.export()
      });
      setTimeout(() => {
        this.setData({ showTouch: false });
        this.setData({
          showTouch: false
        });
      }, 200); // åŠ¨ç”»æŒç»­æ—¶é—´
    },
    refreshCount(){   
@@ -98,7 +110,9 @@
                }
              }   
          })
          this.setData({datalist:dataList})
        this.setData({
          datalist: dataList
        })
           wx.setStorageSync('conentCountTemp',null)
      }
    },
@@ -131,13 +145,29 @@
    },
    bindblur() {
      console.log('失去焦点');
      this.setData({ pageNum: 1,datalist: [],total: 0})
      this.setData({
        pageNum: 1,
        datalist: [],
        total: 0
      })
      this.getList()
    },
    getList() {  
      const { catalogCode,tagCodes, pageNum, pageSize, sortType, query } = this.data
      const {
        catalogCode,
        tagCodes,
        pageNum,
        pageSize,
        sortType,
        query
      } = this.data
      getZhongTaiProductPage({
        catalogCode,pageNum,pageSize,sortType,query,tagCodes
        catalogCode,
        pageNum,
        pageSize,
        sortType,
        query,
        tagCodes
      }).then(res => {
        if(res.data && res.data.records){
          this.setData({
@@ -146,14 +176,22 @@
          })
        }
      }).finally(()=>{
        this.setData({isLoading:false})
        this.setData({
          isLoading: false
        })
      })
    },
    scrolltolower() {
      console.log('触底事件');
      const { total, datalist, pageNum } = this.data
      const {
        total,
        datalist,
        pageNum
      } = this.data
      if(total > datalist.length){
        this.setData({ pageNum: pageNum + 1 })
        this.setData({
          pageNum: pageNum + 1
        })
        this.getList()
      }else{
        wx.showToast({
@@ -163,21 +201,38 @@
      }
    },
    cateClick(e) {
      var {isLoading} = this.data
      var {
        isLoading
      } = this.data
      if(isLoading){
        return
      }
      this.setData({isLoading:true})
      this.setData({
        isLoading: true
      })
      const catalogCode = e.currentTarget.dataset.code
      this.setData({ catalogCode, tagCodes: [] })
      this.setData({ pageNum: 1,datalist: [],total: 0})
      this.setData({
        catalogCode,
        tagCodes: []
      })
      this.setData({
        pageNum: 1,
        datalist: [],
        total: 0
      })
      this.getTag()
      this.getList()
    },
    statusChange(e) {
      const sortType = e.currentTarget.dataset.status
      this.setData({sortType})
      this.setData({ pageNum: 1,datalist: [],total: 0})
      this.setData({
        sortType
      })
      this.setData({
        pageNum: 1,
        datalist: [],
        total: 0
      })
      this.getList()
    },
    handleDetail(e) {
@@ -189,69 +244,141 @@
    tagClick(e) {
      const code = e.currentTarget.dataset.code
      const paramIndex = e.currentTarget.dataset.index
      const { secondCateList, tagCodes, activeParam, activeIndex } = this.data
      const {
        secondCateList,
        tagCodes,
        activeParam,
        activeIndex
      } = this.data
      // ç‚¹å‡»å­æ ‡ç­¾
      console.log('openRelLabel', secondCateList[activeIndex].openRelLabel);
      if (secondCateList[activeIndex].openRelLabel) {
        if (secondCateList[activeIndex].tempParamRelIndex == null || secondCateList[activeIndex].tempParamRelIndex != paramIndex) {
          secondCateList[activeIndex].tempParamRelIndex = paramIndex
          secondCateList[activeIndex].tempParamRelCode = code
          secondCateList[activeIndex].tempParamRelName = activeParam[paramIndex].labelValueName
        } else {
          secondCateList[activeIndex].tempParamRelIndex = -1
          secondCateList[activeIndex].tempParamRelCode = ''
          secondCateList[activeIndex].tempParamRelName = ''
        }
        console.log('secondCateList', secondCateList);
      } else {
        // ç‚¹å‡»çˆ¶æ ‡ç­¾
        const relLabel = secondCateList[activeIndex].valueVos[paramIndex].relLabel || []
        if (relLabel.length > 0 && relLabel[0].labelCode) {
          secondCateList[activeIndex].relLabel = relLabel[0]
        }else{
          secondCateList[activeIndex].relLabel = null
        }
        secondCateList[activeIndex].tempParamRelIndex = -1
        secondCateList[activeIndex].tempParamRelCode = ''
        secondCateList[activeIndex].tempParamRelName = ''
      if( secondCateList[activeIndex].tempParamIndex==null ||      secondCateList[activeIndex].tempParamIndex != paramIndex){
         // åŒparam里code重复
        // if (activeParam && activeParam.length > 0) {
        //   activeParam.forEach(item => {
        //     const indexTemp = tagCodes.indexOf(item.labelValueCode)
        //     if (indexTemp > -1) {
        //       tagCodes.splice(indexTemp, 1)
        //     }
        //   })
        // }
        //tagCodes.push(code)
        secondCateList[activeIndex].tempParamIndex = paramIndex
        secondCateList[activeIndex].tempParamCode = code
        secondCateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName
      } else {
      //  tagCodes.splice(index, 1)
        secondCateList[activeIndex].tempParamIndex = -1
        secondCateList[activeIndex].tempParamCode = ''
        secondCateList[activeIndex].tempParamName = ''
      }
      this.setData({ tagCodes, secondCateList })
      }
      this.setData({
        tagCodes,
        secondCateList
      })
    },
    changeShowParams(e){
      const { secondCateList } = this.data
      const {
        secondCateList,
        activeParam
      } = this.data
      const activeIndex = e.currentTarget.dataset.index
      console.log('activeIndex', activeIndex);
      console.log('activeIndex', this.data.activeIndex);
      console.log('secondCateList', secondCateList);
      if(activeIndex === this.data.activeIndex){
        this.setData({ activeIndex: -1, activeParam: [] })
      const type = e.currentTarget.dataset.type || ''
      // console.log('activeIndex', activeIndex);
      // é’ˆå¯¹æœ‰å­é›†çš„label
      if (type && type == 'child') {
        if (secondCateList[activeIndex].openRelLabel) {
          secondCateList[activeIndex].openRelLabel = false
          this.setData({
            activeIndex,
            activeParam: [],
            secondCateList
          })
        } else {
          secondCateList[activeIndex].openRelLabel = true
          this.setData({
            activeParam: secondCateList[activeIndex].relLabel.valueVos,
            secondCateList,
            activeIndex
          })
        }
        return
      }
      // éžå­é›†çš„label
      secondCateList[activeIndex].openRelLabel = false
      this.setData({ secondCateList })
      if (activeIndex === this.data.activeIndex && activeParam.length > 0) {
        this.setData({
          activeIndex: -1,
          activeParam: []
        })
      }else{
        this.setData({ 
          activeIndex,
          activeParam: secondCateList[activeIndex].valueVos
        })
      }
      console.log('activeParam', this.data.activeParam);
      // this.setData({showTwo: false})
    },
    cancelParam() {
      const { secondCateList } = this.data
      const {
        secondCateList
      } = this.data
      secondCateList.forEach(item => { 
        item.tempParamIndex = item.paramIndex
        item.tempParamName =   item.paramName
        item.tempParamCode =  item.paramCode 
        item.relLabel = null
        item.openRelLabel = false
        item.tempParamRelIndex = null
        item.tempParamRelCode = null
        item.tempParamRelName = null
      })
      // this.setData({ tagCodes: [], activeParam: [], secondCateList, activeIndex: -1 }) 
      this.setData({ activeParam: [],activeIndex: -1 ,secondCateList})
      this.setData({
        activeParam: [],
        activeIndex: -1,
        secondCateList
      })
    },
    subParam() {
      const { secondCateList } = this.data
      const {
        secondCateList
      } = this.data
      var codes = []
      secondCateList.forEach(item => {
        item.paramIndex =  item.tempParamIndex 
        item.paramName = item.tempParamName  
        item.paramCode = item.tempParamCode
        item.openRelLabel = false
        if(item.tempParamRelIndex > -1 && item.tempParamRelCode){
          return codes.push(item.tempParamRelCode)
        }
        if( item.paramIndex>-1 && item.tempParamCode){
          codes.push( item.tempParamCode)
          codes.push(item.paramCode)
        } 
      })  
      this.setData({tagCodes:codes})
      this.setData({ pageNum: 1, activeParam: [] ,activeIndex: -1, datalist: [], total: 0 })
      this.setData({
        tagCodes: codes
      })
      this.setData({
        pageNum: 1,
        activeParam: [],
        activeIndex: -1,
        datalist: [],
        total: 0
      })
      this.getList()
    },
  }
wechat_staff/components/disProduct/index.wxml
@@ -15,15 +15,21 @@
      <view class="main_right">
        <scroll-view class="query_wrap_scroll" scroll-x>
          <view class="query_wrap">
            <view data-index="{{index}}" wx:for="{{ secondCateList }}" class="item" bindtap="changeShowParams">
            <block wx:for="{{ secondCateList }}">
              <view class="item" data-index="{{index}}"  bindtap="changeShowParams">
              <view class="name">{{ item.tempParamName || item.labelName }}</view>
              <van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" />
                <van-icon name="{{ index == activeIndex && !item.openRelLabel && activeParam.length > 0 ? 'arrow-up' : 'arrow-down' }}" />
            </view>
              <view wx:if="{{item.relLabel && item.relLabel.labelCode}}" data-type="child" data-index="{{index}}" class="item" bindtap="changeShowParams">
                <view class="name">{{ item.tempParamRelName || item.relLabel.labelName }}</view>
                <van-icon name="{{ index == activeIndex && item.openRelLabel && activeParam.length > 0? 'arrow-up' : 'arrow-down' }}" />
              </view>
            </block>
          </view>
        </scroll-view>
        <view wx:if="{{ activeParam.length > 0 }}" class="query_form">
          <view class="list">
            <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index  ? 'active' : '' }}">{{ item.labelValueName }}</view>
            <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ (!secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamIndex === index) || (secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamRelIndex === index)  ? 'active' : '' }}">{{ item.labelValueName }}</view>
          </view>
          <view class="btns">
            <view class="btn" bindtap="cancelParam">取消</view>
wechat_staff/pages/detailDis/product.js
@@ -14,6 +14,7 @@
    current: 0,
    id: '',
    info: {},
    spaceList: [],
    member: {},
    showShare: false,
    isFold: false,
@@ -102,6 +103,7 @@
    this.setData({ current: e.detail.current })
  },
  priviewSpace(e) {
    return
    const url = e.currentTarget.dataset.url
    const {
      info
@@ -121,6 +123,7 @@
    }).then(res => {
      const index = enjoyList.findIndex( i =>(res.data && i.id === res.data.id) )
      this.setData({
        spaceList: res.data.spaceList || [],
        info: {
          ...res.data,
          isEnjoy: index > -1
wechat_staff/pages/detailDis/product.wxml
@@ -46,10 +46,10 @@
    <mp-html content="{{info.content}}"></mp-html>
  </view>
  <view class="spaceList">
    <view data-url="{{ item.spaceImg }}" bindtap="priviewSpace" class="item" wx:for="{{ info.spaceList }}">
    <view data-url="{{ item.spaceImg }}" bindtap="priviewSpace" class="item" wx:for="{{ spaceList }}">
      <!-- <view class="name">{{ item.spaceName }}</view> -->
      <image src="{{ item.spaceImg }}" mode="widthFix" class="img"></image>
      <!-- <mp-html content="{{item.spaceContent}}"></mp-html> -->
      <!-- <image src="{{ item.spaceImg }}" mode="widthFix" class="img"></image> -->
      <mp-html content="{{item.spaceContent}}"></mp-html>
    </view>
  </view>
</view>
wechat_staff/pages/download/index.js
@@ -121,6 +121,10 @@
                }
              },
              fail(err) { 
                item.paddingStatus = 4
                that.setData({
                  downloadList
                })
                wx.showToast({
                  title: '图片下载失败',icon: 'none'
                })
wechat_staff/pages/kefu/fond.js
@@ -16,7 +16,7 @@
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
  onShow(options) {
    var app = getApp().globalData
    this.setData({
      bottomLift: app.bottomLift
wechat_staff/pages/kefu/select.js
@@ -41,8 +41,12 @@
      customer
    } = this.data
    const enjoyList = wx.getStorageSync('enjoyList') || []
    if (!customer.customerId) return wx.showToast({
    if (!customer.platSourceId) return wx.showToast({
      title: '请先选择要关联的客户',
      icon: 'none'
    })
    if(enjoyList.filter(i => i.checked).length == 0) return wx.showToast({
      title: '请重新选择要关联的的产品',
      icon: 'none'
    })
    batchAddLike({
@@ -58,12 +62,15 @@
            icon: 'none'
          })
        }, 500)
        const temp = enjoyList.filter(i => !i.checked)
        wx.setStorageSync('enjoyList', temp)
        this.setData({
          customer: {},
          total: 0,
          dataList: [],
          page: 1
        })
        wx.navigateBack()
        this.getList()
      }else{
        return wx.showToast({
wechat_staff/pages/kefu/select.less
@@ -55,12 +55,14 @@
    }
    .icon{
      width: 28rpx;
      height: 28rpx;
      margin-top: 4rpx;
      margin-right: 14rpx;
    }
  }
  .kehu{
    width: 48rpx;
    height: 48rpx;
    margin-left: 30rpx;
  }
}
wechat_staff/pages/kefu/select.wxml
@@ -12,10 +12,10 @@
  <!--  -->
  <view class="search_wrap">
    <view class="input_wrap">
      <image class="icon" src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
      <image class="icon" src="../../static/icon/ic_search@2x.png"></image>
      <input model:value="{{keyWords}}" bindblur="reloadList" type="text" placeholder="搜索客户昵称、导购、备注名" />
    </view>
    <image bindtap="jumpClient" 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"></image>
  </view>
  <!--  -->
  <scroll-view bindscrolltolower="scrolltolower" scroll-y    enable-passive enable-flex class="list">
wechat_staff/pages/kefu/select.wxss
@@ -56,11 +56,13 @@
}
.search_wrap .input_wrap .icon {
  width: 28rpx;
  height: 28rpx;
  margin-top: 4rpx;
  margin-right: 14rpx;
}
.search_wrap .kehu {
  width: 48rpx;
  height: 48rpx;
  margin-left: 30rpx;
}
.list {
wechat_staff/pages/login/index.less
@@ -102,3 +102,12 @@
    }
  }
}
.tip{
  position: fixed;
  bottom: 108rpx;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 26rpx;
  color: #666666;
}
wechat_staff/pages/login/index.wxml
@@ -45,4 +45,6 @@
      </view>
    </view>
  </van-popup>
  <!--  -->
  <view class="tip">本小程序功能仅限于志邦家居及经销商员工使用</view>
</view>
wechat_staff/pages/login/index.wxss
@@ -102,3 +102,12 @@
  justify-content: center;
  color: #fff;
}
.tip {
  position: fixed;
  bottom: 108rpx;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 26rpx;
  color: #666666;
}
wechat_staff/pages/promotion/index.js
@@ -1,4 +1,7 @@
import { newsPage,saveShareRecord } from '../../api/index'
import {
  newsPage,
  saveShareRecord
} from '../../api/index'
import moment from "moment";
Page({
@@ -19,20 +22,28 @@
    this.getList()
  },
  getList() {
    newsPage({capacity:this.data.capacity,
    newsPage({
        capacity: this.data.capacity,
      page:this.data.page,
      model:{type:0}})
        model: {
          type: 0
        }
      })
      .then(res =>{
        wx.stopPullDownRefresh()
        if(this.data.page ==1){
          this.setData({list:[]})
          this.setData({
            list: []
          })
        }
        if(this.data.page == res.data.page){ 
          res.data.records.forEach(element => { 
            element.createDate = moment(element.createDate).format("yyyy/MM/DD")  
          })
          this.setData({list: [...this.data.list, ...res.data.records || []],
            total:res.data.total})
          this.setData({
            list: [...this.data.list, ...res.data.records || []],
            total: res.data.total
          })
        }          
        console.log(this.data)
    }) 
@@ -49,9 +60,15 @@
  },
  onReachBottom() {
    console.log('触底事件');
    const { total, list, page } = this.data
    const {
      total,
      list,
      page
    } = this.data
    if(total > list.length){
      this.setData({ page: page + 1 })
      this.setData({
        page: page + 1
      })
      this.getList()
    }else{
      wx.showToast({
@@ -83,8 +100,10 @@
  downloadImageFileDo(files,title){
    wx.showLoading({
      title: '正在下载',
      mask: true
    })
   let temp = 0;
    let count = 0;
    if(files.length){
      for(let i = 0;i<files.length;i++){        
        let filePath = wx.env.USER_DATA_PATH + '/' + new Date().valueOf()+i + '.jpg'  ;
@@ -98,9 +117,11 @@
              filePath: tempFp,
              success(result) {
                temp ++;
                console.log(result)
                count++;
                if (count == files.length) {
                  wx.hideLoading()
                }
                if(temp == files.length){
                    wx.hideLoading();
                    wx.setClipboardData({
                      data:  title,
                      success: function (res) {
@@ -114,25 +135,42 @@
                      }
                    })
                } 
              }, fail(err) {
              },
              fail(err) {
                count++;
                if (count == files.length) {
                  wx.hideLoading()
                }
                wx.showToast({
                  title: '图片下载失败哦'
                })
              }
            })
          } , fail(err) {
          },
          fail(err) {
            count++;
            if (count == files.length) {
              wx.hideLoading()
            }
            wx.showToast({
              title: '图片下载失败哦'
            })
          }
        })
      } 
    }else{
      wx.showToast({
        title: '该资讯暂无可分享的图片或视频',
        icon: 'none'
      })
    } 
  },
  downloadVideoFileDo(files,title){
    wx.showLoading({
      title: '正在下载',
      mask: true
    }) 
    let count = 0;
    if(files.length){  
      let filePath = wx.env.USER_DATA_PATH + '/' + new Date().valueOf() + '0.mp4';
      wx.downloadFile({
@@ -144,8 +182,10 @@
          wx.saveVideoToPhotosAlbum({
            filePath: tempFp,
            success(result) { 
              console.log(result)
                  wx.hideLoading();
              count++;
              if (count == files.length) {
                wx.hideLoading()
              }
                  wx.setClipboardData({
                    data:  title,
                    success: function (res) {
@@ -158,13 +198,32 @@
                      })
                    }
                }) 
            }, fail(err) {
            },
            fail(err) {
              count++;
              if (count == files.length) {
                wx.hideLoading()
              }
              wx.showToast({
                title: '视频下载失败哦'
              })
            }
          })
        },
        fail(err) {
          count++;
          if (count == files.length) {
            wx.hideLoading()
        } 
          wx.showToast({
            title: '视频下载失败哦'
          })
        }
      })
    }else{
      wx.showToast({
        title: '该资讯暂无可分享的图片或视频',
        icon: 'none'
      }) 
    } 
  },
@@ -187,7 +246,9 @@
   */
  onPullDownRefresh() {
    console.log('下拉刷新')  
    this.setData({ page: 1 })
    this.setData({
      page: 1
    })
    this.getList() 
  },
 
wechat_staff/pages/work/index.js
@@ -1,4 +1,7 @@
import { getDictData, getMemberInfo } from '../../api/index'
import {
  getDictData,
  getMemberInfo
} from '../../api/index'
Page({
  /**
@@ -9,24 +12,59 @@
    clientHeight: 0,
    clientTop: 0, 
    showCard: false,
    userInfo: {name:''}
    userInfo: {
      name: ''
    }
  },
  onLoad(options) {
    const res = wx.getMenuButtonBoundingClientRect()
    this.setData({clientHeight: res.height})
    this.setData({clientTop: res.top})
    this.setData({
      clientHeight: res.height
    })
    this.setData({
      clientTop: res.top
    })
  },
  onShow() {
    this.initData()
  },
  subscribe: function () {
    // æ˜¾ç¤ºåŠ è½½æç¤º
    let that = this
    wx.requestSubscribeMessage({
      tmplIds: ['A_jEWoyl0Uu_l5J-zwlwx_FcbUirlsS6Peu4JW6a7Gc'],
      success: (res) => {
        if (res['A_jEWoyl0Uu_l5J-zwlwx_FcbUirlsS6Peu4JW6a7Gc'] === 'accept') {
          that.submitClock();
        } else if (res['A_jEWoyl0Uu_l5J-zwlwx_FcbUirlsS6Peu4JW6a7Gc'] === 'reject') {
          // ç”¨æˆ·åŽ†å²æ“ä½œæœ‰è®¾ç½®äº†æ‹’ç» or å…³é—­äº†è®¢é˜…消息的主(总)开关,导致无法推送
          // console.log(res, '0 æ‹’绝 or å…³é—­äº†è®¢é˜…消息的主(总)开关---');
        } else {
          wx.showToast({
            title: '授权订阅消息有误',
            icon: 'none'
          });
        }
      },
      fail: () => {
        reject();
      }
    })
  },
  showQrcode() {
    this.setData({ showCard: true })
    this.setData({
      showCard: true
    })
  },
  onClose() {
    this.setData({ showCard: false })
    this.setData({
      showCard: false
    })
  },
  changePath(e) {
    const {userInfo} = this.data
    const {
      userInfo
    } = this.data
    // é¡µé¢è·³è½¬
    let temp = [
      '/pages/userinfo/index',
@@ -51,11 +89,12 @@
      code: 'WEIXIN_DEFAULT_IMGS',
      label: 'STAFF_WORK_TOP_IMG'
    }).then(res => {
      this.setData({ topimg: res.data.code })
      this.setData({
        topimg: res.data.code
      })
    })
  },
  onReady() {
  },
  onReady() {},
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面隐藏
wechat_staff/pages/work/index.wxml
@@ -35,6 +35,8 @@
        <image class="icon" src="../../static/icon/mine_ic_ar.png" mode="widthFix"></image>
      </view>
    </view>
    <!-- index.wxml -->
    <!-- <button bindtap="subscribe">订阅消息</button> -->
  </view>
  <!-- è¯¦æƒ… -->
  <van-popup show="{{ showCard }}" closeable round bind:close="onClose">
wechat_staff/project.private.config.json
@@ -2,7 +2,7 @@
  "projectname": "wechat_staff",
  "setting": {
    "compileHotReLoad": true,
    "urlCheck": true
    "urlCheck": false
  },
  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json ä¸­çš„相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
  "condition": {
@@ -31,8 +31,8 @@
        },
        {
          "name": "",
          "pathName": "pages/productVideo/index",
          "query": "id=1813372914895843329",
          "pathName": "pages/detailDis/product",
          "query": "id=1823671456940113921",
          "launchMode": "default",
          "scene": null
        },
wechat_staff/utils/config.js
@@ -1,8 +1,8 @@
// export const baseUrl = 'http://192.168.0.135:10027'
export const baseUrl = 'http://192.168.0.170:80'
// æµ‹è¯•服务器
// export const baseUrl = 'https://dmdev.zhibang.com:8443/web_interface'
// ç”Ÿäº§æœåС噍
export const baseUrl = 'https://zbyj.zbom.com/web_interface'
// export const baseUrl = 'https://zbyj.zbom.com/web_interface'
 
// è…¾è®¯åœ°å›¾å¼€å‘者 key
export const qqMapKey = 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ'