Commit dc19c311 by YangChengYuan

冲突

parents 4fa27123 2ebbca10
......@@ -31,7 +31,7 @@
<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>
<text>参考价格:<text class='text-red'>¥{{detail.price}}起<text wx-if="{{detail.night_num}}">/{{detail.night_num}}晚</text></text> </text>
</view>
</i-cell>
<i-cell wx-if="{{detail.type=='1'}}">
......
......@@ -16,7 +16,7 @@
<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 wx:if="{{n.night_num}}"> 起/{{n.night_num}}晚</text>
<text> 起<text wx:if="{{n.night_num}}">/{{n.night_num}}晚</text></text>
</view>
</view>
</i-col>
......@@ -34,7 +34,7 @@
<view class='title'>{{n.title}}</view>
<view class='info'>
<text class='text-red text-small mergin-right-2'>¥{{common.numFixed(n.price, 0)}}</text>
<text wx:if="{{n.night_num}}"> 起/{{n.night_num}}晚</text>
<text> 起<text wx:if="{{n.night_num}}">/{{n.night_num}}晚</text></text>
</view>
</view>
</i-col>
......
......@@ -12,13 +12,15 @@ Page({
data: {
value1: 1,
value2: 0.1,
visible2: false,
vip_price: 49.9,
order: {},
user: {},
name: '',
address: '',
wx_number: '',
visible1: false,
},
handleChange1({
......@@ -37,6 +39,32 @@ Page({
})
},
handleName: function(e) {
this.setData({
name: e.detail.detail.value
})
},
handleWx: function(e) {
this.setData({
wx_number: e.detail.detail.value
})
},
handleAddress: function(e) {
this.setData({
address: e.detail.detail.value
})
},
modelCancel: function() {
console.log(this.data.visible2);
this.setData({
visible2: false
})
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -49,28 +77,19 @@ Page({
getUserInfo: function() {
api.me.info().then(res => {
if (!res.code) {
//授权手机号
this.dialogPhone(res.data)
console.log(res.data);
app.globalData.userInfo = res.data
// 渲染数据
this.setData({
user: res.data
user: res.data,
name: res.data.name,
wx_number: res.data.wx_number,
address: res.data.address,
})
}
})
},
/**
* 手机号授权弹窗
*/
dialogPhone: function(data) {
if (!data.phone) {
this.setData({
visible1: true
});
}
},
handlePhoneAuth: function(event) {
Wx.login().then(res => {
let encryptedData = event.detail.encryptedData
......@@ -91,12 +110,11 @@ Page({
}).then(res => {
if (!res.code) {
that.setData({
visible1:false
visible1: false
})
that.setData({
visible2: true
})
$Toast({
content: '手机号授权成功',
type: 'success'
});
//更新下用户数据
that.getUserInfo()
} else {
......@@ -180,8 +198,14 @@ Page({
handleClick: function() {
let that = this
let year = this.data.value1
let wx_number = this.data.wx_number
let name = this.data.name
let address = this.data.address
let params = {
year: year
year: year,
wx_number: wx_number,
name: name,
address: address
}
// 获取支付参数
api.me.vipOrder(params).then(res => {
......@@ -217,6 +241,7 @@ Page({
} else {
wx.showToast({
title: res.msg,
icon: 'none'
})
}
})
......
......@@ -20,13 +20,19 @@
会员卡说明:用户购买一次会员卡后,增加一年的会员时限,多次购买则在先有的基础上延长时间,单次以1年为标准。
</view>
<!-- 用户输入的信息 -->
<!-- <i-input i-class="right-align" value="" title="姓名" type="text" placeholder="请输入您的姓名" />
<view class='phoneGive'>
<!-- 用户输入的信息 -->
<i-input title="姓名" bindchange="handleName" type="text" right="true" value="{{ user.name }}" placeholder="请输入姓名" maxlength="50" />
<view class='phoneGive' wx:if="{{!user.phone}}">
<text>手机号</text>
<button>授权</button>
</view>
<i-input i-class="right-align right-align-last" type="text" title="地址" placeholder="请输入您的地址" maxlength="50" /> -->
<button bindgetphonenumber="handlePhoneAuth" open-type="getPhoneNumber">授权</button>
</view>
<i-input wx:else title="手机号" type="text" right="true" value="{{ user.phone }}" placeholder="请输入手机号" disabled/>
<i-input bindchange="handleWx" title="微信号" type="text" right="true" value="{{ user.wx_number }}" placeholder="请输入微信号" maxlength="50" />
<i-input bindchange="handleAddress" value="{{ user.address }}" right="true" type="text" title="地址" placeholder="请输入地址" maxlength="50" />
<i-row class='height'>
<i-col span="20" offset='2' i-class="col-class">
......@@ -34,12 +40,9 @@
</i-col>
</i-row>
<!-- 授权弹窗 -->
<i-modal title="请授权手机号" visible="{{ visible1 }}" show-cancel="{{false}}" show-ok="{{false}}" action-mode="{{ vertical }}">
<view class="auth_phone_container">
<i-button i-class="btn_auth_phone" type="info" shape="circle" size="default" bindgetphonenumber="handlePhoneAuth" open-type="getPhoneNumber">授权</i-button>
</view>
</i-modal>
<!-- toast弹窗 -->
<i-toast id="toast" />
<i-modal visible="{{ visible2 }}" bind:ok="modelCancel" title="温馨提示" show-cancel="{{false}}">
<view class="modelCancel">系统已自动关联您在其他平台购买的美行者VIP会员,请点击确定查看详情</view>
</i-modal>
\ No newline at end of file
......@@ -102,3 +102,8 @@ page {
width: 80%;
margin: auto;
}
.modelCancel{
width:90%;
margin:auto;
}
\ No newline at end of file
......@@ -5,7 +5,11 @@
// }
export const Config = {
<<<<<<< HEAD
apiPath: "http://local.picp.io/api/",
=======
apiPath: "http://local.picp.io//api/",
>>>>>>> 2ebbca1059aec42084726e53501cfcf564b7c5ac
mobPath: "https://mavaler.jqhulian.com/mob/",
shopJoinPath: "https://mavaler.jqhulian.com/mob/Index/shopjoin"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment