Browse Source

文档修改

master
chenkainan 4 years ago
parent
commit
7d6a6d0fda
  1. 4
      pages/index/index.wxml
  2. 2
      pages/info/postProductInfo/index.wxml
  3. 2
      pages/info/roadInfo/index.wxml
  4. 25
      pages/list/food/index.js
  5. 2
      pages/list/food/index.wxml
  6. 7
      pages/list/food/index.wxss
  7. 2
      pages/list/hotel/index.wxml
  8. 2
      pages/list/scene/index.js
  9. 6
      pages/list/techan/index.wxml
  10. 2
      pages/pbService/feiyi/index.wxml

4
pages/index/index.wxml

@ -155,9 +155,9 @@
</view> </view>
<scroll-view scroll-x style="height:360rpx" bindscroll="listenScroll" class="slide-box"> <scroll-view scroll-x style="height:360rpx" bindscroll="listenScroll" class="slide-box">
<view class="pbservice" style="margin-bottom:30rpx"> <view class="pbservice" style="margin-bottom:30rpx">
<view bindtap="gotoPath" data-title="非遗传承" data-path="/pages/pbService/feiyi/index" class="pbservice-item"> <view bindtap="gotoPath" data-title="非遗鉴赏" data-path="/pages/pbService/feiyi/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb2.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb2.png" mode="widthFix"></image>
<view>非遗传承</view> <view>非遗鉴赏</view>
</view> </view>
<!-- <view bindtap="gotoPath" data-event="culture_search_click" data-title="文物查询" <!-- <view bindtap="gotoPath" data-event="culture_search_click" data-title="文物查询"
data-path="/pages/pbService/wwcx/index" class="pbservice-item"> data-path="/pages/pbService/wwcx/index" class="pbservice-item">

2
pages/info/postProductInfo/index.wxml

@ -102,7 +102,7 @@
<view style="flex:1"></view> <view style="flex:1"></view>
<view class="btns"> <view class="btns">
<view class="btn" bindtap="showCart">加入购物车</view> <view class="btn" bindtap="showCart">加入购物车</view>
<view class="btn" bindtap="showOrder" wx:if="{{info && info.flag==1}}">立即预订</view> <view class="btn" bindtap="showOrder" wx:if="{{info && info.flag==1}}">立即购买</view>
<view class="btn disable" wx:elif="{{info}}">该商品已下架</view> <view class="btn disable" wx:elif="{{info}}">该商品已下架</view>
</view> </view>
</view> </view>

2
pages/info/roadInfo/index.wxml

@ -22,7 +22,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 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" wx:if="{{info}}"> <view class="info-box" id="box1" wx:if="{{info}}">

25
pages/list/food/index.js

