Browse Source

更新下

master
Myth 5 years ago
parent
commit
c18f209d03
  1. 1
      app.js
  2. 2
      app.json
  3. 151
      pages/activity/autumnten/index.js
  4. 5
      pages/activity/autumnten/index.json
  5. 38
      pages/activity/autumnten/index.wxml
  6. 202
      pages/activity/autumnten/index.wxss
  7. 138
      pages/activity/autumnten/list/index.js
  8. 5
      pages/activity/autumnten/list/index.json
  9. 12
      pages/activity/autumnten/list/index.wxml
  10. 54
      pages/activity/autumnten/list/index.wxss
  11. 17
      pages/activity/huawei/list/index.js
  12. 6
      pages/activity/huawei/list/index.wxml
  13. 2
      pages/activity/springten/index.wxml
  14. 9
      pages/index/index.js
  15. 11
      pages/info/activityInfo/index.wxml
  16. 51
      pages/info/activityInfo/index.wxss
  17. 2
      pages/info/strategyInfo/index.wxss
  18. 1
      pages/pbService/group/index.wxml
  19. 4
      pages/pbService/index.wxml
  20. 26
      pages/pbService/web/index.js
  21. 2
      project.config.json
  22. 6
      project.private.config.json
  23. 18
      utils/https.js

1
app.js

@ -9,6 +9,7 @@ App({
commonApi._post("browse/get_uuid",{}).then(res=>{
// console.log('uuid',res);
this.globalData.uuid = res.data.uuid;
wx.setStorageSync('uuid', res.data.uuid)
})
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []

2
app.json

@ -133,7 +133,9 @@
"pages/activity/suyear/index",
"pages/activity/spring2021/index",
"pages/activity/springten/list/index",
"pages/activity/autumnten/list/index",
"pages/activity/springten/index",
"pages/activity/autumnten/index",
"pages/activity/newarrival/index",
"pages/activity/artfestival/index",
"pages/activity/redlist/index",

151
pages/activity/autumnten/index.js

@ -0,0 +1,151 @@
// pages/activity/springten/index.js
import commonApi from "../../../utils/https/common"
import util from "../../../utils/util"
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
types:['必赏','必吃','必游','必玩','必购','必住','赏夜戏','品夜饮','尝夜宴','逛夜市'],
type:0,
list:[],
total:1,
areas:[],
areaIndex:-1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 获取当前定位
commonApi._post("act/get_suzhou_areas").then(res=>{
res.data.unshift({
area_id:"",
area_title:"苏州"
})
this.setData({
areas:res.data,
areaIndex:0
})
})
this.getList()
},
changeArea:function(e){
this.setData({
areaIndex:e.detail.value,
list:[],
total:1
})
this.getList();
},
changeType:function(e){
this.setData({
type:e.currentTarget.dataset.type,
list:[],
total:1
})
this.getList();
},
getList:function(){
if(this.data.total<=this.data.list.length) return;
commonApi._post("scene/get_scene_by_tag",{
offset:this.data.list.length,
limit:30,
tag_id:this.data.type!=0?161+Number(this.data.type):171,
area_id:this.data.areaIndex>-1?this.data.areas[this.data.areaIndex].area_id:null
}).then(res=>{
res.data.list.map(item=>{
if(item.type && item.type.indexOf('tenscenic')!=-1){
item.isYunHe = true;
}
else {
item.isYunHe = false;
}
item.brief_intro = item.brief_intro?item.brief_intro.replace(/<\/?.+?>/g,""):"";
item.display_tags = item.display_tags?item.display_tags.split(","):[];
item.display_tags = item.display_tags.splice(0,2);
})
this.setData({
list:this.data.list.concat(res.data.list),
total:res.data.count
})
})
},
gotoWeb:function(e){
let item = e.currentTarget.dataset.item;
app.globalData.weburl = item.ext_link;
wx.navigateTo({
url: '/pages/pbService/web/index',
})
},
gotoDetail:function(e){
let item = e.currentTarget.dataset.item;
util.gotoDetail(item)
},
gotoLocation:function(e){
let item = e.currentTarget.dataset.item;
wx.openLocation({
latitude: item.lat,
longitude: item.lon,
name:item.title,
address:item.address
})
},
gotoFoodInfo:function(e){
let item = e.currentTarget.dataset.item;
wx.navigateTo({
url: '/pages/info/foodInfo/index?id='+item.id,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
// this.getList()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/activity/autumnten/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

38
pages/activity/autumnten/index.wxml

@ -0,0 +1,38 @@
<!--pages/activity/springten/index.wxml-->
<title title="苏州游必选榜"></title>
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/autumnten/top.png" mode="widthFix" class="top-img"></image>
<picker mode="selector" value="{{areaIndex}}" range="{{areas}}" range-key="area_title" bindchange="changeArea">
<view class="picker">
<view class="areatext">{{areas[areaIndex].area_title}}</view>
<view class="iconfont icon-xia"></view>
</view>
</picker>
<view class="type-icons">
<view wx:for="{{types}}" bindtap="changeType" data-type="{{index}}" class="type-icon {{type==index?'type-icon-active':''}}">
<image mode="widthFix" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/autumnten/bg{{type==index?'1':''}}.png"></image>
<view class="icon-text">{{item}}</view>
</view>
</view>
<view style="height:13rpx"></view>
<view class="list" style="padding-bottom:30rpx">
<view class="item-box" wx:for="{{list}}">
<view class="item-bg"></view>
<image mode="widthFix" class="lefticon" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/autumnten/lefticon.png"></image>
<image mode="widthFix" class="righticon" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/autumnten/righticon.png"></image>
<view class="item">
<view class="item-in">
<image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="item-info">
<view class="item-title textOver">{{item.title}}</view>
<view class="item-result textOver">上榜理由:{{item.brief_intro}}</view>
<view class="item-address textOver">地址:{{item.address}}</view>
</view>
</view>
<view class="item-btn" bindtap="gotoLocation" data-item="{{item}}" wx:if="{{item.is_nav}}">打开导航</view>
<view class="item-btn" bindtap="gotoFoodInfo" data-item="{{item}}" wx:elif="{{item.isYunHe}}">查看详情</view>
<view bindtap="gotoDetail" data-item="{{item}}" class="item-btn" wx:else>立即预订</view>
</view>
</view>
<!-- <view class="nomore" wx:if="{{list.length>=total || list.length==0}}">—— 没有更多了 ——</view> -->
</view>
<navigator wx:if="{{total>30}}" class="btn" url="list/index?type={{type}}&area_id={{areas[areaIndex].area_id}}">查看更多</navigator>

202
pages/activity/autumnten/index.wxss

@ -0,0 +1,202 @@
/* pages/activity/springten/index.wxss */
page {
background: #fffce8;
}
.top-img {
display: block;
width: 100%;
position: absolute;
left: 0;
z-index: 0;
}
.type-icons {
position: relative;
z-index: 1;
margin: 0 20rpx;
margin-top: 357rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.type-icon {
width: 131rpx;
height: 109rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 28rpx;
color: #fff;
font-weight: 500;
position: relative;
margin-top: 20rpx;
}
.type-icon-active {
color: #000;
}
.icon-text {
position: absolute;
left: 0;
top: 0;
right: 0;
/* bottom: 20rpx; */
line-height: 88rpx;
z-index: 1;
}
.type-icon image {
width: 131rpx;
height: 109rpx;
}
.type-icon-active image {
width: 131rpx;
height: 109rpx;
}
.list {
/* background:url(https://m.cloud.sz-trip.com/static/images/activity/topten/hua0326.png) repeat-y; */
background-size: 100%;
}
.item-box {
margin: 0 20rpx;
padding-top: 23rpx;
margin-top: 20rpx;
position: relative;
width: 710rpx;
height: 200rpx;
}
.item-bg {
position: absolute;
left: 0;
right: 0;
width: 710rpx;
height: 183rpx;
background: #F59224;
border-radius: 13rpx;
top: 20rpx;
transform: rotate(2deg);
}
.lefticon,.righticon {
position: absolute;
top: 0;
margin-top: -30rpx;
display: block;
width: 53rpx;
}
.lefticon {
margin-left: -10rpx;
}
.righticon {
width: 42rpx;
right: 0;
margin-right: -10rpx;
margin-top: -20rpx;
}
.item {
background: white;
position: relative;
z-index: 1;
height: 177rpx;
width: 700rpx;
margin: 0 5rpx;
border-radius: 13rpx;
}
.nomore {
margin-top: 50rpx;
line-height: 50rpx;
font-size: 23rpx;
text-align: center;
}
.item-in {
display: flex;
padding: 20rpx;
justify-content: space-between;
}
.item-in image {
width: 199rpx;
height: 133rpx;
display: block;
flex-shrink: 0;
}
.item-info {
flex: 1;
width: 351rpx;
margin-left: 30rpx;
}
.item-title {
font-size: 35rpx;
font-weight: bold;
}
.item-tags {
display: flex;
margin-top: 30rpx;
margin-bottom: 18rpx;
font-size: 24rpx;
}
.item-tags .tag {
line-height: 36rpx;
background: linear-gradient(0deg, #BE8CDF, #724796);
border-radius: 7rpx;
color: #fff;
padding: 0 13rpx;
margin-right: 12rpx;
}
.item-tags .tag:last-child {
margin-right: 0;
}
.item-address {
font-size: 23rpx;
color: #666666;
width: 280rpx;
}
.item-result {
font-size: 25rpx;
color: #E06400;
margin:10rpx 0
}
.item-btn {
position: absolute;
right: 20rpx;
bottom: 12rpx;
width: 160rpx;
line-height: 50rpx;
background: linear-gradient(180deg, #ED9C4D, #F9750A);
text-align: center;
color: #fff;
font-size: 29rpx;
border-radius: 27rpx;
}
.item-result span {
font-size: 25rpx !important;
}
.picker {
position: fixed;
right: 30rpx;
margin-top: 30rpx;
z-index: 2;
display: flex;
align-items: center;
width: 105rpx;
height: 52rpx;
border-radius: 26rpx;
justify-content: center;
background: #FFFFFF;
font-size: 27rpx;
border: 1rpx solid #333;
}
.picker .iconfont {
font-size: 20rpx;
margin-bottom: 4rpx;
margin-left: 4rpx;
}
.areatext {
}
.btn {
width: 220rpx;
line-height: 57rpx;
text-align: center;
background: #FFFFFF;
border: 1rpx solid #999999;
border-radius: 29rpx;
color: #333;
font-size: 23rpx;
margin: 40rpx auto;
}

138
pages/activity/autumnten/list/index.js

@ -0,0 +1,138 @@
// pages/activity/springten/list/index.js
import commonApi from "../../../../utils/https/common"
import util from "../../../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
types:['必赏','必吃','必游','必玩','必购','必住','赏夜戏','品夜饮','尝夜宴','逛夜市'],
type:0,
list:[],
area_id:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
type:options.type,
area_id:options.area_id
})
this.getList();
},
getList:function(){
if(this.data.total<=this.data.list.length) return;
commonApi._post("scene/get_scene_by_tag",{
offset:this.data.list.length,
limit:30,
tag_id:this.data.type!=0?17+Number(this.data.type):27,
area_id:this.data.area_id
}).then(res=>{
res.data.list.map(item=>{
if(item.type && item.type.indexOf('tenscenic')!=-1){
item.isYunHe = true;
}
else {
item.isYunHe = false;
}
item.brief_intro = item.brief_intro.replace(/<\/?.+?>/g,"");
item.display_tags = item.display_tags?item.display_tags.split(","):[];
item.display_tags = item.display_tags.splice(0,2);
})
this.setData({
list:this.data.list.concat(res.data.list),
total:res.data.count
})
})
},
detail:function(e){
let item = e.currentTarget.dataset.item;
if(item.is_nav){
this.gotoLocation(e);
}
else if(item.type && item.type.indexOf('tenscenic')!=-1){
this.gotoFoodInfo(e)
}
else {
this.gotoDetail(e)
}
},
gotoWeb:function(e){
let item = e.currentTarget.dataset.item;
app.globalData.weburl = item.ext_link;
wx.navigateTo({
url: '/pages/pbService/web/index',
})
},
gotoDetail:function(e){
let item = e.currentTarget.dataset.item;
util.gotoDetail(item)
},
gotoLocation:function(e){
let item = e.currentTarget.dataset.item;
wx.openLocation({
latitude: item.lat,
longitude: item.lon,
name:item.title,
address:item.address
})
},
gotoFoodInfo:function(e){
let item = e.currentTarget.dataset.item;
wx.navigateTo({
url: '/pages/info/foodInfo/index?id='+item.id,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.getList()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/activity/autumnten/list/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

12
pages/activity/autumnten/list/index.wxml

@ -0,0 +1,12 @@
<!--pages/activity/springten/list/index.wxml-->
<title title="{{types[type]}}榜单"></title>
<view wx:for="{{list}}" bindtap="detail" data-item="{{item}}" class="item-box">
<view class="item-bg"></view>
<view class="item">
<view style="flex:1;width:500rpx">
<view class="title textOver">{{item.title}}</view>
<view class="address textOver"><text class="iconfont icon-location"></text>{{item.address}}</view>
</view>
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/autumnten/btn.png" mode="aspectFill"></image>
</view>
</view>

54
pages/activity/autumnten/list/index.wxss

@ -0,0 +1,54 @@
/* pages/activity/springten/list/index.wxss */
.item {
width: 626rpx;
display: flex;
background: white;
/* background:url(https://static.ticket.sz-trip.com/uploads/20210401/09b3cdf766827f3194a021511cf33030.png); */
height: 116rpx;
padding: 0 30rpx;
align-items: center;
justify-content: space-between;
background-size: 100% 100%;
position: relative;
z-index: 1;
border-radius: 13rpx;
}
.item-bg {
background: #F59224;
border-radius: 13rpx;
top: 20rpx;
transform: rotate(2deg);
position: absolute;
left: 25rpx;
right: 25rpx;
top: 0;
/* height: 130rpx; */
bottom: 0;
}
.item-box {
position: relative;
height: 130rpx;
margin: 50rpx 0;
display: flex;
align-items: center;
justify-content: center;
}
.item image {
width: 86rpx;
height: 86rpx;
display: block;
flex-shrink: 0;
}
.item .title {
font-size: 32rpx;
font-weight: bold;
}
.item .address {
color: #666;
font-size: 24rpx;
margin-top: 8rpx;
}
.item .iconfont {
font-size: 24rpx;
margin-right: 4rpx;
}

17
pages/activity/huawei/list/index.js

@ -1,5 +1,6 @@
// pages/activity/huawei/list/index.js
import commonApi from "../../../../utils/https/common"
let app = getApp()
Page({
/**
@ -26,11 +27,12 @@ Page({
if(options.user_id){
let user_id = wx.getStorageSync('jstrip_userid');
if(user_id!=options.user_id){
this.setData({
user_id:options.user_id
app.globalData.weburl = 'https://m.cloud.sz-trip.com/photoWorksDetail?id='+options.id+'&type_id='+options.type_id
wx.redirectTo({
url: '/pages/pbService/web/index'
})
return;
}
}
commonApi.user_post("actonline/act_online/isSign",{id:options.id}).then(res=>{
if(res.code==1){
@ -192,9 +194,16 @@ Page({
if(this.data.list.length>0){
return {
title:"帮我投一票吧~",
path:"/pages/activity/huawei/list/index?id="+this.data.id+"&user_id="+this.data.list[0].user.id,
path:'/pages/activity/huawei/list/index?id='+this.data.list[0].act_online_id+'&type_id='+this.data.list[0].act_online_type+'&user_id='+this.data.list[0].user.id+'&did='+this.data.list[0].id,
imageUrl:this.data.list[0].img
}
}
else {
return {
title:"君到苏州摄影大赛作品",
path:"/pages/pbService/web/index?url="+encodeURIComponent('https://m.cloud.sz-trip.com/photoWorksList?id=6'),
imageUrl:"https://m.cloud.sz-trip.com/static/images/logobai.png"
}
}
}
})

6
pages/activity/huawei/list/index.wxml

@ -25,13 +25,13 @@
{{list[0].desc}}
</view>
<view wx:if="{{!user_id}}" class="rule-btn" bindtap="showRule">规则</view>
<image wx:if="{{!user_id}}" style="width:646rpx" bindtap="reUpload" class="btnimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/reupload.png" mode="widthFix"></image>
<!-- <image wx:if="{{!user_id}}" style="width:646rpx" bindtap="reUpload" class="btnimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/reupload.png" mode="widthFix"></image> -->
<view wx:if="{{!user_id}}" style="height:50rpx"></view>
</view>
<view wx:else>
<image class="emptyimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/emptyimg.png" mode="widthFix"></image>
<view class="tip1">您还未上传作品,快去上传吧!</view>
<image bindtap="gotoUpload" class="btnimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadbtn.png" mode="widthFix"></image>
<view class="tip1">投票已开始,无法上传作品!</view>
<!-- <image bindtap="gotoUpload" class="btnimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadbtn.png" mode="widthFix"></image> -->
</view>
<view class="mask" wx:if="{{detail && showRuleFlag}}">
<view bindtap="showRule" class="mask-bg"></view>

2
pages/activity/springten/index.wxml

@ -14,7 +14,7 @@
</view>
</view>
<view style="height:13rpx"></view>
<view class="list">
<view class="list" style="padding-bottom:30rpx">
<view class="item" wx:for="{{list}}">
<view class="item-in">
<image src="{{item.headimg}}" mode="aspectFill"></image>

9
pages/index/index.js

@ -341,18 +341,23 @@ Page({
page = page[page.length-1].split("?")
console.log(page[0])
let url = this.data.urltopage[page[0]];
console.log(url)
if(url && url.indexOf('map')!=-1){
let types = ['','scenic','venue','post','restaurant','relic','tenscenic','cinema','academes'],type = page[1]?page[1].split("="):[];
wx.reLaunch({
url: url+"?type="+(type[1]?types.findIndex(t=>t==type[1]):null)
})
}
else {
else if(url){
wx.navigateTo({
url: url,
})
}
else {
app.globalData.weburl = item.tdata;
wx.navigateTo({
url:"/pages/pbService/web/index"
})
}
}
break;
case 4:

11
pages/info/activityInfo/index.wxml

@ -9,7 +9,7 @@
</swiper-item>
</block>
</swiper> -->
<view wx:if="{{info}}">
<view wx:if="{{info}}" style="width:750rpx;overflow:hidden">
<image src="{{info.post_url}}" mode="widthFix" class="swiper"></image>
<view class="top-box">
<view class="top-box-title">{{info.name}}</view>
@ -32,6 +32,15 @@
<view class="box-title">活动详情</view>
<rich-text class="box-content" nodes="{{tool.formateRichText(info.intro)}}"></rich-text>
</view>
<navigator url="/pages/info/sceneProductInfo/index?id={{info.scene_data.id}}" wx:if="{{info && info.scene_data && info.scene_data.id}}" class="scene-box">
<image src="{{info.scene_data.headimg}}" mode="aspectFill"></image>
<view class="scene-info">
<view class="scene-title textOver">{{info.scene_data.title}}</view>
<view class="scene-address textOver2">{{info.scene_data.address}}</view>
<view class="scene-btn">查看详情</view>
</view>
</navigator>
<view style="height:230rpx" wx:if="{{info && info.scene_data && info.scene_data.id}}"></view>
<!-- <view style="height:124rpx" wx:if="{{info && info.is_bind_our_sku!=0 && info.sku_id}}"></view>
<view class="bottom-fixed" wx:if="{{info && info.is_bind_our_sku!=0 && info.sku_id}}">
<view class="bottom-btn" bindtap="order" wx:if="{{info.is_act_end==0}}">预约活动</view>

51
pages/info/activityInfo/index.wxss

@ -93,3 +93,54 @@
.bottom-btn.disable {
background: #ccc;
}
.scene-box {
display: flex;
justify-content: space-between;
width: 697rpx;
height: 193rpx;
background: #FFFFFF;
box-shadow: 0px 0px 16rpx 0px rgba(0, 0, 0, 0.14);
border-radius: 13rpx;
margin: 0 auto;
position: fixed;
left: 0;
right: 0;
bottom: 30rpx;
z-index: 2;
}
.scene-box image {
display: block;
width: 253rpx;
margin: 20rpx;
height: 153rpx;
flex-shrink: 0;
margin-right: 26rpx;
}
.scene-info {
flex: 1;
width: 400rpx;
margin: 20rpx;
margin-left: 0;
}
.scene-title {
color: #000;
font-size: 31rpx;
font-weight: 500;
}
.scene-address {
color: #999;
font-size: 25rpx;
line-height: 30rpx;
height: 60rpx;
margin-top: 5rpx;
}
.scene-btn {
width: 158rpx;
line-height: 44rpx;
background: #0B898E;
border-radius: 22rpx;
text-align: center;
color: #fff;
font-size: 25rpx;
float: right;
}

2
pages/info/strategyInfo/index.wxss

@ -6,6 +6,8 @@
background: white;
margin-top: -20rpx;
padding: 35rpx;
width: 680rpx;
overflow: hidden;
}
.title {
font-size: 36rpx;

1
pages/pbService/group/index.wxml

@ -21,3 +21,4 @@
</view>
</view>
</navigator>
<view wx:if="{{list.length==0}}" style="text-align:center;line-height:100rpx;font-size:28rpx;color:#666">暂无数据</view>

4
pages/pbService/index.wxml

@ -93,9 +93,9 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/pb16.png" mode="widthFix"></image>
<view>精彩回顾</view>
</view>
<view class="pb-item" data-title="团队预约" bindtap="gotoPath" data-path="/pages/pbService/group/index">
<!-- <view class="pb-item" data-title="团队预约" bindtap="gotoPath" data-path="/pages/pbService/group/index">
<image src="https://static.ticket.sz-trip.com/xcxImages/pbservice/pb21.png" mode="widthFix"></image>
<view>团队预约</view>
</view>
</view> -->
</view>
</view>

26
pages/pbService/web/index.js

@ -1,5 +1,6 @@
// pages/pbService/web/index.js
const app = getApp()
let app = getApp()
import userApi from "../../../utils/https/user"
Page({
/**
@ -13,9 +14,26 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
webUrl:app.globalData.weburl
})
if(app.globalData.weburl.indexOf('m.cloud.sz-trip.com')!=-1){
userApi.user_post("user/getMyInfo").then(res=>{
let weburl = app.globalData.weburl
if(weburl.indexOf('?')!=-1){
weburl += '&token='+res.data.token;
}
else {
weburl += '?token='+res.data.token
}
this.setData({
info:res.data,
webUrl:weburl
})
})
}
else {
this.setData({
webUrl:app.globalData.weburl
})
}
},
/**

2
project.config.json

@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"enhance": false,
"postcss": true,

6
project.private.config.json

@ -13,9 +13,9 @@
"miniprogram": {
"list": [
{
"name": "pages/pbService/group/index",
"pathName": "pages/pbService/group/index",
"query": "id=6",
"name": "pages/pbService/web/index",
"pathName": "pages/pbService/web/index",
"query": "url=https%3A%2F%2Fm.cloud.sz-trip.com%2FphotoWorksDetail%3Fid%3D1157%26type_id%3D1",
"scene": null
},
{

18
utils/https.js

@ -81,6 +81,15 @@ function _post(url,data={}) {
// icon: "none",
// })
// }
if(url.indexOf('product/get_product_detail')!=-1){
// 如果是产品详情的话 需要加埋点
console.log(res.data)
return;
_post('browse/ProductStatistics',{
uuid:wx.getStorageSync('uuid'),
product_id:'1'
})
}
resolved(res.data);
}
else {
@ -180,6 +189,15 @@ function user_post(url,data={}){
})
}
}
if(url.indexOf('product/get_product_detail')!=-1){
// 如果是产品详情的话 需要加埋点
_post('browse/ProductStatistics',{
uuid:wx.getStorageSync('uuid'),
product_id:res.data.data.id,
product_name:res.data.data.title,
type:res.data.data.type
})
}
resolved(res.data);
}
else {

Loading…
Cancel
Save