Browse Source

景区舒适度

master
jiazhipeng 11 months ago
parent
commit
c93b64cdb1
  1. 1
      app.json
  2. 2
      pages/activity/year2020/index.js
  3. 4
      pages/component/TitleHeader.js
  4. 2
      pages/kj/info/index.js
  5. 10
      pages/login/index.js
  6. 129
      pages/pbService/aiHelpYou/index.js
  7. 3
      pages/pbService/aiHelpYou/index.json
  8. 4
      pages/pbService/aiHelpYou/index.wxml
  9. 1
      pages/pbService/aiHelpYou/index.wxss
  10. 2
      pages/pbService/sceneComfort/index.js
  11. 14
      pages/pbService/sceneComfort/index.wxml
  12. 2
      pages/user/bindtel/index.js
  13. 4
      utils/https.js

1
app.json

@ -2,6 +2,7 @@
"pages": [
"pages/index/index",
"pages/map/index",
"pages/pbService/aiHelpYou/index",
"pages/search/index",
"pages/search/list/index",
"pages/login/index",

2
pages/activity/year2020/index.js

@ -98,7 +98,7 @@ Page({
util.gotoDetail(item)
},
home:function(){
wx.reLaunch({
wx.switchTab({
url: '/pages/index/index',
})
},

4
pages/component/TitleHeader.js

@ -65,7 +65,7 @@ Component({
})
}
else {
wx.reLaunch({
wx.switchTab({
url: "/pages/index/index"
})
}
@ -108,7 +108,7 @@ Component({
})
}
else {
wx.reLaunch({
wx.switchTab({
url: "/pages/index/index"
})
}

2
pages/kj/info/index.js

@ -105,7 +105,7 @@ Page({
})
}
else {
wx.reLaunch({
wx.switchTab({
url: '/pages/index/index',
})
}

10
pages/login/index.js

@ -42,7 +42,7 @@ Page({
},
cancel:function(){
util.pagePoint({event:this.data.event+'cancel'},1)
wx.reLaunch({
wx.switchTab({
url: '/pages/index/index',
})
},
@ -74,7 +74,7 @@ Page({
let that = this;
if (e.detail && (!e.detail.userInfo)){
wx.reLaunch({
wx.switchTab({
url: '/pages/index/index',
})
return;
@ -110,18 +110,18 @@ Page({
}
else {
console.log('看这里看这里看这里')
wx.reLaunch({
wx.switchTab({
url:"/pages/index/index"
})
}
}).catch(err=>{
wx.reLaunch({
wx.switchTab({
url:"/pages/index/index"
})
})
},
fail:function(){
wx.reLaunch({
wx.switchTab({
url:"/pages/index/index"
})
}

129
pages/pbService/aiHelpYou/index.js

@ -0,0 +1,129 @@
// pages/pbService/web/index.js
let app = getApp()
import commonApi from "../../../utils/https/common"
import userApi from "../../../utils/https/user"
import https from "../../../utils/https.js"
Page({
/**
* 页面的初始数据
*/
data: {
webUrl:"",
shareTitle: "",
shareUrl: "",
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let weburl = 'https://test.m.cloud.sz-trip.com/aiPlay'
let token = wx.getStorageSync('jstrip_token')
if (token) {
weburl += '?token='+token
}
let _this = this
try {
let lonAndLat = (wx.getStorageSync('lonAndLat'))
if (lonAndLat && JSON.parse(lonAndLat)) {
lonAndLat = JSON.parse(lonAndLat)
if (Object.keys(webParam).length>0 || token) {
weburl+=`&lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
} else {
weburl+=`?lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
}
this.setUrl(weburl)
return
} else {
wx.getLocation({
type: 'gcj02',
success: (res) => {
let lonAndLat = JSON.stringify({lat: res.latitude,lon: res.longitude})
wx.setStorageSync('lonAndLat', lonAndLat)
if (Object.keys(webParam).length>0 || token) {
weburl+=`&lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
} else {
weburl+=`?lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
}
_this.setUrl(weburl)
},
fail: (err) => {
_this.setUrl(weburl)
}
})
}
} catch(e) {
this.setUrl(weburl)
}
},
handleMessage(data) {
console.log('打印22222',data);
},
setUrl (url) {
this.setData({
webUrl:url
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return {
title: this.data.shareTitle,
path: `/pages/pbService/web/index?weburl=${encodeURIComponent(this.data.webUrl)}`,
}
},
onShareTimeline: function() {
return {
title: this.data.shareTitle,
path: `/pages/pbService/web/index?weburl=${encodeURIComponent(this.data.webUrl)}`,
}
}
})

3
pages/pbService/aiHelpYou/index.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

4
pages/pbService/aiHelpYou/index.wxml

@ -0,0 +1,4 @@
<!--pages/pbService/web/index.wxml-->
<view wx:if="{{webUrl}}">
<web-view src="{{webUrl}}" bindmessage="handleMessage"></web-view>
</view>

1
pages/pbService/aiHelpYou/index.wxss

@ -0,0 +1 @@
/* pages/pbService/web/index.wxss */

2
pages/pbService/sceneComfort/index.js

@ -112,7 +112,7 @@ Page({
commonApi._post("pbservice/Comfort/getComfort",{
scene_name:this.data.keywords,
comfort_level:this.data.comfortIndex>0?this.data.comfortLevel[this.data.comfortIndex].level:null,
area_key:this.data.areaIndex>0?this.data.areas[this.data.areaIndex].area_code:null,
area_key:this.data.areaIndex>0?this.data.areas[this.data.areaIndex].area_name:null,
page_no:this.data.pageNo,
page_num:10,
scene_level:this.data.sceneLevelIndex>0?this.data.sceneLevel[this.data.sceneLevelIndex].level:null

14
pages/pbService/sceneComfort/index.wxml

@ -31,7 +31,7 @@
<view style="height:200rpx"></view>
<view class="comfort-levels">
<text>舒适度:</text>
<text style="color: #0B898E;">舒适度:</text>
<view wx:if="{{index!=0}}" style="color:{{item.color}}" wx:for="{{comfortLevel}}" class="comfort-level">{{item.desc}}</view>
</view>
<view style="padding-top: 25rpx;" class="comfort-levels" wx:if="{{list[0]}}">更新时间:{{list[0].status_time}}</view>
@ -42,7 +42,7 @@
<text style="height: fit-content;padding-left: 20rpx;">景区舒适度</text>
</view>
<view class="comfort-content">
<view class="comfort-content" wx:if="{{list.length>0}}">
<view class="ai-tip">
<image style="width: 27.67rpx;height: 27.67rpx;" src="https://static.ticket.sz-trip.com/uploads/20250527/c3513e7eb0c43ece5f47a8f044063b64.png"></image>
<text style="padding-left: 12rpx;">本预测趋势图由AI生成,内容仅供参考。</text>
@ -71,22 +71,16 @@
<view style="flex: 1;flex-shrink: 0;">
<view class="comft">
<view>未来一小时:</view>
<view class="two" style="color: {{item.comforLevel.color}};">{{item.comforLevel.desc}}</view>
<view class="two" style="color: {{item.hourflowLeve.color}};">{{item.hourflowLeve.desc}}</view>
</view>
<view class="progress-item">
<progress percent="{{item.hour_flow/item.max_carry_capacity * 100}}" color="{{item.comforLevel.color}}" stroke-width="{{20 * radio}}" border-radius="{{10 * radio}}"></progress>
<progress percent="{{item.hour_flow/item.max_carry_capacity * 100}}" color="{{item.hourflowLeve.color}}" stroke-width="{{20 * radio}}" border-radius="{{10 * radio}}"></progress>
</view>
</view>
</view>
<view class="other-tip">
<text>更新时间:{{item.status_time}}</text>
</view>
</view>
</view>

2
pages/user/bindtel/index.js

@ -31,7 +31,7 @@ Page({
})
},
cancel:function(){
wx.reLaunch({
wx.switchTab({
url: '/pages/index/index',
})
},

4
utils/https.js

@ -1,8 +1,8 @@
var app = getApp();
import util from "../utils/util"
// import userApi from "../utils/https/user.js";
// const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
let baseUrl = "https://api.cloud.sz-trip.com/api/";
const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
// let baseUrl = "https://api.cloud.sz-trip.com/api/";
const env = wx.getAccountInfoSync().miniProgram.envVersion
if (env == 'develop1') {
baseUrl = "https://test.api.cloud.sz-trip.com/api/"

Loading…
Cancel
Save