微信小程序> 微信小程序之在线任务发布与接单平台(3)

微信小程序之在线任务发布与接单平台(3)

浏览量:1162 时间: 来源:LINZHENYU1996

评价模块:

//serviceshow.jsvar app=getApp()Page({  data:{    selected1:true,    selected2:false,    out_judge_s:{},    out_judge_t:{},    in_judge_s:{},    in_judge_t:{},    judge_s:{},    judge_t:{},    open_id:""  },  selected1:function(){    var that2=this;    this.setData({      selected1:true,      selected2:false    })    wx.getStorage({      key: 'out_judge_t',      success: function(res){        // success        that2.setData({          judge_t:res.data        })      },      fail: function(res) {        // fail      },      complete: function(res) {        // complete      }    })      wx.getStorage({      key: 'out_judge_s',      success: function(res){        // success        that2.setData({          judge_s:res.data        })      },      fail: function(res) {        // fail      },      complete: function(res) {        // complete      }    })  },  selected2:function(){    var that2=this;    this.setData({      selected1:false,      selected2:true    })    wx.getStorage({      key: 'in_judge_t',      success: function(res){        // success        that2.setData({          judge_t:res.data        })      },      fail: function(res) {        // fail      },      complete: function(res) {        // complete      }    })      wx.getStorage({      key: 'in_judge_s',      success: function(res){        // success        that2.setData({          judge_s:res.data        })      },      fail: function(res) {        // fail      },      complete: function(res) {        // complete      }    })  },  onLoad:function(options){    // 生命周期函数--监听页面加载    var that = this;    app.getUserOpenid(function(openid){        that.setData({          open_id:openid      })    })    //获取发出的服务评价      wx.request({        url: 'https://www.cc.com/get_me_judge.php',        data: {          open_id:that.data.open_id,          flag:1        },        method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT        header: {'content-type': 'application/x-www-form-urlencoded'}, // 设置请求的 header        success: function(res){          // success          wx.setStorageSync('out_judge_s', res.data)          that.setData({            judge_s: res.data          })        },        fail: function(res) {          // fail        },        complete: function(res) {          // complete        }      })      wx.request({        url: 'https://www.cc.com/get_me_judge.php',        data: {          open_id:that.data.open_id,          flag:0        },        method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT        header: {'content-type': 'application/x-www-form-urlencoded'}, // 设置请求的 header        success: function(res){          // success          wx.setStorageSync('in_judge_s', res.data)        },        fail: function(res) {          // fail        },        complete: function(res) {          // complete        }      })      wx.request({        url: 'https://www.cc.com/get_me_judge2.php',        data: {          open_id:that.data.open_id,          flag:1        },        method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT        header: {'content-type': 'application/x-www-form-urlencoded'}, // 设置请求的 header        success: function(res){          // success          wx.setStorageSync('out_judge_t', res.data)          that.setData({            judge_t: res.data          })        },        fail: function(res) {          // fail        },        complete: function(res) {          // complete        }      })        wx.request({        url: 'https://www.cc.com/get_me_judge2.php',        data: {          open_id:that.data.open_id,          flag:0        },        method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT        header: {'content-type': 'application/x-www-form-urlencoded'}, // 设置请求的 header        success: function(res){          // success          wx.setStorageSync('in_judge_t', res.data)          },        fail: function(res) {          // fail        },        complete: function(res) {          // complete        }      })  },  onReady:function(){    // 生命周期函数--监听页面初次渲染完成    var that=this;    wx.getStorage({      key: 'out_judge_t',      success: function (res) {        // success        that.setData({          judge_t: res.data        })      },      fail: function (res) {        // fail      },      complete: function (res) {        // complete      }    })    wx.getStorage({      key: 'out_judge_s',      success: function (res) {        // success        that.setData({          judge_s: res.data        })      },      fail: function (res) {        // fail      },      complete: function (res) {        // complete      }    })  },  onShow:function(){    // 生命周期函数--监听页面显示      },  onHide:function(){    // 生命周期函数--监听页面隐藏      },  onUnload:function(){    // 生命周期函数--监听页面卸载  },  onPullDownRefresh: function() {    // 页面相关事件处理函数--监听用户下拉动作      },  onReachBottom: function() {    // 页面上拉触底事件的处理函数  },  onShareAppMessage: function() {    // 用户点击右上角分享    return {      title: 'title', // 分享标题      desc: 'desc', // 分享描述      path: 'path' // 分享路径    }  }})

版权声明

即速应用倡导尊重与保护知识产权。如发现本站文章存在版权问题,烦请提供版权疑问、身份证明、版权证明、联系方式等发邮件至197452366@qq.com ,我们将及时处理。本站文章仅作分享交流用途,作者观点不等同于即速应用观点。用户与作者的任何交易与本站无关,请知悉。

产品经理

手机 : 13312967497

擅长 : 小程序流量变现

扫码领取礼包

热门模板

  • 头条
  • 搜狐
  • 微博
  • 百家
  • 一点资讯
  • 知乎