@ -12,15 +12,33 @@ Page({
list:[], list:[],
total:1, total:1,
sort:"weight", sort:"weight",
keywords:"" keywords:"",
lat: '',
lon: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.getLocation({
type: 'gcj02',
success:(res)=>{
this.setData({
lat:res.latitude,
lon:res.longitude
})
this.getList() this.getList()
}, },
fail:()=>{
wx.showToast({
title: '请打开位置授权',
icon:'none'
})
}
})
},
setSort:function(){ setSort:function(){
this.setData({ this.setData({
sort:this.data.sort=='weight'?'distance':'weight', sort:this.data.sort=='weight'?'distance':'weight',
@ -69,13 +87,15 @@ Page({
offset:list.length, offset:list.length,
limit:1000, limit:1000,
sort:this.data.sort, sort:this.data.sort,
order:this.data.sort=='weight'?'desc':'asc' order:this.data.sort=='weight'?'desc':'asc',
},that = this; },that = this;
if(list.length>=this.data.total) return; if(list.length>=this.data.total) return;
if(this.data.typeIndex==0){ if(this.data.typeIndex==0){
// 景点 // 景点
service = "scene/get_scene_by_tag"; service = "scene/get_scene_by_tag";
data.tag_id = "12" data.tag_id = "12"
data.lat = this.data.lat
data.lon = this.data.lon
} }
if(this.data.sort=='distance' && !this.data.latitude){ if(this.data.sort=='distance' && !this.data.latitude){
wx.getLocation({ wx.getLocation({
@ -112,7 +132,6 @@ Page({
item.distance = item.distance>=1000?(item.distance/1000+'km'):(item.distance+'m'); item.distance = item.distance>=1000?(item.distance/1000+'km'):(item.distance+'m');
} }
}) })
console.log(res.data)
this.setData({ this.setData({
list:list.concat(res.data.list), list:list.concat(res.data.list),
total:this.data.type==0?res.data.total:res.data.count total:this.data.type==0?res.data.total:res.data.count

2
pages/list/food/index.wxml

@ -20,7 +20,7 @@
<view class="distance" wx:if="{{item.distance}}">距您直线距离{{item.distance}}</view> <view class="distance" wx:if="{{item.distance}}">距您直线距离{{item.distance}}</view>
<view class="bottom-infos"> <view class="bottom-infos">
<view class="tag" wx:for="{{item.display_tags}}">{{item}}</view> <view class="tag" wx:for="{{item.display_tags}}">{{item}}</view>
<view class="price"><text>¥</text><text>{{item.price/100}}</text><text>起</text></view> <!-- <view class="price"><text>¥</text><text>{{item.price/100}}</text><text>起</text></view> -->
</view> </view>
</view> </view>
<view class="iconfont icon-arrow-line-right"></view> <view class="iconfont icon-arrow-line-right"></view>

7
pages/list/food/index.wxss

@ -57,7 +57,7 @@ page {
} }
.infos .title { .infos .title {
line-height: 47rpx; line-height: 47rpx;
height: 94rpx; /* height: 94rpx; */
font-size: 35rpx; font-size: 35rpx;
color: #202020; color: #202020;
font-weight: 500; font-weight: 500;
@ -76,7 +76,7 @@ page {
.bottom-infos { .bottom-infos {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; /* justify-content: space-between; */
} }
.bottom-infos .tag { .bottom-infos .tag {
position: relative; position: relative;
@ -85,6 +85,7 @@ page {
font-weight: 500; font-weight: 500;
line-height: 39rpx; line-height: 39rpx;
height: 39rpx; height: 39rpx;
margin-right: 10rpx;
} }
.bottom-infos .tag::after { .bottom-infos .tag::after {
content: "1"; content: "1";
@ -120,7 +121,7 @@ page {
font-size: 40rpx; font-size: 40rpx;
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 5rpx; bottom: 30rpx;
z-index: 1; z-index: 1;
} }
.order-btn { .order-btn {

2
pages/list/hotel/index.wxml

@ -12,7 +12,7 @@
</view> </view>
<view class="sort-btn" style="{{isDistanceSort?'':'color:#333'}}"> <view class="sort-btn" style="{{isDistanceSort?'':'color:#333'}}">
<view bindtap="changeSort">距离排序</view> <view bindtap="changeSort">距离最近</view>
</view> </view>
<view bindtap="gotoDetail" data-item="{{item}}" url="/pages/info/hotelProductInfo/index?id={{item.id}}" class="hotel-item" wx:for="{{list}}"> <view bindtap="gotoDetail" data-item="{{item}}" url="/pages/info/hotelProductInfo/index?id={{item.id}}" class="hotel-item" wx:for="{{list}}">
<image mode="aspectFill" class="headimg" src="{{item.headimg}}"></image> <image mode="aspectFill" class="headimg" src="{{item.headimg}}"></image>

2
pages/list/scene/index.js

@ -67,7 +67,7 @@ Page({
area_id:this.data.area_id area_id:this.data.area_id
}).then(res=>{ }).then(res=>{
res.data.list.map(item=>{ res.data.list.map(item=>{
item.tags = item.tags?item.tags.split(","):[]; item.tags = item.display_tags?item.display_tags.split(","):[];
item.tags = item.tags.splice(0,2); item.tags = item.tags.splice(0,2);
if(item.distance && item.distance>=1000){ if(item.distance && item.distance>=1000){
item.distance = item.distance/1000 + "km" item.distance = item.distance/1000 + "km"

6
pages/list/techan/index.wxml

@ -1,6 +1,6 @@
<!--pages/feiyi/list/index.wxml--> <!--pages/feiyi/list/index.wxml-->
<!-- 非遗列表页面 --> <!-- 非遗列表页面 -->
<!-- <wxs src="../../../../utils/filter.wxs" module="tool" /> --> <wxs src="../../../utils/filter.wxs" module="tool" />
<title title="文创特产"></title> <title title="文创特产"></title>
<image class="heaimg" src="https://static.ticket.sz-trip.com/xcxImages/techan/top1.png" mode="widthFix"></image> <image class="heaimg" src="https://static.ticket.sz-trip.com/xcxImages/techan/top1.png" mode="widthFix"></image>
<view style="position:relative;margin-top: -107rpx;"> <view style="position:relative;margin-top: -107rpx;">
@ -19,13 +19,13 @@
</view> </view>
<view class="supplier-address supplier-tags"><text class="iconfont icon-location"></text>{{item.address}}</view> <view class="supplier-address supplier-tags"><text class="iconfont icon-location"></text>{{item.address}}</view>
</view> </view>
<view class="supplier-price"><text>¥</text><text>{{item.start_price/100}}</text><text>起</text></view> <view class="supplier-price"><text>¥</text><text>{{tool.toFix(item.start_price)}}</text><text>起</text></view>
</view> </view>
<view class="product-list"> <view class="product-list">
<view data-item="{{item}}" class="product-item" wx:for="{{item.product}}"> <view data-item="{{item}}" class="product-item" wx:for="{{item.product}}">
<image src="{{item.headimg}}" mode="aspectFill"></image> <image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="product-title textOver2">{{item.title}}</view> <view class="product-title textOver2">{{item.title}}</view>
<view class="supplier-price"><text>¥</text><text style="font-size:30rpx">{{item.price/100}}</text><text class="market_price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">{{item.market_price/100}}</text></view> <view class="supplier-price"><text>¥</text><text style="font-size:30rpx">{{tool.toFix(item.price)}}</text><text class="market_price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">{{item.market_price/100}}</text></view>
</view> </view>
</view> </view>
</view> </view>

2
pages/pbService/feiyi/index.wxml

@ -1,5 +1,5 @@
<!--pages/pbService/feiyi/index.wxml--> <!--pages/pbService/feiyi/index.wxml-->
<title title="非遗传承"></title> <title title="非遗鉴赏"></title>
<picker mode="selector" value="{{date}}" range="{{types}}" range-key="class_name" bindchange="changeType"> <picker mode="selector" value="{{date}}" range="{{types}}" range-key="class_name" bindchange="changeType">
<view class="picker feiyi-picker"> <view class="picker feiyi-picker">
<text>{{types[typeIndex].class_name}}</text> <text>{{types[typeIndex].class_name}}</text>

Loading…
Cancel
Save