微信小程序之在线任务发布与接单平台(3)
2018-03-31 09:26
316 查看
评价模块://serviceshow.js
var 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
4000
_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' // 分享路径
}
}
})
var 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
4000
_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' // 分享路径
}
}
})
相关文章推荐
- 微信小程序之在线任务发布与接单平台(图)
- 微信小程序之在线任务发布与接单平台(2)
- 微信第三方平台:小程序模板开发与发布
- 微信第三方平台:小程序模板开发与发布
- 微信公众账号第三方平台全网发布源码(java)- 实战测试通过
- WordPress版微信小程序2.1.5版发布
- 微信小程序添加悬浮在线客服会话按钮
- 老徐讲解小程序与微信第三方平台及微信官方的关系。
- 原创:经验分享:微信小程序外包接单常见问题及流程
- vs 2010 程序发布时出现 TransformXml任务意外失败
- 微信小程序(2)-小程序信息完善以及开发前准备,代码审核与发布
- 发布体验版小程序-微信小程序开发-视频教程15
- 微信小程序,个人开发者创业新平台
- 沐雪微信平台3.1正式发布
- 不久前重新安装了Windows7,在安装了VS2010 开发平台之后,将网站发布到IIS,访问发生如下错误: HTTP 错误 500.21 - Internal Server Error处理程序“N
- 【PHP自学笔记1】如何搭建配置PHP环境、云平台发布、第一个HelloWorld程序
- 上传多图发布 微信小程序
- 微信第三平台全网发布小结
- 微信官方又有新动作,小程序的四大功能即将发布!
- 在线生成小程序码,微信生成带参数小程序码