作者 乔蒙蒙

更改图片地址

@@ -23,134 +23,138 @@ App({ @@ -23,134 +23,138 @@ App({
23 duration: 100 23 duration: 100
24 }) 24 })
25 }, 25 },
26 -  
27 - /**  
28 -* 自定义post函数,返回Promise  
29 -* +-------------------  
30 -* @param {String} url 接口网址  
31 -* @param {arrayObject} data 要传的数组对象 like: {name: 'name', age: 32}  
32 -* +-------------------  
33 -* @return {Promise} promise 返回promise供后续操作  
34 -*/  
35 - post: function (url, data, headerParams) {  
36 - wx.showNavigationBarLoading()  
37 - wx.showLoading({  
38 - title: '加载中',  
39 - })  
40 - var promise = new Promise((resolve, reject) => {  
41 - let that = this;  
42 - let postData = data;  
43 - let baseUrl = 'https://ruiwechat.w.broteam.cn/';  
44 - //网络请求  
45 - let header = {  
46 - 'content-type': 'application/x-www-form-urlencoded'  
47 - }  
48 - header = Object.assign(header, headerParams)  
49 - wx.request({  
50 - url: baseUrl + url,  
51 - data: postData,  
52 - method: 'POST',  
53 - header: header,  
54 - success: function (res) {//返回取得的数据  
55 - if (res.data.code == '200') {  
56 - resolve(res.data.data);  
57 - } else if (res.data.code == '10001') {//用户未  
58 - // wx.showModal({  
59 - // title: '提示',  
60 - // content: res.data.msg,  
61 - // showCancel: false,  
62 - // success: function (res) {  
63 - // if (res.confirm) {  
64 - // wx.removeStorageSync('token');  
65 - // wx.navigateTo({  
66 - // url: '/pages/start/start',  
67 - // })  
68 - // }  
69 - // }  
70 - // })  
71 - } else if (res.data.code == '40000') {  
72 - wx.showModal({  
73 - title: '提示',  
74 - content: res.data.msg,  
75 - showCancel: false,  
76 - success: function (res) { }  
77 - })  
78 - } else if (res.data.code == '40005') {  
79 26
80 - } else if (res.data.code == '40006') { 27 + /**
  28 + * 自定义post函数,返回Promise
  29 + * +-------------------
  30 + * @param {String} url 接口网址
  31 + * @param {arrayObject} data 要传的数组对象 like: {name: 'name', age: 32}
  32 + * +-------------------
  33 + * @return {Promise} promise 返回promise供后续操作
  34 + */
  35 + post: function (url, data, headerParams) {
  36 + wx.showNavigationBarLoading()
  37 + wx.showLoading({
  38 + title: '加载中',
  39 + })
  40 + var promise = new Promise((resolve, reject) => {
  41 + let that = this;
  42 + let postData = data;
  43 + let baseUrl = 'https://ruiwechat.w.broteam.cn/';
  44 + //网络请求
  45 + let header = {
  46 + 'content-type': 'application/x-www-form-urlencoded'
  47 + }
  48 + header = Object.assign(header, headerParams)
  49 + wx.request({
  50 + url: baseUrl + url,
  51 + data: postData,
  52 + method: 'POST',
  53 + header: header,
  54 + success: function (res) {//返回取得的数据
  55 + if (res.data.code == '200') {
  56 + resolve(res.data.data);
  57 + } else if (res.data.code == '10001') {//用户未
  58 + // wx.showModal({
  59 + // title: '提示',
  60 + // content: res.data.msg,
  61 + // showCancel: false,
  62 + // success: function (res) {
  63 + // if (res.confirm) {
  64 + // wx.removeStorageSync('token');
  65 + // wx.navigateTo({
  66 + // url: '/pages/start/start',
  67 + // })
  68 + // }
  69 + // }
  70 + // })
  71 + } else if (res.data.code == '40000') {
  72 + wx.showModal({
  73 + title: '提示',
  74 + content: res.data.msg,
  75 + showCancel: false,
  76 + success: function (res) { }
  77 + })
  78 + } else if (res.data.code == '40005') {
81 79
82 - } else {  
83 - wx.showModal({  
84 - title: '提示',  
85 - content: res.data.msg,  
86 - showCancel: false,  
87 - })  
88 - reject(res.data)  
89 - }  
90 - wx.hideLoading()  
91 - wx.hideNavigationBarLoading()  
92 - },  
93 - error: function (e) {  
94 - console.log(e)  
95 - reject('网络出错');  
96 - // wx.hideLoading()  
97 - wx.hideNavigationBarLoading()  
98 - }  
99 - })  
100 - }); 80 + } else if (res.data.code == '40006') {
101 81
102 - return promise;  
103 - },  
104 - globalData: {  
105 - userInfo: null  
106 - }, 82 + } else {
  83 + wx.showModal({
  84 + title: '提示',
  85 + content: res.data.msg,
  86 + showCancel: false,
  87 + })
  88 + reject(res.data)
  89 + }
  90 + wx.hideLoading()
  91 + wx.hideNavigationBarLoading()
  92 + },
  93 + error: function (e) {
  94 + console.log(e)
  95 + reject('网络出错');
  96 + // wx.hideLoading()
  97 + wx.hideNavigationBarLoading()
  98 + }
  99 + })
  100 + });
  101 +
  102 + return promise;
  103 + },
  104 + globalData: {
  105 + userInfo: null
  106 + },
107 107
108 108
109 -// 动画  
110 - //渐入,渐出实现  
111 - show: function (that, param, opacity) {  
112 - var animation = wx.createAnimation({  
113 - //持续时间800ms  
114 - duration: 800,  
115 - timingFunction: 'ease',  
116 - });  
117 - //var animation = this.animation  
118 - animation.opacity(opacity).step()  
119 - //将param转换为key  
120 - var json = '{"' + param + '":""}'  
121 - json = JSON.parse(json);  
122 - json[param] = animation.export()  
123 - //设置动画  
124 - that.setData(json)  
125 - }, 109 + // 动画
  110 + //渐入,渐出实现
  111 + show: function (that, param, opacity) {
  112 + var animation = wx.createAnimation({
  113 + //持续时间800ms
  114 + duration: 800,
  115 + timingFunction: 'ease',
  116 + });
  117 + //var animation = this.animation
  118 + animation.opacity(opacity).step()
  119 + //将param转换为key
  120 + var json = '{"' + param + '":""}'
  121 + json = JSON.parse(json);
  122 + json[param] = animation.export()
  123 + //设置动画
  124 + that.setData(json)
  125 + },
