123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- // pages/mine/wxml/directlivemodification/directlivemodification.js
- const app = getApp();
- Page({
- /**
- * 页面的初始数据
- */
- bindPickerChange: function(e) {
- //console.log('picker发送选择改变,携带值为', e.detail.value)
- this.setData({
- index: e.detail.value
- })
- },
- bindTimeChange: function(e) {
- //console.log('picker发送选择改变,携带值为', e.detail.value)
- this.setData({
- time: e.detail.value
- })
- },
- bindDateChange: function(e) {
- //console.log('picker发送选择改变,携带值为', e.detail.value)
- this.setData({
- date: e.detail.value
- })
- },
- bindTimeChanges: function(e) {
- //console.log('picker发送选择改变,携带值为', e.detail.value)
- this.setData({
- times: e.detail.value
- })
- },
- bindDateChanges: function(e) {
- //console.log('picker发送选择改变,携带值为', e.detail.value)
- this.setData({
- dates: e.detail.value
- })
- },
- //修改后上传拍卖会
- formSubmit: function(e) {
- let _this = this;
- // console.log(_this.data.live_room_id)
- // //console.log(Number(e.detail.value.start))
- var auction_way = "";
- if (e.detail.value.name !== "") {
- if (e.detail.value.describe !== "") {
- wx.request({
- url: app.globalData.prodUrl + 'web-pm/wx/pm/update_live_room',
- header: {
- 'ydw-token': wx.getStorageSync('key').ydw_token
- },
- data: {
- name: e.detail.value.name,
- content: e.detail.value.describe,
- live_room_id: _this.data.live_room_id
- },
- success: function(data) {
- //console.log(data)
- wx.showToast({
- title: '上传拍卖会成功!',
- icon: 'none',
- duration: 3000,
- success: function () {
- setTimeout(function () {
- wx.navigateBack({
- delta: 1,
- success: function () {
- var pages = getCurrentPages();
- var page = getCurrentPages().pop();
- //console.log(pages)
- if (page == undefined || page == null) return;
- pages[2].onLoad(pages[2].options);
- }
- });
- }, 2000)
- }
- });
- }
- })
- }else{
- wx.showToast({
- title: '拍卖会描述不得为空!',
- icon: 'none',
- duration: 2000
- })
- }
- } else {
- wx.showToast({
- title: '拍卖行名称不得为空!',
- icon: 'none',
- duration: 2000
- })
- }
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function(options) {
- //console.log(options)
- var _this = this
- _this.setData({
- live_room_id: options.kid
- })
- 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)
- _this.setData({
- name: data.data.liveroom.name,
- describe: data.data.liveroom.content
- })
- },
- });
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function() {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function() {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function() {
- }
- })
|