| | |
| | | data |
| | | }) |
| | | } |
| | | // åç±»æ¡ä¾ 详æ
|
| | | export const getWholecaseInfo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getWholecaseInfo', |
| | | data |
| | | }) |
| | | } |
| | | // åç±»å®æ¯ å页å表 ä¸å° |
| | | export const getZhongTaiRealcasePage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiRealcasePage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // åç±»å®æ¯ 详æ
|
| | | export const getRealcaseInfo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getRealcaseInfo', |
| | | data |
| | | }) |
| | | } |
| | | // æçå®¶ å页å表 ä¸å° |
| | | export const getZhongTaiVideoPage = (data) => { |
| | | return request({ |
| | |
| | | data |
| | | }) |
| | | } |
| | | // æç æ¶è/忬¢å表 |
| | | export const collectLikePage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/collectLikePage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // å
容 忬¢ |
| | | export const likeContent = (data) => { |
| | | return request({ |
| | |
| | | import { wxLoginCustomer } from './api/index' |
| | | import { |
| | | wxLoginCustomer |
| | | } from './api/index' |
| | | App({ |
| | | globalData: { |
| | | primary: '#B08771', |
| | |
| | | if (WindowInfo.safeArea.top > 20) { |
| | | this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom; |
| | | } |
| | | // |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success(res) { |
| | | if (res.code) { |
| | | //åèµ·ç½ç»è¯·æ± |
| | | wxLoginCustomer({ |
| | | code: res.code |
| | | }).then(res => { |
| | | console.log(res) |
| | | if (res && res.data.member) { |
| | | wx.setStorageSync('member', res.data.member) |
| | | wx.setStorageSync('openid', res.data.member.openid) |
| | | wx.setStorageSync('sessionKey', res.data.sessionKey) |
| | | wx.setStorageSync('token', res.data.token) |
| | | } else { |
| | | console.log('ç»å½å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } else { |
| | | console.log('ç»å½å¤±è´¥ï¼' + res) |
| | | // ææç»å½ |
| | | const member = wx.getStorageSync('member') |
| | | if (member) { |
| | | |
| | | } else { |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success(res) { |
| | | if (res.code) { |
| | | //åèµ·ç½ç»è¯·æ± |
| | | wxLoginCustomer({ |
| | | code: res.code |
| | | }).then(res => { |
| | | console.log(res) |
| | | if (res && res.data.member) { |
| | | wx.setStorageSync('member', res.data.member) |
| | | wx.setStorageSync('openid', res.data.member.openid) |
| | | wx.setStorageSync('sessionKey', res.data.sessionKey) |
| | | wx.setStorageSync('token', res.data.token) |
| | | } else { |
| | | console.log('ç»å½å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } else { |
| | | console.log('ç»å½å¤±è´¥ï¼' + res) |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | |
| | | } |
| | | }) |
| | |
| | | "pages/userinfo/collect", |
| | | "pages/userinfo/favorite", |
| | | "pages/sets/index", |
| | | "pages/sets/protocol" |
| | | "pages/sets/protocol", |
| | | "pages/richText/index" |
| | | ], |
| | | "window": { |
| | | "navigationBarTitleText": "å¿é¦å®¶é", |
| | |
| | | button:after { |
| | | content: none; |
| | | } |
| | | |
| | | ::-webkit-scrollbar { |
| | | display: none; |
| | | } |
| | | button::after { |
| | | border: none; |
| | | } |
| | |
| | | dataList: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | search: '', |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: 'whole_case' |
| | | }, |
| | |
| | | getCatelist(){ |
| | | const { catalogCode } = this.data |
| | | getCataLogTagList({ |
| | | catalogCode: 'real_case' |
| | | catalogCode |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | this.setData({ |
| | |
| | | }) |
| | | }, |
| | | getList() { |
| | | const { sortType, search, tagCodes, pageNum, pageSize } = this.data |
| | | const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data |
| | | getZhongTaiWholecasePage({ |
| | | catalogCode: 'whole_case',tagCodes,pageNum,pageSize, sortType,search |
| | | catalogCode,pageNum,pageSize,tagCodes, sortType,query |
| | | }).then(res => { |
| | | this.setData({ dataList: res.data.records }) |
| | | if(res.data){ |
| | | this.setData({ dataList: res.data.records }) |
| | | } |
| | | }) |
| | | }, |
| | | statusChange(e) { |
| | |
| | | }) |
| | | }, |
| | | handleDetail(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/case', |
| | | url: '/pages/detailDis/case?id=' + id, |
| | | }) |
| | | }, |
| | | tagClick(e) { |
| | |
| | | <view class="app"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindblur="bindblur" model:value="{{ search }}" type="text" placeholder="æç´¢æ¡ä¾åç§°" /> |
| | | <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="æç´¢æ¡ä¾åç§°" /> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content"> |
| | |
| | | </view> |
| | | <!-- goods_list --> |
| | | <view class="goods_list"> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="handleDetail"> |
| | | <view wx:for="{{ dataList }}" data-id="{{ item.id }}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | datalist: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | search: '', |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: "" |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | var app = getApp() |
| | | console.log('globalData', app.globalData); |
| | | if(app.globalData.catalogCode){ |
| | | this.setData({ catalogCode: app.globalData.catalogCode }) |
| | | setTimeout(() => { |
| | | console.log('catalogCode', this.data.catalogCode); |
| | | getApp().globalData.catalogCode = '' |
| | | }, 2000) |
| | | } |
| | | }, |
| | | methods: { |
| | | getCatelist(){ |
| | |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | catalogCode: res.data[0].code, |
| | | catalogCode: this.data.catalogCode || res.data[0].code, |
| | | cateList: res.data |
| | | }) |
| | | this.getTag() |
| | | setTimeout(() => { |
| | | this.getList() |
| | | }, 300) |
| | | } |
| | | }) |
| | | }, |
| | | getTag() { |
| | | const catalogCode = this.data.catalogCode |
| | | getCatalogList({ |
| | | catalogCode |
| | | }) |
| | | }, |
| | | bindblur() { |
| | | this.getList() |
| | | }, |
| | | getList() { |
| | | const { catalogCode, pageNum, pageSize, sortType, search } = this.data |
| | | const { catalogCode, pageNum, pageSize, sortType, query } = this.data |
| | | getZhongTaiProductPage({ |
| | | catalogCode,pageNum,pageSize,sortType,search |
| | | catalogCode,pageNum,pageSize,sortType,query |
| | | }).then(res => { |
| | | this.setData({ |
| | | datalist: [...this.data.datalist, ...res.data.records], |
| | |
| | | .home_top{ |
| | | // position: fixed; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | // border: 1px solid red; |
| | | } |
| | | .search_wrap{ |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | |
| | | margin-right: 16rpx; |
| | | } |
| | | } |
| | | |
| | | .app{ |
| | | height: 100%; |
| | | width: 100%; |
| | |
| | | <view class="app"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindblur="bindblur" model:value="{{ search }}" type="text" placeholder="æç´¢äº§ååç§°" /> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="æç´¢äº§ååç§°" /> |
| | | </view> |
| | | </view> |
| | | <view class="main_content"> |
| | | <view class="main_left"> |
| | |
| | | <view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img" mode="widthFix"></image> |
| | | <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="name">{{ item.title }}</view> |
| | | <view class="info"> |
| | | <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">{{ item.favoriteCount }}</text> |
| | | <image wx:if="{{ !item.isCollection }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount || 0 }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.readCount }}</text> |
| | | <text>{{ item.viewCount || 0 }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .home_top { |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .search_wrap { |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | |
| | | // components/disCase/index.js |
| | | import { getCataLogTagList, getZhongTaiRealcasePage, actionDo } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | |
| | | |
| | | }, |
| | | data: { |
| | | showParams: false, |
| | | activeStatus: '0' |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | | tagCodes: [], |
| | | |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: 'real_case' |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | }, |
| | | methods: { |
| | | handleDetail(e) { |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/realpic', |
| | | getCatelist(){ |
| | | const { catalogCode } = this.data |
| | | getCataLogTagList({ |
| | | catalogCode |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | cateList: res.data |
| | | }) |
| | | setTimeout(() => { |
| | | this.getList() |
| | | }, 300) |
| | | } |
| | | }) |
| | | }, |
| | | changeShowParams(){ |
| | | const showParams = !this.data.showParams |
| | | this.setData({showParams}) |
| | | getList() { |
| | | const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data |
| | | getZhongTaiRealcasePage({ |
| | | catalogCode,tagCodes,pageNum,pageSize, sortType,query |
| | | }).then(res => { |
| | | this.setData({ dataList: res.data.records }) |
| | | }) |
| | | }, |
| | | videoClick(e) { |
| | | const { videourl } = e.currentTarget.dataset |
| | | wx.previewMedia({ |
| | | sources: [{ url: videourl, type: 'video' }] |
| | | }) |
| | | }, |
| | | priviewFull(e){ |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.openContent, |
| | | success: function(res) { |
| | | // éè¿eventChannelå被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent, title: item.title }) |
| | | } |
| | | }) |
| | | }, |
| | | statusChange(e) { |
| | | const sortType = e.currentTarget.dataset.status |
| | | this.setData({sortType}) |
| | | this.getList() |
| | | }, |
| | | handleAction(e){ |
| | | const actionType = e.currentTarget.dataset.code |
| | | const id = e.currentTarget.dataset.id |
| | | actionDo({ |
| | | actionType, |
| | | id |
| | | }).then(res => { |
| | | this.getList() |
| | | }) |
| | | }, |
| | | handleDetail(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | if(item.openType == 'video'){ |
| | | wx.previewMedia({ |
| | | sources: [{ url: item.openContent, type: 'video' }] |
| | | }) |
| | | } |
| | | if(item.openType == 'link'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.openContent, |
| | | }) |
| | | } |
| | | if(item.openType == 'page'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/realpic?id=' + item.id, |
| | | }) |
| | | } |
| | | }, |
| | | tagClick(e) { |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { cateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | |
| | | if(index === -1){ |
| | | tagCodes.push(code) |
| | | cateList[activeIndex].paramIndex = paramIndex |
| | | cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName |
| | | }else{ |
| | | tagCodes.splice(index, 1) |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ tagCodes, cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | | const { cateList } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | if(activeIndex === this.data.activeIndex){ |
| | | this.setData({ activeIndex: -1, activeParam: [], selParam: '' }) |
| | | }else{ |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: cateList[activeIndex].valueVos |
| | | }) |
| | | } |
| | | |
| | | // this.setData({showTwo: false}) |
| | | }, |
| | | changeTwo(){ |
| | |
| | | this.setData({showTwo}) |
| | | this.setData({showOne: false}) |
| | | }, |
| | | statusChange(e) { |
| | | const activeStatus = e.currentTarget.dataset.status |
| | | this.setData({activeStatus}) |
| | | } |
| | | } |
| | | }) |
| | |
| | | |
| | | .main_content { |
| | | height: calc(100% - 120rpx); |
| | | |
| | | .query_wrap_scroll { |
| | | width: 670rpx; |
| | | padding: 0 40rpx; |
| | | } |
| | | |
| | | .query_wrap { |
| | | display: flex; |
| | | padding: 0 16rpx; |
| | | |
| | | .item { |
| | | margin-right: 36rpx; |
| | | height: 88rpx; |
| | | display: flex; |
| | | flex-shrink: 0; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | |
| | | .name { |
| | | margin-right: 6rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .query_param { |
| | | position: absolute; |
| | | z-index: 99; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | |
| | | .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | |
| | | .item { |
| | | width: 202rpx; |
| | | height: 72rpx; |
| | |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | |
| | | .active { |
| | | color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | } |
| | | } |
| | | |
| | | .btns { |
| | | display: flex; |
| | | |
| | | .btn { |
| | | flex: 1; |
| | | height: 88rpx; |
| | |
| | | background-color: #333333; |
| | | } |
| | | } |
| | | .goods_list{ |
| | | |
| | | .goods_list { |
| | | padding: 12rpx 40rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | .item{ |
| | | width: 324rpx; |
| | | margin-bottom: 60rpx; |
| | | .img_wrap{ |
| | | |
| | | .item { |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | | |
| | | .img_wrap { |
| | | width: 100%; |
| | | height: 182rpx; |
| | | height: 376rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .img{ |
| | | |
| | | .play { |
| | | width: 60rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 1; |
| | | } |
| | | |
| | | .full { |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 32rpx; |
| | | font-size: 20rpx; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | width: 112rpx; |
| | | height: 42rpx; |
| | | background: rgba(0, 0, 0, 0.54); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .icon { |
| | | width: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | |
| | | .img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .tag{ |
| | | padding: 0 10rpx; |
| | | height: 46rpx; |
| | | line-height: 46rpx; |
| | | text-align: center; |
| | | background: rgba(0,0,0,0.4); |
| | | border-radius: 8rpx; |
| | | |
| | | .new { |
| | | width: 72rpx; |
| | | position: absolute; |
| | | left: 12rpx; |
| | | top: 16rpx; |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | left: 0; |
| | | top: 0; |
| | | z-index: 10; |
| | | } |
| | | } |
| | | .name{ |
| | | |
| | | .content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 0 10rpx; |
| | | } |
| | | |
| | | .name { |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | flex: 1; |
| | | } |
| | | .info{ |
| | | |
| | | .info { |
| | | display: flex; |
| | | align-items: center; |
| | | color: #666666; |
| | | margin-left: 12rpx; |
| | | .icon{ |
| | | |
| | | .icon { |
| | | width: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | .num{ |
| | | |
| | | .num { |
| | | margin-right: 28rpx; |
| | | } |
| | | .primary{ |
| | | |
| | | .primary { |
| | | color: var(--themeColor); |
| | | } |
| | | } |
| | |
| | | <view class="app"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢äº§ååç§°" /> |
| | | <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="æç´¢å®æ¯åç§°" /> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content"> |
| | | <view class="query_wrap"> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">飿 ¼</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | | <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.paramName || item.labelName }}</view> |
| | | <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">空é´</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">é´å</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">é´ç§°</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">空称</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ showParams }}" class="query_param"> |
| | | </scroll-view> |
| | | <!-- param --> |
| | | <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param"> |
| | | <view class="list"> |
| | | <view class="item active">ä¸èçµè§</view> |
| | | <view class="item">ä¸èåçæ¶æç代çµè§</view> |
| | | <view class="item">ä¸èçµè§</view> |
| | | <view class="item">ä¸èçµè§</view> |
| | | <view class="item">ä¸èçµè§</view> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="changeShowParams">åæ¶</view> |
| | | <view class="btn sub">确认</view> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | | <view bindtap="subParam" class="btn sub">确认</view> |
| | | </view> |
| | | </view> |
| | | <view class="status"> |
| | | <view class="item {{ activeStatus == '0' ? 'active' : '' }}" data-status="0" bindtap="statusChange">é»è®¤</view> |
| | | <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">é»è®¤</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ activeStatus == '1' ? 'active' : '' }}" data-status="1" bindtap="statusChange">æç</view> |
| | | <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">æç</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ activeStatus == '2' ? 'active' : '' }}" data-status="2" bindtap="statusChange">ææ°</view> |
| | | <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">ææ°</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <view class="goods_list"> |
| | | <view class="item" bindtap="handleDetail"> |
| | | <view wx:for="{{ dataList }}" data-item="{{item}}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <view class="tag">宿</view> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="name">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</view> |
| | | <view class="info"> |
| | | <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">34</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | <image src="{{ item.coverImage }}" class="img"></image> |
| | | <view wx:if="{{ item.openType == 'link' }}" data-item="{{item}}" bindtap="priviewFull" class="full"> |
| | | <image class="icon" src="../../static/icon/ic_720.png" mode="widthFix"></image> |
| | | <text>å
¨æ¯</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image wx:if="{{ item.openType == 'video' }}" bindtap="videoClick" data-videourl="{{ item.openContent }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="name">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</view> |
| | | <view class="name">{{ item.title }}</view> |
| | | <view class="info"> |
| | | <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">34</text> |
| | | <image wx:if="{{ !item.isCollection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="name">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</view> |
| | | <view class="info"> |
| | | <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">34</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="name">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</view> |
| | | <view class="info"> |
| | | <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">34</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | <text>{{ item.viewCount }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .main_content { |
| | | height: calc(100% - 120rpx); |
| | | } |
| | | .main_content .query_wrap_scroll { |
| | | width: 670rpx; |
| | | padding: 0 40rpx; |
| | | } |
| | | .main_content .query_wrap { |
| | | display: flex; |
| | | padding: 0 16rpx; |
| | | } |
| | | .main_content .query_wrap .item { |
| | | margin-right: 36rpx; |
| | | height: 88rpx; |
| | | display: flex; |
| | | flex-shrink: 0; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | } |
| | | .main_content .query_wrap .item .name { |
| | | margin-right: 6rpx; |
| | |
| | | } |
| | | .main_content .goods_list { |
| | | padding: 12rpx 40rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 324rpx; |
| | | margin-bottom: 60rpx; |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .main_content .goods_list .item .img_wrap { |
| | | width: 100%; |
| | | height: 182rpx; |
| | | height: 376rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .play { |
| | | width: 60rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 1; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .full { |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 32rpx; |
| | | font-size: 20rpx; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | width: 112rpx; |
| | | height: 42rpx; |
| | | background: rgba(0, 0, 0, 0.54); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .full .icon { |
| | | width: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .tag { |
| | | padding: 0 10rpx; |
| | | height: 46rpx; |
| | | line-height: 46rpx; |
| | | text-align: center; |
| | | background: rgba(0, 0, 0, 0.4); |
| | | border-radius: 8rpx; |
| | | .main_content .goods_list .item .img_wrap .new { |
| | | width: 72rpx; |
| | | position: absolute; |
| | | left: 12rpx; |
| | | top: 16rpx; |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | left: 0; |
| | | top: 0; |
| | | z-index: 10; |
| | | } |
| | | .main_content .goods_list .item .content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 0 10rpx; |
| | | } |
| | | .main_content .goods_list .item .name { |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | |
| | | import { getZhongTaiProductNewsPage, getCatalogList } from '../../api/index' |
| | | import { getZhongTaiProductNewsPage, getCatalogList, getCataLogTagList } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | */ |
| | | data: { |
| | | category: [], |
| | | secondCategory: ['级åç±»','级åç±»','级åç±»','级åç±»','级åç±»','级åç±»'], |
| | | activeCate: '', |
| | | seActiveCate: '', |
| | | secondCategory: [], |
| | | |
| | | catalogCode: '', |
| | | tagCode: '', |
| | | search: '', |
| | | dataList: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | |
| | | }, |
| | | onLoad(options) { |
| | | this.getCate() |
| | | this.getList() |
| | | }, |
| | | 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.currentTarget.dataset |
| | | wx.navigateTo({ |
| | | url: '/pages/consult/detail?id='+id, |
| | | }) |
| | | const item = e.currentTarget.dataset.item |
| | | 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, activeCate } = this.data |
| | | const { pageNum, pageSize, catalogCode, tagCode, search } = this.data |
| | | getZhongTaiProductNewsPage({ |
| | | pageNum, pageSize, catalogCode: activeCate |
| | | pageNum, pageSize, search, catalogCode: tagCode || catalogCode |
| | | }).then(res => { |
| | | if(res.data){ |
| | | this.setData({ dataList: res.data.records,total: res.data.records.total }) |
| | |
| | | }, |
| | | cateClick(e) { |
| | | const { code } = e.currentTarget.dataset |
| | | this.setData({ activeCate: code }) |
| | | this.setData({ catalogCode: code,secondCategory: [], tagCode: '' }) |
| | | this.gettag() |
| | | this.getList() |
| | | console.log('e', e.currentTarget.dataset); |
| | | console.log('catalogCode', this.data.catalogCode); |
| | | }, |
| | | seCateClick(e) { |
| | | const { index } = e.currentTarget.dataset |
| | | console.log(index); |
| | | const { code } = e.currentTarget.dataset |
| | | if(this.data.tagCode == code){ |
| | | this.setData({ tagCode: '' }) |
| | | }else{ |
| | | this.setData({ tagCode: code }) |
| | | } |
| | | this.getList() |
| | | }, |
| | | priviewFull(e){ |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | <view class="container"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢å¨è¯¢æ é¢" /> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindblur="getList" model:value="{{ search }}" type="text" placeholder="æç´¢èµè®¯æ é¢" /> |
| | | </view> |
| | | <!-- åç±» --> |
| | | <view> |
| | | <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 {{ activeCate == item.code ? 'active': '' }}">{{ item.name }}</view> |
| | | <view bindtap="cateClick" data-code="{{item.code}}" wx:for="{{ category }}" class="item {{ catalogCode == item.code ? 'active': '' }}">{{ item.name }}</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 bindtap="seCateClick" data-code="{{item.code}}" wx:for="{{ secondCategory }}" class="item {{ tagCode == item.code ? 'active': '' }}">{{ item.name }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-id="{{item.id}}"> |
| | | <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"> |
| | |
| | | data: { |
| | | bottomLift: 0, |
| | | info: {}, |
| | | detail: {}, |
| | | |
| | | showShare: false |
| | | }, |
| | |
| | | }, |
| | | getDetail(id) { |
| | | getProductNewsInfo({ id }).then(res => { |
| | | this.setData({ detail: res.data }) |
| | | this.setData({ info: res.data }) |
| | | }) |
| | | }, |
| | | openShare() { |
| | |
| | | { |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "mp-html": "mp-html" |
| | | }, |
| | | "navigationBarTitleText": "详æ
" |
| | | } |
| | |
| | | <view> |
| | | <!-- <navBar title="{{ navTitle }}"></navBar> --> |
| | | <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"> |
| | |
| | | data: { |
| | | name: '', |
| | | phone: '', |
| | | city: '', |
| | | |
| | | showAreaList: false, |
| | | areaList: [], |
| | | addr: {}, |
| | | fieldNames: { |
| | | text: 'name', |
| | | value: 'id', |
| | | children: 'children', |
| | | }, |
| | | cascaderValue: '', |
| | | |
| | | DESIGN_BANNER: '', |
| | |
| | | onSubmit() { |
| | | const { |
| | | name, |
| | | phone |
| | | phone, |
| | | addr |
| | | } = this.data |
| | | if (!name) return wx.showToast({ |
| | | title: '请è¾å
¥å§å', |
| | |
| | | title: '请è¾å
¥èç³»çµè¯', |
| | | icon: 'none' |
| | | }) |
| | | if (phone.length !== 11) return wx.showToast({ |
| | | title: '请è¾å
¥æ£ç¡®çèç³»çµè¯', |
| | | icon: 'none' |
| | | }) |
| | | if (!addr.areaCode || !addr.cityCode) return wx.showToast({ |
| | | title: 'è¯·éæ©åå¸', |
| | | icon: 'none' |
| | | }) |
| | | saveFreeCustomizationApply({ |
| | | name, |
| | | phone |
| | | phone, |
| | | ...addr |
| | | }).then(res => { |
| | | wx.showToast({ |
| | | title: 'æ¥åæå' |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | // æ¾ç¤ºåæ¢åå¸å¼¹çª |
| | | // æ¾ç¤ºåå¸å¼¹çª |
| | | chooseCity () { |
| | | this.setData({ showAreaList: !this.data.showAreaList }) |
| | | console.log('chooseCity', chooseCity); |
| | | console.log('chooseCity', this.data.showAreaList); |
| | | }, |
| | | // 忢åå¸ |
| | | confirmChange(e) { |
| | | let { |
| | | values |
| | | } = e.detail |
| | | let region = [] |
| | | for (let i in values) { |
| | | region.push(values[i].name) |
| | | onFinish(e) { |
| | | const { selectedOptions, value } = e.detail; |
| | | const addr = { |
| | | provinceCode: selectedOptions[0].id, |
| | | provinceName: selectedOptions[0].name, |
| | | cityCode: selectedOptions[1].id, |
| | | cityName: selectedOptions[1].name, |
| | | areaCode: selectedOptions[2].id, |
| | | areaName: selectedOptions[2].name, |
| | | } |
| | | this.setData({ |
| | | region, |
| | | cityCode: values[1].code |
| | | }) |
| | | this.getShopList() |
| | | this.chooseCity() |
| | | this.setData({ addr, showAreaList: false }) |
| | | console.log('selectedOptions', addr); |
| | | }, |
| | | onFinish() { |
| | | |
| | | }, |
| | | // 忢åå¸ |
| | | // confirmChange(e) { |
| | | // let { |
| | | // values |
| | | // } = e.detail |
| | | // let region = [] |
| | | // for (let i in values) { |
| | | // region.push(values[i].name) |
| | | // } |
| | | // this.setData({ |
| | | // region, |
| | | // cityCode: values[1].code |
| | | // }) |
| | | // this.getShopList() |
| | | // this.chooseCity() |
| | | // }, |
| | | onClose() { |
| | | this.setData({ showAreaList: false }) |
| | | }, |
| | |
| | | </view> |
| | | <view class="line" bindtap="chooseCity"> |
| | | <image class="icon" src="../../static/icon/design_ic_city.png" mode="widthFix"></image> |
| | | <view class="city">{{ city }}</view> |
| | | <view wx:if="{{addr.areaCode}}" class="city">{{addr.provinceName}}{{addr.cityName}}{{addr.areaName}}</view> |
| | | <view wx:else class="placeholder9 city">è¯·éæ©å°åº</view> |
| | | <image class="arrow_right" src="../../static/icon/arrow_right.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="btn" bindtap="onSubmit">ç«å³æ¥å</view> |
| | | </view> |
| | | <image class="banner" src="{{ WechatIMG558 }}" mode="widthFix"></image> |
| | | <!-- --> |
| | | <van-cascader wx:if="{{ showAreaList }}" value="{{ cascaderValue }}" title="è¯·éæ©æå¨å°åº" options="{{ areaList }}" bind:close="onClose" bind:finish="onFinish" /> |
| | | <van-popup show="{{ showAreaList }}" bind:close="onClose" round position="bottom"> |
| | | <van-cascader field-names="{{ fieldNames }}" value="{{ cascaderValue }}" title="è¯·éæ©æå¨å°åº" options="{{ areaList }}" bind:close="onClose" bind:finish="onFinish" /> |
| | | </van-popup> |
| | | |
| | | </view> |
| | |
| | | import { shareContent } from '../../api/index' |
| | | import { actionDo, getWholecaseInfo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getDetail(options.id) |
| | | // actionDo({ |
| | | // actionType: 'view', |
| | | // id: options.id |
| | | // }) |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({id: options.id, member}) |
| | | }, |
| | | |
| | | priviewFull(){ |
| | | let { panorama: link, title } = this.data.info |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function(res) { |
| | | // éè¿eventChannelå被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link, title }) |
| | | } |
| | | }) |
| | | }, |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | }, |
| | |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | 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}) |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | getWholecaseInfo({id}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | }) |
| | | }, |
| | | handleDesign() { |
| | | wx.navigateTo({ |
| | | url: '/pages/design/design', |
| | | }) |
| | | }, |
| | | playVideo() { |
| | | wx.previewMedia({ |
| | | sources: [{ url: this.data.info.video, type: 'video' }] |
| | | }) |
| | | }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | }, |
| | |
| | | { |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "mp-html": "mp-html" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | } |
| | | |
| | | .fullview_wrap { |
| | | position: relative; |
| | | .banner { |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | } |
| | | .full{ |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 32rpx; |
| | | font-size: 20rpx; |
| | | color: rgba(255,255,255,0.8); |
| | | width: 112rpx; |
| | | height: 42rpx; |
| | | background: rgba(0,0,0,0.54); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | .icon{ |
| | | width: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | .list{ |
| | | .item{ |
| | | .content{ |
| | | margin-top: 20rpx; |
| | | font-weight: 300; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | <view class="container"> |
| | | <view class="main_title">ç®æ¬§é£æ ¼70m²两å±
室</view> |
| | | <view class="time">å叿¶é´ï¼2021-08-21 10:0</view> |
| | | <view class="main_title">{{ info.title }}</view> |
| | | <view class="time">å叿¶é´ï¼{{ info.publishDt }}</view> |
| | | <view class="fullview_wrap"> |
| | | <image class="banner" src="../../static/icon/test.png" mode="widthFix"></image> |
| | | <view bindtap="priviewFull" wx:if="{{ info.panorama }}" class="full"> |
| | | <image class="icon" src="../../static/icon/ic_720.png" mode="widthFix"></image> |
| | | <text>å
¨æ¯</text> |
| | | </view> |
| | | <image class="banner" src="{{ info.coverImage }}" mode="widthFix"></image> |
| | | </view> |
| | | <view class="h1">å¸ç½®å¾</view> |
| | | <image class="img" src="../../static/icon/test.png" mode="widthFix"></image> |
| | | <image class="img" src="{{ info.layoutUlr }}" mode="widthFix"></image> |
| | | <view class="analysis"> |
| | | <view class="h2">æ¡ä¾è§£æ</view> |
| | | <view class="text">为ä¿çå
¥æ·çå¨çº³ç©ºé´ï¼å°å«çé´çé¨ç§»å¨ä¸æ®µè·ç¦»ï¼æ¹ä¾¿äºå
¥æ·è´µç设置ï¼å¨ç©é´å°éå主å§è¡£å¸½é´ï¼å¢å 空é´ä½¿ç¨çåæ¿å±æ´ä½æ§ã客å
çæ ¼å±è®¾è®¡å¢å äºç©ºé´ç屿¬¡æã</view> |
| | | <view class="text">{{ info.caseInfo }}</view> |
| | | </view> |
| | | <view class="list"> |
| | | <view class="item"> |
| | | <view class="h1">01.客å
</view> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="h1">01.客å
</view> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="h1">01.客å
</view> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | <view wx:for="{{ info.apiSpaceCaseVos }}" class="item"> |
| | | <view class="h1">{{ item.spaceName }}</view> |
| | | <image class="img" wx:for="{{ item.imgList }}" wx:for-item="img" src="{{ img }}" mode="widthFix" /> |
| | | <view class="content">{{ item.spaceDesc }}</view> |
| | | </view> |
| | | </view> |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <view class="item"> |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <button class="item btn"> |
| | | <image data-code="like_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </view> |
| | | <view class="item" bindtap="openShare"> |
| | | </button> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">å享</view> |
| | | </view> |
| | | <view class="sub_btn"> |
| | | </button> |
| | | <view class="sub_btn" bindtap="handleDesign"> |
| | | <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image> |
| | | <view>å
è´¹é¢çº¦ä¸å±è®¾è®¡</view> |
| | | </view> |
| | |
| | | color: #999999; |
| | | margin-bottom: 48rpx; |
| | | } |
| | | .container .fullview_wrap { |
| | | position: relative; |
| | | } |
| | | .container .fullview_wrap .banner { |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | } |
| | | .container .fullview_wrap .full { |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 32rpx; |
| | | font-size: 20rpx; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | width: 112rpx; |
| | | height: 42rpx; |
| | | background: rgba(0, 0, 0, 0.54); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .container .fullview_wrap .full .icon { |
| | | width: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | .container .img { |
| | | width: 100%; |
| | |
| | | color: #333333; |
| | | } |
| | | .container .list .item .content { |
| | | margin-top: 20rpx; |
| | | font-weight: 300; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | .container .list .item .img { |
| | | width: 100%; |
| | | } |
| | | .spaceList .item { |
| | | margin-bottom: 60rpx; |
| | | } |
| | |
| | | actionType, |
| | | id: this.data.info.id |
| | | }).then(res => { |
| | | info.isCollection = info.isCollection || info.isCollection == 'true' ? 'false' : 'true' |
| | | info.isCollection = !info.isCollection |
| | | this.setData({info}) |
| | | }) |
| | | }, |
| | |
| | | import { shareContent } from '../../api/index' |
| | | import { getRealcaseInfo, actionDo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | */ |
| | | data: { |
| | | bottomLift: 0, |
| | | id: '', |
| | | info: {}, |
| | | member: {}, |
| | | showShare: false |
| | | }, |
| | | |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getDetail(options.id) |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: options.id |
| | | }) |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({id: options.id, member}) |
| | | }, |
| | | 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}) |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | getRealcaseInfo({id}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | }) |
| | | }, |
| | | playVideo() { |
| | | wx.previewMedia({ |
| | | sources: [{ url: this.data.info.video, type: 'video' }] |
| | | }) |
| | | }, |
| | | bannerbindload(e) { |
| | | const { height, width } = e.detail |
| | | let activeHeight = height * 670 / width |
| | | this.setData({ |
| | | bannerHeight: activeHeight |
| | | }) |
| | | }, |
| | | handleDesign() { |
| | | wx.navigateTo({ |
| | | url: '/pages/design/design', |
| | | }) |
| | | }, |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | }, |
| | | handleShare() { |
| | | console.log('ç¹å»äºå享'); |
| | | shareContent(this.data.info.id) |
| | | actionDo({ actionType: 'share', id: this.data.info.id }) |
| | | // shareContent({id: this.data.info.id || this.data.id}).then(res => { |
| | | // this.setData({showShare: false}) |
| | | // }) |
| | | }, |
| | | // onShareAppMessage: function () { |
| | | // // let { productDetail, userInfo } = this.data |
| | |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | handleDown() { |
| | | let { info } = this.data |
| | | wx.showToast({ |
| | | title: 'ä¸è½½ä¸', |
| | | icon: 'loading' |
| | | }) |
| | | console.log('info.picUrls', info) |
| | | wx.downloadFile({ |
| | | url: info.picUrls, |
| | | success (res) { |
| | | // console.log(res) |
| | | wx.saveImageToPhotosAlbum({ |
| | | filePath: res.tempFilePath, |
| | | success(data) { |
| | | that.toSaveCaseShare() |
| | | wx.showToast({ |
| | | title: 'ä¸è½½æå', |
| | | }) |
| | | }, |
| | | fail(error) { |
| | | console.log(error) |
| | | wx.showToast({ |
| | | title: 'ä¸è½½å¤±è´¥', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | fail (err) { |
| | | console.log(err.errMsg) |
| | | wx.showToast({ |
| | | title: 'ä¸è½½å¤±è´¥', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | |
| | | .container { |
| | | padding: 0 40rpx 220rpx; |
| | | |
| | | .info_item{ |
| | | width: 100%; |
| | | } |
| | | .main_title { |
| | | font-weight: 500; |
| | | font-size: 44rpx; |
| | |
| | | <view class="container"> |
| | | <view class="main_title">ç®æ¬§é£æ ¼70m²两å±
室</view> |
| | | <view class="time">å叿¶é´ï¼2021-08-21 10:0</view> |
| | | <view class="list"> |
| | | <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> |
| | | <view>{{ info.contentText || '' }}</view> |
| | | <!-- <view class="list"> |
| | | <view class="item"> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | <view class="item"> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | <view class="item"> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <view class="item"> |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <button class="item btn"> |
| | | <image data-code="like_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </view> |
| | | <view class="item" bindtap="openShare"> |
| | | </button> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">å享</view> |
| | | </view> |
| | | <view class="sub_btn"> |
| | | </button> |
| | | <view class="sub_btn" bindtap="handleDesign"> |
| | | <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image> |
| | | <view>å
è´¹é¢çº¦ä¸å±è®¾è®¡</view> |
| | | </view> |
| | |
| | | .container { |
| | | padding: 0 40rpx 220rpx; |
| | | } |
| | | .container .info_item { |
| | | width: 100%; |
| | | } |
| | | .container .main_title { |
| | | font-weight: 500; |
| | | font-size: 44rpx; |
| | |
| | | */ |
| | | data: { |
| | | menuButtonInfo: {}, |
| | | catalogCode: "whole_case" |
| | | catalogCode: "product_intro", |
| | | activeCate: '' |
| | | }, |
| | | onLoad(options) { |
| | | let menuButtonInfo = wx.getMenuButtonBoundingClientRect(); |
| | |
| | | .main_tab{ |
| | | position: relative; |
| | | display: flex; |
| | | align-items: flex-end; |
| | | height: 88rpx; |
| | |
| | | } |
| | | } |
| | | } |
| | | .home_tab{ |
| | | position: fixed; |
| | | z-index: 999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .container{ |
| | | } |
| | | .main_content{ |
| | | padding-top: 200rpx; |
| | | } |
| | |
| | | <view class="container"> |
| | | <view style="height: {{ menuButtonInfo.top }}px;"></view> |
| | | <view class="main_tab"> |
| | | <view class="item {{ catalogCode == 'product_intro' ? 'active' : '' }}" data-code="product_intro" bindtap="tabsClick"> |
| | | <view class="name">产å</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ catalogCode == 'whole_case' ? 'active' : '' }}" data-code="whole_case" bindtap="tabsClick"> |
| | | <view class="name">æ¡ä¾</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ catalogCode == 'real_case' ? 'active' : '' }}" data-code="real_case" bindtap="tabsClick"> |
| | | <view class="name">宿¯</view> |
| | | <view class="border"></view> |
| | | <view class="home_tab"> |
| | | <view style="height: {{ menuButtonInfo.top }}px;"></view> |
| | | <view class="main_tab"> |
| | | <view class="item {{ catalogCode == 'product_intro' ? 'active' : '' }}" data-code="product_intro" bindtap="tabsClick"> |
| | | <view class="name">产å</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ catalogCode == 'whole_case' ? 'active' : '' }}" data-code="whole_case" bindtap="tabsClick"> |
| | | <view class="name">æ¡ä¾</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ catalogCode == 'real_case' ? 'active' : '' }}" data-code="real_case" bindtap="tabsClick"> |
| | | <view class="name">宿¯</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content" style="height: calc( 100vh - {{menuButtonInfo.top}}px - 88rpx )"> |
| | | <disProduct wx:if="{{ catalogCode == 'product_intro' }}" /> |
| | | <disProduct catalogCode="{{activeCate}}" wx:if="{{ catalogCode == 'product_intro' }}" /> |
| | | <disCase wx:if="{{ catalogCode == 'whole_case' }}" /> |
| | | <disRealpic wx:if="{{ catalogCode == 'real_case' }}" /> |
| | | </view> |
| | |
| | | .main_tab { |
| | | position: relative; |
| | | display: flex; |
| | | align-items: flex-end; |
| | | height: 88rpx; |
| | |
| | | .main_tab .active .border { |
| | | background: linear-gradient(270deg, rgba(255, 255, 255, 0.56) 0%, rgba(206, 144, 111, 0.88) 100%); |
| | | } |
| | | .home_tab { |
| | | position: fixed; |
| | | z-index: 999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .main_content { |
| | | padding-top: 200rpx; |
| | | } |
| | |
| | | this.getList() |
| | | }, |
| | | itemClick(e) { |
| | | const { id } = e.target.dataset |
| | | console.log(e.target.dataset); |
| | | wx.navigateTo({ |
| | | url: '/pages/consult/detail', |
| | | }) |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | if(item.contentType == 'video'){ |
| | | wx.previewMedia({ |
| | | sources: [{ url: item.content, type: 'video' }] |
| | | }) |
| | | } |
| | | if(item.contentType == 'link'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.content, |
| | | }) |
| | | } |
| | | if(item.contentType == 'page'){ |
| | | getApp().globalData.catalogCode=item.content |
| | | wx.switchTab({ |
| | | url: '/pages/discover/discover' |
| | | }) |
| | | } |
| | | }, |
| | | cateClick(e) { |
| | | const { code } = e.target.dataset |
| | |
| | | const { code, tagCodes, pageSize, pageNum } = this.data |
| | | pageZSZXContentList({ |
| | | catalogCode: code, |
| | | tagCodes, |
| | | tagCodes: tagCodes ? [tagCodes] : [], |
| | | pageSize, |
| | | pageNum |
| | | }).then(res => { |
| | |
| | | .container { |
| | | background-color: #fff; |
| | | } |
| | | .home_tabs{ |
| | | height: 80rpx; |
| | | position: fixed; |
| | | background-color: #fff; |
| | | } |
| | | .search_wrap{ |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | |
| | | } |
| | | } |
| | | .content{ |
| | | padding: 0 40rpx 40rpx; |
| | | padding: 80rpx 40rpx 40rpx; |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | |
| | | <view class="container"> |
| | | |
| | | <!-- åç±» --> |
| | | <view> |
| | | <view class="home_tabs"> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-code="{{item.labelValueCode}}" wx:for="{{ tagList }}" class="item {{ tagCodes == item.labelValueCode ? 'active': '' }}">{{ item.labelValueName }}</view> |
| | |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-abg="qwe"> |
| | | <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"> |
| | |
| | | .container { |
| | | background-color: #fff; |
| | | } |
| | | .home_tabs { |
| | | height: 80rpx; |
| | | position: fixed; |
| | | background-color: #fff; |
| | | } |
| | | .search_wrap { |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | |
| | | font-weight: 400; |
| | | } |
| | | .content { |
| | | padding: 0 40rpx 40rpx; |
| | | padding: 80rpx 40rpx 40rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | |
| | | }, |
| | | changePath(e) { |
| | | let index = e.currentTarget.dataset.type |
| | | let that = this |
| | | switch (index) { |
| | | case '0': |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function (res) { |
| | | // éè¿eventChannelå被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: this.data.testUrl }) |
| | | // saveBehavior({ type: 1 }) |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: that.data.testUrl }) |
| | | } |
| | | }) |
| | | break; |
| | |
| | | // èµè®¯ |
| | | getZhongTaiProductNewsPage({ |
| | | catalogCode: 'product_info', |
| | | pageSize: 5, pageNum: 1 |
| | | pageSize: 6, pageNum: 1 |
| | | }).then(res => { |
| | | if(res.data){ |
| | | this.setData({ consultList: res.data.records }) |
| | |
| | | }, |
| | | bannerClick(e) { |
| | | const { id } = e.currentTarget.dataset |
| | | getHomeBannerDetail({id}) |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | if(item.openType == 'video'){ |
| | | wx.previewMedia({ |
| | | sources: [{ url: item.openContent, type: 'video' }] |
| | | }) |
| | | } |
| | | if(item.openType == 'link'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.openContent, |
| | | }) |
| | | } |
| | | if(item.openType == 'page'){ |
| | | getApp().globalData.catalogCode=item.openContent |
| | | wx.switchTab({ |
| | | url: '/pages/discover/discover' |
| | | }) |
| | | } |
| | | // getHomeBannerDetail({id}) |
| | | }, |
| | | seriveClick(e) { |
| | | const { id, title } = e.currentTarget.dataset |
| | |
| | | |
| | | // 产åè§é¢ |
| | | .product_video { |
| | | padding: 72rpx 40rpx; |
| | | padding: 40rpx 40rpx; |
| | | background-color: #fff; |
| | | |
| | | .video_wrap { |
| | |
| | | } |
| | | |
| | | .strategy { |
| | | padding: 80rpx 40rpx; |
| | | padding: 40rpx 40rpx; |
| | | background: #F7F7F7; |
| | | |
| | | .item { |
| | |
| | | |
| | | // å¨è¯¢ |
| | | .consult { |
| | | padding: 80rpx 40rpx 60rpx; |
| | | padding: 40rpx 40rpx 60rpx; |
| | | background: #fff; |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | } |
| | | .auth{ |
| | | background-color: #fff; |
| | | } |
| | | .home_title{ |
| | | font-weight: 600; |
| | | font-size: 38rpx; |
| | | } |
| | | |
| | | .top-head-transparent { |
| | | background-color: transparent !important; |
| | |
| | | <view class="container"> |
| | | <van-nav-bar wx:if="{{ showWhiteHead }}" border="{{ topHeadBorder }}" custom-class="top-head" fixed custom-style="opacity: {{ topHeadStyle }}"> |
| | | <view slot="left" class="flex-cc search"> |
| | | <text style="color: {{font_color}};">å¿é¦å®¶é</text> |
| | | <text class="home_title" style="color: {{font_color}};">å¿é¦å®¶é</text> |
| | | <van-icon name="search" size="23px" color="#fff" /> |
| | | <!-- <image src="/static/icon/home_ic_search_black.png" mode="widthFix"></image> --> |
| | | <!-- <text>æç´¢</text> --> |
| | |
| | | </van-nav-bar> |
| | | <van-nav-bar wx:else border="{{ topHeadBorder }}" custom-class="top-head-transparent" fixed> |
| | | <view slot="left" class="flex-cc search"> |
| | | <text style="color: {{font_color}};">å¿é¦å®¶é</text> |
| | | <text class="home_title" style="color: {{font_color}};">å¿é¦å®¶é</text> |
| | | </view> |
| | | </van-nav-bar> |
| | | <!-- bannerè½®æ --> |
| | | <swiper class="banner_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" style="height:{{bannerImgHeight}}rpx" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ bannerList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <image data-id="{{ item.id }}" bindtap="bannerClick" bindload="bannerbindload" mode="widthFix" src="{{ item.coverImage }}"></image> |
| | | <image data-item="{{ item }}" data-id="{{ item.id }}" bindtap="bannerClick" bindload="bannerbindload" mode="widthFix" src="{{ item.coverImage }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <authCard type="{{ member.authStatus }}" /> |
| | | <view class="auth"> |
| | | <authCard type="{{ member.authStatus }}" /> |
| | | </view> |
| | | <!-- <authCard type="1" /> --> |
| | | <!-- 产åè§é¢ --> |
| | | <view class="product_video"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="line_left item" data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy"> |
| | | <view class="line_left item" data-item="{{ ZSZXCata.qwsj }}" bindtap="changeStrategy"> |
| | | <image src="{{HOME_CLASS_A}}"></image> |
| | | <text>{{ ZSZXCata.jdId.name }}</text> |
| | | <text>{{ ZSZXCata.qwsj.name }}</text> |
| | | </view> |
| | | <view class="line_right"> |
| | | <view class="item" data-item="{{ ZSZXCata.cfsj }}" bindtap="changeStrategy"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view data-item="{{ ZSZXCata.qwsj.code }}" bindtap="changeStrategy" class="home_id item"> |
| | | <view data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy" class="home_id item"> |
| | | <image src="{{HOME_CLASS_C}}"></image> |
| | | <text>{{ ZSZXCata.qwsj.name }}</text> |
| | | <text>{{ ZSZXCata.jdId.name }}</text> |
| | | </view> |
| | | </view> |
| | | <!-- å¨è¯¢ --> |
| | |
| | | <block wx:for="{{ consultList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <image bindload="consultbindload" mode="widthFix" src="{{ item.coverImage }}"></image> |
| | | |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | |
| | | color: #666666; |
| | | } |
| | | .container .product_video { |
| | | padding: 72rpx 40rpx; |
| | | padding: 40rpx 40rpx; |
| | | background-color: #fff; |
| | | } |
| | | .container .product_video .video_wrap { |
| | |
| | | width: 100%; |
| | | } |
| | | .container .strategy { |
| | | padding: 80rpx 40rpx; |
| | | padding: 40rpx 40rpx; |
| | | background: #F7F7F7; |
| | | } |
| | | .container .strategy .item { |
| | |
| | | margin-top: 24rpx; |
| | | } |
| | | .container .consult { |
| | | padding: 80rpx 40rpx 60rpx; |
| | | padding: 40rpx 40rpx 60rpx; |
| | | background: #fff; |
| | | } |
| | | .container .service { |
| | |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | .auth { |
| | | background-color: #fff; |
| | | } |
| | | .home_title { |
| | | font-weight: 600; |
| | | font-size: 38rpx; |
| | | } |
| | | .top-head-transparent { |
| | | background-color: transparent !important; |
| | | } |
| | |
| | | const res = wx.getMenuButtonBoundingClientRect() |
| | | this.setData({clientHeight: res.height}) |
| | | this.setData({clientTop: res.top}) |
| | | |
| | | }, |
| | | onShow(){ |
| | | this.initData() |
| | | }, |
| | | initData() { |
| | |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | |
| | | <view class="navbar" style="padding-top: {{ clientTop }}px;height: {{clientHeight + clientTop}}px;">æçå®¶</view> |
| | | <image class="mine_bg" src="{{ MINE_BG }}" mode="widthFix"></image> |
| | | <view class="userinfo"> |
| | | <image class="avatar" src="{{ imgurlFull ? imgurlFull : '../../static/images/default_avatar.png' }}"></image> |
| | | <image class="avatar" src="{{ member.imgurl ? member.prefix + member.imgurl : '../../static/images/default_avatar.png' }}"></image> |
| | | <view class="content"> |
| | | <view class="header"> |
| | | <view class="name">{{ member.nickname }}</view> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { getProductNewsInfo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | info: {} |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | this.getDetail(options.id) |
| | | }, |
| | | getDetail(id) { |
| | | getProductNewsInfo({id}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | }) |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "mp-html": "mp-html" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <view> |
| | | <mp-html content="{{info.content}}"></mp-html> |
| | | </view> |
| | |
| | | */ |
| | | data: { |
| | | bottomLift: 0, |
| | | isShow: false, |
| | | isShow: true, |
| | | |
| | | info: {} |
| | | }, |
| | |
| | | url: `/pages/store/info?id=${id}`, |
| | | }) |
| | | }, |
| | | userDetail(e) { |
| | | const iamId = e.currentTarget.dataset.id |
| | | wx.navigateTo({ |
| | | url: `/pages/store/staff?id=${iamId}`, |
| | | }) |
| | | }, |
| | | makePhone(e) { |
| | | console.log('e', e); |
| | | const phoneNumber = e.currentTarget.dataset.phone |
| | |
| | | .left{ |
| | | flex: 1; |
| | | .title{ |
| | | width: 520rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | width: 100%; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | overflow: hidden;//ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | .address{ |
| | | width: 520rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | overflow: hidden;//ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | font-size: 26rpx; |
| | | color: #888888; |
| | |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | text-align: center; |
| | | margin-left: 80rpx; |
| | | margin-left: 20rpx; |
| | | .phone{ |
| | | width: 60rpx; |
| | | margin-bottom: 4rpx; |
| | |
| | | <view class="left"> |
| | | <view class="title" data-id="{{ item.id }}" bindtap="handleDetail">{{ item.name }}</view> |
| | | <view class="address" data-id="{{ item.id }}" bindtap="handleDetail"> |
| | | <text wx:if="{{ item.distanceStr }}">{{ item.distanceStr }} | {{ item.address || '' }}</text> |
| | | <text wx:if="{{ item.distanceStr }}">ådasdé£é£å®å¾·æ£®å宿å®ç{{ item.distanceStr }} | {{ item.address || '' }}</text> |
| | | <text wx:else>--</text> |
| | | <image src="../../static/icon/arrow_right.png" mode="widthFix"></image> |
| | | </view> |
| | |
| | | </view> |
| | | <scroll-view scroll-x style="width: 640rpx"> |
| | | <view class="user_list"> |
| | | <view class="item" wx:for="{{ item.usersList }}" wx:for-item="user"> |
| | | <view bindtap="userDetail" data-id="{{ item.iamId }}" class="item" wx:for="{{ item.usersList }}" wx:for-item="user"> |
| | | <view class="info"> |
| | | <image class="avatar" src="{{ user.imgurlFull }}" mode="widthFix"></image> |
| | | <view class="text"> |
| | |
| | | flex: 1; |
| | | } |
| | | .main_content .shops .shop .header .left .title { |
| | | width: 520rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | width: 100%; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | .main_content .shops .shop .header .left .address { |
| | | width: 520rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | white-space: nowrap; |
| | |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | text-align: center; |
| | | margin-left: 80rpx; |
| | | margin-left: 20rpx; |
| | | } |
| | | .main_content .shops .shop .header .right .phone { |
| | | width: 60rpx; |
| | |
| | | // pages/userinfo/collect.js |
| | | import { |
| | | collectLikePage |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | activeTabs: '0' |
| | | }, |
| | | activeTabs: 'product_intro', |
| | | |
| | | tabsChange(e) { |
| | | const activeTabs = e.currentTarget.dataset.val |
| | | this.setData({ activeTabs }) |
| | | }, |
| | | handleDetail(e) { |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/product', |
| | | }) |
| | | dataList: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }, |
| | | onLoad(options) { |
| | | |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | | if(this.data.total > this.data.dataset.length){ |
| | | this.setData({ pageNum: this.data.pageNum + 1 }) |
| | | this.getList() |
| | | } |
| | | // this.pageN |
| | | }, |
| | | tabsChange(e) { |
| | | const activeTabs = e.currentTarget.dataset.val |
| | | this.setData({ |
| | | activeTabs, |
| | | dataList: [],total: 0,pageNum: 1 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | handleDetail(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | const { activeTabs } = this.data |
| | | let url = '' |
| | | if(activeTabs == 'product_intro'){ |
| | | url = '/pages/detailDis/product' |
| | | }else if(activeTabs == 'whole_case'){ |
| | | url = '/pages/detailDis/case' |
| | | }else{ |
| | | url = '/pages/detailDis/realpic' |
| | | } |
| | | wx.navigateTo({ |
| | | url: `${url}?id=${id}`, |
| | | }) |
| | | }, |
| | | getList() { |
| | | const { |
| | | pageSize, |
| | | pageNum, |
| | | activeTabs |
| | | } = this.data |
| | | collectLikePage({ |
| | | businessCategory: 'collect', |
| | | businessType: activeTabs, |
| | | pageSize, |
| | | pageNum |
| | | }).then(res => { |
| | | if (res.data) { |
| | | this.setData({ |
| | | dataList: [...this.data.dataset, ...res.data.records || []], |
| | | total: res.data.total |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | |
| | | <view class="container"> |
| | | <view class="tabs"> |
| | | <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-val="0" bindtap="tabsChange"> |
| | | <view class="item {{ activeTabs == 'product_intro' ? 'active' : '' }}" data-val="product_intro" bindtap="tabsChange"> |
| | | <view class="name">产å</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-val="1" bindtap="tabsChange"> |
| | | <view class="item {{ activeTabs == 'whole_case' ? 'active' : '' }}" data-val="whole_case" bindtap="tabsChange"> |
| | | <view class="name">æ¡ä¾</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ activeTabs == '2' ? 'active' : '' }}" data-val="2" bindtap="tabsChange"> |
| | | <view class="item {{ activeTabs == 'real_case' ? 'active' : '' }}" data-val="real_case" bindtap="tabsChange"> |
| | | <view class="name">宿¯</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | </view> |
| | | <view class="list"> |
| | | <view class="item" bindtap="handleDetail"> |
| | | <view data-id="{{ item.id }}" wx:for="{{ dataList }}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | <image src="{{ item.thumbnailUrl }}" class="img"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="name">é¢ç´æ²</view> |
| | | <view class="info"> |
| | | <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">34</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | </view> |
| | | </view> |
| | | <view class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="name">é¢ç´æ²</view> |
| | | <view class="info"> |
| | | <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">34</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | </view> |
| | | </view> |
| | | <view class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="name">é¢ç´æ²</view> |
| | | <view class="name">{{ item.displayName }}</view> |
| | | <view class="info"> |
| | | <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | |
| | | import { |
| | | uploadUrl, |
| | | editMember, |
| | | getMemberInfo |
| | | getMemberInfo, |
| | | getArea |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | |
| | | longitude: '', |
| | | district: '', |
| | | housearea: '', |
| | | // åå¸ãå°å |
| | | region: [], |
| | | |
| | | addr: {}, |
| | | areaData: [], |
| | | |
| | | showHouseType: false, |
| | | houseType: { |
| | |
| | | longitude, |
| | | district, |
| | | housearea, |
| | | houseType |
| | | houseType, |
| | | addr |
| | | } = this.data |
| | | if (!nickname) return wx.showToast({ |
| | | title: '请è¾å
¥æµç§°', |
| | | icon: 'none' |
| | | }) |
| | | editMember({ |
| | | ...addr, |
| | | imgurl: imgurl || '', |
| | | name: name || '', |
| | | nickname: nickname || '', |
| | |
| | | longitude: res.data.longitude || '', |
| | | district: res.data.district || '', |
| | | housearea: res.data.housearea || '', |
| | | addr: { |
| | | provinceCode: res.data.provinceCode, |
| | | provinceName: res.data.provinceName, |
| | | cityCode: res.data.cityCode, |
| | | cityName: res.data.cityName, |
| | | areaCode: res.data.areaCode, |
| | | areaName: res.data.areaName, |
| | | } |
| | | |
| | | }) |
| | | }) |
| | | getArea().then(res => { |
| | | this.setData({ areaData: res.data }) |
| | | }) |
| | | }, |
| | | positionChange (e) { |
| | | console.log(e.detail.value) |
| | | const names = e.detail.value |
| | | const codes = e.detail.code |
| | | let addr = { |
| | | provinceCode: codes[0] + '00', |
| | | provinceName: names[0], |
| | | cityCode: codes[1] + '00', |
| | | cityName: names[1], |
| | | areaCode: codes[2] + '00', |
| | | areaName: names[2], |
| | | } |
| | | this.setData({ addr }) |
| | | }, |
| | | bindRegionChange(e) { |
| | | console.log('pickeråééæ©æ¹åï¼æºå¸¦å¼ä¸º', e.detail.value) |
| | | const temp = e.detail.value |
| | | this.setData({ |
| | | region: e.detail.value |
| | | }) |
| | | }, |
| | | changeAddr() { |
| | |
| | | address: res.address, |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | bindRegionChange(e) { |
| | | console.log('pickeråééæ©æ¹åï¼æºå¸¦å¼ä¸º', e.detail.value) |
| | | this.setData({ |
| | | region: e.detail.value |
| | | }) |
| | | }, |
| | | openHouse() { |
| | |
| | | <view class="label">åå¸</view> |
| | | <view class="val"> |
| | | <view class="df_ac"> |
| | | <picker mode="region" bindchange="bindRegionChange" value="{{region}}"> |
| | | <view class="picker {{ region.length > 0 ? '' : 'placeholder9' }}"> |
| | | {{ region.length == 0 ? 'éæ©åå¸' : '' }}{{region[0]}}{{region[1]}}{{region[2]}} |
| | | <picker mode="region" value="{{ addr }}" bindchange="bindRegionChange" bindchange="positionChange"> |
| | | <view class="placeholder9" hidden="{{ addr.cityName }}">è¯·éæ©å°å</view> |
| | | <view class="picker" hidden="{{ !addr.cityName }}"> |
| | | {{ addr.provinceName }}{{ addr.cityName }}{{ addr.areaName }} |
| | | </view> |
| | | </picker> |
| | | </view> |
| | |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | activeTabs: '0', |
| | | activeTabs: '1', |
| | | |
| | | dataList: [], |
| | | total: 0, |
| | |
| | | this.getList() |
| | | }, |
| | | getList() { |
| | | const { page, capacity} = this.data |
| | | const { page, capacity, activeTabs} = this.data |
| | | customerLogPage({ |
| | | model: {},page,capacity |
| | | model: { |
| | | type: activeTabs |
| | | },page,capacity |
| | | }).then(res => { |
| | | this.setData({ dataList: res.data.records }) |
| | | }) |
| | | }, |
| | | tabsChange(e) { |
| | | const activeTabs = e.currentTarget.dataset.val |
| | | this.setData({ activeTabs }) |
| | | this.setData({ activeTabs, dataList: [], total: 0, page: 0, }) |
| | | this.getList() |
| | | }, |
| | | |
| | | /** |
| | |
| | | <view class="name">éæ±</view> |
| | | <view class="border"></view> |
| | | </view> --> |
| | | <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-val="1" bindtap="tabsChange"> |
| | | <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-val="1" bindtap="tabsChange"> |
| | | <view class="name">é¢çº¦éå°º</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-val="2" bindtap="tabsChange"> |
| | | <view class="item {{ activeTabs == '2' ? 'active' : '' }}" data-val="2" bindtap="tabsChange"> |
| | | <view class="name">é¢ç®</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | </view> |
| | | <view class="list"> |
| | | <view class="item"> |
| | | <view class="item" wx:for="{{ dataList }}"> |
| | | <view class="header"> |
| | | <view class="name">name</view> |
| | | <view class="phone">198898</view> |
| | | <view class="name">{{ item.name }}</view> |
| | | <view class="phone">{{ item.phone }}</view> |
| | | </view> |
| | | <block wx:if="{{ false }}"> |
| | | <view class="line"> |
| | | <view class="label"><text class="spe">æ§</text>å«</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"><text class="spe">å¹´</text>é¾</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <block wx:if="{{ activeTabs == '1' }}"> |
| | | <view class="line"> |
| | | <view class="label">æå¨åå¸</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">æ·åä¿¡æ¯</view> |
| | | <view class="val">ç·</view> |
| | | <view class="val"> |
| | | <text>{{ item.provinceName }}{{ item.cityName }}{{ item.areaName || '' }}</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | <!-- é¢ç® --> |
| | | <block wx:if="{{ true }}"> |
| | | <block wx:else> |
| | | <view class="line"> |
| | | <view class="label">æ¿å±ç±»å</view> |
| | | <view class="val">ç·</view> |
| | | <view class="val">{{ item.houseStatus == '0' ? 'ç²¾è£
' : 'æ¯å¯' }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">æ·åä¿¡æ¯</view> |
| | | <view class="val">ç·</view> |
| | | <view wx:if="{{ item.houseType == '0' }}" class="val">ä¸å®¤ä¸å
</view> |
| | | <view wx:if="{{ item.houseType == '1' }}" class="val">äºå®¤ä¸å
</view> |
| | | <view wx:if="{{ item.houseType == '2' }}" class="val">两室两å
</view> |
| | | <view wx:if="{{ item.houseType == '3' }}" class="val">ä¸å®¤ä¸å
</view> |
| | | <view wx:if="{{ item.houseType == '4' }}" class="val">å室ä¸å
</view> |
| | | <view wx:if="{{ item.houseType == '5' }}" class="val">äºå®¤ä¸¤å
å以ä¸</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">æ¿å±é¢ç§¯</view> |
| | | <view class="val">ç·</view> |
| | | <view class="val">{{ item.area }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">è£
ä¿®é¢ç®</view> |
| | | <view class="label">{{ item.budget }}</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | </block> |
| | | <view class="time"> |
| | | <view>æäº¤æ¶é´ï¼123213</view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="header"> |
| | | <view class="name">name</view> |
| | | <view class="phone">198898</view> |
| | | </view> |
| | | <block wx:if="{{ false }}"> |
| | | <view class="line"> |
| | | <view class="label"><text class="spe">æ§</text>å«</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"><text class="spe">å¹´</text>é¾</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">æå¨åå¸</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">æ·åä¿¡æ¯</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | </block> |
| | | <!-- é¢ç® --> |
| | | <block wx:if="{{ true }}"> |
| | | <view class="line"> |
| | | <view class="label">æ¿å±ç±»å</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">æ·åä¿¡æ¯</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">æ¿å±é¢ç§¯</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">è£
ä¿®é¢ç®</view> |
| | | <view class="val">ç·</view> |
| | | </view> |
| | | </block> |
| | | <view class="time"> |
| | | <view>æäº¤æ¶é´ï¼123213</view> |
| | | <view>æäº¤æ¶é´ï¼{{ item.crmDate }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | // pages/webView/index.js |
| | | // import Ls from '../../utils/storage' |
| | | // let ls = new Ls() |
| | | // import { saveBannerLookNum } from '../../api/index' |
| | | // import { decodePhone, bindPhone, memberUpdate } from '../../api/index' |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | hasUserInfo: true, |
| | | userInfo: {}, |
| | | id: '', |
| | | link: 'https://m.zbom.com/mobile/styleTest.html?type=1' |
| | | link: '' |
| | | }, |
| | | |
| | | // æ´æ°ç¨æ·ä¿¡æ¯ |
| | | toLogin() { |
| | | let that = this |
| | | wx.getUserProfile({ |
| | | desc: 'ç¨äºå®åä¼åèµæ', // 声æè·åç¨æ·ä¸ªäººä¿¡æ¯åçç¨éï¼åç»ä¼å±ç¤ºå¨å¼¹çªä¸ï¼è¯·è°¨æ
å¡«å |
| | | success: (wxInfo) => { |
| | | // console.log(wxInfo) |
| | | let { nickName: name, avatarUrl: imgurl, gender } = wxInfo.userInfo |
| | | let sex |
| | | switch (gender) { |
| | | case 0: |
| | | sex = '' |
| | | break; |
| | | |
| | | case 1: |
| | | sex = 0 |
| | | break; |
| | | |
| | | case 2: |
| | | sex = 1 |
| | | break; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | memberUpdate({ name, imgurl, sex }).then(res => { |
| | | ls.set('userInfo', res.member) |
| | | that.getWxUserInfo() |
| | | that.toSever() |
| | | }) |
| | | }, |
| | | fail: (err) => { |
| | | console.log(err) |
| | | wx.showToast({ |
| | | title: 'ææå¤±è´¥', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åç¨æ·idåææºå· |
| | | bindgetphonenumber(e) { |
| | | // ç¨æ·æç» |
| | | let that = this |
| | | // ç¨æ·åæ |
| | | if (e.detail.errMsg === 'getPhoneNumber:ok') { |
| | | decodePhone({ code: e.detail.code }).then(res => { |
| | | if (res.phone === undefined || res.phone.length === null || !res.phone) { |
| | | wx.showToast({ |
| | | title: res.msg, |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | that.setPhoneNumber(res.phone) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | setPhoneNumber(phone) { |
| | | console.log(phone); |
| | | bindPhone({ phone }).then(res => { |
| | | console.log(res) |
| | | ls.set('userInfo', res.member) |
| | | this.setData({ userInfo: res.member }) |
| | | this.toSever() |
| | | }) |
| | | }, |
| | | toSever () { |
| | | try { |
| | | wx.openCustomerServiceChat({ |
| | | extInfo: { |
| | | url: "https://work.weixin.qq.com/kfid/kfcfbccadc81cd01c0b?enc_scene=ENC5EhZgjepB9zsutZUQ5AiRnyN7GamomkuWsUA4bwigukSK6w5pVyRzcNDKurjFDNDC7" //客æID |
| | | }, |
| | | corpId: 'ww3686d2bb864ce3e2', //ä¼ä¸å¾®ä¿¡ID |
| | | success(res) { } |
| | | }) |
| | | } catch (error) { |
| | | wx.showToast({ |
| | | title: 'è¯·æ´æ°è³å¾®ä¿¡ææ°çæ¬', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | // è·åç¨æ·å¾®ä¿¡ä¿¡æ¯ |
| | | getWxUserInfo() { |
| | | // ä»ç¼åä¸è·åç¨æ·å¾®ä¿¡ä¿¡æ¯ |
| | | ls.get('userInfo').then(res => { |
| | | if (res) { |
| | | if (!res.name || !res.imgurl) { |
| | | this.setData({ hasUserInfo: false }) |
| | | } else { |
| | | this.setData({ hasUserInfo: true, userInfo: res }) |
| | | } |
| | | } |
| | | }) |
| | | ls.get('sessionkey').then(res => { |
| | | this.setData({ sessionkey: res }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad: function (options) { |
| | | return |
| | | let that = this |
| | | const eventChannel = this.getOpenerEventChannel() |
| | | |
| | | if (options.link) { |
| | | that.setData({ link: options.link, id: options.id }) |
| | | saveBannerLookNum({ id: id }) |
| | | } else { |
| | | // çå¬acceptDataFromOpenerPageäºä»¶ï¼è·åä¸ä¸é¡µé¢éè¿eventChannelä¼ éå°å½å页é¢çæ°æ® |
| | | eventChannel.on('acceptDataFromOpenerPage', function(data) { |
| | | console.log('åæ°', data) |
| | | if (data.title) wx.setNavigationBarTitle({ title: data.title }) |
| | | that.setData({ link: data.link, id: data.id }) |
| | | saveBannerLookNum({ id: data.id }) |
| | | // saveBannerLookNum({ id: data.id }) |
| | | }) |
| | | } |
| | | // // çå¬acceptDataFromOpenerPageäºä»¶ï¼è·åä¸ä¸é¡µé¢éè¿eventChannelä¼ éå°å½å页é¢çæ°æ® |
| | | // eventChannel.on('acceptDataFromOpenerPage', function(data) { |
| | | // if (data.title) wx.setNavigationBarTitle({ title: data.title }) |
| | | // that.setData({ link: data.link }) |
| | | // }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow: function () { |
| | | this.getWxUserInfo() |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | |
| | | <!--pages/webView/index.wxml--> |
| | | <web-view src="{{ link }}"> |
| | | <!-- <cover-view class="flex-cc bottom-btn-box"> |
| | | <cover-view class="btn"> |
| | | <button |
| | | plain="true" |
| | | style="background-color: #fff; border: 0; text-align: center;" |
| | | open-type="share" |
| | | > |
| | | <cover-view> |
| | | <cover-image style="margin: 8rpx auto; display: block;" mode="widthFix" src="/static/icon/share.png"></cover-image> |
| | | <cover-view style="height: 14px; line-height: 14px; color: #666; font-size: 10px;">å享</cover-view> |
| | | </cover-view> |
| | | </button> |
| | | </cover-view> |
| | | <cover-view class="reserve-design"> |
| | | <button wx:if="{{!hasUserInfo}}" bindtap="toLogin"> |
| | | <cover-image src="/static/icon/home_ic_kefu.png" mode="widthFix"></cover-image> |
| | | <cover-view class="title">ç«å³å¨è¯¢å®¢æ</cover-view> |
| | | </button> |
| | | <cover-view wx:else> |
| | | <button |
| | | wx:if="{{userInfo.phone && userInfo.phone != 'undefined' && userInfo.phone != null && userInfo.phone != ''}}" |
| | | bindtap="toSever" |
| | | > |
| | | <cover-image src="/static/icon/home_ic_kefu.png" mode="widthFix"></cover-image> |
| | | <cover-view class="title">ç«å³å¨è¯¢å®¢æ</cover-view> |
| | | </button> |
| | | <button |
| | | wx:else |
| | | open-type="getPhoneNumber" |
| | | bindgetphonenumber="bindgetphonenumber" |
| | | > |
| | | <cover-image src="/static/icon/home_ic_kefu.png" mode="widthFix"></cover-image> |
| | | <cover-view class="title">ç«å³å¨è¯¢å®¢æ</cover-view> |
| | | </button> |
| | | </cover-view> |
| | | </cover-view> |
| | | </cover-view> --> |
| | | </web-view> |
| | | |
| | | |
| | |
| | | "urlCheck": false |
| | | }, |
| | | "description": "项ç®ç§æé
ç½®æä»¶ãæ¤æä»¶ä¸çå
容å°è¦ç project.config.json ä¸çç¸ååæ®µã项ç®çæ¹å¨ä¼å
忥尿¤æä»¶ä¸ãè¯¦è§ææ¡£ï¼https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
| | | "libVersion": "3.4.10", |
| | | "libVersion": "3.5.0", |
| | | "condition": { |
| | | "miniprogram": { |
| | | "list": [ |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/store/store", |
| | | "query": "code=zb_deco_jdid&name=å®¶çiD", |
| | | "pathName": "pages/homeId/index", |
| | | "query": "code=zb_deco_jdid&name=%E5%AE%B6%E7%9A%84iD", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | } |
| | |
| | | |
| | | |
| | | // export const baseUrl = 'https://jiaxuan.zbom.com/jx/wechat/' //æ£å¼æå¡å¨ |
| | | export const baseUrl = 'http://192.168.0.135:10027' // æ¬å° |
| | | // export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //æµè¯æå¡å¨ |
| | | // export const baseUrl = 'http://192.168.0.135:10027' // æ¬å° |
| | | export const baseUrl = 'https://dmtest.ahapp.net/web_interface' //æµè¯æå¡å¨ |
| | | |
| | | // export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/' |
| | | |
| | |
| | | import { baseUrl } from "./config" |
| | | import { wxLoginCustomer } from '../api/index' |
| | | |
| | | export function request(options){ |
| | | let loading = options.loading || '1' // é»è®¤å¼1æ¾ç¤ºï¼å¦å䏿¾ç¤º |
| | |
| | | if (res.data.code === 200) { |
| | | resolve(res.data || true) |
| | | } else { |
| | | if(res.data.code == 5111 && res.data.code == 5112){ |
| | | wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | // if(res.data.code == 5112){ |
| | | // wx.navigateTo({ |
| | | // url: '/pages/auth/auth ', |
| | | // }) |
| | | // } |
| | | if(res.data.code == 5111 || res.data.code == 5112){ |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success(res) { |
| | | if (res.code) { |
| | | //åèµ·ç½ç»è¯·æ± |
| | | wxLoginCustomer({ |
| | | code: res.code |
| | | }).then(res => { |
| | | console.log(res) |
| | | if (res && res.data.member) { |
| | | wx.setStorageSync('member', res.data.member) |
| | | wx.setStorageSync('openid', res.data.member.openid) |
| | | wx.setStorageSync('sessionKey', res.data.sessionKey) |
| | | wx.setStorageSync('token', res.data.token) |
| | | } else { |
| | | console.log('ç»å½å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } else { |
| | | console.log('ç»å½å¤±è´¥ï¼' + res) |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }) |
| | | } |
| | | res.data.message && wx.showToast({ |