| | |
| | | } |
| | | // 授权登录 |
| | | const member = wx.getStorageSync('member') |
| | | if (member && member.token) { |
| | | |
| | | } else { |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success(res) { |
| | |
| | | console.log(err) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | image{ |
| | | display: flex; |
| | | border-radius: 8rpx; |
| | | } |
| | | .container { |
| | | min-height: 100vh; |
| | |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #111111; |
| | | margin-bottom: 2rpx; |
| | | margin-bottom: 6rpx; |
| | | } |
| | | .desc{ |
| | | font-weight: 300; |
| | |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #111111; |
| | | margin-bottom: 2rpx; |
| | | margin-bottom: 6rpx; |
| | | } |
| | | .wrap1 .content .desc { |
| | | font-weight: 300; |
| | |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | .item { |
| | | width: 202rpx; |
| | |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="搜索案例名称" /> |
| | | <input bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="搜索案例名称" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | } |
| | | .main_content .query_param .list .item { |
| | |
| | | }).then(res => { |
| | | this.setData({ |
| | | secondCateList: res.data || [], |
| | | activeParam: [] |
| | | }) |
| | | }) |
| | | }, |
| | | bindblur() { |
| | | console.log('失去焦点'); |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | getList() { |
| | |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 }) |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | |
| | | height: 100%; |
| | | .query_wrap { |
| | | display: flex; |
| | | width: 100%; |
| | | .item { |
| | | width: 50%; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | |
| | | .name { |
| | | margin-right: 12rpx; |
| | | } |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 154rpx; |
| | | height: 72rpx; |
| | |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="搜索产品名称" /> |
| | | <input bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="搜索产品名称" /> |
| | | </view> |
| | | </view> |
| | | <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;"> |
| | |
| | | } |
| | | .main_content .main_right .query_wrap { |
| | | display: flex; |
| | | width: 100%; |
| | | } |
| | | .main_content .main_right .query_wrap .item { |
| | | width: 50%; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | } |
| | | .main_content .main_right .query_wrap .item .name { |
| | | margin-right: 12rpx; |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .main_right .query_form .list .item { |
| | | width: 154rpx; |
| | |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 202rpx; |
| | | height: 72rpx; |
| | |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="搜索实景名称" /> |
| | | <input bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="搜索实景名称" /> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .query_param .list .item { |
| | | width: 202rpx; |
| | |
| | | "usingComponents": { |
| | | "van-nav-bar": "@vant/weapp/nav-bar/index", |
| | | "van-checkbox": "@vant/weapp/checkbox/index", |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "mp-html": "mp-html" |
| | | }, |
| | | "navigationBarTitleText": "授权登录" |
| | | } |
| | |
| | | } |
| | | } |
| | | .modal{ |
| | | width: 600rpx; |
| | | width: 100%; |
| | | max-height: 1120rpx; |
| | | min-height: 600rpx; |
| | | padding: 30rpx; |
| | | padding: 40rpx; |
| | | } |
| | | .title{ |
| | | font-weight: 600; |
| | |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <van-popup show="{{ showModal }}" round bind:close="onClose"> |
| | | <van-popup position="bottom" show="{{ showModal }}" round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <rich-text nodes="{{activeHtml}}"></rich-text> |
| | | <mp-html content="{{activeHtml}}"></mp-html> |
| | | </view> |
| | | </van-popup> |
| | | </view> |
| | |
| | | font-size: 30rpx; |
| | | } |
| | | .modal { |
| | | width: 600rpx; |
| | | width: 100%; |
| | | max-height: 1120rpx; |
| | | min-height: 600rpx; |
| | | padding: 30rpx; |
| | | padding: 40rpx; |
| | | } |
| | | .title { |
| | | font-weight: 600; |
| | |
| | | getArea, |
| | | saveFreeCustomizationApply |
| | | } from '../../api/index' |
| | | var QQMapWX = require('../../utils/qqmap-wx-jssdk.min'); |
| | | var qqmapsdk; |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | }, |
| | | onLoad(options) { |
| | | this.initData() |
| | | qqmapsdk = new QQMapWX({ |
| | | key: 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ' |
| | | }); |
| | | qqmapsdk.reverseGeocoder({ |
| | | success: (res) => { |
| | | console.log('res', res); |
| | | let addr = { |
| | | // provinceCode: codes[0] + '00', |
| | | provinceName: res.result.ad_info.province, |
| | | // cityCode: codes[1] + '00', |
| | | cityName: res.result.ad_info.city, |
| | | // areaCode: codes[2] + '00', |
| | | areaName: res.result.ad_info.district, |
| | | } |
| | | this.setData({ addr }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | onSubmit() { |
| | |
| | | .banner { |
| | | width: 100%; |
| | | padding-bottom: 100rpx; |
| | | position: relative; |
| | | top: -100rpx; |
| | | } |
| | | |
| | | .main_content { |
| | | width: 670rpx; |
| | | position: relative; |
| | | top: -100rpx; |
| | | top: -120rpx; |
| | | margin: 0 auto; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.14); |
| | |
| | | </view> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/icon/design_ic_phone.png" mode="widthFix"></image> |
| | | <van-field type="number" class="input" custom-style="background-color: #F6F6F6;" model:value="{{ phone }}" placeholder="请输入联系电话" clearable maxlength="{{ 11 }}" /> |
| | | <van-field type="number" class="input" custom-style="background-color: #F6F6F6;" model:value="{{ phone }}" placeholder="请输入联系电话,领免费效果图" clearable maxlength="{{ 11 }}" /> |
| | | </view> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/icon/design_ic_city.png" mode="widthFix"></image> |
| | |
| | | .banner { |
| | | width: 100%; |
| | | padding-bottom: 100rpx; |
| | | position: relative; |
| | | top: -100rpx; |
| | | } |
| | | .main_content { |
| | | width: 670rpx; |
| | | position: relative; |
| | | top: -100rpx; |
| | | top: -120rpx; |
| | | margin: 0 auto; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.14); |
| | |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button class="item btn"> |
| | | <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.collection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">收藏</view> |
| | | </button> |
| | |
| | | color: #222222; |
| | | margin: 32rpx 0; |
| | | } |
| | | |
| | | .desc{ |
| | | margin-top: 24rpx; |
| | | line-height: 42rpx; |
| | | } |
| | | .time { |
| | | font-size: 26rpx; |
| | | color: #999999; |
| | |
| | | <view class="main_title">{{ info.title }}</view> |
| | | <view class="time">发布时间:{{ info.publishDt }}</view> |
| | | <image class="info_item" wx:for="{{ info.contentImgList }}" src="{{ item }}" mode="widthFix"></image> |
| | | <view>{{ info.contentText || '' }}</view> |
| | | <view class="desc">{{ info.contentText || '' }}</view> |
| | | <!-- <view class="list"> |
| | | <view class="item"> |
| | | <image src="" mode="widthFix" /> |
| | |
| | | color: #222222; |
| | | margin: 32rpx 0; |
| | | } |
| | | .container .desc { |
| | | margin-top: 24rpx; |
| | | line-height: 42rpx; |
| | | } |
| | | .container .time { |
| | | font-size: 26rpx; |
| | | color: #999999; |
| | |
| | | const member = wx.getStorageSync('member') |
| | | if(member && (member.authStatus == '1' || member.authStatus == '2')){ |
| | | getMemberInfo().then(res => { |
| | | this.setData({member: res.data}) |
| | | this.setData({ |
| | | member: res.data |
| | | }) |
| | | }) |
| | | }else{ |
| | | this.setData({member}) |
| | | this.setData({ |
| | | member |
| | | }) |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | const member = wx.getStorageSync('member') |
| | | this.initDictData() |
| | | if (member && member.token) { |
| | | this.initData() |
| | | } else { |
| | | setTimeout(() => { |
| | | this.initData() |
| | | }, 1200) |
| | | } |
| | | }, |
| | | changePath(e) { |
| | | let index = e.currentTarget.dataset.type |
| | |
| | | url: '/pages/webView/index', |
| | | success: function (res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: that.data.testUrl }) |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | link: that.data.testUrl |
| | | }) |
| | | } |
| | | }) |
| | | break; |
| | |
| | | initData() { |
| | | // 轮播 |
| | | getHomeBanner().then(res => { |
| | | this.setData({ bannerList: res.data }) |
| | | this.setData({ |
| | | bannerList: res.data |
| | | }) |
| | | }) |
| | | // 产品视频 |
| | | getZhongTaiVideoPage({ pageSize: 1, pageNum: 1 }).then(res => { |
| | | getZhongTaiVideoPage({ |
| | | pageSize: 1, |
| | | pageNum: 1 |
| | | }).then(res => { |
| | | if(res.data.records && res.data.records.length > 0){ |
| | | this.setData({ productVideo: res.data.records }) |
| | | this.setData({ |
| | | productVideo: res.data.records |
| | | }) |
| | | } |
| | | }) |
| | | getZSZXCatalogs().then(res => { //志说装修 |
| | |
| | | // 资讯 |
| | | getZhongTaiProductNewsPage({ |
| | | catalogCode: 'product_info', |
| | | pageSize: 6, pageNum: 1 |
| | | pageSize: 6, |
| | | pageNum: 1 |
| | | }).then(res => { |
| | | if(res.data){ |
| | | this.setData({ consultList: res.data.records }) |
| | | this.setData({ |
| | | consultList: res.data.records |
| | | }) |
| | | } |
| | | }) |
| | | getCustomizedNewsList().then(res => { // 定制服务 |
| | | this.setData({serviceList: res.data || []}) |
| | | this.setData({ |
| | | serviceList: res.data || [] |
| | | }) |
| | | }) |
| | | }, |
| | | initDictData() { |
| | | // 风格测试 |
| | | getDictData({ |
| | | code: 'WX_MINI_CONFIG', |
| | | label: 'ZBOM_STYLE_TEST_URL' |
| | | }).then(res => { |
| | | this.setData({ testUrl: res.data.code }) |
| | | this.setData({ |
| | | testUrl: res.data.code |
| | | }) |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'HOME_CLASS_A' |
| | | }).then(res => { |
| | | this.setData({ HOME_CLASS_A: res.data.code }) |
| | | 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 }) |
| | | 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 }) |
| | | 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 }) |
| | | this.setData({ |
| | | HOME_CLASS_C: res.data.code |
| | | }) |
| | | }) |
| | | }, |
| | | jumpProVideo() { |
| | |
| | | }) |
| | | }, |
| | | videoClick(e) { |
| | | const { videourl } = e.currentTarget.dataset |
| | | const { |
| | | videourl |
| | | } = e.currentTarget.dataset |
| | | wx.previewMedia({ |
| | | sources: [{ url: videourl, type: 'video' }] |
| | | sources: [{ |
| | | url: videourl, |
| | | type: 'video' |
| | | }] |
| | | }) |
| | | }, |
| | | goserHeight:function (e) { |
| | |
| | | }) |
| | | }, |
| | | consultbindload(e) { |
| | | const { height, width } = e.detail |
| | | const { |
| | | height, |
| | | width |
| | | } = e.detail |
| | | let activeHeight = height * 670 / width |
| | | this.setData({ |
| | | consultImgHeight: activeHeight |
| | | }) |
| | | }, |
| | | consultClick(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: id |
| | | }) |
| | | wx.navigateTo({ |
| | | url: '/pages/consult/detail?id=' + id |
| | | }) |
| | | }, |
| | | bannerClick(e) { |
| | | const { id } = e.currentTarget.dataset |
| | | const { |
| | | id |
| | | } = e.currentTarget.dataset |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | actionDo({actionType: 'view',id: item.id}) |
| | | if(item.openType){ |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: item.id |
| | | }) |
| | | } |
| | | if(item.openType == 'video'){ |
| | | wx.previewMedia({ |
| | | sources: [{ url: item.openContent, type: 'video' }] |
| | | sources: [{ |
| | | url: item.openContent, |
| | | type: 'video' |
| | | }] |
| | | }) |
| | | } |
| | | if(item.openType == 'link'){ |
| | |
| | | // getHomeBannerDetail({id}) |
| | | }, |
| | | seriveClick(e) { |
| | | const { id, title } = e.currentTarget.dataset |
| | | const { |
| | | id, |
| | | title |
| | | } = e.currentTarget.dataset |
| | | if(title === '专属客服'){ |
| | | wx.navigateTo({ |
| | | url: `/pages/kefu/index?title=${title}&id=${id}`, |
| | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | onPageScroll(e) { |
| | | let scrollTop = e.scrollTop / 100 |
| | | if (scrollTop <= 0.1) { |
| | | this.setData({ font_color: '#ffffff' }) |
| | | this.setData({ |
| | | font_color: '#ffffff' |
| | | }) |
| | | } else if (scrollTop >= 0.1 && scrollTop < 0.2) { |
| | | this.setData({ font_color: '#d0d0d0' }) |
| | | this.setData({ |
| | | font_color: '#d0d0d0' |
| | | }) |
| | | } else if (scrollTop >= 0.2 && scrollTop < 0.3) { |
| | | this.setData({ font_color: '#bdbdbd' }) |
| | | this.setData({ |
| | | font_color: '#bdbdbd' |
| | | }) |
| | | } else if (scrollTop >= 0.3 && scrollTop < 0.4) { |
| | | this.setData({ font_color: '#a1a1a1' }) |
| | | this.setData({ |
| | | font_color: '#a1a1a1' |
| | | }) |
| | | } else if (scrollTop >= 0.4 && scrollTop < 0.5) { |
| | | this.setData({ font_color: '#878787' }) |
| | | this.setData({ |
| | | font_color: '#878787' |
| | | }) |
| | | } else if (scrollTop >= 0.5 && scrollTop < 0.6) { |
| | | this.setData({ font_color: '#6d6d6d' }) |
| | | this.setData({ |
| | | font_color: '#6d6d6d' |
| | | }) |
| | | } else if (scrollTop >= 0.6 && scrollTop < 0.7) { |
| | | this.setData({ font_color: '#535353' }) |
| | | this.setData({ |
| | | font_color: '#535353' |
| | | }) |
| | | } else if (scrollTop >= 0.7 && scrollTop < 0.8) { |
| | | this.setData({ font_color: '#3b3b3b' }) |
| | | this.setData({ |
| | | font_color: '#3b3b3b' |
| | | }) |
| | | } else if (scrollTop >= 0.8 && scrollTop < 0.9) { |
| | | this.setData({ font_color: '#282828' }) |
| | | this.setData({ |
| | | font_color: '#282828' |
| | | }) |
| | | } else if (scrollTop >= 0.9) { |
| | | this.setData({ font_color: '#000000' }) |
| | | this.setData({ |
| | | font_color: '#000000' |
| | | }) |
| | | } |
| | | if (scrollTop > 0) { |
| | | this.setData({ showWhiteHead: true }) |
| | | this.setData({ |
| | | showWhiteHead: true |
| | | }) |
| | | } else{ |
| | | this.setData({ showWhiteHead: false }) |
| | | this.setData({ |
| | | showWhiteHead: false |
| | | }) |
| | | } |
| | | this.setData({ topHeadStyle: scrollTop, top: scrollTop }) |
| | | this.setData({ |
| | | topHeadStyle: scrollTop, |
| | | top: scrollTop |
| | | }) |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | |
| | | image { |
| | | width: 100%; |
| | | } |
| | | .scroll_text{ |
| | | height: 100rpx; |
| | | width: 670rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden;//文本超出隐藏 |
| | | text-overflow: ellipsis; |
| | | padding-top: 20rpx; |
| | | font-size: 32rpx; |
| | | } |
| | | } |
| | | |
| | | .logo_wrap { |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | padding: 60rpx 0; |
| | | padding: 0 0 60rpx; |
| | | background-color: #fff; |
| | | |
| | | .logo { |
| | | width: 246rpx; |
| | | } |
| | |
| | | <view class="line"> |
| | | <view class="line_left item" data-item="{{ ZSZXCata.qwsj }}" bindtap="changeStrategy"> |
| | | <image src="{{HOME_CLASS_A}}"></image> |
| | | <text>{{ ZSZXCata.qwsj.name }}</text> |
| | | <!-- <text>{{ ZSZXCata.qwsj.name }}</text> --> |
| | | </view> |
| | | <view class="line_right"> |
| | | <view class="item" data-item="{{ ZSZXCata.cfsj }}" bindtap="changeStrategy"> |
| | | <image src="{{ HOME_CLASS_B }}"></image> |
| | | <text>{{ ZSZXCata.cfsj.name }}</text> |
| | | <!-- <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> |
| | | <!-- <text>{{ ZSZXCata.snsj.name }}</text> --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy" class="home_id item"> |
| | | <image src="{{HOME_CLASS_C}}"></image> |
| | | <text>{{ ZSZXCata.jdId.name }}</text> |
| | | <!-- <text>{{ ZSZXCata.jdId.name }}</text> --> |
| | | </view> |
| | | </view> |
| | | <!-- 咨询 --> |
| | | <view class="consult" bindtap="jumpProConsult"> |
| | | <view class="com_header"> |
| | | <view class="consult"> |
| | | <view class="com_header" bindtap="jumpProConsult"> |
| | | <view class="left"> |
| | | <view class="name"> |
| | | <image class="icon" src="../../static/icon/home_ic_zixun@2x.png"></image> |
| | |
| | | </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 }}" style="height:{{consultImgHeight}}rpx" duration="{{ bannerSwiperOption.duration }}"> |
| | | <swiper class="consult_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" style="height:{{consultImgHeight + 100}}rpx" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ consultList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <swiper-item data-id="{{ item.id }}" bindtap="consultClick"> |
| | | <image bindload="consultbindload" mode="widthFix" src="{{ item.coverImage }}"></image> |
| | | |
| | | <view class="scroll_text">{{ item.title }}</view> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | |
| | | .container .consult_swiper image { |
| | | width: 100%; |
| | | } |
| | | .container .consult_swiper .scroll_text { |
| | | height: 100rpx; |
| | | width: 670rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | padding-top: 20rpx; |
| | | font-size: 32rpx; |
| | | } |
| | | .container .logo_wrap { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | padding: 60rpx 0; |
| | | padding: 0 0 60rpx; |
| | | background-color: #fff; |
| | | } |
| | | .container .logo_wrap .logo { |
| | |
| | | wx.removeStorageSync('token') |
| | | wx.removeStorageSync('member') |
| | | wx.removeStorageSync('code') |
| | | wx.redirectTo({ |
| | | wx.showToast({ |
| | | title: '注销成功', |
| | | }) |
| | | wx.switchTab({ |
| | | url: '/pages/index/index', |
| | | }) |
| | | }) |
| | |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <van-popup show="{{ show }}" bind:close="onClose"> |
| | | <van-popup show="{{ show }}" round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <view class="title">注销提醒</view> |
| | | <view class="text">如您不再使用此账号,可以将其注销。账号成功注销后,其下所有数据将会被删除并将无法恢复,请谨慎操作</view> |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/store/staffList", |
| | | "pathName": "pages/auth/auth", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | if (res.data.code === 200) { |
| | | resolve(res.data || true) |
| | | } else { |
| | | // if(res.data.code == 5112){ |
| | | // wx.navigateTo({ |
| | | // url: '/pages/auth/auth ', |
| | | // }) |
| | | // } |
| | | if(res.data.code == 5111 || res.data.code == 5112){ |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success(res) { |
| | | if (res.code) { |
| | | //发起网络请求 |
| | | wxLoginCustomer({ |
| | | code: res.code |
| | | }).then(res => { |
| | | console.log(res) |
| | | if (res && res.data.member) { |
| | | wx.switchTab({ |
| | | url: '/pages/index/index', |
| | | }) |
| | | wx.setStorageSync('member', res.data.member) |
| | | wx.setStorageSync('openid', res.data.member.openid) |
| | | wx.setStorageSync('sessionKey', res.data.sessionKey) |
| | | wx.setStorageSync('token', res.data.token) |
| | | } else { |
| | | console.log('登录失败!') |
| | | } |
| | | }) |
| | | } else { |
| | | console.log('登录失败!' + res) |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }) |
| | | } |
| | | res.data.message && wx.showToast({ |
| | |
| | | // 获取手机号 |
| | | export const getWxMiniPhone = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getWxMiniPhone', |
| | | url: '/web/personnel/getWxMiniPhoneLogin', |
| | | method: "POST", |
| | | data |
| | | }) |
| | | } |
| | | // 绑定手机号 |
| | | export const binDingPhone = (data) => { |
| | | // 绑定Openid |
| | | export const bindingOpenid = (data) => { |
| | | return request({ |
| | | url: '/web/customer/binDingPhone', |
| | | method: "POST", |
| | | url: '/web/personnel/bindingOpenid', |
| | | data |
| | | }) |
| | | } |
| | |
| | | import { wxLoginCustomer } from './api/index' |
| | | import { |
| | | wxLoginCustomer |
| | | } from './api/index' |
| | | App({ |
| | | globalData: { |
| | | primary: '#B08771', |
| | |
| | | if (WindowInfo.safeArea.top > 20) { |
| | | this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom; |
| | | } |
| | | const res = wx.getStorageSync('member') |
| | | if (res) { |
| | | this.globalData.userInfo = res |
| | | console.error("res",res) |
| | | } else { |
| | | // 登录 |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success(res) { |
| | |
| | | wxLoginCustomer({ |
| | | code: res.code |
| | | }).then(res => { |
| | | console.log(res) |
| | | if (res && res.data.users) { |
| | | wx.setStorageSync('member', res.data.users) |
| | | wx.setStorageSync('openid', res.data.users.openid) |
| | | if (res && res.data) { |
| | | wx.setStorageSync('member', res.data.users || '') |
| | | wx.setStorageSync('sessionKey', res.data.sessionKey) |
| | | wx.setStorageSync('token', res.data.token) |
| | | wx.setStorageSync('token', res.data.token || '') |
| | | } else { |
| | | wx.navigateTo({ |
| | | url: '/pages/login/index', |
| | |
| | | console.log(err) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | import { sendSms,loginByPhone, getDictData } from '../../api/index' |
| | | import { |
| | | sendSms, |
| | | getDictData, |
| | | getWxMiniPhone, |
| | | loginByPhone, |
| | | bindingOpenid |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | getCode() { |
| | | let countDown = this.data.countDown |
| | | if(countDown > 0) return |
| | | const { phone } = this.data |
| | | const { |
| | | phone |
| | | } = this.data |
| | | if(!phone || phone.length != 11){ |
| | | return wx.showToast({ |
| | | title: '请输入正确的手机号', |
| | |
| | | title: '验证码发送成功', |
| | | icon: 'none' |
| | | }) |
| | | this.setData({ countDown: 60 }) |
| | | this.setData({ |
| | | countDown: 60 |
| | | }) |
| | | let timer = setInterval(() => { |
| | | let countDown = this.data.countDown |
| | | if(countDown === 0){ |
| | | return clearInterval(timer) |
| | | } |
| | | countDown -- |
| | | this.setData({ countDown }) |
| | | this.setData({ |
| | | countDown |
| | | }) |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | loginPhone() { |
| | | const { code, phone } = this.data |
| | | loginByPhone({code, phone}).then(res => { |
| | | const { |
| | | code, |
| | | phone |
| | | } = this.data |
| | | loginByPhone({ |
| | | code, |
| | | phone |
| | | }).then(res => { |
| | | if (res.data && res.data.token) { |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success: (loginRes) => { |
| | | if (loginRes.code) { |
| | | this.bindingOpenid(loginRes.code, res.data.token) |
| | | } |
| | | } |
| | | }) |
| | | if(res.data.phone){ |
| | | res.data.users.phone = res.data.phone || res.data.users.phone |
| | | } |
| | | wx.setStorageSync('member', res.data.users) |
| | | wx.setStorageSync('token', res.data.token) |
| | | wx.showToast({ |
| | |
| | | url: '/pages/index/index', |
| | | }) |
| | | }, 300) |
| | | }else{ |
| | | wx.showToast({ |
| | | title: '你还不是该系统用户,请联系相关管理员注册', |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | changeStatus() { |
| | |
| | | }) |
| | | this.initData() |
| | | }, |
| | | getPhoneNumber(e) { |
| | | const data = { |
| | | ...e.detail |
| | | } |
| | | getWxMiniPhone({ |
| | | encryptedData: data.encryptedData, |
| | | iv: data.iv, |
| | | sessionKey: wx.getStorageSync('sessionKey') || data.iv, |
| | | }).then(res => { |
| | | if (res.data && res.data.token) { |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success: (loginRes) => { |
| | | if (loginRes.code) { |
| | | this.bindingOpenid(loginRes.code, res.data.token) |
| | | } |
| | | } |
| | | }) |
| | | if(res.data.phone){ |
| | | res.data.users.phone = res.data.phone || res.data.users.phone |
| | | } |
| | | wx.setStorageSync('member', res.data.users) |
| | | wx.setStorageSync('token', res.data.token) |
| | | wx.switchTab({ |
| | | url: '/pages/index/index', |
| | | }) |
| | | }else{ |
| | | wx.showToast({ |
| | | title: '你还不是该系统用户,请联系相关管理员注册', |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | bindingOpenid(code, token) { |
| | | bindingOpenid({code, token}) |
| | | }, |
| | | loginIn() { |
| | | const { |
| | | agreementFalg |
| | | } = this.data |
| | | if (!agreementFalg) return wx.showToast({ |
| | | title: '请先阅读并同意相关协议', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | }, |
| | | onOpen(e){ |
| | | const { serviceHtml, privacyHtml } = this.data |
| | | const { index } = e.target.dataset |
| | | const { |
| | | serviceHtml, |
| | | privacyHtml |
| | | } = this.data |
| | | const { |
| | | index |
| | | } = e.target.dataset |
| | | let activeHtml = index == '0' ? serviceHtml : privacyHtml |
| | | this.setData({ |
| | | activeHtml, |
| | |
| | | }) |
| | | }, |
| | | onClose() { |
| | | this.setData({showModal: false}) |
| | | this.setData({ |
| | | showModal: false |
| | | }) |
| | | }, |
| | | initData(){ |
| | | getDictData({ |
| | |
| | | "usingComponents": { |
| | | "van-checkbox": "@vant/weapp/checkbox/index", |
| | | "van-field": "@vant/weapp/field/index", |
| | | "van-popup": "@vant/weapp/popup/index" |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "mp-html": "mp-html" |
| | | }, |
| | | "navigationStyle": "default", |
| | | "navigationBarTitleText": "登录" |
| | |
| | | } |
| | | } |
| | | .modal{ |
| | | width: 600rpx; |
| | | width: 100%; |
| | | max-height: 1120rpx; |
| | | min-height: 600rpx; |
| | | padding: 30rpx; |
| | | padding: 40rpx; |
| | | } |
| | |
| | | <!-- --> |
| | | <view class="btns"> |
| | | <block wx:if="{{ status == '0' }}"> |
| | | <view class="btn speedy">手机号快捷登录</view> |
| | | <button class="btn speedy" wx:if="{{ !agreementFalg }}" bindtap="loginIn">手机号快捷登录</button> |
| | | <button wx:else class="btn speedy" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快捷登录</button> |
| | | <view bindtap="changeStatus" class="btn">手机验证码登录</view> |
| | | </block> |
| | | <block wx:if="{{ status == '1' }}"> |
| | |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <van-popup show="{{ showModal }}" round bind:close="onClose"> |
| | | <van-popup position="bottom" show="{{ showModal }}" round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <rich-text nodes="{{activeHtml}}"></rich-text> |
| | | <mp-html content="{{activeHtml}}"></mp-html> |
| | | </view> |
| | | </van-popup> |
| | | </view> |
| | |
| | | |
| | | |
| | | // export const baseUrl = 'https://jiaxuan.zbom.com/jx/wechat/' //正式服务器 |
| | | export const baseUrl = 'https://dmtest.ahapp.net/web_interface/' // 本地 |
| | | export const baseUrl = 'http://192.168.0.135:10027' |
| | | // export const baseUrl = 'https://dmtest.ahapp.net/web_interface/' // 本地 |
| | | // export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //测试服务器 |
| | | |
| | | // export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/' |