已添加15个文件
已删除4个文件
已修改106个文件
| | |
| | | url: '/web/customer/getMemberInfo', |
| | | }) |
| | | } |
| | | // é¦é¡µ å¿è¯´è£
ä¿® |
| | | export const getZSZXCatalogs = () => { |
| | | return request({ |
| | | url: '/web/customer/getZSZXCatalogs', |
| | | method: "POST" |
| | | }) |
| | | } |
| | | // ä¸å°æ ç¾ |
| | | export const getCataLogTagList = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getCataLogTagList', |
| | | method: "POST", |
| | | data |
| | | }) |
| | | } |
| | | // ä¸å° åç±»æ°æ® |
| | | export const getCatalogList = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getCatalogList', |
| | | method: "POST", |
| | | data |
| | | }) |
| | | } |
| | | // ä¸å° å类产å详æ
|
| | | export const getProductInfo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getProductInfo', |
| | | data |
| | | }) |
| | | } |
| | | // ä¸å° å享 |
| | | export const shareContent = (data) => { |
| | | return request({ |
| | | url: '/web/customer/shareContent', |
| | | data |
| | | }) |
| | | } |
| | | // å¿è¯´è£
ä¿® å
容 |
| | | export const pageZSZXContentList = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiZbDecoPage', |
| | | method: "POST", |
| | | data |
| | | }) |
| | | } |
| | | // é¦é¡µ å®å¶æå¡ å表 |
| | | export const getCustomizedNewsList = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getCustomizedNewsList', |
| | | data |
| | | }) |
| | | } |
| | | // å®å¶æå¡ 详æ
|
| | | export const getCustomizedNewsDetail = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getCustomizedNewsDetail', |
| | | data |
| | | }) |
| | | } |
| | | // è·åé¨åºå表 |
| | | export const getShopPage = (data) => { |
| | | return request({ |
| | |
| | | data |
| | | }) |
| | | } |
| | | // è·å 导è´å表 |
| | | export const myUserPage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/myUserPage', |
| | | method: "POST", |
| | | data |
| | | }) |
| | | } |
| | | // è·å 导è´è¯¦æ
|
| | | export const usersDetailByIamId = (data) => { |
| | | return request({ |
| | | url: '/web/customer/usersDetailByIamId', |
| | | data |
| | | }) |
| | | } |
| | | // é¦é¡µ è½®æ å表 |
| | | export const getHomeBanner = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiCarouselImage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // é¦é¡µ è½®æ 详æ
|
| | | export const getHomeBannerDetail = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiCarouselImageDetail', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // å类产å å页å表 ä¸å° |
| | | export const getZhongTaiProductPage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiProductPage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // åç±»æ¡ä¾ å页å表 ä¸å° |
| | | export const getZhongTaiWholecasePage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiWholecasePage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // æçå®¶ å页å表 ä¸å° |
| | | export const getZhongTaiVideoPage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiVideoPage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // 产åèµè®¯ å页å表 ä¸å° |
| | | export const getZhongTaiProductNewsPage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiProductNewsPage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // 产åèµè®¯ 详æ
|
| | | export const getProductNewsInfo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getProductNewsInfo', |
| | | method: 'GET', |
| | | data |
| | | }) |
| | | } |
| | | // æä½ è¡ä¸ºå
容 |
| | | export const actionDo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/actionDo', |
| | | data |
| | | }) |
| | | } |
| | | // æç é¢çº¦å表 |
| | | export const customerLogPage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/customerLogPage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // å
容 忬¢ |
| | | export const likeContent = (data) => { |
| | | return request({ |
| | | url: '/web/customer/likeContent', |
| | | method: 'GET', |
| | | data |
| | | }) |
| | | } |
| | | // å
容 æ¶è |
| | | export const collectContent = (data) => { |
| | | return request({ |
| | | url: '/web/customer/collectContent', |
| | | method: 'GET', |
| | | data |
| | | }) |
| | | } |
| | | // æç 忬¢å表 |
| | | export const getZhongTaiCusFavorite = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiCusFavorite', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // æ´æ°ä¼åä¿¡æ¯ |
| | | export const editMember = (data) => { |
| | | return request({ |
| | |
| | | // è·åçå¸åº |
| | | export const getArea = (data) => { |
| | | return request({ |
| | | url: '/web/common/getArea', |
| | | data |
| | | url: '/web/common/getAreaTree', |
| | | data, |
| | | method: "POST" |
| | | }) |
| | | } |
| | | // å°ç¨åºæ³¨é |
| | |
| | | this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom; |
| | | } |
| | | // |
| | | const res = wx.getStorageSync('member') |
| | | if (res) { |
| | | this.globalData.userInfo = res |
| | | } 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) |
| | | 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) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | |
| | | "pages/productVideo/index", |
| | | "pages/homeId/index", |
| | | "pages/kefu/index", |
| | | "pages/kefu/service", |
| | | "pages/detailDis/product", |
| | | "pages/detailDis/case", |
| | | "pages/detailDis/realpic", |
| | |
| | | "pagePath": "pages/consult/consult", |
| | | "iconPath": "static/tabbar/nav_mendian.png", |
| | | "selectedIconPath": "static/tabbar/nav_mendianAc.png", |
| | | "text": "å¨è¯¢" |
| | | "text": "èµè®¯" |
| | | }, |
| | | { |
| | | "pagePath": "pages/mine/mine", |
| | |
| | | }, |
| | | "requiredPrivateInfos": [ |
| | | "getLocation", |
| | | "chooseLocation", |
| | | "getFuzzyLocation" |
| | | "chooseLocation" |
| | | ], |
| | | "permission": { |
| | | "scope.userLocation": { |
| | |
| | | |
| | | .flex-column { |
| | | flex-direction: column; |
| | | } |
| | | button { |
| | | margin: 0; |
| | | padding: 0; |
| | | background-color: inherit; |
| | | position: static; |
| | | } |
| | | |
| | | button:after { |
| | | content: none; |
| | | } |
| | | |
| | | button::after { |
| | | border: none; |
| | | } |
| | |
| | | import { getShopPage } from '../../api/index' |
| | | import { |
| | | getShopPage |
| | | } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | |
| | | type: String, |
| | | value: '0', |
| | | observer(val) { |
| | | if(val === '1'){ |
| | | this.getShops() |
| | | if (val === '1') { |
| | | let that = this |
| | | wx.getLocation({ |
| | | type: 'wgs84', |
| | | success(res) { |
| | | const latitude = res.latitude |
| | | const longitude = res.longitude |
| | | that.getShops(latitude, longitude) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | data: { |
| | | |
| | | shopList: [] |
| | | }, |
| | | methods: { |
| | | getShops() { |
| | | getShopPage() |
| | | getShops(latitude, longitude) { |
| | | getShopPage({ |
| | | model: { |
| | | longitude, |
| | | latitude |
| | | } |
| | | }).then(res => { |
| | | this.setData({ |
| | | shopList: res.data.records |
| | | }) |
| | | }) |
| | | }, |
| | | shopDetail(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | wx.navigateTo({ |
| | | url: `/pages/store/info?id=${id}`, |
| | | }) |
| | | }, |
| | | jumpStaff() { |
| | | wx.navigateTo({ |
| | | url: '/pages/store/staffList', |
| | | }) |
| | | }, |
| | | jumpAuth() { |
| | | wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | | }, |
| | | jumpStore() { |
| | | wx.navigateTo({ |
| | |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | |
| | | .container{ |
| | | width: 750rpx; |
| | | width: 670rpx; |
| | | margin: 0 auto; |
| | | background-color: #fff; |
| | | padding: 10rpx 40rpx; |
| | | padding: 10rpx 10rpx; |
| | | } |
| | | .wrap1{ |
| | | display: flex; |
| | |
| | | .name{ |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | font-size: 28rpx; |
| | | .icon{ |
| | | width: 60rpx; |
| | | height: 60rpx; |
| | |
| | | <view class="name">AIæ¾è®¾è®¡</view> |
| | | <view class="desc">ä½ èº«è¾¹çå
¨å±è®¾è®¡ä¸å®¶</view> |
| | | </view> |
| | | <view class="btn"> |
| | | <view class="btn" bindtap="jumpAuth"> |
| | | <view>å»</view> |
| | | <view>ç</view> |
| | | <view>ç</view> |
| | |
| | | <view class="desc">æ¨èº«è¾¹çå
¨å±è®¾è®¡ä¸å®¶ï½</view> |
| | | </view> |
| | | <image class="right" src="../../static/icon/arrow_right.png" mode="widthFix"></image> |
| | | |
| | | </view> |
| | | <view class="list"> |
| | | <view class="item" wx:for="{{6}}"> |
| | | <view class="item" wx:for="{{shopList}}"> |
| | | <view class="name"> |
| | | <view class="icon"> |
| | | <image src="../../static/icon/mendian_item.png" mode="widthFix"></image> |
| | | </view> |
| | | <text>åè¥çº¢ææ°åå
³</text> |
| | | <text>{{ item.name }}</text> |
| | | </view> |
| | | <view class="addr"> |
| | | <view class="left"> |
| | | <image class="icon" src="../../static/icon/location.png" mode="widthFix"></image> |
| | | <text>3.9km</text> |
| | | <text wx:if="{{ item.distanceStr }}">{{ item.distanceStr }}</text> |
| | | <text wx:else>--</text> |
| | | </view> |
| | | <view class="right"> |
| | | <view class="right" data-id="{{ item.id }}" bindtap="shopDetail"> |
| | | <text>è¿å
¥é¨åº</text> |
| | | <van-icon name="arrow" /> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <!-- å·²ææ å·²ç»å® --> |
| | | <view wx:if="{{ type == '2' }}" class="wrap1 wrap3"> |
| | | <view bindtap="jumpStaff" wx:if="{{ type == '2' }}" class="wrap1 wrap3"> |
| | | <view class="ai df_ct"> |
| | | <image src="../../static/icon/home_ic_guwen@2x.png" mode="widthFix"></image> |
| | | </view> |
| | |
| | | .container { |
| | | width: 750rpx; |
| | | width: 670rpx; |
| | | margin: 0 auto; |
| | | background-color: #fff; |
| | | padding: 10rpx 40rpx; |
| | | padding: 10rpx 10rpx; |
| | | } |
| | | .wrap1 { |
| | | display: flex; |
| | |
| | | .wrap2 .list .item .name { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | .wrap2 .list .item .name .icon { |
| | | width: 60rpx; |
| | |
| | | // components/disCase/index.js |
| | | import { getCataLogTagList, getZhongTaiWholecasePage, actionDo } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | |
| | | |
| | | }, |
| | | data: { |
| | | showParams: false, |
| | | activeStatus: '0' |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | | tagCodes: [], |
| | | |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | search: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: 'whole_case' |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | }, |
| | | methods: { |
| | | getCatelist(){ |
| | | const { catalogCode } = this.data |
| | | getCataLogTagList({ |
| | | catalogCode: 'real_case' |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | cateList: res.data |
| | | }) |
| | | setTimeout(() => { |
| | | this.getList() |
| | | }, 300) |
| | | } |
| | | }) |
| | | }, |
| | | getList() { |
| | | const { sortType, search, tagCodes, pageNum, pageSize } = this.data |
| | | getZhongTaiWholecasePage({ |
| | | catalogCode: 'whole_case',tagCodes,pageNum,pageSize, sortType,search |
| | | }).then(res => { |
| | | this.setData({ dataList: res.data.records }) |
| | | }) |
| | | }, |
| | | 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) { |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/case', |
| | | }) |
| | | }, |
| | | changeShowParams(){ |
| | | const showParams = !this.data.showParams |
| | | this.setData({showParams}) |
| | | 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; |
| | | } |
| | |
| | | <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="{{ search }}" 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 }}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image src="{{ item.coverImage }}" 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="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> |
| | | </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; |
| | |
| | | // components/disProduct/index.js |
| | | import { getCatalogList, getZhongTaiProductPage } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | |
| | | data: { |
| | | showOne: false, |
| | | showTwo: false, |
| | | activeStatus: '0' |
| | | |
| | | cateList: [], |
| | | datalist: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | search: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: "" |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | }, |
| | | methods: { |
| | | getCatelist(){ |
| | | getCatalogList({ |
| | | catalogCode: 'product_intro' |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | catalogCode: res.data[0].code, |
| | | cateList: res.data |
| | | }) |
| | | setTimeout(() => { |
| | | this.getList() |
| | | }, 300) |
| | | } |
| | | }) |
| | | }, |
| | | bindblur() { |
| | | this.getList() |
| | | }, |
| | | getList() { |
| | | const { catalogCode, pageNum, pageSize, sortType, search } = this.data |
| | | getZhongTaiProductPage({ |
| | | catalogCode,pageNum,pageSize,sortType,search |
| | | }).then(res => { |
| | | this.setData({ |
| | | datalist: [...this.data.datalist, ...res.data.records], |
| | | total: res.data.total |
| | | }) |
| | | }) |
| | | }, |
| | | cateClick(e) { |
| | | const catalogCode = e.currentTarget.dataset.code |
| | | this.setData({ catalogCode }) |
| | | this.getList() |
| | | }, |
| | | statusChange(e) { |
| | | const sortType = e.currentTarget.dataset.status |
| | | this.setData({sortType}) |
| | | this.getList() |
| | | }, |
| | | handleDetail(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/product', |
| | | url: '/pages/detailDis/product?id=' + id, |
| | | }) |
| | | }, |
| | | changeOne(){ |
| | |
| | | this.setData({showTwo}) |
| | | this.setData({showOne: false}) |
| | | }, |
| | | statusChange(e) { |
| | | const activeStatus = e.currentTarget.dataset.status |
| | | this.setData({activeStatus}) |
| | | } |
| | | } |
| | | }) |
| | |
| | | justify-content: space-between; |
| | | padding: 12rpx 40rpx; |
| | | .item{ |
| | | width: 50%; |
| | | flex-shrink: 0; |
| | | margin-bottom: 32rpx; |
| | | .img_wrap{ |
| | | width: 242rpx; |
| | | height: 136rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .img{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .new{ |
| | | width: 72rpx; |
| | |
| | | } |
| | | .name{ |
| | | margin: 12rpx 0 8rpx; |
| | | display: -webkit-box;//å°çå转æ¢ä¸ºå¼¹æ§çå |
| | | -webkit-box-orient: vertical;//ææ¬æ¾ç¤ºæ¹å¼ï¼é»è®¤æ°´å¹³ |
| | | -webkit-line-clamp: 1;//设置æ¾ç¤ºå¤å°è¡ |
| | | overflow: hidden; |
| | | } |
| | | .info{ |
| | | display: flex; |
| | |
| | | <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="{{ search }}" type="text" placeholder="æç´¢äº§ååç§°" /> |
| | | </view> |
| | | <view class="main_content"> |
| | | <view class="main_left"> |
| | | <view class="item active">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view data-code="{{item.code}}" bindtap="cateClick" wx:for="{{cateList}}" class="item {{ catalogCode == item.code ? 'active' : '' }}">{{ item.name }}</view> |
| | | </view> |
| | | <view class="main_right"> |
| | | <view class="query_wrap"> |
| | |
| | | </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> |
| | | <view class="goods_list"> |
| | | <view class="item" bindtap="handleDetail"> |
| | | <view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <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> |
| | | </view> |
| | | <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> |
| | | <text class="num {{true ? 'primary' : ''}}">{{ item.favoriteCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <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"> |
| | | <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> |
| | | <text>{{ item.readCount }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | padding: 12rpx 40rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item { |
| | | width: 50%; |
| | | flex-shrink: 0; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap { |
| | | width: 242rpx; |
| | | height: 136rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap .img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap .new { |
| | | width: 72rpx; |
| | |
| | | } |
| | | .main_content .main_right .goods_list .item .name { |
| | | margin: 12rpx 0 8rpx; |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 1; |
| | | overflow: hidden; |
| | | } |
| | | .main_content .main_right .goods_list .item .info { |
| | | display: flex; |
| | |
| | | { |
| | | "name": "party", |
| | | "version": "1.0.0", |
| | | "lockfileVersion": 1, |
| | | "lockfileVersion": 3, |
| | | "requires": true, |
| | | "dependencies": { |
| | | "@vant/weapp": { |
| | | "packages": { |
| | | "": { |
| | | "name": "party", |
| | | "version": "1.0.0", |
| | | "license": "ISC", |
| | | "dependencies": { |
| | | "@vant/area-data": "^1.1.3", |
| | | "@vant/weapp": "^1.11.6", |
| | | "mp-html": "^2.5.0", |
| | | "vant-weapp": "^0.5.28" |
| | | } |
| | | }, |
| | | "node_modules/@vant/area-data": { |
| | | "version": "1.5.1", |
| | | "resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz", |
| | | "integrity": "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww==" |
| | | }, |
| | | "node_modules/@vant/weapp": { |
| | | "version": "1.11.6", |
| | | "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.6.tgz", |
| | | "integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw==" |
| | | }, |
| | | "node_modules/mp-html": { |
| | | "version": "2.5.0", |
| | | "resolved": "https://registry.npmjs.org/mp-html/-/mp-html-2.5.0.tgz", |
| | | "integrity": "sha512-uvBH5tIaDIlj8qaxsvNXU3RKX0jvXOo3J6FAi/notUv/ds6j79UUTE82aDkxxUk0eLUU0CiCqMrR7WWnytk30Q==" |
| | | }, |
| | | "node_modules/vant-weapp": { |
| | | "version": "0.5.29", |
| | | "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", |
| | | "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" |
| | | } |
| | | } |
| | | } |
| | |
| | | "dependencies": { |
| | | "@vant/area-data": "^1.1.3", |
| | | "@vant/weapp": "^1.11.6", |
| | | "mp-html": "^2.5.0", |
| | | "vant-weapp": "^0.5.28" |
| | | }, |
| | | "scripts": { |
| | |
| | | binDingPhone |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | |
| | | // pages/consult/consult.js |
| | | import { getZhongTaiProductNewsPage, getCatalogList } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | category: ['æ°åä¸å¸', 'ä¸å©è¯ä¹¦', 'å¤§çææ','æ°åä¸å¸', 'ä¸å©è¯ä¹¦', 'å¤§çææ'], |
| | | category: [], |
| | | secondCategory: ['级åç±»','级åç±»','级åç±»','级åç±»','级åç±»','级åç±»'], |
| | | activeCate: '', |
| | | seActiveCate: '', |
| | | dataList: [] |
| | | }, |
| | | |
| | | dataList: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }, |
| | | onLoad(options) { |
| | | this.getCate() |
| | | this.getList() |
| | | }, |
| | | getCate() { |
| | | getCatalogList({catalogCode: 'product_info'}).then(res => { |
| | | this.setData({ category: res.data }) |
| | | }) |
| | | }, |
| | | itemClick(e) { |
| | | const { id } = e.target.dataset |
| | | console.log(e.target.dataset); |
| | | const { id } = e.currentTarget.dataset |
| | | wx.navigateTo({ |
| | | url: '/pages/consult/detail', |
| | | url: '/pages/consult/detail?id='+id, |
| | | }) |
| | | }, |
| | | getList() { |
| | | const { pageNum, pageSize, activeCate } = this.data |
| | | getZhongTaiProductNewsPage({ |
| | | pageNum, pageSize, catalogCode: activeCate |
| | | }).then(res => { |
| | | if(res.data){ |
| | | this.setData({ dataList: res.data.records,total: res.data.records.total }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | cateClick(e) { |
| | | const { index } = e.target.dataset |
| | | console.log(index); |
| | | const { code } = e.currentTarget.dataset |
| | | this.setData({ activeCate: code }) |
| | | this.getList() |
| | | }, |
| | | seCateClick(e) { |
| | | const { index } = e.target.dataset |
| | | const { index } = e.currentTarget.dataset |
| | | console.log(index); |
| | | }, |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTextStyle": "white" |
| | | "navigationBarTitleText": "èµè®¯" |
| | | } |
| | |
| | | .container { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .search_wrap{ |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | | margin: 0rpx auto 24rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 8rpx; |
| | | padding: 0 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #F7F7F7; |
| | | image{ |
| | | width: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | } |
| | | .scroll_cate { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | .content{ |
| | | padding: 0 40rpx 40rpx; |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | |
| | | <view class="container"> |
| | | <navBar showBack="{{ false }}" title="å¨è¯¢"></navBar> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢å¨è¯¢æ é¢" /> |
| | | </view> |
| | | <!-- åç±» --> |
| | | <view> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-index="{{index}}" wx:for="{{ category }}" class="item {{ index == 0 ? 'active': '' }}">{{ item }}</view> |
| | | <view bindtap="cateClick" data-code="{{item.code}}" wx:for="{{ category }}" class="item {{ activeCate == item.code ? 'active': '' }}">{{ item.name }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 28rpx;"> |
| | |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view class="item" bindtap="itemClick" data-abg="qwe"> |
| | | <image class="img" src="../../static/icon/test.png" mode="widthFix"></image> |
| | | <view class="title">åç¯å®ç¨ç¹è¾ | 䏿¥å¦ä¼çæ³å
å½±å¸å±</view> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-id="{{item.id}}"> |
| | | <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image> |
| | | <view class="title">{{ item.title }}</view> |
| | | <view class="df_sb static"> |
| | | <view>{{ '2021-08-21 12:00:00' }}</view> |
| | | <view>{{ item.publishDt || '' }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | <text>{{ item.viewCount }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .container { |
| | | background-color: #fff; |
| | | } |
| | | .search_wrap { |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | | margin: 0rpx auto 24rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 8rpx; |
| | | padding: 0 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #F7F7F7; |
| | | } |
| | | .search_wrap image { |
| | | width: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | .scroll_cate { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | .content { |
| | | padding: 0 40rpx 40rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | | } |
| | | .content .item .img { |
| | | width: 100%; |
| | | } |
| | |
| | | // pages/consult/detail.js |
| | | import { shareContent, getProductNewsInfo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | navTitle: '详æ
', |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | info: {}, |
| | | |
| | | showShare: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getDetail(options.id) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | getDetail(id) { |
| | | getProductNewsInfo({ id }).then(res => { |
| | | this.setData({ detail: res.data }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | handleShare() { |
| | | console.log('ç¹å»äºå享'); |
| | | shareContent(this.data.info.id) |
| | | }, |
| | | // onShareAppMessage: function () { |
| | | // // let { productDetail, userInfo } = this.data |
| | | // return { |
| | | // title: productDetail.title, |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | }, |
| | | onHide() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | }, |
| | | "navigationBarTitleText": "详æ
" |
| | | } |
| | |
| | | } |
| | | } |
| | | .item { |
| | | margin-top: 18rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | |
| | | width: 44rpx; |
| | | } |
| | | } |
| | | } |
| | | .share_modal{ |
| | | .btns{ |
| | | display: flex; |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | .item{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | image{ |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | } |
| | | } |
| | | .cancel{ |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | } |
| | |
| | | <view> |
| | | <navBar title="{{ navTitle }}"></navBar> |
| | | <!-- <navBar title="{{ navTitle }}"></navBar> --> |
| | | <view class="main_content"> |
| | | <view class="main_title">ä¸ç§ç¾å¥½çå
³ï¼è¿å±ç¬é´å¸è½½ç²æ«</view> |
| | | <view class="datetime">å叿¶é´ï¼2021-08-21 10:0</view> |
| | |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <view class="item"> |
| | | <!-- <view class="item"> |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </view> |
| | | <view class="item"> |
| | | </view> --> |
| | | <button open-type="share" class="item" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">å享</view> |
| | | </view> |
| | | </button> |
| | | <view class="sub_btn"> |
| | | <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image> |
| | | <view>å
è´¹é¢çº¦ä¸å±è®¾è®¡</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <van-popup position="bottom" show="{{ showShare }}" bind:close="onClose"> |
| | | <view class="share_modal"> |
| | | <view class="btns"> |
| | | <button open-type="share" class="item" bindtap="handleShare"> |
| | | <image src="../../static/icon/wechat.png"></image> |
| | | <view>åé好å</view> |
| | | </button> |
| | | <button class="item"> |
| | | <image src="../../static/icon/download.png"></image> |
| | | <view>ä¸è½½æµ·æ¥</view> |
| | | </button> |
| | | </view> |
| | | <view bindtap="onClose" class="cancel">åæ¶</view> |
| | | </view> |
| | | </van-popup> |
| | | </view> |
| | |
| | | margin-right: 8rpx; |
| | | } |
| | | .footer .item { |
| | | margin-top: 18rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | |
| | | .footer .item .icon { |
| | | width: 44rpx; |
| | | } |
| | | .share_modal .btns { |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .share_modal .btns .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | } |
| | | .share_modal .btns .item image { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .share_modal .cancel { |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | |
| | | import { |
| | | getDictData, |
| | | getArea, |
| | | saveFreeCustomizationApply |
| | | } from '../../api/index' |
| | | Page({ |
| | |
| | | |
| | | showAreaList: false, |
| | | areaList: [], |
| | | cascaderValue: '', |
| | | |
| | | DESIGN_BANNER: '', |
| | | WechatIMG558: '', |
| | | }, |
| | |
| | | // æ¾ç¤ºåæ¢åå¸å¼¹çª |
| | | chooseCity () { |
| | | this.setData({ showAreaList: !this.data.showAreaList }) |
| | | console.log('chooseCity', chooseCity); |
| | | }, |
| | | // 忢åå¸ |
| | | confirmChange(e) { |
| | |
| | | this.getShopList() |
| | | this.chooseCity() |
| | | }, |
| | | onFinish() { |
| | | |
| | | }, |
| | | onClose() { |
| | | this.setData({ showAreaList: false }) |
| | | }, |
| | | initData() { |
| | | getArea({ |
| | | "level": "", |
| | | "pid": "" |
| | | }).then(res => { |
| | | this.setData({areaList: res.data}) |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'DESIGN_BANNER' |
| | |
| | | { |
| | | "usingComponents": { |
| | | "van-field": "@vant/weapp/field/index", |
| | | "van-area": "@vant/weapp/area/index", |
| | | "van-cascader": "@vant/weapp/cascader/index", |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | }, |
| | | "navigationBarTitleText": "0å
å
费设计" |
| | |
| | | </view> |
| | | <image class="banner" src="{{ WechatIMG558 }}" mode="widthFix"></image> |
| | | <!-- --> |
| | | <van-popup show="{{ showAreaList }}" position="bottom" round> |
| | | <van-area class="area-list" area-list="{{ areaList }}" bind:confirm="confirmChange" bind:cancel="chooseCity" /> |
| | | </van-popup> |
| | | <van-cascader wx:if="{{ showAreaList }}" value="{{ cascaderValue }}" title="è¯·éæ©æå¨å°åº" options="{{ areaList }}" bind:close="onClose" bind:finish="onFinish" /> |
| | | </view> |
| | |
| | | // pages/detailDis/case.js |
| | | import { shareContent } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | showShare: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | }, |
| | | handleShare() { |
| | | console.log('ç¹å»äºå享'); |
| | | shareContent(this.data.info.id) |
| | | }, |
| | | // onShareAppMessage: function () { |
| | | // // let { productDetail, userInfo } = this.data |
| | | // return { |
| | | // title: productDetail.title, |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | }, |
| | | |
| | | /** |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText": "æ¡ä¾è¯¦æ
" |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | .spaceList{ |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .name{ |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | } |
| | | .img{ |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | .footer { |
| | | position: fixed; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE; |
| | |
| | | width: 44rpx; |
| | | } |
| | | } |
| | | } |
| | | .share_modal{ |
| | | .btns{ |
| | | display: flex; |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | .item{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | image{ |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | } |
| | | } |
| | | .cancel{ |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | } |
| | |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="item" bindtap="openShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">å享</view> |
| | | </view> |
| | |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | .spaceList .item { |
| | | margin-bottom: 60rpx; |
| | | } |
| | | .spaceList .item .name { |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | } |
| | | .spaceList .item .img { |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | } |
| | | .footer { |
| | | position: fixed; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE; |
| | |
| | | .footer .item .icon { |
| | | width: 44rpx; |
| | | } |
| | | .share_modal .btns { |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .share_modal .btns .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | } |
| | | .share_modal .btns .item image { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .share_modal .cancel { |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | |
| | | // pages/detailDis/product.js |
| | | import { shareContent, getProductInfo, actionDo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0 |
| | | 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}) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | 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 || info.isCollection == 'true' ? 'false' : 'true' |
| | | this.setData({info}) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | getDetail(id) { |
| | | getProductInfo({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('ç¹å»äºå享'); |
| | | 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 |
| | | // return { |
| | | // title: productDetail.title, |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | 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() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "authCard": "/components/authCard/authCard", |
| | | "mp-html": "mp-html" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | page { |
| | | background-color: #f7f7f7; |
| | | } |
| | | .banner_swiper{ |
| | | image{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | .main_content { |
| | | padding: 52rpx 40rpx 40rpx; |
| | | border-radius: 16rpx 16rpx 0rpx 0rpx; |
| | | background-color: #fff; |
| | | margin-bottom: 20rpx; |
| | | |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 36rpx; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | |
| | | .desc { |
| | | font-size: 26rpx; |
| | | color: #555555; |
| | | margin: 16rpx 0 26rpx; |
| | | margin-bottom: 26rpx; |
| | | } |
| | | |
| | | .text { |
| | |
| | | margin-bottom: 40rpx; |
| | | } |
| | | } |
| | | |
| | | .spaceList{ |
| | | .item{ |
| | | .name{ |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | } |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | .counselor { |
| | | width: 670rpx; |
| | | padding: 0 0 0 30rpx; |
| | |
| | | font-size: 36rpx; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | |
| | | video { |
| | | .img_wrap{ |
| | | width: 100%; |
| | | border: 1px solid; |
| | | border-radius: 8rpx; |
| | | position: relative; |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | .play{ |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | width: 136rpx; |
| | | height: 58rpx; |
| | | line-height: 56rpx; |
| | | text-align: center; |
| | | background: rgba(0,0,0,0.54); |
| | | border-radius: 30rpx; |
| | | font-size: 26rpx; |
| | | color: rgba(255,255,255,0.8); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | .line { |
| | | display: flex; |
| | | height: 62rpx; |
| | | height: 32rpx; |
| | | margin-bottom: 24rpx; |
| | | |
| | | .label { |
| | | width: 120rpx; |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | |
| | | .val { |
| | | flex: 1; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | } |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100rpx; |
| | | .btn{ |
| | | padding: 0; |
| | | margin-top: 16rpx; |
| | | } |
| | | } |
| | | .sub_btn { |
| | | display: flex; |
| | |
| | | width: 44rpx; |
| | | } |
| | | } |
| | | } |
| | | .share_modal{ |
| | | .btns{ |
| | | display: flex; |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | .item{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | image{ |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | } |
| | | } |
| | | .cancel{ |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | } |
| | |
| | | <view> |
| | | <view class="user"> |
| | | <view class="user" wx:if="{{ false }}"> |
| | | <view class="avatar"></view> |
| | | <view class="content"> |
| | | <view class="name">䏿¢æ</view> |
| | |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <!-- bannerè½®æ --> |
| | | <swiper class="banner_swiper" circular indicator-dots autoplay style="height:{{bannerHeight}}rpx" duration> |
| | | <block wx:for="{{ info.bannerImgList }}"> |
| | | <swiper-item> |
| | | <image bindload="bannerbindload" mode="widthFix" src="{{ item }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | <view class="main_content"> |
| | | <view class="title">è«è¥¿åæ¥-é¤å
</view> |
| | | <view class="desc">ç®æ¬§é£æ ¼</view> |
| | | <view class="text">å®¶å±
飿 ¼ä¸å¿äºåºæå½¢å¼ï¼å¨æ¿åè½ä¸å±éäºä¸æ¥ä¸é¤ã |
| | | å
ç´ ä¸æè´¨ç¢°æåºçä¸ä»
æ¯è®¾è®¡æï¼æ´æ¯ä¸ç§é²æç䏿 |
| | | 䏿 ¼çç°ä»£æåº¦ï¼èåå½ä¸æµè¡ç¾å¦ï¼æè®¾ç©ºé´çæ 飿 ¼ |
| | | åã</view> |
| | | <view class="user counselor"> |
| | | <view class="avatar_wrap"> |
| | | <image class="avatar" mode="widthFix" src="../../static/icon/home_ic_guwen@2x.png"></image> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="name">æ¨çä¸å±å®¶å±
顾é®</view> |
| | | <view class="desc">æ¨èº«è¾¹çå
¨å±è®¾è®¡ä¸å®¶</view> |
| | | </view> |
| | | <view class="btn">å»çç</view> |
| | | </view> |
| | | <view class="title">{{ info.title }}</view> |
| | | <view class="desc" wx:if="{{ info.subtitle }}">{{ info.subtitle }}</view> |
| | | <view class="text">{{ info.intro }}</view> |
| | | <authCard type="{{ member.authStatus }}" /> |
| | | </view> |
| | | <!-- video --> |
| | | <view class="video"> |
| | | <view wx:if="{{ info.video }}" class="video"> |
| | | <view class="title">产åè§é¢</view> |
| | | <video src=""></video> |
| | | <view class="img_wrap"> |
| | | <image class="img" src="{{ info.coverImage }}" mode="widthFix"></image> |
| | | <view bindtap="playVideo" class="play">ææ¾</view> |
| | | </view> |
| | | </view> |
| | | <view class="detail"> |
| | | <view class="title">产å详æ
</view> |
| | | <view class="line"> |
| | | <view class="label">ååï¼</view> |
| | | <view class="val">è«è¥¿åæ¥-é¤å
</view> |
| | | <view class="line" wx:for="{{ info.productParamList }}"> |
| | | <view class="label">{{ item.paramName }}ï¼</view> |
| | | <view class="val">{{ item.paramValue }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">å·¥èºï¼</view> |
| | | <view class="val">è«è¥¿åæ¥-é¤å
</view> |
| | | </view> |
| | | <!-- å¯ææ¬ --> |
| | | <view> |
| | | <!-- <mp-html content="{{info.content}}"></mp-html> --> |
| | | </view> |
| | | <view class="spaceList"> |
| | | <view class="item" wx:for="{{ info.spaceList }}"> |
| | | <!-- <view class="name">{{ item.spaceName }}</view> --> |
| | | <image src="{{ item.spaceImg }}" mode="widthFix" class="img"></image> |
| | | <!-- <mp-html content="{{item.spaceContent}}"></mp-html> --> |
| | | </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"> |
| | | </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> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <van-popup position="bottom" show="{{ showShare }}" bind:close="onClose"> |
| | | <view class="share_modal"> |
| | | <view class="btns"> |
| | | <button open-type="share" class="item" bindtap="handleShare"> |
| | | <image src="../../static/icon/wechat.png"></image> |
| | | <view>åé好å</view> |
| | | </button> |
| | | <button class="item" bindtap="handleDown"> |
| | | <image src="../../static/icon/download.png"></image> |
| | | <view>ä¸è½½æµ·æ¥</view> |
| | | </button> |
| | | </view> |
| | | <view bindtap="onClose" class="cancel">åæ¶</view> |
| | | </view> |
| | | </van-popup> |
| | | </view> |
| | |
| | | page { |
| | | background-color: #f7f7f7; |
| | | } |
| | | .banner_swiper image { |
| | | width: 100%; |
| | | } |
| | | .main_content { |
| | | padding: 52rpx 40rpx 40rpx; |
| | | border-radius: 16rpx 16rpx 0rpx 0rpx; |
| | |
| | | .main_content .title { |
| | | font-weight: 500; |
| | | font-size: 36rpx; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | .main_content .desc { |
| | | font-size: 26rpx; |
| | | color: #555555; |
| | | margin: 16rpx 0 26rpx; |
| | | margin-bottom: 26rpx; |
| | | } |
| | | .main_content .text { |
| | | font-size: 26rpx; |
| | | color: #555555; |
| | | margin-bottom: 40rpx; |
| | | } |
| | | .spaceList .item .name { |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | } |
| | | .spaceList .item .img { |
| | | width: 100%; |
| | | } |
| | | .counselor { |
| | | width: 670rpx; |
| | |
| | | font-size: 36rpx; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .video video { |
| | | .video .img_wrap { |
| | | width: 100%; |
| | | border: 1px solid; |
| | | border-radius: 8rpx; |
| | | position: relative; |
| | | } |
| | | .video .img_wrap .img { |
| | | width: 100%; |
| | | } |
| | | .video .img_wrap .play { |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | width: 136rpx; |
| | | height: 58rpx; |
| | | line-height: 56rpx; |
| | | text-align: center; |
| | | background: rgba(0, 0, 0, 0.54); |
| | | border-radius: 30rpx; |
| | | font-size: 26rpx; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | } |
| | | .detail { |
| | | padding: 52rpx 40rpx 40rpx; |
| | |
| | | } |
| | | .detail .line { |
| | | display: flex; |
| | | height: 62rpx; |
| | | height: 32rpx; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .detail .line .label { |
| | | width: 120rpx; |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .detail .line .val { |
| | | flex: 1; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | } |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100rpx; |
| | | } |
| | | .footer .btns .btn { |
| | | padding: 0; |
| | | margin-top: 16rpx; |
| | | } |
| | | .footer .sub_btn { |
| | | display: flex; |
| | |
| | | .footer .item .icon { |
| | | width: 44rpx; |
| | | } |
| | | .share_modal .btns { |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .share_modal .btns .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | } |
| | | .share_modal .btns .item image { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .share_modal .cancel { |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | |
| | | // pages/detailDis/realpic.js |
| | | import { shareContent } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | showShare: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | handleShare() { |
| | | console.log('ç¹å»äºå享'); |
| | | shareContent(this.data.info.id) |
| | | }, |
| | | // onShareAppMessage: function () { |
| | | // // let { productDetail, userInfo } = this.data |
| | | // return { |
| | | // title: productDetail.title, |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | }, |
| | | |
| | | /** |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText": "宿¯è¯¦æ
" |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | width: 44rpx; |
| | | } |
| | | } |
| | | } |
| | | .share_modal{ |
| | | .btns{ |
| | | display: flex; |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | .item{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | image{ |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | } |
| | | } |
| | | .cancel{ |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | } |
| | |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="item" bindtap="openShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">å享</view> |
| | | </view> |
| | |
| | | .footer .item .icon { |
| | | width: 44rpx; |
| | | } |
| | | .share_modal .btns { |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .share_modal .btns .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | } |
| | | .share_modal .btns .item image { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .share_modal .cancel { |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | |
| | | // pages/discover/discover.js |
| | | import { getCataLogTagList, getCatalogList } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | */ |
| | | data: { |
| | | menuButtonInfo: {}, |
| | | activeTabs: '0' |
| | | catalogCode: "whole_case" |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | let menuButtonInfo = wx.getMenuButtonBoundingClientRect(); |
| | | this.setData({menuButtonInfo}) |
| | | console.log('WindowInfo', menuButtonInfo); |
| | | }, |
| | | tabsClick(e) { |
| | | const activeTabs = e.currentTarget.dataset.tab |
| | | this.setData({activeTabs}) |
| | | const catalogCode = e.currentTarget.dataset.code |
| | | this.setData({catalogCode}) |
| | | }, |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | |
| | | <view class="container"> |
| | | <view style="height: {{ menuButtonInfo.top }}px;"></view> |
| | | <view class="main_tab"> |
| | | <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-tab="0" bindtap="tabsClick"> |
| | | <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 {{ activeTabs == '1' ? 'active' : '' }}" data-tab="1" bindtap="tabsClick"> |
| | | <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 {{ activeTabs == '2' ? 'active' : '' }}" data-tab="2" bindtap="tabsClick"> |
| | | <view class="item {{ catalogCode == 'real_case' ? 'active' : '' }}" data-code="real_case" bindtap="tabsClick"> |
| | | <view class="name">宿¯</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content" style="height: calc( 100vh - {{menuButtonInfo.top}}px - 88rpx )"> |
| | | <disProduct wx:if="{{ activeTabs == '0' }}" /> |
| | | <disCase wx:if="{{ activeTabs == '1' }}" /> |
| | | <disRealpic wx:if="{{ activeTabs == '2' }}" /> |
| | | <disProduct wx:if="{{ catalogCode == 'product_intro' }}" /> |
| | | <disCase wx:if="{{ catalogCode == 'whole_case' }}" /> |
| | | <disRealpic wx:if="{{ catalogCode == 'real_case' }}" /> |
| | | </view> |
| | | </view> |
| | |
| | | // pages/consult/consult.js |
| | | import { getCataLogTagList, pageZSZXContentList } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | category: ['æ°åä¸å¸', 'ä¸å©è¯ä¹¦', 'å¤§çææ','æ°åä¸å¸', 'ä¸å©è¯ä¹¦', 'å¤§çææ'], |
| | | secondCategory: ['级åç±»','级åç±»','级åç±»','级åç±»','级åç±»','级åç±»'], |
| | | tagList: [], |
| | | activeCate: '', |
| | | seActiveCate: '', |
| | | dataList: [] |
| | | }, |
| | | dataList: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | |
| | | code: '', |
| | | tagCodes: '' |
| | | }, |
| | | onLoad(options) { |
| | | wx.setNavigationBarTitle({ |
| | | title: options.name |
| | | }) |
| | | this.setData({ code: options.code}) |
| | | this.getTabList() |
| | | this.getList() |
| | | }, |
| | | itemClick(e) { |
| | | const { id } = e.target.dataset |
| | | console.log(e.target.dataset); |
| | |
| | | }) |
| | | }, |
| | | cateClick(e) { |
| | | const { index } = e.target.dataset |
| | | console.log(index); |
| | | const { code } = e.target.dataset |
| | | this.setData({ |
| | | tagCodes: code, |
| | | pageNum: 1, |
| | | dataList: [] |
| | | }) |
| | | this.getList() |
| | | }, |
| | | seCateClick(e) { |
| | | const { index } = e.target.dataset |
| | | console.log(index); |
| | | getTabList() { |
| | | getCataLogTagList({ |
| | | catalogCode: this.data.code |
| | | }).then(res => { |
| | | if(res && res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | tagList: res.data[0].valueVos |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | onLoad(options) { |
| | | getList(){ |
| | | const { code, tagCodes, pageSize, pageNum } = this.data |
| | | pageZSZXContentList({ |
| | | catalogCode: code, |
| | | tagCodes, |
| | | pageSize, |
| | | pageNum |
| | | }).then(res => { |
| | | this.setData({ |
| | | dataList: [ ...this.data.dataList, ...res.data.records ] |
| | | }) |
| | | }) |
| | | }, |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "navigationBarTitleText": "å®¶çID" |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | .content{ |
| | | padding: 0 40rpx 40rpx; |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | .title{ |
| | | width: 100%; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | font-size: 30rpx; |
| | | color: #111111; |
| | | margin: 24rpx 0 12rpx; |
| | |
| | | <view> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-index="{{index}}" wx:for="{{ category }}" class="item {{ index == 0 ? 'active': '' }}">{{ item }}</view> |
| | | <view bindtap="cateClick" data-code="{{item.labelValueCode}}" wx:for="{{ tagList }}" class="item {{ tagCodes == item.labelValueCode ? 'active': '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view class="item" bindtap="itemClick" data-abg="qwe"> |
| | | <image class="img" src="../../static/icon/test.png" mode="widthFix"></image> |
| | | <view class="title">åç¯å®ç¨ç¹è¾ | 䏿¥å¦ä¼çæ³å
å½±å¸å±</view> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-abg="qwe"> |
| | | <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image> |
| | | <view class="title">{{ item.title }}</view> |
| | | <view class="df_sb static"> |
| | | <view>{{ '2021-08-21 12:00:00' }}</view> |
| | | <view>{{ item.publishDt }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | <text>{{ item.viewCount || 0 }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .content { |
| | | padding: 0 40rpx 40rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | | } |
| | | .content .item .img { |
| | | width: 100%; |
| | | } |
| | | .content .item .title { |
| | | width: 100%; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | font-size: 30rpx; |
| | | color: #111111; |
| | | margin: 24rpx 0 12rpx; |
| | |
| | | import { getDictData, getMemberInfo } from '../../api/index' |
| | | import { |
| | | getDictData, |
| | | getMemberInfo, |
| | | getZSZXCatalogs, |
| | | getCustomizedNewsList, |
| | | getHomeBanner, |
| | | getHomeBannerDetail, |
| | | getZhongTaiVideoPage, |
| | | getZhongTaiProductNewsPage |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | data: { |
| | | // é¡¶é¨nav |
| | | topHeadStyle: 1, |
| | | showWhiteHead: true, |
| | | top: 0, |
| | | font_color: '#ffffff', |
| | | ZSZXCata: {}, |
| | | |
| | | showWhiteHead: false, |
| | | topHeadBorder: false, |
| | | member: {}, |
| | | |
| | | bannerList: [ |
| | | {imgurl: ''}, |
| | | {imgurl: 'adsa.png'}, |
| | | {imgurl: 'adsa.png'}, |
| | | {imgurl: 'adsa.png'}, |
| | | ], |
| | | bannerList: [], |
| | | bannerImgHeight: 0, |
| | | consultList: [], |
| | | consultImgHeight: 0, |
| | | |
| | | productVideo: {}, |
| | | bannerSwiperOption: { |
| | | indicatorDots: true, |
| | | vertical: false, |
| | |
| | | interval: 3000, |
| | | duration: 500 |
| | | }, |
| | | serviceList: [], |
| | | testUrl: '', |
| | | HOME_CLASS_A: '', |
| | | HOME_CLASS_B: '', |
| | | HOME_CLASS_B2: '', |
| | | HOME_CLASS_C: '', |
| | | }, |
| | | |
| | | toSearch() {}, |
| | | onShow() { |
| | | getMemberInfo().then(res => { |
| | | this.setData({member: res.data}) |
| | | }) |
| | | const member = wx.getStorageSync('member') |
| | | if(member && (member.authStatus == '1' || member.authStatus == '2')){ |
| | | getMemberInfo().then(res => { |
| | | this.setData({member: res.data}) |
| | | }) |
| | | }else{ |
| | | this.setData({member}) |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.initData() |
| | | }, |
| | | changePath(e) { |
| | | let index = e.currentTarget.dataset.type |
| | | console.log(index); |
| | | switch (index) { |
| | | case '0': |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function (res) { |
| | | // éè¿eventChannelå被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: 'https://m.zbom.com/mobile/styleTest.html?type=1' }) |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: this.data.testUrl }) |
| | | // saveBehavior({ type: 1 }) |
| | | } |
| | | }) |
| | |
| | | break; |
| | | } |
| | | }, |
| | | changeStrategy(e) { |
| | | let item = e.currentTarget.dataset.item |
| | | wx.navigateTo({ |
| | | url: `/pages/homeId/index?code=${item.code}&name=${item.name}` , |
| | | }) |
| | | }, |
| | | initData() { |
| | | // è½®æ |
| | | getHomeBanner().then(res => { |
| | | this.setData({ bannerList: res.data }) |
| | | }) |
| | | // 产åè§é¢ |
| | | getZhongTaiVideoPage({ pageSize: 1, pageNum: 1 }).then(res => { |
| | | if(res.data.records && res.data.records.length > 0){ |
| | | this.setData({ productVideo: res.data.records }) |
| | | } |
| | | }) |
| | | getZSZXCatalogs().then(res => { //å¿è¯´è£
ä¿® |
| | | this.setData({ |
| | | ZSZXCata: res.data || {} |
| | | }) |
| | | }) |
| | | // èµè®¯ |
| | | getZhongTaiProductNewsPage({ |
| | | catalogCode: 'product_info', |
| | | pageSize: 5, pageNum: 1 |
| | | }).then(res => { |
| | | if(res.data){ |
| | | this.setData({ consultList: res.data.records }) |
| | | } |
| | | }) |
| | | getCustomizedNewsList().then(res => { // å®å¶æå¡ |
| | | this.setData({serviceList: res.data || []}) |
| | | }) |
| | | // 飿 ¼æµè¯ |
| | | getDictData({ |
| | | code: 'WX_MINI_CONFIG', |
| | | label: 'ZBOM_STYLE_TEST_URL' |
| | | }).then(res => { |
| | | this.setData({ testUrl: res.data.code }) |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'HOME_CLASS_A' |
| | |
| | | url: '/pages/productVideo/index', |
| | | }) |
| | | }, |
| | | jumpProKefu() { |
| | | wx.navigateTo({ |
| | | url: '/pages/kefu/index', |
| | | videoClick(e) { |
| | | const { videourl } = e.currentTarget.dataset |
| | | wx.previewMedia({ |
| | | sources: [{ url: videourl, type: 'video' }] |
| | | }) |
| | | }, |
| | | goserHeight:function (e) { |
| | | const serviceHeight = e.detail.height |
| | | this.setData({ |
| | | serviceHeight: serviceHeight |
| | | }) |
| | | }, |
| | | bannerbindload(e) { |
| | | const height = e.detail.height |
| | | this.setData({ |
| | | bannerImgHeight: height |
| | | }) |
| | | }, |
| | | consultbindload(e) { |
| | | const { height, width } = e.detail |
| | | let activeHeight = height * 670 / width |
| | | this.setData({ |
| | | consultImgHeight: activeHeight |
| | | }) |
| | | }, |
| | | bannerClick(e) { |
| | | const { id } = e.currentTarget.dataset |
| | | getHomeBannerDetail({id}) |
| | | }, |
| | | seriveClick(e) { |
| | | const { id, title } = e.currentTarget.dataset |
| | | if(title === 'ä¸å±å®¢æ'){ |
| | | wx.navigateTo({ |
| | | url: `/pages/kefu/index?title=${title}&id=${id}`, |
| | | }) |
| | | }else{ |
| | | wx.navigateTo({ |
| | | url: `/pages/kefu/service?title=${title}&id=${id}`, |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | jumpProConsult() { |
| | | wx.switchTab({ |
| | |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | onPageScroll(e) { |
| | | let scrollTop = e.scrollTop / 100 |
| | | if (scrollTop <= 0.1) { |
| | | this.setData({ font_color: '#ffffff' }) |
| | | } else if (scrollTop >= 0.1 && scrollTop < 0.2) { |
| | | this.setData({ font_color: '#d0d0d0' }) |
| | | } else if (scrollTop >= 0.2 && scrollTop < 0.3) { |
| | | this.setData({ font_color: '#bdbdbd' }) |
| | | } else if (scrollTop >= 0.3 && scrollTop < 0.4) { |
| | | this.setData({ font_color: '#a1a1a1' }) |
| | | } else if (scrollTop >= 0.4 && scrollTop < 0.5) { |
| | | this.setData({ font_color: '#878787' }) |
| | | } else if (scrollTop >= 0.5 && scrollTop < 0.6) { |
| | | this.setData({ font_color: '#6d6d6d' }) |
| | | } else if (scrollTop >= 0.6 && scrollTop < 0.7) { |
| | | this.setData({ font_color: '#535353' }) |
| | | } else if (scrollTop >= 0.7 && scrollTop < 0.8) { |
| | | this.setData({ font_color: '#3b3b3b' }) |
| | | } else if (scrollTop >= 0.8 && scrollTop < 0.9) { |
| | | this.setData({ font_color: '#282828' }) |
| | | } else if (scrollTop >= 0.9) { |
| | | this.setData({ font_color: '#000000' }) |
| | | } |
| | | if (scrollTop > 0) { |
| | | this.setData({ showWhiteHead: true }) |
| | | } else{ |
| | | this.setData({ showWhiteHead: false }) |
| | | } |
| | | this.setData({ topHeadStyle: scrollTop, top: scrollTop }) |
| | | }, |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | |
| | | .container { |
| | | background-color: #f7f7f7; |
| | | overflow-y: auto; |
| | | height: 100vh; |
| | | min-height: 100vh; |
| | | |
| | | .banner_swiper { |
| | | height: 600rpx; |
| | | width: 100%; |
| | |
| | | } |
| | | |
| | | .consult_swiper { |
| | | height: 420rpx; |
| | | width: 100%; |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: block; |
| | | } |
| | | } |
| | | |
| | |
| | | align-items: center; |
| | | padding: 60rpx 0; |
| | | background-color: #fff; |
| | | |
| | | .logo { |
| | | width: 246rpx; |
| | | } |
| | |
| | | padding: 72rpx 40rpx; |
| | | background-color: #fff; |
| | | |
| | | video { |
| | | .video_wrap { |
| | | width: 670rpx; |
| | | height: 300rpx; |
| | | border: 1px solid; |
| | | position: relative; |
| | | |
| | | .play { |
| | | width: 60rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 1; |
| | | } |
| | | |
| | | .img { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .strategy { |
| | | padding: 80rpx 40rpx; |
| | | background: #F7F7F7; |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | .item { |
| | | position: relative; |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | } |
| | | |
| | | text { |
| | | color: #fff; |
| | | position: absolute; |
| | | bottom: 40rpx; |
| | | left: 40rpx; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | |
| | | .line { |
| | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | .top-head-transparent { |
| | | background-color: transparent !important; |
| | | |
| | | .van-nav-bar__title { |
| | | /* color: #fff; */ |
| | | width: calc(100% - 80rpx); |
| | | max-width: 100%; |
| | | padding: 0 40rpx; |
| | | text-align: left; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | font-size: 40rpx; |
| | | } |
| | | } |
| | |
| | | <!-- é¡¶é¨nav --> |
| | | <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" bindtap="toSearch"> |
| | | <text>å¿é¦å®¶é</text> |
| | | <view slot="left" class="flex-cc search"> |
| | | <text 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> --> |
| | | </view> |
| | | </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> |
| | | </view> |
| | | </van-nav-bar> |
| | | <!-- bannerè½®æ --> |
| | | <swiper class="banner_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" duration="{{ bannerSwiperOption.duration }}"> |
| | | <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 mode="aspectFill" src="../../static/icon/test.png"></image> |
| | | <image data-id="{{ item.id }}" bindtap="bannerClick" bindload="bannerbindload" mode="widthFix" src="{{ item.coverImage }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | |
| | | </view> |
| | | <!-- --> |
| | | <authCard type="{{ member.authStatus }}" /> |
| | | <!-- <authCard type="1" /> --> |
| | | <!-- 产åè§é¢ --> |
| | | <view class="product_video" bindtap="jumpProVideo"> |
| | | <view class="com_header"> |
| | | <view class="product_video"> |
| | | <view bindtap="jumpProVideo" class="com_header"> |
| | | <view class="left"> |
| | | <view class="name"> |
| | | <image class="icon" src="../../static/icon/home_ic_zhutihuodong.png"></image> |
| | |
| | | </view> |
| | | <image class="ar_right" src="../../static/icon/home_ar@2x.png"></image> |
| | | </view> |
| | | <video controls class="main_video" src="https://vdept3.bdstatic.com/mda-njed6187hpegim0d/cae_h264/1665826435448713448/mda-njed6187hpegim0d.mp4?v_from_s=hkapp-haokan-hbe&auth_key=1720440602-0-0-f249e56273037ad05b8f7066fd0973ca&bcevod_channel=searchbox_feed&pd=1&cr=0&cd=0&pt=3&logid=0601949156&vid=646246476325419292&klogid=0601949156&abtest=101830_1-17451_2"></video> |
| | | <view class="video_wrap"> |
| | | <image class="img" src="{{ productVideo[0].coverImage }}" mode="widthFix"></image> |
| | | <image bindtap="videoClick" data-videourl="{{ productVideo[0].videoUrl }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | <!-- æ»ç¥ --> |
| | | <view class="strategy"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="line_left"> |
| | | <view class="line_left item" data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy"> |
| | | <image src="{{HOME_CLASS_A}}"></image> |
| | | <text>{{ ZSZXCata.jdId.name }}</text> |
| | | </view> |
| | | <view class="line_right"> |
| | | <view class="item"><image src="{{ HOME_CLASS_B }}"></image></view> |
| | | <view class="item"><image src="{{ HOME_CLASS_B2 }}"></image></view> |
| | | <view class="item" data-item="{{ ZSZXCata.cfsj }}" bindtap="changeStrategy"> |
| | | <image src="{{ HOME_CLASS_B }}"></image> |
| | | <text>{{ ZSZXCata.cfsj.name }}</text> |
| | | </view> |
| | | <view class="item" data-item="{{ ZSZXCata.snsj }}" bindtap="changeStrategy"> |
| | | <image src="{{ HOME_CLASS_B2 }}"></image> |
| | | <text>{{ ZSZXCata.snsj.name }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="home_id"> |
| | | <view data-item="{{ ZSZXCata.qwsj.code }}" bindtap="changeStrategy" class="home_id item"> |
| | | <image src="{{HOME_CLASS_C}}"></image> |
| | | <text>{{ ZSZXCata.qwsj.name }}</text> |
| | | </view> |
| | | </view> |
| | | <!-- å¨è¯¢ --> |
| | |
| | | </view> |
| | | <image class="ar_right" src="../../static/icon/home_ar@2x.png"></image> |
| | | </view> |
| | | <swiper class="consult_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ bannerList }}" wx:key="index"> |
| | | <swiper class="consult_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" style="height:{{consultImgHeight}}rpx" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ consultList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <image mode="aspectFill" src="../../static/icon/test.png"></image> |
| | | <image bindload="consultbindload" mode="widthFix" src="{{ item.coverImage }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | </view> |
| | | <!-- service --> |
| | | <view class="consult" bindtap="jumpProKefu"> |
| | | <view class="consult"> |
| | | <view class="com_header"> |
| | | <view class="left"> |
| | | <view class="name"> |
| | |
| | | <view class="desc">设身å¤å°ä¸ºä½ æèæ´å¤ï¼éªä¼´ä½ çç¾å¥½çæ´»</view> |
| | | </view> |
| | | </view> |
| | | <swiper class="consult_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ bannerList }}" wx:key="index"> |
| | | <swiper class="consult_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" style="height:{{serviceHeight}}rpx" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ serviceList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <image mode="aspectFill" src="../../static/icon/test.png"></image> |
| | | <image bindload='goserHeight' data-id="{{ item.id }}" data-title="{{item.title}}" bindtap="seriveClick" mode="widthFix" src="{{ item.fileList[0].fileurlFull }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | |
| | | .container { |
| | | background-color: #f7f7f7; |
| | | overflow-y: auto; |
| | | height: 100vh; |
| | | min-height: 100vh; |
| | | } |
| | | .container .banner_swiper { |
| | | height: 600rpx; |
| | |
| | | display: block; |
| | | } |
| | | .container .consult_swiper { |
| | | height: 420rpx; |
| | | width: 100%; |
| | | } |
| | | .container .consult_swiper image { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: block; |
| | | } |
| | | .container .logo_wrap { |
| | | width: 100%; |
| | |
| | | padding: 72rpx 40rpx; |
| | | background-color: #fff; |
| | | } |
| | | .container .product_video video { |
| | | .container .product_video .video_wrap { |
| | | width: 670rpx; |
| | | height: 300rpx; |
| | | border: 1px solid; |
| | | position: relative; |
| | | } |
| | | .container .product_video .video_wrap .play { |
| | | width: 60rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 1; |
| | | } |
| | | .container .product_video .video_wrap .img { |
| | | width: 100%; |
| | | } |
| | | .container .strategy { |
| | | padding: 80rpx 40rpx; |
| | | background: #F7F7F7; |
| | | } |
| | | .container .strategy image { |
| | | .container .strategy .item { |
| | | position: relative; |
| | | } |
| | | .container .strategy .item image { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | } |
| | | .container .strategy .item text { |
| | | color: #fff; |
| | | position: absolute; |
| | | bottom: 40rpx; |
| | | left: 40rpx; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | } |
| | | .container .strategy .line { |
| | | display: flex; |
| | |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | .top-head-transparent { |
| | | background-color: transparent !important; |
| | | } |
| | | .top-head-transparent .van-nav-bar__title { |
| | | /* color: #fff; */ |
| | | width: calc(100% - 80rpx); |
| | | max-width: 100%; |
| | | padding: 0 40rpx; |
| | | text-align: left; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | font-size: 40rpx; |
| | | } |
| | |
| | | // pages/kefu/index.js |
| | | import { getCustomizedNewsDetail } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | info: {} |
| | | }, |
| | | |
| | | /** |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | if(options && options.id){ |
| | | this.getDetail(options.id) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | getDetail(id) { |
| | | getCustomizedNewsDetail({id}).then(res => { |
| | | this.setData({ |
| | | info: { ...res.data } |
| | | }) |
| | | }) |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "usingComponents": { |
| | | "mp-html": "mp-html" |
| | | }, |
| | | "navigationBarTitleText": "ä¸å±å®¢æ" |
| | | } |
| | |
| | | <view class="container"> |
| | | <view> |
| | | <!-- <rich-text nodes="{{ info.content }}"></rich-text> --> |
| | | <mp-html content="{{info.content}}"></mp-html> |
| | | </view> |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import { getCustomizedNewsDetail } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | info: {} |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | if(options && options.id){ |
| | | this.getDetail(options.id) |
| | | } |
| | | wx.setNavigationBarTitle({ |
| | | title: options.title |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | getCustomizedNewsDetail({id}).then(res => { |
| | | this.setData({ |
| | | info: { ...res.data } |
| | | }) |
| | | }) |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "usingComponents": { |
| | | "mp-html": "mp-html" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <view class="container"> |
| | | <mp-html content="{{info.content}}"></mp-html> |
| | | </view> |
| | |
| | | // pages/consult/consult.js |
| | | import { getZhongTaiVideoPage, getCataLogTagList } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | category: ['æ°åä¸å¸', 'ä¸å©è¯ä¹¦', 'å¤§çææ','æ°åä¸å¸', 'ä¸å©è¯ä¹¦', 'å¤§çææ'], |
| | | secondCategory: ['级åç±»','级åç±»','级åç±»','级åç±»','级åç±»','级åç±»'], |
| | | category: [], |
| | | activeCate: '', |
| | | seActiveCate: '', |
| | | dataList: [] |
| | | }, |
| | | |
| | | dataList: [], |
| | | total: 0, |
| | | pageSize: 10, |
| | | pageNum: 1, |
| | | |
| | | }, |
| | | getList() { |
| | | const { pageSize, pageNum } = this.data |
| | | getZhongTaiVideoPage({ |
| | | pageSize,pageNum |
| | | }).then(res => { |
| | | this.setData({ dataList: res.data.records }) |
| | | }) |
| | | }, |
| | | getTagList() { |
| | | getCataLogTagList({ |
| | | catalogCode: 'video_rec' |
| | | }).then(res => { |
| | | this.setData({ category: res.data.valueVos }) |
| | | }) |
| | | }, |
| | | itemClick(e) { |
| | | const { id } = e.target.dataset |
| | | console.log(e.target.dataset); |
| | | wx.navigateTo({ |
| | | url: '/pages/consult/detail', |
| | | const { videourl } = e.currentTarget.dataset |
| | | wx.previewMedia({ |
| | | sources: [{ url: videourl, type: 'video' }] |
| | | }) |
| | | }, |
| | | cateClick(e) { |
| | |
| | | console.log(index); |
| | | }, |
| | | onLoad(options) { |
| | | |
| | | this.getTagList() |
| | | this.getList() |
| | | }, |
| | | |
| | | /** |
| | |
| | | .content{ |
| | | padding: 0 40rpx 40rpx; |
| | | .item{ |
| | | .img{ |
| | | margin-bottom: 60rpx; |
| | | position: relative; |
| | | .play{ |
| | | width: 60rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 1; |
| | | } |
| | | .img_wrap{ |
| | | width: 100%; |
| | | position: relative; |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | .title{ |
| | | font-size: 30rpx; |
| | |
| | | <view class="container"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢å¨è¯¢æ é¢" /> |
| | | </view> |
| | | <!-- åç±» --> |
| | | <view> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | |
| | | <view bindtap="cateClick" data-index="{{index}}" wx:for="{{ category }}" class="item {{ index == 0 ? 'active': '' }}">{{ item }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 28rpx;"> |
| | | <!-- <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 28rpx;"> |
| | | <view class="scroll_cate second_list"> |
| | | <view bindtap="seCateClick" data-index="{{index}}" wx:for="{{ secondCategory }}" class="item {{ index == 0 ? 'active': '' }}">{{ index }}{{ item }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | </scroll-view> --> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view class="item" bindtap="itemClick" data-abg="qwe"> |
| | | <image class="img" src="../../static/icon/test.png" mode="widthFix"></image> |
| | | <view class="title">åç¯å®ç¨ç¹è¾ | 䏿¥å¦ä¼çæ³å
å½±å¸å±</view> |
| | | <view wx:for="{{ dataList }}" class="item"> |
| | | <view class="img_wrap"> |
| | | <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image> |
| | | <image bindtap="itemClick" data-videourl="{{ item.videoUrl }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image> |
| | | </view> |
| | | |
| | | <view class="title">{{ item.title }}</view> |
| | | <view class="df_sb static"> |
| | | <view>{{ '2021-08-21 12:00:00' }}</view> |
| | | <view>{{ item.publishDt }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | <text>{{ item.viewCount }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .content { |
| | | padding: 0 40rpx 40rpx; |
| | | } |
| | | .content .item .img { |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | | position: relative; |
| | | } |
| | | .content .item .play { |
| | | width: 60rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 1; |
| | | } |
| | | .content .item .img_wrap { |
| | | width: 100%; |
| | | position: relative; |
| | | } |
| | | .content .item .img_wrap .img { |
| | | width: 100%; |
| | | } |
| | | .content .item .title { |
| | |
| | | // pages/store/info.js |
| | | import { |
| | | getShopDetail |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | clientHeight: 0, |
| | | clientTop: 0, |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | this.getDetail(options.id) |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | const res = wx.getMenuButtonBoundingClientRect() |
| | | this.setData({clientHeight: res.height}) |
| | | this.setData({clientTop: res.top}) |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | navback() { |
| | | wx.navigateBack() |
| | | }, |
| | | makePhone(e) { |
| | | const { linkPhone } = this.data.info |
| | | wx.makePhoneCall({ phoneNumber: linkPhone }) |
| | | }, |
| | | handleDetail(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | wx.navigateTo({ |
| | | url: '/pages/store/staff?id=' + id, |
| | | }) |
| | | }, |
| | | handleNavigation() { |
| | | wx.getLocation({ |
| | | type: 'gcj02', //è¿åå¯ä»¥ç¨äºwx.openLocationçç»çº¬åº¦ |
| | | success (res) { |
| | | const latitude = res.latitude |
| | | const longitude = res.longitude |
| | | wx.openLocation({ |
| | | latitude, |
| | | longitude, |
| | | scale: 18 |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | getShopDetail({shopId: id}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | }) |
| | | }, |
| | | |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": {}, |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | .header { |
| | | position: relative; |
| | | z-index: 999; |
| | | width: 670rpx; |
| | | margin: 40rpx auto 48rpx; |
| | | height: 224rpx; |
| | | height: 170rpx; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(176, 135, 113, 0.2); |
| | | border-radius: 8rpx; |
| | |
| | | .name { |
| | | font-weight: 500; |
| | | font-size: 36rpx; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | |
| | | .desc { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | margin: 16rpx 0 24rpx; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .addr { |
| | | font-size: 26rpx; |
| | | color: #888888; |
| | | } |
| | | } |
| | | .navback{ |
| | | padding-left: 30rpx; |
| | | font-weight: 600; |
| | | font-size: 38rpx; |
| | | color: #FFFFFF; |
| | | } |
| | | .bg_wrap{ |
| | | width: 750rpx; |
| | |
| | | z-index: -1; |
| | | } |
| | | .main_content { |
| | | position: relative; |
| | | bottom: 80rpx; |
| | | padding: 0 40rpx 40rpx; |
| | | |
| | | background-color: #fff; |
| | | padding-top: 80rpx; |
| | | .title { |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | margin-bottom: 38rpx; |
| | | } |
| | | |
| | | .list { |
| | | .item { |
| | | width: 670rpx; |
| | |
| | | <view> |
| | | <navBar title=""></navBar> |
| | | <view class="bg_wrap"></view> |
| | | <!-- <view class="bg_wrap"></view> --> |
| | | <image class="bg_wrap" src="../../static/images/mendian_bg.png" mode="widthFix"></image> |
| | | <view class="navback" style="padding-top: {{ clientTop }}px;height: {{clientHeight + clientTop}}px;"> |
| | | <van-icon bindtap="navback" name="arrow-left" /> |
| | | </view> |
| | | <view class="container"> |
| | | <view class="header"> |
| | | <view class="name">åè¥æ¹æåº</view> |
| | | <view class="desc">å
¨å±å®å¶ãæ´ä½å¨æ¿ãæ¨é¨å¢æ¿ãå«é³å®å¶</view> |
| | | <view class="addr">2.4kmï½åè¥å¸é寨路ç¥çäºç¯å½é
A座</view> |
| | | <view class="name">{{ info.name }}</view> |
| | | <!-- <view class="desc">å
¨å±å®å¶ãæ´ä½å¨æ¿ãæ¨é¨å¢æ¿ãå«é³å®å¶</view> --> |
| | | <view class="addr">2.4ï½{{ info.address || '--' }}</view> |
| | | </view> |
| | | <view class="main_content"> |
| | | <view class="title">é¨åºå¯¼è´</view> |
| | | <view class="list"> |
| | | <view class="item"> |
| | | <view class="avatar"></view> |
| | | <view class="item" data-id="{{ item.iamId }}" bindtap="handleDetail" wx:for="{{ info.usersList }}"> |
| | | <image src="{{ item.imgurlFull }}" class="avatar"></image> |
| | | <view class="content"> |
| | | <view class="name">䏿¢æ</view> |
| | | <view class="desc">导è´ï½5å¹´ç»éª</view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="avatar"></view> |
| | | <view class="content"> |
| | | <view class="name">䏿¢æ</view> |
| | | <view class="desc">导è´ï½5å¹´ç»éª</view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="avatar"></view> |
| | | <view class="content"> |
| | | <view class="name">䏿¢æ</view> |
| | | <view class="desc">导è´ï½5å¹´ç»éª</view> |
| | | <view class="name">{{ item.name }}</view> |
| | | <view class="desc">导è´ï½{{ info.jobDate || '-'}}å¹´ç»éª</view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | |
| | | </view> |
| | | <!-- footer --> |
| | | <view class="footer" style="bottom: {{bottomLift}}px;"> |
| | | <view class="btn"> |
| | | <view bindtap="handleNavigation" class="btn"> |
| | | <image src="../../static/icon/mendian_ic_daohang@2x.png" mode="widthFix"></image> |
| | | <view>导èª</view> |
| | | </view> |
| | | <view class="btn phone"> |
| | | <view bindtap="makePhone" class="btn phone"> |
| | | <image src="../../static/icon/call.png" mode="widthFix"></image> |
| | | <view>é¨åºçµè¯</view> |
| | | </view> |
| | |
| | | .header { |
| | | position: relative; |
| | | z-index: 999; |
| | | width: 670rpx; |
| | | margin: 40rpx auto 48rpx; |
| | | height: 224rpx; |
| | | height: 170rpx; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(176, 135, 113, 0.2); |
| | | border-radius: 8rpx; |
| | |
| | | .header .name { |
| | | font-weight: 500; |
| | | font-size: 36rpx; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | .header .desc { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | margin: 16rpx 0 24rpx; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .header .addr { |
| | | font-size: 26rpx; |
| | | color: #888888; |
| | | } |
| | | .navback { |
| | | padding-left: 30rpx; |
| | | font-weight: 600; |
| | | font-size: 38rpx; |
| | | color: #FFFFFF; |
| | | } |
| | | .bg_wrap { |
| | | width: 750rpx; |
| | |
| | | z-index: -1; |
| | | } |
| | | .main_content { |
| | | position: relative; |
| | | bottom: 80rpx; |
| | | padding: 0 40rpx 40rpx; |
| | | background-color: #fff; |
| | | padding-top: 80rpx; |
| | | } |
| | | .main_content .title { |
| | | font-weight: 600; |
| | |
| | | // pages/store/staff.js |
| | | import { usersDetailByIamId } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | */ |
| | | data: { |
| | | bottomLift: 0, |
| | | isShow: false |
| | | isShow: false, |
| | | |
| | | info: {} |
| | | }, |
| | | |
| | | /** |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getDetail(options.id) |
| | | wx.showShareMenu({ |
| | | withShareTicket: true, |
| | | menus: ['shareAppMessage', 'shareTimeline'] |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | usersDetailByIamId({iamId: id}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | }) |
| | | }, |
| | | openModal() { |
| | | this.setData({isShow: true}) |
| | |
| | | onClose() { |
| | | this.setData({isShow: false}) |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-bottom: 60rpx; |
| | | |
| | | .card { |
| | | width: 320rpx; |
| | | height: 156rpx; |
| | | padding: 28rpx 40rpx; |
| | | background-color: #f7f7f7; |
| | | border-radius: 8rpx; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | position: relative; |
| | | .bg{ |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | z-index: -1; |
| | | top: 0; |
| | | left: 0; |
| | | |
| | | } |
| | | .num { |
| | | color: var(--themeColor); |
| | | margin-top: 8rpx; |
| | |
| | | <!-- <navBar></navBar> --> |
| | | <image src="../../static/images/design_banner@2x.png" mode="widthFix" class="bg_wrap"></image> |
| | | <view class="container"> |
| | | <image class="avatar" src=""></image> |
| | | <image class="avatar" src="{{ info.imgurlFull }}"></image> |
| | | <view class="name_wrap"> |
| | | <view class="left"> |
| | | <view class="name">å§å</view> |
| | | <view class="name">{{ info.name }}</view> |
| | | <view class="tag">导è´</view> |
| | | <view class="tag">5å¹´ç»éª</view> |
| | | <!-- <view class="tag">{{ info.jobDate || '-' }}å¹´ç»éª</view> --> |
| | | </view> |
| | | <image class="qrcode" src="../../static/icon/mingpian_erweima@2x.png" mode="widthFix"></image> |
| | | <image bindtap="openModal" class="qrcode" src="../../static/icon/mingpian_erweima@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="desc"> |
| | | <image src="../../static/icon/mingpian_ic_edit@2x.png" mode="widthFix"></image> |
| | | <view>ç¨å¿æå¡æ¯ä¸ä½é¡¾å®¢</view> |
| | | <view>{{ info.slogans }}</view> |
| | | <view class="icon"></view> |
| | | </view> |
| | | <view class="static"> |
| | | <view class="card"> |
| | | <image src="../../static/images/mingpian_bg_nianxian.png" class="bg"></image> |
| | | <view>ä»ä¸å¹´é</view> |
| | | <view class="num">5</view> |
| | | <view class="num">{{ info.jobDate || '-' }}</view> |
| | | </view> |
| | | <view class="card"> |
| | | <image src="../../static/images/mingpian_bg_kehu.png" class="bg"></image> |
| | | <view>æå¡å®¢æ·</view> |
| | | <view class="num">500+</view> |
| | | <view class="num" wx:if="{{ info.costomerNum || info.costomerNum == 0 }}">{{ info.costomerNum || '-' }}+</view> |
| | | <view wx:else class="num">--</view> |
| | | </view> |
| | | </view> |
| | | <view class="guide"> |
| | |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/icon/mingpian_ic_phone@2x.png" mode="widthFix"></image> |
| | | <text class="label">èç³»çµè¯</text> |
| | | <text class="val">1888888888888</text> |
| | | <text class="val">{{ info.phone }}</text> |
| | | </view> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/icon/mingpian_ic_mendian@2x.png" mode="widthFix"></image> |
| | | <text class="label">é¨åºåç§°</text> |
| | | <text class="val">1888888888888</text> |
| | | <text class="val">{{ info.shopName }}</text> |
| | | </view> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/icon/mingpian_ic_dizhi@2x.png" mode="widthFix"></image> |
| | | <text class="label">é¨åºå°å</text> |
| | | <text class="val">1888888888888</text> |
| | | <text class="val">{{ info.shopAddress }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- footer --> |
| | | <view class="footer" style="bottom: {{bottomLift}}px;"> |
| | | <view bindtap="openModal" class="footer" style="bottom: {{bottomLift}}px;"> |
| | | <view class="btn"> |
| | | <image src="../../static/icon/call.png" mode="widthFix"></image> |
| | | <view bindtap="openModal">èç³»TA</view> |
| | | <view>èç³»TA</view> |
| | | </view> |
| | | </view> |
| | | <!-- 详æ
--> |
| | | <van-popup show="{{ isShow }}" closeable round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <view class="header"> |
| | | <image class="avatar" src=""></image> |
| | | <image class="avatar" src="{{ info.imgurlFull }}"></image> |
| | | <view class="content"> |
| | | <view class="name">å§å</view> |
| | | <view class="desc">å¯¼è´ ï½ 5å¹´ç»éª</view> |
| | | <view class="name">{{ info.name }}</view> |
| | | <view class="desc">å¯¼è´ ï½ {{ info.jobDate || '--' }}å¹´ç»éª</view> |
| | | </view> |
| | | </view> |
| | | <image class="qrcode" src=""></image> |
| | | <image class="qrcode" src="{{ info.qrcodeImgFull }}"></image> |
| | | <view class="text">é¿æå¾çè¯å«äºç»´ç </view> |
| | | </view> |
| | | </van-popup> |
| | |
| | | width: 320rpx; |
| | | height: 156rpx; |
| | | padding: 28rpx 40rpx; |
| | | background-color: #f7f7f7; |
| | | border-radius: 8rpx; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | position: relative; |
| | | } |
| | | .static .card .bg { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | z-index: -1; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | .static .card .num { |
| | | color: var(--themeColor); |
| | |
| | | // pages/store/staffList.js |
| | | import { myUserPage } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | dataList: '', |
| | | capacity: 10, |
| | | page: 1, |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | this.getList() |
| | | }, |
| | | |
| | | handleDetail(e) { |
| | | const id = e.currentTarget.dataset.iamId |
| | | wx.navigateTo({ |
| | | url: '/pages/store/staff?id=' + id, |
| | | }) |
| | | }, |
| | | getList() { |
| | | const { page, capacity } = this.data |
| | | myUserPage({ |
| | | model: {}, |
| | | page,capacity |
| | | }).then(res => { |
| | | this.setData({ dataList: res.data.records, total: res.data.total }) |
| | | }) |
| | | }, |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText": "导è´å表" |
| | | } |
| | |
| | | width: 88rpx; |
| | | height: 88rpx; |
| | | border-radius: 50%; |
| | | border: 1rpx solid #cccccc; |
| | | margin-right: 24rpx; |
| | | } |
| | | |
| | |
| | | <view> |
| | | <navBar title="导è´å表" /> |
| | | <view class="header"> |
| | | <view class="line"> |
| | | <image src="../../static/icon/home_ic_guwen@2x.png" mode="widthFix"></image> |
| | |
| | | <view class="desc">æ¨èº«è¾¹çå
¨å±è®¾è®¡ä¸å®¶ï½</view> |
| | | </view> |
| | | <view class="list"> |
| | | <view class="item"> |
| | | <view class="avatar"></view> |
| | | <view class="content"> |
| | | <view class="name">䏿¢æ</view> |
| | | <view class="desc">导è´ï½5å¹´ç»éª</view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="avatar"></view> |
| | | <view class="content"> |
| | | <view class="name">䏿¢æ</view> |
| | | <view class="desc">导è´ï½5å¹´ç»éª</view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="avatar"></view> |
| | | <view class="content"> |
| | | <view class="name">䏿¢æ</view> |
| | | <view class="desc">导è´ï½5å¹´ç»éª</view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <view wx:for="{{ dataList }}" class="item"> |
| | | <image class="avatar" src="{{ item.imgurlFull ? imgurlFull : '../../static/images/default_avatar.png' }}"></image> |
| | | <view class="content"> |
| | | <view class="name">{{ item.name || '' }}</view> |
| | | <view class="desc">导è´ï½{{ item.jobDate || '--' }}å¹´ç»éª</view> |
| | | </view> |
| | | <view data-iamId="{{ item.iamId }}" bindtap="handleDetail" class="btn">èç³»TA</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | width: 88rpx; |
| | | height: 88rpx; |
| | | border-radius: 50%; |
| | | border: 1rpx solid #cccccc; |
| | | margin-right: 24rpx; |
| | | } |
| | | .list .item .btn { |
| | |
| | | // pages/store/store.js |
| | | import { |
| | | getShopPage |
| | | } from '../../api/index' |
| | | var QQMapWX = require('../../utils/qqmap-wx-jssdk.min'); |
| | | var qqmapsdk; |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | shopList: [], |
| | | address: '', |
| | | latitude: '', |
| | | longitude: '', |
| | | }, |
| | | |
| | | selAddress() { |
| | | console.log('ç¹å»äº'); |
| | | wx.chooseLocation({ |
| | | type: 'wgs84', |
| | | success: (res)=> { |
| | | success: (res) => { |
| | | this.setData({ |
| | | city: res.name |
| | | address: res.address, |
| | | latitude: res.latitude, |
| | | longitude: res.longitude, |
| | | }) |
| | | console.log('res', res); |
| | | } |
| | | }) |
| | | }, |
| | | onLoad(options) { |
| | | |
| | | let that = this |
| | | qqmapsdk = new QQMapWX({ |
| | | key: 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ' |
| | | }); |
| | | qqmapsdk.reverseGeocoder({ |
| | | success: (res) => { |
| | | console.log('res', res); |
| | | this.setData({ |
| | | address: res.result.address, |
| | | latitude: res.result.latitude, |
| | | longitude: res.result.longitude, |
| | | }) |
| | | } |
| | | }) |
| | | wx.getLocation({ |
| | | type: 'wgs84', |
| | | success(res) { |
| | | const latitude = res.latitude |
| | | const longitude = res.longitude |
| | | that.getShops(latitude, longitude) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | getShops(latitude, longitude) { |
| | | getShopPage({ |
| | | model: { |
| | | longitude, |
| | | latitude |
| | | } |
| | | }).then(res => { |
| | | this.setData({ |
| | | shopList: res.data.records |
| | | }) |
| | | }) |
| | | }, |
| | | handleDetail(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | wx.navigateTo({ |
| | | url: `/pages/store/info?id=${id}`, |
| | | }) |
| | | }, |
| | | makePhone(e) { |
| | | console.log('e', e); |
| | | const phoneNumber = e.currentTarget.dataset.phone |
| | | wx.makePhoneCall({ phoneNumber }) |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | .avatar{ |
| | | width: 72rpx; |
| | | height: 72rpx; |
| | | border: 1px solid; |
| | | border-radius: 50%; |
| | | margin-right: 16rpx; |
| | | } |
| | | .name{ |
| | | width: 120rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; //ææ¬æº¢åºæ¾ç¤ºçç¥å· |
| | | white-space: nowrap; //ææ¬ä¸ä¼æ¢è¡ |
| | | } |
| | | .ex{ |
| | | font-size: 24rpx; |
| | | color: #999999; |
| | |
| | | <view> |
| | | <view class="app_header"> |
| | | <image class="location" src="../../static/icon/location.png" mode="widthFix"></image> |
| | | <view bindtap="selAddress" class="add">{{ 111 }}é¿å¤§ä½¿å¤§èµçé¿å¤§ä½¿å¤§èµçé¿å¤§ä½¿å¤§èµçé¿å¤§ä½¿å¤§èµç</view> |
| | | <view class="right"> |
| | | <view class="add">{{ address }}</view> |
| | | <view bindtap="selAddress" class="right"> |
| | | <image src="../../static/icon/ic_dingwei@2x.png" mode="widthFix"></image> |
| | | <text class="primary">éæ°å®ä½</text> |
| | | </view> |
| | |
| | | <view class="main_content"> |
| | | <view class="app_title">AIä¸ºæ¨æ¨è以ä¸é¨åºï¼</view> |
| | | <view class="shops"> |
| | | <view class="shop"> |
| | | <view class="shop" wx:for="{{ shopList }}"> |
| | | <view class="header"> |
| | | <view class="left"> |
| | | <view class="title">title</view> |
| | | <view class="address"> |
| | | <text>1</text> |
| | | <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:else>--</text> |
| | | <image src="../../static/icon/arrow_right.png" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | <view class="right"> |
| | | <image class="phone" src="../../static/icon/phone.png" mode="widthFix"></image> |
| | | <image data-phone="{{ item.phone }}" bindtap="makePhone" class="phone" src="../../static/icon/phone.png" mode="widthFix"></image> |
| | | <view>çµè¯</view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <scroll-view scroll-x style="width: 640rpx"> |
| | | <view class="user_list"> |
| | | <view class="item"> |
| | | <view class="item" wx:for="{{ item.usersList }}" wx:for-item="user"> |
| | | <view class="info"> |
| | | <image class="avatar" src="" mode="widthFix"></image> |
| | | <image class="avatar" src="{{ user.imgurlFull }}" mode="widthFix"></image> |
| | | <view class="text"> |
| | | <view class="name">name</view> |
| | | <view class="ex">5å¹´ç»éª</view> |
| | | </view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="info"> |
| | | <image class="avatar" src="" mode="widthFix"></image> |
| | | <view class="text"> |
| | | <view class="name">name</view> |
| | | <view class="ex">5å¹´ç»éª</view> |
| | | </view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="info"> |
| | | <image class="avatar" src="" mode="widthFix"></image> |
| | | <view class="text"> |
| | | <view class="name">name</view> |
| | | <view class="ex">5å¹´ç»éª</view> |
| | | <view class="name">{{ user.name }}</view> |
| | | <view class="ex" wx:if="{{user.jobDate}}">{{ user.jobDate }}å¹´ç»éª</view> |
| | | </view> |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | |
| | | .main_content .shops .shop .user_list .item .info .avatar { |
| | | width: 72rpx; |
| | | height: 72rpx; |
| | | border: 1px solid; |
| | | border-radius: 50%; |
| | | margin-right: 16rpx; |
| | | } |
| | | .main_content .shops .shop .user_list .item .info .name { |
| | | width: 120rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | .main_content .shops .shop .user_list .item .info .ex { |
| | | font-size: 24rpx; |
| | | color: #999999; |
| | |
| | | // pages/userinfo/mysub.js |
| | | import { customerLogPage } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | activeTabs: '0' |
| | | activeTabs: '0', |
| | | |
| | | dataList: [], |
| | | total: 0, |
| | | page: 0, |
| | | capacity: 10, |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | this.getList() |
| | | }, |
| | | getList() { |
| | | const { page, capacity} = this.data |
| | | customerLogPage({ |
| | | model: {},page,capacity |
| | | }).then(res => { |
| | | this.setData({ dataList: res.data.records }) |
| | | }) |
| | | }, |
| | | tabsChange(e) { |
| | | const activeTabs = e.currentTarget.dataset.val |
| | |
| | | <view class="container"> |
| | | <view class="tabs"> |
| | | <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-val="0" bindtap="tabsChange"> |
| | | <!-- <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-val="0" bindtap="tabsChange"> |
| | | <view class="name">éæ±</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-val="1" bindtap="tabsChange"> |
| | | </view> --> |
| | | <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-val="1" 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 == '1' ? 'active' : '' }}" data-val="2" bindtap="tabsChange"> |
| | | <view class="name">é¢ç®</view> |
| | | <view class="border"></view> |
| | | </view> |
| | |
| | | "urlCheck": false |
| | | }, |
| | | "description": "项ç®ç§æé
ç½®æä»¶ãæ¤æä»¶ä¸çå
容å°è¦ç project.config.json ä¸çç¸ååæ®µã项ç®çæ¹å¨ä¼å
忥尿¤æä»¶ä¸ãè¯¦è§ææ¡£ï¼https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
| | | "libVersion": "2.30.4", |
| | | "libVersion": "3.4.10", |
| | | "condition": { |
| | | "miniprogram": { |
| | | "list": [ |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/auth/auth", |
| | | "pathName": "pages/store/staffList", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/discover/discover", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/store/store", |
| | | "query": "", |
| | | "query": "code=zb_deco_jdid&name=å®¶çiD", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | var ERROR_CONF = { KEY_ERR: 311, KEY_ERR_MSG: 'keyæ ¼å¼é误', PARAM_ERR: 310, PARAM_ERR_MSG: '请æ±åæ°ä¿¡æ¯æè¯¯', SYSTEM_ERR: 600, SYSTEM_ERR_MSG: 'ç³»ç»é误', WX_ERR_CODE: 1000, WX_OK_CODE: 200 }; var BASE_URL = 'https://apis.map.qq.com/ws/'; var URL_SEARCH = BASE_URL + 'place/v1/search'; var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion'; var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/'; var URL_CITY_LIST = BASE_URL + 'district/v1/list'; var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren'; var URL_DISTANCE = BASE_URL + 'distance/v1/'; var URL_DIRECTION = BASE_URL + 'direction/v1/'; var MODE = { driving: 'driving', transit: 'transit' }; var EARTH_RADIUS = 6378136.49; var Utils = { safeAdd(x, y) { var lsw = (x & 0xffff) + (y & 0xffff); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xffff) }, bitRotateLeft(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)) }, md5cmn(q, a, b, x, s, t) { return this.safeAdd(this.bitRotateLeft(this.safeAdd(this.safeAdd(a, q), this.safeAdd(x, t)), s), b) }, md5ff(a, b, c, d, x, s, t) { return this.md5cmn((b & c) | (~b & d), a, b, x, s, t) }, md5gg(a, b, c, d, x, s, t) { return this.md5cmn((b & d) | (c & ~d), a, b, x, s, t) }, md5hh(a, b, c, d, x, s, t) { return this.md5cmn(b ^ c ^ d, a, b, x, s, t) }, md5ii(a, b, c, d, x, s, t) { return this.md5cmn(c ^ (b | ~d), a, b, x, s, t) }, binlMD5(x, len) { x[len >> 5] |= 0x80 << (len % 32); x[((len + 64) >>> 9 << 4) + 14] = len; var i; var olda; var oldb; var oldc; var oldd; var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; for (i = 0; i < x.length; i += 16) { olda = a; oldb = b; oldc = c; oldd = d; a = this.md5ff(a, b, c, d, x[i], 7, -680876936); d = this.md5ff(d, a, b, c, x[i + 1], 12, -389564586); c = this.md5ff(c, d, a, b, x[i + 2], 17, 606105819); b = this.md5ff(b, c, d, a, x[i + 3], 22, -1044525330); a = this.md5ff(a, b, c, d, x[i + 4], 7, -176418897); d = this.md5ff(d, a, b, c, x[i + 5], 12, 1200080426); c = this.md5ff(c, d, a, b, x[i + 6], 17, -1473231341); b = this.md5ff(b, c, d, a, x[i + 7], 22, -45705983); a = this.md5ff(a, b, c, d, x[i + 8], 7, 1770035416); d = this.md5ff(d, a, b, c, x[i + 9], 12, -1958414417); c = this.md5ff(c, d, a, b, x[i + 10], 17, -42063); b = this.md5ff(b, c, d, a, x[i + 11], 22, -1990404162); a = this.md5ff(a, b, c, d, x[i + 12], 7, 1804603682); d = this.md5ff(d, a, b, c, x[i + 13], 12, -40341101); c = this.md5ff(c, d, a, b, x[i + 14], 17, -1502002290); b = this.md5ff(b, c, d, a, x[i + 15], 22, 1236535329); a = this.md5gg(a, b, c, d, x[i + 1], 5, -165796510); d = this.md5gg(d, a, b, c, x[i + 6], 9, -1069501632); c = this.md5gg(c, d, a, b, x[i + 11], 14, 643717713); b = this.md5gg(b, c, d, a, x[i], 20, -373897302); a = this.md5gg(a, b, c, d, x[i + 5], 5, -701558691); d = this.md5gg(d, a, b, c, x[i + 10], 9, 38016083); c = this.md5gg(c, d, a, b, x[i + 15], 14, -660478335); b = this.md5gg(b, c, d, a, x[i + 4], 20, -405537848); a = this.md5gg(a, b, c, d, x[i + 9], 5, 568446438); d = this.md5gg(d, a, b, c, x[i + 14], 9, -1019803690); c = this.md5gg(c, d, a, b, x[i + 3], 14, -187363961); b = this.md5gg(b, c, d, a, x[i + 8], 20, 1163531501); a = this.md5gg(a, b, c, d, x[i + 13], 5, -1444681467); d = this.md5gg(d, a, b, c, x[i + 2], 9, -51403784); c = this.md5gg(c, d, a, b, x[i + 7], 14, 1735328473); b = this.md5gg(b, c, d, a, x[i + 12], 20, -1926607734); a = this.md5hh(a, b, c, d, x[i + 5], 4, -378558); d = this.md5hh(d, a, b, c, x[i + 8], 11, -2022574463); c = this.md5hh(c, d, a, b, x[i + 11], 16, 1839030562); b = this.md5hh(b, c, d, a, x[i + 14], 23, -35309556); a = this.md5hh(a, b, c, d, x[i + 1], 4, -1530992060); d = this.md5hh(d, a, b, c, x[i + 4], 11, 1272893353); c = this.md5hh(c, d, a, b, x[i + 7], 16, -155497632); b = this.md5hh(b, c, d, a, x[i + 10], 23, -1094730640); a = this.md5hh(a, b, c, d, x[i + 13], 4, 681279174); d = this.md5hh(d, a, b, c, x[i], 11, -358537222); c = this.md5hh(c, d, a, b, x[i + 3], 16, -722521979); b = this.md5hh(b, c, d, a, x[i + 6], 23, 76029189); a = this.md5hh(a, b, c, d, x[i + 9], 4, -640364487); d = this.md5hh(d, a, b, c, x[i + 12], 11, -421815835); c = this.md5hh(c, d, a, b, x[i + 15], 16, 530742520); b = this.md5hh(b, c, d, a, x[i + 2], 23, -995338651); a = this.md5ii(a, b, c, d, x[i], 6, -198630844); d = this.md5ii(d, a, b, c, x[i + 7], 10, 1126891415); c = this.md5ii(c, d, a, b, x[i + 14], 15, -1416354905); b = this.md5ii(b, c, d, a, x[i + 5], 21, -57434055); a = this.md5ii(a, b, c, d, x[i + 12], 6, 1700485571); d = this.md5ii(d, a, b, c, x[i + 3], 10, -1894986606); c = this.md5ii(c, d, a, b, x[i + 10], 15, -1051523); b = this.md5ii(b, c, d, a, x[i + 1], 21, -2054922799); a = this.md5ii(a, b, c, d, x[i + 8], 6, 1873313359); d = this.md5ii(d, a, b, c, x[i + 15], 10, -30611744); c = this.md5ii(c, d, a, b, x[i + 6], 15, -1560198380); b = this.md5ii(b, c, d, a, x[i + 13], 21, 1309151649); a = this.md5ii(a, b, c, d, x[i + 4], 6, -145523070); d = this.md5ii(d, a, b, c, x[i + 11], 10, -1120210379); c = this.md5ii(c, d, a, b, x[i + 2], 15, 718787259); b = this.md5ii(b, c, d, a, x[i + 9], 21, -343485551); a = this.safeAdd(a, olda); b = this.safeAdd(b, oldb); c = this.safeAdd(c, oldc); d = this.safeAdd(d, oldd) } return [a, b, c, d] }, binl2rstr(input) { var i; var output = ''; var length32 = input.length * 32; for (i = 0; i < length32; i += 8) { output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff) } return output }, rstr2binl(input) { var i; var output = []; output[(input.length >> 2) - 1] = undefined; for (i = 0; i < output.length; i += 1) { output[i] = 0 } var length8 = input.length * 8; for (i = 0; i < length8; i += 8) { output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32) } return output }, rstrMD5(s) { return this.binl2rstr(this.binlMD5(this.rstr2binl(s), s.length * 8)) }, rstrHMACMD5(key, data) { var i; var bkey = this.rstr2binl(key); var ipad = []; var opad = []; var hash; ipad[15] = opad[15] = undefined; if (bkey.length > 16) { bkey = this.binlMD5(bkey, key.length * 8) } for (i = 0; i < 16; i += 1) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5c5c5c5c } hash = this.binlMD5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8); return this.binl2rstr(this.binlMD5(opad.concat(hash), 512 + 128)) }, rstr2hex(input) { var hexTab = '0123456789abcdef'; var output = ''; var x; var i; for (i = 0; i < input.length; i += 1) { x = input.charCodeAt(i); output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f) } return output }, str2rstrUTF8(input) { return unescape(encodeURIComponent(input)) }, rawMD5(s) { return this.rstrMD5(this.str2rstrUTF8(s)) }, hexMD5(s) { return this.rstr2hex(this.rawMD5(s)) }, rawHMACMD5(k, d) { return this.rstrHMACMD5(this.str2rstrUTF8(k), str2rstrUTF8(d)) }, hexHMACMD5(k, d) { return this.rstr2hex(this.rawHMACMD5(k, d)) }, md5(string, key, raw) { if (!key) { if (!raw) { return this.hexMD5(string) } return this.rawMD5(string) } if (!raw) { return this.hexHMACMD5(key, string) } return this.rawHMACMD5(key, string) }, getSig(requestParam, sk, feature, mode) { var sig = null; var requestArr = []; Object.keys(requestParam).sort().forEach(function (key) { requestArr.push(key + '=' + requestParam[key]) }); if (feature == 'search') { sig = '/ws/place/v1/search?' + requestArr.join('&') + sk } if (feature == 'suggest') { sig = '/ws/place/v1/suggestion?' + requestArr.join('&') + sk } if (feature == 'reverseGeocoder') { sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk } if (feature == 'geocoder') { sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk } if (feature == 'getCityList') { sig = '/ws/district/v1/list?' + requestArr.join('&') + sk } if (feature == 'getDistrictByCityId') { sig = '/ws/district/v1/getchildren?' + requestArr.join('&') + sk } if (feature == 'calculateDistance') { sig = '/ws/distance/v1/?' + requestArr.join('&') + sk } if (feature == 'direction') { sig = '/ws/direction/v1/' + mode + '?' + requestArr.join('&') + sk } sig = this.md5(sig); return sig }, location2query(data) { if (typeof data == 'string') { return data } var query = ''; for (var i = 0; i < data.length; i++) { var d = data[i]; if (!!query) { query += ';' } if (d.location) { query = query + d.location.lat + ',' + d.location.lng } if (d.latitude && d.longitude) { query = query + d.latitude + ',' + d.longitude } } return query }, rad(d) { return d * Math.PI / 180.0 }, getEndLocation(location) { var to = location.split(';'); var endLocation = []; for (var i = 0; i < to.length; i++) { endLocation.push({ lat: parseFloat(to[i].split(',')[0]), lng: parseFloat(to[i].split(',')[1]) }) } return endLocation }, getDistance(latFrom, lngFrom, latTo, lngTo) { var radLatFrom = this.rad(latFrom); var radLatTo = this.rad(latTo); var a = radLatFrom - radLatTo; var b = this.rad(lngFrom) - this.rad(lngTo); var distance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2))); distance = distance * EARTH_RADIUS; distance = Math.round(distance * 10000) / 10000; return parseFloat(distance.toFixed(0)) }, getWXLocation(success, fail, complete) { wx.getLocation({ type: 'gcj02', success: success, fail: fail, complete: complete }) }, getLocationParam(location) { if (typeof location == 'string') { var locationArr = location.split(','); if (locationArr.length === 2) { location = { latitude: location.split(',')[0], longitude: location.split(',')[1] } } else { location = {} } } return location }, polyfillParam(param) { param.success = param.success || function () { }; param.fail = param.fail || function () { }; param.complete = param.complete || function () { } }, checkParamKeyEmpty(param, key) { if (!param[key]) { var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key + 'åæ°æ ¼å¼æè¯¯'); param.fail(errconf); param.complete(errconf); return true } return false }, checkKeyword(param) { return !this.checkParamKeyEmpty(param, 'keyword') }, checkLocation(param) { var location = this.getLocationParam(param.location); if (!location || !location.latitude || !location.longitude) { var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + ' locationåæ°æ ¼å¼æè¯¯'); param.fail(errconf); param.complete(errconf); return false } return true }, buildErrorConfig(errCode, errMsg) { return { status: errCode, message: errMsg } }, handleData(param, data, feature) { if (feature == 'search') { var searchResult = data.data; var searchSimplify = []; for (var i = 0; i < searchResult.length; i++) { searchSimplify.push({ id: searchResult[i].id || null, title: searchResult[i].title || null, latitude: searchResult[i].location && searchResult[i].location.lat || null, longitude: searchResult[i].location && searchResult[i].location.lng || null, address: searchResult[i].address || null, category: searchResult[i].category || null, tel: searchResult[i].tel || null, adcode: searchResult[i].ad_info && searchResult[i].ad_info.adcode || null, city: searchResult[i].ad_info && searchResult[i].ad_info.city || null, district: searchResult[i].ad_info && searchResult[i].ad_info.district || null, province: searchResult[i].ad_info && searchResult[i].ad_info.province || null }) } param.success(data, { searchResult: searchResult, searchSimplify: searchSimplify }) } else if (feature == 'suggest') { var suggestResult = data.data; var suggestSimplify = []; for (var i = 0; i < suggestResult.length; i++) { suggestSimplify.push({ adcode: suggestResult[i].adcode || null, address: suggestResult[i].address || null, category: suggestResult[i].category || null, city: suggestResult[i].city || null, district: suggestResult[i].district || null, id: suggestResult[i].id || null, latitude: suggestResult[i].location && suggestResult[i].location.lat || null, longitude: suggestResult[i].location && suggestResult[i].location.lng || null, province: suggestResult[i].province || null, title: suggestResult[i].title || null, type: suggestResult[i].type || null }) } param.success(data, { suggestResult: suggestResult, suggestSimplify: suggestSimplify }) } else if (feature == 'reverseGeocoder') { var reverseGeocoderResult = data.result; var reverseGeocoderSimplify = { address: reverseGeocoderResult.address || null, latitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lat || null, longitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lng || null, adcode: reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode || null, city: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.city || null, district: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.district || null, nation: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.nation || null, province: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.province || null, street: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street || null, street_number: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street_number || null, recommend: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.recommend || null, rough: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.rough || null }; if (reverseGeocoderResult.pois) { var pois = reverseGeocoderResult.pois; var poisSimplify = []; for (var i = 0; i < pois.length; i++) { poisSimplify.push({ id: pois[i].id || null, title: pois[i].title || null, latitude: pois[i].location && pois[i].location.lat || null, longitude: pois[i].location && pois[i].location.lng || null, address: pois[i].address || null, category: pois[i].category || null, adcode: pois[i].ad_info && pois[i].ad_info.adcode || null, city: pois[i].ad_info && pois[i].ad_info.city || null, district: pois[i].ad_info && pois[i].ad_info.district || null, province: pois[i].ad_info && pois[i].ad_info.province || null }) } param.success(data, { reverseGeocoderResult: reverseGeocoderResult, reverseGeocoderSimplify: reverseGeocoderSimplify, pois: pois, poisSimplify: poisSimplify }) } else { param.success(data, { reverseGeocoderResult: reverseGeocoderResult, reverseGeocoderSimplify: reverseGeocoderSimplify }) } } else if (feature == 'geocoder') { var geocoderResult = data.result; var geocoderSimplify = { title: geocoderResult.title || null, latitude: geocoderResult.location && geocoderResult.location.lat || null, longitude: geocoderResult.location && geocoderResult.location.lng || null, adcode: geocoderResult.ad_info && geocoderResult.ad_info.adcode || null, province: geocoderResult.address_components && geocoderResult.address_components.province || null, city: geocoderResult.address_components && geocoderResult.address_components.city || null, district: geocoderResult.address_components && geocoderResult.address_components.district || null, street: geocoderResult.address_components && geocoderResult.address_components.street || null, street_number: geocoderResult.address_components && geocoderResult.address_components.street_number || null, level: geocoderResult.level || null }; param.success(data, { geocoderResult: geocoderResult, geocoderSimplify: geocoderSimplify }) } else if (feature == 'getCityList') { var provinceResult = data.result[0]; var cityResult = data.result[1]; var districtResult = data.result[2]; param.success(data, { provinceResult: provinceResult, cityResult: cityResult, districtResult: districtResult }) } else if (feature == 'getDistrictByCityId') { var districtByCity = data.result[0]; param.success(data, districtByCity) } else if (feature == 'calculateDistance') { var calculateDistanceResult = data.result.elements; var distance = []; for (var i = 0; i < calculateDistanceResult.length; i++) { distance.push(calculateDistanceResult[i].distance) } param.success(data, { calculateDistanceResult: calculateDistanceResult, distance: distance }) } else if (feature == 'direction') { var direction = data.result.routes; param.success(data, direction) } else { param.success(data) } }, buildWxRequestConfig(param, options, feature) { var that = this; options.header = { "content-type": "application/json" }; options.method = 'GET'; options.success = function (res) { var data = res.data; if (data.status === 0) { that.handleData(param, data, feature) } else { param.fail(data) } }; options.fail = function (res) { res.statusCode = ERROR_CONF.WX_ERR_CODE; param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) }; options.complete = function (res) { var statusCode = +res.statusCode; switch (statusCode) { case ERROR_CONF.WX_ERR_CODE: { param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)); break } case ERROR_CONF.WX_OK_CODE: { var data = res.data; if (data.status === 0) { param.complete(data) } else { param.complete(that.buildErrorConfig(data.status, data.message)) } break } default: { param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG)) } } }; return options }, locationProcess(param, locationsuccess, locationfail, locationcomplete) { var that = this; locationfail = locationfail || function (res) { res.statusCode = ERROR_CONF.WX_ERR_CODE; param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) }; locationcomplete = locationcomplete || function (res) { if (res.statusCode == ERROR_CONF.WX_ERR_CODE) { param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) } }; if (!param.location) { that.getWXLocation(locationsuccess, locationfail, locationcomplete) } else if (that.checkLocation(param)) { var location = Utils.getLocationParam(param.location); locationsuccess(location) } } }; class QQMapWX { constructor(options) { if (!options.key) { throw Error('keyå¼ä¸è½ä¸ºç©º') } this.key = options.key }; search(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (!Utils.checkKeyword(options)) { return } var requestParam = { keyword: options.keyword, orderby: options.orderby || '_distance', page_size: options.page_size || 10, page_index: options.page_index || 1, output: 'json', key: that.key }; if (options.address_format) { requestParam.address_format = options.address_format } if (options.filter) { requestParam.filter = options.filter } var distance = options.distance || "1000"; var auto_extend = options.auto_extend || 1; var region = null; var rectangle = null; if (options.region) { region = options.region } if (options.rectangle) { rectangle = options.rectangle } var locationsuccess = function (result) { if (region && !rectangle) { requestParam.boundary = "region(" + region + "," + auto_extend + "," + result.latitude + "," + result.longitude + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } else if (rectangle && !region) { requestParam.boundary = "rectangle(" + rectangle + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } else { requestParam.boundary = "nearby(" + result.latitude + "," + result.longitude + "," + distance + "," + auto_extend + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SEARCH, data: requestParam }, 'search')) }; Utils.locationProcess(options, locationsuccess) }; getSuggestion(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (!Utils.checkKeyword(options)) { return } var requestParam = { keyword: options.keyword, region: options.region || 'å
¨å½', region_fix: options.region_fix || 0, policy: options.policy || 0, page_size: options.page_size || 10, page_index: options.page_index || 1, get_subpois: options.get_subpois || 0, output: 'json', key: that.key }; if (options.address_format) { requestParam.address_format = options.address_format } if (options.filter) { requestParam.filter = options.filter } if (options.location) { var locationsuccess = function (result) { requestParam.location = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, "suggest")) }; Utils.locationProcess(options, locationsuccess) } else { if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, "suggest")) } }; reverseGeocoder(options) { var that = this; options = options || {}; Utils.polyfillParam(options); var requestParam = { coord_type: options.coord_type || 5, get_poi: options.get_poi || 0, output: 'json', key: that.key }; if (options.poi_options) { requestParam.poi_options = options.poi_options } var locationsuccess = function (result) { requestParam.location = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'reverseGeocoder') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_GET_GEOCODER, data: requestParam }, 'reverseGeocoder')) }; Utils.locationProcess(options, locationsuccess) }; geocoder(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'address')) { return } var requestParam = { address: options.address, output: 'json', key: that.key }; if (options.region) { requestParam.region = options.region } if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'geocoder') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_GET_GEOCODER, data: requestParam }, 'geocoder')) }; getCityList(options) { var that = this; options = options || {}; Utils.polyfillParam(options); var requestParam = { output: 'json', key: that.key }; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'getCityList') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_CITY_LIST, data: requestParam }, 'getCityList')) }; getDistrictByCityId(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'id')) { return } var requestParam = { id: options.id || '', output: 'json', key: that.key }; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'getDistrictByCityId') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_AREA_LIST, data: requestParam }, 'getDistrictByCityId')) }; calculateDistance(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'to')) { return } var requestParam = { mode: options.mode || 'walking', to: Utils.location2query(options.to), output: 'json', key: that.key }; if (options.from) { options.location = options.from } if (requestParam.mode == 'straight') { var locationsuccess = function (result) { var locationTo = Utils.getEndLocation(requestParam.to); var data = { message: "query ok", result: { elements: [] }, status: 0 }; for (var i = 0; i < locationTo.length; i++) { data.result.elements.push({ distance: Utils.getDistance(result.latitude, result.longitude, locationTo[i].lat, locationTo[i].lng), duration: 0, from: { lat: result.latitude, lng: result.longitude }, to: { lat: locationTo[i].lat, lng: locationTo[i].lng } }) } var calculateResult = data.result.elements; var distanceResult = []; for (var i = 0; i < calculateResult.length; i++) { distanceResult.push(calculateResult[i].distance) } return options.success(data, { calculateResult: calculateResult, distanceResult: distanceResult }) }; Utils.locationProcess(options, locationsuccess) } else { var locationsuccess = function (result) { requestParam.from = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'calculateDistance') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_DISTANCE, data: requestParam }, 'calculateDistance')) }; Utils.locationProcess(options, locationsuccess) } }; direction(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'to')) { return } var requestParam = { output: 'json', key: that.key }; if (typeof options.to == 'string') { requestParam.to = options.to } else { requestParam.to = options.to.latitude + ',' + options.to.longitude } var SET_URL_DIRECTION = null; options.mode = options.mode || MODE.driving; SET_URL_DIRECTION = URL_DIRECTION + options.mode; if (options.from) { options.location = options.from } if (options.mode == MODE.driving) { if (options.from_poi) { requestParam.from_poi = options.from_poi } if (options.heading) { requestParam.heading = options.heading } if (options.speed) { requestParam.speed = options.speed } if (options.accuracy) { requestParam.accuracy = options.accuracy } if (options.road_type) { requestParam.road_type = options.road_type } if (options.to_poi) { requestParam.to_poi = options.to_poi } if (options.from_track) { requestParam.from_track = options.from_track } if (options.waypoints) { requestParam.waypoints = options.waypoints } if (options.policy) { requestParam.policy = options.policy } if (options.plate_number) { requestParam.plate_number = options.plate_number } } if (options.mode == MODE.transit) { if (options.departure_time) { requestParam.departure_time = options.departure_time } if (options.policy) { requestParam.policy = options.policy } } var locationsuccess = function (result) { requestParam.from = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'direction', options.mode) } wx.request(Utils.buildWxRequestConfig(options, { url: SET_URL_DIRECTION, data: requestParam }, 'direction')) }; Utils.locationProcess(options, locationsuccess) } }; module.exports = QQMapWX; |
| | |
| | | if (res.data.code === 200) { |
| | | resolve(res.data || true) |
| | | } else { |
| | | if(res.data.code && res.data.code == 5112){ |
| | | if(res.data.code == 5111 && res.data.code == 5112){ |
| | | wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | import { baseUrl } from '../utils/config' |
| | | |
| | | export const uploadUrl = baseUrl + '/public/upload' |
| | | // å°ç¨åºç»å½ |
| | | // å°ç¨åº é»è®¤ç»å½ |
| | | export const wxLoginCustomer = (data) => { |
| | | return request({ |
| | | url: '/web/customer/wxLoginCustomer', |
| | | url: '/web/personnel/loginByWx', |
| | | data |
| | | }) |
| | | } |
| | | // éªè¯ç ç»å½ |
| | | export const loginByPhone = (data) => { |
| | | return request({ |
| | | url: '/web/personnel/loginByPhone', |
| | | data |
| | | }) |
| | | } |
| | | // åééªè¯ç |
| | | export const sendSms = (data) => { |
| | | return request({ |
| | | url: '/web/personnel/sendSms', |
| | | data |
| | | }) |
| | | } |
| | |
| | | // è·åä¼åä¿¡æ¯ |
| | | export const getMemberInfo = () => { |
| | | return request({ |
| | | url: '/web/customer/getMemberInfo', |
| | | url: '/web/personnel/getUserDetail', |
| | | }) |
| | | } |
| | | // é¦é¡µ æ¯æ¥ä¸æ° |
| | | export const getDailyUpdates = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getDailyUpdates', |
| | | data |
| | | }) |
| | | } |
| | | // é¦é¡µ æ¨å¹¿å¨è¯¢å页 |
| | | export const newsPage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/newsPage', |
| | | data, |
| | | method: "POST" |
| | | }) |
| | | } |
| | | // é¦é¡µ å¿è¯´è£
ä¿® |
| | | export const getZSZXCatalogs = () => { |
| | | return request({ |
| | | url: '/web/customer/getZSZXCatalogs', |
| | | method: "POST" |
| | | }) |
| | | } |
| | | // å¿è¯´è£
ä¿® æ ç¾ |
| | | export const getCataLogTagList = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getCataLogTagList', |
| | | method: "POST", |
| | | data |
| | | }) |
| | | } |
| | | // 䏿³° åç±»æ°æ® |
| | | export const getCatalogList = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getCatalogList', |
| | | method: "POST", |
| | | data |
| | | }) |
| | | } |
| | | // å¿è¯´è£
ä¿® å
容 |
| | | export const pageZSZXContentList = (data) => { |
| | | return request({ |
| | | url: '/web/customer/pageContentList', |
| | | method: "POST", |
| | | data |
| | | }) |
| | | } |
| | | // è·åé¨åºå表 |
| | |
| | | // app.js |
| | | import { wxLoginCustomer } from './api/index' |
| | | App({ |
| | | globalData: { |
| | | primary: '#B08771', |
| | |
| | | this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom; |
| | | } |
| | | // |
| | | // let menuButtonInfo = wx.getMenuButtonBoundingClientRect(); |
| | | return |
| | | const res = wx.getStorageSync('member') |
| | | if (res) { |
| | | this.globalData.userInfo = res |
| | | } 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) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | // pages/consult/consult.js |
| | | import { getCataLogTagList, pageZSZXContentList } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | category: ['æ°åä¸å¸', 'ä¸å©è¯ä¹¦', 'å¤§çææ','æ°åä¸å¸', 'ä¸å©è¯ä¹¦', 'å¤§çææ'], |
| | | secondCategory: ['级åç±»','级åç±»','级åç±»','级åç±»','级åç±»','级åç±»'], |
| | | tagList: [], |
| | | activeCate: '', |
| | | seActiveCate: '', |
| | | dataList: [] |
| | | }, |
| | | dataList: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | |
| | | code: '', |
| | | tagCodes: '' |
| | | }, |
| | | onLoad(options) { |
| | | wx.setNavigationBarTitle({ |
| | | title: options.name |
| | | }) |
| | | this.setData({ code: options.code}) |
| | | this.getTabList() |
| | | this.getList() |
| | | }, |
| | | itemClick(e) { |
| | | const { id } = e.target.dataset |
| | | console.log(e.target.dataset); |
| | |
| | | }) |
| | | }, |
| | | cateClick(e) { |
| | | const { index } = e.target.dataset |
| | | console.log(index); |
| | | const { code } = e.target.dataset |
| | | this.setData({ |
| | | tagCodes: code, |
| | | pageNum: 1, |
| | | dataList: [] |
| | | }) |
| | | this.getList() |
| | | }, |
| | | seCateClick(e) { |
| | | const { index } = e.target.dataset |
| | | console.log(index); |
| | | getTabList() { |
| | | getCataLogTagList({ |
| | | catalogCode: this.data.code |
| | | }).then(res => { |
| | | if(res && res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | tagList: res.data[0].valueVos |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | onLoad(options) { |
| | | getList(){ |
| | | const { code, tagCodes, pageSize, pageNum } = this.data |
| | | pageZSZXContentList({ |
| | | catalogCode: code, |
| | | tagCodes, |
| | | pageSize, |
| | | pageNum |
| | | }).then(res => { |
| | | this.setData({ |
| | | dataList: [ ...this.data.dataList, ...res.data.records ] |
| | | }) |
| | | }) |
| | | }, |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "navigationBarTitleText": "å®¶çID" |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | <view class="container"> |
| | | |
| | | <!-- åç±» --> |
| | | <view> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-index="{{index}}" wx:for="{{ category }}" class="item {{ index == 0 ? 'active': '' }}">{{ item }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view class="item" bindtap="itemClick" data-abg="qwe"> |
| | | <image class="img" src="../../static/icon/test.png" mode="widthFix"></image> |
| | | <view class="title">åç¯å®ç¨ç¹è¾ | 䏿¥å¦ä¼çæ³å
å½±å¸å±</view> |
| | | <view class="df_sb static"> |
| | | <view>{{ '2021-08-21 12:00:00' }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | </view> |
| | | <!-- åç±» --> |
| | | <view> |
| | | <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> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-abg="qwe"> |
| | | <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image> |
| | | <view class="title">{{ item.title }}</view> |
| | | <view class="df_sb static"> |
| | | <view>{{ item.publishDate }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.readCount }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | // index.js |
| | | import { getDictData, getDailyUpdates, getZSZXCatalogs } from '../../api/index' |
| | | Page({ |
| | | data: { |
| | | searchValue: '', |
| | | clientHeight: 0, |
| | | clientTop: 0, |
| | | |
| | | DailyUpdates: {}, //æ¯æ¥ä¸æ° |
| | | everydayTop: ['../../static/ic_top1@2x.png', '../../static/ic_top2@2x.png', '../../static/ic_top3@2x.png'], |
| | | bannerList: [ |
| | | {imgurl: ''}, |
| | | {imgurl: 'adsa.png'}, |
| | |
| | | const res = wx.getMenuButtonBoundingClientRect() |
| | | this.setData({clientHeight: res.height}) |
| | | this.setData({clientTop: res.top}) |
| | | } |
| | | |
| | | this.initData() |
| | | }, |
| | | initData() { |
| | | // æ¯æ¥ä¸æ° |
| | | getDailyUpdates({ |
| | | fileType: '0' |
| | | }).then(res => { |
| | | this.setData({ DailyUpdates: res.data }) |
| | | }) |
| | | getZSZXCatalogs().then(res => { //å¿è¯´è£
ä¿® |
| | | this.setData({ |
| | | ZSZXCata: res.data || {} |
| | | }) |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'HOME_CLASS_A' |
| | | }).then(res => { |
| | | this.setData({ HOME_CLASS_A: res.data.code }) |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'HOME_CLASS_B' |
| | | }).then(res => { |
| | | this.setData({ HOME_CLASS_B: res.data.code }) |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'HOME_CLASS_B2' |
| | | }).then(res => { |
| | | this.setData({ HOME_CLASS_B2: res.data.code }) |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'HOME_CLASS_C' |
| | | }).then(res => { |
| | | this.setData({ HOME_CLASS_C: res.data.code }) |
| | | }) |
| | | }, |
| | | changeStrategy(e) { |
| | | let item = e.currentTarget.dataset.item |
| | | wx.navigateTo({ |
| | | url: `/pages/homeId/index?code=${item.code}&name=${item.name}` , |
| | | }) |
| | | }, |
| | | }) |
| | |
| | | width: 192rpx; |
| | | height: 280rpx; |
| | | border-radius: 8rpx; |
| | | border: 1px solid; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .img{ |
| | | width: 100%; |
| | |
| | | image{ |
| | | width: 88rpx; |
| | | height: 88rpx; |
| | | border: 1px solid; |
| | | } |
| | | .text{ |
| | | font-size: 26rpx; |
| | |
| | | .strategy { |
| | | padding: 80rpx 40rpx; |
| | | background: #F7F7F7; |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | .item{ |
| | | position: relative; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | } |
| | | text{ |
| | | color: #fff; |
| | | position: absolute; |
| | | bottom: 40rpx; |
| | | left: 40rpx; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | |
| | | .line { |
| | |
| | | <view class="desc"> |
| | | <view class="left"> |
| | | <text>仿¥ä¸æ°ï¼</text> |
| | | <text class="num">5</text> |
| | | <text class="num">{{ DailyUpdates.dailyUpdateNum }}</text> |
| | | <text>æ¡</text> |
| | | </view> |
| | | <view class="right">1wå 已转å</view> |
| | | <view class="right">{{ DailyUpdates.shareNum }}wå 已转å</view> |
| | | </view> |
| | | <view class="imgs"> |
| | | <view class="img_wrap"> |
| | | <image class="img" mode="widthFix" src=""></image> |
| | | <image class="icon" src="../../static/ic_top1@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="img_wrap"> |
| | | <image class="img" mode="widthFix" src=""></image> |
| | | <image class="icon" src="../../static/ic_top2@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="img_wrap"> |
| | | <image class="img" mode="widthFix" src=""></image> |
| | | <image class="icon" src="../../static/ic_top3@2x.png" mode="widthFix"></image> |
| | | <view wx:for="{{ DailyUpdates.newsList}}" class="img_wrap"> |
| | | <image class="img" src="{{ item.fileList[0].fileurlFull }}" mode="widthFix"></image> |
| | | <image class="icon" src="{{everydayTop[index]}}" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="func_lsit"> |
| | | <view class="item"> |
| | | <image></image> |
| | | <image src="../../static/icon/home_ic_chanpin@2x 2.png"></image> |
| | | <view class="text">产å</view> |
| | | </view> |
| | | <view class="item"> |
| | | <image></image> |
| | | <image src="../../static/icon/home_ic_anli@2x 2.png"></image> |
| | | <view class="text">æ¡ä¾</view> |
| | | </view> |
| | | <view class="item"> |
| | | <image></image> |
| | | <image src="../../static/icon/home_ic_shijing@2x 2.png"></image> |
| | | <view class="text">宿¯</view> |
| | | </view><view class="item"> |
| | | <image></image> |
| | | <image src="../../static/icon/home_ic_zixun.png"></image> |
| | | <view class="text">èµè®¯</view> |
| | | </view> |
| | | |
| | |
| | | <view class="com_header"> |
| | | <view class="left"> |
| | | <view class="name"> |
| | | <image class="icon" src="../../static/home_ic_zhuangxiu@2x.png"></image> |
| | | <image class="icon" src="../../static/icon/home_ic_zhuangxiu@2x.png"></image> |
| | | <view>å¿è¯´è£
ä¿®</view> |
| | | </view> |
| | | <view class="desc">æå
¨çè£
ä¿®æ»ç¥æ¥äºï¼å¿«æ¥getèµ·æ¥</view> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="line_left"> |
| | | <image src="../../static/images/home_class_a@2x.png"></image> |
| | | <view class="line_left item" data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy"> |
| | | <image src="{{HOME_CLASS_A}}"></image> |
| | | <text>{{ ZSZXCata.jdId.name }}</text> |
| | | </view> |
| | | <view class="line_right"> |
| | | <view class="item"><image src="../../static/images/home_class_b@2x.png"></image></view> |
| | | <view class="item"><image src="../../static/images/home_class_b2@2x.png"></image></view> |
| | | <view class="item" data-item="{{ ZSZXCata.cfsj }}" bindtap="changeStrategy"> |
| | | <image src="{{ HOME_CLASS_B }}"></image> |
| | | <text>{{ ZSZXCata.cfsj.name }}</text> |
| | | </view> |
| | | <view class="item" data-item="{{ ZSZXCata.snsj }}" bindtap="changeStrategy"> |
| | | <image src="{{ HOME_CLASS_B2 }}"></image> |
| | | <text>{{ ZSZXCata.snsj.name }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="home_id"> |
| | | <image src="../../static/images/home_class_c@2x.png"></image> |
| | | <view data-item="{{ ZSZXCata.qwsj.code }}" bindtap="changeStrategy" class="home_id item"> |
| | | <image src="{{HOME_CLASS_C}}"></image> |
| | | <text>{{ ZSZXCata.qwsj.name }}</text> |
| | | </view> |
| | | </view> |
| | | <!-- service --> |
| | |
| | | width: 192rpx; |
| | | height: 280rpx; |
| | | border-radius: 8rpx; |
| | | border: 1px solid; |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | .everyday .imgs .img_wrap .img { |
| | |
| | | .func_lsit .item image { |
| | | width: 88rpx; |
| | | height: 88rpx; |
| | | border: 1px solid; |
| | | } |
| | | .func_lsit .item .text { |
| | | font-size: 26rpx; |
| | |
| | | padding: 80rpx 40rpx; |
| | | background: #F7F7F7; |
| | | } |
| | | .strategy image { |
| | | .strategy .item { |
| | | position: relative; |
| | | } |
| | | .strategy .item image { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | } |
| | | .strategy .item text { |
| | | color: #fff; |
| | | position: absolute; |
| | | bottom: 40rpx; |
| | | left: 40rpx; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | } |
| | | .strategy .line { |
| | | display: flex; |
| | |
| | | // pages/auth/auth.js |
| | | import { sendSms,loginByPhone, getDictData } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | primary: '', |
| | | status: '0', // æ è¯ |
| | | countDown: 0, |
| | | phone: '', |
| | | password: '', |
| | | phone: '13663966099', |
| | | code: '', |
| | | |
| | | showModal: false, |
| | | activeHtml: '', |
| | | }, |
| | | getCode() { |
| | | let countDown = this.data.countDown |
| | | if(countDown > 0) return |
| | | this.setData({ countDown: 60 }) |
| | | let timer = setInterval(() => { |
| | | let countDown = this.data.countDown |
| | | if(countDown === 0){ |
| | | return clearInterval(timer) |
| | | } |
| | | countDown -- |
| | | this.setData({ countDown }) |
| | | }, 1000) |
| | | const { phone } = this.data |
| | | if(!phone || phone.length != 11){ |
| | | return wx.showToast({ |
| | | title: '请è¾å
¥æ£ç¡®çææºå·', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | sendSms({ |
| | | phone |
| | | }).then(res => { |
| | | wx.showToast({ |
| | | title: 'éªè¯ç åéæå', |
| | | icon: 'none' |
| | | }) |
| | | this.setData({ countDown: 60 }) |
| | | let timer = setInterval(() => { |
| | | let countDown = this.data.countDown |
| | | if(countDown === 0){ |
| | | return clearInterval(timer) |
| | | } |
| | | countDown -- |
| | | this.setData({ countDown }) |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | loginPhone() { |
| | | const { code, phone } = this.data |
| | | loginByPhone({code, phone}).then(res => { |
| | | wx.setStorageSync('member', res.data.users) |
| | | wx.setStorageSync('token', res.data.token) |
| | | wx.showToast({ |
| | | title: 'ç»å½æå', |
| | | }) |
| | | setTimeout(() => { |
| | | wx.switchTab({ |
| | | url: '/pages/index/index', |
| | | }) |
| | | }, 300) |
| | | }) |
| | | }, |
| | | changeStatus() { |
| | | if(!this.data.agreementFalg){ |
| | | return wx.showToast({ |
| | | title: '请å
é
读并åæç¸å
³åè®®', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | this.setData({ |
| | | status: '1' |
| | | }) |
| | | }, |
| | | agreementChange(e) { |
| | | this.setData({ |
| | |
| | | this.setData({ |
| | | primary: app.primary |
| | | }) |
| | | this.initData() |
| | | }, |
| | | onOpen(e){ |
| | | const { serviceHtml, privacyHtml } = this.data |
| | | const { index } = e.target.dataset |
| | | let activeHtml = index == '0' ? serviceHtml : privacyHtml |
| | | this.setData({ |
| | | activeHtml, |
| | | showModal: true |
| | | }) |
| | | }, |
| | | onClose() { |
| | | this.setData({showModal: false}) |
| | | }, |
| | | initData(){ |
| | | getDictData({ |
| | | code: 'ZBOM_CUSTOMIZED', |
| | | label: 'SERVER_AGREEMENT' |
| | | }).then(res => { |
| | | this.setData({ |
| | | serviceHtml: res.data.code |
| | | }) |
| | | }) |
| | | getDictData({ |
| | | code: 'ZBOM_CUSTOMIZED', |
| | | label: 'PRIVACY_AGREEMENT' |
| | | }).then(res => { |
| | | this.setData({ |
| | | privacyHtml: res.data.code |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | { |
| | | "usingComponents": { |
| | | "van-checkbox": "@vant/weapp/checkbox/index", |
| | | "van-field": "@vant/weapp/field/index" |
| | | "van-field": "@vant/weapp/field/index", |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | }, |
| | | "navigationStyle": "default", |
| | | "navigationBarTitleText": "ç»å½" |
| | |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | .modal{ |
| | | width: 600rpx; |
| | | min-height: 600rpx; |
| | | padding: 30rpx; |
| | | } |
| | |
| | | <view class="btns"> |
| | | <block wx:if="{{ status == '0' }}"> |
| | | <view class="btn speedy">ææºå·å¿«æ·ç»å½</view> |
| | | <view class="btn">ææºéªè¯ç ç»å½</view> |
| | | <view bindtap="changeStatus" class="btn">ææºéªè¯ç ç»å½</view> |
| | | </block> |
| | | <block wx:if="{{ status == '1' }}"> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/login_ic_phone@2x.png" mode="widthFix"></image> |
| | | <van-field class="input" border="{{false}}" model:value="{{ phone }}" placeholder="请è¾å
¥ææºå·" /> |
| | | <van-field class="input" maxlength="{{ 11 }}" border="{{false}}" model:value="{{ phone }}" placeholder="请è¾å
¥ææºå·" /> |
| | | <view bindtap="getCode" wx:if="{{ countDown === 0 }}" class="get_code primary">è·åéªè¯ç </view> |
| | | <view wx:else class="placeholder9">{{ countDown }}s</view> |
| | | </view> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/login_ic_password@2x.png" mode="widthFix"></image> |
| | | <van-field class="input" border="{{false}}" model:value="{{ password }}" placeholder="请è¾å
¥éªè¯ç " /> |
| | | <van-field class="input" maxlength="{{ 6 }}" border="{{false}}" model:value="{{ code }}" placeholder="请è¾å
¥éªè¯ç " /> |
| | | </view> |
| | | <view class="btn speedy sub_btn">ç«å³ç»å½</view> |
| | | <view bindtap="loginPhone" class="btn speedy sub_btn">ç«å³ç»å½</view> |
| | | </block> |
| | | <view class="protocol"> |
| | | <van-checkbox value="{{ agreementFalg }}" checked-color="{{primary}}" shape="round" bind:change="agreementChange"></van-checkbox> |
| | | <view class="content"> |
| | | <text>æå·²é
读并åæ</text> |
| | | <text class="primary">ãZBOMç¨æ·æå¡åè®®ã</text> |
| | | <text data-index="0" bindtap="onOpen" class="primary">ãZBOMç¨æ·æå¡åè®®ã</text> |
| | | <text>å</text> |
| | | <text class="primary">ãZBOMç¨æ·éç§æ¿çã</text> |
| | | <text data-index="1" bindtap="onOpen" class="primary">ãZBOMç¨æ·éç§æ¿çã</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- --> |
| | | <van-popup show="{{ showModal }}" round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <rich-text nodes="{{activeHtml}}"></rich-text> |
| | | </view> |
| | | </van-popup> |
| | | </view> |
| | |
| | | .btns .protocol .content { |
| | | flex: 1; |
| | | } |
| | | .modal { |
| | | width: 600rpx; |
| | | min-height: 600rpx; |
| | | padding: 30rpx; |
| | | } |
| | |
| | | // pages/promotion/index.js |
| | | import { newsPage } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | capacity: 10, |
| | | page: 0, |
| | | list: [], |
| | | total: 0, |
| | | }, |
| | | |
| | | /** |
| | |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | getList() { |
| | | newsPage() |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | // pages/mine/mine.js |
| | | import { getMemberInfo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | data: { |
| | | clientHeight: 0, |
| | | clientTop: 0, |
| | | |
| | | uesrInfo: {} |
| | | }, |
| | | |
| | | /** |
| | |
| | | const res = wx.getMenuButtonBoundingClientRect() |
| | | this.setData({clientHeight: res.height}) |
| | | this.setData({clientTop: res.top}) |
| | | |
| | | this.initData() |
| | | }, |
| | | changePath(e) { |
| | | // 页é¢è·³è½¬ |
| | |
| | | url: `${temp[index]}`, |
| | | }) |
| | | }, |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | initData() { |
| | | getMemberInfo().then(res => { |
| | | this.setData({ |
| | | uesrInfo: res.data |
| | | }) |
| | | }) |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "appid": "wx9c8b22ccc4642e07", |
| | | "appid": "wx208dd1edc0be24ee", |
| | | "compileType": "miniprogram", |
| | | "libVersion": "3.4.10", |
| | | "packOptions": { |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/kefu/select", |
| | | "pathName": "pages/login/index", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/promotion/index", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |