Browse Source

Merge branch 'master' into dev_master

master
jiazhipeng 9 months ago
parent
commit
da7224058c
  1. 2
      app.js
  2. 7
      pages/index/index.js
  3. 7
      pages/index/index.wxml
  4. 10
      pages/info/postProductInfo/index.js
  5. 150
      pages/info/postProductInfo/index.wxml
  6. 74
      pages/info/postProductInfo/index.wxss
  7. 2
      pages/info/sceneProductInfo/index.js
  8. 2
      pages/order/components/date/index.js
  9. 2
      pages/pbService/aiHelpYou/index.js
  10. 2
      pages/search/list/index.wxml
  11. 3
      pages/user/order/sceneOrderInfo/index.wxml
  12. 16
      utils/https.js

2
app.js

@ -38,7 +38,7 @@ App({
// 获取前端配置文件
commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest122? true : false;
data.isTest = data.isTest127? true : false;
data.indexSeason = null
this.globalData.configJson = data
}).then(() => {

7
pages/index/index.js

@ -896,10 +896,11 @@ Page({
},
gotoDetail: function(e) {
let item = e.currentTarget.dataset.item;
// commonApi._post("repurchase/repurchase/recordClick", {product_id:item.product_id})
item.id = item.type=='post'?item.product_id:item.scene_id
commonApi._post("repurchase/repurchase/recordClick", {product_id:item.product_id})
// item.id = item.type=='post'?item.product_id:item.scene_id
if (item.pagePoint) { this.newPagePoint(item.pagePoint) }
util.gotoDetail(item);
// util.gotoDetail(item);
util.gotoDetail(item.goods);
},

7
pages/index/index.wxml

@ -85,8 +85,11 @@
<image style="width: 253.33rpx;" wx:if="{{xpthIndex==0}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.hotBac}}"></image>
<image style="width: 253.33rpx;" wx:else="" bindtap="changeXpthIndex" data-value="{{0}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.hotBacImg}}"></image>
<image style="width: 253.33rpx;" wx:if="{{xpthIndex==0}}" bindtap="changeXpthIndex" data-value="{{1}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.xpthBacImg}}"></image>
<image style="width: 253.33rpx;" wx:else mode="aspectFill" class="common-header-img" src="{{indexSeason.xpthBac}}"></image>
<view style="font-size: 0;" wx:if="{{indexSeason.xpthBac && indexSeason.xpthBacImg}}">
<image style="width: 253.33rpx;" wx:if="{{xpthIndex==0}}" bindtap="changeXpthIndex" data-value="{{1}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.xpthBacImg}}"></image>
<image style="width: 253.33rpx;" wx:else mode="aspectFill" class="common-header-img" src="{{indexSeason.xpthBac}}"></image>
</view>
</view>
</view>
<!-- 热门 -->

10
pages/info/postProductInfo/index.js

@ -722,6 +722,16 @@ Page({
address:info.scene_address
})
},
viewImg:function(e){
let item = e.currentTarget.dataset.item;
if (item.img_list.length>0) {
wx.previewImage({
urls: item.img_list
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

150
pages/info/postProductInfo/index.wxml

@ -75,82 +75,96 @@
</view>
</view>
<!-- 买家评价 -->
<view class="comment-box">
<view class="box-top" style="border-bottom: {{commentTotal>0?'1rpx':'0rpx'}} solid #d9d9d9;">
<!-- <text class="iconfont icon-tiwen"></text> -->
<text style="font-weight: bold;">买家评价</text>
<text class="score" wx:if="{{info && info.rate && commentTotal>0}}">{{info.rate}}分</text>
<text wx:else class="no-comment">暂无评价</text>
<view class="scroll-all-box" id="menus" wx:if="{{info}}">
<view class="scroll-menus{{fixed?' fixed-menus':''}}" style="top:{{top}}px">
<view class="scroll-menu-item{{type==1?' active':''}}" bindtap="changeMenu" data-index="1">产品特色</view>
<view class="scroll-menu-item{{type==2?' active':''}}" bindtap="changeMenu" data-index="2">费用说明</view>
<view class="scroll-menu-item{{type==3?' active':''}}" bindtap="changeMenu" data-index="3">预定须知</view>
<view class="scroll-menu-item{{type==4?' active':''}}" bindtap="changeMenu" data-index="4">产品推荐</view>
</view>
<view style="height:85rpx" wx:if="{{fixed}}"></view>
<view class="info-box" id="box1">
<view class="info-title">产品特色</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.content)}}"></rich-text>
</view>
<view class="info-box" id="box2">
<view class="info-title">费用说明</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.expense_info)}}"></rich-text>
</view>
<view class="info-box" id="box3">
<view class="info-title">预订须知</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text>
</view>
<view class="box">
<view class="box-top">
<text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" wx:if="{{info && info.rate && commentTotal>0}}">{{info.rate}}分</text>
<navigator url="/pages/list/comments/index?productid={{id}}" style="display: inline;"> <text class="all-comment-num">共{{commentTotal}}条 <text style="font-family: fangsong; font-weight: bold;color: #000;">></text></text>
</navigator>
</view>
<view class="empty-box" wx:if="{{!comment || comment.length==0}}">
<view>这里空空如也,快去点评吧!</view>
<!-- <navigator url="/pages/ask/index?id={{id}}" class="empty-btn">去点评</navigator> -->
</view>
<navigator wx:for="{{comment}}" wx:for-index="index" url="/pages/list/comments/index?productid={{id}}&&index={{index}}" class="product-comment">
<view class="product-comment-top">
<image src="{{item.user.avatar}}" mode="aspectFill"></image>
<view class="comment-info">
<view class="nickname">{{item.nickname}}</view>
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
</view>
<!-- <view class="comment-date">{{item.create_time}}</view> -->
<navigator url="/pages/list/comments/index?productid={{id}}" style="display: inline;">
<text class="all-comment-num">共{{commentTotal}}条 <text style="font-family: fangsong;color: #000;">></text></text>
</navigator>
</view>
<view class="comment-content">{{item.content}}</view>
<view wx:if="{{item.img_list}}">
<view class="img-box" wx:for="{{item.img_list}}" wx:for-index="index" wx:for-item="img" mode="scaleToFill" data-img="{{img}}" data-list="{{item.img_list}}">
<image wx:if="{{index<6}}" class="imgs" src="{{img}}" bindtap="imgsc">
</image>
<view class="all" wx:if="{{index==5}}">
<view>共{{item.img_list.length}}张</view>
<view>查看全部</view>
<!-- <view class="empty-box" wx:if="{{!comment || comment.length==0}}">
<view>这里空空如也,快去点评吧!</view>
<navigator url="/pages/ask/index?id={{id}}" class="empty-btn">去点评</navigator>
</view> -->
<navigator wx:for="{{comment}}" wx:key="index" wx:for-index="index" url="/pages/list/comments/index?productid={{id}}&&index={{index}}" class="product-comment">
<view class="product-comment-top">
<image class="avator-img" src="{{item.user.avatar}}" mode="aspectFill"></image>
<!-- <image class="avator-img" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/commentUser.png" mode="aspectFill"></image> -->
<view class="comment-container">
<view class="comment-info">
<view class="nickname" style="padding-right:20rpx ;">{{item.nickname}}</view>
<!-- <view class="nickname" style="padding-right:20rpx ;">张三</view> -->
<view class="iconfont"><text wx:for="{{item.rate}}" wx:key="index" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
</view>
<view class="comment-content textOver2">{{item.content}}</view>
</view>
<view class="img-box" wx:if="{{item.img_list.length>0}}">
<image class="imgs" data-item="{{item}}" mode="aspectFill" src="{{item.img_list[0]}}" catch:tap="viewImg"></image>
<!-- <view class="img-box" wx:for="{{item.img_list}}" wx:for-index="index" wx:for-item="img" mode="scaleToFill" data-img="{{img}}" data-list="{{item.img_list}}">
<image wx:if="{{index<6}}" class="imgs" src="{{img}}" bindtap="imgsc"></image>
<view class="all" wx:if="{{index==5}}">
<view>共{{item.img_list.length}}张</view>
<view>查看全部</view>
</view>
</view> -->
<view wx:if="{{item.img_list.length>1}}" class="more-img">+{{item.img_list.length}}</view>
</view>
<!-- <view class="comment-date">{{item.create_time}}</view> -->
</view>
</view>
</view>
<view class="sku" wx:if="{{item.sku_name}}">{{item.sku_name}}</view>
</navigator>
<navigator url="/pages/list/comments/index?productid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">
查看全部点评<text class="iconfont icon-you"></text></navigator>
<!-- <view class="sku" wx:if="{{item.sku_name}}">{{item.sku_name}}</view> -->
</navigator>
<!-- <navigator url="/pages/list/comments/index?productid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">
查看全部点评<text class="iconfont icon-you"></text></navigator> -->
</view>
<view class="proad" id="box4">
<view class="proad-title">
<image mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20221027/93dd0ad8fade0ad845e6b67512b4e61b.png"></image>
</view>
<view class="pro-list">
<view class="proitem" wx:for="{{tjList}}" bindtap="gotoDetail" data-item="{{item}}">
<view class="item-hd">
<image src="{{item.headimg}}"></image>
<view class="scroll-all-box" id="menus" wx:if="{{info}}">
<view class="scroll-menus{{fixed?' fixed-menus':''}}" style="top:{{top}}px">
<view class="scroll-menu-item{{type==1?' active':''}}" bindtap="changeMenu" data-index="1">产品特色</view>
<view class="scroll-menu-item{{type==2?' active':''}}" bindtap="changeMenu" data-index="2">费用说明</view>
<view class="scroll-menu-item{{type==3?' active':''}}" bindtap="changeMenu" data-index="3">预定须知</view>
<view class="scroll-menu-item{{type==4?' active':''}}" bindtap="changeMenu" data-index="4">产品推荐</view>
</view>
<view class="item-bm">
<view class="protitle textOver">{{item.title}}</view>
<view class="pro-price">
{{item.price/100}}
</view>
<view style="height:85rpx" wx:if="{{fixed}}"></view>
<view class="info-box" id="box1">
<view class="info-title">产品特色</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.content)}}"></rich-text>
</view>
<view class="info-box" id="box2">
<view class="info-title">费用说明</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.expense_info)}}"></rich-text>
</view>
<view class="info-box" id="box3">
<view class="info-title">预订须知</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text>
</view>
</view>
</view>
</view>
<view class="proad" id="box4">
<view class="proad-title">
<image mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20221027/93dd0ad8fade0ad845e6b67512b4e61b.png"></image>
</view>
<view class="pro-list">
<view class="proitem" wx:for="{{tjList}}" bindtap="gotoDetail" data-item="{{item}}">
<view class="item-hd">
<image src="{{item.headimg}}"></image>
</view>
<view class="item-bm">
<view class="protitle textOver">{{item.title}}</view>
<view class="pro-price">
{{item.price/100}}
</view>
</view>
</view>
</view>
</view>
</view>
<view style="height:140rpx"></view>

