Merge remote-tracking branch 'origin/master'
# Conflicts:
# wechat_staff/pages/webView/index.wxml
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | |
| | | @Data |
| | | public class ZTCaseInfoResponse extends ZTImageListResponse implements Serializable { |
| | | private APISpaceCaseVo[] apiSpaceCaseVos; |
| | | |
| | | private List<String> imageurlList; |
| | | |
| | | private String caseInfo; |
| | | /** |
| | | * 收藏量 |
| | |
| | | // 场景码,与前端约定,最终是需要前端解析 |
| | | 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(); |
| | |
| | | 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) { |
| | |
| | | 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. |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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( |
| | |
| | | @Autowired |
| | | private ActionsService actionsService; |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "客户端小程序登陆", notes = "客户端小程序") |
| | | @GetMapping("/wxLoginCustomer") |
| | | @ApiImplicitParams({ |
| | |
| | | |
| | | |
| | | |
| | | @UserLoginRequired |
| | | @LoginRequired |
| | | @ApiOperation(value = "行为内容接口 - 中台", notes = "客户端小程序") |
| | | @GetMapping("/actionDo") |
| | |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | @UserLoginRequired |
| | | @LoginRequired |
| | | @ApiOperation(value = "定制服务列表", notes = "客户端小程序") |
| | | @GetMapping("/getCustomizedNewsList") |
| | |
| | | return ApiResponse.success("查询成功",newsService.getCustomizedNewsList(Constants.ONE,null,null)); |
| | | } |
| | | |
| | | @UserLoginRequired |
| | | @LoginRequired |
| | | @ApiOperation(value = "定制服务详情", notes = "客户端小程序") |
| | | @GetMapping("/getCustomizedNewsDetail") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @UserLoginRequired |
| | | @LoginRequired |
| | | @ApiOperation(value = "产品分页列表 - 中台", notes = "客户端小程序") |
| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | private GetZhongTaiDataService getZhongTaiDataService; |
| | | |
| | | |
| | | @ApiOperation(value = "小程序登陆", notes = "员工端小程序") |
| | | @GetMapping("/loginByWx") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @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)); |
| | | } |
| | |
| | | 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) { |
| | |
| | | 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('登录失败!') |
| | | } |
| | |
| | | secondCateList[activeIndex].paramIndex = -1 |
| | | secondCateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ tagCodes, secondCateList }) |
| | | }, |
| | | changeShowParams(e){ |
| | |
| | | activeParam: secondCateList[activeIndex].valueVos |
| | | }) |
| | | } |
| | | console.log('activeParam', this.data.activeParam); |
| | | // this.setData({showTwo: false}) |
| | | }, |
| | | cancelParam() { |
| | |
| | | data |
| | | }) |
| | | } |
| | | export const getUserCard = (data) => { |
| | | // 批量添加喜欢给客户 |
| | | export const batchAddLike = (data) => { |
| | | return request({ |
| | | url: '/web/personnel/getUserCard', |
| | | url: '/web/personnel/batchAddLike', |
| | | method: "POST", |
| | | data |
| | | }) |
| | |
| | | data |
| | | }) |
| | | } |
| | | // 小程序注销 |
| | | export const getCrmAuthUrl = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getCrmAuthUrl', |
| | |
| | | import { getContentShareImg } from '../../api/index' |
| | | import { |
| | | getContentShareImg |
| | | } from '../../api/index' |
| | | const { HYEventBus } = require('hy-event-store') |
| | | const eventBus = new HYEventBus() |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | |
| | | */ |
| | | data: { |
| | | bottomLift: 0, |
| | | showShare: false |
| | | showShare: false, |
| | | isShowPoster: false, |
| | | posterUrl: '', |
| | | |
| | | leftIcon: '<<', |
| | | rightIcon: '>>', |
| | | }, |
| | | attached() { |
| | | var app = getApp().globalData |
| | |
| | | }, |
| | | 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 |
| | | }) |
| | | }, |
| | | } |
| | | }) |
| | | }) |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "van-overlay": "@vant/weapp/overlay/index" |
| | | } |
| | | } |
| | |
| | | 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%); |
| | | } |
| | | } |
| | | } |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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%); |
| | | } |
| | |
| | | // 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() { |
| | | |
| | | }, |
| | |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | |
| | | { |
| | | "navigationBarTitleText": "咨询" |
| | | "usingComponents": { |
| | | "buoyClient": "../../components/buoyClient/index" |
| | | }, |
| | | "navigationBarTitleText": "资讯" |
| | | } |
| | |
| | | .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; |
| | |
| | | } |
| | | } |
| | | .content{ |
| | | padding: 0 40rpx 40rpx; |
| | | padding: 260rpx 40rpx 40rpx; |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | |
| | | <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> |
| | |
| | | .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; |
| | |
| | | font-weight: 400; |
| | | } |
| | | .content { |
| | | padding: 0 40rpx 40rpx; |
| | | padding: 260rpx 40rpx 40rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | | } |
| | | .content .item .img { |
| | | width: 100%; |
| | |
| | | // pages/consult/detail.js |
| | | import { shareContent, getProductNewsInfo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | navTitle: '详情', |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | info: {}, |
| | | detail: {}, |
| | | |
| | | showShare: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | 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() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "mp-html": "mp-html", |
| | | "buoyClient": "../../components/buoyClient/index" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | .item { |
| | | margin-top: 18rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | <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> |
| | |
| | | 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; |
| | |
| | | margin-right: 8rpx; |
| | | } |
| | | .footer .item { |
| | | margin-top: 18rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | |
| | | .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; |
| | | } |
| | |
| | | // 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 |
| | |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "mp-html": "mp-html", |
| | | "buoyClient": "../../components/buoyClient/index" |
| | | "buoyClient": "../../components/buoyClient/index", |
| | | "detailFooter": "../../components/detailFooter/index" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | <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"> |
| | |
| | | this.setData({ info }) |
| | | enjoyList.push({ |
| | | ...info, |
| | | joinType: 'product', |
| | | joinType: '0', |
| | | timestamp: new Date().getTime() |
| | | }) |
| | | }else{ |
| | |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | 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('用户点击了分享'); |
| | |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
| | |
| | | <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 }}"> |
| | |
| | | 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 }) |
| | |
| | | { |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "buoyClient": "../../components/buoyClient/index" |
| | | "buoyClient": "../../components/buoyClient/index", |
| | | "detailFooter": "../../components/detailFooter/index" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | <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> |
| | |
| | | import { getCataLogTagList, getCatalogList } from '../../api/index' |
| | | const { HYEventBus } = require('hy-event-store') |
| | | const eventBus = new HYEventBus() |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | 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}) |
| | |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | |
| | | // 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 |
| | | }, |
| | | |
| | | /** |
| | |
| | | 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() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | }, |
| | | "navigationBarTitleText": "下载" |
| | | } |
| | |
| | | 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%; |
| | |
| | | } |
| | | .footer { |
| | | position: fixed; |
| | | z-index: 99; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 750rpx; |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | <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> |
| | |
| | | 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%; |
| | |
| | | } |
| | | .footer { |
| | | position: fixed; |
| | | z-index: 99; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 750rpx; |
| | |
| | | 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; |
| | | } |
| | |
| | | getCustomizedNewsList, |
| | | newsPage |
| | | } from '../../api/index' |
| | | const { HYEventBus } = require('hy-event-store') |
| | | const eventBus = new HYEventBus() |
| | | Page({ |
| | | data: { |
| | | searchValue: '', |
| | |
| | | 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', |
| | |
| | | <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" /> |
| | |
| | | </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> |
| | |
| | | import moment from "moment"; |
| | | import { getContentShareImg } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | */ |
| | | data: { |
| | | bottomLift: 0, |
| | | checkAll: false, |
| | | enjoyList: [] |
| | | }, |
| | | |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | let enjoyList = wx.getStorageSync('enjoyList') || [] |
| | | enjoyList.forEach(item => { |
| | | item.checked = false |
| | | }) |
| | | wx.setStorageSync('enjoyList', enjoyList) |
| | | this.initData() |
| | | }, |
| | | |
| | |
| | | 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({ |
| | |
| | | }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 |
| | | }) |
| | | }, |
| | | }) |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "usingComponents": { |
| | | "van-overlay": "@vant/weapp/overlay/index" |
| | | }, |
| | | "navigationBarTitleText": "客户喜欢" |
| | | } |
| | |
| | | padding-bottom: 220rpx; |
| | | } |
| | | .date_item{ |
| | | position: relative; |
| | | .date{ |
| | | display: flex; |
| | | font-weight: 500; |
| | |
| | | margin-bottom: 30rpx; |
| | | .icon{ |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .content{ |
| | | flex: 1; |
| | |
| | | width: 160rpx; |
| | | .icon{ |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | margin-right: 18rpx; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .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%); |
| | | } |
| | | } |
| | | } |
| | |
| | | <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> |
| | |
| | | <!-- 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> |
| | |
| | | background-color: #f7f7f7; |
| | | padding-bottom: 220rpx; |
| | | } |
| | | .date_item { |
| | | position: relative; |
| | | } |
| | | .date_item .date { |
| | | display: flex; |
| | | font-weight: 500; |
| | |
| | | } |
| | | .date_item .line .icon { |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .date_item .line .content { |
| | | flex: 1; |
| | |
| | | } |
| | | .footer .btns .all_sel .icon { |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | margin-right: 18rpx; |
| | | } |
| | | .footer .btns .list { |
| | |
| | | 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%); |
| | | } |
| | |
| | | import { getCustomerList, getCrmAuthUrl } from '../../api/index' |
| | | import { getCustomerList, getCrmAuthUrl, batchAddLike } from '../../api/index' |
| | | const { HYEventBus } = require('hy-event-store') |
| | | const eventBus = new HYEventBus() |
| | | Page({ |
| | |
| | | |
| | | keyWords: '', |
| | | dataList: [], |
| | | customer: {}, |
| | | total: 0, |
| | | flag: 0, |
| | | page: 1, |
| | |
| | | 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}) |
| | |
| | | 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() { |
| | | |
| | |
| | | } |
| | | .icon{ |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | margin-right: 30rpx; |
| | | } |
| | | .avatar{ |
| | |
| | | <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> |
| | | <!-- --> |
| | |
| | | } |
| | | .list .item .icon { |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | margin-right: 30rpx; |
| | | } |
| | | .list .item .avatar { |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | |
| | | |
| | | <web-view wx:if="{{linkUrl !=null && linkUrl !=''}}" src="{{linkUrl}}"> </web-view> |
| | | <web-view wx:if="{{linkUrl !=null && linkUrl !=''}}" src="{{linkUrl}}"> </web-view> |
| | |
| | | <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> |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/kefu/select", |
| | | "pathName": "pages/webView/index", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | |
| | | |
| | | 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/' |