jiangping
2024-07-25 e61a6b57161e75185ba0691a3bfa3961f7a7a13e
Merge remote-tracking branch 'origin/master'

# Conflicts:
# wechat_staff/pages/webView/index.wxml
已添加2个文件
已修改55个文件
1725 ■■■■ 文件已修改
server/service/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCaseInfoResponse.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/CustomerApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/PersonnelApi.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/app.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disProduct/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/api/index.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/detailFooter/index.js 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/detailFooter/index.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/detailFooter/index.less 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/detailFooter/index.wxml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/detailFooter/index.wxss 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/consult.js 133 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/consult.json 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/consult.less 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/consult.wxml 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/consult.wxss 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/detail.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/detail.json 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/detail.less 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/detail.wxml 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/detail.wxss 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/case.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/case.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/case.wxml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/realpic.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/realpic.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/realpic.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/discover/discover.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.js 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.less 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.wxml 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.wxss 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/index/index.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/index/index.wxml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.js 191 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.less 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.wxml 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.wxss 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.js 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.less 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/store/staff.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/webView/index.wxml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/work/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/project.private.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/static/icon/ic_select.png 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/static/icon/ic_select_sel.png 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/utils/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java
@@ -15,6 +15,7 @@
import com.doumee.service.system.SystemDictService;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.mgt.DefaultSecurityManager;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -189,29 +190,20 @@
        updWxMiniTokenDo(Constants.WX_APPID_PERSONNEL,Constants.WX_SECRET_PERSONNEL,Constants.WX_TOKEN_PERSONNEL);
    }
    public  void updWxMiniTokenDo(String  appID,String appKey,String token) {
        String appId = queryByCode(Constants.WX_MINI_CONFIG,appID).getCode();
        String appSecret = queryByCode(Constants.WX_MINI_CONFIG,appKey).getCode();
    public  void updWxMiniTokenDo(String  appIdKey,String secretKey,String tokenKey) {
        DefaultSecurityManager securityManager = new DefaultSecurityManager();
        SecurityUtils.setSecurityManager(securityManager);
        String appId = queryByCode(Constants.WX_MINI_CONFIG,appIdKey).getCode();
        String appSecret = queryByCode(Constants.WX_MINI_CONFIG,secretKey).getCode();
        SystemDictData systemDictData = this.queryByCode(Constants.WX_MINI_CONFIG,tokenKey);
        //生成微信token
        String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+appSecret;
        String response = HttpsUtil.sendGet(url);
        JSONObject json = JSONObject.parseObject(response);
        SystemDictData systemDictData = queryByCode(Constants.WX_MINI_CONFIG,token);
        systemDictData.setCode(json.getString("access_token"));
        systemDictData.setUpdateTime(new Date());
        updateByIdNew(systemDictData);
          appId = queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_PERSONNEL).getCode();
          appSecret = queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_PERSONNEL).getCode();
        //生成微信token
          url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appId+"&secret="+appSecret;
          response = HttpsUtil.sendGet(url);
          json = JSONObject.parseObject(response);
          systemDictData = queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_TOKEN_PERSONNEL);
        systemDictData.setCode(json.getString("access_token"));
        systemDictData.setUpdateTime(new Date());
        updateByIdNew(systemDictData);
        systemDictDataService.updateById(systemDictData);
    }
