123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- // pages/mine/wxml/establish/establish.js
- const app = getApp();
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- textareaVal:''
- },
- //上传
- formSubmit: function(e) {
- var _this = this;
- var auction_way = "";
- if (e.detail.value.name !== "" && _this.data.textareaVal !== '') {
- wx.request({
- url: app.globalData.prodUrl + 'web-pm/wx/pm/create_live_room',
- header: {
- 'ydw-token': wx.getStorageSync('key').ydw_token
- },
- data: {
- name: e.detail.value.name,
- content: _this.data.textareaVal,
- },
- success: function(data) {
- //console.log(data)
- if (data.data.success) {
- wx.showToast({
- title: '上传拍卖会成功!',
- icon: 'none',
- duration: 3000,
- success: function () {
- setTimeout(function () {
- wx.navigateBack({
- delta: 1,
- success: function () {
- }
- });
- }, 2000)
- }
- });
- }
- }
- })
- } else {
- if (e.detail.value.name == "") {
- wx.showToast({
- title: '拍卖会名称不得为空!',
- icon: 'none',
- duration: 2000
- })
- } else if (_this.data.textareaVal == '') {
- wx.showToast({
- title: '拍卖会描述不得为空!',
- icon: 'none',
- duration: 2000
- })
- }
- }
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function(options) {
- //console.log(options)
- var _this =this
- wx.request({
- url: app.globalData.prodUrl + 'web-pm/wx/pm/get_live_room',
- header: {
- 'ydw-token': wx.getStorageSync('key').ydw_token
- },
- data: {
- live_room_id: options.kid
- },
- success: function (data) {
- //console.log(data.data.liveroom)
- },
- });
- },
- bindTextAreaBlur: function (e) {
- this.setData({
- textareaVal: e.detail.value
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function() {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function() {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function() {
- }
- })
|