126 126
127 - //滑动渐入渐出  
128 - slideupshow: function (that, param, px, opacity) {  
129 - var animation = wx.createAnimation({  
130 - duration: 1000,  
131 - timingFunction: 'ease',  
132 - });  
133 - animation.translateY(px).opacity(opacity).step()  
134 - //将param转换为key  
135 - var json = '{"' + param + '":""}'  
136 - json = JSON.parse(json);  
137 - json[param] = animation.export()  
138 - //设置动画  
139 - that.setData(json)  
140 - }, 127 + //滑动渐入渐出
  128 + slideupshow: function (that, param, px, opacity) {
  129 + var animation = wx.createAnimation({
  130 + duration: 1000,
  131 + timingFunction: 'ease',
  132 + });
  133 + animation.translateY(px).opacity(opacity).step()
  134 + //将param转换为key
  135 + var json = '{"' + param + '":""}'
  136 + json = JSON.parse(json);
  137 + json[param] = animation.export()
  138 + //设置动画
  139 + that.setData(json)
  140 + },
141 141
142 - //向右滑动渐入渐出  
143 - sliderightshow: function (that, param, px, opacity) {  
144 - var animation = wx.createAnimation({  
145 - duration: 1500,  
146 - timingFunction: 'ease',  
147 - });  
148 - animation.translateX(px).opacity(opacity).step()  
149 - //将param转换为key  
150 - var json = '{"' + param + '":""}'  
151 - json = JSON.parse(json);  
152 - json[param] = animation.export()  
153 - //设置动画  
154 - that.setData(json)  
155 - }, 142 + //向右滑动渐入渐出
  143 + sliderightshow: function (that, param, px, opacity) {
  144 + var animation = wx.createAnimation({
  145 + duration: 1500,
  146 + timingFunction: 'ease',
  147 + });
  148 + animation.translateX(px).opacity(opacity).step()
  149 + //将param转换为key
  150 + var json = '{"' + param + '":""}'
  151 + json = JSON.parse(json);
  152 + json[param] = animation.export()
  153 + //设置动画
  154 + that.setData(json)
  155 + },
  156 + globalData: {
  157 + userInfo: null,
  158 + baseImgUrl: 'http://pjq0ww1cj.bkt.clouddn.com/'
  159 + }
