Commit 2cd34fe6 authored by 华国豪's avatar 华国豪 🙄

1

parent d5f1126d
......@@ -115,7 +115,6 @@
border-top:1px solid #E9E9E9;
display: flex;
align-items: center;
}
.PayView>view{
display: inline-flex;
......
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
Phone: '',
type: '',
TCID: '',
dataList: [],
tipsMsg: ""
},
goPage: function (e) {
let index = e.currentTarget.dataset.index;
let name = this.data.dataList[index].nameID
let orderId = this.data.dataList[index].OrderId
wx.setStorage({
key: "info",
data: {
ID: this.data.dataList[index].Id,
nameID: name
}
})
wx.navigateTo({
url: '/pages/Voucher/VoucherDetails/VoucherDetails?&orderId=' + orderId + '&tcId=' + this.data.TCID
})
},
bindgetphonenumber: function (e) {
console.log(e)
let _this = this
if (e.detail.iv) {
wx.login({
success(res) {
if (res.code) {
let code = res.code
console.log(code)
let msg = {
encryptedData: e.detail.encryptedData,
iv: e.detail.iv,
code: code
}
app.$api('survey_post_GetGuestWeiXinMobile', msg).then(res => {
console.log(JSON.parse(res))
let d = JSON.parse(res)
_this.setData({
Phone: d.phoneNumber
})
console.log(_this.data.Phone)
_this.Details()
}).catch(err => {
})
} else {
console.log('登录失败!' + res.errMsg)
}
}
})
}
},
//输入手机号
TelPhone: function (e) {
let val = e.detail.value.replace(/\s*/g, "")
this.setData({
Phone: val
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
type: options.type,
TCID: options.TCID
})
},
Details: function (){
if (this.Phone == '') {
wx.showToast({
title: '请输入'+ this.data.type == '1' ? '手机号' : '护照号',
icon: 'none',
duration: 1000
})
return
}
let msg = {
type: this.data.type,
guestMobile: this.data.Phone,
TCID: this.data.TCID
}
app.$api('miniProgram_price_GetGuestByPhone_V2', msg).then(res => {
console.log(res)
if (res.length<1) {
wx.showToast({
title: "暂未找到相关信息",
icon: 'none',
duration: 1000
})
return
}
for (let i = 0; i < res.length; i++) {
res[i].nameID = res[i].SurName + (res[i].Sex === 1 ? '先生' : '女士');
res[i].MobilePhoneS = res[i].MobilePhone.substr(0, 3) + '****' + res[i].MobilePhone.substr(7)
}
this.setData({
dataList: res
})
}).catch(err => {
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view class="authenticat" wx:if="{{type == 1 && dataList.length < 1}}">
<text class='text'>身份确认</text>
<view class="phone-box">
<input bindinput='TelPhone' value="{{Phone}}" placeholder='请输入手机号'></input>
<button type="default" class="getPhoneNumber" open-type="getPhoneNumber" bindgetphonenumber="bindgetphonenumber" size="mini">获取手机号</button>
</view>
<button class='next {{telPhone !== "" ? "active" : ""}}' type="default" size="mini" bindtap="Details">确认</button>
</view>
<view class="authenticat" wx:elif="{{type == 2 && dataList.length < 1}}">
<text class='text'>身份确认</text>
<view class="phone-box">
<input bindinput='TelPhone' placeholder='请输入护照号'></input>
</view>
<button class='next {{telPhone !== "" ? "active" : ""}}' type="default" size="mini" bindtap="Details">确认</button>
</view>
<view class="authenticat" wx:elif="{{dataList.length > 0}}">
<view class='item' wx:for="{{dataList}}" wx:for-index="index" wx:for-item="item" wx:key="index" data-index="{{index}}" bindtap='goPage'>
<view>
<text class='name'>{{item.SurName + item.Name}}</text>
<text class='phone'>{{item.MobilePhoneS}}</text>
</view>
<image mode='widthFix' src='../../../images/group/chakn.png'></image>
</view>
</view>
<view wx:else class='f26' style='width:80%;margin: 2rem auto'>
{{tipsMsg}}
</view>
\ No newline at end of file
page{
background-color: white !important;
}
.authenticat{
padding: 20rpx;
}
.phone-box{
border-bottom: 2px solid #DEDEDE;
display: flex;
margin-top: 70rpx;
}
.authenticat .text{
font-size: 48rpx;
font-weight:500;
}
.authenticat input{
font-size: 40rpx;
height: 3.4rem;
box-sizing: border-box;
width: 70%;
color: #000000;
}
.getPhoneNumber{
width: 29%;
line-height: 3.4rem !important;
background-color: #fff !important;
border-color: #F5F5F5;
}
.getPhoneNumber.button-hover{
background-color: #F5F5F5 !important;
}
button.getPhoneNumber::after{
border: none !important;
}
button.next{
width: 350rpx;
height: 84rpx;
background-color: #DEDEDE;
line-height:84rpx;
margin-top: 106rpx;
border-color: #DEDEDE;
color: #666666;
font-size: 32rpx;
}
button.next.active{
background:rgba(238,68,84,1);
border-color: rgba(238,68,84,1);
color: white;
}
.authenticat .item{
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
font-size: 28rpx;
border-bottom: 1px solid #DEDEDE
}
.authenticat .item>view{
display: flex;
align-items: center;
}
.phone{
padding-left: 10rpx;
}
.name{
width: 250rpx;
display: inline-block;
}
.authenticat .item image{
width: 10rpx;
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ Page({
onLoad: function (options) {
let userInfo = wx.getStorageSync('admin')
this.setData({
url: "https://activity.oytour.com/html/task/home.html?customerId=" + userInfo.id + "&accountId=" + userInfo.customerAccountId + "&token=" + userInfo.token + "&secretKey=" + userInfo.secretKey
url: "http://activity.oytour.com/html/task/home.html?customerId=" + userInfo.id + "&accountId=" + userInfo.customerAccountId + "&token=" + userInfo.token + "&secretKey=" + userInfo.secretKey
})
},
......
......@@ -12,9 +12,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
url: "https://activity.oytour.com/html/invesDetails.html" + '?ID=' + options.ID + '&name=' + encodeURI(options.name) + '&MobilePhone=' + options.MobilePhone
url: "http://activity.oytour.com/html/invesDetails.html" + '?ID=' + options.ID + '&name=' + encodeURI(options.name) + '&MobilePhone=' + options.MobilePhone
})
console.log(this.data.url)
},
......
......@@ -24,16 +24,19 @@ Page({
tagID: 1,
tagIndex: 0,
},
formSubmit: function (e) {
formSubmit: function(e) {
wx.getStorage({
key: 'admin',
success: res => {
let url = e.detail.target.dataset.url;
let index = e.detail.target.dataset.index;
let formId = e.detail.formId;
app.$apiSaveFormId('survey_post_SaveFormId', { formId: formId, customerId: res.data.id }).then(res => {
app.$apiSaveFormId('survey_post_SaveFormId', {
formId: formId,
customerId: res.data.id
}).then(res => {
console.log(res)
}).catch(err => { })
}).catch(err => {})
if (this.data.dataList[Number(index)].getScoreNum > -1) {
wx.navigateTo({
url: url + '?orderId=' + this.data.dataList[Number(index)].orderId,
......@@ -43,7 +46,7 @@ Page({
})
},
// 加载更多
scrollGetMore: function () {
scrollGetMore: function() {
console.log(1)
this.setData({
'getOrderMsg.pageIndex': this.data.pageIndex + 1
......@@ -51,13 +54,14 @@ Page({
this.getOrderList(1)
},
// 获取数据
getOrderList: function (type) {
getOrderList: function(type) {
let url = 'api/b2b/user/getrecentorder',
msg = this.data.getOrderMsg;
if (this.data.pageIndex >= this.data.totalPage && type) {
return
}
this.data.getOrderMsg.CustomerId = this.data.userInfo.id
// this.data.getOrderMsg.CustomerId = 2006
app.$apiJavaNew(url, msg).then(res => {
let arr = this.data.dataList;
let arr2 = res.pageData
......@@ -77,12 +81,12 @@ Page({
pageIndex: res.pageIndex,
count: res.count
})
}).catch(err => { })
}).catch(err => {})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
let userInfo = wx.getStorageSync('admin');
this.setData({
userInfo: userInfo,
......@@ -96,49 +100,49 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
this.getOrderList()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
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