Commit b658abc4 by 张立顺

组件调整

1 parent 88be25cd
Showing 23 changed files with 87 additions and 66 deletions
......@@ -97,7 +97,6 @@
"remark-popup": "/components/RemarkPopup/RemarkPopup",
"tab-bar": "/components/TabBar/TabBar",
"order-confirm": "/components/Confirm/Confirm",
"account-switch": "components/accountSwitch/accountSwitch",
"qr-box": "components/Qrbox/Qrbox",
"modal": "components/modal/modal",
"shareModal": "components/shareModal/shareModal",
......
// components/accountSwitch.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
<!--components/accountSwitch.wxml-->
<text>components/accountSwitch.wxml</text>
/* components/accountSwitch.wxss */
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
......@@ -123,7 +123,10 @@ Page({
},
getDetail() {
let { routeInfo, apiObj } = this.data
let {
routeInfo,
apiObj
} = this.data
if (!routeInfo?.apiName) {
return
}
......@@ -152,14 +155,36 @@ Page({
// ocr图片识别
reWrite(type, data) {
console.log(type, data)
let { serviceInfo } = this.data
let {
serviceInfo
} = this.data
if (type == 'vehicleCertificate') {
let { vinNo: vin, seatingCapacity: seatesNum, engineNo: engineNo, carColor: vehicleColor } = data
serviceInfo = Object.assign(serviceInfo, { vin, seatesNum, engineNo, vehicleColor })
let {
vinNo: vin,
seatingCapacity: seatesNum,
engineNo: engineNo,
carColor: vehicleColor
} = data
serviceInfo = Object.assign(serviceInfo, {
vin,
seatesNum,
engineNo,
vehicleColor
})
}
if (type == 'idCard') {
let { name: customerName, address: customerAddress, cardNo: cardNo } = data
serviceInfo = Object.assign(serviceInfo, { customerName, customerAddress, cardNo, customerType: 1, customerTypeName: '个人' })
let {
name: customerName,
address: customerAddress,
cardNo: cardNo
} = data
serviceInfo = Object.assign(serviceInfo, {
customerName,
customerAddress,
cardNo,
customerType: 1,
customerTypeName: '个人'
})
console.log(serviceInfo, 'serviceInfo')
}
......@@ -196,7 +221,9 @@ Page({
draft: 0,
confirm: 1
}
let { serviceInfo } = this.data
let {
serviceInfo
} = this.data
let type = e.detail?.type || 'draft'
let params = this.dealComfirmData(JSON.parse(JSON.stringify(serviceInfo)))
// 0草稿,1提单
......@@ -221,16 +248,23 @@ Page({
// 错误跳转
handleErrorJump(e) {
let { height } = e.detail
let {
height
} = e.detail
this.setData({
scrollTop: height // 滚动到的位置(距离顶部 px)
})
},
handleSecondConfirm(e) {
let { serviceInfo, conSecondObj } = this.data
let {
serviceInfo,
conSecondObj
} = this.data
if (e.detail?.type == 'confirm') {
carLifeApi.checkVin({ vin: serviceInfo.vin }).then(res => {
carLifeApi.checkVin({
vin: serviceInfo.vin
}).then(res => {
if (res.code == '0') {
this.confirm(e)
} else if (res.code == '-2') {
......@@ -262,7 +296,9 @@ Page({
},
handleTipClick(e) {
let { type } = e.currentTarget.dataset
let {
type
} = e.currentTarget.dataset
if (type == 'success') {
this.getUrl()
return true
......@@ -276,7 +312,9 @@ Page({
},
handleTipClose(e) {
let { type } = e.currentTarget.dataset
let {
type
} = e.currentTarget.dataset
if (type == 'success') {
this.getUrl()
return true
......@@ -308,7 +346,9 @@ Page({
},
handleDownload() {
let { url } = this.data
let {
url
} = this.data
let _this = this
if (!url) {
wx.$util.showToast('没有合同')
......@@ -324,8 +364,7 @@ Page({
manage.saveFile({
tempFilePath: res.tempFilePath,
filePath: wx.env.USER_DATA_PATH + "/" + fileName,
success: function (res) {
}
success: function (res) {}
})
wx.openDocument({
filePath: wx.env.USER_DATA_PATH + "/" + fileName,
......@@ -346,6 +385,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options, 'options');
this.setData({
userInfo: wx.$util.getStorageSync('dj_boutique_user_info')
})
......@@ -355,25 +395,34 @@ Page({
// })
// this.getDetail()
//删---end
wx.$router.getData(res => {
this.setData({
routeInfo: res
})
console.log(this.data.routeInfo)
this.getDetail()
// wx.$router.getData(res => {
// console.log(res);
// this.setData({
// routeInfo: res
// })
// // console.log(this.data.routeInfo)
// this.getDetail()
// })
},
onRoute(options) {
console.log(options);
this.setData({
routeInfo: options
})
this.getDetail()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() { },
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
let { isBack } = this.data
let {
isBack
} = this.data
if (isBack) {
wx.$router.reLaunch('packageEquity.equityPage')
}
......@@ -382,25 +431,25 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide() { },
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() { },
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() { },
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() { },
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() { }
})
onShareAppMessage() {}
})
\ No newline at end of file
......@@ -176,6 +176,8 @@ Page({
// console.log(e.currentTarget.dataset)
let { name } = e.detail
console.log(name)
// this.navigator()
// return
this[name]()
},
cancel() {
......@@ -222,6 +224,7 @@ Page({
},
navigator() {
let { orderId } = this.data
console.log(orderId,'orderId');
wx.$router.redirectTo('serviceInfo', {
orderId: orderId,
apiName: 'handler'
......
{
"usingComponents": {
"auth-setting": "/components/authSetting/authSetting"
"auth-setting": "../components/authSetting/authSetting"
}
}
{
"component": true,
"usingComponents": {}
"component": true,
"usingComponents": {}
}
\ No newline at end of file
......@@ -17,7 +17,7 @@
<!-- </block> -->
{{title||'日期选择'}}
<view class='calender-close' bindtap="showCalendar">
<image src="../images/close.png" class='calender-close-image' />
<image src="/images/close.png" class='calender-close-image' />
</view>
</view>
<block wx:if='{{showSubTitle}}'>
......
{
"navigationStyle": "custom",
"usingComponents": {
"CalendarMonth": "/components/CalendarMonth/CalendarMonth"
"CalendarMonth": "../components/CalendarMonth/CalendarMonth"
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!