Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wxapp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
wxapp
Commits
d0a1bf1c
Commit
d0a1bf1c
authored
Nov 28, 2018
by
汪睦雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'修改了很多bug'
parent
6717eeb4
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
202 additions
and
83 deletions
+202
-83
app.js
+1
-1
app.json
+1
-0
components/banners/index.wxss
+1
-0
components/project-item/index.wxml
+1
-1
components/project-item/index.wxss
+20
-5
components/search-filter/index.js
+3
-1
components/search-filter/index.wxml
+7
-3
components/search-filter/index.wxss
+7
-4
iview/modal/index.wxss
+2
-2
pages/auth/index.js
+7
-10
pages/auth/index.wxml
+2
-2
pages/detail/appoint/index.js
+15
-11
pages/detail/appoint/index.wxml
+0
-7
pages/detail/enroll/index.js
+4
-0
pages/detail/enroll/index.wxml
+2
-2
pages/detail/index.wxml
+13
-3
pages/detail/index.wxss
+8
-2
pages/guide/index.wxml
+2
-2
pages/guide/index.wxss
+8
-6
pages/index/index.js
+58
-0
pages/index/index.json
+3
-1
pages/index/index.wxml
+8
-5
pages/index/index.wxss
+16
-8
pages/me/vip/index.wxml
+1
-1
project.config.json
+10
-4
wxParse/wxParse.js
+2
-2
No files found.
app.js
View file @
d0a1bf1c
...
...
@@ -5,7 +5,7 @@ App({
onLaunch
:
function
(
options
)
{
this
.
options
=
options
// 用户登录
this
.
checkUserLogin
()
//
this.checkUserLogin()
},
onShow
:
function
(
options
)
{
...
...
app.json
View file @
d0a1bf1c
...
...
@@ -17,6 +17,7 @@
"pages/detail/appoint/index"
,
"components/navs/index"
,
"pages/search/search/search"
,
"pages/prjlist/list"
,
"pages/search/list/list"
],
"window"
:
{
...
...
components/banners/index.wxss
View file @
d0a1bf1c
...
...
@@ -22,4 +22,5 @@
.banner-image {
background: transparent;
width: 100%;
height: 180px;
}
components/project-item/index.wxml
View file @
d0a1bf1c
...
...
@@ -4,7 +4,7 @@
<view class="prj-info">
<text class='ptitle'>{{projectItem.title}}</text>
<view class="ptags">
<text wx-if="{{projectItem.type=='1'}}">限{{projectItem.sign_limits}}组</text>
<text wx-if="{{projectItem.type=='1'}}"
class='sign_limits'
>限{{projectItem.sign_limits}}组</text>
<text class='tags'>{{projectItem.tags}}</text>
</view>
<view class="pactivity" wx-if="{{projectItem.type=='1'}}">
...
...
components/project-item/index.wxss
View file @
d0a1bf1c
/* components/project-item/index.wxss */
.project-item {
padding:
2
0rpx 30rpx;
padding:
3
0rpx 30rpx;
box-sizing: border-box;
display: flex;
flex-flow: row nowrap;
...
...
@@ -19,17 +19,24 @@
.prj-info {
width: 430rpx;
height: 190rpx;
display: flex;
flex-flow: column nowrap;
justify-content:
flex-start
;
align-items: flex-start;
justify-content:
space-between
;
}
.prj-info .ptitle {
padding-top: 10rpx;
font-size: 28rpx;
color: rgb(51, 51, 51);
margin-bottom: 23rpx;
/* margin-bottom: 23rpx; */
overflow:hidden;
display: -webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient: vertical;
width: 90%;
text-overflow:ellipsis;
}
.prj-info .ptags {
...
...
@@ -37,7 +44,15 @@
width: 100%;
font-size: 24rpx;
color: rgb(153, 153, 153);
margin-bottom: 70rpx;
/* margin-bottom: 30rpx; */
}
.ptags .sign_limits{
max-width: 180rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: 10rpx;
}
.prj-info .ptags .tags {
...
...
components/search-filter/index.js
View file @
d0a1bf1c
...
...
@@ -78,9 +78,11 @@ Component({
if
(
name
==
'国内'
||
name
==
'国外'
)
{
// 国内国外筛选
_selected
.
region
=
idx
_selected
.
city
=
'0'
}
else
{
// 城市筛选
_selected
.
city
=
idx
_selected
.
region
=
'0'
}
_selected_titles
.
region
=
name
}
...
...
@@ -137,7 +139,7 @@ Component({
},
// 提交筛选数据请求
_submitFilter
()
{
//
console.log(this.data.selected )
console
.
log
(
this
.
data
.
selected
)
let
myEventDetail
=
{
filters
:
this
.
data
.
selected
}
// detail对象,提供给事件监听函数
...
...
components/search-filter/index.wxml
View file @
d0a1bf1c
<!--components/search-filter/index.wxml-->
<wxs src="../../pages/common.wxs" module="common"></wxs>
<view class='filter-wrapper'>
<view class='filter-wrapper'
catchtouchmove="true"
>
<i-row i-class='row-filter'>
<i-col span="6">
<view class="filter-item">
...
...
@@ -14,6 +14,7 @@
<image class="search-icon" src="/images/icon-down-select{{filter_idx==2?'ed':''}}.png"></image>
</view>
</i-col>
<!-- 地区筛选 -->
<i-col span="6" i-class="col-class">
<view class="filter-item">
<text class="{{filter_idx==3?'active':''}}" catchtap='filterTap' data-idx="3">{{selected_titles.region}}</text>
...
...
@@ -27,7 +28,7 @@
</view>
</i-col>
</i-row>
<view catchtap='closeFilter' class='filter-content-wrapper' wx:if="{{filter_idx>0}}">
<view catchtap='closeFilter' class='filter-content-wrapper' wx:if="{{filter_idx>0}}"
catchtouchmove='true'
>
<view class="row-content" catchtap='preventEvent'>
<scroll-view class="scroll-view" scroll-y="true" style="width: 100%;height: 100%;" wx:if="{{filter_idx!=4}}">
<view wx:if="{{filter_idx==1}}" class='filter-row' wx:for="{{types}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
...
...
@@ -38,18 +39,21 @@
<text bindtap="selectFilter" data-idx="{{n.id}}" data-name="{{n.name}}">{{n.name}}</text>
<image wx:if="{{selected.catalog==n.id}}" class='f-selected' src='/images/icon_filter_selected.png'></image>
</view>
<!-- 地区选项 -->
<view wx:if="{{filter_idx==3}}" class='filter-row' wx:for="{{regions}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
<text bindtap="selectFilter" data-idx="{{n.id}}" data-name="{{n.name}}">{{n.name}}</text>
<image wx:if="{{selected.region==n.id}}" class='f-selected' src='/images/icon_filter_selected.png'></image>
</view>
</scroll-view>
<view class="tags-wrapper" wx:if="{{filter_idx==4}}">
<scroll-view class="tab-scroll-view" scroll-y="true" wx:if="{{filter_idx==4}}">
<view class="tags-wrapper">
<block wx:for="{{tags}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
<view class="tag-item {{common.inArray(selected.tags, n.id)==true?'active':''}}" bindtap="selectTags" data-idx="{{n.id}}">
{{n.name}}
</view>
</block>
</view>
</scroll-view>
<view class="tag-btn-wrapper" wx:if="{{filter_idx==4}}">
<button class="btn cancel" bindtap="cancelSelectTags">取消选择</button>
<button class="btn ensure" bindtap="ensureSelectTags">确定</button>
...
...
components/search-filter/index.wxss
View file @
d0a1bf1c
...
...
@@ -71,7 +71,7 @@
}
.filter-row > text {
width:
8
0%;
width:
10
0%;
}
.filter-row > text.seled {
...
...
@@ -88,9 +88,8 @@
flex-flow: row wrap;
justify-content: space-around;
align-items: center;
height:
88
%;
height:
100
%;
width: 100%;
overflow: auto;
}
.tag-item {
min-width: 120rpx;
...
...
@@ -105,6 +104,10 @@
margin: 10rpx;
border-radius: 2rpx;
}
.tab-scroll-view {
height: 88%;
width: 100%;
}
.scroll-view {
height: 100%;
width: 100%;
...
...
@@ -121,7 +124,7 @@
text-align: center;
position: absolute;
bottom: 0;
height:
48px
;
height:
12%
;
background-color: #f5f5f5;
display: flex;
justify-content: center;
...
...
iview/modal/index.wxss
View file @
d0a1bf1c
.i-modal{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;height:100%;z-index:1000;display:flex;outline:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;transform:translateZ(1px);opacity:0;visibility:hidden}.i-modal-show{visibility:visible;opacity:1}.i-modal-mask{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);z-index:1000;transition:all .2s ease-in-out;opacity:0;visibility:hidden}.i-modal-mask-show{opacity:1;visibility:visible}.i-modal-main{width:270px;position:relative}.i-modal-content{border-radius:7px;padding-top:15px;position:relative;background-color:#fff;border:0;background-clip:padding-box;text-align:center;height:100%;overflow:hidden}.i-modal-body{max-height:100px;margin-bottom:15px;font-size:14px;color:#80848f;height:100%;line-height:1.5;overflow:auto}.i-modal-title{padding:6px 15px 15px;margin:0;font-size:18px;line-height:1;color:#1c2438;text-align:center}.i-modal-actions{margin:0 1px}.i-modal-action-vertical{position:relative}.i-modal-action-vertical:after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-top-width:1px}.i-modal-grid{border-radius:0 0 7px 7px;border-left:none}.i-modal-grid-item,.i-modal-grid-item-last{padding:0;border-bottom:none}.i-modal-grid-item-last{border-right:none}.i-modal-btn-ok{color:#2d8cf0!important}.i-modal-btn-loading{display:inline-block;vertical-align:middle;margin-right:10px;width:12px;height:12px;background:0 0;border-radius:50%;border:2px solid #e5e5e5;border-color:#666 #e5e5e5 #e5e5e5 #e5e5e5;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-modal-btn-text{display:inline-block;vertical-align:middle}.i-modal-btn-icon{font-size:14px!important;margin-right:4px}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
.i-modal{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;height:100%;z-index:1000;display:flex;outline:0;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;transform:translateZ(1px);opacity:0;visibility:hidden}.i-modal-show{visibility:visible;opacity:1}.i-modal-mask{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);z-index:1000;transition:all .2s ease-in-out;opacity:0;visibility:hidden}.i-modal-mask-show{opacity:1;visibility:visible}.i-modal-main{width:270px;position:relative}.i-modal-content{border-radius:7px;padding-top:15px;position:relative;background-color:#fff;border:0;background-clip:padding-box;text-align:center;height:100%;overflow:hidden}.i-modal-body{max-height:152px;margin-bottom:15px;font-size:14px;color:#80848f;height:100%;line-height:1.5;overflow:auto}.i-modal-title{padding:6px 15px 15px;margin:0;font-size:18px;line-height:1;color:#1c2438;text-align:center}.i-modal-actions{margin:0 1px}.i-modal-action-vertical{position:relative}.i-modal-action-vertical:after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-top-width:1px}.i-modal-grid{border-radius:0 0 7px 7px;border-left:none}.i-modal-grid-item,.i-modal-grid-item-last{padding:0;border-bottom:none}.i-modal-grid-item-last{border-right:none}.i-modal-btn-ok{color:#2d8cf0!important}.i-modal-btn-loading{display:inline-block;vertical-align:middle;margin-right:10px;width:12px;height:12px;background:0 0;border-radius:50%;border:2px solid #e5e5e5;border-color:#666 #e5e5e5 #e5e5e5 #e5e5e5;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-modal-btn-text{display:inline-block;vertical-align:middle}.i-modal-btn-icon{font-size:14px!important;margin-right:4px}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
pages/auth/index.js
View file @
d0a1bf1c
...
...
@@ -47,19 +47,16 @@ Page({
}).
then
(
res
=>
{
if
(
!
res
.
code
)
{
app
.
globalData
.
userInfo
=
res
.
user
wx
.
setStorage
({
key
:
'token'
,
data
:
res
.
token
,
})
Wx
.
showToast
({
title
:
'微信授权成功'
,
icon
:
'success'
,
duration
:
2000
,
}).
then
(()
=>
{
wx
.
setStorageSync
(
'token'
,
res
.
token
)
$Toast
({
content
:
'授权登录成功'
,
type
:
'success'
});
setTimeout
(()
=>
{
wx
.
navigateBack
({
delta
:
1
})
}
)
}
,
1000
);
}
else
{
$Toast
({
content
:
'微信授权失败,请重试'
,
...
...
pages/auth/index.wxml
View file @
d0a1bf1c
...
...
@@ -9,8 +9,8 @@
</view>
<view class='action-wrapper'>
<i-button bindgetuserinfo="handleWxAuth" type="success" shape="circle" open-type='getUserInfo'>微信授权</i-button>
<
i-button bindgetphonenumber="handlePhoneAuth" type="info" shape="circle" open-type="getPhoneNumber">手机号授权</i-button
>
<view class="text-small text-hint tip">请完成
2步,
微信授权</view>
<
!-- <i-button bindgetphonenumber="handlePhoneAuth" type="info" shape="circle" open-type="getPhoneNumber">手机号授权</i-button> --
>
<view class="text-small text-hint tip">请完成微信授权</view>
</view>
</view>
</view>
...
...
pages/detail/appoint/index.js
View file @
d0a1bf1c
...
...
@@ -25,7 +25,7 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
if
(
options
.
id
)
{
this
.
setData
({
id
:
options
.
id
...
...
@@ -36,7 +36,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
onReady
:
function
()
{
let
that
=
this
wx
.
showNavigationBarLoading
()
wx
.
showLoading
({
...
...
@@ -51,7 +51,7 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
setData
({
nickname
:
app
.
globalData
.
userInfo
.
nickname
})
...
...
@@ -62,7 +62,7 @@ Page({
}
},
getDetailData
:
function
()
{
getDetailData
:
function
()
{
api
.
project
.
detail
({
id
:
this
.
data
.
id
}).
then
(
res
=>
{
...
...
@@ -75,13 +75,13 @@ Page({
})
},
// 打开位置
handleMap
:
function
()
{
handleMap
:
function
()
{
wx
.
openLocation
({
latitude
:
parseFloat
(
this
.
data
.
detail
.
latitude
),
longitude
:
parseFloat
(
this
.
data
.
detail
.
longitude
),
})
},
handlePhoneAuth
:
function
(
event
)
{
handlePhoneAuth
:
function
(
event
)
{
Wx
.
login
().
then
(
res
=>
{
let
encryptedData
=
event
.
detail
.
encryptedData
let
iv
=
event
.
detail
.
iv
...
...
@@ -92,7 +92,7 @@ Page({
/**
* 解密手机号数据
*/
decodePhoneData
:
function
(
code
,
encryptedData
,
iv
)
{
decodePhoneData
:
function
(
code
,
encryptedData
,
iv
)
{
let
that
=
this
api
.
getPhoneNumber
({
code
:
code
,
...
...
@@ -107,6 +107,10 @@ Page({
this
.
setData
({
phone
:
res
.
data
.
phone
})
// 将刚拿到的手机号码放到全局数据中,否则phone数据只会是当前页面数据
if
(
app
.
globalData
.
userInfo
)
{
app
.
globalData
.
userInfo
.
phone
=
res
.
data
.
phone
}
}
else
{
$Toast
({
content
:
'手机号授权失败'
,
...
...
@@ -116,24 +120,24 @@ Page({
})
},
handleNickname
:
function
(
event
)
{
handleNickname
:
function
(
event
)
{
this
.
setData
({
nickname
:
event
.
detail
.
value
})
},
handleDateChange
:
function
(
e
)
{
handleDateChange
:
function
(
e
)
{
this
.
setData
({
date
:
e
.
detail
.
value
})
},
handleRemark
:
function
(
event
)
{
handleRemark
:
function
(
event
)
{
this
.
setData
({
remark
:
event
.
detail
.
value
})
},
handleSubmit
:
function
()
{
handleSubmit
:
function
()
{
if
(
!
this
.
data
.
nickname
||
!
this
.
data
.
phone
||
!
this
.
data
.
date
)
{
$Toast
({
content
:
'请完善必要信息'
,
...
...
pages/detail/appoint/index.wxml
View file @
d0a1bf1c
...
...
@@ -46,13 +46,6 @@
<i-cell title="备注" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='备注(可选)' bindinput='handleRemark'></input>
</i-cell>
<i-cell>
<image slot="icon" src='/images/icon_location.png' mode='scaleToFill' class='icon'></image>
<view catchtap='handleMap'>{{detail.location}}</view>
<view slot="footer">
<image src='/images/icon_map.png' class='icon-map' catchtap='handleMap'></image>
</view>
</i-cell>
</i-cell-group>
</view>
...
...
pages/detail/enroll/index.js
View file @
d0a1bf1c
...
...
@@ -110,6 +110,10 @@ Page({
this
.
setData
({
phone
:
res
.
data
.
phone
})
// 将刚拿到的手机号码放到全局数据中,否则phone数据只会是当前页面数据
if
(
app
.
globalData
.
userInfo
){
app
.
globalData
.
userInfo
.
phone
=
res
.
data
.
phone
}
}
else
{
$Toast
({
content
:
'手机号授权失败'
,
...
...
pages/detail/enroll/index.wxml
View file @
d0a1bf1c
...
...
@@ -27,7 +27,7 @@
<!-- 报名信息 -->
<view class='project-input margin-bottom'>
<i-cell-group>
<i-cell title="
家庭组数
" is-link i-class="cell-class">
<i-cell title="
数量
" is-link i-class="cell-class">
<picker slot="footer" class="num-picker" bindchange="bindPickerChange" range="{{nums}}" value="{{familyNum}}">
<view class='picker-text'>{{familyNum + 1}}</view>
</picker>
...
...
@@ -62,7 +62,7 @@
<input slot="footer" class='input' type='text' placeholder='如5岁、八岁' bindinput='handleChildrenAge'></input>
</i-cell>
<i-cell title="地址" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='
地址(可选)
' bindinput='handleAddress'></input>
<input slot="footer" class='input' type='text' placeholder='
请输入地址
' bindinput='handleAddress'></input>
</i-cell>
<i-cell title="备注" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='备注(可选)' bindinput='handleRemark'></input>
...
...
pages/detail/index.wxml
View file @
d0a1bf1c
...
...
@@ -22,11 +22,18 @@
</i-cell>
<i-cell>
<image slot="icon" src='/images/icon_location.png' mode='scaleToFill' class='icon'></image>
<view catchtap='handleMap'>{{detail.location}}</view>
<view c
lass='text_address' c
atchtap='handleMap'>{{detail.location}}</view>
<view slot="footer">
<image src='/images/icon_map.png' class='icon-map' catchtap='handleMap'></image>
</view>
</i-cell>
<i-cell wx-if="{{detail.type=='2'}}">
<image slot="icon" src='/images/icon_rmb.png' mode='scaleToFill' class='icon'></image>
<view catchtap='handleMap'>
<text>参考价格:<text class='text-red'>¥{{detail.price}}起/{{detail.night_num}}晚</text> </text>
</view>
</i-cell>
<i-cell wx-if="{{detail.type=='1'}}">
<image slot="icon" src='/images/icon_rmb.png' mode='scaleToFill' class='icon'></image>
<view class='text-red'>
...
...
@@ -39,14 +46,12 @@
</i-cell>
</i-cell-group>
</view>
<view class='desc-wrapper'>
<view class='title'>{{detail.type=='1'?'活动':'商家'}}详情</view>
<view class='content'>
<template is="wxParse" data="{{wxParseData:description.nodes}}" />
</view>
</view>
<view wx-if="{{detail.type=='1'}}" class='comments-wrapper'>
<view class='title'>活动评价({{comments.length > 0 ? comments.lenght : 0}})</view>
<view class='content-wrapper'>
...
...
@@ -76,6 +81,7 @@
</view>
</view>
<i-toast id="toast" />
<i-modal title="咨询客服" visible="{{show_kf}}" bind:ok="handleKfClose" bind:cancel="handleKfClose" ok-text="保存图片">
<view class="qrcode">
<image style='width:236rpx;height:236rpx;border-radius:4rpx;' src='{{detail.kf_qrcode}}'></image>
...
...
@@ -85,4 +91,7 @@
</view>
</i-modal>
</view>
\ No newline at end of file
pages/detail/index.wxss
View file @
d0a1bf1c
...
...
@@ -115,8 +115,8 @@
}
.op-wrapper .icon {
width: 2
2
px;
height: 2
2
px;
width: 2
0
px;
height: 2
0
px;
display: inline-block;
}
...
...
@@ -138,3 +138,8 @@
.actions-section.btn-soldout {
background-color: #CFCFCF;
}
.text_address{
text-overflow: ellipsis;
overflow: hidden;
margin-right: 10px;
}
\ No newline at end of file
pages/guide/index.wxml
View file @
d0a1bf1c
...
...
@@ -4,9 +4,9 @@
<view class="guide-wrapper" wx:for="{{guides}}" wx:for-item="n" wx:key="n.id" catchtap='handleGuideDetail' data-content="{{n.type=='1'?n.id:n.content}}" data-type="{{n.type}}">
<image class='image' src="{{n.poster}}" mode='aspectFill'></image>
<view class='info'>
<view class='text-small intro'>{{n.
intro ? n.intro
: ''}}</view>
<view class='text-small intro'>{{n.
title ? n.title
: ''}}</view>
<view class='text-small text-hint'>
<text class='tag' wx:for="{{n.tags}}" wx:for-index="idx" wx:key="idx" wx:for-item="t">{{t}}</text>
{{n.intro}}
</view>
</view>
</view>
...
...
pages/guide/index.wxss
View file @
d0a1bf1c
...
...
@@ -24,18 +24,18 @@
}
.guide-wrapper .image {
width: 130px;
height: 95px;
display: inline-block;
flex: 0 0 130px
}
.guide-wrapper .info {
flex: 1;
display: flex;
flex-
direction: column
;
flex-
flow: column nowrap
;
justify-content: space-between;
padding:
5px
10px;
padding:
0
10px;
color: rgb(51, 51, 51);
overflow: hidden;
}
.guide-wrapper .info .intro {
...
...
@@ -46,6 +46,8 @@
overflow: hidden;
}
.guide-wrapper .info .tag {
margin-right: 4px;
.guide-wrapper .info .text-hint {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
pages/index/index.js
View file @
d0a1bf1c
...
...
@@ -3,6 +3,9 @@ import api from '../../utils/Api.js'
import
Config
from
'../../utils/Config.js'
const
app
=
getApp
()
const
{
$Message
}
=
require
(
'../../iview/base/index'
);
Page
({
...
...
@@ -37,7 +40,62 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
// 检查用户是否登陆
this
.
checkUserLogin
()
wx
.
showShareMenu
({
withShareTicket
:
true
,
success
:
function
(
ret
)
{
console
.
log
(
'shareTickets:'
,
ret
)
}
})
},
/**
* 用户资料授权
*/
checkUserLogin
:
function
(
callback
)
{
if
(
app
.
globalData
.
userInfo
==
null
)
{
api
.
me
.
info
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
app
.
globalData
.
userInfo
=
res
.
data
}
else
{
$Message
({
content
:
'请授权登录美行者亲子游'
,
type
:
'warning'
})
setTimeout
(()
=>
{
wx
.
navigateTo
({
url
:
'/pages/auth/index'
,
})
},
800
)
}
})
}
// console.log(wx.getStorageSync('token') )
// if (!wx.getStorageSync('token')) {
// $Message({
// content: '请授权登录美行者亲子游',
// type: 'warning'
// })
// setTimeout(()=>{
// wx.navigateTo({
// url: '/pages/auth/index',
// })
// }, 800)
// } else {
// api.me.info().then(res => {
// if(res.code == 0){
// app.globalData.userInfo = res.data
// }else{
// $Message({
// content: res.msg,
// type: 'error'
// })
// }
// })
// }
},
/**
...
...
pages/index/index.json
View file @
d0a1bf1c
...
...
@@ -8,6 +8,7 @@
"i-cell-group"
:
"/iview/cell-group/index"
,
"i-cell"
:
"/iview/cell/index"
,
"i-row"
:
"/iview/row/index"
,
"i-col"
:
"/iview/col/index"
"i-col"
:
"/iview/col/index"
,
"i-message"
:
"/iview/message/index"
}
}
\ No newline at end of file
pages/index/index.wxml
View file @
d0a1bf1c
...
...
@@ -33,7 +33,7 @@
<image class='image' src="{{n.poster}}" mode='aspectFill'></image>
<view class='title'>{{n.title}}</view>
<view class='info'>
<text class='text-red text-small mergin-right-2'>¥{{common.numFixed(n.
vip_
price, 0)}}</text>
<text class='text-red text-small mergin-right-2'>¥{{common.numFixed(n.price, 0)}}</text>
<text> 起/{{n.night_num}}晚</text>
</view>
</view>
...
...
@@ -42,8 +42,8 @@
</i-cell-group>
<i-cell-group i-class="section-wrapper">
<i-cell title="
酒店预订
" is-link i-class="text-mtitle">
<text slot="footer" class='text-gray text-small' catchtap='gotoSearchProjects' data-catalog='5' data-name='
酒店预订
'>更多</text>
<i-cell title="
美行推荐
" is-link i-class="text-mtitle">
<text slot="footer" class='text-gray text-small' catchtap='gotoSearchProjects' data-catalog='5' data-name='
美行推荐
'>更多</text>
</i-cell>
<i-row i-class="col-wrapper">
<i-col span="12" i-class="col-class" wx:for="{{businesses}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
...
...
@@ -51,7 +51,7 @@
<image class='image' src="{{n.poster}}" mode='aspectFill'></image>
<view class='title'>{{n.title}}</view>
<view class='info'>
<text class='text-red text-small mergin-right-2'>¥{{common.numFixed(n.
vip_
price, 0)}}</text>
<text class='text-red text-small mergin-right-2'>¥{{common.numFixed(n.price, 0)}}</text>
<text> 起/{{n.night_num}}晚</text>
</view>
</view>
...
...
@@ -69,10 +69,12 @@
<view class='info'>
<view class='text-small intro'>{{n.title ? n.title : ''}}</view>
<view class='text-small text-hint'>
<text>{{n.intro}}</text>
{{n.intro}}
</view>
</view>
</view>
</view>
</i-cell-group>
<i-message id="message" />
</view>
\ No newline at end of file
pages/index/index.wxss
View file @
d0a1bf1c
...
...
@@ -57,15 +57,14 @@ page {
.guides-wrapper {
position: relative;
padding
: 0 15px;
margin
: 0 15px;
}
.guide-item {
position: relative;
border-bottom: 1px solid #eee;
padding: 10px 0;
display: flex;
flex-
direction: row
;
flex-
flow: row nowrap
;
justify-content: space-between;
}
...
...
@@ -75,18 +74,19 @@ page {
}
.guide-item image {
display: inline-block;
width: 130px;
height: 95px;
flex: 0 0 130px
}
.guide-item .info {
flex: 1;
display: flex;
flex-
direction: column
;
flex-
flow: column nowrap
;
justify-content: space-between;
padding: 5px 10px;
padding: 0 6px;
padding-left: 12px;
color: rgb(51, 51, 51);
overflow: hidden;
}
.guide-item .info .intro {
...
...
@@ -96,7 +96,14 @@ page {
-webkit-box-orient: vertical;
overflow: hidden;
}
.text-mtitle{
.text-mtitle {
font-size: 16px;
font-weight: bolder;
}
.guide-item .info .text-hint {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
\ No newline at end of file
pages/me/vip/index.wxml
View file @
d0a1bf1c
...
...
@@ -9,7 +9,7 @@
<view class='calculation-box'>
<i-row class='height'>
<i-col span="6" offset='1' i-class="col-class">{{user.is_vip==1?'续费':'购买'}}会员</i-col>
<i-col span="4" i-class="col-class color-orange">¥
{{vip_price}}</i-col>
<i-col span="4" i-class="col-class color-orange">¥{{vip_price}}</i-col>
<i-col span="12" offset='1' i-class="col-class">
<i-input-number i-class="vip_num_input" value="{{ value1 }}" min="1" max="10" bindchange="handleChange1" />
</i-col>
...
...
project.config.json
View file @
d0a1bf1c
...
...
@@ -14,7 +14,7 @@
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.3.2"
,
"appid"
:
"wx1b834552a7d49bb3"
,
"projectname"
:
"
mxz
"
,
"projectname"
:
"
%E7%BE%8E%E8%A1%8C%E8%80%85%E4%BA%B2%E5%AD%90%E6%B8%B8
"
,
"debugOptions"
:
{
"hidedInDevtools"
:
[]
},
...
...
@@ -37,7 +37,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
1
1
,
"current"
:
1
4
,
"list"
:
[
{
"id"
:
0
,
...
...
@@ -91,7 +91,7 @@
"id"
:
8
,
"name"
:
"活动/商家详情"
,
"pathName"
:
"pages/detail/index"
,
"query"
:
"id=12"
"query"
:
"id=12
7
"
},
{
"id"
:
-1
,
...
...
@@ -109,7 +109,7 @@
"id"
:
11
,
"name"
:
"预约下次"
,
"pathName"
:
"pages/detail/appoint/index"
,
"query"
:
"id=
8
"
"query"
:
"id=
173
"
},
{
"id"
:
-1
,
...
...
@@ -123,6 +123,12 @@
"pathName"
:
"pages/index/index"
,
"query"
:
""
,
"scene"
:
"1047"
},
{
"id"
:
-1
,
"name"
:
"预约下次"
,
"pathName"
:
"pages/detail/appoint/index"
,
"query"
:
"id=173"
}
]
}
...
...
wxParse/wxParse.js
View file @
d0a1bf1c
...
...
@@ -33,12 +33,12 @@ function wxParse(bindName = 'wxParseData', type='html', data='<div class="color:
var
transData
=
{};
//存放转化后的数据
if
(
type
==
'html'
)
{
transData
=
HtmlToJson
.
html2json
(
data
,
bindName
);
console
.
log
(
JSON
.
stringify
(
transData
,
' '
,
' '
));
//
console.log(JSON.stringify(transData, ' ', ' '));
}
else
if
(
type
==
'md'
||
type
==
'markdown'
)
{
var
converter
=
new
showdown
.
Converter
();
var
html
=
converter
.
makeHtml
(
data
);
transData
=
HtmlToJson
.
html2json
(
html
,
bindName
);
console
.
log
(
JSON
.
stringify
(
transData
,
' '
,
' '
));
//
console.log(JSON.stringify(transData, ' ', ' '));
}
transData
.
view
=
{};
transData
.
view
.
imagePadding
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment