Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
| | |
| | | ZTCusCarouselImageResponse carouselImageDetail(ZTDataDetailRequest param); |
| | | ZTBasePageResponse<ZTCollectLikeInfoResponse> collectLikePage(ZTCollectLikeRequest param); |
| | | ZTBaseResponse batchAddLike(ZTBatchAddListRequest param); |
| | | ZTBaseResponse customerBinDingUsers(ZTCustomerBindingUsersRequest param); |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public ZTBaseResponse customerBinDingUsers(ZTCustomerBindingUsersRequest param){ |
| | | ZTBaseResponse result = sendHttpRequest( |
| | | ZTConstants.IntegerUrl.CUSTOMER_BINDING_USERS, |
| | | ZTConstants.IntegerName.CUSTOMER_BINDING_USERS_NAME, |
| | | param.getToken(), |
| | | param.getUserType(), |
| | | JSONObject.toJSONString(param ), |
| | | new TypeReference<ZTBaseResponse<Object>>(){}); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | String REALCASE_INFO_URL ="/content/api/realCaseDetail"; |
| | | String FAVORITES_PAGE_URL ="/behavior/api/favoritesPageList"; |
| | | String BATCH_ADD_LIKE_URL ="/content/api/batchAddLike"; |
| | | String CUSTOMER_BINDING_USERS ="/api/bind"; |
| | | |
| | | |
| | | } |
| | |
| | | String FAVORITES_NAME ="è·åæç忬¢/æ¶èå表"; |
| | | |
| | | String BATCH_ADD_LIKE_NAME ="æ¹éç»å®å欢ç»å®¢æ·"; |
| | | String CUSTOMER_BINDING_USERS_NAME ="客æ·ç»å®å¯¼è´"; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.biz.zbom.model.zhongtai.response; |
| | | |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTBaseRequst; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * 客æ·ç»å®åå·¥ä¿¡æ¯ |
| | | */ |
| | | @Data |
| | | public class ZTCustomerBindingUsersRequest extends ZTBaseRequst { |
| | | |
| | | |
| | | /** |
| | | * åå¸ |
| | | */ |
| | | private String address; |
| | | /** |
| | | * å¹´é¾ |
| | | */ |
| | | private String age; |
| | | /** |
| | | * åºç¨ç |
| | | */ |
| | | private String appCode; |
| | | /** |
| | | * AppID |
| | | */ |
| | | private String appId; |
| | | /** |
| | | * 客æ·å¤´å |
| | | */ |
| | | private String avatarUrl; |
| | | /** |
| | | * çæ¥ |
| | | */ |
| | | private String birthday; |
| | | /** |
| | | * å®¢æ·æ¸ 鿥æºç¼ç |
| | | */ |
| | | private String channelSourceCode; |
| | | /** |
| | | * 客æ·åä½ |
| | | */ |
| | | private String customerCompany; |
| | | /** |
| | | * 客æ·çº§å« |
| | | */ |
| | | private String customerLevel; |
| | | /** |
| | | * å®¢æ·æå±è¡ä¸ |
| | | */ |
| | | private String customerTrade; |
| | | /** |
| | | * 导è´è´¦å· |
| | | */ |
| | | private String daoGouAccount; |
| | | /** |
| | | * 导è´ç±»å |
| | | */ |
| | | private String daoGouType; |
| | | /** |
| | | * 导è´ç¨æ·Id |
| | | */ |
| | | private String daoGouUserId; |
| | | /** |
| | | * çµåé®ç®± |
| | | */ |
| | | private String email; |
| | | /** |
| | | * 详ç»å°å |
| | | */ |
| | | private String fullAddress; |
| | | /** |
| | | * æ§å« |
| | | */ |
| | | private String gender; |
| | | /** |
| | | * æ¿å±é¢ç§¯ |
| | | */ |
| | | private String houseArea; |
| | | /** |
| | | * æ¿å±æ·å |
| | | */ |
| | | private String houseLayout; |
| | | /** |
| | | * èº«ä»½è¯ |
| | | */ |
| | | private String idCard; |
| | | /** |
| | | * åç§° |
| | | */ |
| | | private String name; |
| | | /** |
| | | * æµç§° |
| | | */ |
| | | private String nickName; |
| | | /** |
| | | * OpenID |
| | | */ |
| | | private String openId; |
| | | /** |
| | | * ææºå·ç |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * å¹³å°ç±»å |
| | | */ |
| | | private String platform; |
| | | /** |
| | | * 平尿¥æº 1-pad 2-å°ç¨åº |
| | | */ |
| | | private String platSource; |
| | | /** |
| | | * èä¸ |
| | | */ |
| | | private String position; |
| | | /** |
| | | * æå产åç¼ç ï¼ç¨éå·éå¼ |
| | | */ |
| | | private String productCode; |
| | | /** |
| | | * æ¨è人 |
| | | */ |
| | | private String referee; |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * æ¥æºç³»ç»å®¢æ·ID |
| | | */ |
| | | private String sourceCustomerId; |
| | | /** |
| | | * ååºç¨ç |
| | | */ |
| | | private String subAppCode; |
| | | /** |
| | | * ä¸å°ç¨æ·å¯ä¸ç¼ç |
| | | */ |
| | | private String token; |
| | | /** |
| | | * UnionID |
| | | */ |
| | | private String unionId; |
| | | /** |
| | | * å°åº |
| | | */ |
| | | private String uptown; |
| | | /** |
| | | * CMSè´¦å· |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * å¾®ä¿¡å· |
| | | */ |
| | | private String weixin; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | void batchAddLike(ZTBatchAddListRequest param); |
| | | |
| | | /** |
| | | * ä¸å° 客æ·ç»å®å¯¼è´ |
| | | * @param ztCustomerBindingUsersRequest |
| | | */ |
| | | void customerBinDingUsers(ZTCustomerBindingUsersRequest ztCustomerBindingUsersRequest); |
| | | } |
| | |
| | | PageData<CustomerLog> pageData = PageData.from(customerLogMapper.selectJoinPage(page,CustomerLog.class, queryWrapper)); |
| | | for (CustomerLog customerLog:pageData.getRecords()) { |
| | | if(Objects.nonNull(pageWrap.getModel().getIsHiddenPhone())&& Constants.equalsInteger(pageWrap.getModel().getIsHiddenPhone(),Constants.ZERO)){ |
| | | customerLog.setPhone( |
| | | Constants.desensitizationPhone(customerLog.getPhone()) |
| | | ); |
| | | customerLog.setPhone(Constants.desensitizationPhone(customerLog.getPhone())); |
| | | if(Constants.equalsInteger(customerLog.getType(),Constants.TWO)&& StringUtils.isNotBlank(customerLog.getMemberName())){ |
| | | customerLog.setName(customerLog.getMemberName()); |
| | | } |
| | |
| | | ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType()); |
| | | ztContentListRequest.setId(id); |
| | | ZTProductInfoResponse response = zbomZhongTaiService.getProductInfo(ztContentListRequest); |
| | | if(Objects.nonNull(response)){ |
| | | if(Objects.nonNull(response)&&userType.equals(ZTConstants.CUSTOMER)){ |
| | | //æ¥è¯¢å¯¼è´ä¿¡æ¯ è¿è¡ä¿¡æ¯ç»å®ä¸è¿å |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | | if(Objects.nonNull(users)){ |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,userId); |
| | | Member member = memberMapper.selectById(userId); |
| | | if(Objects.nonNull(users)&&Objects.nonNull(member)&&StringUtils.isNotBlank(member.getOpenid())){ |
| | | MemberServiceImpl.saveCustomerUser(zbomZhongTaiService,customerUserMapper,users,userId,member.getOpenid()); |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | |
| | | ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType()); |
| | | ztContentListRequest.setId(id); |
| | | ZTCaseInfoResponse response = zbomZhongTaiService.getWholecaseInfo(ztContentListRequest); |
| | | if(Objects.nonNull(response)){ |
| | | // if(StringUtils.isNotBlank(response.getPanorama())){ |
| | | // response.setPanorama( |
| | | // response.getPanorama().replace("https://720.","https://720-3.").replace("https://720-2.","https://720-3.") |
| | | // ); |
| | | // } |
| | | if(Objects.nonNull(response)&&userType.equals(ZTConstants.CUSTOMER)){ |
| | | //æ¥è¯¢å¯¼è´ä¿¡æ¯ è¿è¡ä¿¡æ¯ç»å®ä¸è¿å |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | | if(Objects.nonNull(users)){ |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,userId); |
| | | Member member = memberMapper.selectById(userId); |
| | | if(Objects.nonNull(users)&&Objects.nonNull(member)&&StringUtils.isNotBlank(member.getOpenid())){ |
| | | MemberServiceImpl.saveCustomerUser(zbomZhongTaiService,customerUserMapper,users,userId,member.getOpenid()); |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | |
| | | ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType()); |
| | | ztContentListRequest.setId(id); |
| | | ZTProductNewsInfoResponse response = zbomZhongTaiService.getProductNewsInfo(ztContentListRequest); |
| | | if(Objects.nonNull(response)){ |
| | | if(Objects.nonNull(response)&&userType.equals(ZTConstants.CUSTOMER)){ |
| | | //æ¥è¯¢å¯¼è´ä¿¡æ¯ è¿è¡ä¿¡æ¯ç»å®ä¸è¿å |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | | if(Objects.nonNull(users)){ |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,userId); |
| | | Member member = memberMapper.selectById(userId); |
| | | if(Objects.nonNull(users)&&Objects.nonNull(member)&&StringUtils.isNotBlank(member.getOpenid())){ |
| | | MemberServiceImpl.saveCustomerUser(zbomZhongTaiService,customerUserMapper,users,userId,member.getOpenid()); |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | |
| | | ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType()); |
| | | ztContentListRequest.setId(id); |
| | | ZTRealcaseInfoResponse response = zbomZhongTaiService.getRealcaseInfo(ztContentListRequest); |
| | | if(Objects.nonNull(response)){ |
| | | if(Objects.nonNull(response)&&userType.equals(ZTConstants.CUSTOMER)){ |
| | | //æ¥è¯¢å¯¼è´ä¿¡æ¯ è¿è¡ä¿¡æ¯ç»å®ä¸è¿å |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | | if(Objects.nonNull(users)){ |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,userId); |
| | | Member member = memberMapper.selectById(userId); |
| | | if(Objects.nonNull(users)&&Objects.nonNull(member)&&StringUtils.isNotBlank(member.getOpenid())){ |
| | | MemberServiceImpl.saveCustomerUser(zbomZhongTaiService,customerUserMapper,users,userId,member.getOpenid()); |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | |
| | | zbomZhongTaiService.batchAddLike(ztBatchAddListRequest); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void customerBinDingUsers(ZTCustomerBindingUsersRequest ztCustomerBindingUsersRequest){ |
| | | if(Objects.isNull(ztCustomerBindingUsersRequest) |
| | | || StringUtils.isBlank(ztCustomerBindingUsersRequest.getOpenId()) |
| | | || StringUtils.isBlank(ztCustomerBindingUsersRequest.getUserId()) |
| | | || StringUtils.isBlank(ztCustomerBindingUsersRequest.getSourceCustomerId()) |
| | | || StringUtils.isBlank(ztCustomerBindingUsersRequest.getDaoGouAccount()) |
| | | || StringUtils.isBlank(ztCustomerBindingUsersRequest.getDaoGouType()) |
| | | || StringUtils.isBlank(ztCustomerBindingUsersRequest.getDaoGouUserId()) |
| | | || StringUtils.isBlank(ztCustomerBindingUsersRequest.getUserName()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | //æ¥è¯¢ ä¸å° |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz, |
| | | Long.valueOf(ztCustomerBindingUsersRequest.getUserId()),ztCustomerBindingUsersRequest.getUserType()); |
| | | ztCustomerBindingUsersRequest.setToken(ztBaseInfoResponse.getToken()); |
| | | zbomZhongTaiService.customerBinDingUsers(ztCustomerBindingUsersRequest); |
| | | } |
| | | } |
| | |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTUserGetTokenRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTUserInfoUpdateRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.response.ZTBaseResponse; |
| | | import com.doumee.biz.zbom.model.zhongtai.response.ZTCustomerBindingUsersRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.response.ZTSysuserGetTokenResponse; |
| | | import com.doumee.biz.zbom.model.zhongtai.response.ZTUserGetTokenResponse; |
| | | import com.doumee.config.Jwt.JwtPayLoad; |
| | |
| | | member.setToken(ztUserGetTokenResponse.getToken()); |
| | | } |
| | | memberMapper.insert(member); |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,member.getId()); |
| | | MemberServiceImpl.saveCustomerUser(zbomZhongTaiService,customerUserMapper,users,member.getId(),member.getOpenid()); |
| | | }else{ |
| | | ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(member); |
| | | if(!Objects.isNull(ztUserGetTokenResponse)){ |
| | | member.setToken(ztUserGetTokenResponse.getToken()); |
| | | memberMapper.updateById(member); |
| | | } |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,member.getId()); |
| | | MemberServiceImpl.saveCustomerUser(zbomZhongTaiService,customerUserMapper,users,member.getId(),member.getOpenid()); |
| | | member = this.getMemberInfo(member.getId()); |
| | | } |
| | | String token = JwtTokenUtil.generateTokenForZb(member.getId(),ZTConstants.CUSTOMER, JSONObject.toJSON(member).toString(),redisTemplate); |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"微信ç»å½å¼å¸¸ï¼è¯·è系管çå"); |
| | | } |
| | | |
| | | public static void saveCustomerUser(CustomerUserMapper customerUserMapper,Users users,Long memberId){ |
| | | public static void saveCustomerUser(ZbomZhongTaiService zbomZhongTaiService,CustomerUserMapper customerUserMapper,Users users,Long memberId,String openId){ |
| | | if(Objects.nonNull(users)&&Objects.nonNull(memberId)) { |
| | | if (customerUserMapper.selectCount(new QueryWrapper<CustomerUser>().lambda() |
| | | .eq(CustomerUser::getIsdeleted, Constants.ZERO) |
| | |
| | | customerUser.setUsername(users.getIamUsername()); |
| | | customerUser.setAddr(users.getShopAddress()); |
| | | customerUserMapper.insert(customerUser); |
| | | //TODO çå¾
è°èµ·ä¸å°æ¥å£ |
| | | //çå¾
è°èµ·ä¸å°æ¥å£ |
| | | ZTCustomerBindingUsersRequest ztCustomerBindingUsersRequest = new ZTCustomerBindingUsersRequest(); |
| | | ztCustomerBindingUsersRequest.setOpenId(openId); |
| | | ztCustomerBindingUsersRequest.setSourceCustomerId(memberId.toString()); |
| | | ztCustomerBindingUsersRequest.setDaoGouUserId(users.getId().toString()); |
| | | ztCustomerBindingUsersRequest.setDaoGouAccount(users.getIamUsername()); |
| | | ztCustomerBindingUsersRequest.setDaoGouType(users.getUserTypes()); |
| | | ztCustomerBindingUsersRequest.setUserName(users.getIamId()); |
| | | ztCustomerBindingUsersRequest.setPlatSource(ZTConstants.PLATFORM_MP_WX); |
| | | zbomZhongTaiService.customerBinDingUsers(ztCustomerBindingUsersRequest); |
| | | } |
| | | } |
| | | } |
| | |
| | | .eq(News::getType,Constants.ZERO) |
| | | .eq(News::getStatus,Constants.ZERO) |
| | | .eq(News::getFileType,Constants.ZERO) |
| | | .apply(" now() >= t.PUBLISH_DATE ") |
| | | .last( "limit 3" ) |
| | | .orderByDesc(News::getCreateDate) |
| | | ); |
| | |
| | | Shop shop = shopMapper.selectById(users.getDepartmentId()); |
| | | if(Objects.nonNull(shop)){ |
| | | users.setShopName(shop.getName()); |
| | | if(!(StringUtils.isBlank(shop.getProvinceName())||StringUtils.isBlank(shop.getCityName())||StringUtils.isBlank(shop.getAreaName()))){ |
| | | users.setShopCity(shop.getProvinceName()+shop.getCityName()+shop.getAreaName()); |
| | | } |
| | | if(StringUtils.isNotBlank(shop.getAddress())){ |
| | | users.setShopAddress(shop.getAddress()); |
| | | }else{ |
| | | users.setShopAddress(shop.getProvinceName()+shop.getCityName()+shop.getAreaName()+shop.getTown()+shop.getRegAddr()); |
| | | if(!(StringUtils.isBlank(shop.getProvinceName())||StringUtils.isBlank(shop.getCityName())||StringUtils.isBlank(shop.getAreaName()))){ |
| | | users.setShopAddress(shop.getProvinceName()+shop.getCityName()+shop.getAreaName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | activeParam: [], |
| | | selParam: '', |
| | | tagCodes: [], |
| | | |
| | | isLoading :false, |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | |
| | | }) |
| | | }, |
| | | getList() { |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | this.setData({isLoading:true}) |
| | | const { sortType, query, tagCodes, pageNum, pageSize, catalogCode } = this.data |
| | | getZhongTaiWholecasePage({ |
| | | catalogCode, pageNum, pageSize, tagCodes, sortType, query |
| | |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | }) |
| | | } |
| | | }).finally(()=>{ |
| | | this.setData({isLoading:false}) |
| | | }) |
| | | }, |
| | | scrolltolower() { |
| | |
| | | }) |
| | | }, |
| | | tagClick(e) { |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { cateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | |
| | | if (index === -1) { |
| | | // å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) |
| | | cateList[activeIndex].paramIndex = paramIndex |
| | | cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName |
| | | // // å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) |
| | | cateList[activeIndex].tempParamIndex = paramIndex |
| | | cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | cateList[activeIndex].tempParamCode = code |
| | | } else { |
| | | tagCodes.splice(index, 1) |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | // tagCodes.splice(index, 1) |
| | | cateList[activeIndex].tempParamIndex = -1 |
| | | cateList[activeIndex].tempParamName = null |
| | | cateList[activeIndex].tempParamCode = null |
| | | } |
| | | this.setData({ pageNum: 1, dataList: [], total: 0 }) |
| | | this.setData({ tagCodes, cateList }) |
| | | // this.setData({ pageNum: 1, dataList: [], total: 0 }) |
| | | this.setData({cateList }) |
| | | console.log('tagCodes', tagCodes) |
| | | }, |
| | | cancelParam() { |
| | | |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = item.paramName || '' |
| | | item.tempParamIndex =item.paramIndex |
| | | item.tempParamName =item.paramName |
| | | item.tempParamCode =item.paramCode |
| | | }) |
| | | this.setData({ tagCodes: [], activeParam: [], cateList, activeIndex: -1 }) |
| | | this.setData({ activeParam: [],cateList , activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1, dataList: [], total: 0 }) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1, activeIndex: -1, dataList: [], total: 0 }) |
| | | const { cateList } = this.data |
| | | var codes = [] |
| | | cateList.forEach(item => { |
| | | item.paramIndex =item.tempParamIndex |
| | | item.paramName =item.tempParamName |
| | | item.paramCode =item.tempParamCode |
| | | if(item.paramIndex >-1 && item.paramCode){ |
| | | codes.push(item.paramCode) |
| | | } |
| | | }) |
| | | this.setData({tagCodes:codes, pageNum: 1, activeIndex: -1, dataList: [], total: 0 }) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e) { |
| | |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | | <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.paramName || item.labelName }}</view> |
| | | <view class="name">{{ item.tempParamName || item.labelName }}</view> |
| | | <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- param --> |
| | | <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param"> |
| | | <view class="list"> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | |
| | | activeParam: [], |
| | | selParam: '', |
| | | tagCodes: [], |
| | | |
| | | isLoading:false, |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | |
| | | }) |
| | | }, |
| | | getList() { |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | this.setData({isLoading:true}) |
| | | const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data |
| | | getZhongTaiRealcasePage({ |
| | | catalogCode,tagCodes,pageNum,pageSize, sortType,query |
| | |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | total: res.data.total, |
| | | }) |
| | | }).finally(()=>{ |
| | | this.setData({isLoading:false}) |
| | | }) |
| | | }, |
| | | scrolltoupper() { |
| | |
| | | } |
| | | }, |
| | | tagClick(e) { |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { cateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | |
| | | if(index === -1){ |
| | | if(activeParam && activeParam.length > 0){ |
| | | activeParam.forEach(item => { |
| | | const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | if(indexTemp > -1){ |
| | | tagCodes.splice(indexTemp, 1) |
| | | } |
| | | }) |
| | | } |
| | | tagCodes.push(code) |
| | | cateList[activeIndex].paramIndex = paramIndex |
| | | cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName |
| | | // if(activeParam && activeParam.length > 0){ |
| | | // activeParam.forEach(item => { |
| | | // const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | // if(indexTemp > -1){ |
| | | // tagCodes.splice(indexTemp, 1) |
| | | // } |
| | | // }) |
| | | // } |
| | | // tagCodes.push(code) |
| | | cateList[activeIndex].tempParamIndex = paramIndex |
| | | cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | cateList[activeIndex].tempParamCode = code |
| | | }else{ |
| | | tagCodes.splice(index, 1) |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | // tagCodes.splice(index, 1) |
| | | cateList[activeIndex].tempParamIndex = -1 |
| | | cateList[activeIndex].tempParamName = null |
| | | cateList[activeIndex].tempParamCode = null |
| | | } |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ tagCodes, cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | // this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ cateList }) |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | item.tempParamIndex = item.paramIndex |
| | | item.tempParamName = item.paramName |
| | | item.tempParamCode = item.paramCode |
| | | }) |
| | | this.setData({ tagCodes: [],datalist:[],pageNum:1, activeParam: [],cateList,activeIndex: -1 }) |
| | | this.getList() |
| | | this.setData({ activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | const { cateList } = this.data |
| | | var codes =[] |
| | | cateList.forEach(item => { |
| | | item.paramIndex = item.tempParamIndex |
| | | item.paramName = item.tempParamName |
| | | item.paramCode = item.tempParamCode |
| | | if(item.tempParamIndex >-1 && item.tempParamCode){ |
| | | codes.push(item.tempParamCode) |
| | | } |
| | | }) |
| | | this.setData({ activeParam: [],tagCodes:codes }) |
| | | this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | | <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.paramName || item.labelName }}</view> |
| | | <view class="name">{{ item.tempParamName || item.labelName }}</view> |
| | | <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- param --> |
| | | <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param"> |
| | | <view class="list"> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | |
| | | total: res.data.total, |
| | | dataList: [ ...this.data.dataList, ...res.data.records ] |
| | | }) |
| | | }).finally(()=>{ |
| | | wx.stopPullDownRefresh() |
| | | }) |
| | | }, |
| | | itemClick(e) { |
| | |
| | | margin-top: 8rpx; |
| | | font-weight: 600; |
| | | font-size: 40rpx; |
| | | display: flex; |
| | | display: flex; |
| | | align-items: flex-end; /* è¿ä¼ä½¿åå
ç´ åºé¨å¯¹é½ */ |
| | | justify-content: center; /* è¿ä¼ä½¿åå
ç´ æ°´å¹³å±
ä¸ */ |
| | | } |
| | | } |
| | | } |
| | |
| | | margin-top: 8rpx; |
| | | font-weight: 600; |
| | | font-size: 40rpx; |
| | | display: flex; |
| | | display: flex; |
| | | align-items: flex-end; /* è¿ä¼ä½¿åå
ç´ åºé¨å¯¹é½ */ |
| | | justify-content: center; /* è¿ä¼ä½¿åå
ç´ æ°´å¹³å±
ä¸ */ |
| | | } |
| | | .guide .title { |
| | | font-weight: 500; |
| | |
| | | selParam: '', |
| | | tagCodes: [], |
| | | |
| | | |
| | | isLoading:false, |
| | | cateList: [], |
| | | dataList: [], |
| | | total: 0, |
| | |
| | | }) |
| | | }, |
| | | getList() { |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | |
| | | this.setData({isLoading:true}) |
| | | const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data |
| | | getZhongTaiWholecasePage({ |
| | | catalogCode,pageNum,pageSize,tagCodes, sortType,query |
| | |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | }) |
| | | } |
| | | }).finally(()=>{ |
| | | this.setData({isLoading:false}) |
| | | }) |
| | | }, |
| | | scrolltolower() { |
| | |
| | | }) |
| | | }, |
| | | tagClick(e) { |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { cateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | |
| | | if(index === -1){ |
| | | // å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) |
| | | cateList[activeIndex].paramIndex = paramIndex |
| | | cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName |
| | | }else{ |
| | | tagCodes.splice(index, 1) |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | if(index === -1){ |
| | | cateList[activeIndex].tempParamIndex = paramIndex |
| | | cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | cateList[activeIndex].tempParamCode = code |
| | | } else { |
| | | cateList[activeIndex].tempParamIndex = -1 |
| | | cateList[activeIndex].tempParamName = null |
| | | cateList[activeIndex].tempParamCode = null |
| | | } |
| | | this.setData({ tagCodes, cateList }) |
| | | this.setData({cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | console.log('cateList', cateList); |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = item.paramName || '' |
| | | item.tempParamIndex =item.paramIndex |
| | | item.tempParamName =item.paramName |
| | | item.tempParamCode =item.paramCode |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | this.setData({ activeParam: [],cateList , activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0}) |
| | | const { cateList } = this.data |
| | | var codes = [] |
| | | cateList.forEach(item => { |
| | | item.paramIndex =item.tempParamIndex |
| | | item.paramName =item.tempParamName |
| | | item.paramCode =item.tempParamCode |
| | | if(item.paramIndex >-1 && item.paramCode){ |
| | | codes.push(item.paramCode) |
| | | } |
| | | }) |
| | | this.setData({tagCodes:codes, pageNum: 1, activeIndex: -1, dataList: [], total: 0 }) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | | <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.paramName || item.labelName }}</view> |
| | | <view class="name">{{ item.tempParamName || item.labelName }}</view> |
| | | <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- param --> |
| | | <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param"> |
| | | <view class="list"> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | |
| | | activeParam: [], |
| | | selParam: '', |
| | | tagCodes: [], |
| | | |
| | | isLoading:false, |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | |
| | | }) |
| | | }, |
| | | getList() { |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | |
| | | this.setData({isLoading:true}) |
| | | const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data |
| | | getZhongTaiRealcasePage({ |
| | | catalogCode,tagCodes,pageNum,pageSize, sortType,query |
| | |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | total: res.data.total, |
| | | }) |
| | | }).finally(()=>{ |
| | | this.setData({isLoading:false}) |
| | | }) |
| | | }, |
| | | scrolltolower() { |
| | |
| | | } |
| | | }, |
| | | tagClick(e) { |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { cateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | |
| | | if(index === -1){ |
| | | if(activeParam && activeParam.length > 0){ |
| | | activeParam.forEach(item => { |
| | | const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | if(indexTemp > -1){ |
| | | tagCodes.splice(indexTemp, 1) |
| | | } |
| | | }) |
| | | } |
| | | tagCodes.push(code) |
| | | cateList[activeIndex].paramIndex = paramIndex |
| | | cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName |
| | | // if(activeParam && activeParam.length > 0){ |
| | | // activeParam.forEach(item => { |
| | | // const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | // if(indexTemp > -1){ |
| | | // tagCodes.splice(indexTemp, 1) |
| | | // } |
| | | // }) |
| | | // } |
| | | // tagCodes.push(code) |
| | | cateList[activeIndex].tempParamIndex = paramIndex |
| | | cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | cateList[activeIndex].tempParamCode = code |
| | | }else{ |
| | | tagCodes.splice(index, 1) |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | cateList[activeIndex].tempParamIndex = -1 |
| | | cateList[activeIndex].tempParamName = null |
| | | cateList[activeIndex].tempParamCode = null |
| | | } |
| | | this.setData({ tagCodes, cateList }) |
| | | this.setData({ cateList }) |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = item.paramName || '' |
| | | item.tempParamIndex = item.paramIndex |
| | | item.tempParamName = item.paramName |
| | | item.tempParamCode = item.paramCode |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | this.setData({ activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | const { cateList } = this.data |
| | | var codes =[] |
| | | cateList.forEach(item => { |
| | | item.paramIndex = item.tempParamIndex |
| | | item.paramName = item.tempParamName |
| | | item.paramCode = item.tempParamCode |
| | | if(item.tempParamIndex >-1 && item.tempParamCode){ |
| | | codes.push(item.tempParamCode) |
| | | } |
| | | }) |
| | | this.setData({ activeParam: [],tagCodes:codes }) |
| | | this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | |
| | | font-weight: 600; |
| | | font-size: 40rpx; |
| | | display: flex; |
| | | align-items: flex-end; /* è¿ä¼ä½¿åå
ç´ åºé¨å¯¹é½ */ |
| | | justify-content: center; /* è¿ä¼ä½¿åå
ç´ æ°´å¹³å±
ä¸ */ |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | <view class="card"> |
| | | <image src="../../static/images/mingpian_bg_kehu.png" class="bg"></image> |
| | | <view>æå¡å®¢æ·</view> |
| | | <view class="num" wx:if="{{ userInfo.costomerNum || userInfo.costomerNum == 0 }}">{{ userInfo.costomerNum || '--' }}+</view> |
| | | <view class="num" wx:if="{{ userInfo.costomerNum || userInfo.costomerNum == 0 }}">{{ userInfo.costomerNum || '--' }}+ |
| | | </view> |
| | | <view wx:else class="num">--</view> |
| | | </view> |
| | | </view> |
| | |
| | | font-size: 26rpx; |
| | | color: #999999; |
| | | text-align: center; |
| | | align-items: flex-end; /* è¿ä¼ä½¿åå
ç´ åºé¨å¯¹é½ */ |
| | | justify-content: center; /* è¿ä¼ä½¿åå
ç´ æ°´å¹³å±
ä¸ */ |
| | | |
| | | } |
| | | .card_wrap { |
| | | position: fixed; |