1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- const app = getApp();
- Page({
- data: {
- phone_number:'18888888888',
- from: '',
- preid: '',
- hiddenThis: true,
- appid: 0
- },
- onLoad: function (options) {
- var that = this, tel = options.tel, preid = options.preid || 0, from = options.from;
- // console.log(tel);
- that.setData({phone_number: tel, preid: preid, from: from})
- },
- //FormId
- formSubmit (e) {
- var formId = e.detail.formId;
- this.getFromid(formId);
- },
- getFromid (formId) {
- wx.request({
- url: app.globalData.HOST + '/user/wx/getFromid',
- method: "POST",
- data: Object.assign({}, app.globalData.common, { from_id: formId }),
- success: function (res) {
- },
- complete: function () {
- }
- });
- },
- goApply () {
- var id = this.data.preid, from = this.data.from, appid = '';
- if (from == 'card') {
- appid = 'X_' + id
- }else{
- console.log(from);
- appid = 'Y_' + id;
- wx.request({
- url: app.globalData.HOST + '/user/wx/known',
- method: "POST",
- data: Object.assign({}, app.globalData.common, {id: id}),
- success: function (res) {
- },
- complete: function () {
- }
- });
- }
- this.setData({hiddenThis: false, appid: appid})
- },
- onReady: function () {
- },
- onShow: function () {
- },
- onHide: function () {
- this.setData({hiddenThis: true})
- },
- onUnload: function () {
- }
- })
|