作者 吴孟雨

登录注册

正在显示 52 个修改的文件 包含 1971 行增加96 行删除
//app.js
App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
// 获取用户信息
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
wx.getUserInfo({
success: res => {
// 可以将 res 发送给后台解码出 unionId
this.globalData.userInfo = res.userInfo
onShow() {
console.log('app-onshow');
// 查看是否授权
wx.getSetting({
success(res) {
if (res.authSetting['scope.userInfo']) {
console.log('授权过到首页');
wx.navigateTo({
url: '/pages/index/index', //跳转到授权页面
});
} else {
console.log('授权失效到授权页');
wx.navigateTo({
url: '/pages/get-user-info/get-user-info', //跳转到授权页面
})
}
}
})
},
onLaunch: function () {
console.log('app-onLaunch');
// 展示本地存储能力
// var logs = wx.getStorageSync('logs') || []
// logs.unshift(Date.now())
// wx.setStorageSync('logs', logs)
const self = this;
wx.getUserInfo({
success: function (user) {
// console.log(user);
// 登录
let url = '/portal/Login/getToken';
wx.login({
success: function (res) {
console.log('获取code', res);
self.post(url, {
code: res.code,
user_nickname: user.userInfo.nickName,
avatar: user.userInfo.avatarUrl
}, {}).then((ret) => {
console.log('获取token', ret);
wx.setStorageSync('token', ret.data.token);
self.globalData.userInfo = user.userInfo;
setTimeout(function () {
wx.navigateBack({delta:1})
},200)
})
},
fail: function (res) {
},
complete: function (res) {
},
});
}
});
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
// 获取用户信息
},
post: function (url, data, headerParams) {
/**
* 自定义post函数,返回Promise
* +-------------------
* @param {String} url 接口网址
* @param {arrayObject} data 要传的数组对象 like: {name: 'name', age: 32}
* +-------------------
* @return {Promise} promise 返回promise供后续操作
*/
// wx.showLoading({
// title: '加载中',
// })
wx.showNavigationBarLoading()
// wx.showToast({
// title: '加载中',
// icon:'none',
// })
var promise = new Promise((resolve, reject) => {
//init
let that = this;
let postData = data;
let baseUrl = 'http://wmatchrd.com/api';
//网络请求
let header = {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
}
})
},
header = Object.assign(header, headerParams)
wx.request({
url: baseUrl + url,
data: postData,
method: 'POST',
header: header,
success: function (res) {//返回取得的数据
console.log('返回取得的数据res', res);
if(res.data.code === 1){
resolve(res.data);
}else if (res.data.code == '20000') {
console.log('20000');
resolve(res.data.data);
} else if (res.data.data.code == '10001') { //未获取授权
console.log('10001');
wx.showModal({
title: '提示',
content: res.data.data.msg,
showCancel: false,
success: function (res) {
if (res.confirm) {
// wx.removeStorageSync('token');
wx.navigateTo({
url: '/pages/index/index',
})
}
}
});
resolve(res.data.data);
} else if (res.data.data.code == '30000') {
resolve(res.data);
} else if (res.data.data.code == '40001') {//返回错误提示信息
console.log(555);
wx.showModal({
title: '提示',
content: res.data.data.msg,
showCancel: false,
success: function (res) {
if (res.confirm) {
// wx.removeStorageSync('token');
// wx.navigateTo({
// url: '/pages/start/start',
// })
}
}
});
resolve(res.data.msg);
} else if (res.data.code == '40000') {
console.log(333);
// wx.showModal({
// title: '提示',
// content: res.data.data.msg,
// showCancel: false,
// success: function (res) { }
// });
resolve(res.data.data);
} else if (res.data.data.code == '40106') {
console.log('重复绑定');
resolve(res.data.data);
} else if (res.data.data.code == '40107') {
console.log('手机号已注册');
resolve(res.data.data);
} else if (res.data.data.code == '40111') {
console.log('新旧密码不能相同');
resolve(res.data.data);
} else {
console.log('222');
console.log(res.data);
wx.showModal({
title: '提示',
content: res.data.data.msg,
showCancel: false,
})
reject(res.data)
}
setTimeout(function () {
// wx.hideLoading()
// wx.hideToast()
wx.hideNavigationBarLoading()
}, 500)
},
error: function (e) {
reject('网络出错');
// wx.hideLoading()
wx.hideNavigationBarLoading()
}
})
});
return promise;
},
//获取当前日期
nowDate() {
let date = new Date();
... ... @@ -47,7 +187,7 @@ App({
// let new_time = time.join(' ');
return time;
},
globalData: {
userInfo: null
}
globalData: {
userInfo: null
}
})
\ No newline at end of file
... ...
{
"pages": [
"pages/my/my",
"pages/order/order",
"pages/spell-list/spell-list",
"pages/index/index",
"pages/logs/logs",
"pages/order/order",
"pages/my/my",
"pages/search/search"
"pages/search/search",
"pages/index/type-detail/type-detail",
"pages/index/tandian-list/tandian-list",
"pages/index/notice-detail/notice-detail",
"pages/my/edit-info/edit-info",
"pages/get-user-info/get-user-info"
],
"window": {
"backgroundTextStyle": "light",
... ...
/**app.wxss**/
@font-face {font-family: "iconfont";
src: url('//at.alicdn.com/t/font_961048_s4pm998br9.eot?t=1545469706627'); /* IE9*/
src: url('//at.alicdn.com/t/font_961048_s4pm998br9.eot?t=1545469706627#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAW8AAsAAAAACEQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkgvY21hcAAAAYAAAABdAAABnLOMGw1nbHlmAAAB4AAAAdEAAAH8ozr8/mhlYWQAAAO0AAAALwAAADYTp4QZaGhlYQAAA+QAAAAcAAAAJAfeA4VobXR4AAAEAAAAAA4AAAAQEAAAAGxvY2EAAAQQAAAACgAAAAoBEgBsbWF4cAAABBwAAAAfAAAAIAETAGluYW1lAAAEPAAAAUUAAAJtPlT+fXBvc3QAAAWEAAAAOAAAAEkByYdDeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMTyzZW7438AQw9zA0AAUZgTJAQDhrAwgeJztkLENgDAMBM9JQBFCyiKUiC7LpGLyrBEcm4IheOss+2W5eGABonIoCeRGmGrqivmRzfzEpXvWCtDppdcxvpNJ7CLrFPyDrPzarZ/vFmdqjmVZHPOrgzwKvxJaAAAAeJwtj89r03AYxt/nm+ZHbZukpiZ21tiuXTLXLcM1S1Ybh1pjUZmHIVsPRYgwcIKM6kXZrjvqXVDwIjIQ/Cum05N48Q/wIDs5cOfMb6vv4eH58PK+PA+B+Ah9FpFINAU3C5kR+tX0ID2o7mOdGyxViTJEJ2+FXSGhHFnUoEtEsJkKD0G4jFBlNpbhuB5CD5OSLOlWFoEuyK6j8/2CaZk6o0ag1rrXp6Wy1ihdXrP8x4+u5S6anT/hizcvw+EQBownrw8Pk8R7vvvMS5iP2d6VSimKJzQtQu/pg7lasjVjnd1uR1F7O93fSX+hvINOOjw6eoj85nyrNb+ZHo8q8TYnr4QvwhbN0gJdpbs04InNwLIh16WRqsxxZWkcuVh3gjAww7F2RmltTJ2pLdYkuaiCQxj4bpGfFWVpTM4/knit4D+x35Pdylwzc4sBgiiGK4OZj/0957SIWHHcSm9aND1z8dxX29cNIb2PQfqOdQFNnlB03GDfGMsqtXwB3H8HSqfKYoEhBvuZETJKr/3pc2vDa7byAvj7Vvm2h2P/ZkHJsKU7MmMsb8SVbg8/0v6Fe6oISV2t4gNYuhE3jbykaGvnscdxtb6S4/+09Qre4y+fKmCQAAAAeJxjYGRgYADiX5Z3f8fz23xl4GZhAIEbLgpcCPr/TBYG5nwgl4OBCSQKACnWCWAAeJxjYGRgYG7438AQw8IAAkCSkQEVsAAARwoCbXicY2FgYGBBwgAAsAARAAAAAAAAABQAbAD+AAB4nGNgZGBgYGGIZWBlAAEmIOYCQgaG/2A+AwASPgF9AHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nGNgYoAALgbsgIWRiZGZkYWRlYErsagov1w3Jb88jyMnPzmxJDM/j704IzEvOaOUgQEArdEKjw==') format('woff'),
url('//at.alicdn.com/t/font_961048_s4pm998br9.ttf?t=1545469706627') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('//at.alicdn.com/t/font_961048_s4pm998br9.svg?t=1545469706627#iconfont') format('svg'); /* iOS 4.1- */
src: url('//at.alicdn.com/t/font_961048_caegm9j8598.eot?t=1545649309238'); /* IE9*/
src: url('//at.alicdn.com/t/font_961048_caegm9j8598.eot?t=1545649309238#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAaQAAsAAAAACVAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkgvY21hcAAAAYAAAABpAAABssnxnXFnbHlmAAAB7AAAAn8AAALQUrMnWmhlYWQAAARsAAAALwAAADYTrP8/aGhlYQAABJwAAAAcAAAAJAfeA4ZobXR4AAAEuAAAAA4AAAAUFAAAAGxvY2EAAATIAAAADAAAAAwBEgHUbWF4cAAABNQAAAAeAAAAIAEUAGluYW1lAAAE9AAAAUUAAAJtPlT+fXBvc3QAAAY8AAAAUwAAAGiAcQCneJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMTyzZW7438AQw9zA0AAUZgTJAQDhrAwgeJztkcENgCAQBOcEjTEmlkADtmBiQb4s+trQheNhES4Zwm0WHgswAknsIoPdGFWXXGt+Yml+5tS8MDMwOL558eN54HvuMuVioXTSXb1lE7/Wtp99yrW9QD2px6D+iJegZY4AewGhjBa/AAAAeJwtkU9ME0EYxefNtLtbKdvW1l2LtbQUusifJaVlF2wtYK1tJWhCDFQlyJqAgjEEvSggkiCe0IM3EyUmxhgSE+PNu0GRk3gxnD0YTpLIeXFanMPL9zIzX97Lj4Dww8o0Q5yENEFzQaQE5Yi9aW9GNjDCB3RHCHEQcvCarTCL1BCVNJIEIQhTGToMMwtTpmFkEdd0mDoaBFHwqi4YXiZqcS+/71RUxUtJoyFHc2ebhaCnMXB6WE3dme6vOaWk/5pPXz0zZ2fhh//uy91dy9IfrNzXLZpCW+FMKJDJ13k8GRTu3WiPWjMt6vH5nkymZ97eWLB/I7iAtD27t3cL7qmOZLJjyt6vVOJtDl6wb2yGtJFO0kcuklGeWDHUMMSYUFGZxjVRqEb2xeKGaShmVdOVtGE0HYt2RQXRJ4Mb00hpPv7NJwpVFz90Aq9l/Hf0T0Mu1N7qKFGAOZ3m4GjLh/J6/KgTeSmuhQrNTkVXuk5shVNeP7PHMGq/pTnAI9ZJXpyj3yl1SVF3Lfj8AwgcCTprKfKgvxzMIRV6vnxNTuitSTcDX58MXtCxnzpfKzlo94BIKXX786FcAT/tcv1l2QlBHorgPag9kW/1uwXJM3wS69wOxQZr+D7PSAjvUGX6mS2xIvGTJk40W2EKNcDxeSA0dHCecS0LURB5z3pem5Ps0qEJjBPnD2WIOlRFzVaga9wplLzZcShK7/KiS3E9Wu5tgWMnf82BWPrh7enFtM/PPq2u1tPxUmmcVvVKfSLRB/QlEr2UsgLbXmsb0SaW5iRpbmny0tW17eflxwO563M3JxfGIqXYk4+M2VtFi1KrWLQAS4oA/Xrn4QqO/R/GH4weAHicY2BkYGAA4kylCa/i+W2+MnCzMIDADbe7cxH0/5ksDMz5QC4HAxNIFAA55Ar+AHicY2BkYGBu+N/AEMPCAAJAkpEBFbACAEcLAm54nGNhYGBgQcMAAQQAFQAAAAAAAAAUAGwA/gFoeJxjYGRgYGBliAViEGACYi4gZGD4D+YzAAASWQF+AAB4nGWPTU7DMBCFX/oHpBKqqGCH5AViASj9EatuWFRq911036ZOmyqJI8et1ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxtyFEKgCAMgOHNssIzdIUOtTRyEBtYonj6hF77+J9+MPBx8M+iwQFHtDiBo5S0bEGLLJd6elhlviOJj3kNLGc5uNcit6w7k1Ymqf0DvKjMFokA') format('woff'),
url('//at.alicdn.com/t/font_961048_caegm9j8598.ttf?t=1545649309238') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('//at.alicdn.com/t/font_961048_caegm9j8598.svg?t=1545649309238#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
... ... @@ -23,5 +21,4 @@
.icon-shanchu:before { content: "\e60f"; }
.icon-dingweiweizhizuobiaoxianxing:before { content: "\e61f"; }
... ...
/*弹框样式*/
.modal_box {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 10;
background: rgba(0,0,0,0.3);
}
.input-box {
width: 80%;
/* height: 1100rpx; */
background: #ffffff;
display: flex;
align-items: center;
flex-direction: column;
z-index:999;
position: fixed;
top: 48%;
left: 50%;
transform: translate(-50%,-50%);
padding: 46rpx 88rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: 40rpx;
}
.input-box image {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
margin-bottom: 34rpx;
}
.input-box .title {
color: #333333;
font-size: 36rpx;
margin-bottom: 16rpx;
}
.input-box .tips {
color: #333333;
font-size: 24rpx;
margin-bottom: 26rpx;
}
.input-box .answer-btn {
width: 100%;
height: 66rpx;
background-color: #323232;
border-radius: 6rpx;
color:#E2C8B1;
font-size: 30rpx;
text-align: center;
line-height: 66rpx;
margin-top: 16rpx;
}
.release-btn-box {
background-color: transparent;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
top: 70%;
left: 50%;
transform: translate(-50%,0);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 999;
}
.release-btn-box .left-btn, .release-btn-box .right-btn {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 84rpx;
}
.release-btn-box .right-btn {
margin-right: 0;
}
.release-btn-box image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-bottom: 22rpx;
}
.release-btn-box .text {
color: #ffffff;
font-size: 26rpx;
}
\ No newline at end of file
... ...
// pages/get-user-info/get-user-info.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {},
//获取授权
login(e) {
console.log('e', e);
let url = '/portal/Login/getToken';
wx.login({
success: function (res) {
console.log('获取code', res);
app.post(url, {
code: res.code,
user_nickname: e.detail.userInfo.nickName,
avatar: e.detail.userInfo.avatarUrl
}, {}).then((ret) => {
console.log('获取token', ret);
wx.setStorageSync('token', ret.token);
wx.showToast({title:'登录成功',icon:'success'});
app.globalData.userInfo = e.detail.userInfo;
setTimeout(function () {
wx.navigateBack({delta:1})
},200)
})
},
fail: function (res) {
},
complete: function (res) {
},
});
},
/**
* 生命周期函数--监听页面加载
*/
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/get-user-info/get-user-info.wxml-->
<view class="content">
<view class="title">火柴西路将获取您的微信头像,昵称等信息</view>
<button class="btn" open-type="getUserInfo" bindgetuserinfo="login">登录</button>
</view>
... ...
/* pages/get-user-info/get-user-info.wxss */
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.content .title {
color: #666666;
font-size: 28rpx;
}
\ No newline at end of file
... ...
... ... @@ -20,24 +20,52 @@ Page({
{src: '../../images/wutaiju@2x.png', text: '舞台剧'},
],
banner: [{image: '../../images/banner.png'}, {image: '../../images/b1@2x (1).png'}, {image: '../../images/b1@2x (2).png'}, {image: '../../images/banner.png'}],
currentBannerIndex:0,
tabcurrent: {tab: 0,bubble: ''},
noticeList:[{url:'',name:'https://github.com/wux-weapp/wux-weapp'},
{url:'',name:'北京首展11奥拉维尔·埃利亚松北京首展北京首展11奥拉维尔·埃利亚松北京首展'},
{url:'',name:'https://github.com/wux-weapp/wux-weapphttps://github.com/wux-weapp/wux-weapp'},
{url:'',name:'奥拉维尔'},
{url:'',name:'奥拉维尔https://github.com/wux-weapp/wux-weapp'},
{url:'',name:'奥拉维尔·埃利亚松北京首展https://github.com/wux-weapp/wux-weapp'},
currentBannerIndex: 0,
tabcurrent: {tab: 0, bubble: ''},
noticeList: [{url: '', name: 'https://github.com/wux-weapp/wux-weapp'},
{url: '', name: '北京首展11奥拉维尔·埃利亚松北京首展北京首展11奥拉维尔·埃利亚松北京首展'},
{url: '', name: 'https://github.com/wux-weapp/wux-weapphttps://github.com/wux-weapp/wux-weapp'},
{url: '', name: '奥拉维尔'},
{url: '', name: '奥拉维尔https://github.com/wux-weapp/wux-weapp'},
{url: '', name: '奥拉维尔·埃利亚松北京首展https://github.com/wux-weapp/wux-weapp'},
],
is_showAnswer: false,
is_showUserInfo: false,
is_answer: true,
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo')
},
onClick() {
disableScroll() {
},
handleBackground() {
console.log('dianji');
this.setData({is_showAnswer: false, is_showUserInfo: false,})
},
//进入分类详情
goTypeDetail() {
wx.navigateTo({
url: '/pages/search/search',
url: '/pages/index/type-detail/type-detail',
})
},
//进入公告详情
goNotice() {
wx.navigateTo({
url: '/pages/index/notice-detail/notice-detail',
})
},
//查看更多
goMore() {
wx.navigateTo({
url: '/pages/index/tandian-list/tandian-list',
})
},
//进入拼餐详情
goSpellDetail() {
wx.navigateTo({
url: '/pages/index/spell-detail/spell-detail',
})
},
//搜索
... ... @@ -46,7 +74,7 @@ Page({
url: '/pages/search/search',
})
},
bannerChange(e){
bannerChange(e) {
// console.log(e,'current', current);
const current = e.detail.current;
this.setData({currentBannerIndex: current})
... ... @@ -118,17 +146,17 @@ Page({
},
//发布按钮
release(e) {
let that = this;
that.setData({
releasepopup: true
})
},
//取消发布弹窗
cancelPopup() {
let that = this;
that.setData({
releasepopup: false
})
console.log('发布');
const self = this;
if (!self.data.is_answer) {
self.setData({
is_showAnswer: true
});
} else {
self.setData({
is_showUserInfo: true
});
}
},
//订单-导航
wish(e) {
... ... @@ -164,4 +192,8 @@ Page({
})
}
},
})
onShow() {
console.log('index-show');
console.log(app.globalData.userInfo);
},
});
... ...
... ... @@ -25,10 +25,10 @@
</swiper>
</view>
<!--导航-->
<!--分类导航-->
<view class="padding-box">
<view class="navigator-box">
<view class="img-box" wx:for="{{images}}" wx:key="index">
<view class="img-box" wx:for="{{images}}" wx:key="index" bindtap="goTypeDetail" data-index="{{index}}">
<image src="{{item.src}}"></image>
<view class="text">{{item.text}}</view>
</view>
... ... @@ -47,7 +47,7 @@
<view class="right-item">
<block wx:for-index="idx" wx:for='{{noticeList}}' wx:key="index" >
<swiper-item>
<view class='content-item' bindtap="onClick">
<view class='content-item' bindtap="goNotice">
<text>{{item.name}}</text>
</view>
</swiper-item>
... ... @@ -62,7 +62,7 @@
<image src="../../images/tandian@2x.png"></image>
<text>探店途中</text>
</view>
<view class="right">
<view class="right" bindtap="goMore">
<text>查看更多</text>
<image src="../../images/arrow@2x.png"></image>
</view>
... ... @@ -83,7 +83,7 @@
previous-margin="50rpx" next-margin="50rpx" bindchange="bannerChange" current="{{index}}">
<block wx:for="{{banner}}" wx:key="index">
<swiper-item>
<div class="fix pl5 pr5 box_bb">
<div class="fix pl5 pr5 box_bb" bindtap="goSpellDetail">
<!--<navigator url="">-->
<image class="banner mt10 {{currentBannerIndex==index?'active':''}}" src="{{item.image}}" mode="aspectFill" />
<text>Opera Bombana 2018.4.28</text>
... ... @@ -124,4 +124,31 @@
<!--</block>-->
<!--</swiper>-->
<!--</view>-->
<!--去答题弹框-->
<view class="input-box" wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/sorry@2x.png"></image>
<view class="title">目前只对</view>
<view class="title">首批会员开放发布功能</view>
<view class="tips">答题后可能获得第一批次入场卷</view>
<view class="answer-btn">答题</view>
</view>
<view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--去完善个人信息弹框-->
<view class="input-box" wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/user_info@2x.png"></image>
<view class="title">为了更好的体验</view>
<view class="title">请先完善个人信息</view>
<view class="answer-btn">完成</view>
</view>
<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
<view class="left-btn">
<image src="../../images/pincan@2x.png"></image>
<view class="text">发布拼餐</view>
</view>
<view class="right-btn">
<image src="../../images/pinhuodong@2x.png"></image>
<view class="text">发布拼活动</view>
</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
</view>
... ...
... ... @@ -473,3 +473,92 @@ swiper {
line-height: 100rpx;
color: #999;
}
/*弹框样式*/
.modal_box {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 10;
background: rgba(0,0,0,0.3);
}
.input-box {
width: 80%;
/* height: 1100rpx; */
background: #ffffff;
display: flex;
align-items: center;
flex-direction: column;
z-index:999;
position: fixed;
top: 48%;
left: 50%;
transform: translate(-50%,-50%);
padding: 46rpx 88rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: 40rpx;
}
.input-box image {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
margin-bottom: 34rpx;
}
.input-box .title {
color: #333333;
font-size: 36rpx;
margin-bottom: 16rpx;
}
.input-box .tips {
color: #333333;
font-size: 24rpx;
margin-bottom: 26rpx;
}
.input-box .answer-btn {
width: 100%;
height: 66rpx;
background-color: #323232;
border-radius: 6rpx;
color:#E2C8B1;
font-size: 30rpx;
text-align: center;
line-height: 66rpx;
margin-top: 16rpx;
}
.release-btn-box {
background-color: transparent;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
top: 70%;
left: 50%;
transform: translate(-50%,0);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 999;
}
.release-btn-box .left-btn, .release-btn-box .right-btn {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 84rpx;
}
.release-btn-box .right-btn {
margin-right: 0;
}
.release-btn-box image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-bottom: 22rpx;
}
.release-btn-box .text {
color: #ffffff;
font-size: 26rpx;
}
\ No newline at end of file
... ...
// pages/index/notice-detail/notice-detail.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/index/notice-detail/notice-detail.wxml-->
<view class="title">
奥拉维尔·埃利亚松北京首展
</view>
<view class="content">
这是昨日看的海,可我依然感觉自己就站在那,就在那个海边,所以,我让此刻面对着电脑敲打文字的自己变成昨日的我,对着海边,诉说着这么一个故事。
  白天的海与晚上的海不同,早些的海与现在的海不同,梦里的海或是想象中的海与现实中的海也不同。沙子不一样,海水不一样,天空不一样,连看海的人也不一样。这是来自中午的海。
</view>
\ No newline at end of file
... ...
/* pages/index/notice-detail/notice-detail.wxss */
\ No newline at end of file
... ...
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
is_showSort: false,
is_showSelect: false,
currentSort: 0,
currentSelect: 0,
start_time_date: app.nowDate(),
end_time_date: app.nowDate(),
type:[
{name:'粤菜',id:1},{name:'川菜',id:2},{name:'其他中餐',id:3},{name:'粤菜',id:4},{name:'粤菜',id:5},{name:'粤菜',id:6},{name:'粤菜',id:7},
{name:'粤菜',id:8},{name:'川菜',id:9},{name:'其他中餐',id:10},{name:'粤菜',id:11},{name:'粤菜',id:12},{name:'粤菜',id:13},{name:'粤菜',id:14},
],
sort: [{id: 0, name: '最具人气'}, {id: 1, name: '距离最近'}],
sort_id: 0,//选择的排序id,默认是0
is_all: true,
list:[
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
]
},
//点击智能排序按钮
clickSort() {
let that = this;
that.setData({
// down: !that.data.down,
is_showSort: !that.data.is_showSort,
is_showSelect: false
// showrent_mask: false
})
},
//点击筛选按钮
clickSelect() {
let that = this;
that.setData({
// down: !that.data.down,
is_showSelect: !that.data.is_showSelect,
is_showSort: false,
// showrent_mask: false
})
},
//关闭排序列表
closeMask() {
let that = this;
that.setData({
// showrent_mask: false,
is_showSort: false,
is_showSelect: false,
})
},
//保持筛选列表开启
openMask() {
this.setData({is_showSelect: true,})
},
//点击默认/热度排序
chooseSort(e) {
const current = e.currentTarget.dataset.index;
this.setData({
sort_id: this.data.sort[current].id,
currentSort: current,
is_showSort: false,
// down: !this.data.down,
});
this.initPortalPost();
this.getuser_recommend()
},
//选择开始时间
changeStartTime: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
start_time_date: e.detail.value,
is_showSelect: true,
// is_birth_change: true,
})
},
//选择结束时间
changeEndTime: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
end_time_date: e.detail.value,
is_showSelect: true,
// is_birth_change: true,
})
},
//选择全部分类
chooseAll() {
this.setData({is_all: true,is_showSelect:false,current_type:null})
},
//选择分类
chooseType(e) {
const current = e.currentTarget.dataset.index;
this.setData({current_type: current,is_all:false,is_showSelect:false,is_showSort: false,})
},
/**
* 生命周期函数--监听页面加载
*/
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/index/tandian-list/tandian-list.wxml-->
<view class="fix-box">
<view class="sort-select-box">
<!--智能排序按钮-->
<view class="sort-box" bindtap='clickSort'>
<view class='' class="sort-btn">智能排序</view>
<view class="iconfont icon-arrow-down"></view>
</view>
<!--筛选按钮-->
<view class="select-box" bindtap='clickSelect'>
<view class='' class="select-btn">筛选</view>
<view class="iconfont icon-arrow-down"></view>
</view>
</view>
<!--智能排序列表-->
<view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask">
<view class='rent_popup'>
<view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index"
catchtap='chooseSort' data-index="{{index}}">{{item.name}}
</view>
</view>
</view>
<!--筛选列表-->
<view class='rent_mask' wx:if='{{is_showSelect}}' bindtap="closeMask">
<view class='rent_popup time-box' catchtap="openMask">
<text class="title">时间:</text>
<view class="picker-box">
<picker bindchange="changeStartTime" value="{{start_time_date}}" mode="date">
<view class="time-select-box">
<view class="select-picker">
<view class="picker">
{{start_time_date}}
</view>
</view>
<view class="iconfont icon-arrow-down arrow"></view>
</view>
</picker>
<text>-</text>
<picker bindchange="changeEndTime" value="{{end_time_date}}" mode="date">
<view class="time-select-box">
<view class="select-picker">
<view class="picker">
{{end_time_date}}
</view>
</view>
<view class="iconfont icon-arrow-down arrow"></view>
</view>
</picker>
</view>
<text class="title">菜系:</text>
<view class="type">
<text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text>
<text class="{{current_type === index?'change-color':''}}"
wx:for="{{type}}" wx:key="index" catchtap="chooseType"
data-index="{{index}}">{{item.name}}
</text>
</view>
<!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"-->
<!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
</view>
</view>
</view>
<view class='content_box'>
<view class="no-data" wx:if="{{list.length === 0}}">暂无拼餐活动</view>
<view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
bindtap='gouserrecommend_detail' data-index="{{index}}">
<image src="../../../images/b1@2x (1).png"></image>
<view class="title">
<text class="area">{{item.area}}</text>
<text class="num">还差{{item.num}}人</text>
</view>
<view class="user">
<image src="../../images/avatar@2x.png" class="avatar"></image>
<text>{{item.name}}</text>
</view>
</view>
</view>
... ...
/* pages/index/tandian-list/tandian-list.wxss */
@import '../../spell-list/spell-list.wxss';
.fix-box {
border-top: 20rpx solid #f2f2f2;
}
.content_box {
margin-top: 100rpx;
}
\ No newline at end of file
... ...
// pages/index/type-detail/type-detail.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
is_showSort: false,
is_showSelect: false,
currentSort: 0,
currentSelect: 0,
start_time_date: app.nowDate(),
end_time_date: app.nowDate(),
type:[
{name:'粤菜',id:1},{name:'川菜',id:2},{name:'其他中餐',id:3},{name:'粤菜',id:4},{name:'粤菜',id:5},{name:'粤菜',id:6},{name:'粤菜',id:7},
{name:'粤菜',id:8},{name:'川菜',id:9},{name:'其他中餐',id:10},{name:'粤菜',id:11},{name:'粤菜',id:12},{name:'粤菜',id:13},{name:'粤菜',id:14},
],
sort: [{id: 0, name: '最具人气'}, {id: 1, name: '距离最近'}],
sort_id: 0,//选择的排序id,默认是0
is_all: true,
list:[
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
]
},
//搜索
search() {
wx.navigateTo({
url: '/pages/search/search',
})
},
//点击智能排序按钮
clickSort() {
let that = this;
that.setData({
// down: !that.data.down,
is_showSort: !that.data.is_showSort,
is_showSelect: false
// showrent_mask: false
})
},
//点击筛选按钮
clickSelect() {
let that = this;
that.setData({
// down: !that.data.down,
is_showSelect: !that.data.is_showSelect,
is_showSort: false,
// showrent_mask: false
})
},
//关闭排序列表
closeMask() {
let that = this;
that.setData({
// showrent_mask: false,
is_showSort: false,
is_showSelect: false,
})
},
//保持筛选列表开启
openMask() {
this.setData({is_showSelect: true,})
},
//点击默认/热度排序
chooseSort(e) {
const current = e.currentTarget.dataset.index;
this.setData({
sort_id: this.data.sort[current].id,
currentSort: current,
is_showSort: false,
// down: !this.data.down,
});
this.initPortalPost();
this.getuser_recommend()
},
//选择开始时间
changeStartTime: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
start_time_date: e.detail.value,
is_showSelect: true,
// is_birth_change: true,
})
},
//选择结束时间
changeEndTime: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
end_time_date: e.detail.value,
is_showSelect: true,
// is_birth_change: true,
})
},
//选择全部分类
chooseAll() {
this.setData({is_all: true,is_showSelect:false,current_type:null})
},
//选择分类
chooseType(e) {
const current = e.currentTarget.dataset.index;
this.setData({current_type: current,is_all:false,is_showSelect:false,is_showSort: false,})
},
/**
* 生命周期函数--监听页面加载
*/
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/index/type-detail/type-detail.wxml-->
<view class="fix-box">
<view class="head">
<view class="position">
<view class="left">
<view class="iconfont icon-location"></view>
<text>北京</text>
<view class="iconfont icon-arrow-down"></view>
</view>
<view class="right" bindtap="search">
<view class="input"></view>
<image src="../../../images/search@2x.png"></image>
<!--<view class="iconfont icon-arrow-down"></view>-->
</view>
</view>
</view>
<view class="sort-select-box">
<!--智能排序按钮-->
<view class="sort-box" bindtap='clickSort'>
<view class='' class="sort-btn">智能排序</view>
<view class="iconfont icon-arrow-down"></view>
</view>
<!--筛选按钮-->
<view class="select-box" bindtap='clickSelect'>
<view class='' class="select-btn">筛选</view>
<view class="iconfont icon-arrow-down"></view>
</view>
</view>
<!--智能排序列表-->
<view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask">
<view class='rent_popup'>
<view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index"
catchtap='chooseSort' data-index="{{index}}">{{item.name}}
</view>
</view>
</view>
<!--筛选列表-->
<view class='rent_mask' wx:if='{{is_showSelect}}' bindtap="closeMask">
<view class='rent_popup time-box' catchtap="openMask">
<text class="title">时间:</text>
<view class="picker-box">
<picker bindchange="changeStartTime" value="{{start_time_date}}" mode="date">
<view class="time-select-box">
<view class="select-picker">
<view class="picker">
{{start_time_date}}
</view>
</view>
<view class="iconfont icon-arrow-down arrow"></view>
</view>
</picker>
<text>-</text>
<picker bindchange="changeEndTime" value="{{end_time_date}}" mode="date">
<view class="time-select-box">
<view class="select-picker">
<view class="picker">
{{end_time_date}}
</view>
</view>
<view class="iconfont icon-arrow-down arrow"></view>
</view>
</picker>
</view>
<text class="title">菜系:</text>
<view class="type">
<text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text>
<text class="{{current_type === index?'change-color':''}}"
wx:for="{{type}}" wx:key="index" catchtap="chooseType"
data-index="{{index}}">{{item.name}}
</text>
</view>
<!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"-->
<!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
</view>
</view>
</view>
<view class='content_box'>
<view class="no-data" wx:if="{{list.length === 0}}">暂无拼餐活动</view>
<view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
bindtap='gouserrecommend_detail' data-index="{{index}}">
<image src="../../../images/activity_img@2x.png"></image>
<view class="title">
<text class="area">{{item.area}}</text>
<text class="num">还差{{item.num}}人</text>
</view>
<view class="user">
<image src="../../images/avatar@2x.png" class="avatar"></image>
<text>{{item.name}}</text>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/index/type-detail/type-detail.wxss */
@import '../../spell-list/spell-list.wxss';
.head {
border-bottom: 20rpx solid #f2f2f2;
}
.rent_mask {
top: 197rpx;
}
.content_box {
margin-top: 197rpx;
}
\ No newline at end of file
... ...
// pages/my/edit-info/edit-info.js
Page({
/**
* 页面的初始数据
*/
data: {
sexList: ['男','女'],
maxlength: 50,
minlength: 0,
currentnum: 0,
},
sexPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
current_sex: e.detail.value,
is_sex_change: true
})
},
getPhoneNumber(e) {
console.log(e.detail.errMsg)
console.log(e.detail.iv)
console.log(e.detail.encryptedData)
},
//输入国家
inputCountry(e) {
this.setData({
country: e.detail.value,
})
},
//输入城市
inputCity(e) {
this.setData({
city: e.detail.value,
})
},
//简介
inputContent(e) {
var textcontent = e.detail.value;
var len = e.detail.cursor;
var maxlength = this.data.maxlength;
var minlength = this.data.minlength;
if (len > maxlength) {
wx.showToast({
title: '超出最大限制',
icon: 'none'
});
return
} else {
this.setData({
currentnum: len,
content: textcontent,
})
}
},
/**
* 生命周期函数--监听页面加载
*/
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/edit-info/edit-info.wxml-->
<view class="content">
<view class="flex-box flex-picker">
<view class="title">性别:</view>
<view class="text">
<picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker">
<view class="sex-picker">
<text class="variety-text">{{sexList[current_sex]}}</text>
<!--<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>-->
<view class="iconfont icon-arrow-down"></view>
</view>
</picker>
</view>
</view>
<view class="flex-box">
<view class="title">国家:</view>
<view class="text">
<input type="text" bindinput="inputCountry"/>
</view>
</view>
<view class="flex-box">
<view class="title">城市:</view>
<view class="text">
<input type="text" bindinput="inputCity"/>
</view>
</view>
<view class="flex-box">
<view class="title">手机号:</view>
<view class="phone-box">
<input type="text" bindinput="inputCountry"/>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button>
</view>
</view>
<view class="content-box">
<view class="title">个人简介:</view>
<view class="text">
<textarea type="text" bindinput="inputContent" maxlength="50"></textarea>
<view class='word_num'>{{currentnum}}/{{maxlength}}</view>
</view>
</view>
</view>
... ...
/* pages/my/edit-info/edit-info.wxss */
.content {
padding: 20rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.flex-box {
display: flex;
align-items: center;
border-bottom: 1rpx solid #f2f2f2;
padding: 20rpx 0;
}
.flex-box .title {
color: #666666;
font-size: 26rpx;
margin-right: 20rpx;
}
.flex-box .text {
flex:1;
}
.sex-picker {
display: flex;
align-items: center;
justify-content: space-between;
}
.variety-text {
font-size: 26rpx;
color: #666666;
}
.text input {
font-size: 26rpx;
color: #666666;
}
.phone-box {
flex:1;
display: flex;
align-items: center;
justify-content: space-between;
}
.phone-btn {
width: 120rpx;
height: 40rpx;
line-height: 40rpx;
margin: 0;
padding: 0;
background-color: #333333;
color:#E1C8AF;
font-size: 22rpx;
}
.content-box {
display: flex;
flex-direction: column;
align-items:flex-start;
padding: 20rpx 0;
}
.content-box .title {
color: #666666;
font-size: 26rpx;
margin-bottom: 20rpx;
}
.content-box .text {
width:100%;
position: relative;
}
.content-box textarea {
border: 1rpx solid #f2f2f2;
border-radius: 4rpx;
width: 100%;
padding:20rpx;
color:#666666;
font-size: 26rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.word_num {
position: absolute;
right: 30rpx;
bottom: 30rpx;
font-size: 28rpx;
color: #c3c3c3;
}
\ No newline at end of file
... ...
... ... @@ -6,6 +6,21 @@ Page({
*/
data: {
tabcurrent: {tab: 4,bubble: ''},
is_showAnswer: false,
is_showUserInfo:false,
is_answer: true,
is_class:1,
},
//编辑个人信息
goUserInfo() {
wx.navigateTo({
url: '/pages/my/edit-info/edit-info',
})
},
disableScroll() {},
handleBackground() {
console.log('dianji');
this.setData({is_showAnswer: false,is_showUserInfo:false,})
},
//首页-导航
service(e) {
... ... @@ -45,10 +60,17 @@ Page({
},
//发布按钮
release(e) {
let that = this;
that.setData({
releasepopup: true
})
console.log('发布');
const self = this;
if(!self.data.is_answer) {
self.setData({
is_showAnswer: true
});
}else {
self.setData({
is_showUserInfo: true
});
}
},
//取消发布弹窗
cancelPopup() {
... ...
{}
\ No newline at end of file
{
"navigationBarTitleText": "我的"
}
\ No newline at end of file
... ...
<!--pages/my/my.wxml-->
<view class="head-box" bindtap="goUserInfo">
<view class="head">
</view>
<image src="../../images/user-img@2x.png" class="user-img"></image>
<view class="left">
<view class="class-box">
<image src="../../images/jin@2x.png" wx:if="{{is_class === 1}}"></image>
<image src="../../images/yin@2x.png" wx:if="{{is_class === 2}}"></image>
<image src="../../images/tong@2x.png" wx:if="{{is_class === 3}}"></image>
<text wx:if="{{is_class === 1}}">金火柴</text>
<text wx:if="{{is_class === 2}}">银火柴</text>
<text wx:if="{{is_class === 3}}">铜火柴</text>
</view>
</view>
<view class="right">
<view class="name">旦巴小公举</view>
<view class="area">
<view class="iconfont icon-dingweiweizhizuobiaoxianxing"></view>
<text>北京</text>
</view>
<view class="qian">确认过眼神,遇见对的人</view>
</view>
</view>
<view class="menu-box">
<view class="btn-box" bindtap="rechargeBalance">
<image src="../../images/collect@2x.png" class="icon-money"></image>
<view class="right">
<view class="text">我的收藏</view>
<image src="../../images/arrow@2x.png" class="arrow"></image>
</view>
</view>
<view class="btn-box" bindtap="safetySet">
<image src="../../images/mywallet@2x.png" class="icon-safety"></image>
<view class="right">
<view class="text">我的钱包</view>
<image src="../../images/arrow@2x.png" class="arrow"></image>
</view>
</view>
<view class="btn-box" bindtap="myCertification">
<image src="../../images/sugest@2x.png" class="icon-authentication"></image>
<view class="right">
<view class="text">意见反馈</view>
<image src="../../images/arrow@2x.png" class="arrow"></image>
</view>
</view>
<view class="btn-box" bindtap="myAddress">
<image src="../../images/about@2x.png" class="icon-address"></image>
<view class="right">
<view class="text">关于火柴一盒</view>
<image src="../../images/arrow@2x.png" class="arrow"></image>
</view>
</view>
<button class="btn-box button" open-type="concat" bindcontact="handleContact">
<image src="../../images/concat@2x.png" class="icon-customer"></image>
<view class="right">
<view class="text">联系客服</view>
<image src="../../images/arrow@2x.png" class="arrow"></image>
</view>
</button>
</view>
<!--底部tab-->
<import src="/templates/templates.wxml" />
<template is="tabBar" data='{{...tabcurrent}}' />
<!--去答题弹框-->
<view class="input-box" wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/sorry@2x.png"></image>
<view class="title">目前只对</view>
<view class="title">首批会员开放发布功能</view>
<view class="tips">答题后可能获得第一批次入场卷</view>
<view class="answer-btn">答题</view>
</view>
<view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--去完善个人信息弹框-->
<view class="input-box" wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/user_info@2x.png"></image>
<view class="title">为了更好的体验</view>
<view class="title">请先完善个人信息</view>
<view class="answer-btn">完成</view>
</view>
<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
<view class="left-btn">
<image src="../../images/pincan@2x.png"></image>
<view class="text">发布拼餐</view>
</view>
<view class="right-btn">
<image src="../../images/pinhuodong@2x.png"></image>
<view class="text">发布拼活动</view>
</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
\ No newline at end of file
... ...
/* pages/my/my.wxss */
@import "../../templates/templates.wxss";
@import "../../pages/css/modal.wxss";
.head-box {
position: relative;
}
.head-box .head {
width: 100%;
height: 314rpx;
background-image: url('http://pic.97uimg.com/back_pic/20/15/11/05/f87b770c518ed891c289e9c3ee1f2d80.jpg');
background-repeat: no-repeat;
-webkit-background-size: cover;
background-size: cover;
padding: 40rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: flex-start;
-webkit-filter: blur(2rpx); /* Chrome, Opera */
-moz-filter: blur(2rpx);
-ms-filter: blur(2rpx);
filter: blur(2rpx);
}
.left {
position: absolute;
top:65%;
left:102rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.head-box .left .class-box {
display: flex;
flex-direction: column;
margin-top: -10rpx;
align-items: center;
}
.head-box .left .class-box image {
width: 50rpx;
height: 64rpx;
margin-bottom: 10rpx;
/*-webkit-filter: blur(10px); !* Chrome, Opera *!*/
/*-moz-filter: blur(10px);*/
/*-ms-filter: blur(10px);*/
/*filter: blur(10px);*/
}
.head-box .left .class-box text {
width: 36rpx;
height: 15rpx;
text-align: center;
line-height: 15rpx;
/*padding: 6rpx 10rpx;*/
background-color: #E2C8B1;
color: #ffffff;
font-size: 10rpx;
border-radius: 4rpx;
}
.user-img {
position: absolute;
top:40rpx;
left:40rpx;
width: 173rpx;
height: 173rpx;
border-radius: 50%;
}
.head-box .right {
position: absolute;
top: 13%;
left: 250rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
color: #ffffff;
}
.head-box .right .name {
font-size: 34rpx;
margin-bottom: 6rpx;
}
.head-box .right .area {
font-size: 28rpx;
display: flex;
align-items: center;
margin-bottom: 32rpx;
}
.head-box .right .area .iconfont {
color: #ffffff;
font-size: 34rpx;
margin-right: 6rpx;
}
.head-box .right .qian {
font-size: 24rpx;
}
.menu-box {
display: flex;
flex-direction: column;
padding: 0 36rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.btn-box {
display: flex;
align-items: center;
border-bottom: 1rpx solid #f2f2f2;
/* justify-content: space-between; */
}
.button {
margin: 0;
padding: 0;
line-height: normal !important;
background-color: #fff;
border:0;
}
.button::after {
border:0;
line-height: 0;
}
.icon-money {
width: 52rpx;
height: 52rpx;
margin-right: 42rpx;
}
.icon-safety {
width: 50rpx;
height: 46rpx;
margin-right: 42rpx;
}
.icon-authentication {
width: 54rpx;
height: 48rpx;
margin-right: 36rpx;
}
.icon-address {
width: 48rpx;
height: 42rpx;
margin-right: 42rpx;
}
.icon-customer {
width: 52rpx;
height: 50rpx;
margin-right: 38rpx;
}
.icon-walker {
width: 38rpx;
height: 40rpx;
margin-right: 40rpx;
}
.btn-box .right {
display: flex;
align-items: center;
flex:1;
padding: 32rpx 0;
justify-content: space-between;
}
.btn-box .right .text {
color: #252729;
font-size: 28rpx;
}
.btn-box .right .arrow {
width: 14rpx;
height: 26rpx;
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,29 @@ Page({
* 页面的初始数据
*/
data: {
current:0,
orderList:
[
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:1,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:2,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:3,},
{title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:4,},
],
tabcurrent: {tab: 3,bubble: ''},
is_showAnswer: false,
is_showUserInfo:false,
is_answer: true,
},
//tab点击事件
chargeTab(e) {
this.setData({
current: e.currentTarget.dataset.current
})
},
disableScroll() {},
handleBackground() {
console.log('dianji');
this.setData({is_showAnswer: false,is_showUserInfo:false,})
},
//首页-导航
service(e) {
... ... @@ -45,10 +67,17 @@ Page({
},
//发布按钮
release(e) {
let that = this;
that.setData({
releasepopup: true
})
console.log('发布');
const self = this;
if(!self.data.is_answer) {
self.setData({
is_showAnswer: true
});
}else {
self.setData({
is_showUserInfo: true
});
}
},
//取消发布弹窗
cancelPopup() {
... ...
{}
\ No newline at end of file
{
"navigationBarTitleText": "订单"
}
\ No newline at end of file
... ...
<!--pages/order/order.wxml-->
<view class='tab_box'>
<view class="tab_item {{current==0?'active':''}}" data-current='0' bindtap='chargeTab'>全部</view>
<view class="tab_item {{current==1?'active':''}}" data-current='1' bindtap='chargeTab'>待处理</view>
<view class="tab_item {{current==2?'active':''}}" data-current='2' bindtap='chargeTab'>已拼成</view>
<view class="tab_item {{current==3?'active':''}}" data-current='3' bindtap='chargeTab'>已完成</view>
<view class="tab_item {{current==4?'active':''}}" data-current='4' bindtap='chargeTab'>已取消</view>
</view>
<!--订单列表-->
<view class='content_box post_box' wx:if="{{orderList.length > 0}}">
<view class='content_item' wx:for="{{orderList}}" wx:key="index" bindtap='goPostDetail' data-index="{{index}}">
<image src="../../images/lishi@2x.png" class="thumb"></image>
<view class="lish-right">
<view class="title-box">
<view class="title">{{item.title}}</view>
<text wx:if="{{item.state === 1}}" class="state">待拼成</text>
<text wx:if="{{item.state === 2}}" class="state">已拼成</text>
<text wx:if="{{item.state === 3}}" class="state">已取消</text>
<text wx:if="{{item.state === 4}}" class="state">已完成</text>
</view>
<view class="time">{{item.time}}</view>
<view class="name-box">
<view class="name-left">
<image src="../../images/avatar@2x.png" class="avatar"></image>
<text>{{item.name}}</text>
</view>
<view class="btn">
<text wx:if="{{item.state === 4 || item.state === 3}}">删除</text>
<text wx:if="{{item.state === 2}}">完成</text>
</view>
</view>
</view>
</view>
</view>
<!--底部tab-->
<import src="/templates/templates.wxml" />
<template is="tabBar" data='{{...tabcurrent}}' />
<!--去答题弹框-->
<view class="input-box" wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/sorry@2x.png"></image>
<view class="title">目前只对</view>
<view class="title">首批会员开放发布功能</view>
<view class="tips">答题后可能获得第一批次入场卷</view>
<view class="answer-btn">答题</view>
</view>
<view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--去完善个人信息弹框-->
<view class="input-box" wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/user_info@2x.png"></image>
<view class="title">为了更好的体验</view>
<view class="title">请先完善个人信息</view>
<view class="answer-btn">完成</view>
</view>
<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
<view class="left-btn">
<image src="../../images/pincan@2x.png"></image>
<view class="text">发布拼餐</view>
</view>
<view class="right-btn">
<image src="../../images/pinhuodong@2x.png"></image>
<view class="text">发布拼活动</view>
</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
... ...
/* pages/order/order.wxss */
@import "../../templates/templates.wxss";
@import "../../pages/css/modal.wxss";
.tab_box {
height: 90rpx;
line-height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1rpx solid #f5f5f5;
overflow: hidden;
white-space: nowrap;
flex-wrap: nowrap;
position: fixed;
top:0;
left:0;
right:0;
}
.tab_item {
display: inline-block;
width: 160rpx;
font-size: 30rpx;
color: #333333;
position: relative;
text-align: center;
/* border: 1rpx solid red; */
}
.active {
color: #EA5D27;
}
.tab_box .active::after {
content: "";
/*border: 2rpx solid #DB4E2A;*/
position: absolute;
bottom: 0rpx;
left: 50%;
transform: translateX(-50%);
width: 80rpx;
height: 2rpx;
background: #EA5D27;
}.content_box {
padding: 10rpx 20rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-top: 1rpx solid #eeeeee;
}
.post_box {
margin-top: 92rpx;
}
.content_item {
display: flex;
align-items: center;
justify-content: flex-start;
padding: 30rpx 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-bottom: 1rpx solid #eeeeee;
}
.content_item .thumb {
width: 170rpx;
height: 170rpx;
margin-right: 26rpx;
}
.lish-right {
height: 166rpx;
display: flex;
flex:1;
flex-direction: column;
justify-content: space-around;
}
.lish-right .title-box {
display: flex;
align-items: center;
justify-content: space-between;
}
.lish-right .title, .lish-right .time{
font-size: 24rpx;
color: #333333;
}
.lish-right .state {
color:#999999;
font-size: 24rpx;
}
.lish-right .name-box {
display: flex;
align-items: center;
justify-content: space-between;
color: #666666;
font-size: 22rpx;
}
.lish-right .name-box .name-left {
display: flex;
align-items: center;
justify-content: flex-start;
}
.lish-right .name-box .btn {
color:#E2C8B1;
font-size: 24rpx;
}
.lish-right .name-box .btn text {
border-radius: 6rpx;
padding: 8rpx 32rpx;
background-color: #323232;
}
.lish-right .name-box .avatar{
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
... ...
... ... @@ -41,7 +41,15 @@ Page({
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
{area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
]
],
is_showAnswer: false,
is_showUserInfo:false,
is_answer: true,
},
disableScroll() {},
handleBackground() {
console.log('dianji');
this.setData({is_showAnswer: false,is_showUserInfo:false,})
},
//搜索
search() {
... ... @@ -163,10 +171,17 @@ Page({
},
//发布按钮
release(e) {
let that = this;
that.setData({
releasepopup: true
})
console.log('发布');
const self = this;
if(!self.data.is_answer) {
self.setData({
is_showAnswer: true
});
}else {
self.setData({
is_showUserInfo: true
});
}
},
//取消发布弹窗
cancelPopup() {
... ...
... ... @@ -36,7 +36,8 @@
<view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask">
<view class='rent_popup'>
<view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index"
catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>
catchtap='chooseSort' data-index="{{index}}">{{item.name}}
</view>
</view>
</view>
<!--筛选列表-->
... ... @@ -71,10 +72,11 @@
<text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text>
<text class="{{current_type === index?'change-color':''}}"
wx:for="{{type}}" wx:key="index" catchtap="chooseType"
data-index="{{index}}">{{item.name}}</text>
data-index="{{index}}">{{item.name}}
</text>
</view>
<!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"-->
<!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
<!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
</view>
</view>
</view>
... ... @@ -113,5 +115,32 @@
</view>
<!--底部tab-->
<import src="/templates/templates.wxml" />
<template is="tabBar" data='{{...tabcurrent}}' />
<import src="/templates/templates.wxml"/>
<template is="tabBar" data='{{...tabcurrent}}'/>
<!--去答题弹框-->
<view class="input-box" wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/sorry@2x.png"></image>
<view class="title">目前只对</view>
<view class="title">首批会员开放发布功能</view>
<view class="tips">答题后可能获得第一批次入场卷</view>
<view class="answer-btn">答题</view>
</view>
<view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
<!--去完善个人信息弹框-->
<view class="input-box" wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
<image class="sorry-img" src="../../images/user_info@2x.png"></image>
<view class="title">为了更好的体验</view>
<view class="title">请先完善个人信息</view>
<view class="answer-btn">完成</view>
</view>
<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
<view class="left-btn">
<image src="../../images/pincan@2x.png"></image>
<view class="text">发布拼餐</view>
</view>
<view class="right-btn">
<image src="../../images/pinhuodong@2x.png"></image>
<view class="text">发布拼活动</view>
</view>
</view>
<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
\ No newline at end of file
... ...
/* pages/spell-list/spell-list.wxss */
@import "../../templates/templates.wxss";
@import "../../pages/css/modal.wxss";
@keyframes content_box {
0% { opacity: 0; }
100% { opacity: 1; }
... ...
... ... @@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
... ... @@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.4.2",
"appid": "wxaab44bbcfc0e5bc5",
"appid": "wxd2b1f6c8f2b85caf",
"projectname": "%E7%81%AB%E6%9F%B4%E8%A5%BF%E8%B7%AF",
"debugOptions": {
"hidedInDevtools": []
... ...