74
pages/info/postProductInfo/index.wxss

@ -234,6 +234,19 @@ page {
background: #f2f2f2;
padding: 20rpx;
}
.comment-box{
background: #fff;
padding: 0 20rpx;
margin: 20rpx 0;
width: 100%;
box-sizing: border-box;
}
.comment-box .no-comment{
font-weight: 500;
font-size: 30rpx;
color: #999999;
padding-left: 18rpx;
}
.box-top {
line-height: 95rpx;
@ -284,30 +297,40 @@ page {
/* margin: 0 20rpx; */
border-bottom: 1rpx solid #ccc;
/* padding: 33rpx 0; */
padding: 33rpx 20rpx;
padding: 28rpx 20rpx;
background: #fff;
}
.product-comment:last-of-type{
border-bottom: none;
}
.product-comment-top {
display: flex;
justify-content: space-between;
color: #999999;
align-items: center;
align-items: flex-start;
font-size: 24rpx;
}
.product-comment-top image {
.product-comment-top .avator-img {
flex-shrink: 0;
width: 57rpx;
height: 57rpx;
border-radius: 50%;
}
.product-comment-top .comment-container{
flex: 1;
width: 10rpx;
padding: 0 45rpx 0 15rpx;
}
.product-comment-top .comment-info {
flex: 1;
margin: 0 15rpx;
color: #666;
font-size: 21rpx;
width: 100%;
height: 57rpx;
font-weight: bold;
font-size: 24rpx;
color: #666666;
display: flex;
align-items: center;
}
.product-comment-top .comment-info .iconfont {
@ -320,10 +343,11 @@ page {
}
.comment-content {
margin-left: 13rpx;
margin-top: 36rpx;
font-size: 28rpx;
color: #000;
width: 100%;
padding-top: 12rpx;
font-size: 28rpx;
color: #000;
font-weight: 500;
}
.more-comment-btn {
@ -824,14 +848,30 @@ page {
margin-bottom: 20rpx;
}
.imgs{
width: 200rpx;
height: 200rpx;
margin: 10rpx;
border-radius: 8rpx;
width: 133rpx;
height: 133rpx;
border-radius: 13rpx;
}
.img-box{
display: inline-block;
width: 133rpx;
height: 133rpx;
position: relative;
overflow: hidden;
}
.img-box .more-img{
height: 37rpx;
line-height: 37rpx;
background: #000;
border-radius: 13rpx 0rpx 13rpx 0rpx;
box-sizing: border-box;
padding: 0 5rpx;
font-weight: 500;
font-size: 23rpx;
color: #FFFFFF;
position: absolute;
bottom: 0;
right: 0;
opacity: 0.8;
}
.all{
color: #fff;

2
pages/info/sceneProductInfo/index.js

@ -434,7 +434,7 @@ Page({
num: this.data.productNum
}).then(res => {
if (res.code == 1) {
commonApi.user_post('cart/get_list', {}).then(res => {
commonApi.user_post('cart/get_list', {noLogin: true}).then(res => {
this.setData({
cartCount: res.data.length //5
})

2
pages/order/components/date/index.js

@ -67,7 +67,7 @@ Component({
}
let todayTimes = new Date(today.replace(/-/g,'/')).getTime()
commonApi.user_post("token/check").then(res => {
if (res.code == 1) {
if (res&&res.code == 1) {
// 获取价格日历
commonApi.user_post("product/product_date_price", {
start_date: today,

2
pages/pbService/aiHelpYou/index.js

@ -20,7 +20,7 @@ Page({
onLoad: function (options) {
let weburl = 'https://m.cloud.sz-trip.com/aiPlay?noShowHeaderBack=true'
if (app.globalData.configJson.isTest) {
weburl = "https://m.cloud.sz-trip.com/ScenicComfort"
weburl = "https://m.cloud.sz-trip.com/ScenicComfort?a=1"
}
let token = wx.getStorageSync('jstrip_token')

2
pages/search/list/index.wxml

@ -32,7 +32,7 @@
<common-image class="product-img" src="{{item.ext.headimg}}" mode="aspectFill"></common-image>
<!-- <image></image> -->
<view class="product-info">
<view class="product-title">{{item.title}}</view>
<view class="product-title textOver2">{{item.title}}</view>
<view class="scene-tags textOver" style="margin-top:20rpx;margin-bottom:30rpx">
<text class="scene-tag textOver" wx:for="{{item.ext.display_tags}}">{{item}}</text>
</view>

3
pages/user/order/sceneOrderInfo/index.wxml

@ -111,7 +111,8 @@
<!-- <text>¥168</text> -->
</view>
<view class="detail-item">
<text>{{cardTypes[item.idcard_type]}}:{{item.id_number}}</text>
<!-- <text>{{cardTypes[item.idcard_type]}}:{{item.id_number}}</text> -->
<text>{{item.title}}:{{item.id_number}}</text>
<!-- <text>-¥10</te、xt> -->
</view>
<view class="detail-item">

16
utils/https.js

@ -173,6 +173,10 @@ function user_post_new(url, data = {}, type) {
// 判断是否登录
// 没有登录就跳转到登录页面
if (!token) {
if (data.noLogin) {
resolved();
return false;
}
wx.hideLoading();
// 去登陆
console.log("去登陆去登陆去登陆去登陆去登陆去登陆去登陆")
@ -322,20 +326,20 @@ let canToLogin = true
let appData = getApp()
const checkLogin = () => {
// 判断是否已经授权过
let page = getCurrentPages();
let page = getCurrentPages()[getCurrentPages().length - 1];;
// 审核不强制登录
if (!appData) {
console.log("获取app")
appData = getApp()
}
console.log(appData,page)
if(appData.globalData.configJson&&appData.globalData.configJson.isTest) {
return
}
console.log(appData,page.route)
// if(page.route !="pages/user/user"&& appData.globalData.configJson&&appData.globalData.configJson.isTest) {
// return
// }
if ('pages/login/index' && canToLogin) {
if (page.route!='pages/login/index' && canToLogin) {
canToLogin = false
wx.navigateTo({
url: '/pages/login/index',

Loading…
Cancel
Save