@ -0,0 +1,85 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/shouye/shouye",
|
||||
"pages/shoppingCart/shoppingCart",
|
||||
"pages/my/my",
|
||||
"pages/logs/logs",
|
||||
"pages/index/index",
|
||||
"pages/release/release",
|
||||
"pages/order/order",
|
||||
"pages/search/search",
|
||||
"pages/search-book/search-book",
|
||||
"pages/post/post",
|
||||
"pages/weather/weather",
|
||||
"pages/movie-detail/movie-detail",
|
||||
"pages/components/news/news",
|
||||
"pages/components/weatherLocationTrand/weatherLocationTrand",
|
||||
"pages/components/recommend/recommend",
|
||||
"pages/sonShouye/movie-more/movie-more",
|
||||
"pages/sonShouye/movie-list/movie-list",
|
||||
"mapWeather/search/search",
|
||||
"mapWeather/regeocoding/regeocoding",
|
||||
"mapWeather/suggestion/suggestion",
|
||||
"mapWeather/weather/weather",
|
||||
"pages/my/mySetting/mySetting",
|
||||
"pages/my/myPost/myPost",
|
||||
"pages/my/myorder/myorder",
|
||||
"pages/my/purchaseHistory/purchaseHistory",
|
||||
"pages/my/addressAdmin/addressAdmin",
|
||||
"pages/my/myCart/myCart",
|
||||
"pages/my/systemNotification/systemNotification",
|
||||
"pages/classify/thing-search/thing-search",
|
||||
"pages/classify/sale/sale",
|
||||
"pages/classify/welfare/welfare",
|
||||
"pages/classify/job/job",
|
||||
"pages/sonShouye/headline/headline",
|
||||
"pages/classify/jobDetail/jobDetail",
|
||||
"pages/thing-detail/thing-detail",
|
||||
"pages/search-thing-result/search-thing-result",
|
||||
"pages/settlement/settlement"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#1E68C9",
|
||||
"backgroundTextStyle": "dark",
|
||||
"navigationBarTitleText": "校园二手交易",
|
||||
"navigationBarTextStyle": "#fff",
|
||||
"enablePullDownRefresh": true
|
||||
},
|
||||
"tabBar": {
|
||||
"list": [
|
||||
{
|
||||
"text": "首页",
|
||||
"pagePath": "pages/shouye/shouye",
|
||||
"iconPath": "images/tabBar/home.png",
|
||||
"selectedIconPath": "images/tabBar/home.fill.png"
|
||||
},
|
||||
{
|
||||
"text": "购物车",
|
||||
"pagePath": "pages/shoppingCart/shoppingCart",
|
||||
"iconPath": "images/tabBar/shoppingCart.png",
|
||||
"selectedIconPath": "images/tabBar/shoppingCart.fill.png"
|
||||
},
|
||||
{
|
||||
"text": "发布",
|
||||
"pagePath": "pages/post/post",
|
||||
"iconPath": "images/tabBar/release.png",
|
||||
"selectedIconPath": "images/tabBar/release.png"
|
||||
},
|
||||
{
|
||||
"text": "订单",
|
||||
"pagePath": "pages/order/order",
|
||||
"iconPath": "images/tabBar/order.png",
|
||||
"selectedIconPath": "images/tabBar/order.fill.png"
|
||||
},
|
||||
{
|
||||
"text": "我的",
|
||||
"pagePath": "pages/my/my",
|
||||
"iconPath": "images/tabBar/mine.png",
|
||||
"selectedIconPath": "images/tabBar/mine.fill.png"
|
||||
}
|
||||
],
|
||||
"color": "#000000",
|
||||
"selectedColor": "#1E68C9"
|
||||
},
|
||||
"debug": true
|
||||
}
|
@ -0,0 +1,159 @@
|
||||
/**app.wxss**/
|
||||
@import "./style/weui.wxss";
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 200rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #f3f3f3;
|
||||
font-family: "微软雅黑", "宋体";
|
||||
}
|
||||
|
||||
.logo {
|
||||
background-color: #f0eff4;
|
||||
height: 90rpx;
|
||||
line-height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 20rpx;
|
||||
color: #fff;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.logo image {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
.logo .input {
|
||||
width: 710rpx;
|
||||
height: 50rpx;
|
||||
border: 0;
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
font-size: 32rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.head view {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.head navigator {
|
||||
display: inline-block;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
|
||||
.head navigator.on {
|
||||
border-bottom: 1px solid #363636;
|
||||
}
|
||||
|
||||
.modular {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 0 0;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.modular .h1 {
|
||||
font-size: 40rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.modular .h1 .span {
|
||||
border-left: 10rpx solid #cda663;
|
||||
padding-left: 10rpx;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.modular .content {
|
||||
column-count: 4;
|
||||
column-gap: 32rpx;
|
||||
border-bottom: 2rpx solid #f1f1f1;
|
||||
overflow: hidden;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.modular .content image {
|
||||
width: 100%;
|
||||
height: 190rpx;
|
||||
}
|
||||
|
||||
.modular .content view {
|
||||
padding: 14rpx 0;
|
||||
line-height: 34rpx;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.modular .more {
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
color: #727ba6;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.modular .more .next {
|
||||
height: 16rpx;
|
||||
display: inline-block;
|
||||
width: 16rpx;
|
||||
border-right: 6rpx solid #c9c8cd;
|
||||
border-bottom: 6rpx solid #c9c8cd;
|
||||
transform: rotate(-45deg);
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
/* 收货地址的全部配置 */
|
||||
.citypickers{
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.citybody {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.cityheader {
|
||||
position: absolute;
|
||||
top:0px;
|
||||
width: 100%;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.city-cancel {
|
||||
float: left;
|
||||
margin: 20rpx;
|
||||
color: #818181;
|
||||
}
|
||||
|
||||
.city-true {
|
||||
float: right;
|
||||
margin: 20rpx;
|
||||
color: #2FB42E
|
||||
}
|
||||
|
||||
.section .picker {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px #d9d9d9 solid;
|
||||
border-top: 1px #d9d9d9 solid;
|
||||
padding: 20rpx;
|
||||
}
|
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 812 B |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 344 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 9.4 KiB |
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,9 @@
|
||||
<view class="map_container">
|
||||
<map class="map" id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="14" show-location="true" markers="{{markers}}" bindmarkertap="makertap"></map>
|
||||
</view>
|
||||
<view class="rgc_info">
|
||||
<text>{{rgcData.address}}</text>
|
||||
<text>{{rgcData.desc}}</text>
|
||||
<text>{{rgcData.business}}</text>
|
||||
</view>
|
||||
<view>{{school}}</view>
|
@ -0,0 +1,13 @@
|
||||
.map_container{
|
||||
height: 450px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.map {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.rgc_info {
|
||||
padding: 0 5px;
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
var bmap = require('../../utils/bmap-wx.min.js');
|
||||
var wxMarkerData = [];
|
||||
var searchData = {};
|
||||
Page({
|
||||
data: {
|
||||
markers: [],
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
placeData: {}
|
||||
},
|
||||
makertap: function(e) {
|
||||
var that = this;
|
||||
var id = e.markerId;
|
||||
that.showSearchInfo(wxMarkerData, id);
|
||||
that.changeMarkerColor(wxMarkerData, id);
|
||||
},
|
||||
onLoad: function() {
|
||||
var that = this;
|
||||
var BMap = new bmap.BMapWX({
|
||||
ak: 'zuwiVmIUj822mmW6psamM888QLz8Q5wF'
|
||||
});
|
||||
var fail = function(data) {
|
||||
console.log(data)
|
||||
};
|
||||
var success = function(data) {
|
||||
wxMarkerData = data.wxMarkerData;
|
||||
that.setData({
|
||||
markers: wxMarkerData
|
||||
});
|
||||
that.setData({
|
||||
latitude: wxMarkerData[0].latitude
|
||||
});
|
||||
that.setData({
|
||||
longitude: wxMarkerData[0].longitude
|
||||
});
|
||||
}
|
||||
BMap.search({
|
||||
"query": '大学学院',
|
||||
fail: fail,
|
||||
success: success,
|
||||
iconPath: '../../images/map/marker_red.png',
|
||||
iconTapPath: '../../images/map/marker_red.png'
|
||||
});
|
||||
|
||||
},
|
||||
onReady: function(){
|
||||
// 当页面首次渲染完成后触发的函数
|
||||
var that = this;
|
||||
searchData = that.data;
|
||||
console.log(searchData);
|
||||
},
|
||||
showSearchInfo: function(data, i) {
|
||||
console.log(data)
|
||||
var that = this;
|
||||
that.setData({
|
||||
placeData: {
|
||||
title: '名称:' + data[i].title + '\n',
|
||||
address: '地址:' + data[i].address + '\n',
|
||||
telephone: '电话:' + data[i].telephone
|
||||
}
|
||||
});
|
||||
},
|
||||
changeMarkerColor: function(data, id) {
|
||||
var that = this;
|
||||
var markersTemp = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (i === id) {
|
||||
data[i].iconPath = "../../images/map/marker_yellow.png";
|
||||
} else {
|
||||
data[i].iconPath = "../../images/map/marker_red.png";
|
||||
}
|
||||
markersTemp[i] = data[i];
|
||||
}
|
||||
that.setData({
|
||||
markers: markersTemp
|
||||
});
|
||||
},
|
||||
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,9 @@
|
||||
|
||||
<view class="map_container">
|
||||
<map class="map" id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="14" show-location="true" markers="{{markers}}" bindmarkertap="makertap"></map>
|
||||
</view>
|
||||
<view class="place_info">
|
||||
<text>{{placeData.title}}</text>
|
||||
<text>{{placeData.address}}</text>
|
||||
<text>{{placeData.telephone}}</text>
|
||||
</view>
|
@ -0,0 +1,13 @@
|
||||
.map_container{
|
||||
height: 450px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.map {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.place_info {
|
||||
padding: 0 5px;
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
var bmap = require('../../utils/bmap-wx.min.js');
|
||||
Page({
|
||||
data: {
|
||||
sugData: ''
|
||||
},
|
||||
bindKeyInput: function(e) {
|
||||
var that = this;
|
||||
if (e.detail.value === '') {
|
||||
that.setData({
|
||||
sugData: ''
|
||||
});
|
||||
return;
|
||||
}
|
||||
var BMap = new bmap.BMapWX({
|
||||
ak: 'zuwiVmIUj822mmW6psamM888QLz8Q5wF'
|
||||
});
|
||||
var fail = function(data) {
|
||||
console.log(data)
|
||||
};
|
||||
var success = function(data) {
|
||||
var sugData = '';
|
||||
for(var i = 0; i < data.result.length; i++) {
|
||||
sugData = sugData + data.result[i].name + '\n';
|
||||
}
|
||||
that.setData({
|
||||
sugData: sugData
|
||||
});
|
||||
}
|
||||
BMap.suggestion({
|
||||
|
||||
query: e.detail.value,
|
||||
region: '湖北',
|
||||
city_limit: true,
|
||||
fail: fail,
|
||||
success: success
|
||||
});
|
||||
}
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,6 @@
|
||||
<view class="section">
|
||||
<input placeholder="输入关键字" type="text" bindinput="bindKeyInput"/>
|
||||
</view>
|
||||
<view class="sug_info">
|
||||
<text>{{sugData}}</text>
|
||||
</view>
|
@ -0,0 +1,12 @@
|
||||
page {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
input {
|
||||
margin: 10px 10px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.sug_info {
|
||||
margin: 15px 10px;
|
||||
}
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,10 @@
|
||||
<view class="weather">
|
||||
<!-- <image src='{{weatherUrl}}' style='width:40rpx;height:40rpx'></image> -->
|
||||
<text>{{weatherData}}</text>
|
||||
<view wx:for="{{weather_data}}" wx:key="{{weather_data}}" wx:for-index="index" wx:for-item="item">
|
||||
<text>{{item.date}} : </text>
|
||||
<image src='{{item.dayPictureUrl}}' style='width:40rpx;height:40rpx'></image>
|
||||
<image src='{{item.nightPictureUrl}}' style='width:40rpx;height:40rpx'></image>
|
||||
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,13 @@
|
||||
.weather{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
padding-top: 150px;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #27AE60;
|
||||
}
|
@ -0,0 +1,140 @@
|
||||
// pages/classify/job/job.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
jobMessage: {}, //兼职信息
|
||||
jobId: '',
|
||||
jobLength: '5',
|
||||
isJobShow: false,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var id = options.id;
|
||||
this.getMovieListData();
|
||||
|
||||
},
|
||||
getMovieListData: function () {
|
||||
var that = this;
|
||||
var isJobShow = that.data.isJobShow;
|
||||
var jobMessage = 'jobMessage';
|
||||
var jobId = that.data.jobId;
|
||||
var jobLength = that.data.jobLength;
|
||||
var url = app.globalData.huanbaoBase + 'refreshjobs.php';
|
||||
|
||||
if(jobLength < 5){
|
||||
that.setData({
|
||||
isJobShow: true
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.showToast({
|
||||
title: '加载中',
|
||||
icon: 'loading',
|
||||
duration: 2000,
|
||||
})
|
||||
wx.request({
|
||||
url,
|
||||
method: 'POST',
|
||||
header: { 'content-type': 'application/x-www-form-urlencoded ' },
|
||||
data: {
|
||||
lastId: jobId
|
||||
},
|
||||
success: res => {
|
||||
|
||||
var messages = that.data.jobMessage.messages || [];
|
||||
var data = res.data.data;
|
||||
that.setData({
|
||||
jobLength: data.length //每次获取5组值
|
||||
})
|
||||
data.forEach(item => {
|
||||
messages.push(item);
|
||||
})
|
||||
console.log(messages);
|
||||
that.setData({
|
||||
[jobMessage]: {messages},
|
||||
jobId: res.data.data[4].jobid
|
||||
})
|
||||
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
},
|
||||
toDetail(e) {
|
||||
var that = this;
|
||||
var id = e.currentTarget.dataset.id;
|
||||
console.log(id);
|
||||
wx.navigateTo({
|
||||
url: '../jobDetail/jobDetail?id=' + id
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '校园兼职'
|
||||
});
|
||||
wx.showNavigationBarLoading(); //在标题栏中显示加载图标
|
||||
setTimeout(function () {
|
||||
wx.stopPullDownRefresh(); //停止加载
|
||||
wx.hideNavigationBarLoading(); //隐藏加载icon
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
this.getMovieListData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
loadMore: function () {
|
||||
console.log(1);
|
||||
|
||||
},
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "校园兼职"
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
<!--pages/classify/job/job.wxml-->
|
||||
|
||||
<view class='job-wrapper'>
|
||||
<view class='job-tip'>温馨提示:平台兼职信息为本校学生所发,信息真实性请与发布者核实后报名,凡收取费用的兼职请谨慎报名,以防被骗</view>
|
||||
|
||||
<view class='job-school'>湖北科技学院学生兼职</view>
|
||||
<scroll-view scroll-y class='scroll-job' bindscrolltolower="loadMore">
|
||||
<block wx:for="{{jobMessage.messages}}" wx:key="{{jobMessage.messages}}">
|
||||
<view class='job-box' bindtap='toDetail' data-id='{{item.jobid}}'>
|
||||
<view class='job-top'>
|
||||
<text class="job-title">{{item.title}}</text>
|
||||
<text class="job-jianzhi">兼职</text>
|
||||
</view>
|
||||
<text class='job-place'>{{item.workplace}}</text>
|
||||
<text class='job-time'>{{item.worktime}}</text>
|
||||
<text class='job-require'>{{item.workrequirement}}</text>
|
||||
<text class='job-treat'>{{item.workpay}}</text>
|
||||
</view>
|
||||
</block>
|
||||
<view wx:if="{{isJobShow}}" class='bottom'>到底了,没有了</view>
|
||||
</scroll-view>
|
||||
</view>
|
@ -0,0 +1,63 @@
|
||||
/* pages/classify/job/job.wxss */
|
||||
.job-wrapper {
|
||||
background-color: #fff;
|
||||
}
|
||||
.job-tip{
|
||||
padding: 10rpx 20rpx;
|
||||
color: red;
|
||||
font-size: 28rpx;
|
||||
background-color: #e6e6e6;
|
||||
|
||||
}
|
||||
|
||||
.job-school {
|
||||
display: inline-block;
|
||||
padding: 30rpx 40rpx;
|
||||
color: #444;
|
||||
font-size: 36rpx;
|
||||
|
||||
}
|
||||
.job-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-top-width: 1rpx;
|
||||
border-top-style: solid;
|
||||
border-top-color: #f3f3f3;
|
||||
padding: 30rpx 40rpx;
|
||||
}
|
||||
.job-title {
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.job-jianzhi {
|
||||
display: inline-block;
|
||||
background-color: #37A88D;
|
||||
border-radius: 10rpx;
|
||||
color: #fff;
|
||||
padding: 5rpx 10rpx;
|
||||
margin-left: 20rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.job-place {
|
||||
color: #666;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.job-time {
|
||||
color: #666;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.job-require {
|
||||
color: #666;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.job-treat {
|
||||
font-size: 36rpx;
|
||||
color: #f40;
|
||||
}
|
||||
.bottom {
|
||||
font-size: 28rpx;
|
||||
color: #e9e9e9;
|
||||
text-align: center;
|
||||
background-color: #666;
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
// pages/classify/jobDetail/jobDetail.js
|
||||
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
jobTitle: '', //兼职名字
|
||||
jobTreat: '', //兼职待遇
|
||||
jobTime: '', //兼职时间
|
||||
jobPlace: '', //兼职地点
|
||||
jobRequire: '', //兼职要求
|
||||
jobDiscripe: '', //兼职描述
|
||||
jobPoster: '', //兼职发布者
|
||||
jobContactWay: '', //兼职联系方式
|
||||
jobId: '', //兼职id
|
||||
studentId: '', //学生id
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var that = this;
|
||||
wx.showToast({
|
||||
title: '加载中',
|
||||
icon: 'loading',
|
||||
duration: 2000
|
||||
});
|
||||
var jobTitle = that.data.jobTitle;
|
||||
var jobTreat = that.data.jobTreat;
|
||||
var jobTime = that.data.jobTime;
|
||||
var jobPlace = that.data.jobPlace;
|
||||
var jobRequire = that.data.jobRequire;
|
||||
var jobDiscripe = that.data.jobDiscripe;
|
||||
var jobPoster = that.data.jobPoster;
|
||||
var jobContactWay = that.data.jobContactWay;
|
||||
var jobId = that.data.jobId;
|
||||
|
||||
var url = app.globalData.huanbaoBase + 'getbyjobid.php';
|
||||
wx.request({
|
||||
url,
|
||||
method: 'POST',
|
||||
|
||||
header: { 'content-type': 'application/x-www-form-urlencoded ' },
|
||||
data: {
|
||||
jobId: options.id,
|
||||
},
|
||||
success: function (res) {
|
||||
|
||||
var data = res.data.data[0];
|
||||
console.log(data);
|
||||
that.setData({
|
||||
jobTitle: data.title,
|
||||
jobTreat: data.workpay,
|
||||
jobTime: data.worktime,
|
||||
jobPlace: data.workplace,
|
||||
jobRequire: data.workrequirement,
|
||||
jobDiscripe: data.discription,
|
||||
jobPoster: data.username,
|
||||
jobContactWay: data.workcontact,
|
||||
})
|
||||
} //此处的res就是data对象
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '兼职详情'
|
||||
});
|
||||
wx.showNavigationBarLoading(); //在标题栏中显示加载图标
|
||||
setTimeout(function () {
|
||||
wx.stopPullDownRefresh(); //停止加载
|
||||
wx.hideNavigationBarLoading(); //隐藏加载icon
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "兼职详情",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<!--pages/classify/jobDetail/jobDetail.wxml-->
|
||||
<view class='job-wrapper'>
|
||||
<view class='job-title'>
|
||||
<view class='title'> {{jobTitle}}</view>
|
||||
<view class='jianzhi'>兼职</view>
|
||||
<view class='jiesuan'>{{jobTreat}}</view>
|
||||
|
||||
</view>
|
||||
<view class='job-school'>本职位由本校学生提供</view>
|
||||
<view class='job-detail'>
|
||||
<view>工作时间:{{jobTime}}</view>
|
||||
<view>工作地点:{{jobPlace}}</view>
|
||||
<view>人员要求:{{jobRequire}}</view>
|
||||
<view>详情描述:{{jobDiscripe}}</view>
|
||||
<view>发布者:{{jobPoster}}</view>
|
||||
<view>联系方式:{{jobContactWay}}</view>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,56 @@
|
||||
/* pages/classify/jobDetail/jobDetail.wxss */
|
||||
.job-wrapper {
|
||||
background-color: #F5F5F7;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
.job-title {
|
||||
border-top-width: 1rpx;
|
||||
border-top-color: #F5F5F7;
|
||||
border-top-style: solid;
|
||||
padding: 30rpx 40rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.title {
|
||||
display: inline-block;
|
||||
font-size: 46rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.jiesuan {
|
||||
margin-top: 10rpx;
|
||||
font-size: 30rpx;
|
||||
color: #f40;
|
||||
padding: 5rpx 10rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.jianzhi {
|
||||
display: inline-block;
|
||||
background-color: #37A88D;
|
||||
border-radius: 10rpx;
|
||||
color: #fff;
|
||||
padding: 5rpx 10rpx;
|
||||
margin-left: 40rpx;
|
||||
font-size: 32rpx;
|
||||
|
||||
}
|
||||
.job-school {
|
||||
width: 100%;
|
||||
height: 50rpx;
|
||||
padding: 20rpx 40rpx;
|
||||
border-top-width: 1rpx;
|
||||
border-top-color: #F5F5F7;
|
||||
border-top-style: solid;
|
||||
background-color: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.job-detail{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.job-detail view{
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
padding: 20rpx 40rpx;
|
||||
border-top-width: 1rpx;
|
||||
border-top-color: #F5F5F7;
|
||||
border-top-style: solid;
|
||||
background-color: #fff;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// pages/classify/sale/sale.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,2 @@
|
||||
<!--pages/classify/sale/sale.wxml-->
|
||||
<text>pages/classify/sale/sale.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/classify/sale/sale.wxss */
|
@ -0,0 +1,139 @@
|
||||
// pages/search/search.js
|
||||
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
// 存放数据
|
||||
resultList: [],
|
||||
keyWord: '',
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '搜索物品'
|
||||
});
|
||||
wx.showNavigationBarLoading(); //在标题栏中显示加载图标
|
||||
setTimeout(function () {
|
||||
wx.stopPullDownRefresh(); //停止加载
|
||||
wx.hideNavigationBarLoading(); //隐藏加载icon
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
bindToSearch(e) {
|
||||
var that = this;
|
||||
var keyWord = that.data.keyWord;
|
||||
console.log(1);
|
||||
console.log(keyWord);
|
||||
wx.navigateTo({
|
||||
url: '../../search-thing-result/search-thing-result?keyWord=' + keyWord
|
||||
})
|
||||
},
|
||||
searchBook(e) {
|
||||
var that = this;
|
||||
var keyWord = that.data.keyWord;
|
||||
var value = e.detail.value; //input输入的值
|
||||
console.log(value);
|
||||
that.setData({
|
||||
keyWord: value
|
||||
})
|
||||
|
||||
var url = app.globalData.huanbaoBase + 'searchthing.php';
|
||||
//微信请求方式的写法
|
||||
|
||||
wx.request({
|
||||
url,
|
||||
method: 'POST',
|
||||
data: {
|
||||
keyword: value
|
||||
},
|
||||
header: { 'content-type': 'application/x-www-form-urlencoded ' },
|
||||
success(res) {
|
||||
console.log(res);
|
||||
that.handleData(res.data.data);
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
},
|
||||
handleData(data) {
|
||||
console.log(data);
|
||||
var resultList = []
|
||||
data.forEach(item => {
|
||||
//注意: push可以是具体的对象
|
||||
// resultList.push({
|
||||
// title: item.title,
|
||||
// image: item.images.small,
|
||||
// desc,
|
||||
// id: item.id
|
||||
// })
|
||||
resultList.push(item)
|
||||
})
|
||||
this.setData({ resultList: resultList });//将此处resultList的值放在数据data的resultList中
|
||||
|
||||
},
|
||||
bindToSearchList(e) {
|
||||
console.log(e.currentTarget.dataset.value);
|
||||
var that = this;
|
||||
var value = e.currentTarget.dataset.value;
|
||||
var keyWord = value;
|
||||
wx.navigateTo({
|
||||
url: '../../search-thing-result/search-thing-result?keyWord=' + keyWord
|
||||
})
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "搜索物品"
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
|
||||
<view class='search'>
|
||||
<view class='search-book'>
|
||||
<icon type='search' size='16' class='search-icon'></icon>
|
||||
<input class='search-input' placeholder='物品搜索' bindinput='searchBook'></input>
|
||||
<text class='search-search' data-keyWord='{{keyWord}}' bindtap='bindToSearch'>搜索</text>
|
||||
</view>
|
||||
|
||||
<view class='search-list'>
|
||||
<block wx:for="{{resultList}}" wx:key="result">
|
||||
<view class='book-wrapper' >
|
||||
<view class='book-content' data-value='{{item}}' bindtap='bindToSearchList'>{{item}}</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
@ -0,0 +1,59 @@
|
||||
/* pages/search-book/search-book.wxss */
|
||||
.search {
|
||||
background-color: #fff;
|
||||
}
|
||||
.search-book {
|
||||
display: flex;
|
||||
padding: 20rpx 30rpx;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-width: 2rpx 0rpx;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.search-icon {
|
||||
margin-right: 30rpx;
|
||||
|
||||
}
|
||||
.search-placeholder {
|
||||
color:#d8d8d8;
|
||||
}
|
||||
.search-input {
|
||||
flex: 1;
|
||||
color: #4a4a4a;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.search-search {
|
||||
width: 80rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
background-color: #FF7B00;
|
||||
color: #fff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.book-wrapper {
|
||||
padding: 0 30rpx;
|
||||
border-bottom: 1px solid #F8F8F8;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
.book-content {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: stretch;
|
||||
margin: 16rpx 0;
|
||||
color: #626667;
|
||||
font-size: 30rpx;
|
||||
padding: 15rpx 0rpx;
|
||||
}
|
||||
.book-content::after {
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
content: ">";
|
||||
font-size: 40rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
|
@ -0,0 +1,66 @@
|
||||
// pages/classify/welfare/welfare.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,2 @@
|
||||
<!--pages/classify/welfare/welfare.wxml-->
|
||||
<text>pages/classify/welfare/welfare.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/classify/welfare/welfare.wxss */
|
@ -0,0 +1,66 @@
|
||||
// pages/movie-grid/movie-grid.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,21 @@
|
||||
<!--pages/movie-grid/movie-grid.wxml-->
|
||||
|
||||
<template name="movie-grid">
|
||||
<view class='movie-wrapper' data-id='{{bookid}}'bindtap='toDetail' data-id='{{bookid}}'>
|
||||
<view class='movie-content'>
|
||||
<image class='poster' src='{{picture}}'></image>
|
||||
<text class='name'>{{bname}}</text>
|
||||
<text class='wish-count'>¥{{bprice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template name="movie-grid2">
|
||||
<view class='movie-wrapper' data-id='{{goodid}}'bindtap='toThingsDetail' data-id='{{goodid}}'>
|
||||
<view class='movie-content'>
|
||||
<image class='poster' src='{{gpicture}}'></image>
|
||||
<text class='name'>{{gname}}</text>
|
||||
<text class='wish-count'>¥{{gprice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
@ -0,0 +1,28 @@
|
||||
/* pages/movie-grid/movie-grid.wxss */
|
||||
.movie-wrapper {
|
||||
display: inline-block;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
.movie-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
/* 图片的类poster */
|
||||
.poster {
|
||||
width: 185rpx;
|
||||
height: 220rpx;
|
||||
}
|
||||
.name {
|
||||
width: 200rpx;
|
||||
color: #4a4a4a;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
white-space: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wish-count {
|
||||
color: #f40;
|
||||
font-size: 36rpx;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// pages/components/news/news.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,16 @@
|
||||
<!--pages/components/news/news.wxml-->
|
||||
<template name="theNews">
|
||||
<swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="2000">
|
||||
<block wx:for="{{msgList}}" wx:key="{{imgUrls}}">
|
||||
<navigator url="/pages/sonShouye/headline/headline?title={{item.url}}" open-type="navigate">
|
||||
<swiper-item>
|
||||
<view class="swiper_item">{{item.title}}</view>
|
||||
</swiper-item>
|
||||
</navigator>
|
||||
</block>
|
||||
</swiper>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,17 @@
|
||||
/* pages/components/news/news.wxss */
|
||||
.swiper_container {
|
||||
color: #E1B47C;
|
||||
background-color: #F3F3F3;
|
||||
height: 60rpx;
|
||||
width: 100%;
|
||||
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.swiper_item {
|
||||
text-indent: 1rem;
|
||||
font-size: 30rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// pages/components/recommend/recommend.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,40 @@
|
||||
/* pages/components/recommend/recommend.wxss */
|
||||
@import '../movie-grid/movie-grid.wxss';
|
||||
.cont {
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
.session-page {
|
||||
background-color: #fff;
|
||||
border-width: 2rpx 0;
|
||||
border-color: #e6e6e6;
|
||||
border-style: solid;
|
||||
padding-bottom: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.session-header {
|
||||
padding: 10rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.header-title {
|
||||
color: #4a4a4a;
|
||||
flex: 1;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
|
||||
}
|
||||
.header-more {
|
||||
color: #32cd32;
|
||||
|
||||
}
|
||||
.session-content {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.movie-scroll {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,18 @@
|
||||
<!--pages/components/weatherLocationTrand/weatherLocationTrand.wxml-->
|
||||
<template name="search">
|
||||
<view class="place_info">
|
||||
<!-- 此处URL是以调用者的位置来找文件的 -->
|
||||
<!-- 链接的位置太远,也是没有效果的,既不报错,也没有跳转,比如:../../mapWeather/search/search -->
|
||||
<navigator url="../search/search" class='location'>
|
||||
<view class='school'>
|
||||
<text>{{search.schoolPlace || search.placeData.title}}</text>
|
||||
</view>
|
||||
<canvas canvas-id="myCanvas" class='myCanvas' />
|
||||
</navigator>
|
||||
|
||||
</view>
|
||||
<!-- <view class="map_container">
|
||||
<map class="map" id="map" longitude="{{search.longitude}}" latitude="{{search.latitude}}" scale="14" show-location="true" markers="{{search.markers}}" bindmarkertap="makertap"></map>
|
||||
</view> -->
|
||||
|
||||
</template>
|
@ -0,0 +1,31 @@
|
||||
/* pages/components/weatherLocationTrand/weatherLocationTrand.wxss */
|
||||
.place_info {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
background-color: #f3f3f3;
|
||||
padding: 0 5px;
|
||||
border-bottom: 1rpx solid rgba(153, 153, 153, 0.5);
|
||||
|
||||
}
|
||||
.location {
|
||||
width: 220rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.school {
|
||||
width: 190rpx;
|
||||
height: 100%;
|
||||
line-height: 70rpx;
|
||||
color: #3E97CC;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.myCanvas {
|
||||
position: absolute;
|
||||
top: 12rpx;
|
||||
left: 180rpx;
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
@ -0,0 +1,118 @@
|
||||
//index.js
|
||||
//获取应用实例
|
||||
var tcity = require("../../utils/citys.js");
|
||||
|
||||
var app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
provinces: [],
|
||||
province: "",
|
||||
citys: [],
|
||||
city: "",
|
||||
countys: [],
|
||||
county: '',
|
||||
value: [0, 0, 0],
|
||||
values: [0, 0, 0],
|
||||
condition: false
|
||||
},
|
||||
bindChange: function(e) {
|
||||
//console.log(e);
|
||||
var val = e.detail.value
|
||||
var t = this.data.values;
|
||||
var cityData = this.data.cityData;
|
||||
|
||||
if(val[0] != t[0]){
|
||||
console.log('province no ');
|
||||
const citys = [];
|
||||
const countys = [];
|
||||
|
||||
for (let i = 0 ; i < cityData[val[0]].sub.length; i++) {
|
||||
citys.push(cityData[val[0]].sub[i].name)
|
||||
}
|
||||
for (let i = 0 ; i < cityData[val[0]].sub[0].sub.length; i++) {
|
||||
countys.push(cityData[val[0]].sub[0].sub[i].name)
|
||||
}
|
||||
|
||||
this.setData({
|
||||
province: this.data.provinces[val[0]],
|
||||
city: cityData[val[0]].sub[0].name,
|
||||
citys:citys,
|
||||
county: cityData[val[0]].sub[0].sub[0].name,
|
||||
countys:countys,
|
||||
values: val,
|
||||
value:[val[0],0,0]
|
||||
})
|
||||
|
||||
return;
|
||||
}
|
||||
if(val[1] != t[1]){
|
||||
console.log('city no');
|
||||
const countys = [];
|
||||
|
||||
for (let i = 0 ; i < cityData[val[0]].sub[val[1]].sub.length; i++) {
|
||||
countys.push(cityData[val[0]].sub[val[1]].sub[i].name)
|
||||
}
|
||||
|
||||
this.setData({
|
||||
city: this.data.citys[val[1]],
|
||||
county: cityData[val[0]].sub[val[1]].sub[0].name,
|
||||
countys:countys,
|
||||
values: val,
|
||||
value:[val[0],val[1],0]
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(val[2] != t[2]){
|
||||
console.log('county no');
|
||||
this.setData({
|
||||
county: this.data.countys[val[2]],
|
||||
values: val
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
open:function(){
|
||||
this.setData({
|
||||
condition:!this.data.condition
|
||||
})
|
||||
},
|
||||
onLoad: function () {
|
||||
console.log("onLoad");
|
||||
var that = this;
|
||||
|
||||
tcity.init(that);
|
||||
|
||||
var cityData = that.data.cityData;
|
||||
|
||||
|
||||
const provinces = [];
|
||||
const citys = [];
|
||||
const countys = [];
|
||||
|
||||
for(let i=0;i<cityData.length;i++){
|
||||
provinces.push(cityData[i].name);
|
||||
}
|
||||
console.log('省份完成');
|
||||
for (let i = 0 ; i < cityData[0].sub.length; i++) {
|
||||
citys.push(cityData[0].sub[i].name)
|
||||
}
|
||||
console.log('city完成');
|
||||
for (let i = 0 ; i < cityData[0].sub[0].sub.length; i++) {
|
||||
countys.push(cityData[0].sub[0].sub[i].name)
|
||||
}
|
||||
|
||||
that.setData({
|
||||
'provinces': provinces,
|
||||
'citys':citys,
|
||||
'countys':countys,
|
||||
'province':cityData[0].name,
|
||||
'city':cityData[0].sub[0].name,
|
||||
'county':cityData[0].sub[0].sub[0].name
|
||||
})
|
||||
console.log('初始化完成');
|
||||
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,26 @@
|
||||
<!--index.wxml-->
|
||||
|
||||
<view class="container">
|
||||
|
||||
<view class="input">
|
||||
<input placeholder="选择" value="{{province}}-{{city}}-{{county}}" focus="{{focus}}" bindfocus="open" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view wx:if="{{condition}}" class="citypicker">
|
||||
<picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{value}}" bindchange="bindChange" class="citybody">
|
||||
<view class="cityheader">
|
||||
<view bindtap="open" class="city-cancel">取消</view>
|
||||
<view bindtap="open" class="city-true">确定</view>
|
||||
</view>
|
||||
<picker-view-column>
|
||||
<view wx:for="{{provinces}}" wx:key="item" style="line-height: 50px;padding-left:10px;" >{{item}}</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view wx:for="{{citys}}" wx:key="item" style="line-height: 50px;padding-left:10px;">{{item}}</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view wx:for="{{countys}}" wx:key="item" style="line-height: 50px;padding-left:10px;">{{item}}</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
@ -0,0 +1,32 @@
|
||||
/**index.wxss**/
|
||||
.input {
|
||||
padding-top: 300rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input input {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px #d9d9d9 solid;
|
||||
border-top: 1px #d9d9d9 solid;
|
||||
padding: 20rpx 50rpx;
|
||||
}
|
||||
|
||||
.section {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.userinfo-avatar {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.userinfo-nickname {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.usermotto {
|
||||
margin-top: 200px;
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
const APP_ID = ''; //输入小程序appid
|
||||
const APP_SECRET = ''; //输入小程序app_secret
|
||||
var OPEN_ID = '' //储存获取到openid
|
||||
var SESSION_KEY = '' //储存获取到session_key
|
||||
Page({
|
||||
getOpenIdTap: function() {
|
||||
var that = this;
|
||||
wx.login({
|
||||
success: function(res) {
|
||||
wx.request({
|
||||
//获取openid接口
|
||||
url: 'https://api.weixin.qq.com/sns/jscode2session',
|
||||
data: {
|
||||
appid: APP_ID,
|
||||
secret: APP_SECRET,
|
||||
js_code: res.code,
|
||||
grant_type: 'authorization_code'
|
||||
},
|
||||
method: 'GET',
|
||||
success: function(res) {
|
||||
console.log(res.data)
|
||||
OPEN_ID = res.data.openid; //获取到的openid
|
||||
SESSION_KEY = res.data.session_key; //获取到session_key
|
||||
console.log(OPEN_ID.length)
|
||||
console.log(SESSION_KEY.length)
|
||||
that.setData({
|
||||
openid: res.data.openid.substr(0, 10) + '********' + res.data.openid.substr(res.data.openid.length - 8, res.data.openid.length),
|
||||
session_key: res.data.session_key.substr(0, 8) + '********' + res.data.session_key.substr(res.data.session_key.length - 6, res.data.session_key.length)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "查看启动日志"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
<!--logs.wxml-->
|
||||
<button wx:if="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button>
|
||||
<view wx:else>请升级微信版本</view>
|
After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,343 @@
|
||||
// pages/movie-detail/movie-detail.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
detailData: {
|
||||
url: '',
|
||||
bookName: '', //书名
|
||||
bookAuthor: '',//作者
|
||||
bookPress: '',//出版社
|
||||
isTextbook: false,//是否资料书
|
||||
conditions: '',//
|
||||
campus: '',// 校区
|
||||
price: '', //价格
|
||||
remark: '', //备注,详情
|
||||
poster: '', //发布者
|
||||
},
|
||||
hadAddCart: false , //已经加入购物车
|
||||
studentId: '',
|
||||
bookId: '',
|
||||
theCover: false,
|
||||
thePay: false,
|
||||
nickName: '',
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
console.log(options.id); //接收上一个页面传过来的数据,是个对象。
|
||||
wx.showToast({
|
||||
title: '加载中',
|
||||
icon: 'loading',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
var that = this;
|
||||
var detailData = that.data.detailData;
|
||||
var theUrl = 'detailData.url';
|
||||
var bookName = 'detailData.bookName';
|
||||
var bookAuthor = 'detailData.bookAuthor';
|
||||
var bookPress = 'detailData.bookPress';
|
||||
var isTextbook = 'detailData.isTextbook';
|
||||
var conditions = 'detailData.conditions';
|
||||
var campus = 'detailData.campus';
|
||||
var price = 'detailData.price';
|
||||
var remark = 'detailData.remark';
|
||||
var poster = 'detailData.poster';
|
||||
var studentId = that.data.studentId; //学生id
|
||||
var bookId = that.data.bookId; //书本id
|
||||
var nickName = that.data.nickName;
|
||||
var url = app.globalData.huanbaoBase + 'getbybookid.php';
|
||||
|
||||
try {
|
||||
var value = wx.getStorageSync('studentIdSync')
|
||||
if (value) {
|
||||
console.log(value); //同步得到studentId的值
|
||||
that.setData({
|
||||
studentId: value
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(0);
|
||||
}
|
||||
try {
|
||||
var value = wx.getStorageSync('nickName')
|
||||
if (value) {
|
||||
that.setData({
|
||||
[nickName]: value
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
// Do something when catch error
|
||||
}
|
||||
console.log(studentId);//此处是获取不到值的
|
||||
wx.request({
|
||||
url,
|
||||
method: 'POST',
|
||||
// header: {'content-type' : 'json'},
|
||||
header: { 'content-type': 'application/x-www-form-urlencoded '},
|
||||
data: {
|
||||
bookId: options.id,
|
||||
},
|
||||
success: function(res){
|
||||
|
||||
var data = res.data.data[0];
|
||||
that.setData({
|
||||
[theUrl]: data.picture,
|
||||
[bookName]: data.bname,
|
||||
[isTextbook]: data.reference,
|
||||
[remark]: data.bnote || '无描述',
|
||||
[price]: data.bprice,
|
||||
[bookAuthor]: data.author,
|
||||
[bookPress]: data.press,
|
||||
[poster]: data.usersname,
|
||||
[campus]: data.college,
|
||||
[conditions]: data.bstatus,
|
||||
bookId: options.id
|
||||
})
|
||||
} //此处的res就是data对象
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
var that = this;
|
||||
var studentId = that.data.studentId; //学生id
|
||||
var nickName = that.data.nickName;
|
||||
try {
|
||||
var value = wx.getStorageSync('studentIdSync')
|
||||
if (value) {
|
||||
console.log(value); //同步得到studentId的值
|
||||
that.setData({
|
||||
studentId: value
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(0);
|
||||
}
|
||||
console.log(studentId);
|
||||
try {
|
||||
var value = wx.getStorageSync('nickName')
|
||||
if (value) {
|
||||
that.setData({
|
||||
nickName: value
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
// Do something when catch error
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '书本详情'
|
||||
});
|
||||
wx.showNavigationBarLoading(); //在标题栏中显示加载图标
|
||||
setTimeout(function () {
|
||||
wx.stopPullDownRefresh(); //停止加载
|
||||
wx.hideNavigationBarLoading(); //隐藏加载icon
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
addMyCart(){
|
||||
var that = this;
|
||||
var hadAddCart = that.data.hadAddCart;
|
||||
var studentId = that.data.studentId;
|
||||
var bookId = that.data.bookId;
|
||||
var url = app.globalData.huanbaoBase + 'bookcar.php'
|
||||
console.log(bookId);
|
||||
if(studentId){
|
||||
console.log(studentId);
|
||||
if (!hadAddCart) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否加入购物车',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.request({
|
||||
url, //仅为示例,并非真实的接口地址
|
||||
method: 'POST',
|
||||
data: {
|
||||
studentId: studentId,
|
||||
bookId: bookId,
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded' // 默认值
|
||||
},
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
hadAddCart: true
|
||||
})
|
||||
wx.showToast({
|
||||
title: '成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '请勿重复添加',
|
||||
|
||||
})
|
||||
}
|
||||
}else {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '请认证您的身份',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.navigateTo({
|
||||
url: '../my/mySetting/mySetting',
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
nowBuy() {
|
||||
var that = this;
|
||||
var bookId = this.data.bookId;
|
||||
var theCover = that.data.theCover;
|
||||
var thePay = that.data.thePay;
|
||||
that.setData({
|
||||
theCover: true,
|
||||
thePay: true,
|
||||
})
|
||||
},
|
||||
deletePay() {
|
||||
var that = this;
|
||||
var theCover = that.data.theCover;
|
||||
var thePay = that.data.thePay;
|
||||
that.setData({
|
||||
theCover: false,
|
||||
thePay: false,
|
||||
})
|
||||
},
|
||||
buy() {
|
||||
var that = this;
|
||||
var bookId = this.data.bookId;
|
||||
var url = app.globalData.huanbaoBase + 'tempbooks.php';
|
||||
wx.request({
|
||||
url, //仅为示例,并非真实的接口地址
|
||||
method: 'POST',
|
||||
data: {
|
||||
bookId: bookId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded' // 默认值
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res.data);
|
||||
if (res.data === 1) {
|
||||
that.ReservationPayment();//预约付款
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '该商品已下架',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
ReservationPayment(){
|
||||
var that = this;
|
||||
var bookId = that.data.bookId;
|
||||
var studentId = that.data.studentId;
|
||||
var nickName = that.data.nickName;
|
||||
var url = app.globalData.huanbaoBase + 'buybook.php';
|
||||
console.log(nickName)
|
||||
console.log("预约购买")
|
||||
wx.request({
|
||||
url, //仅为示例,并非真实的接口地址
|
||||
method: 'POST',
|
||||
data: {
|
||||
bookId: bookId,
|
||||
buyStatus: 1,
|
||||
buyStudentID: studentId,
|
||||
buyUsername: nickName,
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded' // 默认值
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
wx.showToast({
|
||||
title: '预购成功',
|
||||
icon: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
setTimeout(function(){
|
||||
wx.switchTab({
|
||||
url: '../order/order'
|
||||
})
|
||||
}, 1500)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "书本详情"
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
/* pages/movie-detail/movie-detail.wxss */
|
||||
|
||||
.detail {
|
||||
padding-bottom: 300rpx;
|
||||
}
|
||||
|
||||
.coverFadeIn {
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #333;
|
||||
z-index: 10;
|
||||
-moz-opacity: 0.7;
|
||||
opacity: 0.7;
|
||||
filter: alpha(opacity=70);
|
||||
transition: opacity 300ms linear;
|
||||
}
|
||||
|
||||
.detail-cont {
|
||||
color: #666;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.detail-image {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -230rpx;
|
||||
width: 460rpx;
|
||||
height: 600rpx;
|
||||
margin-top: -620rpx;
|
||||
}
|
||||
.detail-sale {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
margin-top: 640rpx;
|
||||
}
|
||||
.detail-selling-price-img {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
width: 80rpx;
|
||||
}
|
||||
.detail-price {
|
||||
background-color: #D0011B;
|
||||
flex: 5;
|
||||
color: #FFD2BB;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.detail-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: red;
|
||||
}
|
||||
.detail-sell {
|
||||
flex: 5;
|
||||
background:linear-gradient(to right, #FEF841 , #FFC114);
|
||||
color: #A8B527;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.detail-detail-box {
|
||||
margin: 10rpx auto;
|
||||
background-color: #F2F3F3;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
}
|
||||
.detail-detail-image {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -200rpx;
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.detail-bottom {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
|
||||
}
|
||||
.addCart {
|
||||
color: white;
|
||||
text-align: center;
|
||||
background-color: #F33C52;
|
||||
flex: 1;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.buyNow {
|
||||
color: white;
|
||||
text-align: center;
|
||||
background-color: #D0011B;
|
||||
flex: 1;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.paySlideUp {
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
height: 640rpx;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
transition: bottom 300ms linear;
|
||||
}
|
||||
.paySlideDown {
|
||||
position: fixed;
|
||||
bottom: -640rpx;
|
||||
height: 640rpx;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
transition: bottom 300ms linear;
|
||||
}
|
||||
|
||||
.book-detail {
|
||||
display: flex;
|
||||
}
|
||||
.pay-img{
|
||||
width: 240rpx;
|
||||
height: 280rpx;
|
||||
margin: 20rpx;
|
||||
}
|
||||
.book-messege {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.bookPrice {
|
||||
color: #f40;
|
||||
}
|
||||
.delete {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 20rpx;
|
||||
font-size: 48rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.content {
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
.attention,
|
||||
.prompt {
|
||||
padding: 10rpx 20rpx;
|
||||
font-family: tahoma,arial,\5FAE\8F6F\96C5\9ED1,sans-serif;
|
||||
font: 12px/1.5 tahoma,arial,"\5b8b\4f53";
|
||||
font: 400 12px/1.5 "Microsoft Yahei",tahoma,arial
|
||||
}
|
||||
.book-buy {
|
||||
margin: 30rpx auto;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
width: 700rpx;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(to right, #FF7802,#FF4A00);
|
||||
border-radius: 40rpx;
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
var tcity = require("../../area/citys.js");
|
||||
|
||||
var app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
provinces: [],
|
||||
province: "",
|
||||
citys: [],
|
||||
city: "",
|
||||
countys: [],
|
||||
county: '',
|
||||
value: [0, 0, 0],
|
||||
values: [0, 0, 0],
|
||||
condition: false
|
||||
},
|
||||
bindViewTapindex: function () {
|
||||
wx.navigateTo({
|
||||
url: '../index/index'
|
||||
})
|
||||
},
|
||||
onPullDownRefresh(){
|
||||
wx.setNavigationBarTitle({
|
||||
title: '地址管理'
|
||||
});
|
||||
wx.showNavigationBarLoading(); //在标题栏中显示加载图标
|
||||
setTimeout(function () {
|
||||
wx.stopPullDownRefresh(); //停止加载
|
||||
wx.hideNavigationBarLoading(); //隐藏加载icon
|
||||
}, 2000)
|
||||
},
|
||||
bindChange: function (e) {
|
||||
//console.log(e);
|
||||
var val = e.detail.value
|
||||
var t = this.data.values;
|
||||
var cityData = this.data.cityData;
|
||||
|
||||
if (val[0] != t[0]) {
|
||||
console.log('province no ');
|
||||
const citys = [];
|
||||
const countys = [];
|
||||
|
||||
for (let i = 0; i < cityData[val[0]].sub.length; i++) {
|
||||
citys.push(cityData[val[0]].sub[i].name)
|
||||
}
|
||||
for (let i = 0; i < cityData[val[0]].sub[0].sub.length; i++) {
|
||||
countys.push(cityData[val[0]].sub[0].sub[i].name)
|
||||
}
|
||||
|
||||
this.setData({
|
||||
province: this.data.provinces[val[0]],
|
||||
city: cityData[val[0]].sub[0].name,
|
||||
citys: citys,
|
||||
county: cityData[val[0]].sub[0].sub[0].name,
|
||||
countys: countys,
|
||||
values: val,
|
||||
value: [val[0], 0, 0]
|
||||
})
|
||||
|
||||
return;
|
||||
}
|
||||
if (val[1] != t[1]) {
|
||||
console.log('city no');
|
||||
const countys = [];
|
||||
|
||||
for (let i = 0; i < cityData[val[0]].sub[val[1]].sub.length; i++) {
|
||||
countys.push(cityData[val[0]].sub[val[1]].sub[i].name)
|
||||
}
|
||||
|
||||
this.setData({
|
||||
city: this.data.citys[val[1]],
|
||||
county: cityData[val[0]].sub[val[1]].sub[0].name,
|
||||
countys: countys,
|
||||
values: val,
|
||||
value: [val[0], val[1], 0]
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (val[2] != t[2]) {
|
||||
console.log('county no');
|
||||
this.setData({
|
||||
county: this.data.countys[val[2]],
|
||||
values: val
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
open: function () {
|
||||
this.setData({
|
||||
condition: !this.data.condition
|
||||
})
|
||||
},
|
||||
onLoad: function () {
|
||||
console.log("onLoad");
|
||||
var that = this;
|
||||
|
||||
tcity.init(that);
|
||||
|
||||
var cityData = that.data.cityData;
|
||||
|
||||
|
||||
const provinces = [];
|
||||
const citys = [];
|
||||
const countys = [];
|
||||
|
||||
for (let i = 0; i < cityData.length; i++) {
|
||||
provinces.push(cityData[i].name);
|
||||
}
|
||||
console.log('省份完成');
|
||||
for (let i = 0; i < cityData[0].sub.length; i++) {
|
||||
citys.push(cityData[0].sub[i].name)
|
||||
}
|
||||
console.log('city完成');
|
||||
for (let i = 0; i < cityData[0].sub[0].sub.length; i++) {
|
||||
countys.push(cityData[0].sub[0].sub[i].name)
|
||||
}
|
||||
|
||||
that.setData({
|
||||
'provinces': provinces,
|
||||
'citys': citys,
|
||||
'countys': countys,
|
||||
'province': cityData[0].name,
|
||||
'city': cityData[0].sub[0].name,
|
||||
'county': cityData[0].sub[0].sub[0].name
|
||||
})
|
||||
console.log('初始化完成');
|
||||
},
|
||||
changeProvince:function(e) {
|
||||
var that = this;
|
||||
var province = this.data.province;
|
||||
var provinceIndex = e.detail.value;
|
||||
var provinces = this.data.provinces;
|
||||
console.log(provinces[provinceIndex])
|
||||
that.setData({
|
||||
show: false,
|
||||
province: provinces[provinceIndex]
|
||||
})
|
||||
},
|
||||
changeCity: function(e) {
|
||||
var that = this;
|
||||
var city = this.data.city;
|
||||
var cityIndex = e.detail.value;
|
||||
var citys = this.data.citys;
|
||||
console.log(citys[cityIndex])
|
||||
that.setData({
|
||||
show: false,
|
||||
city: citys[cityIndex]
|
||||
})
|
||||
},
|
||||
changeDistrict: function(e) {
|
||||
var that = this;
|
||||
var county = this.data.county;
|
||||
var countyIndex = e.detail.value;
|
||||
var countys = this.data.countys;
|
||||
console.log(countys[countyIndex])
|
||||
that.setData({
|
||||
show: false,
|
||||
county: countys[countyIndex]
|
||||
})
|
||||
}
|
||||
})
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"navigationBarTitleText": "地址管理"
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
<!--pages/address/address.wxml-->
|
||||
<view class="hander">
|
||||
|
||||
</view>
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="form-list">
|
||||
<!-- 用户姓名设置 -->
|
||||
<view class="form-item">
|
||||
<view class="form-item-lable">姓名:</view>
|
||||
<view class="form-item-button">
|
||||
<input type="text" value="{{address.name}}" name="name" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户电话设置 -->
|
||||
<view class="form-item">
|
||||
<view class="form-item-lable">电话:</view>
|
||||
<view class="form-item-button">
|
||||
<input type="number" name="phone" value="{{address.phone}}" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view bindchange="bindChange" value="{{value}}">
|
||||
<!-- 用户省份 -->
|
||||
<view class="form-item">
|
||||
<view class="form-item-lable">省份:</view>
|
||||
<view class="form-item-button">
|
||||
<picker bindchange='changeProvince' mode="selector" range="{{provinces}}" value="{{province}}">
|
||||
<view>
|
||||
<input type="text" name="province" value="{{province}}" placeholder='--请选择--' placeholder-style='color: #6699ff' disabled='true' /> </view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户城市 -->
|
||||
<view class="form-item">
|
||||
<view class="form-item-lable">城市:</view>
|
||||
<view class="form-item-button">
|
||||
<picker bindchange='changeCity' mode="selector" range="{{citys}}" value="{{citySelIndex}}">
|
||||
<view>
|
||||
<input type="text" placeholder='--请选择--' placeholder-style='color: #6699ff' class="hidden" name="city" value="{{city}}" disabled='true' />
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户区县 -->
|
||||
<view class="form-item">
|
||||
<view class="form-item-lable">区县:</view>
|
||||
<view class="form-item-button">
|
||||
<picker bindchange='changeDistrict' mode="selector" range="{{countys}}" value="{{districtSelIndex}}">
|
||||
<view>
|
||||
<input type="text" placeholder='--请选择--' placeholder-style='color: #6699ff' name="district" value="{{county}}" class="hidden" disabled='true' />
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 用户地址 -->
|
||||
<view class="form-item">
|
||||
<view class="form-item-lable">详细地址:</view>
|
||||
<view class="form-item-button">
|
||||
<input name="detail" value="{{address.detail}}" />
|
||||
</view>
|
||||
</view>
|
||||
<button class="save-btn" form-type="submit" >保存</button>
|
||||
</view>
|
||||
</form>
|
@ -0,0 +1,46 @@
|
||||
/* pages/address/address.wxss */
|
||||
.hander {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
background: #666666;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
color: whitesmoke;
|
||||
}
|
||||
.form-list {
|
||||
width: 90%;
|
||||
margin: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.form-item {
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-width: 0 0 1px 0;
|
||||
border-bottom-style: solid;
|
||||
border-color: gray;
|
||||
}
|
||||
.form-item-lable{
|
||||
margin-left: 40rpx;
|
||||
width: 300rpx;
|
||||
height: 100%;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.form-item-button {
|
||||
color: gray;
|
||||
}
|
||||
input {
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
button {
|
||||
width: 100%;
|
||||
margin-top:20rpx;
|
||||
text-align: center;
|
||||
background: ec6a5c;
|
||||
color: white;
|
||||
}
|
||||
.save-btn {
|
||||
background-color: #1E68C9
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// contactUs.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1 @@
|
||||
{}
|