12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- const WxParse = require('../../wxParse/wxParse.js')
- const $ = global
-
- new $.Page({
- onLoad() {
- var article = '<div>我是富文本</div>'
- /**
- * WxParse.wxParse(bindName , type, data, target,imagePadding)
- * 1.bindName绑定的数据名(必填)
- * 2.type可以为html或者md(必填)
- * 3.data为传入的具体数据(必填)
- * 4.target为Page对象,一般为this(必填)
- * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选)
- */
- WxParse.wxParse('article', 'html', article, this, 5)
- },
- bookServer() {
- const {
- name,
- phone,
- address,
- notes
- } = this.data;
- if (!name || !phone || !address) {
- return $.wx.showToast({
- title: '请把信息填写完整'
- });
- }
- if (!this._isPhone(phone)) {
- return $.wx.showToast({
- title: '请输入正确的手机号码'
- });
- }
- $.wx.showToast({
- title: '加载中'
- }, 'loading');
- $.request('housekeeper_order/store', 'POST', {
- contents: '保洁服务',
- people_num: '1-2人',
- notes,
- server_time: '白天',
- address,
- rest: '晚上',
- area: '60-120平',
- contact: name,
- phone
- }).then((res) => {
- $.wx.hideToast('loading');
- $.router.goto({
- path: '/pages/order/index',
- type: $.ROUTER_TYPE.SWITCH_TAB
- });
- });
- },
- radioChange(e) {
-
- }
- })
|