作者 wumengyu

火才西路

... ... @@ -4,24 +4,24 @@ App({
console.log('app-onshow');
const self = this;
// 查看是否授权
wx.getSetting({
success(res) {
if (res.authSetting['scope.userInfo']) {
console.log('授权过到首页');
self.globalData.isLogin = true;
wx.setStorageSync('isLogin', true)
// wx.redirectTo({
// url: '/pages/index/index', //跳转到首页
// });
} else {
console.log('授权失效到授权页');
self.globalData.isLogin = false;
wx.navigateTo({
url: '/pages/my/my', //跳转到授权页面
})
}
}
})
// wx.getSetting({
// success(res) {
// if (res.authSetting['scope.userInfo']) {
// console.log('授权过到首页');
// self.globalData.isLogin = true;
// wx.setStorageSync('isLogin', true)
// // wx.redirectTo({
// // url: '/pages/index/index', //跳转到首页
// // });
// } else {
// console.log('授权失效到授权页');
// self.globalData.isLogin = false;
// wx.redirectTo({
// url: '/pages/my/my', //跳转到授权页面
// })
// }
// }
// })
},
onLaunch: function () {
console.log('app-onLaunch');
... ... @@ -95,7 +95,7 @@ App({
//init
let that = this;
let postData = data;
let baseUrl = 'http://wmatchrd.com/api';
let baseUrl = 'https://wmatchrd.com/api';
//网络请求
let header = {
'content-type': 'application/x-www-form-urlencoded'
... ...
... ... @@ -13,6 +13,8 @@
}
.input-box textarea {
width: 100%;
box-sizing: border-box;
font-size: 24rpx;
color: #666666;
margin-top: 20rpx;
... ...
// pages/my/suggest/suggest.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "意见反馈"
}
\ No newline at end of file
... ...
<!--pages/my/suggest/suggest.wxml-->
<view class="content">
<!--<view class="title">意见反馈</view>-->
<view class="input">
<textarea name="" id="" cols="30" rows="10"
placeholder="请输入您的意见" maxlength="200"
placeholder-class="placeholder" bindinput="input"
></textarea>
<view class="num">
<view class="iconfont icon-bianji"></view>
<text>限200字以内</text>
</view>
</view>
<view class="btn-box" bindtap="submit">
<view class="btn">提交</view>
</view>
</view>
... ...
/* pages/my/suggest/suggest.wxss */
page {
width: 100%;
height: 100%;
background-color: #f2f2f2;
}
.content {
width: 100%;
height: 100%;
position: relative;
}
.title {
border-bottom: 1rpx solid #ebebeb;
padding: 28rpx 32rpx 28rpx 32rpx;
color:#292525;
font-size: 30rpx;
font-weight: bold;
}
.input {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 68rpx 32rpx 32rpx 32rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
textarea {
width:80%;
border-radius: 16rpx;
background-color: #ffffff;
height: 360rpx;
color: #666666;
font-size: 28rpx;
padding: 30rpx;
}
.placeholder {
color: #999999;
font-size: 28rpx;
}
.btn-box {
width: 100%;
padding: 0 32rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin-top: 102rpx;
}
.btn {
height: 98rpx;
color: #E1C8AF;
font-size: 30rpx;
background-color: #323232;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
}
.num {
position: absolute;
right:100rpx;
bottom:50rpx;
font-size: 24rpx;
color: #999999;
display: flex;
align-items: center;
}
.icon-bianji {
color: #999999;
font-size: 46rpx;
margin-right: 20rpx;
}
\ No newline at end of file
... ...
... ... @@ -12,7 +12,7 @@
</view>
<view class="city-box {{current===1?'margin':''}}">
<view wx:for="{{city_picker_list}}" wx:key="index">
<view class="city-item {{current_city === index?'change-bg':''}}" bindtap="chooseCity" data-index="{{index}}">{{item}}</view>
<view class="city-item {{current_city === index?'change-bg':''}}" bindtap="chooseCity" data-index="{{index}}" >{{item}}</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -238,6 +238,7 @@ Page({
},
//发布按钮
release(e) {
console.log(1)
// console.log('发布', app.globalData.isLogin);
const self = this;
// self.setData({
... ... @@ -249,27 +250,29 @@ Page({
title: '还没登录,先去登录吧~', icon: 'none',
success: function () {
setTimeout(function () {
wx.redirectTo({url: '/pages/my/my'})
wx.navigateTo({
url: '/pages/my/my'})
}, 500)
}
});
} else {
if (+self.data.is_write === 2 && wx.getStorageSync('is_canSend') === 2) { //没填写个人信息并且不可以发布 =>去填写
console.log(self.data.is_answer, self.data.is_canSend, self.data.is_write)
if (+self.data.is_write == 2 && wx.getStorageSync('is_canSend') == 2) { //没填写个人信息并且不可以发布 =>去填写
self.setData({
is_showUserInfo: true //弹出 去填写个人信息弹框
});
} else if (+self.data.is_write === 1 && wx.getStorageSync('is_answer') === 2) { //已填写且不能发布=>去答题
} else if (+self.data.is_write == 1 && wx.getStorageSync('is_answer') == 2) { //已填写且不能发布=>去答题
self.setData({
is_showAnswer: true, //弹出 去答题弹框
is_showRelease: false,
});
} else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 1 && wx.getStorageSync('is_answer') === 1) { //已填写且可以发布 =>去发布
} else if (+self.data.is_write == 1 && wx.getStorageSync('is_canSend') == 1 && wx.getStorageSync('is_answer') == 1) { //已填写且可以发布 =>去发布
// console.log('可以发布');
self.setData({
is_showRelease: true //弹出 发布弹框
});
} else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) {
} else if (self.data.is_write == 1 && wx.getStorageSync('is_canSend') == 2 && wx.getStorageSync('is_answer') == 1) {
// wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'});
self.setData({
is_showResult: true //弹出 提示框
... ... @@ -489,6 +492,25 @@ Page({
// this.getLat();//获取经纬度
},
onShow() {
if (!app.globalData.isLogin){
wx.getSetting({
success(res) {
if (!res.authSetting['scope.userInfo']) {
app.globalData.isLogin = false;
wx.showToast({
title: '您还没登录,请登录后操作',
icon: 'none'
})
setTimeout(() => {
wx.navigateTo({
url: '/pages/my/my', //跳转到授权页面
})
}, 1500)
}
}
})
}
wx.showLoading({title:'加载中',mask:true});
if (wx.getStorageSync('isLogin')) {
this.getLat();//获取经纬度
... ...
... ... @@ -186,7 +186,7 @@ Page({
let uploadImgCount = 0;
for (let i = 0, h = tempFilePaths.length; i < h; i++) {
wx.uploadFile({
url: 'http://wmatchrd.com/portal/Index/upload',
url: 'https://wmatchrd.com/portal/Index/upload',
filePath: tempFilePaths[i],
name: 'file',
formData: {
... ...
... ... @@ -219,11 +219,11 @@ Page({
app.post(url, params, {}).then((res) => {
// console.log('保存', res);
if (+res.code === 1) {
wx.showToast({title:res.message,icon:'none',
wx.showToast({title:'保存成功',icon:'none',
success:function () {
setTimeout(function () {
wx.navigateBack({delta:1})
},500)
},1200)
}
})
}
... ...
... ... @@ -199,9 +199,9 @@ Page({
app.globalData.isLogin = true;
self.setData({isLogin: app.globalData.isLogin});
self.getIndex();
// setTimeout(function () {
// wx.navigateBack({delta:1})
// },200)
setTimeout(function () {
wx.navigateBack({delta:1})
},1000)
})
},
fail: function (res) {
... ...
... ... @@ -66,6 +66,7 @@ Page({
console.log('取消订单', res);
if (+res.code === 1) {
wx.showToast({title:'订单已取消',icon:'none'});
self.getOrderDetail()
// self.setData({
// detail: res.data,
// });
... ...
... ... @@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
... ...