You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
859 B
36 lines
859 B
// pages/home/customer-info/index.js
|
|
import { getCustomerInfo } from "../../../api/saas"
|
|
const util = require('../../../utils/util')
|
|
|
|
Page({
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
form: null,
|
|
base64: null,
|
|
showEmbedded: false,
|
|
customerName: ''
|
|
},
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
if(options.id){
|
|
wx.showLoading({ title: '正在获取', mask: true })
|
|
getCustomerInfo(options.id).then(result => {
|
|
wx.hideLoading()
|
|
this.setData({ form: result.data })
|
|
}).catch(err => {
|
|
wx.hideLoading()
|
|
util.showToast(err)
|
|
})
|
|
}
|
|
},
|
|
onClickHideEmbedded: function(){
|
|
this.setData({ showEmbedded: false })
|
|
},
|
|
registCustomer: function(){
|
|
wx.navigateTo({ url: `/pages/client/registe/index?id=${this.data.form.id}` })
|
|
}
|
|
})
|