server/service/src/main/java/com/doumee/biz/zbom/model/zhongtai/response/ZTCaseInfoResponse.java
@@ -13,8 +13,7 @@
@Data
public class ZTCaseInfoResponse extends ZTImageListResponse implements Serializable {
    private APISpaceCaseVo[] apiSpaceCaseVos;
    private List<String> imageurlList;
    private String caseInfo;
    /**
     * 收藏量
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -678,8 +678,11 @@
        // 场景码,与前端约定,最终是需要前端解析
        body.put("scene", scene);
        // 正式版为 "release",体验版为 "trial",开发版为 "develop"。默认是正式版。
        body.put("env_version", "develop");
        body.put("page", page);
        String env_version = "trial";
        body.put("env_version", env_version);
        if(env_version.equals("release")){
            body.put("page", page);
        }
        // 透明,根据你的场景自行设置body参数
        body.put("is_hyaline", true);
        OkHttpClient client = new OkHttpClient().newBuilder().build();
@@ -691,7 +694,7 @@
            Response response = client.newCall(request).execute();
            if (response.isSuccessful()) {
                InputStream inputStream = new ByteArrayInputStream(response.body().bytes());
          /*      ByteArrayOutputStream baos = new ByteArrayOutputStream();
              /* ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    byte[] buffer = new byte[1024];
                    int len = -1;
                    while ((len = inputStream.read(buffer)) != -1) {
server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java
@@ -26,10 +26,7 @@
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.*;
/**
 * Created by IntelliJ IDEA.
@@ -283,6 +280,33 @@
        ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
        ztContentListRequest.setId(id);
        ZTProductInfoResponse response = zbomZhongTaiService.getProductInfo(ztContentListRequest);
        if(Objects.nonNull(response)){
            List<String> stringList = new ArrayList<String>();
            if (StringUtils.isNotBlank(response.getCoverImage())) {
                stringList.add(response.getCoverImage());
            }
            if(Objects.nonNull(response.getBannerImgList())){
                stringList.addAll(Arrays.asList(response.getBannerImgList()));
            }
            if(StringUtils.isNotBlank(response.getContent())){
                // 添加 富文本 图片
                stringList.addAll(Constants.getImgsFromHtmlText(response.getContent()));
            }
            List<ZTSpaceInfoResponse> ztSpaceInfoResponseList = response.getSpaceList();
            if(CollectionUtils.isNotEmpty(ztSpaceInfoResponseList)){
                for (ZTSpaceInfoResponse ztSpaceInfoResponse:ztSpaceInfoResponseList) {
                    if(StringUtils.isNotBlank(ztSpaceInfoResponse.getSpaceImg())){
                        stringList.add(ztSpaceInfoResponse.getSpaceImg());
                    }
                    if(StringUtils.isNotBlank(ztSpaceInfoResponse.getSpaceContent())){
                        //添加 富文本 图片
                        stringList.addAll(Constants.getImgsFromHtmlText(ztSpaceInfoResponse.getSpaceContent()));
                    }
                }
            }
            response.setImageurlList(stringList);
        }
        return response;
    }
@@ -295,7 +319,25 @@
        ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
        ztContentListRequest.setId(id);
        ZTCaseInfoResponse response = zbomZhongTaiService.getWholecaseInfo(ztContentListRequest);
        List<String> stringList = new ArrayList<String>();
        if (StringUtils.isNotBlank(response.getCoverImage())) {
            stringList.add(response.getCoverImage());
        }
        if(Objects.nonNull(response.getLayoutUlr())){
            stringList.add(response.getLayoutUlr());
        }
        APISpaceCaseVo[]  apiSpaceCaseVoList = response.getApiSpaceCaseVos();
        if(Objects.nonNull(apiSpaceCaseVoList)){
            for (APISpaceCaseVo apiSpaceCaseVo:apiSpaceCaseVoList) {
                if(StringUtils.isNotBlank(apiSpaceCaseVo.getCoverImage())){
                    stringList.add(apiSpaceCaseVo.getCoverImage());
                }
                if(Objects.nonNull(apiSpaceCaseVo.getImgList())){
                    stringList.addAll(Arrays.asList(apiSpaceCaseVo.getImgList()));
                }
            }
        }
        response.setImageurlList(stringList);
        return response;
    }
@@ -308,6 +350,32 @@
        ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
        ztContentListRequest.setId(id);
        ZTProductNewsInfoResponse response = zbomZhongTaiService.getProductNewsInfo(ztContentListRequest);
        if(Objects.nonNull(response)){
            List<String> stringList = new ArrayList<String>();
            if (StringUtils.isNotBlank(response.getCoverImage())) {
                stringList.add(response.getCoverImage());
            }
            if(Objects.nonNull(response.getBannerImgList())){
                stringList.addAll(Arrays.asList(response.getBannerImgList()));
            }
            if(StringUtils.isNotBlank(response.getContent())){
                stringList.addAll(Constants.getImgsFromHtmlText(response.getContent()));
            }
            List<ZTSpaceInfoResponse> ztSpaceInfoResponseList = response.getSpaceList();
            if(CollectionUtils.isNotEmpty(ztSpaceInfoResponseList)){
                for (ZTSpaceInfoResponse ztSpaceInfoResponse:ztSpaceInfoResponseList) {
                    if(StringUtils.isNotBlank(ztSpaceInfoResponse.getSpaceImg())){
                        stringList.add(ztSpaceInfoResponse.getSpaceImg());
                    }
                    if(StringUtils.isNotBlank(ztSpaceInfoResponse.getSpaceContent())){
                        //添加 富文本 图片
                        stringList.addAll(Constants.getImgsFromHtmlText(ztSpaceInfoResponse.getSpaceContent()));
                    }
                }
            }
            response.setImageurlList(stringList);
        }
        return response;
    }
@@ -320,6 +388,16 @@
        ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType());
        ztContentListRequest.setId(id);
        ZTRealcaseInfoResponse response = zbomZhongTaiService.getRealcaseInfo(ztContentListRequest);
        if(Objects.nonNull(response)){
            List<String> stringList = new ArrayList<String>();
            if (StringUtils.isNotBlank(response.getCoverImage())) {
                stringList.add(response.getCoverImage());
            }
            if(Objects.nonNull(response.getContentImgList())){
                stringList.addAll(Arrays.asList(response.getContentImgList()));
            }
            response.setImageurlList(stringList);
        }
        return response;
    }
server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java
@@ -699,7 +699,8 @@
        String url =null;
        //内容分享海报图片
        InputStream mpCode =  Constants.generateWxMiniImgStream(systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG, Constants.WX_TOKEN_CUSTOMER).getCode(),
                "userId="+users.getId()+"&articleId="+param.getArticleId(),
                //"userId="+users.getId()+"&articleId="+param.getArticleId(),
                 param.getArticleId()+"&"+users.getId(),
                param.getPageUrl());//小程序
        InputStream inputStream = GeneratePicUtil.generateShareWithUserImg(
server/web/src/main/java/com/doumee/api/web/CustomerApi.java
@@ -83,6 +83,9 @@
    @Autowired
    private ActionsService actionsService;
    @ApiOperation(value = "客户端小程序登陆", notes = "客户端小程序")
    @GetMapping("/wxLoginCustomer")
    @ApiImplicitParams({
@@ -328,6 +331,7 @@
    @UserLoginRequired
    @LoginRequired
    @ApiOperation(value = "行为内容接口 - 中台", notes = "客户端小程序")
    @GetMapping("/actionDo")
@@ -341,6 +345,7 @@
        return ApiResponse.success("操作成功");
    }
    @UserLoginRequired
    @LoginRequired
    @ApiOperation(value = "定制服务列表", notes = "客户端小程序")
    @GetMapping("/getCustomizedNewsList")
@@ -351,6 +356,7 @@
        return ApiResponse.success("查询成功",newsService.getCustomizedNewsList(Constants.ONE,null,null));
    }
    @UserLoginRequired
    @LoginRequired
    @ApiOperation(value = "定制服务详情", notes = "客户端小程序")
    @GetMapping("/getCustomizedNewsDetail")
@@ -435,6 +441,10 @@
    }
    @UserLoginRequired
    @LoginRequired
    @ApiOperation(value = "产品分页列表 - 中台", notes = "客户端小程序")
server/web/src/main/java/com/doumee/api/web/PersonnelApi.java
@@ -1,5 +1,6 @@
package com.doumee.api.web;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.biz.zbom.ZbomCRMService;
import com.doumee.biz.zbom.model.crm.CrmCustomerListRequest;
import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse;
@@ -60,6 +61,7 @@
    @Autowired
    private GetZhongTaiDataService getZhongTaiDataService;
    @ApiOperation(value = "小程序登陆", notes = "员工端小程序")
    @GetMapping("/loginByWx")
@@ -179,8 +181,15 @@
    }
    @UserLoginRequired
    @ApiOperation(value = "获取内容分享海报", notes = "获取内容分享海报,加小程序码")
    @PostMapping("/getContentShareImg")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true)
    })
    public ApiResponse<String> getContentShareImg(@RequestBody ContentShareImgDto param) {
        return  ApiResponse.success(usersService.getContentShareImg(this.getLoginUserInfo(),param));
    }
wechat_jiaxuan/app.js
@@ -6,7 +6,15 @@
    primary: '#B08771',
    bottomLift: ''
  },
  onLaunch: function () {
  onLaunch: function (op) {
    console.log('options', op.query.scene);
    let pathMap = [
      '/pages/detailDis/product',
      '/pages/detailDis/case',
      '/pages/detailDis/realpic',
      '/pages/consult/detail',
      '/pages/productVideo/index',
    ]
    //获取当前设备信息
    const WindowInfo = wx.getWindowInfo()
    if (WindowInfo.safeArea.top > 20) {
@@ -27,6 +35,12 @@
              wx.setStorageSync('openid', res.data.member.openid)
              wx.setStorageSync('sessionKey', res.data.sessionKey)
              wx.setStorageSync('token', res.data.token)
              if(op.query.scene){
                let temp = op.query.scene.split('&')
                wx.navigateTo({
                  url: `${pathMap[temp[1]]}?id=${temp[0]}`,
                })
              }
            } else {
              console.log('登录失败!')
            }
wechat_jiaxuan/components/disProduct/index.js
@@ -138,7 +138,6 @@
        secondCateList[activeIndex].paramIndex = -1
        secondCateList[activeIndex].paramName = ''
      }
      this.setData({ pageNum: 1,datalist: [],total: 0})
      this.setData({ tagCodes, secondCateList })
    },
    changeShowParams(e){
@@ -154,7 +153,6 @@
          activeParam: secondCateList[activeIndex].valueVos
        })
      }
      console.log('activeParam', this.data.activeParam);
      // this.setData({showTwo: false})
    },
    cancelParam() {
wechat_staff/api/index.js
@@ -142,9 +142,10 @@
    data
  })
}
export const getUserCard = (data) => {
// 批量添加喜欢给客户
export const batchAddLike = (data) => {
  return request({
    url: '/web/personnel/getUserCard',
    url: '/web/personnel/batchAddLike',
    method: "POST",
    data
  })
@@ -308,7 +309,6 @@
    data
  })
}
// 小程序注销
export const getCrmAuthUrl = (data) => {
  return request({
    url: '/web/customer/getCrmAuthUrl',
wechat_staff/components/detailFooter/index.js
@@ -1,4 +1,8 @@
import { getContentShareImg } from '../../api/index'
import {
  getContentShareImg
} from '../../api/index'
const { HYEventBus } = require('hy-event-store')
const eventBus = new HYEventBus()
Component({
  /**
   * 组件的属性列表
@@ -13,7 +17,12 @@
   */
  data: {
    bottomLift: 0,
    showShare: false
    showShare: false,
    isShowPoster: false,
    posterUrl: '',
    leftIcon: '<<',
    rightIcon: '>>',
  },
  attached() {
    var app = getApp().globalData
@@ -23,34 +32,89 @@
  },
  methods: {
    handleEnjoy() {
      const { info } = this.data
      const {
        info
      } = this.data
      this.triggerEvent('enjoy', {
        type: 'enjoy', flag: !info.isEnjoy
        type: 'enjoy',
        flag: !info.isEnjoy
      })
    },
    handleCollec() {
      const { info } = this.data
      const {
        info
      } = this.data
      this.triggerEvent('enjoy', {
        type: 'collec', flag: !info.isCollection
        type: 'collec',
        flag: !info.isCollection
      })
    },
    handleDown() {
      const { info, path } = this.data
      const {
        info,
        path
      } = this.data
      let that = this
      getContentShareImg({
        articleId: info.id,
        articleId: `${info.id}&${path}&${wx.getStorageSync('member').id}`,
        type: '1',
        pageUrl: path,
        // pageUrl: path,
        imgurl: info.coverImage,
      }).then(res => {
        this.setData({
          isShowPoster: true,
          showShare: false,
          posterUrl: res.data
        })
      })
    },
    saveCard() {
      let that = this
      const posterUrl = this.data.posterUrl
      wx.downloadFile({
        url: posterUrl,
        success: function (res) {
          console.log('下载成功', res);
          wx.saveImageToPhotosAlbum({
            filePath: res.tempFilePath,
            success(result) {
              console.log(result)
              that.setData({
                isShowPoster: false
              })
              wx.showToast({
                title: '保存成功',
                icon: 'success',
                duration: 2000
              })
            }
          })
        }
      })
    },
    batchDown() {
      const downloadList = this.data.info.imageurlList || []
      wx.setStorageSync('downloadList', downloadList)
      wx.navigateTo({
        url: '/pages/download/index',
      }, 1000)
    },
    closeCard() {
      this.setData({ isShowPoster: false })
    },
    openShare() {
      console.log('点击打开');
      this.setData({ showShare: true })
      this.setData({
        showShare: true
      })
    },
    onClose() {
      console.log('点击关闭');
      this.setData({ showShare: false })
      this.setData({
        showShare: false
      })
    },
  }
})
})
wechat_staff/components/detailFooter/index.json
@@ -1,4 +1,6 @@
{
  "component": true,
  "usingComponents": {}
  "usingComponents": {
    "van-overlay": "@vant/weapp/overlay/index"
  }
}
wechat_staff/components/detailFooter/index.less
@@ -98,4 +98,61 @@
  height: 100%;
  z-index: 1000;
  background-color: rgba(0,0,0,.5);
}
.card_wrap{
  position: fixed;
  border-radius: 8rpx;
  top: 50%;
  left: 75rpx;
  transform: translate(0, -50%);
  width: 600rpx;
  background-color: rgba(0, 0, 0, .2);
  z-index: 99999;
  .img1{
    image{
      width: 600rpx;
      border-radius: 8rpx ;
    }
  }
  .content{
    width: 600rpx;
    height: 308rpx;
    padding: 26rpx 0 40rpx;
    background: rgba(255,255,255,0.8);
    border-radius: 16rpx;
    margin-top: 24rpx;
    text-align: center;
    .title{
      font-weight: 500;
      font-size: 30rpx;
      margin-bottom: 20rpx;
    }
    .line{
      font-size: 26rpx;
      color: #333333;
      line-height: 36rpx;
    }
  }
  .btns{
    margin-top: 30rpx;
    display: flex;
    justify-content: space-between;
    width: 100%;
    .btn{
      width: 160rpx;
      height: 88rpx;
      border-radius: 8rpx;
      border: 2rpx solid #FFFFFF;
      display: flex;
      justify-content: center;
      align-items: center;
      color: #fff;
    }
    .save{
      width: 420rpx;
      margin-left: 20rpx;
      border: none;
      background: linear-gradient( 180deg, #E0B49C 0%, #B68B74 100%);
    }
  }
}
wechat_staff/components/detailFooter/index.wxml
@@ -12,7 +12,7 @@
          <image wx:else src="../../static/icon/detail_nav_collect.png"></image>
          <text>收藏</text>
        </view>
        <view bindtap="handleDown" class="item">
        <view bindtap="batchDown" class="item">
          <image src="../../static/icon/detail_nav_download@2x.png"></image>
          <text>下载</text>
        </view>
@@ -35,4 +35,24 @@
    <view bindtap="onClose" class="cancel">取消</view>
  </view>
  <view wx:if="{{ showShare }}" class="shade" bindtap="onClose"></view>
  <!--  -->
  <view wx:if="{{ isShowPoster }}" class="card_wrap">
    <view class="img1">
      <image mode="widthFix" src="{{posterUrl}}"></image>
    </view>
    <view class="content">
      <view class="title">—— 分享话术 ——</view>
      <view class="line">{{ rightIcon }}精品案例{{ leftIcon }}</view>
      <view class="line">🥇精益求精,品质生活🥇</view>
      <view class="line">汇集全国优秀设计师获奖案例</view>
      <view class="line">👉各种风格灵感案例上万套👈</view>
      <view class="line">总有一套能打动您,适合您</view>
    </view>
    <view class="btns">
      <view class="btn" bind:tap="closeCard">取消</view>
      <view class="btn save" bind:tap="saveCard">复制话术并保存海报</view>
    </view>
  </view>
  <van-overlay z-index="99998" show="{{ isShowPoster }}" bind:click="onClickHide" />
</view>
wechat_staff/components/detailFooter/index.wxss
@@ -95,3 +95,58 @@
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.5);
}
.card_wrap {
  position: fixed;
  border-radius: 8rpx;
  top: 50%;
  left: 75rpx;
  transform: translate(0, -50%);
  width: 600rpx;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 99999;
}
.card_wrap .img1 image {
  width: 600rpx;
  border-radius: 8rpx ;
}
.card_wrap .content {
  width: 600rpx;
  height: 308rpx;
  padding: 26rpx 0 40rpx;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16rpx;
  margin-top: 24rpx;
  text-align: center;
}
.card_wrap .content .title {
  font-weight: 500;
  font-size: 30rpx;
  margin-bottom: 20rpx;
}
.card_wrap .content .line {
  font-size: 26rpx;
  color: #333333;
  line-height: 36rpx;
}
.card_wrap .btns {
  margin-top: 30rpx;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.card_wrap .btns .btn {
  width: 160rpx;
  height: 88rpx;
  border-radius: 8rpx;
  border: 2rpx solid #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}
.card_wrap .btns .save {
  width: 420rpx;
  margin-left: 20rpx;
  border: none;
  background: linear-gradient(180deg, #E0B49C 0%, #B68B74 100%);
}
wechat_staff/pages/consult/consult.js
@@ -1,39 +1,113 @@
// pages/consult/consult.js
import { getZhongTaiProductNewsPage, getCatalogList,actionDo } from '../../api/index'
Page({
  /**
   * 页面的初始数据
   */
  data: {
    category: ['新品上市', '专利证书', '大牌授权','新品上市', '专利证书', '大牌授权'],
    secondCategory: ['级分类','级分类','级分类','级分类','级分类','级分类'],
    activeCate: '',
    seActiveCate: '',
    dataList: []
  },
    category: [],
    secondCategory: [],
    catalogCode: '',
    tagCode: '',
    query: '',
    dataList: [],
    total: 0,
    pageNum: 1,
    pageSize: 10,
    // height: 0,
    // top: 0,
  },
  onLoad(options) {
    this.getCate()
  },
  onReachBottom() {
    console.log('触底事件');
    const { total, dataList, pageNum } = this.data
    if(total > dataList.length){
      this.setData({ pageNum: pageNum + 1 })
      this.getList()
    }else{
      wx.showToast({
        title: '暂无更多数据',
        icon: 'none'
      })
    }
  },
  getCate() {
    getCatalogList({catalogCode: 'product_info'}).then(res => {
      this.setData({ category: res.data })
      if(res.data && res.data.length > 0){
        this.setData({catalogCode: res.data[0].code})
        this.gettag()
        this.getList()
      }
    })
  },
  gettag() {
    const { catalogCode } = this.data
    getCatalogList({
      catalogCode
    }).then(res => {
      if(res.data && res.data.length > 0){
        this.setData({ secondCategory: res.data })
      }
    })
  },
  itemClick(e) {
    const { id } = e.target.dataset
    console.log(e.target.dataset);
    wx.navigateTo({
      url: '/pages/consult/detail',
    const item = e.currentTarget.dataset.item
    actionDo({actionType: 'view',id: item.id})
    if(item.contentType == 'link'){
      wx.navigateTo({
        url: '/pages/webView/index?link=' + item.content,
        success: function(res) {
          // 通过eventChannel向被打开页面传送数据
          res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent, title: item.title })
        }
      })
    }else{
      wx.navigateTo({
        url: '/pages/consult/detail?id='+item.id,
      })
    }
  },
  getList() {
    const { pageNum, pageSize, catalogCode, tagCode, query } = this.data
    getZhongTaiProductNewsPage({
      pageNum, pageSize, query, catalogCode: tagCode || catalogCode
    }).then(res => {
      if(res.data){
        this.setData({
          dataList: [ ...this.data.dataList, ...res.data.records ],
          total: res.data.total
        })
      }
    })
  },
  cateClick(e) {
    const { index } = e.target.dataset
    console.log(index);
    const { code } = e.currentTarget.dataset
    this.setData({ catalogCode: code,secondCategory: [], tagCode: ''  })
    this.gettag()
    this.getList()
    this.setData({ dataList: [], pageNum: 1 })
  },
  seCateClick(e) {
    const { index } = e.target.dataset
    console.log(index);
    const { code } = e.currentTarget.dataset
    if(this.data.tagCode == code){
      this.setData({ tagCode: '' })
    }else{
      this.setData({ tagCode: code })
    }
    this.setData({ dataList: [], pageNum: 1 })
    this.getList()
  },
  onLoad(options) {
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  priviewFull(e){
      const item = e.currentTarget.dataset.item
      console.log('item', item);
    },
  onReady() {
  },
@@ -58,21 +132,6 @@
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
wechat_staff/pages/consult/consult.json
@@ -1,3 +1,6 @@
{
  "navigationBarTitleText": "咨询"
  "usingComponents": {
    "buoyClient": "../../components/buoyClient/index"
  },
  "navigationBarTitleText": "资讯"
}
wechat_staff/pages/consult/consult.less
@@ -1,11 +1,33 @@
.container {
  background-color: #fff;
}
.home_top{
  position: fixed;
  width: 100%;
  z-index: 99;
  top: 0;
  background-color: #fff;
}
.cate_wrap{
  background-color: #fff;
  .cate_one{
    position: fixed;
    top: 96rpx;
    background-color: #fff;
    width: 100%;
  }
  .cate_two{
    position: fixed;
    top: 156rpx;
    background-color: #fff;
    padding-top: 30rpx;
    width: 100%;
  }
}
.search_wrap{
  width: 670rpx;
  height: 72rpx;
  margin: 24rpx auto;
  background: #F7F7F7;
  margin: 0rpx auto 24rpx;
  border-radius: 8rpx;
  padding: 0 40rpx;
  display: flex;
@@ -54,8 +76,9 @@
  }
}
.content{
  padding: 0 40rpx 40rpx;
  padding: 260rpx 40rpx 40rpx;
  .item{
    margin-bottom: 60rpx;
    .img{
      width: 100%;
    }
wechat_staff/pages/consult/consult.wxml
@@ -1,31 +1,40 @@
<view class="container">
  <view class="search_wrap">
    <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
    <input type="text" placeholder="搜索咨询标题" />
  <!-- 悬浮 -->
  <buoyClient />
  <view class="home_top">
    <view class="search_wrap">
      <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
      <input bindblur="getList" model:value="{{ query }}" type="text" placeholder="搜索资讯标题" />
    </view>
  </view>
  <!-- 分类 -->
  <view>
    <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;">
      <view class="scroll_cate">
        <view bindtap="cateClick" data-index="{{index}}" wx:for="{{ category }}" class="item {{ index == 0 ? 'active': '' }}">{{ item }}</view>
      </view>
    </scroll-view>
    <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 28rpx;">
      <view class="scroll_cate second_list">
        <view bindtap="seCateClick" data-index="{{index}}" wx:for="{{ secondCategory }}" class="item {{ index == 0 ? 'active': '' }}">{{ index }}{{ item }}</view>
      </view>
    </scroll-view>
  <view class="cate_wrap">
    <view class="cate_one">
      <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;">
        <view class="scroll_cate">
          <view bindtap="cateClick" data-code="{{item.code}}" wx:for="{{ category }}" class="item {{ catalogCode == item.code ? 'active': '' }}">{{ item.name }}</view>
        </view>
      </scroll-view>
    </view>
    <view class="cate_two">
      <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 24rpx;">
        <view class="scroll_cate second_list">
          <view bindtap="seCateClick" data-code="{{item.code}}" wx:for="{{ secondCategory }}" class="item {{ tagCode == item.code ? 'active': '' }}">{{ item.name }}</view>
        </view>
      </scroll-view>
    </view>
  </view>
  <!-- content -->
  <view class="content">
    <view class="item" bindtap="itemClick" data-abg="qwe">
      <image class="img" src="../../static/icon/test.png" mode="widthFix"></image>
      <view class="title">吊灯实用特辑 | 一步学会理想光影布局</view>
  <view class="content" style="padding-top: {{ secondCategory.length > 0 ? 276 : 186 }}rpx;">
    <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-item="{{item}}">
      <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image>
      <view class="title">{{ item.title }}</view>
      <view class="df_sb static">
        <view>{{ '2021-08-21 12:00:00' }}</view>
        <view>{{ item.publishDt || '' }}</view>
        <view class="df_sb">
          <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
          <text>1000</text>
          <text>{{ item.viewCount }}</text>
        </view>
      </view>
    </view>
wechat_staff/pages/consult/consult.wxss
@@ -1,11 +1,33 @@
.container {
  background-color: #fff;
}
.home_top {
  position: fixed;
  width: 100%;
  z-index: 99;
  top: 0;
  background-color: #fff;
}
.cate_wrap {
  background-color: #fff;
}
.cate_wrap .cate_one {
  position: fixed;
  top: 96rpx;
  background-color: #fff;
  width: 100%;
}
.cate_wrap .cate_two {
  position: fixed;
  top: 156rpx;
  background-color: #fff;
  padding-top: 30rpx;
  width: 100%;
}
.search_wrap {
  width: 670rpx;
  height: 72rpx;
  margin: 24rpx auto;
  background: #F7F7F7;
  margin: 0rpx auto 24rpx;
  border-radius: 8rpx;
  padding: 0 40rpx;
  display: flex;
@@ -50,7 +72,10 @@
  font-weight: 400;
}
.content {
  padding: 0 40rpx 40rpx;
  padding: 260rpx 40rpx 40rpx;
}
.content .item {
  margin-bottom: 60rpx;
}
.content .item .img {
  width: 100%;
wechat_staff/pages/consult/detail.js
@@ -1,12 +1,15 @@
// pages/consult/detail.js
import { shareContent, getProductNewsInfo } from '../../api/index'
Page({
  /**
   * 页面的初始数据
   */
  data: {
    navTitle: '详情',
    bottomLift: 0
    bottomLift: 0,
    info: {},
    detail: {},
    showShare: false
  },
  /**
@@ -17,25 +20,38 @@
    this.setData({
      bottomLift: app.bottomLift
    })
    this.getDetail(options.id)
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  handleDesign() {
    wx.navigateTo({
      url: '/pages/design/design',
    })
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  getDetail(id) {
    getProductNewsInfo({ id }).then(res => {
      this.setData({ info: res.data })
      wx.setNavigationBarTitle({
        title: res.data.title
      })
    })
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  openShare() {
    this.setData({showShare: true})
  },
  handleShare() {
    console.log('点击了分享');
    shareContent(this.data.info.id)
  },
  // 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})
  },
  onHide() {
  },
wechat_staff/pages/consult/detail.json
@@ -1,3 +1,8 @@
{
  "usingComponents": {}
  "usingComponents": {
    "van-popup": "@vant/weapp/popup/index",
    "mp-html": "mp-html",
    "buoyClient": "../../components/buoyClient/index"
  },
  "navigationBarTitleText": ""
}
wechat_staff/pages/consult/detail.less
@@ -27,18 +27,13 @@
    align-items: center;
    height: 100rpx;
    padding: 12rpx 40rpx;
    .list{
      flex: 1;
      display: flex;
      align-items: center;
    }
  }
  .sub_btn {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 72rpx;
    width: 152rpx;
    flex: 1;
    background-color: var(--themeColor);
    font-weight: 500;
    color: #FFFFFF;
@@ -51,6 +46,7 @@
    }
  }
  .item {
    margin-top: 18rpx;
    display: flex;
    flex-direction: column;
    justify-content: center;
@@ -63,4 +59,34 @@
      width: 44rpx;
    }
  }
}
.share_modal{
  .btns{
    display: flex;
    min-height: 320rpx;
    display: flex;
    align-items: center;
    .item{
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      flex: 1;
      font-size: 26rpx;
      background-color: #fff;
      image{
        width: 80rpx;
        height: 80rpx;
        margin-bottom: 10rpx;
      }
    }
  }
  .cancel{
    height: 80rpx;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1rpx solid #e5e5e5;
  }
}
wechat_staff/pages/consult/detail.wxml
@@ -1,33 +1,44 @@
<view>
  <navBar title="{{ navTitle }}"></navBar>
  <!-- <navBar title="{{ navTitle }}"></navBar> -->
  <buoyClient showPurpose="1" />
  <view class="main_content">
    <view class="main_title">三种美好玄关,进屋瞬间卸载疲惫</view>
    <view class="datetime">发布时间:2021-08-21 10:0</view>
    <view class="content">
      客厅、餐厅、卧室、厨房、阳台……家中空间的称谓,大多朴实无华,唯独“玄关”一词格外华丽抽象。
      这个不太起眼的小空间,取词来自道教:“玄关”指修炼内丹过程中,体内的气绕巡全身时,最先通过的地方,也有“夫玄关者,至玄至妙之机关也”的说法。
    </view>
    <view class="main_title">{{ info.title }}</view>
    <view class="datetime">发布时间:{{ info.publishDt }}</view>
    <mp-html content="{{info.content}}"></mp-html>
  </view>
  <!-- footer -->
  <view class="footer" style="padding-bottom: {{bottomLift}}px;">
    <view class="btns">
      <view class="list">
        <view class="item">
          <image class="icon" src="../../static/icon/detail_nav_like@2x.png" mode="widthFix"></image>
          <view class="name">喜欢</view>
        </view>
        <view class="item">
          <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
          <view class="name">收藏</view>
        </view>
        <view class="item">
          <image class="icon" src="../../static/icon/detail_nav_download@2x.png" mode="widthFix"></image>
          <view class="name">下载</view>
        </view>
      </view>
      <view class="sub_btn">
        <view>分享</view>
      <!-- <view class="item">
        <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <view class="name">收藏</view>
      </view> -->
      <button open-type="share" class="item" bindtap="handleShare">
        <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image>
        <view class="name">分享</view>
      </button>
      <view class="sub_btn" bindtap="handleDesign">
        <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image>
        <view>免费预约专属设计</view>
      </view>
    </view>
  </view>
  <!--  -->
  <van-popup position="bottom" show="{{ showShare }}" bind:close="onClose">
    <view class="share_modal">
      <view class="btns">
        <button open-type="share" class="item" bindtap="handleShare">
          <image src="../../static/icon/wechat.png"></image>
          <view>发送好友</view>
        </button>
        <button class="item">
          <image src="../../static/icon/download.png"></image>
          <view>下载海报</view>
        </button>
      </view>
      <view bindtap="onClose" class="cancel">取消</view>
    </view>
  </van-popup>
</view>
wechat_staff/pages/consult/detail.wxss
@@ -26,17 +26,12 @@
  height: 100rpx;
  padding: 12rpx 40rpx;
}
.footer .btns .list {
  flex: 1;
  display: flex;
  align-items: center;
}
.footer .sub_btn {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 72rpx;
  width: 152rpx;
  flex: 1;
  background-color: var(--themeColor);
  font-weight: 500;
  color: #FFFFFF;
@@ -49,6 +44,7 @@
  margin-right: 8rpx;
}
.footer .item {
  margin-top: 18rpx;
  display: flex;
  flex-direction: column;
  justify-content: center;
@@ -60,3 +56,30 @@
.footer .item .icon {
  width: 44rpx;
}
.share_modal .btns {
  min-height: 320rpx;
  display: flex;
  align-items: center;
}
.share_modal .btns .item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  font-size: 26rpx;
  background-color: #fff;
}
.share_modal .btns .item image {
  width: 80rpx;
  height: 80rpx;
  margin-bottom: 10rpx;
}
.share_modal .cancel {
  height: 80rpx;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1rpx solid #e5e5e5;
}
wechat_staff/pages/detailDis/case.js
@@ -49,6 +49,42 @@
  //     path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
  //   }
  // },
  handleEnjoy(e) {
    const enjoyList = wx.getStorageSync('enjoyList') || []
    const { type, flag } = e.detail
    console.log('type', type);
    console.log('flag', flag);
    const info = this.data.info
    if(type == 'enjoy'){
      // 点击了喜欢
      const index = enjoyList.findIndex( i => i.id === info.id )
      if(index === -1){
        info.isEnjoy = true
        this.setData({ info })
        enjoyList.push({
          ...info,
          joinType: '1',
          timestamp: new Date().getTime()
        })
      }else{
        info.isEnjoy = false
        this.setData({ info })
        enjoyList.splice(index, 1)
      }
      wx.setStorageSync('enjoyList', enjoyList)
    }else{
      actionDo({
        id: info.id,
        actionType: flag ? 'collect' : 'collect_cancel'
      }).then(res => {
        info.isCollection = flag
        wx.showToast({title: flag ? '收藏成功' : '取消收藏'})
        this.setData({
          info
        })
      })
    }
  },
  handleAction(e){
    const actionType = e.currentTarget.dataset.code
    const { info } = this.data
wechat_staff/pages/detailDis/case.json
@@ -2,7 +2,8 @@
  "usingComponents": {
    "van-popup": "@vant/weapp/popup/index",
    "mp-html": "mp-html",
    "buoyClient": "../../components/buoyClient/index"
    "buoyClient": "../../components/buoyClient/index",
    "detailFooter": "../../components/detailFooter/index"
  },
  "navigationBarTitleText": ""
}
wechat_staff/pages/detailDis/case.wxml
@@ -1,5 +1,6 @@
<view class="container">
  <buoyClient showPurpose="1" />
  <detailFooter bindenjoy="handleEnjoy" path="1" info="{{info}}" />
  <view class="main_title">{{ info.title }}</view>
  <view class="time">发布时间:{{ info.publishDt }}</view>
  <view class="fullview_wrap">
wechat_staff/pages/detailDis/product.js
@@ -49,7 +49,7 @@
        this.setData({ info })
        enjoyList.push({
          ...info,
          joinType: 'product',
          joinType: '0',
          timestamp: new Date().getTime()
        })
      }else{
@@ -70,24 +70,6 @@
        })
      })
    }
  },
  handleAction(e) {
    const actionType = e.currentTarget.dataset.code
    const {
      info
    } = this.data
    actionDo({
      actionType,
      id: this.data.info.id
    }).then(res => {
      info.isCollection = !info.isCollection
      this.setData({
        info
      })
      wx.showToast({
        title: actionType == 'collect' ? '收藏成功' : '取消收藏',
      })
    })
  },
  onShareAppMessage() {
    console.log('用户点击了分享');
@@ -220,10 +202,4 @@
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})
wechat_staff/pages/detailDis/product.wxml
@@ -1,6 +1,6 @@
<view class="main_app">
  <buoyClient showPurpose="1" />
  <detailFooter bindenjoy="handleEnjoy" path="/pages/detailDis/product" info="{{info}}" />
  <detailFooter binddown="handleDown" bindenjoy="handleEnjoy" path="0" info="{{info}}" />
  <!-- banner轮播 -->
  <swiper class="banner_swiper" circular indicator-dots autoplay style="height:{{bannerHeight}}rpx" duration>
    <block wx:for="{{ info.bannerImgList }}">
wechat_staff/pages/detailDis/realpic.js
@@ -42,6 +42,42 @@
      this.setData({info})
    })
  },
  handleEnjoy(e) {
    const enjoyList = wx.getStorageSync('enjoyList') || []
    const { type, flag } = e.detail
    console.log('type', type);
    console.log('flag', flag);
    const info = this.data.info
    if(type == 'enjoy'){
      // 点击了喜欢
      const index = enjoyList.findIndex( i => i.id === info.id )
      if(index === -1){
        info.isEnjoy = true
        this.setData({ info })
        enjoyList.push({
          ...info,
          joinType: '2',
          timestamp: new Date().getTime()
        })
      }else{
        info.isEnjoy = false
        this.setData({ info })
        enjoyList.splice(index, 1)
      }
      wx.setStorageSync('enjoyList', enjoyList)
    }else{
      actionDo({
        id: info.id,
        actionType: flag ? 'collect' : 'collect_cancel'
      }).then(res => {
        info.isCollection = flag
        wx.showToast({title: flag ? '收藏成功' : '取消收藏'})
        this.setData({
          info
        })
      })
    }
  },
  getDetail(id) {
    getRealcaseInfo({id}).then(res => {
      this.setData({ info: res.data })
wechat_staff/pages/detailDis/realpic.json
@@ -1,7 +1,8 @@
{
  "usingComponents": {
    "van-popup": "@vant/weapp/popup/index",
    "buoyClient": "../../components/buoyClient/index"
    "buoyClient": "../../components/buoyClient/index",
    "detailFooter": "../../components/detailFooter/index"
  },
  "navigationBarTitleText": ""
}
wechat_staff/pages/detailDis/realpic.wxml
@@ -1,5 +1,7 @@
<view class="container">
  <buoyClient showPurpose="1" />
  <detailFooter bindenjoy="handleEnjoy" path="2" info="{{info}}" />
  <!--  -->
  <view class="main_title">{{ info.title }}</view>
  <view class="time">发布时间:{{ info.publishDt }}</view>
  <image class="info_item" wx:for="{{ info.contentImgList }}" src="{{ item }}" mode="widthFix"></image>
wechat_staff/pages/discover/discover.js
@@ -1,4 +1,6 @@
import { getCataLogTagList, getCatalogList } from '../../api/index'
const { HYEventBus } = require('hy-event-store')
const eventBus = new HYEventBus()
Page({
  /**
@@ -15,7 +17,16 @@
  onLoad(options) {
    let menuButtonInfo = wx.getMenuButtonBoundingClientRect();
    this.setData({menuButtonInfo})
  },
  },
  onShow() {
    let discoverKey = wx.getStorageSync('discoverKey') || ''
    if(discoverKey){
      this.setData({ catalogCode: discoverKey })
      setTimeout(() => {
        wx.setStorageSync('discoverKey', '')
      }, 500)
    }
  },
  tabsClick(e) {
    const catalogCode = e.currentTarget.dataset.code
    this.setData({catalogCode})
@@ -24,13 +35,6 @@
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
wechat_staff/pages/download/index.js
@@ -1,11 +1,17 @@
// pages/download/index.js
const { HYEventBus } = require('hy-event-store')
const eventBus = new HYEventBus()
Page({
  /**
   * 页面的初始数据
   */
  data: {
    bottomLift: ''
    bottomLift: '',
    downloadList: [],
    checkedAll: false,
    showParam: false,
    takeQrcode: true
  },
  /**
@@ -17,24 +23,65 @@
      bottomLift: app.bottomLift
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    const downloadList = wx.getStorageSync('downloadList') || []
    let temp = downloadList.map(i => {
      // paddingStatus: 0未下载1正在下载2等待下载3下载完成
      return {
        url: i,
        paddingStatus: 0,
        checked: false
      }
    })
    this.setData({ downloadList: temp })
    setTimeout(() => {
      wx.setStorageSync('downloadList', [])
    },500)
  },
  openParam() {
    const downloadList = this.data.downloadList.filter(i => i.checked)
    if(downloadList.length === 0) return wx.showToast({title: '请先选择要下载的海报', icon: 'none'})
    this.setData({ showParam: true })
  },
  onClose() {
    this.setData({ showParam: false })
  },
  downCheck(e) {
    const takeQrcode = e.currentTarget.dataset.flag
    console.log('takeQrcode', takeQrcode);
    this.setData({ takeQrcode })
  },
  subDownload() {
    const downloadList = this.data.downloadList
    downloadList.forEach(item => {
      if(item.checked){
      }
    })
  /**
   * 生命周期函数--监听页面隐藏
   */
    this.setData({ showParam: false })
  },
  itemCheck(e) {
    const i = e.currentTarget.dataset.i
    const { downloadList, checkedAll } = this.data
    let count = 0
    downloadList.forEach((item, index) => {
      if(index === i){
        item.checked = !item.checked
      }
      if(item.checked) {
        count ++
      }
    })
    this.setData({ checkedAll: count == downloadList.length,  downloadList})
  },
  allCheck() {
    const { downloadList, checkedAll } = this.data
    downloadList.forEach(item => {
      item.checked = !checkedAll
    })
    this.setData({ checkedAll: !checkedAll, downloadList })
  },
  onHide() {
  },
wechat_staff/pages/download/index.json
@@ -1,4 +1,6 @@
{
  "usingComponents": {},
  "usingComponents": {
    "van-popup": "@vant/weapp/popup/index"
  },
  "navigationBarTitleText": "下载"
}
wechat_staff/pages/download/index.less
@@ -8,7 +8,11 @@
    border-radius: 8rpx;
    overflow: hidden;
    position: relative;
    border: 1px solid;
    margin-right: 20rpx;
    margin-bottom: 20rpx;
    &:nth-of-type(3n){
      margin-right: 0;
    }
    .img{
      width: 100%;
      height: 100%;
@@ -38,6 +42,7 @@
}
.footer {
  position: fixed;
  z-index: 99;
  bottom: 0;
  left: 0;
  width: 750rpx;
@@ -69,4 +74,44 @@
    border-radius: 8rpx;
    color: #fff;
  }
}
.param_modal{
  padding: 30rpx 40rpx 12rpx;
  .title{
    text-align: center;
    font-size: 30rpx;
  }
  .line{
    height: 150rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1rpx solid #E5E5E5;
    .check{
      width: 40rpx;
      height: 40rpx;
    }
    .name{
      font-size: 30rpx;
      color: #111111;
    }
    .desc{
      font-size: 26rpx;
      color: #777777;
      margin-top: 20rpx;
    }
  }
  .submit{
    margin-top: 100rpx;
    width: 100%;
    height: 88rpx;
    background: #B08771;
    border-radius: 8rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    font-size: 32rpx;
    color: #FFFFFF;
  }
}
wechat_staff/pages/download/index.wxml
@@ -1,21 +1,45 @@
<view>
  <view class="list">
    <view class="item">
      <image class="img" src=""></image>
      <view class="shade">等待下载</view>
      <image wx:if="{{ true }}" class="check" src="../../static/icon/ic_select_sel@2x.png"></image>
      <image wx:else class="check" src="../../static/icon/ic_select@2x.png"></image>
    <view wx:for="{{ downloadList }}" class="item">
      <image class="img" src="{{ item.url }}" mode="scaleToFill"></image>
      <view wx:if="{{ item.paddingStatus }}" class="shade">等待下载</view>
      <image data-i="{{index}}" bindtap="itemCheck" wx:if="{{ item.checked }}" class="check" src="../../static/icon/ic_select_sel@2x.png"></image>
      <image wx:else data-i="{{index}}" bindtap="itemCheck" class="check" src="../../static/icon/ic_select.png"></image>
    </view>
  </view>
  <!--  -->
  <view class="footer" style="padding-bottom: {{bottomLift}}px;">
    <view class="footer_wrap">
      <view class="check_wrap">
        <image wx:if="{{ true }}" class="check" src="../../static/icon/ic_select_sel@2x.png"></image>
        <image wx:else class="check" src="../../static/icon/ic_select@2x.png"></image>
        <image bindtap="allCheck" wx:if="{{ checkedAll }}" class="check" src="../../static/icon/ic_select_sel@2x.png"></image>
        <image bindtap="allCheck" wx:else class="check" src="../../static/icon/ic_select@2x.png"></image>
        <text>全选</text>
      </view>
      <view class="down_btn">批量下载</view>
      <view bindtap="openParam" class="down_btn">批量下载</view>
    </view>
  </view>
  <!--  -->
  <van-popup show="{{ showParam }}" position="bottom" closeable round bind:close="onClose">
    <view class="param_modal">
      <view class="title">下载图片是否携带二维码</view>
      <view>
        <view data-flag="{{true}}" bindtap="downCheck" class="line">
          <view class="content">
            <view class="name">带二维码</view>
            <view class="desc">适用朋友圈传播</view>
          </view>
          <image wx:if="{{ takeQrcode }}" src="../../static/icon/ic_select_sel@2x.png" class="check"></image>
        </view>
        <view data-flag="{{false}}" bindtap="downCheck" class="line">
          <view class="content">
            <view class="name">不带二维码</view>
            <view class="desc">适用抖音等工域传播</view>
          </view>
          <image wx:if="{{ !takeQrcode }}" src="../../static/icon/ic_select_sel@2x.png" class="check"></image>
        </view>
      </view>
      <view bindtap="subDownload" class="submit">确认</view>
    </view>
  </van-popup>
</view>
wechat_staff/pages/download/index.wxss
@@ -9,7 +9,11 @@
  border-radius: 8rpx;
  overflow: hidden;
  position: relative;
  border: 1px solid;
  margin-right: 20rpx;
  margin-bottom: 20rpx;
}
.list .item:nth-of-type(3n) {
  margin-right: 0;
}
.list .item .img {
  width: 100%;
@@ -38,6 +42,7 @@
}
.footer {
  position: fixed;
  z-index: 99;
  bottom: 0;
  left: 0;
  width: 750rpx;
@@ -70,3 +75,43 @@
  border-radius: 8rpx;
  color: #fff;
}
.param_modal {
  padding: 30rpx 40rpx 12rpx;
}
.param_modal .title {
  text-align: center;
  font-size: 30rpx;
}
.param_modal .line {
  height: 150rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1rpx solid #E5E5E5;
}
.param_modal .line .check {
  width: 40rpx;
  height: 40rpx;
}
.param_modal .line .name {
  font-size: 30rpx;
  color: #111111;
}
.param_modal .line .desc {
  font-size: 26rpx;
  color: #777777;
  margin-top: 20rpx;
}
.param_modal .submit {
  margin-top: 100rpx;
  width: 100%;
  height: 88rpx;
  background: #B08771;
  border-radius: 8rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  font-size: 32rpx;
  color: #FFFFFF;
}
wechat_staff/pages/index/index.js
@@ -6,6 +6,8 @@
  getCustomizedNewsList,
  newsPage
} from '../../api/index'
const { HYEventBus } = require('hy-event-store')
const eventBus = new HYEventBus()
Page({
  data: {
    searchValue: '',
@@ -106,6 +108,20 @@
      url: '/pages/promotion/index',
    })
  },
  funClick(e){
    const i = e.currentTarget.dataset.i
    let map = ['product_intro', 'whole_case', 'real_case']
    if(i == 3){
      wx.navigateTo({
        url: '/pages/consult/consult',
      })
    }else{
      wx.setStorageSync('discoverKey', map[i])
      wx.switchTab({
        url: '/pages/discover/discover',
      })
    }
  },
  jumpProVideo() {
    wx.navigateTo({
      url: '/pages/productVideo/index',
wechat_staff/pages/index/index.wxml
@@ -1,6 +1,5 @@
<view class="container">
  <view style="height: {{clientTop - 2}}px;"></view>
  <buoyClient />
  <view class="search_wrap">
    <image class="icon" src="../../static/home_ic_search@2x.png" mode="widthFix"></image>
    <input model:value="{{ searchValue }}" placeholder="搜索" type="text" />
@@ -30,19 +29,19 @@
  </view>
  <!--  -->
  <view class="func_lsit">
    <view class="item">
    <view data-i="0" bindtap="funClick" class="item">
      <image src="../../static/icon/home_ic_chanpin@2x 2.png"></image>
      <view class="text">产品</view>
    </view>
    <view class="item">
    <view data-i="1" bindtap="funClick" class="item">
      <image src="../../static/icon/home_ic_anli@2x 2.png"></image>
      <view class="text">案例</view>
    </view>
    <view class="item">
    <view data-i="2" bindtap="funClick" class="item">
      <image src="../../static/icon/home_ic_shijing@2x 2.png"></image>
      <view class="text">实景</view>
    </view>
    <view class="item">
    <view data-i="3" bindtap="funClick" class="item">
      <image src="../../static/icon/home_ic_zixun.png"></image>
      <view class="text">资讯</view>
    </view>
wechat_staff/pages/kefu/fond.js
@@ -1,4 +1,5 @@
import moment from "moment";
import { getContentShareImg } from '../../api/index'
Page({
  /**
@@ -6,6 +7,7 @@
   */
  data: {
    bottomLift: 0,
    checkAll: false,
    enjoyList: []
  },
@@ -17,6 +19,11 @@
    this.setData({
      bottomLift: app.bottomLift
    })
    let enjoyList = wx.getStorageSync('enjoyList') || []
    enjoyList.forEach(item => {
      item.checked = false
    })
    wx.setStorageSync('enjoyList', enjoyList)
    this.initData()
  },
@@ -26,10 +33,13 @@
    enjoyList = enjoyList.sort((a,b)=>{
      return b.timestamp - a.timestamp
    })
    let count = 0
    enjoyList.forEach(item  => {
      if(item.checked){
        count++
      }
      item.joinDate = moment(item.timestamp).format('YYYY年MM月DD日')
      item.joinTime = moment(item.timestamp).format('HH:mm')
      item.checked = false
      const index = temp.findIndex( i => i.joinDate === item.joinDate )
      if(index === -1){
        temp.push({
@@ -39,56 +49,153 @@
      }else{
        temp[index].list.push(item)
      }
    });
    })
    this.setData({ checkAll: count === enjoyList.length })
    this.setData({ enjoyList: temp })
    console.log('enjoyList', temp);
  },
  onReady() {
  itemCheck(e){
    const enjoyList = wx.getStorageSync('enjoyList') || []
    const { id } = e.currentTarget.dataset
    console.log(id);
    enjoyList.forEach(item => {
      if(item.id === id){
        item.checked = !item.checked
      }
    })
    wx.setStorageSync('enjoyList', enjoyList)
    this.initData()
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  bind() {
    wx.navigateTo({
      url: '/pages/kefu/select',
    })
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  handleDown() {
    const { enjoyList } = this.data
    let obj = {}
    enjoyList.forEach(item => {
      item.list.forEach(ite => {
        if(ite.checked){
          obj = ite
        }
      })
    })
    console.log('obj', obj);
    let that = this
    getContentShareImg({
      articleId: obj.id + '&' + obj.joinType,
      type: '1',
      // pageUrl: path,
      imgurl: obj.coverImage,
    }).then(res => {
      this.setData({
        isShowPoster: true,
        showShare: false,
        posterUrl: res.data
      })
    })
  },
  saveCard() {
    let that = this
    const posterUrl = this.data.posterUrl
    wx.downloadFile({
      url: posterUrl,
      success: function (res) {
        console.log('下载成功', res);
        wx.saveImageToPhotosAlbum({
          filePath: res.tempFilePath,
          success(result) {
            console.log(result)
            that.setData({
              isShowPoster: false
            })
            wx.showToast({
              title: '保存成功',
              icon: 'success',
              duration: 2000
            })
          }
        })
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
      }
    })
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  batchDown() {
    setTimeout(() => {
      eventBus.emit('batchDown', [1,2,3])
    }, 800)
    wx.navigateTo({
      url: '/pages/download/index',
    })
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  closeCard() {
    this.setData({ isShowPoster: false })
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
  itemDel() {
    let that = this
    let ids = []
    let { enjoyList } = this.data
    enjoyList.forEach(item => {
      item.list.forEach(ite => {
        if(ite.checked){
          ids.push(ite.id)
        }
      })
    })
    if(ids.length === 0) return wx.showToast({
      title: '请先选择要删除的产品',icon: 'none'
    })
    wx.showModal({
      title: '提示',
      content: '你确认要删除该产品吗',
      success (res) {
        if (res.confirm) {
          let enjoyListTemp = wx.getStorageSync('enjoyList') || []
          ids.forEach(item => {
            const index = enjoyListTemp.findIndex(i => i.id == item)
            console.log('index', index);
            if(index > -1){
              enjoyListTemp.splice(index, 1)
            }
          })
          wx.setStorageSync('enjoyList', enjoyListTemp)
          that.initData()
        }
      }
    })
  },
  checkAll() {
    let enjoyList = wx.getStorageSync('enjoyList') || []
    enjoyList.forEach(item => {
      item.checked = !item.checked
    })
    wx.setStorageSync('enjoyList', enjoyList)
    this.initData()
  },
  openShare() {
    let count = 0
    const { enjoyList } = this.data
    enjoyList.forEach(item => {
      item.list.forEach(ite => {
        if(ite.checked){
          count ++
        }
      })
    })
    if(count != 1) return wx.showToast({
      title: '有且只能选择一个产品',icon: 'none'
    })
    this.setData({
      showShare: true
    })
  },
  onClose() {
    console.log('点击关闭');
    this.setData({
      showShare: false
    })
  },
})
wechat_staff/pages/kefu/fond.json
@@ -1,4 +1,6 @@
{
  "usingComponents": {},
  "usingComponents": {
    "van-overlay": "@vant/weapp/overlay/index"
  },
  "navigationBarTitleText": "客户喜欢"
}
wechat_staff/pages/kefu/fond.less
@@ -3,6 +3,7 @@
  padding-bottom: 220rpx;
}
.date_item{
  position: relative;
  .date{
    display: flex;
    font-weight: 500;
@@ -23,6 +24,7 @@
    margin-bottom: 30rpx;
    .icon{
      width: 40rpx;
      height: 40rpx;
    }
    .content{
      flex: 1;
@@ -70,6 +72,7 @@
      width: 160rpx;
      .icon{
        width: 40rpx;
        height: 40rpx;
        margin-right: 18rpx;
      }
    }
@@ -101,4 +104,106 @@
      }
    }
  }
}
.shade_modal{
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 99999;
  background-color: #fff;
  border-radius: 24rpx 24rpx 0rpx 0rpx;
  .btns{
    display: flex;
    height: 264rpx;
    display: flex;
    align-items: center;
    padding: 0 40rpx;
    .item{
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      flex: 1;
      font-size: 26rpx;
      background-color: #fff;
      image{
        width: 80rpx;
        height: 80rpx;
        margin-bottom: 10rpx;
      }
    }
  }
  .cancel{
    height: 100rpx;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1rpx solid #e5e5e5;
  }
}
.shade{
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 1000;
  z-index: 99;
  background-color: rgba(0,0,0,.5);
}
.card_wrap{
  position: fixed;
  border-radius: 8rpx;
  top: 50%;
  left: 75rpx;
  transform: translate(0, -50%);
  width: 600rpx;
  background-color: rgba(0, 0, 0, .2);
  z-index: 99999;
  .img1{
    image{
      width: 600rpx;
      border-radius: 8rpx ;
    }
  }
  .content{
    width: 600rpx;
    height: 308rpx;
    padding: 26rpx 0 40rpx;
    background: rgba(255,255,255,0.8);
    border-radius: 16rpx;
    margin-top: 24rpx;
    text-align: center;
    .title{
      font-weight: 500;
      font-size: 30rpx;
      margin-bottom: 20rpx;
    }
    .line{
      font-size: 26rpx;
      color: #333333;
      line-height: 36rpx;
    }
  }
  .btns{
    margin-top: 30rpx;
    display: flex;
    justify-content: space-between;
    width: 100%;
    .btn{
      width: 160rpx;
      height: 88rpx;
      border-radius: 8rpx;
      border: 2rpx solid #FFFFFF;
      display: flex;
      justify-content: center;
      align-items: center;
      color: #fff;
    }
    .save{
      width: 420rpx;
      margin-left: 20rpx;
      border: none;
      background: linear-gradient( 180deg, #E0B49C 0%, #B68B74 100%);
    }
  }
}
wechat_staff/pages/kefu/fond.wxml
@@ -1,10 +1,10 @@
<view class="container">
  <view wx:for="{{ enjoyList }}" wx:for-item="day" class="date_item">
  <view wx:for="{{ enjoyList }}" wx:for-item="day" wx:for-index="index" class="date_item">
    <view class="date">{{ day.joinDate }}</view>
    <view class="list">
      <view class="line" wx:for="{{ day.list }}" wx:for-item="item">
        <image wx:if="{{ item.check }}" class="icon" src="../../static/icon/ic_select_sel@2x.png" mode="widthFix"></image>
        <image wx:else class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
      <view class="line" wx:for="{{ day.list }}" wx:for-index="inde" wx:for-item="item">
        <image data-id="{{item.id}}"  bindtap="itemCheck" wx:if="{{ item.checked }}" class="icon" src="../../static/icon/ic_select_sel@2x.png"></image>
        <image data-id="{{item.id}}" bindtap="itemCheck" wx:else class="icon" src="../../static/icon/ic_select@2x.png"></image>
        <image class="img" src="{{ item.coverImage }}" mode="aspectFill"></image>
        <view class="content">
          <view class="name">{{ item.title }}</view>
@@ -16,15 +16,52 @@
  <!-- footer -->
  <view class="footer" style="padding-bottom: {{bottomLift}}px;">
    <view class="btns">
      <view class="all_sel">
        <image class="icon" src="../../static/icon/ic_select_sel@2x.png" mode="widthFix"></image>
      <view bindtap="checkAll" class="all_sel">
        <image wx:if="{{ checkAll }}" class="icon" src="../../static/icon/ic_select_sel@2x.png" mode="widthFix"></image>
        <image wx:else class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
        <text>全选</text>
      </view>
      <view class="list">
        <view class="item">删除</view>
        <view class="item paina">关联</view>
        <view class="item primary">分享</view>
        <view bindtap="itemDel" class="item">删除</view>
        <view bindtap="bind" class="item paina">关联</view>
        <view bindtap="openShare" class="item primary">分享</view>
      </view>
    </view>
  </view>
  <!--  -->
  <!--  -->
  <view wx:if="{{ showShare }}" class="shade_modal" style="padding-bottom: {{bottomLift}}px;">
    <view class="btns">
      <button open-type="share" class="item" bindtap="handleShare">
        <image src="../../static/icon/wechat.png"></image>
        <view>小程序分享</view>
      </button>
      <button class="item" bindtap="handleDown">
        <image src="../../static/icon/download.png"></image>
        <view>下载海报</view>
      </button>
    </view>
    <view bindtap="onClose" class="cancel">取消</view>
  </view>
  <van-overlay z-index="99998" show="{{ showShare }}" bind:click="onClose" />
  <!--  -->
  <view wx:if="{{ isShowPoster }}" class="card_wrap">
    <view class="img1">
      <image mode="widthFix" src="{{posterUrl}}"></image>
    </view>
    <view class="content">
      <view class="title">—— 分享话术 ——</view>
      <view class="line">{{ rightIcon }}精品案例{{ leftIcon }}</view>
      <view class="line">🥇精益求精,品质生活🥇</view>
      <view class="line">汇集全国优秀设计师获奖案例</view>
      <view class="line">👉各种风格灵感案例上万套👈</view>
      <view class="line">总有一套能打动您,适合您</view>
    </view>
    <view class="btns">
      <view class="btn" bind:tap="closeCard">取消</view>
      <view class="btn save" bind:tap="saveCard">复制话术并保存海报</view>
    </view>
  </view>
  <van-overlay z-index="99998" show="{{ isShowPoster }}" bind:click="onClickHide" />
</view>
wechat_staff/pages/kefu/fond.wxss
@@ -2,6 +2,9 @@
  background-color: #f7f7f7;
  padding-bottom: 220rpx;
}
.date_item {
  position: relative;
}
.date_item .date {
  display: flex;
  font-weight: 500;
@@ -23,6 +26,7 @@
}
.date_item .line .icon {
  width: 40rpx;
  height: 40rpx;
}
.date_item .line .content {
  flex: 1;
@@ -71,6 +75,7 @@
}
.footer .btns .all_sel .icon {
  width: 40rpx;
  height: 40rpx;
  margin-right: 18rpx;
}
.footer .btns .list {
@@ -100,3 +105,102 @@
  border: 1rpx solid var(--themeColor);
  background-color: var(--themeColor);
}
.shade_modal {
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 99999;
  background-color: #fff;
  border-radius: 24rpx 24rpx 0rpx 0rpx;
}
.shade_modal .btns {
  height: 264rpx;
  display: flex;
  align-items: center;
  padding: 0 40rpx;
}
.shade_modal .btns .item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  font-size: 26rpx;
  background-color: #fff;
}
.shade_modal .btns .item image {
  width: 80rpx;
  height: 80rpx;
  margin-bottom: 10rpx;
}
.shade_modal .cancel {
  height: 100rpx;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1rpx solid #e5e5e5;
}
.shade {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 1000;
  z-index: 99;
  background-color: rgba(0, 0, 0, 0.5);
}
.card_wrap {
  position: fixed;
  border-radius: 8rpx;
  top: 50%;
  left: 75rpx;
  transform: translate(0, -50%);
  width: 600rpx;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 99999;
}
.card_wrap .img1 image {
  width: 600rpx;
  border-radius: 8rpx ;
}
.card_wrap .content {
  width: 600rpx;
  height: 308rpx;
  padding: 26rpx 0 40rpx;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16rpx;
  margin-top: 24rpx;
  text-align: center;
}
.card_wrap .content .title {
  font-weight: 500;
  font-size: 30rpx;
  margin-bottom: 20rpx;
}
.card_wrap .content .line {
  font-size: 26rpx;
  color: #333333;
  line-height: 36rpx;
}
.card_wrap .btns {
  margin-top: 30rpx;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.card_wrap .btns .btn {
  width: 160rpx;
  height: 88rpx;
  border-radius: 8rpx;
  border: 2rpx solid #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}
.card_wrap .btns .save {
  width: 420rpx;
  margin-left: 20rpx;
  border: none;
  background: linear-gradient(180deg, #E0B49C 0%, #B68B74 100%);
}
wechat_staff/pages/kefu/select.js
@@ -1,4 +1,4 @@
import { getCustomerList, getCrmAuthUrl } from '../../api/index'
import { getCustomerList, getCrmAuthUrl, batchAddLike } from '../../api/index'
const { HYEventBus } = require('hy-event-store')
const eventBus = new HYEventBus()
Page({
@@ -11,6 +11,7 @@
    keyWords: '',
    dataList: [],
    customer: {},
    total: 0,
    flag: 0,
    page: 1,
@@ -27,12 +28,29 @@
      bottomLift: app.bottomLift
    })
    this.getList()
  },
  },
  handleSub() {
    const { customer } = this.data
    const enjoyList = wx.getStorageSync('enjoyList') || []
    if(!customer.userId) return wx.showToast({
      title: '请先选择要关联的客户', icon: 'none'
    })
    batchAddLike({
      articleIds: enjoyList.filter(i => i.checked).map(i => i.id).join(','),
      customerId: customer.userId
    })
  },
  tabsClick(e) {
    const flag = e.currentTarget.dataset.tab
    this.setData({flag})
    this.setData({total: 0,dataList: [], page: 1})
    this.getList()
  },
  itemCheck(e) {
    const item = e.currentTarget.dataset.item
    console.log('item', item);
    this.setData({ customer: item })
  },
  reloadList() {
    this.setData({total: 0,dataList: [], page: 1})
@@ -72,21 +90,6 @@
        url: '/pages/webView/index?link=' + res.data,
      })
    }) 
  },
  handleSub() {
    console.log('点击饿了');
    wx.canvasToTempFilePath({
      x: 100,
      y: 200,
      width: 50,
      height: 50,
      destWidth: 100,
      destHeight: 100,
      canvasId: 'myCanvas',
      success(res) {
        console.log(res.tempFilePath)
      }
    })
  },
  onReady() {
wechat_staff/pages/kefu/select.less
@@ -98,6 +98,7 @@
    }
    .icon{
      width: 40rpx;
      height: 40rpx;
      margin-right: 30rpx;
    }
    .avatar{
wechat_staff/pages/kefu/select.wxml
@@ -23,8 +23,8 @@
      <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 data-item="{{ item }}" bindtap="itemCheck" wx:if="{{ customer.userId == item.userId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
            <image wx:else data-item="{{ item }}" bindtap="itemCheck" class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
            <image class="avatar" src="../../static/images/default_avatar.png"></image>
          </view>
          <!--  -->
wechat_staff/pages/kefu/select.wxss
@@ -99,6 +99,7 @@
}
.list .item .icon {
  width: 40rpx;
  height: 40rpx;
  margin-right: 30rpx;
}
.list .item .avatar {
wechat_staff/pages/store/staff.wxml
@@ -2,7 +2,7 @@
  <back />
  <image src="../../static/images/design_banner@2x.png" mode="widthFix" class="bg_wrap"></image>
  <view class="container">
    <image class="avatar" src="{{userInfo.imgurlFull}}"></image>
    <image class="avatar" src="{{userInfo.imgurlFull ? userInfo.imgurlFull : '../../static/images/default_avatar.png'}}"></image>
    <view class="name_wrap">
      <view class="left">
        <view class="name">{{userInfo.name}}</view>
@@ -56,7 +56,7 @@
  <van-popup show="{{ isShow }}" closeable round bind:close="onClose">
    <view class="modal">
      <view class="header">
        <image class="avatar" src="{{userInfo.imgurlFull}}"></image>
        <image class="avatar" src="{{userInfo.imgurlFull ? userInfo.imgurlFull : '../../static/images/default_avatar.png'}}"></image>
        <view class="content">
          <view class="name">{{userInfo.name}}</view>
          <view class="desc">导购 | {{userInfo.jobDate ||'0'}}年经验</view>
wechat_staff/pages/webView/index.wxml
@@ -1,3 +1 @@
<web-view wx:if="{{linkUrl !=null && linkUrl !=''}}" src="{{linkUrl}}"> </web-view>
 <web-view wx:if="{{linkUrl !=null && linkUrl !=''}}" src="{{linkUrl}}"> </web-view>
wechat_staff/pages/work/index.wxml
@@ -2,7 +2,7 @@
<view class="topbg" style="background-image:url('{{topimg}}');background-color: aquamarine;">
  <view class="navbar" style="padding-top: {{ clientTop }}px;height: {{clientHeight + clientTop}}px;">工作台</view>
  <view class="userinfo" data-index="0" bindtap="changePath">
    <image class="avatar" src="{{userInfo.imgurlFull}}"></image>
    <image class="avatar" src="{{userInfo.imgurlFull ? userInfo.imgurlFull : '../../static/images/default_avatar.png'}}"></image>
    <view class="content" >
      <view class="header">
        <view class="name">{{userInfo.name}}</view>
wechat_staff/project.private.config.json
@@ -38,7 +38,7 @@
        },
        {
          "name": "",
          "pathName": "pages/kefu/select",
          "pathName": "pages/webView/index",
          "query": "",
          "launchMode": "default",
          "scene": null
wechat_staff/static/icon/ic_select.png
wechat_staff/static/icon/ic_select_sel.png
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 = 'http://192.168.0.135:10027'
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/'