Browse Source

推荐

master
shaojing 3 years ago
parent
commit
f577705ebc
  1. 6
      pages/index/index.js
  2. 2
      pages/index/index.wxml
  3. 11
      pages/info/postProductInfo/index.js
  4. 8
      pages/info/postProductInfo/index.wxml
  5. 23
      pages/info/postProductInfo/index.wxss
  6. 22
      pages/order/comment/index.js
  7. 20
      pages/order/comment/index.wxml
  8. 89
      pages/order/comment/index.wxss
  9. 21
      pages/order/payresult/index.js
  10. 23
      pages/order/payresult/index.wxml
  11. 90
      pages/order/payresult/index.wxss
  12. 14
      project.private.config.json

6
pages/index/index.js

@ -121,6 +121,12 @@ Page({
}) })
this.getVideoPrize() this.getVideoPrize()
}, },
goFeiyi: function () {
app.globalData.weburl = 'https://m.cloud.sz-trip.com/mlgCoupon'
wx.navigateTo({
url:"/pages/pbService/web/index"
})
},
onTabItemTap: function (e) { onTabItemTap: function (e) {
console.log(e, 99999999) console.log(e, 99999999)
}, },

2
pages/index/index.wxml

@ -52,7 +52,7 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/icon2New.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/icon2New.png" mode="widthFix"></image>
<view class="top-icon-text">场馆预约</view> <view class="top-icon-text">场馆预约</view>
</view> </view>
<view bindtap="gotoPath" data-event="legacy" data-title="非遗专卖" <view bindtap="goFeiyi" data-event="legacy" data-title="非遗专卖"
data-path="/pages/list/{{isTest?'scene':'feiyi'}}/index" class="top-icon-item"> data-path="/pages/list/{{isTest?'scene':'feiyi'}}/index" class="top-icon-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/icon3New.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/icon3New.png" mode="widthFix"></image>
<view class="top-icon-text">非遗专卖</view> <view class="top-icon-text">非遗专卖</view>

11
pages/info/postProductInfo/index.js

