作者 乔蒙蒙

更改客户提出的问题

... ... @@ -15,7 +15,12 @@ Page({
phone: "",
company:'',
content_img: "",
hiddenStatus: false,
contactStatus: false,
contactContent: "",
nameStatus: false,
nameContent: "",
companyStatus: false,
companyContent: "",
},
onPageScroll: function (e) { // 获取滚动条当前位置
// console.log(e)
... ... @@ -55,7 +60,7 @@ Page({
let that = this;
// console.log(e.detail.value)
that.setData({
name: e.detail.value,
name: e.detail.value.replace(/\s+/g, ''),
})
},
// 手机号
... ... @@ -63,7 +68,7 @@ Page({
let that = this;
// console.log(e.detail.value)
that.setData({
phone: e.detail.value,
phone: e.detail.value.replace(/\s+/g, ''),
})
},
// 行业
... ... @@ -71,7 +76,7 @@ Page({
let that = this;
// console.log(e.detail.value)
that.setData({
company: e.detail.value,
company: e.detail.value.replace(/\s+/g, ''),
})
},
... ... @@ -79,38 +84,72 @@ Page({
subFun: function() {
let url = '/portal/Api/form';
var that = this;
if(that.data.phone == "") {
wx.showToast({
title: '请输入手机号!',
icon: "none",
});
if(that.data.name == "") {
that.setData({
nameStatus: true,
nameContent: "请输入姓名",
})
return false;
}else{
that.setData({
nameStatus: false,
})
}
if(that.data.name == "") {
wx.showToast({
title: '请输入姓名!',
icon: "none",
if (that.data.phone == "") {
that.setData({
contactStatus: true,
contactContent: "请输入联系方式",
})
return false;
} else {
that.setData({
contactStatus: false,
})
}
// console.log(that.data.name.length);
if (that.data.name.length > 10) {
wx.setData({
hiddenStatus: true,
that.setData({
nameStatus: true,
nameContent: "姓名请输入不超过10个字",
})
return false;
} else {
that.setData({
nameStatus: false,
})
}
if (that.data.phone.length > 11) {
that.setData({
contactStatus: true,
contactContent: "联系方式请输入不超过11位数字",
})
return false;
} else {
that.setData({
contactStatus: false,
})
}
if (that.data.company.length > 10) {
that.setData({
companyStatus: true,
companyContent: "所在行业请输入不超过10个字",
})
return false;
} else {
that.setData({
companyStatus: false,
})
}
let AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/;
if(!AuglyTest_phone.test(that.data.phone)) {
that.setData({
contactStatus: true,
contactContent: "手机号格式不正确",
})
// wx.showToast({
// title: '手机号有误!',
// icon: "none",
// duration: 1500
// title: '手机号格式不正确',
// icon: 'none'
// })
wx.showToast({
title: '手机号有误!',
icon: 'none'
})
return false;
}
let data = {
... ... @@ -144,7 +183,9 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
wx.setNavigationBarTitle({
title: '关于我们',
})
},
/**
... ...
{
"navigationBarTitleText": "关于我们"
"navigationBarTitleText": ""
}
\ No newline at end of file
... ...
... ... @@ -45,8 +45,8 @@
<view class='sub_input_left'>
<image src='http://pjq0ww1cj.bkt.clouddn.com/user.png' mode="widthFix"></image>
</view>
<input type='text' maxlength='10' bindchange="nameFun" placeholder="请输入您的姓名" />
<text wx:if="{{hiddenStatus == true}}">姓名请输入不超过10个字</text>
<input type='text' bindchange="nameFun" placeholder="请输入您的姓名" />
<text wx:if="{{nameStatus == true}}">{{nameContent}}</text>
</view>
</view>
<view class='sub_apply_list'>
... ... @@ -56,6 +56,7 @@
<image src='http://pjq0ww1cj.bkt.clouddn.com/input_phone.png' mode="widthFix"></image>
</view>
<input type='number' maxlength='11' bindchange="phoneFun" placeholder="请输入您的联系方式" />
<text wx:if="{{contactStatus == true}}">{{contactContent}}</text>
</view>
</view>
<view class='sub_apply_list'>
... ... @@ -65,6 +66,7 @@
<image src='http://pjq0ww1cj.bkt.clouddn.com/company.png' mode="widthFix"></image>
</view>
<input type='text' bindchange="companyFun" placeholder="请输入您的所在行业" />
<text wx:if="{{companyStatus == true}}">{{companyContent}}</text>
</view>
</view>
<view class='sub_btn' bindtap='subFun'>
... ...
... ... @@ -13,8 +13,7 @@ Page({
connectButton: [
{ className: "", text: "在线客服", bindtap: "" }
],
autoplay: true,
interval: 2000,
autoplay: false,
duration: 1000,
circular: true,
currentSwiper: 0,
... ... @@ -120,7 +119,9 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
wx.setNavigationBarTitle({
title: '应用场景',
})
},
/**
... ...
{
"navigationBarTitleText": "应用场景"
"navigationBarTitleText": ""
}
\ No newline at end of file
... ...
<!--pages/application/application.wxml-->
<view class='app_lication_banner'>
<swiper bindchange='swiperChange' autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}">
<swiper bindchange='swiperChange' autoplay="{{autoplay}}" duration="{{duration}}" circular="{{circular}}">
<block wx:for="{{imgUrls}}" wx:key="index">
<swiper-item>
<!-- catchtouchmove="stopTouchMove" -->
... ...
... ... @@ -19,6 +19,7 @@ Page({
isPlay: false,
content_1: "",
content_2: "",
srcList: [],
},
changeIndicatorDots(e) {
this.setData({
... ... @@ -65,29 +66,45 @@ Page({
this.setData({ isPlay: !this.data.isPlay });
},
//视频暂停
clickStop() {
this.setData({ isPlay: false });
},
// clickStop() {
// this.setData({ isPlay: false });
// },
swiperChange: function (e) { //切换轮播图
this.setData({
currentSwiper: e.detail.current
})
},
/**
* 预览图片
*/
previewImage: function (e) {
console.log(111);
// var current = e.target.dataset.src;
wx.previewImage({
//current: current, // 当前显示图片的http链接
urls: this.data.srcList // 需要预览的图片http链接列表
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options);
let url = '/portal/Api/category';
let data = {
categoryId: options.id,
};
let srcListArr = [];
app.post(url, data).then((res) => {
// console.log('res', res);
for (var index in res.image) {
res.image[index].type = "image";
}
for (var x = 0; x < res.image.length; x++) {
srcListArr.push(res.image[x].url);
}
if (res.video_type == true) {
res.image.splice(0, 0, {
url: res.video,
... ... @@ -95,12 +112,16 @@ Page({
video_img: res.video_img,
});
}
this.setData({
imgUrls: res.image,
data: res,
srcList: srcListArr,
content_1: res.content_1,
content_2: res.content_2,
});
// console.log(srcListArr);
WxParse.wxParse('content_1', 'html', this.data.content_1, this, 5);
WxParse.wxParse('content_2', 'html', this.data.content_2, this, 5);
}).catch((err) => {
... ... @@ -120,7 +141,9 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
wx.setNavigationBarTitle({
title: '案例详情',
})
},
/**
... ...
{
"navigationBarTitleText": "案例详情"
"navigationBarTitleText": ""
}
\ No newline at end of file
... ...
... ... @@ -5,28 +5,28 @@
<swiper autoplay="{{false}}" interval="2000" duration="500" circular="{{true}}" bindchange="swiperChange">
<block wx:for="{{imgUrls}}" wx:key="index">
<swiper-item>
<!-- <navigator url="{{item.url}}" hover-class="navigator-hover"> -->
<!-- <navigator url="{{item.url}}" hover-class="navigator-hover"> bindpause="clickStop"-->
<view class="index_top">
<block wx:if="{{item.type == 'video'}}" >
<view wx:if="{{isPlay}}" class="video-box" catchtap="play">
<video src="{{item.url}}" wx:if="{{item.type == 'video'}}" class="slide-image" autoplay="{{true}}"
controls="{{true}}" bindpause="clickStop"></video>
</view>
<view wx:else class="video-box {{item.video_img!==''?'position-re':''}}" catchtap="play">
<block wx:if="{{item.video_img !== ''}}">
<!-- <view wx:if="{{isPlay}}" class="video-box" catchtap="play"> -->
<video src="{{item.url}}" wx:if="{{item.type == 'video'}}" class="slide-image" autoplay="{{false}}"
controls="{{true}}"></video>
<!-- </view> -->
<!-- <view wx:else class="video-box {{item.video_img!==''?'position-re':''}}" catchtap="play"> -->
<!-- <block wx:if="{{item.video_img !== ''}}">
<image src="{{item.video_img}}"
class="slide-image fmImg" mode="aspectFill">
</image>
<image src='http://pjq0ww1cj.bkt.clouddn.com/video_btn.png' class="video_btn {{item.video_img!==''?'position-ab':''}}"></image>
<!-- <view class="iconfont icon-ziyuan "></view> -->
</block>
<block wx:else>
<view class="iconfont icon-ziyuan"></view>
</block>
</view>
</block> -->
<!-- </view> -->
</block>
<block wx:else>
<image src="{{item.url}}" wx:if="{{item.type == 'image'}}" class="slide-image banner" mode="aspectFill"/>
<image src="{{item.url}}" wx:if="{{item.type == 'image'}}" bindtap='previewImage' class="slide-image banner" mode="aspectFill"/>
</block>
</view>
<!-- </navigator> -->
... ...
... ... @@ -14,6 +14,7 @@ Page({
typeId: null,
minscreenHeight: 0,
scrollTop: 0,
jzSuccess: false,
},
/**
... ... @@ -50,10 +51,25 @@ Page({
app.post(url, data).then((res) => {
console.log('res',res);
let data = [];
// data.
if(res.page == 1 && res.list.length == 0) {
that.setData({
jzSuccess: true,
jzSuccessContent: "暂无相关数据",
})
}else if(res.list.length < 10) {
that.setData({
caseList: that.data.caseList.concat(res.list),
jzSuccess: true,
jzSuccessContent: "已加载全部内容",
})
}else {
that.setData({
caseList: that.data.caseList.concat(res.list)
caseList: that.data.caseList.concat(res.list),
jzSuccess: false,
})
}
// data.
}).catch((err) => {
... ...
{
"navigationBarTitleText": "政府案例"
"navigationBarTitleText": ""
}
\ No newline at end of file
... ...
<!--pages/caseList/caseList.wxml-->
<view class='case_list_wrap'>
<view class='case_list_box'>
<view class='case_list' wx:for="{{caseList}}" wx:key='index'>
<view class='case_list' wx:for="{{caseList}}" wx:key='index' style='padding-bottom: 20rpx;'>
<view class='case_top'>
<view class='case_title' bindtap='jumpFun' data-id="{{item.id}}">{{item.title}}</view>
<view class='case_lable_box'>
... ... @@ -13,12 +13,13 @@
<video wx:if="{{item.video_type}}" src='{{item.video}}'></video>
<image wx:else src='{{item.first}}'></image>
</view>
<view class='case_bottom_list'>
<view class='case_bottom_list' bindtap='jumpFun' data-id="{{item.id}}" wx:if="{{item.image.length != 0}}">
<view class='case_bottom_banner' wx:for="{{item.image}}" wx:key='index'>
<image mode='widthFix' src='{{item.url}}'></image>
<image src='{{item.url}}'></image>
</view>
</view>
</view>
<view class='jzSuccess' wx:if="{{jzSuccess == true}}">{{jzSuccessContent}}</view>
</view>
<!-- 客服 -->
<cover-view class='chat_peo'>
... ...
... ... @@ -27,6 +27,9 @@
color: #000000;
font-weight: bold;
margin-bottom: 19rpx;
overflow: hidden;
white-space: nowrap;
text-overflow:ellipsis;
}
.case_lable_box {
display: flex;
... ... @@ -59,7 +62,7 @@
}
.case_bottom_list {
height: 206rpx;
padding: 10rpx 0 50rpx 20rpx;
padding: 10rpx 15rpx 30rpx;
display: flex;
overflow-x: scroll;
overflow-y:hidden;
... ... @@ -71,13 +74,20 @@
display: flex;
justify-content: center;
align-items: center;
margin-right: 20rpx;
padding-right:15rpx;
}
.case_bottom_banner image {
width: 212rpx;
height:132rpx;
border-radius: 10rpx;
}
.jzSuccess {
width: 100%;
margin: 20rpx 0;
text-align: center;
font-size: 30rpx;
color: #4D4D4D;
}
... ...
... ... @@ -13,6 +13,7 @@ Page({
contact: false,
current: 0,
imgUrls: [],
caseStatus: true,
connectButton: [
{ className: "", text: "在线客服", bindtap: "" }
],
... ... @@ -83,10 +84,14 @@ Page({
let url = 'portal/Api/index';
app.post(url, {}).then((res) => {
// console.log('res',res);
if (res.type) {
if (res.type == true) {
this.setData({
imgUrls: res.banner
})
}else {
this.setData({
caseStatus: false,
})
}
... ... @@ -134,91 +139,4 @@ Page({
onReachBottom: function() {
},
// 第四屏
// onPageScroll: function (e) { // 获取滚动条当前位置
// // console.log(e)
// this.setData({
// scrollTop: e.scrollTop
// })
// },
// goTop: function () {
// app.goTop()
// },
// // 姓名
// nameFun: function (e) {
// let that = this;
// // console.log(e.detail.value)
// that.setData({
// name: e.detail.value,
// })
// },
// // 手机号
// phoneFun: function (e) {
// let that = this;
// // console.log(e.detail.value)
// that.setData({
// phone: e.detail.value,
// })
// },
// // 行业
// companyFun: function (e) {
// let that = this;
// // console.log(e.detail.value)
// that.setData({
// company: e.detail.value,
// })
// },
// // 提交
// subFun: function () {
// let url = '/portal/Api/form';
// var that = this;
// if (that.data.phone == "") {
// wx.showToast({
// title: '请输入手机号!',
// icon: "none",
// });
// return false;
// }
// if (that.data.name == "") {
// wx.showToast({
// title: '请输入姓名!',
// icon: "none",
// })
// return false;
// }
// let AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/;
// if (!AuglyTest_phone.test(that.data.phone)) {
// // wx.showToast({
// // title: '手机号有误!',
// // icon: "none",
// // duration: 1500
// // })
// wx.showToast({
// title: '手机号有误!',
// icon: 'none'
// })
// return false;
// }
// let data = {
// name: that.data.name,
// mobile: that.data.phone,
// firm: that.data.company,
// };
// app.post(url, data).then((res) => {
// // console.log('res', res);
// if (res.type == 1) {
// wx.showToast({
// title: '成功',
// icon: 'succes',
// duration: 1000,
// mask: true
// })
// }
// }).catch((err) => {
// console.log(err);
// })
// },
})
\ No newline at end of file
... ...
... ... @@ -32,7 +32,7 @@
<swiper-item>
<view class='case_wrap'>
<!--banner -->
<view class='case_banner_box'>
<view class='case_banner_box' wx:if="{{caseStatus}}">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" bindchange="swiperChange" duration="{{duration}}" circular="true">
<block wx:for="{{imgUrls}}" wx:key>
<swiper-item>
... ...