From eddc2cf6ac49372cd66a2cf214fceeb8d7faa5a5 Mon Sep 17 00:00:00 2001 From: Myth Date: Fri, 19 Nov 2021 14:41:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BA=A2=E8=89=B2=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 1 + pages/info/redmapInfo/index.js | 93 +++++++++++++++++++++++++ pages/info/redmapInfo/index.json | 5 ++ pages/info/redmapInfo/index.wxml | 35 ++++++++++ pages/info/redmapInfo/index.wxss | 83 ++++++++++++++++++++++ pages/map/index.js | 6 ++ pages/map/index.wxml | 2 +- pages/order/components/contact/index.js | 2 +- project.private.config.json | 4 +- utils/https.js | 5 +- 10 files changed, 230 insertions(+), 6 deletions(-) create mode 100644 pages/info/redmapInfo/index.js create mode 100644 pages/info/redmapInfo/index.json create mode 100644 pages/info/redmapInfo/index.wxml create mode 100644 pages/info/redmapInfo/index.wxss diff --git a/app.json b/app.json index 60bd63e..3d43ed5 100644 --- a/app.json +++ b/app.json @@ -40,6 +40,7 @@ "pages/info/guideInfo/index", "pages/info/groupOrderInfo/index", "pages/info/culturalUnitInfo/index", + "pages/info/redmapInfo/index", "pages/user/user", "pages/user/retail/index", "pages/user/retail/apply/index", diff --git a/pages/info/redmapInfo/index.js b/pages/info/redmapInfo/index.js new file mode 100644 index 0000000..a507915 --- /dev/null +++ b/pages/info/redmapInfo/index.js @@ -0,0 +1,93 @@ +// pages/info/redmapInfo/index.js +// pages/info/culturalUnitInfo/index.js +import commonApi from "../../../utils/https/common" +Page({ + + /** + * 页面的初始数据 + */ + data: { + info:null, + currentIndex:0, + top:0, + htmls:[] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let rect = wx.getMenuButtonBoundingClientRect(),device = wx.getSystemInfoSync(); + let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight; + this.setData({ + top:height + }) + commonApi._post("pbservice/Actcalendar/getRedMapDetail",{ + id:options.id + }).then(res=>{ + res.data.list_img = res.data.list_img?res.data.list_img.split(","):[] + if(res.data.list_img.length==0 && res.data.head_img){ + res.data.list_img.push(res.data.head_img) + } + let htmls = res.data.content?res.data.content.split('
'):[] + this.setData({ + info:res.data, + htmls:htmls + }) + }) + }, + changeSlide(e){ + this.setData({ + currentIndex:e.detail.current + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/info/redmapInfo/index.json b/pages/info/redmapInfo/index.json new file mode 100644 index 0000000..35cf02f --- /dev/null +++ b/pages/info/redmapInfo/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "title":"/pages/component/TitleHeader" + } +} \ No newline at end of file diff --git a/pages/info/redmapInfo/index.wxml b/pages/info/redmapInfo/index.wxml new file mode 100644 index 0000000..67a8fc7 --- /dev/null +++ b/pages/info/redmapInfo/index.wxml @@ -0,0 +1,35 @@ + + + + + + + {{info.title}} + + + 地址:{{info.address}} + + + + 电话:{{info.mobile}} + + + + + + + + + + + + + {{info.company_name}} + + + + + + + + \ No newline at end of file diff --git a/pages/info/redmapInfo/index.wxss b/pages/info/redmapInfo/index.wxss new file mode 100644 index 0000000..675868e --- /dev/null +++ b/pages/info/redmapInfo/index.wxss @@ -0,0 +1,83 @@ +/* pages/pbService/museum/info/index.wxss */ +.bg { + background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/infobg.png); + background-size: 100% 100%; + position: absolute; + left: 0; + right: 0; + bottom: 0; +} +.title { + display: flex; + align-items: flex-end; + height: 190rpx; + color: #0B898E; + font-size: 48rpx; + font-weight: bold; + margin-left: 40rpx; + margin-bottom: 20rpx; +} +.infoline1 { + display: block; + width: 720rpx; + position: absolute; + left: 0; + top: 190rpx; +} +.page { + width: 100%; + height: 100%; +} +.address { + display: flex; + align-items: center; + font-size: 28rpx; + color: #333333; + padding: 18rpx 0; +} +.address image { + display: block; + flex-shrink: 0; + margin-left: 38rpx; + width: 30rpx; + height: 30rpx; + margin-right: 16rpx; +} +.infoline3,.infoline2,.infoarrow { + position: absolute; + width: 250rpx; + bottom: 47rpx; + display: block; +} +.infoline3 { + right: 0; +} +.infoline2 { + left: 0; +} +.infoarrow { + width: 60rpx; + bottom: 26rpx; + left: 50%; + margin-left: -30rpx; + +} +.infoarrow.ani { + -webkit-animation: bounce-down 1.6s linear infinite;animation: bounce-down 1.6s linear infinite; +} +.detail { + display: block; + margin: 20rpx 30rpx; + font-size: 30rpx; +} +@keyframes bounce-down { + 25% {transform: translateY(-10rpx);opacity:0.3;} + 50%{transform: translateY(0);opacity:1;} + 75% {transform: translateY(10rpx);opacity:1;} + 100% {transform: translateY(0);opacity:1;} +} +.title2 { + font-size: 36rpx; + height: 126rpx; + margin-bottom: 0; +} \ No newline at end of file diff --git a/pages/map/index.js b/pages/map/index.js index 9e1fd4e..f679038 100644 --- a/pages/map/index.js +++ b/pages/map/index.js @@ -84,6 +84,12 @@ Page({ url: '/pages/pbService/wbdw/info/index?id='+this.data.info.info.id, }) } + else if(this.data.info.info.type=='red_map'){ + // 红色地图 + wx.navigateTo({ + url: '/pages/info/redmapInfo/index?id='+this.data.info.info.id, + }) + } else if(this.data.info.info.type=='restaurant' || this.data.info.info.type=='tenscenic'){ wx.navigateTo({ url: '/pages/info/foodInfo/index?id='+this.data.info.info.id, diff --git a/pages/map/index.wxml b/pages/map/index.wxml index 23aafcd..d74c8cb 100644 --- a/pages/map/index.wxml +++ b/pages/map/index.wxml @@ -57,7 +57,7 @@ {{info.info.title}} 地址:{{info.info.address}} - 查看详情 + 查看详情 diff --git a/pages/order/components/contact/index.js b/pages/order/components/contact/index.js index 15f3032..709e918 100644 --- a/pages/order/components/contact/index.js +++ b/pages/order/components/contact/index.js @@ -219,7 +219,7 @@ Component({ wx.hideLoading() }, selectIt:function(e){ - let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList,num = 0,traveller_limit_num = this.properties.maxNum!=-1?this.properties.maxNum:(app.globalData.product.sku.sku_model?app.globalData.product.sku.sku_model.traveller_limit_num:-1); + let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList,num = 0,traveller_limit_num = this.properties.maxNum!=-1?this.properties.maxNum:(app.globalData.product.sku.sku_model && app.globalData.product.sku.sku_model.limit_type!=0?app.globalData.product.sku.sku_model.traveller_limit_num:-1); // 先计算出全部选中的出行人 linkmanList.map(linkman=>{ if(linkman.selected==1){ diff --git a/project.private.config.json b/project.private.config.json index ef3055e..cc76cd2 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -19,8 +19,8 @@ "scene": null }, { - "name": "pages/pbService/group/index", - "pathName": "pages/pbService/group/index", + "name": "pages/kj/index", + "pathName": "pages/kj/index", "query": "id=59532108251510343335", "scene": null }, diff --git a/utils/https.js b/utils/https.js index fc1d46c..62e53c5 100644 --- a/utils/https.js +++ b/utils/https.js @@ -1,6 +1,6 @@ var app = getApp(); import util from "../utils/util" -import userApi from "../utils/https/user.js"; +// import userApi from "../utils/https/user.js"; // const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; const baseUrl = "https://api.cloud.sz-trip.com/api/"; const orders = ['','weight','distance','sale_number','sale_price','price']; @@ -110,11 +110,11 @@ function user_post(url,data={}){ _post("/uservice/user/loginWithUserCenterAuthCode",{ auth_code:wx.getStorageSync('authCode') }).then(res=>{ + wx.removeStorageSync('authCode') if(res && res.data){ wx.setStorageSync('jstrip_userid', res.data.id) wx.setStorageSync('jstrip_token', res.data.token) wx.setStorageSync('jstrip_userInfo', res.data) - wx.removeStorageSync('authCode') } user_post_new(url,data).then(res=>{ resolved(res) @@ -122,6 +122,7 @@ function user_post(url,data={}){ rejected(err) }) }).catch(err=>{ + wx.removeStorageSync('authCode') user_post_new(url,data).then(res=>{ resolved(res) }).catch(err=>{