@ -117,7 +117,7 @@ Page({
}) })
}) })
commonApi._post("product/get_product_by_type", { commonApi._post("search/product_recommend", {
offset: 0, offset: 0,
limit: 6, limit: 6,
rand: true, rand: true,
@ -203,13 +203,18 @@ Page({
query.select("#box1").boundingClientRect() //选择toViewid获取位置信息 query.select("#box1").boundingClientRect() //选择toViewid获取位置信息
query.select("#box2").boundingClientRect() //选择toViewid获取位置信息 query.select("#box2").boundingClientRect() //选择toViewid获取位置信息
query.select("#box3").boundingClientRect() //选择toViewid获取位置信息 query.select("#box3").boundingClientRect() //选择toViewid获取位置信息
query.select("#box4").boundingClientRect() //选择toViewid获取位置信息
let minHeight = that.data.fixed ? (110 * ratio + height) : topHeight; let minHeight = that.data.fixed ? (110 * ratio + height) : topHeight;
query.exec(function (res) { query.exec(function (res) {
if (res[2].top < minHeight) { if (res[3].top < minHeight) {
that.setData({
type: 4
})
} else if (res[2].top < minHeight) {
that.setData({ that.setData({
type: 3 type: 3
}) })
} else if (res[1].top < minHeight) { }else if (res[1].top < minHeight) {
that.setData({ that.setData({
type: 2 type: 2
}) })

8
pages/info/postProductInfo/index.wxml

@ -35,6 +35,7 @@
<view class="scroll-menu-item{{type==1?' active':''}}" bindtap="changeMenu" data-index="1">产品特色</view> <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==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==3?' active':''}}" bindtap="changeMenu" data-index="3">预定须知</view>
<view class="scroll-menu-item{{type==4?' active':''}}" bindtap="changeMenu" data-index="4">产品推荐</view>
</view> </view>
<view style="height:85rpx" wx:if="{{fixed}}"></view> <view style="height:85rpx" wx:if="{{fixed}}"></view>
<view class="info-box" id="box1"> <view class="info-box" id="box1">
@ -49,8 +50,7 @@
<view class="info-title">预订须知</view> <view class="info-title">预订须知</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text> <rich-text class="details" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text>
</view> </view>
</view> <view class="box">
<view class="box">
<view class="box-top"> <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> <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 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>
@ -86,7 +86,7 @@
查看全部点评<text class="iconfont icon-you"></text></navigator> 查看全部点评<text class="iconfont icon-you"></text></navigator>
</view> </view>
<view class="proad"> <view class="proad" id="box4">
<view class="proad-title"> <view class="proad-title">
<image mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20221027/93dd0ad8fade0ad845e6b67512b4e61b.png"></image> <image mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20221027/93dd0ad8fade0ad845e6b67512b4e61b.png"></image>
</view> </view>
@ -105,6 +105,8 @@
</view> </view>
</view> </view>
</view>
<view style="height:140rpx"></view> <view style="height:140rpx"></view>
<view class="fixed-bottom"> <view class="fixed-bottom">
<view class="['left-img',{{!iShop?'no-shop':''}}]"> <view class="['left-img',{{!iShop?'no-shop':''}}]">

23
pages/info/postProductInfo/index.wxss

@ -228,9 +228,11 @@ page {
} }
.box { .box {
margin: 20rpx; /* margin: 20rpx; */
background: white; /* background: white; */
border-radius: 13rpx; /* border-radius: 13rpx; */
background: #f2f2f2;
padding: 20rpx;
} }
.box-top { .box-top {
@ -240,6 +242,8 @@ page {
color: #000; color: #000;
font-size: 35rpx; font-size: 35rpx;
padding: 0 20rpx; padding: 0 20rpx;
background: #fff;
border-radius: 13rpx 13rpx 0 0;
} }
.box-top .iconfont { .box-top .iconfont {
@ -253,6 +257,8 @@ page {
padding: 40rpx 0; padding: 40rpx 0;
font-size: 23rpx; font-size: 23rpx;
color: #333; color: #333;
background: #fff;
border-radius: 0 0 13rpx 13rpx;
} }
.empty-btn { .empty-btn {
@ -275,9 +281,11 @@ page {
} }
.product-comment { .product-comment {
margin: 0 20rpx; /* margin: 0 20rpx; */
border-bottom: 1rpx solid #ccc; border-bottom: 1rpx solid #ccc;
padding: 33rpx 0; /* padding: 33rpx 0; */
padding: 33rpx 20rpx;
background: #fff;
} }
.product-comment-top { .product-comment-top {
@ -320,11 +328,14 @@ page {
.more-comment-btn { .more-comment-btn {
line-height: 93rpx; line-height: 93rpx;
margin-right: 20rpx; /* margin-right: 20rpx; */
text-align: right; text-align: right;
color: #999; color: #999;
font-size: 27rpx; font-size: 27rpx;
font-weight: 500; font-weight: 500;
padding-right: 20rpx;
background: #fff;
border-radius: 0 0 13rpx 13rpx;
} }
.more-comment-btn .iconfont { .more-comment-btn .iconfont {

22
pages/order/comment/index.js

@ -1,5 +1,6 @@
// pages/order/comment/index.js // pages/order/comment/index.js
import commonApi from "../../../utils/https/common" import commonApi from "../../../utils/https/common"
import util from "../../../utils/util"
Page({ Page({
/** /**
@ -10,7 +11,8 @@ Page({
imgs: [], imgs: [],
upImgs:[], upImgs:[],
checked:false, checked:false,
rate:0 rate:0,
tjList: [], //推荐商品列表
}, },
/** /**
@ -43,6 +45,24 @@ Page({
info: res.data info: res.data
}) })
}) })
commonApi._post("search/product_recommend", {
offset: 0,
limit: 6,
rand: true,
type: 'post'
}).then(res => {
try {
this.setData({
tjList: res.data.list
})
} catch (error) {
console.log(error);
}
})
},
gotoDetail:function(e){
let item = e.currentTarget.dataset.item;
util.gotoDetail(item)
}, },
changeStar: function (e) { changeStar: function (e) {
wx.showLoading({ wx.showLoading({

20
pages/order/comment/index.wxml

@ -35,4 +35,22 @@
</label> </label>
</checkbox-group> </checkbox-group>
<view style="height:80rpx"></view> <view style="height:80rpx"></view>
<view class="btn" bindtap="submit">提交</view> <view class="btn" bindtap="submit">提交</view>
<view class="proad" id="box4">
<view class="proad-title">
<image mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20231013/25af23290c0e6ed438f9c4f2222dd81c.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 text-overflowRows">{{item.title}}</view>
<view class="pro-price">
{{item.price/100}}
</view>
</view>
</view>
</view>
</view>

89
pages/order/comment/index.wxss

@ -1,6 +1,7 @@
/* pages/order/comment/index.wxss */ /* pages/order/comment/index.wxss */
page{ page{
background-color: #FBF8FB; background-color: #FBF8FB;
padding-bottom: 50rpx;
} }
.product-box { .product-box {
padding: 0 30rpx 10rpx 30rpx; padding: 0 30rpx 10rpx 30rpx;
@ -71,7 +72,9 @@ page{
height: 210rpx; height: 210rpx;
} }
.btn { .btn {
width: 360rpx; margin: 0 30rpx;
margin-bottom: 79rpx;
/* width: 360rpx; */
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
color: #fff; color: #fff;
@ -79,10 +82,10 @@ page{
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
border-radius: 40rpx; border-radius: 40rpx;
position: fixed; /* position: fixed;
bottom: 40rpx; bottom: 40rpx;
left: 50%; left: 50%;
margin-left: -180rpx; margin-left: -180rpx; */
} }
/* 图片 */ /* 图片 */
@ -147,3 +150,83 @@ page{
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
color:#fff; color:#fff;
} }
.proad{
margin: 20rpx;
}
.proad-title{
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 14rpx;
}
.proad-title image{
width: 292rpx;
height: 34rpx;
}
.pro-list{
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.proitem{
width: 335rpx;
background: #FFFFFF;
border-radius: 13rpx;
margin-top: 26.67rpx;
box-shadow: 0rpx 2rpx 11rpx 0rpx rgba(201,201,201,0.3);
}
.item-hd {
width: 335rpx;
height: 278rpx;
}
.item-hd image{
width: 100%;
height: 100%;
border-radius: 13rpx 13rpx 0px 0px;
}
.item-bm{
display: flex;
flex-direction: column;
justify-content: space-between;
height: 120rpx;
padding: 13rpx 14rpx;
text-align: left;
}
.protitle{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
.pro-price{
color: #D10000;
font-weight: bold;
font-size: 36rpx;
}
.pro-price:before {
display: inline-block;
content:"¥";
color: #D62828;
font-size: 20rpx;
}
.pro-price:after {
display: inline-block;
content:'起';
color: #999999;
font-size: 10px;
}
.proitem image:nth-child(1) {
display: block;
width: 100%;
border-radius: 13rpx 13rpx 0 0;
}
.text-overflowRows {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
word-break: break-all;
display: -webkit-box;
-webkit-box-orient: vertical;
}

21
pages/order/payresult/index.js

@ -8,7 +8,8 @@ Page({
*/ */
data: { data: {
tid:null, tid:null,
info:null info:null,
tjList: [], //推荐商品列表
}, },
/** /**
@ -27,6 +28,24 @@ Page({
}) })
console.log(res) console.log(res)
}) })
commonApi._post("search/product_recommend", {
offset: 0,
limit: 6,
rand: true,
type: 'post'
}).then(res => {
try {
this.setData({
tjList: res.data.list
})
} catch (error) {
console.log(error);
}
})
},
gotoDetail:function(e){
let item = e.currentTarget.dataset.item;
util.gotoDetail(item)
}, },
gotoOrderList:function(){ gotoOrderList:function(){
if(!this.data.info) return; if(!this.data.info) return;

23
pages/order/payresult/index.wxml

@ -1,7 +1,26 @@
<!--pages/order/payresult/index.wxml--> <!--pages/order/payresult/index.wxml-->
<title title="订单"></title> <title title="订单"></title>
<view class="iconfont icon-gou1"></view> <!-- <view class="iconfont icon-gou1"></view> -->
<image class="gou" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20231013/5d53ee0d2e6136d634202b9651984d60.png"></image>
<view class="order-tip">订单正在处理中</view> <view class="order-tip">订单正在处理中</view>
<view>具体出票/发货状态</view> <view>具体出票/发货状态</view>
<view>将会通过短信/订单状态进行通知</view> <view>将会通过短信/订单状态进行通知</view>
<view class="btn" bindtap="gotoOrderList">查看订单</view> <view class="btn" bindtap="gotoOrderList">查看订单</view>
<view class="proad" id="box4">
<view class="proad-title">
<image mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20231013/25af23290c0e6ed438f9c4f2222dd81c.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 text-overflowRows">{{item.title}}</view>
<view class="pro-price">
{{item.price/100}}
</view>
</view>
</view>
</view>
</view>

90
pages/order/payresult/index.wxss

@ -13,12 +13,15 @@
margin: 0 auto; margin: 0 auto;
font-size: 36rpx; font-size: 36rpx;
font-weight: 500; font-weight: 500;
margin-top: 200rpx; margin-top: 76.67rpx;
margin-bottom: 79.33rpx;
/* margin-top: 200rpx; */
} }
page { page {
text-align: center; text-align: center;
color: #999; color: #999;
font-size: 32rpx; font-size: 32rpx;
padding-bottom: 50rpx;
} }
.order-tip { .order-tip {
color: #009944; color: #009944;
@ -26,4 +29,89 @@ page {
font-weight: 500; font-weight: 500;
margin-top: 30rpx; margin-top: 30rpx;
margin-bottom: 50rpx; margin-bottom: 50rpx;
}
.gou {
width: 180.13rpx;
height: 180.13rpx;
margin-top: 40rpx;
}
.proad{
margin: 20rpx;
}
.proad-title{
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 14rpx;
}
.proad-title image{
width: 292rpx;
height: 34rpx;
}
.pro-list{
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.proitem{
width: 335rpx;
background: #FFFFFF;
border-radius: 13rpx;
margin-top: 26.67rpx;
box-shadow: 0rpx 2rpx 11rpx 0rpx rgba(201,201,201,0.3);
}
.item-hd {
width: 335rpx;
height: 278rpx;
}
.item-hd image{
width: 100%;
height: 100%;
border-radius: 13rpx 13rpx 0px 0px;
}
.item-bm{
display: flex;
flex-direction: column;
justify-content: space-between;
height: 120rpx;
padding: 13rpx 14rpx;
text-align: left;
}
.protitle{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
.pro-price{
color: #D10000;
font-weight: bold;
font-size: 36rpx;
}
.pro-price:before {
display: inline-block;
content:"¥";
color: #D62828;
font-size: 20rpx;
}
.pro-price:after {
display: inline-block;
content:'起';
color: #999999;
font-size: 10px;
}
.proitem image:nth-child(1) {
display: block;
width: 100%;
border-radius: 13rpx 13rpx 0 0;
}
.text-overflowRows {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
word-break: break-all;
display: -webkit-box;
-webkit-box-orient: vertical;
} }

14
project.private.config.json

@ -67,6 +67,20 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "",
"pathName": "pages/order/payresult/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/order/comment/index",
"query": "id=82342309051435565877",
"launchMode": "default",
"scene": null
} }
] ]
} }

Loading…
Cancel
Save