Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | void dealCustomerLogData(CustomerLog customerLog); |
| | | String zbomEncode(String str); |
| | | String getCrmGoUrl(String userName,Integer type); |
| | | String getCrmGoUrl(String userName,Integer type,String iamId); |
| | | |
| | | CRMBaseResponse<List<CRMCustomerListResponse>> getCustomerList(CrmCustomerListRequest entity ); |
| | | CRMBaseResponse<List<CRMDaogouBindListResponse>> getDaogouBindList(CrmDaogouBindListRequest entity ); |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.biz.zbom.ZbomCRMService; |
| | | import com.doumee.biz.zbom.model.crm.*; |
| | | import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse; |
| | |
| | | import com.doumee.dao.business.CustomerLogMapper; |
| | | import com.doumee.dao.business.model.CrmInterfaceLog; |
| | | import com.doumee.dao.business.model.CustomerLog; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Users; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.codec.digest.DigestUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.logging.log4j.util.Base64Util; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.Base64Utils; |
| | | |
| | | import javax.crypto.Cipher; |
| | | import javax.crypto.spec.IvParameterSpec; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | |
| | | private CrmInterfaceLogMapper crmInterfaceLogMapper; |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String getCrmGoUrl(String userName,Integer type){ |
| | | public String getCrmGoUrl(String userName,Integer type,String iamId){ |
| | | try { |
| | | // å建StringBufferå¯¹è±¡ç¨æ¥æä½å符串 |
| | | int _t = (int)(System.currentTimeMillis()); |
| | | String pageKey ="mp";//客æ·å表页é¢ç |
| | | String fileUrl = systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL_MP).getCode(); |
| | | if(Constants.equalsInteger(type,Constants.ONE)){ |
| | | pageKey = "mpAddIntention";//æ°å¢æå页é¢ç |
| | | fileUrl = systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL_MP_ADDINTENTION).getCode(); |
| | | } |
| | | String appkey = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_AUTH_API_KEY); |
| | | String url = redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_API_URL) |
| | | +CRMConstants.IntegerUrl.GO_CRM_AUTH_URL |
| | | + "?timestamp="+_t |
| | | +"&agent_phone_number=" + URLEncoder.encode(userName, "UTF-8") |
| | | + "&bindKey="+pageKey+"&sign="+ DigestUtils.md5Hex( _t + appkey);; |
| | | + "?bindKey="+pageKey |
| | | + "&tick=" + this.getTick(iamId, fileUrl); |
| | | return url; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"è·å跳转å°å失败å¦ï¼"); |
| | | } |
| | | |
| | | public String getTick(String iamId, String fileUrL) throws UnsupportedEncodingException { |
| | | Map<String,Object> map = new HashMap<>(); |
| | | //ç¨æ·IAMä¸»é® |
| | | map.put("ssouserid",iamId); |
| | | //å®åå°ç¨åºappid |
| | | map.put("appid",systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_IAM_BUSINESS_APPID).getCode()); |
| | | //跳转å°å |
| | | map.put("rediUrl",fileUrL); |
| | | //æ¶é´æ³ |
| | | map.put("timestamp",System.currentTimeMillis()/1000+""); |
| | | //C端å°ç¨åºappid |
| | | map.put("sourceappid",systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_IAM_CUSTOMER_APPID).getCode()); |
| | | System.out.println(JSONObject.toJSONString(map)); |
| | | //è·åtick |
| | | String tick = ZbomCRMServiceImpl.encrypt( |
| | | systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL_PRIVATE_KEY).getCode() |
| | | ,JSONObject.toJSONString(map) |
| | | ,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL_INIT_VECTOR).getCode()); |
| | | |
| | | String tickEncoder = URLEncoder.encode(tick,"UTF-8"); |
| | | |
| | | return tickEncoder; |
| | | } |
| | | |
| | | |
| | | public static String encrypt(String key, String value,String initVector) { |
| | | try { |
| | | IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8")); |
| | | SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES"); |
| | | Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING"); |
| | | cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv); |
| | | byte[] encrypted = cipher.doFinal(value.getBytes()); |
| | | return Base64Utils.encodeToString(encrypted); |
| | | } |
| | | catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | String POST_CUS_DATA_URL ="/api/public/zbom/postCusData"; |
| | | String CUS_BEFORE_PAGE_LIST_URL ="/api/public/mini/program/cusOrBeforeList"; |
| | | String DAOGOU_BIND_LIST_URL ="/api/public/mini/program/list"; |
| | | String GO_CRM_AUTH_URL ="/oauth/authorize/jump"; |
| | | String GO_CRM_AUTH_URL = "/oauth/authorize";//"/oauth/authorize/jump"; |
| | | |
| | | } |
| | | public interface IntegerName{ |
| | |
| | | @ApiModelProperty(value = "æ ç¾å¼æåº") |
| | | private String labelValueSort; |
| | | |
| | | @ApiModelProperty(value = "åæ ç¾ä¿¡æ¯") |
| | | private List<ZTTagInfoResponse> relLabel; |
| | | } |
| | |
| | | public static final String WX_TOKEN_CUSTOMER = "WX_TOKEN_CUSTOMER"; |
| | | public static final String WX_TOKEN_PERSONNEL = "WX_TOKEN_PERSONNEL"; |
| | | public static final String ZBOM_CRM_POSTCUS_API_KEY = "ZBOM_CRM_POSTCUS_API_KEY"; |
| | | public static final String ZBOM_CRM_API_URL_MP = "ZBOM_CRM_API_URL_MP"; |
| | | public static final String ZBOM_CRM_API_URL_MP_ADDINTENTION = "ZBOM_CRM_API_URL_MP_ADDINTENTION"; |
| | | public static final String ZBOM_CRM_API_URL_PRIVATE_KEY = "ZBOM_CRM_API_URL_PRIVATE_KEY"; |
| | | public static final String ZBOM_CRM_API_URL_INIT_VECTOR = "ZBOM_CRM_API_URL_INIT_VECTOR"; |
| | | public static final String ZBOM_IAM_CUSTOMER_APPID = "ZBOM_IAM_CUSTOMER_APPID"; |
| | | public static final String ZBOM_IAM_BUSINESS_APPID = "ZBOM_IAM_BUSINESS_APPID"; |
| | | |
| | | |
| | | public interface RedisKeys { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.wx; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2022/12/7 17:27 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class SendWxMessage { |
| | | |
| | | private static String programUrl = "packagesMine/meetingDetails/meetingDetails?id="; |
| | | |
| | | |
| | | public void testMessage(String openid,String token){ |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | log.info("微信å°ç¨åº ä¼è®®å¼å§è®¢é
æ¶æ¯åéæ¥å¿ -> accessTokenï¼{}",token); |
| | | //è¿éç®åèµ·è§æä»¬æ¯æ¬¡é½è·åææ°çaccess_tokenï¼æ¶é´å¼åä¸ï¼åºè¯¥å¨access_tokenå¿«è¿ææ¶åéæ°è·åï¼ |
| | | String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+token; |
| | | //æ¼æ¥æ¨éçæ¨¡ç |
| | | WxMsgVO wxMsgVo = new WxMsgVO(); |
| | | //ç¨æ·çopenidï¼è¦åéç»é£ä¸ªç¨æ·ï¼ |
| | | wxMsgVo.setTouser(openid); |
| | | //订é
æ¶æ¯æ¨¡æ¿id |
| | | wxMsgVo.setTemplate_id("A_jEWoyl0Uu_l5J-zwlwx_FcbUirlsS6Peu4JW6a7Gc"); |
| | | Map<String, TemplateData> m = new HashMap<>(2); |
| | | //ä¼è®®ä¸»é¢ |
| | | m.put("thing1", new TemplateData("忥æ°å®¢æ·å¦ï¼")); |
| | | |
| | | //ä¼è®®å°ç¹ |
| | | m.put("character_string6", new TemplateData("zhangsan01")); |
| | | wxMsgVo.setData(m); |
| | | ResponseEntity<String> responseEntity = |
| | | restTemplate.postForEntity(url, wxMsgVo, String.class); |
| | | log.info("微信å°ç¨åº-> åæ¶éç¥è®¢é
æ¶æ¯å鿥å¿ï¼{}",JSONObject.toJSONString(responseEntity)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // /** |
| | | // * è·åtoken |
| | | // */ |
| | | // private static String getAccessToken() { |
| | | // //åé请æ±è·åtoken |
| | | // JSONObject token = null; |
| | | // try { |
| | | // token = JSONObject.parseObject(HttpsUtil.get(APP_ACCESS_TOKEN_URL,false)); |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // JSONObject jsonObject = token; |
| | | // String accessToken = (String) jsonObject.get("access_token"); |
| | | // Integer expiresIn = (Integer) jsonObject.get("expires_in"); |
| | | // //å建token对象ï¼å¹¶åå¨ |
| | | // return new AccessToken(accessToken,String.valueOf(expiresIn)).getAccessToken(); |
| | | // } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.wx; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2022/12/7 17:28 |
| | | */ |
| | | @Data |
| | | public class TemplateData { |
| | | private String value; |
| | | |
| | | public TemplateData(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.wx; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2022/12/7 17:27 |
| | | */ |
| | | @Data |
| | | public class WxMsgVO { |
| | | //ç¨æ·openId |
| | | private String touser; |
| | | //模çid |
| | | private String template_id; |
| | | //æ¨éæå |
| | | private Map<String , TemplateData> data; |
| | | //è·³è½¬è·¯å¾ ï¼é»è®¤è·³è½¬å°å°ç¨åºé¦é¡µ |
| | | private String page="pages/index/index"; |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.wx.SendWxMessage; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.reqeust.*; |
| | | import com.doumee.dao.web.response.AccountResponse; |
| | |
| | | ZTBasePageResponse<ZTCollectLikeInfoResponse> ztBasePageResponse= getZhongTaiDataService.collectLikePage(ztCollectLikeRequest); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztBasePageResponse); |
| | | } |
| | | |
| | | @ApiOperation(value = "æµè¯åéå¾®ä¿¡æ¶æ¯", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/testSendWxMessage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "openid", value = "å°ç¨åºid", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "token", value = "token", required = true), |
| | | }) |
| | | public ApiResponse testSendWxMessage(@RequestParam String openid,@RequestParam String token) { |
| | | SendWxMessage sendWxMessage = new SendWxMessage(); |
| | | sendWxMessage.testMessage(openid,token); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.News; |
| | | import com.doumee.dao.business.model.Users; |
| | | import com.doumee.dao.web.reqeust.GenerateQRCodeRequest; |
| | | import com.doumee.dao.web.response.DailyUpdatesResponse; |
| | | import com.doumee.dao.web.response.ZSZXCatalogResponse; |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "ç±»å 0客æ·å表 1跳转æ°å¢æå客æ·", required = true) |
| | | }) |
| | | public ApiResponse<String> getCrmAuthUrl(@RequestParam Integer type) { |
| | | return ApiResponse.success(zbomCRMService.getCrmGoUrl(this.getLoginUserInfo().getIamUsername(),type)); |
| | | Users users = this.getLoginUserInfo(); |
| | | return ApiResponse.success(zbomCRMService.getCrmGoUrl(users.getIamUsername(),type,users.getIamId())); |
| | | } |
| | | |
| | | |
| | |
| | | tagClick(e) { |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { secondCateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | console.log('code', code) |
| | | console.log('tagCodes', tagCodes) |
| | | console.log(secondCateList) |
| | | const { |
| | | secondCateList, |
| | | tagCodes, |
| | | activeParam, |
| | | activeIndex |
| | | } = this.data |
| | | // ç¹å»åæ ç¾ |
| | | console.log('openRelLabel', secondCateList[activeIndex].openRelLabel); |
| | | if (secondCateList[activeIndex].openRelLabel) { |
| | | if (secondCateList[activeIndex].tempParamRelIndex == null || secondCateList[activeIndex].tempParamRelIndex != paramIndex) { |
| | | secondCateList[activeIndex].tempParamRelIndex = paramIndex |
| | | secondCateList[activeIndex].tempParamRelCode = code |
| | | secondCateList[activeIndex].tempParamRelName = activeParam[paramIndex].labelValueName |
| | | } else { |
| | | secondCateList[activeIndex].tempParamRelIndex = -1 |
| | | secondCateList[activeIndex].tempParamRelCode = '' |
| | | secondCateList[activeIndex].tempParamRelName = '' |
| | | } |
| | | console.log('secondCateList', secondCateList); |
| | | } else { |
| | | // ç¹å»ç¶æ ç¾ |
| | | const relLabel = secondCateList[activeIndex].valueVos[paramIndex].relLabel || [] |
| | | if (relLabel.length > 0 && relLabel[0].labelCode) { |
| | | secondCateList[activeIndex].relLabel = relLabel[0] |
| | | }else{ |
| | | secondCateList[activeIndex].relLabel = null |
| | | } |
| | | secondCateList[activeIndex].tempParamRelIndex = -1 |
| | | secondCateList[activeIndex].tempParamRelCode = '' |
| | | secondCateList[activeIndex].tempParamRelName = '' |
| | | if ( secondCateList[activeIndex].tempParamIndex==null || secondCateList[activeIndex].tempParamIndex != paramIndex) { |
| | | // åparamécodeéå¤ |
| | | // if (activeParam && activeParam.length > 0) { |
| | | // activeParam.forEach(item => { |
| | | // const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | // if (indexTemp > -1) { |
| | | // tagCodes.splice(indexTemp, 1) |
| | | // } |
| | | // }) |
| | | // } |
| | | //tagCodes.push(code) |
| | | secondCateList[activeIndex].tempParamIndex = paramIndex |
| | | secondCateList[activeIndex].tempParamCode = code |
| | | secondCateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | } else { |
| | | // tagCodes.splice(index, 1) |
| | | secondCateList[activeIndex].tempParamIndex = -1 |
| | | secondCateList[activeIndex].tempParamCode = '' |
| | | secondCateList[activeIndex].tempParamName = '' |
| | | } |
| | | this.setData({secondCateList }) |
| | | } |
| | | this.setData({ |
| | | tagCodes, |
| | | secondCateList |
| | | }) |
| | | }, |
| | | changeShowParams(e) { |
| | | const { secondCateList } = this.data |
| | | const { |
| | | secondCateList, |
| | | activeParam |
| | | } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | console.log('activeIndex', activeIndex) |
| | | console.log('secondCateList', secondCateList) |
| | | if (activeIndex === this.data.activeIndex) { |
| | | this.setData({ activeIndex: -1, activeParam: [] }) |
| | | const type = e.currentTarget.dataset.type || '' |
| | | // console.log('activeIndex', activeIndex); |
| | | // é对æåéçlabel |
| | | if (type && type == 'child') { |
| | | if (secondCateList[activeIndex].openRelLabel) { |
| | | secondCateList[activeIndex].openRelLabel = false |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: [], |
| | | secondCateList |
| | | }) |
| | | } else { |
| | | secondCateList[activeIndex].openRelLabel = true |
| | | this.setData({ |
| | | activeParam: secondCateList[activeIndex].relLabel.valueVos, |
| | | secondCateList, |
| | | activeIndex |
| | | }) |
| | | } |
| | | return |
| | | } |
| | | // éåéçlabel |
| | | secondCateList[activeIndex].openRelLabel = false |
| | | this.setData({ secondCateList }) |
| | | if (activeIndex === this.data.activeIndex && activeParam.length > 0) { |
| | | this.setData({ |
| | | activeIndex: -1, |
| | | activeParam: [] |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: secondCateList[activeIndex].valueVos |
| | | }) |
| | | } |
| | | // this.setData({showTwo: false}) |
| | | }, |
| | | cancelParam() { |
| | | const { secondCateList } = this.data |
| | | const { |
| | | secondCateList |
| | | } = this.data |
| | | secondCateList.forEach(item => { |
| | | item.tempParamIndex = item.paramIndex |
| | | item.tempParamName = item.paramName |
| | | item.tempParamCode = item.paramCode |
| | | item.relLabel = null |
| | | item.openRelLabel = false |
| | | item.tempParamRelIndex = null |
| | | item.tempParamRelCode = null |
| | | item.tempParamRelName = null |
| | | }) |
| | | // this.setData({ tagCodes: [], activeParam: [], secondCateList, activeIndex: -1 }) |
| | | this.setData({ activeParam: [],activeIndex: -1 ,secondCateList}) |
| | | this.setData({ |
| | | activeParam: [], |
| | | activeIndex: -1, |
| | | secondCateList |
| | | }) |
| | | }, |
| | | subParam() { |
| | | const { secondCateList } = this.data |
| | | const { |
| | | secondCateList |
| | | } = this.data |
| | | var codes = [] |
| | | secondCateList.forEach(item => { |
| | | item.paramIndex = item.tempParamIndex |
| | | item.paramName = item.tempParamName |
| | | item.paramCode = item.tempParamCode |
| | | item.openRelLabel = false |
| | | if(item.tempParamRelIndex > -1 && item.tempParamRelCode){ |
| | | return codes.push(item.tempParamRelCode) |
| | | } |
| | | if( item.paramIndex>-1 && item.tempParamCode){ |
| | | codes.push( item.tempParamCode) |
| | | codes.push(item.paramCode) |
| | | } |
| | | }) |
| | | this.setData({tagCodes:codes}) |
| | | this.setData({ pageNum: 1, activeParam: [] ,activeIndex: -1, datalist: [], total: 0 }) |
| | | this.setData({ |
| | | tagCodes: codes |
| | | }) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | activeParam: [], |
| | | activeIndex: -1, |
| | | datalist: [], |
| | | total: 0 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | } |
| | |
| | | <view class="main_right"> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | | <view data-index="{{index}}" wx:for="{{ secondCateList }}" class="item" bindtap="changeShowParams"> |
| | | <block wx:for="{{ secondCateList }}"> |
| | | <view class="item" data-index="{{index}}" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.tempParamName || item.labelName }}</view> |
| | | <van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" /> |
| | | <van-icon name="{{ index == activeIndex && !item.openRelLabel && activeParam.length > 0 ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view wx:if="{{item.relLabel && item.relLabel.labelCode}}" data-type="child" data-index="{{index}}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.tempParamRelName || item.relLabel.labelName }}</view> |
| | | <van-icon name="{{ index == activeIndex && item.openRelLabel && activeParam.length > 0? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | </scroll-view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="query_form"> |
| | | <view class="list"> |
| | | <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ (!secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamIndex === index) || (secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamRelIndex === index) ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | |
| | | */ |
| | | data: { |
| | | agreementFalg: false, |
| | | tempPath: '', |
| | | primary: '', |
| | | bottomLift: 0, |
| | | |
| | |
| | | phone: res.data |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | const tempPath = wx.getStorageSync('tempPath') || '' |
| | | const { tempPath } = this.data |
| | | wx.setStorageSync('member', res.data) |
| | | if (tempPath) { |
| | | wx.setStorageSync('tempPath', '') |
| | | if (tempPath == '/pages/webView/index') { |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | |
| | | }, |
| | | onLoad(options) { |
| | | var app = getApp().globalData |
| | | |
| | | this.setData({ |
| | | primary: app.primary |
| | | }) |
| | | this.initData() |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | const tempPath = wx.getStorageSync('tempPath') || '' |
| | | this.setData({tempPath}) |
| | | setTimeout(() => { |
| | | wx.setStorageSync('tempPath', '') |
| | | }) |
| | | |
| | | }, |
| | | |
| | |
| | | info |
| | | } = this.data |
| | | console.log('ç¹å»äºå享') |
| | | if(info.users && info.users.id){ |
| | | return { |
| | | path: '/pages/detailDis/case?id=' + info.id + '&userId=' + info.users.id |
| | | } |
| | | }else{ |
| | | return { |
| | | path: '/pages/detailDis/case?id=' + info.id |
| | | } |
| | | } |
| | | }, |
| | | handleAction(e) { |
| | | const actionType = e.currentTarget.dataset.code |
| | |
| | | origin: '', |
| | | isFold: false, |
| | | info: {}, |
| | | isCollection: false, |
| | | member: {}, |
| | | showShare: false, |
| | | options: { |
| | |
| | | }, |
| | | handleAction(e) { |
| | | const actionType = e.currentTarget.dataset.code |
| | | const { |
| | | info, member |
| | | let { |
| | | info, member, isCollection |
| | | } = this.data |
| | | if (!member.phone) { |
| | | return wx.navigateTo({ |
| | |
| | | id: this.data.info.id |
| | | }).then(res => { |
| | | info.isCollection = !info.isCollection |
| | | isCollection = !isCollection |
| | | this.setData({ |
| | | info |
| | | isCollection |
| | | }) |
| | | wx.showToast({ |
| | | title: actionType == 'collect' ? 'æ¶èæå' : 'åæ¶æ¶è', |
| | |
| | | salesId: userId || null |
| | | }).then(res => { |
| | | this.setData({ |
| | | info: res.data |
| | | info: res.data, |
| | | isCollection: res.data.isCollection |
| | | }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | |
| | | onShareAppMessage: function () { |
| | | let { info } = this.data |
| | | console.log('ç¹å»äºå享') |
| | | if(info.users && info.users.id){ |
| | | return { |
| | | path: '/pages/detailDis/product?id=' + info.id + '&userId=' + info.users.id |
| | | } |
| | | }else{ |
| | | return { |
| | | path: '/pages/detailDis/product?id=' + info.id |
| | | } |
| | | } |
| | | }, |
| | | onClose() { |
| | | this.setData({ |
| | |
| | | <view class="spaceList"> |
| | | <view class="item" wx:for="{{ info.spaceList }}"> |
| | | <!-- <view class="name">{{ item.spaceName }}</view> --> |
| | | <image data-url="{{ item.spaceImg }}" bindtap="priviewSpace" src="{{ item.spaceImg }}" mode="widthFix" class="img"></image> |
| | | <!-- <mp-html content="{{item.spaceContent}}"></mp-html> --> |
| | | <!-- <image data-url="{{ item.spaceImg }}" bindtap="priviewSpace" src="{{ item.spaceImg }}" mode="widthFix" class="img"></image> --> |
| | | <mp-html content="{{item.spaceContent}}"></mp-html> |
| | | </view> |
| | | </view> |
| | | <!-- footer --> |
| | |
| | | </view> |
| | | <view wx:else class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button hover-class="none" data-code="{{ info.isCollection ? 'collect_cancel' : 'collect' }}" bindtap="handleAction" class="item btn"> |
| | | <image wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <button hover-class="none" data-code="{{ isCollection ? 'collect_cancel' : 'collect' }}" bindtap="handleAction" class="item btn"> |
| | | <image wx:if="{{ isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </button> |
| | |
| | | // this.setData({showShare: false}) |
| | | // }) |
| | | }, |
| | | // onShareAppMessage: function () { |
| | | // // let { productDetail, userInfo } = this.data |
| | | // return { |
| | | // title: productDetail.title, |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | onClose() { |
| | | this.setData({ |
| | | showShare: false |
| | |
| | | info |
| | | } = this.data |
| | | console.log('ç¹å»äºå享') |
| | | if(info.users && info.users.id){ |
| | | return { |
| | | path: '/pages/detailDis/realpic?id=' + info.id + '&userId=' + info.users.id |
| | | } |
| | | }else{ |
| | | return { |
| | | path: '/pages/detailDis/realpic?id=' + info.id |
| | | } |
| | | } |
| | | }, |
| | | }) |
| | |
| | | windowHeight: windowInfo.windowHeight |
| | | }) |
| | | }) |
| | | }, 2000) |
| | | }, 3000) |
| | | }, |
| | | onShow() { |
| | | const member = wx.getStorageSync('member') |
| | |
| | | |
| | | |
| | | |
| | | // export const baseUrl = 'http://192.168.0.135:10027' // æ¬å° |
| | | // export const baseUrl = 'http://192.168.0.136:10027' // æ¬å° |
| | | // export const baseUrl = 'https://dmtest.ahapp.net/web_interface' //æµè¯æå¡å¨ |
| | | |
| | | // æµè¯æå¡å¨ |
| | |
| | | export const saveShareRecord = (data) => { |
| | | return request({ |
| | | url: '/web/customer/saveShareRecord?id='+data, |
| | | data |
| | | data, |
| | | loading: '0' |
| | | }) |
| | | } |
| | | // 产åè§é¢ |
| | |
| | | import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index' |
| | | import { |
| | | getCatalogList, |
| | | getCataLogTagList, |
| | | getZhongTaiProductPage |
| | | } from '../../api/index' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | |
| | | var app = getApp() |
| | | console.log('globalData', app.globalData); |
| | | if(app.globalData.catalogCode){ |
| | | this.setData({ catalogCode: app.globalData.catalogCode }) |
| | | this.setData({ |
| | | catalogCode: app.globalData.catalogCode |
| | | }) |
| | | setTimeout(() => { |
| | | console.log('catalogCode', this.data.catalogCode); |
| | | getApp().globalData.catalogCode = '' |
| | |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.setData({ |
| | | showTouch: true |
| | | }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | |
| | | if(touchDot - touchMove > 24){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.setData({ |
| | | showTouch: true |
| | | }) |
| | | this.fadeIn(); |
| | | }, 200) |
| | | } |
| | |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | this.setData({ |
| | | showTouch: false |
| | | }); |
| | | }, 200); // å¨ç»æç»æ¶é´ |
| | | }, |
| | | refreshCount(){ |
| | |
| | | } |
| | | } |
| | | }) |
| | | this.setData({datalist:dataList}) |
| | | this.setData({ |
| | | datalist: dataList |
| | | }) |
| | | wx.setStorageSync('conentCountTemp',null) |
| | | } |
| | | }, |
| | |
| | | }, |
| | | bindblur() { |
| | | console.log('失å»ç¦ç¹'); |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | datalist: [], |
| | | total: 0 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | getList() { |
| | | const { catalogCode,tagCodes, pageNum, pageSize, sortType, query } = this.data |
| | | const { |
| | | catalogCode, |
| | | tagCodes, |
| | | pageNum, |
| | | pageSize, |
| | | sortType, |
| | | query |
| | | } = this.data |
| | | getZhongTaiProductPage({ |
| | | catalogCode,pageNum,pageSize,sortType,query,tagCodes |
| | | catalogCode, |
| | | pageNum, |
| | | pageSize, |
| | | sortType, |
| | | query, |
| | | tagCodes |
| | | }).then(res => { |
| | | if(res.data && res.data.records){ |
| | | this.setData({ |
| | |
| | | }) |
| | | } |
| | | }).finally(()=>{ |
| | | this.setData({isLoading:false}) |
| | | this.setData({ |
| | | isLoading: false |
| | | }) |
| | | }) |
| | | }, |
| | | scrolltolower() { |
| | | console.log('触åºäºä»¶'); |
| | | const { total, datalist, pageNum } = this.data |
| | | const { |
| | | total, |
| | | datalist, |
| | | pageNum |
| | | } = this.data |
| | | if(total > datalist.length){ |
| | | this.setData({ pageNum: pageNum + 1 }) |
| | | this.setData({ |
| | | pageNum: pageNum + 1 |
| | | }) |
| | | this.getList() |
| | | }else{ |
| | | wx.showToast({ |
| | |
| | | } |
| | | }, |
| | | cateClick(e) { |
| | | var {isLoading} = this.data |
| | | var { |
| | | isLoading |
| | | } = this.data |
| | | if(isLoading){ |
| | | return |
| | | } |
| | | this.setData({isLoading:true}) |
| | | this.setData({ |
| | | isLoading: true |
| | | }) |
| | | const catalogCode = e.currentTarget.dataset.code |
| | | this.setData({ catalogCode, tagCodes: [] }) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ |
| | | catalogCode, |
| | | tagCodes: [] |
| | | }) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | datalist: [], |
| | | total: 0 |
| | | }) |
| | | this.getTag() |
| | | this.getList() |
| | | }, |
| | | statusChange(e) { |
| | | const sortType = e.currentTarget.dataset.status |
| | | this.setData({sortType}) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ |
| | | sortType |
| | | }) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | datalist: [], |
| | | total: 0 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | handleDetail(e) { |
| | |
| | | tagClick(e) { |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { secondCateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const { |
| | | secondCateList, |
| | | tagCodes, |
| | | activeParam, |
| | | activeIndex |
| | | } = this.data |
| | | // ç¹å»åæ ç¾ |
| | | console.log('openRelLabel', secondCateList[activeIndex].openRelLabel); |
| | | if (secondCateList[activeIndex].openRelLabel) { |
| | | if (secondCateList[activeIndex].tempParamRelIndex == null || secondCateList[activeIndex].tempParamRelIndex != paramIndex) { |
| | | secondCateList[activeIndex].tempParamRelIndex = paramIndex |
| | | secondCateList[activeIndex].tempParamRelCode = code |
| | | secondCateList[activeIndex].tempParamRelName = activeParam[paramIndex].labelValueName |
| | | } else { |
| | | secondCateList[activeIndex].tempParamRelIndex = -1 |
| | | secondCateList[activeIndex].tempParamRelCode = '' |
| | | secondCateList[activeIndex].tempParamRelName = '' |
| | | } |
| | | console.log('secondCateList', secondCateList); |
| | | } else { |
| | | // ç¹å»ç¶æ ç¾ |
| | | const relLabel = secondCateList[activeIndex].valueVos[paramIndex].relLabel || [] |
| | | if (relLabel.length > 0 && relLabel[0].labelCode) { |
| | | secondCateList[activeIndex].relLabel = relLabel[0] |
| | | }else{ |
| | | secondCateList[activeIndex].relLabel = null |
| | | } |
| | | secondCateList[activeIndex].tempParamRelIndex = -1 |
| | | secondCateList[activeIndex].tempParamRelCode = '' |
| | | secondCateList[activeIndex].tempParamRelName = '' |
| | | if( secondCateList[activeIndex].tempParamIndex==null || secondCateList[activeIndex].tempParamIndex != paramIndex){ |
| | | // åparamécodeéå¤ |
| | | // if (activeParam && activeParam.length > 0) { |
| | | // activeParam.forEach(item => { |
| | | // const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | // if (indexTemp > -1) { |
| | | // tagCodes.splice(indexTemp, 1) |
| | | // } |
| | | // }) |
| | | // } |
| | | //tagCodes.push(code) |
| | | secondCateList[activeIndex].tempParamIndex = paramIndex |
| | | secondCateList[activeIndex].tempParamCode = code |
| | | secondCateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | } else { |
| | | // tagCodes.splice(index, 1) |
| | | secondCateList[activeIndex].tempParamIndex = -1 |
| | | secondCateList[activeIndex].tempParamCode = '' |
| | | secondCateList[activeIndex].tempParamName = '' |
| | | } |
| | | this.setData({ tagCodes, secondCateList }) |
| | | } |
| | | this.setData({ |
| | | tagCodes, |
| | | secondCateList |
| | | }) |
| | | }, |
| | | changeShowParams(e){ |
| | | const { secondCateList } = this.data |
| | | const { |
| | | secondCateList, |
| | | activeParam |
| | | } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | console.log('activeIndex', activeIndex); |
| | | console.log('activeIndex', this.data.activeIndex); |
| | | console.log('secondCateList', secondCateList); |
| | | if(activeIndex === this.data.activeIndex){ |
| | | this.setData({ activeIndex: -1, activeParam: [] }) |
| | | const type = e.currentTarget.dataset.type || '' |
| | | // console.log('activeIndex', activeIndex); |
| | | // é对æåéçlabel |
| | | if (type && type == 'child') { |
| | | if (secondCateList[activeIndex].openRelLabel) { |
| | | secondCateList[activeIndex].openRelLabel = false |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: [], |
| | | secondCateList |
| | | }) |
| | | } else { |
| | | secondCateList[activeIndex].openRelLabel = true |
| | | this.setData({ |
| | | activeParam: secondCateList[activeIndex].relLabel.valueVos, |
| | | secondCateList, |
| | | activeIndex |
| | | }) |
| | | } |
| | | return |
| | | } |
| | | // éåéçlabel |
| | | secondCateList[activeIndex].openRelLabel = false |
| | | this.setData({ secondCateList }) |
| | | if (activeIndex === this.data.activeIndex && activeParam.length > 0) { |
| | | this.setData({ |
| | | activeIndex: -1, |
| | | activeParam: [] |
| | | }) |
| | | }else{ |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: secondCateList[activeIndex].valueVos |
| | | }) |
| | | } |
| | | console.log('activeParam', this.data.activeParam); |
| | | // this.setData({showTwo: false}) |
| | | }, |
| | | cancelParam() { |
| | | const { secondCateList } = this.data |
| | | const { |
| | | secondCateList |
| | | } = this.data |
| | | secondCateList.forEach(item => { |
| | | item.tempParamIndex = item.paramIndex |
| | | item.tempParamName = item.paramName |
| | | item.tempParamCode = item.paramCode |
| | | item.relLabel = null |
| | | item.openRelLabel = false |
| | | item.tempParamRelIndex = null |
| | | item.tempParamRelCode = null |
| | | item.tempParamRelName = null |
| | | }) |
| | | // this.setData({ tagCodes: [], activeParam: [], secondCateList, activeIndex: -1 }) |
| | | this.setData({ activeParam: [],activeIndex: -1 ,secondCateList}) |
| | | this.setData({ |
| | | activeParam: [], |
| | | activeIndex: -1, |
| | | secondCateList |
| | | }) |
| | | }, |
| | | subParam() { |
| | | const { secondCateList } = this.data |
| | | const { |
| | | secondCateList |
| | | } = this.data |
| | | var codes = [] |
| | | secondCateList.forEach(item => { |
| | | item.paramIndex = item.tempParamIndex |
| | | item.paramName = item.tempParamName |
| | | item.paramCode = item.tempParamCode |
| | | item.openRelLabel = false |
| | | if(item.tempParamRelIndex > -1 && item.tempParamRelCode){ |
| | | return codes.push(item.tempParamRelCode) |
| | | } |
| | | if( item.paramIndex>-1 && item.tempParamCode){ |
| | | codes.push( item.tempParamCode) |
| | | codes.push(item.paramCode) |
| | | } |
| | | }) |
| | | this.setData({tagCodes:codes}) |
| | | this.setData({ pageNum: 1, activeParam: [] ,activeIndex: -1, datalist: [], total: 0 }) |
| | | this.setData({ |
| | | tagCodes: codes |
| | | }) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | activeParam: [], |
| | | activeIndex: -1, |
| | | datalist: [], |
| | | total: 0 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | } |
| | |
| | | <view class="main_right"> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | | <view data-index="{{index}}" wx:for="{{ secondCateList }}" class="item" bindtap="changeShowParams"> |
| | | <block wx:for="{{ secondCateList }}"> |
| | | <view class="item" data-index="{{index}}" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.tempParamName || item.labelName }}</view> |
| | | <van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" /> |
| | | <van-icon name="{{ index == activeIndex && !item.openRelLabel && activeParam.length > 0 ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view wx:if="{{item.relLabel && item.relLabel.labelCode}}" data-type="child" data-index="{{index}}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.tempParamRelName || item.relLabel.labelName }}</view> |
| | | <van-icon name="{{ index == activeIndex && item.openRelLabel && activeParam.length > 0? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | </scroll-view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="query_form"> |
| | | <view class="list"> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ (!secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamIndex === index) || (secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamRelIndex === index) ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | |
| | | current: 0, |
| | | id: '', |
| | | info: {}, |
| | | spaceList: [], |
| | | member: {}, |
| | | showShare: false, |
| | | isFold: false, |
| | |
| | | this.setData({ current: e.detail.current }) |
| | | }, |
| | | priviewSpace(e) { |
| | | return |
| | | const url = e.currentTarget.dataset.url |
| | | const { |
| | | info |
| | |
| | | }).then(res => { |
| | | const index = enjoyList.findIndex( i =>(res.data && i.id === res.data.id) ) |
| | | this.setData({ |
| | | spaceList: res.data.spaceList || [], |
| | | info: { |
| | | ...res.data, |
| | | isEnjoy: index > -1 |
| | |
| | | <mp-html content="{{info.content}}"></mp-html> |
| | | </view> |
| | | <view class="spaceList"> |
| | | <view data-url="{{ item.spaceImg }}" bindtap="priviewSpace" class="item" wx:for="{{ info.spaceList }}"> |
| | | <view data-url="{{ item.spaceImg }}" bindtap="priviewSpace" class="item" wx:for="{{ spaceList }}"> |
| | | <!-- <view class="name">{{ item.spaceName }}</view> --> |
| | | <image src="{{ item.spaceImg }}" mode="widthFix" class="img"></image> |
| | | <!-- <mp-html content="{{item.spaceContent}}"></mp-html> --> |
| | | <!-- <image src="{{ item.spaceImg }}" mode="widthFix" class="img"></image> --> |
| | | <mp-html content="{{item.spaceContent}}"></mp-html> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | }, |
| | | fail(err) { |
| | | item.paddingStatus = 4 |
| | | that.setData({ |
| | | downloadList |
| | | }) |
| | | wx.showToast({ |
| | | title: 'å¾çä¸è½½å¤±è´¥',icon: 'none' |
| | | }) |
| | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | onShow(options) { |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | |
| | | customer |
| | | } = this.data |
| | | const enjoyList = wx.getStorageSync('enjoyList') || [] |
| | | if (!customer.customerId) return wx.showToast({ |
| | | if (!customer.platSourceId) return wx.showToast({ |
| | | title: '请å
éæ©è¦å
³èç客æ·', |
| | | icon: 'none' |
| | | }) |
| | | if(enjoyList.filter(i => i.checked).length == 0) return wx.showToast({ |
| | | title: 'è¯·éæ°éæ©è¦å
³èçç产å', |
| | | icon: 'none' |
| | | }) |
| | | batchAddLike({ |
| | |
| | | icon: 'none' |
| | | }) |
| | | }, 500) |
| | | const temp = enjoyList.filter(i => !i.checked) |
| | | wx.setStorageSync('enjoyList', temp) |
| | | this.setData({ |
| | | customer: {}, |
| | | total: 0, |
| | | dataList: [], |
| | | page: 1 |
| | | }) |
| | | wx.navigateBack() |
| | | this.getList() |
| | | }else{ |
| | | return wx.showToast({ |
| | |
| | | } |
| | | .icon{ |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-top: 4rpx; |
| | | margin-right: 14rpx; |
| | | } |
| | | } |
| | | .kehu{ |
| | | width: 48rpx; |
| | | height: 48rpx; |
| | | margin-left: 30rpx; |
| | | } |
| | | } |
| | |
| | | <!-- --> |
| | | <view class="search_wrap"> |
| | | <view class="input_wrap"> |
| | | <image class="icon" src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <image class="icon" src="../../static/icon/ic_search@2x.png"></image> |
| | | <input model:value="{{keyWords}}" bindblur="reloadList" type="text" placeholder="æç´¢å®¢æ·æµç§°ã导è´ã夿³¨å" /> |
| | | </view> |
| | | <image bindtap="jumpClient" class="kehu" src="../../static/icon/kehu_ic_new@2x.png" mode="widthFix"></image> |
| | | <image bindtap="jumpClient" class="kehu" src="../../static/icon/kehu_ic_new@2x.png"></image> |
| | | </view> |
| | | <!-- --> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="list"> |
| | |
| | | } |
| | | .search_wrap .input_wrap .icon { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-top: 4rpx; |
| | | margin-right: 14rpx; |
| | | } |
| | | .search_wrap .kehu { |
| | | width: 48rpx; |
| | | height: 48rpx; |
| | | margin-left: 30rpx; |
| | | } |
| | | .list { |
| | |
| | | } |
| | | } |
| | | } |
| | | .tip{ |
| | | position: fixed; |
| | | bottom: 108rpx; |
| | | left: 0; |
| | | width: 100%; |
| | | text-align: center; |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | </van-popup> |
| | | <!-- --> |
| | | <view class="tip">æ¬å°ç¨åºåè½ä»
éäºå¿é¦å®¶å±
åç»éåå工使ç¨</view> |
| | | </view> |
| | |
| | | justify-content: center; |
| | | color: #fff; |
| | | } |
| | | .tip { |
| | | position: fixed; |
| | | bottom: 108rpx; |
| | | left: 0; |
| | | width: 100%; |
| | | text-align: center; |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | } |
| | |
| | | import { newsPage,saveShareRecord } from '../../api/index' |
| | | import { |
| | | newsPage, |
| | | saveShareRecord |
| | | } from '../../api/index' |
| | | import moment from "moment"; |
| | | Page({ |
| | | |
| | |
| | | this.getList() |
| | | }, |
| | | getList() { |
| | | newsPage({capacity:this.data.capacity, |
| | | newsPage({ |
| | | capacity: this.data.capacity, |
| | | page:this.data.page, |
| | | model:{type:0}}) |
| | | model: { |
| | | type: 0 |
| | | } |
| | | }) |
| | | .then(res =>{ |
| | | wx.stopPullDownRefresh() |
| | | if(this.data.page ==1){ |
| | | this.setData({list:[]}) |
| | | this.setData({ |
| | | list: [] |
| | | }) |
| | | } |
| | | if(this.data.page == res.data.page){ |
| | | res.data.records.forEach(element => { |
| | | element.createDate = moment(element.createDate).format("yyyy/MM/DD") |
| | | }) |
| | | this.setData({list: [...this.data.list, ...res.data.records || []], |
| | | total:res.data.total}) |
| | | this.setData({ |
| | | list: [...this.data.list, ...res.data.records || []], |
| | | total: res.data.total |
| | | }) |
| | | } |
| | | console.log(this.data) |
| | | }) |
| | |
| | | }, |
| | | onReachBottom() { |
| | | console.log('触åºäºä»¶'); |
| | | const { total, list, page } = this.data |
| | | const { |
| | | total, |
| | | list, |
| | | page |
| | | } = this.data |
| | | if(total > list.length){ |
| | | this.setData({ page: page + 1 }) |
| | | this.setData({ |
| | | page: page + 1 |
| | | }) |
| | | this.getList() |
| | | }else{ |
| | | wx.showToast({ |
| | |
| | | downloadImageFileDo(files,title){ |
| | | wx.showLoading({ |
| | | title: 'æ£å¨ä¸è½½', |
| | | mask: true |
| | | }) |
| | | let temp = 0; |
| | | let count = 0; |
| | | if(files.length){ |
| | | for(let i = 0;i<files.length;i++){ |
| | | let filePath = wx.env.USER_DATA_PATH + '/' + new Date().valueOf()+i + '.jpg' ; |
| | |
| | | filePath: tempFp, |
| | | success(result) { |
| | | temp ++; |
| | | console.log(result) |
| | | count++; |
| | | if (count == files.length) { |
| | | wx.hideLoading() |
| | | } |
| | | if(temp == files.length){ |
| | | wx.hideLoading(); |
| | | wx.setClipboardData({ |
| | | data: title, |
| | | success: function (res) { |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, fail(err) { |
| | | }, |
| | | fail(err) { |
| | | count++; |
| | | if (count == files.length) { |
| | | wx.hideLoading() |
| | | } |
| | | wx.showToast({ |
| | | title: 'å¾çä¸è½½å¤±è´¥å¦' |
| | | }) |
| | | } |
| | | }) |
| | | } , fail(err) { |
| | | }, |
| | | fail(err) { |
| | | count++; |
| | | if (count == files.length) { |
| | | wx.hideLoading() |
| | | } |
| | | wx.showToast({ |
| | | title: 'å¾çä¸è½½å¤±è´¥å¦' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }else{ |
| | | wx.showToast({ |
| | | title: '该èµè®¯ææ å¯å享çå¾çæè§é¢', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | downloadVideoFileDo(files,title){ |
| | | wx.showLoading({ |
| | | title: 'æ£å¨ä¸è½½', |
| | | mask: true |
| | | }) |
| | | let count = 0; |
| | | if(files.length){ |
| | | let filePath = wx.env.USER_DATA_PATH + '/' + new Date().valueOf() + '0.mp4'; |
| | | wx.downloadFile({ |
| | |
| | | wx.saveVideoToPhotosAlbum({ |
| | | filePath: tempFp, |
| | | success(result) { |
| | | console.log(result) |
| | | wx.hideLoading(); |
| | | count++; |
| | | if (count == files.length) { |
| | | wx.hideLoading() |
| | | } |
| | | wx.setClipboardData({ |
| | | data: title, |
| | | success: function (res) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, fail(err) { |
| | | }, |
| | | fail(err) { |
| | | count++; |
| | | if (count == files.length) { |
| | | wx.hideLoading() |
| | | } |
| | | wx.showToast({ |
| | | title: 'è§é¢ä¸è½½å¤±è´¥å¦' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | fail(err) { |
| | | count++; |
| | | if (count == files.length) { |
| | | wx.hideLoading() |
| | | } |
| | | wx.showToast({ |
| | | title: 'è§é¢ä¸è½½å¤±è´¥å¦' |
| | | }) |
| | | } |
| | | }) |
| | | }else{ |
| | | wx.showToast({ |
| | | title: '该èµè®¯ææ å¯å享çå¾çæè§é¢', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | |
| | | */ |
| | | onPullDownRefresh() { |
| | | console.log('䏿巿°') |
| | | this.setData({ page: 1 }) |
| | | this.setData({ |
| | | page: 1 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | |
| | |
| | | import { getDictData, getMemberInfo } from '../../api/index' |
| | | import { |
| | | getDictData, |
| | | getMemberInfo |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | clientHeight: 0, |
| | | clientTop: 0, |
| | | showCard: false, |
| | | userInfo: {name:''} |
| | | userInfo: { |
| | | name: '' |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | const res = wx.getMenuButtonBoundingClientRect() |
| | | this.setData({clientHeight: res.height}) |
| | | this.setData({clientTop: res.top}) |
| | | this.setData({ |
| | | clientHeight: res.height |
| | | }) |
| | | this.setData({ |
| | | clientTop: res.top |
| | | }) |
| | | }, |
| | | onShow() { |
| | | this.initData() |
| | | }, |
| | | subscribe: function () { |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | let that = this |
| | | wx.requestSubscribeMessage({ |
| | | tmplIds: ['A_jEWoyl0Uu_l5J-zwlwx_FcbUirlsS6Peu4JW6a7Gc'], |
| | | success: (res) => { |
| | | if (res['A_jEWoyl0Uu_l5J-zwlwx_FcbUirlsS6Peu4JW6a7Gc'] === 'accept') { |
| | | that.submitClock(); |
| | | } else if (res['A_jEWoyl0Uu_l5J-zwlwx_FcbUirlsS6Peu4JW6a7Gc'] === 'reject') { |
| | | // ç¨æ·åå²æä½æè®¾ç½®äºæç» or å
³éäºè®¢é
æ¶æ¯çä¸»ï¼æ»ï¼å¼å
³ï¼å¯¼è´æ æ³æ¨é |
| | | // console.log(res, '0 æç» or å
³éäºè®¢é
æ¶æ¯çä¸»ï¼æ»ï¼å¼å
³---'); |
| | | } else { |
| | | wx.showToast({ |
| | | title: 'ææè®¢é
æ¶æ¯æè¯¯', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | fail: () => { |
| | | reject(); |
| | | } |
| | | }) |
| | | }, |
| | | showQrcode() { |
| | | this.setData({ showCard: true }) |
| | | this.setData({ |
| | | showCard: true |
| | | }) |
| | | }, |
| | | onClose() { |
| | | this.setData({ showCard: false }) |
| | | this.setData({ |
| | | showCard: false |
| | | }) |
| | | }, |
| | | changePath(e) { |
| | | const {userInfo} = this.data |
| | | const { |
| | | userInfo |
| | | } = this.data |
| | | // 页é¢è·³è½¬ |
| | | let temp = [ |
| | | '/pages/userinfo/index', |
| | |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'STAFF_WORK_TOP_IMG' |
| | | }).then(res => { |
| | | this.setData({ topimg: res.data.code }) |
| | | this.setData({ |
| | | topimg: res.data.code |
| | | }) |
| | | }) |
| | | }, |
| | | onReady() { |
| | | }, |
| | | onReady() {}, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | |
| | | <image class="icon" src="../../static/icon/mine_ic_ar.png" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | <!-- index.wxml --> |
| | | <!-- <button bindtap="subscribe">订é
æ¶æ¯</button> --> |
| | | </view> |
| | | <!-- 详æ
--> |
| | | <van-popup show="{{ showCard }}" closeable round bind:close="onClose"> |
| | |
| | | "projectname": "wechat_staff", |
| | | "setting": { |
| | | "compileHotReLoad": true, |
| | | "urlCheck": true |
| | | "urlCheck": false |
| | | }, |
| | | "description": "项ç®ç§æé
ç½®æä»¶ãæ¤æä»¶ä¸çå
容å°è¦ç project.config.json ä¸çç¸ååæ®µã项ç®çæ¹å¨ä¼å
忥尿¤æä»¶ä¸ãè¯¦è§ææ¡£ï¼https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
| | | "condition": { |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/productVideo/index", |
| | | "query": "id=1813372914895843329", |
| | | "pathName": "pages/detailDis/product", |
| | | "query": "id=1823671456940113921", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | |
| | | // export const baseUrl = 'http://192.168.0.135:10027' |
| | | export const baseUrl = 'http://192.168.0.170:80' |
| | | // æµè¯æå¡å¨ |
| | | // export const baseUrl = 'https://dmdev.zhibang.com:8443/web_interface' |
| | | // ç产æå¡å¨ |
| | | export const baseUrl = 'https://zbyj.zbom.com/web_interface' |
| | | // export const baseUrl = 'https://zbyj.zbom.com/web_interface' |
| | | |
| | | // è
¾è®¯å°å¾å¼åè
key |
| | | export const qqMapKey = 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ' |