156 }) 160 })
@@ -9,6 +9,7 @@ Page({ @@ -9,6 +9,7 @@ Page({
9 connectButton: [ 9 connectButton: [
10 { className: "", text: "在线客服", bindtap: "" } 10 { className: "", text: "在线客服", bindtap: "" }
11 ], 11 ],
  12 + baseImgUrl: app.globalData.baseImgUrl,
12 minscreenHeight: 0, 13 minscreenHeight: 0,
13 scrollTop: 0, 14 scrollTop: 0,
14 name: '', 15 name: '',
@@ -140,11 +141,11 @@ Page({ @@ -140,11 +141,11 @@ Page({
140 companyStatus: false, 141 companyStatus: false,
141 }) 142 })
142 } 143 }
143 - let AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/; 144 + let AuglyTest_phone = /^1[0-9]{10}$/;
144 if(!AuglyTest_phone.test(that.data.phone)) { 145 if(!AuglyTest_phone.test(that.data.phone)) {
145 that.setData({ 146 that.setData({
146 contactStatus: true, 147 contactStatus: true,
147 - contactContent: "手机号格式不正确", 148 + contactContent: "联系方式请输入不超过11位数字",
148 }) 149 })
149 // wx.showToast({ 150 // wx.showToast({
150 // title: '手机号格式不正确', 151 // title: '手机号格式不正确',
1 <!--pages/about/about.wxml--> 1 <!--pages/about/about.wxml-->
2 <view class='about_wrap'> 2 <view class='about_wrap'>
3 <view class='about_top'> 3 <view class='about_top'>
4 - <image src='http://pjq0ww1cj.bkt.clouddn.com/about.png'></image> 4 + <image src='{{baseImgUrl}}/about.png'></image>
5 </view> 5 </view>
6 <view class='about_content'> 6 <view class='about_content'>
7 <import src="../../wxParse/wxParse.wxml"/> 7 <import src="../../wxParse/wxParse.wxml"/>
8 <template is="wxParse" data="{{wxParseData:content_img.nodes}}"/> 8 <template is="wxParse" data="{{wxParseData:content_img.nodes}}"/>
9 - <!-- <image src='http://pjq0ww1cj.bkt.clouddn.com/about_content.png' mode="widthFix"></image> --> 9 + <!-- <image src='{{baseImgUrl}}/about_content.png' mode="widthFix"></image> -->
10 </view> 10 </view>
11 <view class='about_contact_way'> 11 <view class='about_contact_way'>
12 <view class='about_title'> 12 <view class='about_title'>
13 - <image src='http://pjq0ww1cj.bkt.clouddn.com/phone.png'></image> 13 + <image src='{{baseImgUrl}}/phone.png'></image>
14 <view>联系我们</view> 14 <view>联系我们</view>
15 </view> 15 </view>
16 <view class='about_contact_box'> 16 <view class='about_contact_box'>
@@ -37,13 +37,13 @@ @@ -37,13 +37,13 @@
37 <!-- 申请 --> 37 <!-- 申请 -->
38 <view class='sub_apply_box'> 38 <view class='sub_apply_box'>
39 <view class='sub_apply_title'> 39 <view class='sub_apply_title'>
40 - <image src='http://pjq0ww1cj.bkt.clouddn.com/apply.png'></image> 40 + <image src='{{baseImgUrl}}/apply.png'></image>
41 </view> 41 </view>
42 <view class='sub_apply_list'> 42 <view class='sub_apply_list'>
43 <view class='sub_apply_must'>*</view> 43 <view class='sub_apply_must'>*</view>
44 <view class='sub_apply_input'> 44 <view class='sub_apply_input'>
45 <view class='sub_input_left'> 45 <view class='sub_input_left'>
46 - <image src='http://pjq0ww1cj.bkt.clouddn.com/user.png' mode="widthFix"></image> 46 + <image src='{{baseImgUrl}}/user.png' mode="widthFix"></image>
47 </view> 47 </view>
48 <input type='text' bindchange="nameFun" placeholder="请输入您的姓名" /> 48 <input type='text' bindchange="nameFun" placeholder="请输入您的姓名" />
49 <text wx:if="{{nameStatus == true}}">{{nameContent}}</text> 49 <text wx:if="{{nameStatus == true}}">{{nameContent}}</text>
@@ -53,9 +53,9 @@ @@ -53,9 +53,9 @@
53 <view class='sub_apply_must'>*</view> 53 <view class='sub_apply_must'>*</view>
54 <view class='sub_apply_input'> 54 <view class='sub_apply_input'>
55 <view class='sub_input_left'> 55 <view class='sub_input_left'>
56 - <image src='http://pjq0ww1cj.bkt.clouddn.com/input_phone.png' mode="widthFix"></image> 56 + <image src='{{baseImgUrl}}/input_phone.png' mode="widthFix"></image>
57 </view> 57 </view>
58 - <input type='number' maxlength='11' bindchange="phoneFun" placeholder="请输入您的联系方式" /> 58 + <input type='number' bindchange="phoneFun" placeholder="请输入您的联系方式" />
59 <text wx:if="{{contactStatus == true}}">{{contactContent}}</text> 59 <text wx:if="{{contactStatus == true}}">{{contactContent}}</text>
60 </view> 60 </view>
61 </view> 61 </view>
@@ -63,24 +63,24 @@ @@ -63,24 +63,24 @@
63 <!-- <view class='sub_apply_must'>*</view> --> 63 <!-- <view class='sub_apply_must'>*</view> -->
64 <view class='sub_apply_input' style='margin-left:30rpx;'> 64 <view class='sub_apply_input' style='margin-left:30rpx;'>
65 <view class='sub_input_left'> 65 <view class='sub_input_left'>
66 - <image src='http://pjq0ww1cj.bkt.clouddn.com/company.png' mode="widthFix"></image> 66 + <image src='{{baseImgUrl}}/company.png' mode="widthFix"></image>
67 </view> 67 </view>
68 <input type='text' bindchange="companyFun" placeholder="请输入您的所在行业" /> 68 <input type='text' bindchange="companyFun" placeholder="请输入您的所在行业" />
69 <text wx:if="{{companyStatus == true}}">{{companyContent}}</text> 69 <text wx:if="{{companyStatus == true}}">{{companyContent}}</text>
70 </view> 70 </view>
71 </view> 71 </view>
72 <view class='sub_btn' bindtap='subFun'> 72 <view class='sub_btn' bindtap='subFun'>
73 - <image src='http://pjq0ww1cj.bkt.clouddn.com/sub_btn.png'></image> 73 + <image src='{{baseImgUrl}}/sub_btn.png'></image>
74 </view> 74 </view>
75 </view> 75 </view>
76 <!-- 客服 --> 76 <!-- 客服 -->
77 <view class='chat_peo'> 77 <view class='chat_peo'>
78 <button open-type="contact" class='contacButton'> 78 <button open-type="contact" class='contacButton'>
79 - <image src='http://pjq0ww1cj.bkt.clouddn.com/chat_peo.png'></image> 79 + <image src='{{baseImgUrl}}/chat_peo.png'></image>
80 </button> 80 </button>
81 </view> 81 </view>
82 <!-- 返回顶部 --> 82 <!-- 返回顶部 -->
83 <view class='chat_peo return_top' wx:if="{{scrollTop>minscreenHeight}}" bindtap="goTop" > 83 <view class='chat_peo return_top' wx:if="{{scrollTop>minscreenHeight}}" bindtap="goTop" >
84 - <image src='http://pjq0ww1cj.bkt.clouddn.com/dingbu.png'></image> 84 + <image src='{{baseImgUrl}}/dingbu.png'></image>
85 </view> 85 </view>
86 </view> 86 </view>
@@ -10,40 +10,41 @@ Page({ @@ -10,40 +10,41 @@ Page({
10 */ 10 */
11 data: { 11 data: {
12 imgUrls: [], 12 imgUrls: [],
13 - connectButton: [  
14 - { className: "", text: "在线客服", bindtap: "" }  
15 - ], 13 + baseImgUrl: app.globalData.baseImgUrl,
  14 + connectButton: [
  15 + { className: "", text: "在线客服", bindtap: "" }
  16 + ],
16 autoplay: false, 17 autoplay: false,
17 duration: 1000, 18 duration: 1000,
18 circular: true, 19 circular: true,
19 currentSwiper: 0, 20 currentSwiper: 0,
20 }, 21 },
21 changeIndicatorDots(e) { 22 changeIndicatorDots(e) {
22 - // console.log(e) 23 + // console.log(e)
23 this.setData({ 24 this.setData({
24 indicatorDots: !this.data.indicatorDots 25 indicatorDots: !this.data.indicatorDots
25 }) 26 })
26 }, 27 },
27 changeAutoplay(e) { 28 changeAutoplay(e) {
28 - // consolle.log(e) 29 + // consolle.log(e)
29 this.setData({ 30 this.setData({
30 autoplay: !this.data.autoplay 31 autoplay: !this.data.autoplay
31 }) 32 })
32 }, 33 },
33 intervalChange(e) { 34 intervalChange(e) {
34 - // console.log(e) 35 + // console.log(e)
35 this.setData({ 36 this.setData({
36 interval: e.detail.value 37 interval: e.detail.value
37 }) 38 })
38 }, 39 },
39 durationChange(e) { 40 durationChange(e) {
40 - // console.log(e) 41 + // console.log(e)
41 this.setData({ 42 this.setData({
42 duration: e.detail.value 43 duration: e.detail.value
43 }) 44 })
44 }, 45 },
45 swiperChange: function (e) { 46 swiperChange: function (e) {
46 - // conosle.log(e) 47 + // conosle.log(e)
47 this.setData({ 48 this.setData({
48 currentSwiper: e.detail.current 49 currentSwiper: e.detail.current
49 }) 50 })
@@ -53,15 +54,15 @@ Page({ @@ -53,15 +54,15 @@ Page({
53 * 生命周期函数--监听页面加载 54 * 生命周期函数--监听页面加载
54 */ 55 */
55 onLoad: function (options) { 56 onLoad: function (options) {
56 - let url = '/portal/Api/scene';  
57 - app.post(url, {}).then((res) => {  
58 - // console.log('res', res);  
59 - this.setData({  
60 - imgUrls: res.list 57 + let url = '/portal/Api/scene';
  58 + app.post(url, {}).then((res) => {
  59 + // console.log('res', res);
  60 + this.setData({
  61 + imgUrls: res.list
  62 + })
  63 + }).catch((err) => {
  64 + console.log(err);
61 }) 65 })
62 - }).catch((err) => {  
63 - console.log(err);  
64 - })  
65 }, 66 },
66 jumpFun: function (e) { 67 jumpFun: function (e) {
67 wx.navigateTo({ 68 wx.navigateTo({
@@ -70,42 +71,42 @@ Page({ @@ -70,42 +71,42 @@ Page({
70 }, 71 },
71 // 返回上一页 72 // 返回上一页
72 backFun: function () { 73 backFun: function () {
73 - wx.navigateBack({  
74 - changed: true  
75 - }); 74 + wx.navigateBack({
  75 + changed: true
  76 + });
76 }, 77 },
77 // 触摸开始事件 78 // 触摸开始事件
78 touchStart: function (e) { 79 touchStart: function (e) {
79 - touchDot = e.touches[0].pageX; // 获取触摸时的原点  
80 - // 使用js计时器记录时间  
81 - interval = setInterval(function () {  
82 - time++;  
83 - }, 100); 80 + touchDot = e.touches[0].pageX; // 获取触摸时的原点
  81 + // 使用js计时器记录时间
  82 + interval = setInterval(function () {
  83 + time++;
  84 + }, 100);
84 }, 85 },
85 // 触摸移动事件 86 // 触摸移动事件
86 touchMove: function (e) { 87 touchMove: function (e) {
87 - var touchMove = e.touches[0].pageX;  
88 - console.log("touchMove:" + touchMove + " touchDot:" + touchDot + " diff:" + (touchMove - touchDot));  
89 - // 向左滑动  
90 - if (touchMove - touchDot <= -40 && time < 10) {  
91 - wx.navigateTo({  
92 - url: '../about/about'  
93 - })  
94 - console.log(1)  
95 - }  
96 - // 向右滑动  
97 - if (touchMove - touchDot >= 40 && time < 10) {  
98 - console.log('向右滑动');  
99 - // alert("已经是第一页了")  
100 - wx.navigateBack({  
101 - changed: true  
102 - });  
103 - } 88 + var touchMove = e.touches[0].pageX;
  89 + console.log("touchMove:" + touchMove + " touchDot:" + touchDot + " diff:" + (touchMove - touchDot));
  90 + // 向左滑动
  91 + if (touchMove - touchDot <= -40 && time < 10) {
  92 + wx.navigateTo({
  93 + url: '../about/about'
  94 + })
  95 + console.log(1)
  96 + }
  97 + // 向右滑动
  98 + if (touchMove - touchDot >= 40 && time < 10) {
  99 + console.log('向右滑动');
  100 + // alert("已经是第一页了")
  101 + wx.navigateBack({
  102 + changed: true
  103 + });
  104 + }
104 }, 105 },
105 // 触摸结束事件 106 // 触摸结束事件
106 touchEnd: function (e) { 107 touchEnd: function (e) {
107 - clearInterval(interval); // 清除setInterval  
108 - time = 0; 108 + clearInterval(interval); // 清除setInterval
  109 + time = 0;
109 }, 110 },
110 111
111 /** 112 /**
@@ -149,7 +150,7 @@ Page({ @@ -149,7 +150,7 @@ Page({
149 * 页面上拉触底事件的处理函数 150 * 页面上拉触底事件的处理函数
150 */ 151 */
151 onReachBottom: function () { 152 onReachBottom: function () {
152 - 153 +
153 }, 154 },
154 155
155 /** 156 /**
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 <!-- 客服 --> 19 <!-- 客服 -->
20 <view class='chat_peo'> 20 <view class='chat_peo'>
21 <button open-type="contact" class='contacButton'> 21 <button open-type="contact" class='contacButton'>
22 - <image src='http://pjq0ww1cj.bkt.clouddn.com/chat_peo.png'></image> 22 + <image src='{{baseImgUrl}}/chat_peo.png'></image>
23 </button> 23 </button>
24 </view> 24 </view>
25 25
@@ -17,6 +17,7 @@ Page({ @@ -17,6 +17,7 @@ Page({
17 connectButton: [ 17 connectButton: [
18 { className: "", text: "在线客服", bindtap: "" } 18 { className: "", text: "在线客服", bindtap: "" }
19 ], 19 ],
  20 + baseImgUrl: app.globalData.baseImgUrl,
20 currentSwiper: 0, 21 currentSwiper: 0,
21 autoplay: true, 22 autoplay: true,
22 interval: 5000, 23 interval: 5000,
@@ -31,40 +31,40 @@ @@ -31,40 +31,40 @@
31 </view> 31 </view>
32 <view class='case_content'> 32 <view class='case_content'>
33 <view class='case_list' data-html="政府案例" data-id='1' bindtap='goFun'> 33 <view class='case_list' data-html="政府案例" data-id='1' bindtap='goFun'>
34 - <image src='http://pjq0ww1cj.bkt.clouddn.com/zhengfu.png'></image> 34 + <image src='{{baseImgUrl}}/zhengfu.png'></image>
35 <view class='case_list_text'>政府</view> 35 <view class='case_list_text'>政府</view>
36 </view> 36 </view>
37 <view class='case_list' data-html="地产案例" data-id='3' bindtap='goFun'> 37 <view class='case_list' data-html="地产案例" data-id='3' bindtap='goFun'>
38 - <image src='http://pjq0ww1cj.bkt.clouddn.com/dichan.png'></image> 38 + <image src='{{baseImgUrl}}/dichan.png'></image>
39 <view class='case_list_text'>地产</view> 39 <view class='case_list_text'>地产</view>
40 </view> 40 </view>
41 <view class='case_list' data-html="制造案例" data-id='2' bindtap='goFun'> 41 <view class='case_list' data-html="制造案例" data-id='2' bindtap='goFun'>
42 - <image src='http://pjq0ww1cj.bkt.clouddn.com/zhizao.png'></image> 42 + <image src='{{baseImgUrl}}/zhizao.png'></image>
43 <view class='case_list_text'>制造</view> 43 <view class='case_list_text'>制造</view>
44 </view> 44 </view>
45 <view class='case_list' data-html="教育案例" data-id='5' bindtap='goFun'> 45 <view class='case_list' data-html="教育案例" data-id='5' bindtap='goFun'>
46 - <image src='http://pjq0ww1cj.bkt.clouddn.com/jiaoyu.png'></image> 46 + <image src='{{baseImgUrl}}/jiaoyu.png'></image>
47 <view class='case_list_text'>教育</view> 47 <view class='case_list_text'>教育</view>
48 </view> 48 </view>
49 <view class='case_list' data-html="物流案例" data-id='4' bindtap='goFun'> 49 <view class='case_list' data-html="物流案例" data-id='4' bindtap='goFun'>
50 - <image src='http://pjq0ww1cj.bkt.clouddn.com/jinrong.png'></image> 50 + <image src='{{baseImgUrl}}/jinrong.png'></image>
51 <view class='case_list_text'>物流</view> 51 <view class='case_list_text'>物流</view>
52 </view> 52 </view>
53 <view class='case_list' data-html="零售案例" data-id='6' bindtap='goFun'> 53 <view class='case_list' data-html="零售案例" data-id='6' bindtap='goFun'>
54 - <image src='http://pjq0ww1cj.bkt.clouddn.com/lingshou.png'></image> 54 + <image src='{{baseImgUrl}}/lingshou.png'></image>
55 <view class='case_list_text'>零售</view> 55 <view class='case_list_text'>零售</view>
56 </view> 56 </view>
57 </view> 57 </view>
58 <view class='drop_img'> 58 <view class='drop_img'>
59 - <image src='http://pjq0ww1cj.bkt.clouddn.com/left.png' style='margin-right:200rpx;' bindtap='backFun'></image>  
60 - <image src='http://pjq0ww1cj.bkt.clouddn.com/right.png' bindtap="jumpFun"></image> 59 + <image src='{{baseImgUrl}}/left.png' style='margin-right:200rpx;' bindtap='backFun'></image>
  60 + <image src='{{baseImgUrl}}/right.png' bindtap="jumpFun"></image>
61 </view> 61 </view>
62 </view> 62 </view>
63 <!-- 客服 --> 63 <!-- 客服 -->
64 <view class='chat_peo' > 64 <view class='chat_peo' >
65 <button open-type="contact" class='contacButton'> 65 <button open-type="contact" class='contacButton'>
66 <!-- <button open-type="contact" class='contacButton'> --> 66 <!-- <button open-type="contact" class='contacButton'> -->
67 - <image src='http://pjq0ww1cj.bkt.clouddn.com/chat_peo.png'></image> 67 + <image src='{{baseImgUrl}}/chat_peo.png'></image>
68 <!-- </button> --> 68 <!-- </button> -->
69 </button> 69 </button>
70 </view> 70 </view>
@@ -11,6 +11,7 @@ Page({ @@ -11,6 +11,7 @@ Page({
11 connectButton: [ 11 connectButton: [
12 { className: "", text: "在线客服", bindtap: "" } 12 { className: "", text: "在线客服", bindtap: "" }
13 ], 13 ],
  14 + baseImgUrl: app.globalData.baseImgUrl,
14 currentSwiper: 0, 15 currentSwiper: 0,
15 listStatus: 0, 16 listStatus: 0,
16 data: {}, 17 data: {},
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <image src="{{item.video_img}}" 17 <image src="{{item.video_img}}"
18 class="slide-image fmImg" mode="aspectFill"> 18 class="slide-image fmImg" mode="aspectFill">
19 </image> 19 </image>
20 - <image src='http://pjq0ww1cj.bkt.clouddn.com/video_btn.png' class="video_btn {{item.video_img!==''?'position-ab':''}}"></image> 20 + <image src='{{baseImgUrl}}/video_btn.png' class="video_btn {{item.video_img!==''?'position-ab':''}}"></image>
21 21
22 </block> 22 </block>
23 <block wx:else> 23 <block wx:else>
@@ -63,23 +63,23 @@ @@ -63,23 +63,23 @@
63 <view class='info_list' wx:if="{{listStatus==0}}"> 63 <view class='info_list' wx:if="{{listStatus==0}}">
64 <import src="../../wxParse/wxParse.wxml"/> 64 <import src="../../wxParse/wxParse.wxml"/>
65 <template is="wxParse" data="{{wxParseData:content_1.nodes}}"/> 65 <template is="wxParse" data="{{wxParseData:content_1.nodes}}"/>
66 - <!-- <image src="http://pjq0ww1cj.bkt.clouddn.com/jianjie.png" mode='widthFix'></image> --> 66 + <!-- <image src="{{baseImgUrl}}/jianjie.png" mode='widthFix'></image> -->
67 </view> 67 </view>
68 <view class='info_list' wx:else> 68 <view class='info_list' wx:else>
69 <import src="../../wxParse/wxParse.wxml"/> 69 <import src="../../wxParse/wxParse.wxml"/>
70 <template is="wxParse" data="{{wxParseData:content_2.nodes}}"/> 70 <template is="wxParse" data="{{wxParseData:content_2.nodes}}"/>
71 - <!-- <image src="http://pjq0ww1cj.bkt.clouddn.com/shishi.png" mode='widthFix'></image> --> 71 + <!-- <image src="{{baseImgUrl}}/shishi.png" mode='widthFix'></image> -->
72 </view> 72 </view>
73 </view> 73 </view>
74 </view> 74 </view>
75 <!-- 客服 --> 75 <!-- 客服 -->
76 <view class='chat_peo'> 76 <view class='chat_peo'>
77 <button open-type="contact" class='contacButton'> 77 <button open-type="contact" class='contacButton'>
78 - <image src='http://pjq0ww1cj.bkt.clouddn.com/chat_peo.png'></image> 78 + <image src='{{baseImgUrl}}/chat_peo.png'></image>
79 </button> 79 </button>
80 </view> 80 </view>
81 <!-- 返回顶部 --> 81 <!-- 返回顶部 -->
82 <view class='chat_peo return_top' wx:if="{{scrollTop>minscreenHeight}}" bindtap="goTop" > 82 <view class='chat_peo return_top' wx:if="{{scrollTop>minscreenHeight}}" bindtap="goTop" >
83 - <image src='http://pjq0ww1cj.bkt.clouddn.com/dingbu.png'></image> 83 + <image src='{{baseImgUrl}}/dingbu.png'></image>
84 </view> 84 </view>
85 </view> 85 </view>
1 // pages/caseList/caseList.js 1 // pages/caseList/caseList.js
2 -const app=getApp(); 2 +const app = getApp();
3 Page({ 3 Page({
4 4
5 - /**  
6 - * 页面的初始数据  
7 - */  
8 - data: {  
9 - connectButton: [  
10 - { className: "", text: "在线客服", bindtap: "" }  
11 - ],  
12 - caseList: [],  
13 - page: 1,  
14 - typeId: null,  
15 - minscreenHeight: 0,  
16 - scrollTop: 0,  
17 - jzSuccess: false,  
18 - },  
19 -  
20 - /**  
21 - * 生命周期函数--监听页面加载  
22 - */  
23 - onLoad: function (options) {  
24 - let that = this;  
25 - wx.setNavigationBarTitle({  
26 - title: options.html,  
27 - });  
28 - that.setData({  
29 - typeId: options.id  
30 - })  
31 - that.getData();  
32 - }, 5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + connectButton: [
  10 + { className: "", text: "在线客服", bindtap: "" }
  11 + ],
  12 + caseList: [],
  13 + baseImgUrl: app.globalData.baseImgUrl,
  14 + page: 1,
  15 + typeId: null,
  16 + minscreenHeight: 0,
  17 + scrollTop: 0,
  18 + jzSuccess: false,
  19 + },
  20 +
  21 + /**
  22 + * 生命周期函数--监听页面加载
  23 + */
  24 + onLoad: function (options) {
  25 + let that = this;
  26 + wx.setNavigationBarTitle({
  27 + title: options.html,
  28 + });
  29 + that.setData({
  30 + typeId: options.id
  31 + })
  32 + that.getData();
  33 + },
33 onPageScroll: function (e) { // 获取滚动条当前位置 34 onPageScroll: function (e) { // 获取滚动条当前位置
34 // console.log(e) 35 // console.log(e)
35 this.setData({ 36 this.setData({
@@ -39,100 +40,100 @@ Page({ @@ -39,100 +40,100 @@ Page({
39 goTop: function () { 40 goTop: function () {
40 app.goTop() 41 app.goTop()
41 }, 42 },
42 - getData() {  
43 - let that = this;  
44 - let url = '/portal/Api/listCategory';  
45 - // console.log(that.data.page);  
46 - // console.log(that.data.typeId);  
47 - let data = {  
48 - typeId: that.data.typeId,  
49 - page: that.data.page,  
50 - };  
51 - app.post(url, data).then((res) => {  
52 - console.log('res',res);  
53 - let data = [];  
54 - if(res.page == 1 && res.list.length == 0) {  
55 - that.setData({  
56 - jzSuccess: true,  
57 - jzSuccessContent: "暂无相关数据",  
58 - })  
59 - }else if(res.list.length < 10) {  
60 - that.setData({  
61 - caseList: that.data.caseList.concat(res.list),  
62 - jzSuccess: true,  
63 - jzSuccessContent: "已加载全部内容",  
64 - })  
65 - }else {  
66 - that.setData({  
67 - caseList: that.data.caseList.concat(res.list),  
68 - jzSuccess: false,  
69 - })  
70 - }  
71 - // data.  
72 -  
73 -  
74 -  
75 - }).catch((err) => {  
76 - console.log(err);  
77 - })  
78 - },  
79 - jumpFun(e) {  
80 - // console.log(e.currentTarget.dataset.id);  
81 - wx.navigateTo({  
82 - url: '../caseDetail/caseDetail?id=' + e.currentTarget.dataset.id  
83 - })  
84 - },  
85 -  
86 - /**  
87 - * 生命周期函数--监听页面初次渲染完成  
88 - */  
89 - onReady: function () {  
90 -  
91 - },  
92 -  
93 - /**  
94 - * 生命周期函数--监听页面显示  
95 - */  
96 - onShow: function () {  
97 -  
98 - },  
99 -  
100 - /**  
101 - * 生命周期函数--监听页面隐藏  
102 - */  
103 - onHide: function () {  
104 -  
105 - },  
106 -  
107 - /**  
108 - * 生命周期函数--监听页面卸载  
109 - */  
110 - onUnload: function () {  
111 -  
112 - },  
113 -  
114 - /**  
115 - * 页面相关事件处理函数--监听用户下拉动作  
116 - */  
117 - onPullDownRefresh: function () {  
118 -  
119 - },  
120 -  
121 - /**  
122 - * 页面上拉触底事件的处理函数  
123 - */  
124 - onReachBottom: function () {  
125 - var that = this;  
126 - that.setData({  
127 - page: that.data.page + 1  
128 - })  
129 - that.getData();  
130 - },  
131 -  
132 - /**  
133 - * 用户点击右上角分享  
134 - */  
135 - onShareAppMessage: function () {  
136 -  
137 - } 43 + getData() {
  44 + let that = this;
  45 + let url = '/portal/Api/listCategory';
  46 + // console.log(that.data.page);
  47 + // console.log(that.data.typeId);
  48 + let data = {
  49 + typeId: that.data.typeId,
  50 + page: that.data.page,
  51 + };
  52 + app.post(url, data).then((res) => {
  53 + console.log('res', res);
  54 + let data = [];
  55 + if (res.page == 1 && res.list.length == 0) {
  56 + that.setData({
  57 + jzSuccess: true,
  58 + jzSuccessContent: "暂无相关数据",
  59 + })
  60 + } else if (res.list.length < 10) {
  61 + that.setData({
  62 + caseList: that.data.caseList.concat(res.list),
  63 + jzSuccess: true,
  64 + jzSuccessContent: "已加载全部内容",
  65 + })
  66 + } else {
  67 + that.setData({
  68 + caseList: that.data.caseList.concat(res.list),
  69 + jzSuccess: false,
  70 + })
  71 + }
  72 + // data.
  73 +
  74 +
  75 +
  76 + }).catch((err) => {
  77 + console.log(err);
  78 + })
  79 + },
  80 + jumpFun(e) {
  81 + // console.log(e.currentTarget.dataset.id);
  82 + wx.navigateTo({
  83 + url: '../caseDetail/caseDetail?id=' + e.currentTarget.dataset.id
  84 + })
  85 + },
  86 +
  87 + /**
  88 + * 生命周期函数--监听页面初次渲染完成
  89 + */
  90 + onReady: function () {
  91 +
  92 + },
  93 +
  94 + /**
  95 + * 生命周期函数--监听页面显示
  96 + */
  97 + onShow: function () {
  98 +
  99 + },
  100 +
  101 + /**
  102 + * 生命周期函数--监听页面隐藏
  103 + */
  104 + onHide: function () {
  105 +
  106 + },
  107 +
  108 + /**
  109 + * 生命周期函数--监听页面卸载
  110 + */
  111 + onUnload: function () {
  112 +
  113 + },
  114 +
  115 + /**
  116 + * 页面相关事件处理函数--监听用户下拉动作
  117 + */
  118 + onPullDownRefresh: function () {
  119 +
  120 + },
  121 +
  122 + /**
  123 + * 页面上拉触底事件的处理函数
  124 + */
  125 + onReachBottom: function () {
  126 + var that = this;
  127 + that.setData({
  128 + page: that.data.page + 1
  129 + })
  130 + that.getData();
  131 + },
  132 +
  133 + /**
  134 + * 用户点击右上角分享
  135 + */
  136 + onShareAppMessage: function () {
  137 +
  138 + }
138 }) 139 })
@@ -24,11 +24,11 @@ @@ -24,11 +24,11 @@
24 <!-- 客服 --> 24 <!-- 客服 -->
25 <cover-view class='chat_peo'> 25 <cover-view class='chat_peo'>
26 <button open-type="contact" class='contacButton'> 26 <button open-type="contact" class='contacButton'>
27 - <cover-image src='http://pjq0ww1cj.bkt.clouddn.com/chat_peo.png'></cover-image> 27 + <cover-image src='{{baseImgUrl}}/chat_peo.png'></cover-image>
28 </button> 28 </button>
29 </cover-view> 29 </cover-view>
30 <!-- 返回顶部 --> 30 <!-- 返回顶部 -->
31 <cover-view class='chat_peo return_top' wx:if="{{scrollTop>minscreenHeight}}" bindtap='goTop'> 31 <cover-view class='chat_peo return_top' wx:if="{{scrollTop>minscreenHeight}}" bindtap='goTop'>
32 - <cover-image src='http://pjq0ww1cj.bkt.clouddn.com/dingbu.png'></cover-image> 32 + <cover-image src='{{baseImgUrl}}/dingbu.png'></cover-image>
33 </cover-view> 33 </cover-view>
34 </view> 34 </view>
@@ -17,6 +17,7 @@ Page({ @@ -17,6 +17,7 @@ Page({
17 connectButton: [ 17 connectButton: [
18 { className: "", text: "在线客服", bindtap: "" } 18 { className: "", text: "在线客服", bindtap: "" }
19 ], 19 ],
  20 + baseImgUrl: app.globalData.baseImgUrl,
20 }, 21 },
21 changeIndicatorDots(e) { 22 changeIndicatorDots(e) {
22 this.setData({ 23 this.setData({
@@ -4,28 +4,28 @@ @@ -4,28 +4,28 @@
4 4
5 <swiper-item> 5 <swiper-item>
6 <view class='imgPolytope'> 6 <view class='imgPolytope'>
7 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwang_zhutu1.png' class='index_zhutu'></image>  
8 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_1.png' class='image0 image01 heart01'></image>  
9 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_2.png' class='image0 image02 heart01'></image>  
10 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_3.png' class='image0 image03 heart01'></image>  
11 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_4.png' class='image0 image04 heart'></image>  
12 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_5.png' class='image0 image05 heart01'></image>  
13 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_6.png' class='image0 image06 heart02'></image>  
14 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_7.png' class='image0 image07 heart02'></image>  
15 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_8.png' class='image0 image08 heart02'></image>  
16 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_9.png' class='image0 image09 heart01'></image>  
17 - <image src='http://pjq0ww1cj.bkt.clouddn.com/ruiwangfangkuai_10.png' class='image0 image10 heart02'></image>  
18 - <image src='http://pjq0ww1cj.bkt.clouddn.com/fenxi.png' class='fenxi image0 heart'></image>  
19 - <image src='http://pjq0ww1cj.bkt.clouddn.com/guankong.png' class='guankong image0 heart'></image>  
20 - <image src='http://pjq0ww1cj.bkt.clouddn.com/jiaohu.png' class='jiaohu image0 heart'></image>  
21 - <image src='http://pjq0ww1cj.bkt.clouddn.com/xiezuo.png' class='xiezuo image0 heart'></image> 7 + <image src='{{baseImgUrl}}/ruiwang_zhutu1.png' class='index_zhutu'></image>
  8 + <image src='{{baseImgUrl}}/ruiwangfangkuai_1.png' class='image0 image01 heart01'></image>
  9 + <image src='{{baseImgUrl}}/ruiwangfangkuai_2.png' class='image0 image02 heart01'></image>
  10 + <image src='{{baseImgUrl}}/ruiwangfangkuai_3.png' class='image0 image03 heart01'></image>
  11 + <image src='{{baseImgUrl}}/ruiwangfangkuai_4.png' class='image0 image04 heart'></image>
  12 + <image src='{{baseImgUrl}}/ruiwangfangkuai_5.png' class='image0 image05 heart01'></image>
  13 + <image src='{{baseImgUrl}}/ruiwangfangkuai_6.png' class='image0 image06 heart02'></image>
  14 + <image src='{{baseImgUrl}}/ruiwangfangkuai_7.png' class='image0 image07 heart02'></image>
  15 + <image src='{{baseImgUrl}}/ruiwangfangkuai_8.png' class='image0 image08 heart02'></image>
  16 + <image src='{{baseImgUrl}}/ruiwangfangkuai_9.png' class='image0 image09 heart01'></image>
  17 + <image src='{{baseImgUrl}}/ruiwangfangkuai_10.png' class='image0 image10 heart02'></image>
  18 + <image src='{{baseImgUrl}}/fenxi.png' class='fenxi image0 heart'></image>
  19 + <image src='{{baseImgUrl}}/guankong.png' class='guankong image0 heart'></image>
  20 + <image src='{{baseImgUrl}}/jiaohu.png' class='jiaohu image0 heart'></image>
  21 + <image src='{{baseImgUrl}}/xiezuo.png' class='xiezuo image0 heart'></image>
22 </view> 22 </view>
23 <view class='index_title'> 23 <view class='index_title'>
24 <view class='title init' animation="{{slide_up1}}">数据分析及可视化</view> 24 <view class='title init' animation="{{slide_up1}}">数据分析及可视化</view>
25 <view class='content contentInit' animation="{{slide_up2}}">大数据探索商业价值的无限可能</view> 25 <view class='content contentInit' animation="{{slide_up2}}">大数据探索商业价值的无限可能</view>
26 </view> 26 </view>
27 <view class='drop_img heart'> 27 <view class='drop_img heart'>
28 - <image src='http://pjq0ww1cj.bkt.clouddn.com/drop.png'></image> 28 + <image src='{{baseImgUrl}}/drop.png'></image>
29 </view> 29 </view>
30 </swiper-item> 30 </swiper-item>
31 <!-- 第二屏 --> 31 <!-- 第二屏 -->
@@ -60,27 +60,27 @@ @@ -60,27 +60,27 @@
60 </view> 60 </view>
61 <view class='case_content'> 61 <view class='case_content'>
62 <view class='case_list' data-html="政府案例" data-id='1' bindtap='goFun'> 62 <view class='case_list' data-html="政府案例" data-id='1' bindtap='goFun'>
63 - <image src='http://pjq0ww1cj.bkt.clouddn.com/zhengfu.png'></image> 63 + <image src='{{baseImgUrl}}/zhengfu.png'></image>
64 <view class='case_list_text'>政府</view> 64 <view class='case_list_text'>政府</view>
65 </view> 65 </view>
66 <view class='case_list' data-html="地产案例" data-id='3' bindtap='goFun'> 66 <view class='case_list' data-html="地产案例" data-id='3' bindtap='goFun'>
67 - <image src='http://pjq0ww1cj.bkt.clouddn.com/dichan.png'></image> 67 + <image src='{{baseImgUrl}}/dichan.png'></image>
68 <view class='case_list_text'>地产</view> 68 <view class='case_list_text'>地产</view>
69 </view> 69 </view>
70 <view class='case_list' data-html="制造案例" data-id='2' bindtap='goFun'> 70 <view class='case_list' data-html="制造案例" data-id='2' bindtap='goFun'>
71 - <image src='http://pjq0ww1cj.bkt.clouddn.com/zhizao.png'></image> 71 + <image src='{{baseImgUrl}}/zhizao.png'></image>
72 <view class='case_list_text'>制造</view> 72 <view class='case_list_text'>制造</view>
73 </view> 73 </view>
74 <view class='case_list' data-html="教育案例" data-id='5' bindtap='goFun'> 74 <view class='case_list' data-html="教育案例" data-id='5' bindtap='goFun'>
75 - <image src='http://pjq0ww1cj.bkt.clouddn.com/jiaoyu.png'></image> 75 + <image src='{{baseImgUrl}}/jiaoyu.png'></image>
76 <view class='case_list_text'>教育</view> 76 <view class='case_list_text'>教育</view>
77 </view> 77 </view>
78 <view class='case_list' data-html="物流案例" data-id='4' bindtap='goFun'> 78 <view class='case_list' data-html="物流案例" data-id='4' bindtap='goFun'>
79 - <image src='http://pjq0ww1cj.bkt.clouddn.com/jinrong.png'></image> 79 + <image src='{{baseImgUrl}}/jinrong.png'></image>
80 <view class='case_list_text'>物流</view> 80 <view class='case_list_text'>物流</view>
81 </view> 81 </view>
82 <view class='case_list' data-html="零售案例" data-id='6' bindtap='goFun'> 82 <view class='case_list' data-html="零售案例" data-id='6' bindtap='goFun'>
83 - <image src='http://pjq0ww1cj.bkt.clouddn.com/lingshou.png'></image> 83 + <image src='{{baseImgUrl}}/lingshou.png'></image>
84 <view class='case_list_text'>零售</view> 84 <view class='case_list_text'>零售</view>
85 </view> 85 </view>
86 </view> 86 </view>
@@ -92,7 +92,7 @@ @@ -92,7 +92,7 @@
92 <!-- 客服 --> 92 <!-- 客服 -->
93 <view class='chat_peo'> 93 <view class='chat_peo'>
94 <button open-type="contact" class='contacButton'> 94 <button open-type="contact" class='contacButton'>
95 - <image src='http://pjq0ww1cj.bkt.clouddn.com/chat_peo.png'></image> 95 + <image src='{{baseImgUrl}}/chat_peo.png'></image>
96 </button> 96 </button>
97 </view> 97 </view>
98 98