Commit 4fddb929 authored by miko's avatar miko

aa

parent ff66345c
{
{
"name": "mpshaodai",
"version": "0.0.2",
"description": "A WePY project",
......
{
"description": "A WePY project",
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"postcss": false,
"minified": false,
......
......@@ -55,6 +55,8 @@ wepy.app({
wx.getSystemInfo({
success: res => {
//导航高度
this.$options.config.screenHeight = res.windowHeight
this.$options.config.screenWidth = res.windowWidth
this.$options.config.title_height = res.statusBarHeight + 46;
this.$options.config.statusbarHeight = res.statusBarHeight;
......@@ -77,6 +79,8 @@ wepy.app({
}
},
config:{
screenHeight: 0,
screenWidth: 0,
title_height: "64",
statusbarHeight: "24",
titleIcon_height: "32",
......@@ -84,17 +88,17 @@ wepy.app({
title_top: "24",
title_text: "xxx", // iphone X + 24
prefix: 24,
// urlPrefix: 'https://sd.tmallab.com/spring/api'
urlPrefix: "http://127.0.0.1:8888/api"
urlPrefix: 'https://api.favormylikes.com/spring/api'
// urlPrefix: "http://127.0.0.1:8888/api"
}
});
</script>
<config>
{
pages: [
'pages/index',
'pages/progress',
'pages/index',
],
<!--"plugins": {-->
<!--"ocr-plugin": {-->
......
src/assets/hint.png

63.7 KB | W: | H:

src/assets/hint.png

351 KB | W: | H:

src/assets/hint.png
src/assets/hint.png
src/assets/hint.png
src/assets/hint.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -36,12 +36,14 @@
justify-content: center;
border-radius: 50%;
overflow: hidden;
z-index: 90;
background: white;
width: 98rpx;
height: 98rpx;
}
.avatar-big {
z-index: 90;
display: flex;flex-direction: row;
align-items: center;
justify-content: center;
......@@ -155,7 +157,7 @@
.bt-update {
color: white !important;
margin-top: 13rpx;
margin-top: 33rpx;
height: 91rpx !important;
width: 322rpx;
}
......@@ -294,7 +296,7 @@
flex-direction: column;
align-items: center;
background: white;
height: 820rpx;
height: 880rpx;
width: 100%;
}
......@@ -352,7 +354,8 @@
height: 66rpx;
align-items: flex-end;
label {
font-size: 26rpx;
letter-spacing:1px;
font-size: 24rpx;
margin-left: 26rpx
}
......@@ -409,18 +412,13 @@
}
.bt-service{
--button-normal-font-size: 30rpx!important;
display: flex!important;
flex-direction: row!important;
align-items: center!important;
padding-left: 33rpx!important;
background: white!important;
box-shadow:0 2rpx 4rpx rgba(0, 0, 0, .3)!important;
--button-default-height: 86rpx!important;
border-top-left-radius: 43rpx!important;
border-bottom-left-radius: 43rpx!important;
box-shadow:0px 0px 20px 10px #EAEAEA;
border-radius: 43rpx!important;
position: fixed!important;
right: -3rpx!important;
bottom: 460rpx!important;
--button-default-height: 88rpx;
width: 200rpx;
right: -30rpx!important;
}
.pay-sheet-container{
align-items: center;
......@@ -461,11 +459,18 @@
--action-sheet-header-height: 120rpx!important;
}
.auto-get{
width: 250rpx;font-size: 33rpx;background: white;border: 0px;font-weight: 500;letter-spacing: 2px;color: #0F8BFC;
width: 250rpx;font-size: 30rpx;background: white;border: 0px;font-weight: 500;letter-spacing: 1px;color: #0F8BFC;
}
.auto-get::after {
border: none;
}
movable-view {
pointer-events: auto;
}
movable-area {
pointer-events: none;
}
</style>
<!--<wxs module="m1" lang="babel">-->
<!--const getTime = (time) => {-->
......@@ -480,13 +485,13 @@
<!--</wxs>-->
<template>
<div class="container" style="align-items: center">
<!-- <van-overlay show="{{ showMark }}" bind:click="onClickHide">-->
<van-overlay show="{{ showMark }}" bind:click="onClickHide">
<!-- <header background="transparent" title_text="熊猫派捎带"/>-->
<!-- <scroll-view scroll-y="true" class="main">-->
<!-- <div class="header pc">-->
<!-- <div class="inner">-->
<!-- <div @tap="openChange" class="avatar-small">-->
<!-- <div class="avatar-small">-->
<!-- <van-image-->
<!-- round-->
<!-- fit="cover"-->
......@@ -504,7 +509,7 @@
<!-- src="../assets/main-logo.png"-->
<!-- />-->
<!-- </div>-->
<!-- <div class="avatar-small" @tap="mallClick">-->
<!-- <div class="avatar-small">-->
<!-- <van-image-->
<!-- round-->
<!-- fit="cover"-->
......@@ -520,54 +525,30 @@
<!-- <div class="inner">-->
<!-- <div class="inner-top">-->
<!-- <div class="scroll-container">-->
<!-- <div v-if="!messageText"-->
<!-- style="width: 9rpx;height: 40rpx;margin-top: -3rpx;align-self: center;margin-left: 24rpx"-->
<!-- <div style="width: 9rpx;height: 40rpx;margin-top: -3rpx;align-self: center;margin-left: 24rpx"-->
<!-- class="sc"/>-->
<!-- <textarea contenteditable="true" placeholder="粘贴短信或者输入快递及取货码"-->
<!-- auto-height="true"-->
<!-- fixed="true"-->
<!-- @input="messageInput"-->
<!-- placeholder-style="color:red;"-->
<!-- v-model="messageText"-->
<!-- class="{{messageText? 'input-notnull':'input-null'}}"/>-->
<!-- <span style="color: #45C9C3"-->
<!-- disabled="true"-->
<!-- class="input-null">粘贴短信或者输入快递及取货码</span>-->
<!-- </div>-->
<!-- <img v-if="!messageText" src="@/assets/pic.png"/>-->
<!-- <img v-if="messageText" @tap="cleanMessage" src="@/assets/close.png"/>-->
<!-- </div>-->
<!-- <div class="parse-result" v-if="messageText">-->
<!-- <span style="font-size: 28rpx">识别结果</span>-->
<!-- <div>-->
<!-- <span style="color: #45C9C3" v-if="messageComp">{{ messageComp }}</span>-->
<!-- <span style="color: #45C9C3" v-else>未知快递公司</span>-->
<!-- <span v-if="messagePacketCode" style="margin-left: 25rpx;color: #45C9C3;">{{ messagePacketCode }}</span>-->
<!-- <span v-else style="margin-left: 25rpx;color: #45C9C3">无取件码</span>-->
<!-- </div>-->
<!-- <van-button icon="success" round type="primary" size="small" @tap="confirmMessage"-->
<!-- v-bind:disabled="messageConfirmed">确认-->
<!-- </van-button>-->
<!-- </div>-->
<!-- <div v-if="messageText" class="parse-result" style="font-size: 24rpx;color: #BABABA;border: none">-->
<!-- 识别仅供参考,若与实际意思不一致,请自行输入快递公司和取件码,例如:"顺丰123"即可-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <image style="margin-left: 150rpx" src="@/assets/hint.png"/>-->
<image style="height: 100%;width: 100%;object-fit: contain" @tap="know()" src="@/assets/hint.png"/>
<!-- <span style="width: 482rpx!important;margin: 10rpx 160rpx;height: 91rpx!important;font-size: 33rpx;font-weight: 500;color: #FFFFFF;line-height: 46rpx;letter-spacing: 2rpx;">-->
<!-- 注意不是快递运单号,而是取件时使用的短信取件码哦~~-->
<!-- </span>-->
<!-- <van-button style="z-index: 1000!important;" @tap="know()" round color="#45C9C3" custom-class="bt-submit">我知道了</van-button>-->
<!-- <van-button style="z-index: 1000!important;margin-top: 500rpx;top: 500rpx" @tap="know()" round color="#45C9C3" custom-class="bt-submit">我知道了</van-button>-->
<!-- </scroll-view>-->
<!-- </van-overlay>-->
</van-overlay>
<header background="#45C9C2" title_text="熊猫派捎带"/>
<div class="main">
<div class="main" v-if="!showMark">
<div class="header pc">
<div class="inner">
......@@ -635,7 +616,7 @@
</div>
<div class="address" @tap="showAddressSheet = !showAddressSheet">
<div class="address" @tap="showAddressSheet = !showAddressSheet" v-if="!showMark">
<div class="top">
<span class="panel-title">送达宿舍</span>
</div>
......@@ -664,7 +645,12 @@
</div>
<van-button @tap="showPaySheet = true" round color="#45C9C3" custom-class="bt-submit">提 交</van-button>
</div>
<van-button icon="service" open-type="contact" custom-class="bt-service">客服</van-button>
<movable-area style="width:{{screenWidth}}px;height:{{screenHeight-50}}px;position: fixed">
<movable-view :x="x" :y="y" @touchend="touched" direction="all" style="width: 200rpx;height: 88rpx" @change="drapChange">
<van-button style="z-index: 1000" icon="service" open-type="contact" custom-class="bt-service">客服</van-button>
</movable-view>
</movable-area>
<van-action-sheet
@close="closeAddressSheet"
......@@ -702,7 +688,7 @@
<span>请注意, 是快递的收件联系方式</span>
</div>
</div>
<div class="item-container">
<div class="item-container" style="height: 180rpx">
<div class="top">
<span>宿舍号</span>
<div class="right">
......@@ -714,6 +700,14 @@
<span>号</span>
</div>
</div>
<div class="bottom" style="align-items: center;margin-top: 40rpx">
<image style="height: 32rpx;width: 32rpx" src="@/assets/info.png"></image>
<div style="display: flex;flex-direction: column">
<span>请确认:您当前校区为<span style="font-weight: 600;font-size: 25rpx;margin-left: 4rpx">{{school.schoolName}}</span></span>
<span style="margin-top: 15rpx">如有误,请<span style="margin-left: 0rpx;font-weight: 600;color: #0F8BFC" @tap="openChange">点击调整</span></span>
</div>
</div>
</div>
<van-button @tap="updateAddress" round custom-class="bt-update sc">更 新</van-button>
......@@ -812,11 +806,11 @@
<div class="choose-container">
<div class="item" :class="{'choose': paytype==1}" @tap="paytype = 1">
<span style="font-size: 38rpx;">2元/件</span>
<span style="font-size: 38rpx;">{{smallprice}}元/件</span>
<span style="font-size: 23rpx;margin-top: 18rpx;">普通快递</span>
</div>
<div class="item" :class="{'choose': paytype==2}" @tap="paytype = 2">
<span style="font-size: 36rpx;">5元/件</span>
<span style="font-size: 36rpx;">{{bigprice}}元/件</span>
<span style="font-size: 23rpx;margin-top: 18rpx;">比箱装饮料重或大</span>
</div>
</div>
......@@ -846,11 +840,9 @@
</van-action-sheet>
<!-- 自定义tabbar-->
<van-tabbar
v-if="!showMark"
active-color="#45C9C2"
active="{{ active }}" @change="onTabChange" class="mytabbar">
<van-tabbar-item>
......@@ -914,8 +906,26 @@ wepy.page({
},
mixins: [testMixin],
onShareTimeline: function (res){
return {
title: '十秒下单,快速到寝',
path: '/pages/index',
query: '',
imageUrl: '../assets/main-logo.png'
}
},
onShareAppMessage: function (res) {
return {
title: '十秒下单,快速到寝',
path: '/pages/index',
imageUrl: '../assets/main-logo.png'
}
},
data: {
screenWidth: app.config.screenWidth,
screenHeight: app.config.screenHeight,
x: app.config.screenWidth,
y: 550,
paytype: 1,
showMark: false,
showUnOpenSheet: false,
......@@ -933,6 +943,11 @@ wepy.page({
dormitoryList: [],
showDormitorySheet: false,
smallprice: '2',
bigprice: '5',
amdeadline: '',
pmdeadline: '',
showAddressSheet: false,
addressSheet_Name: '',
......@@ -960,6 +975,18 @@ wepy.page({
},
computed: {},
methods: {
touched(){
let _that = this
wx.nextTick(() => {
_that.$wx.setData({
x: this.screenWidth,
y: this.y
})
})
},
drapChange(e) {
this.y = e.$wx.detail.y
},
getPhoneNumber (e) {
e = e.$wx
let _that = this
......@@ -978,12 +1005,51 @@ wepy.page({
})
},
pay(){
var d = new Date();
let h = d.getHours()
let m = d.getMinutes()
if(h<12&&this.amdeadline){
if(h+':'+m>this.amdeadline){
wx.showToast({
title: '上午提交订单截止时间为'+this.amdeadline+', 请于12点之后重新提交',
icon: 'none',
duration: 4000
})
return
}
}
if(h>=12&&this.pmdeadline){
if(h+':'+m>this.pmdeadline){
wx.showToast({
title: '下午提交订单截止时间'+this.pmdeadline+', 请明天重新提交',
icon: 'none',
duration: 4000
})
return
}
}
if (!this.messageComp || !this.messagePacketCode) {
wx.showToast({
title: '未识别成功,请自行输入快递公司以及取货码',
icon: 'none',
duration: 4000
})
return
}
this.messageConfirmed = true
if(!this.address){
wx.showToast({
title: '请填写正确的收货地址',
icon: 'none',
duration: 4000
})
return
}
let _that = this
let param = {yuan: this.paytype===1?"0.02":"0.05"}
let param = {yuan: this.paytype===1?this.smallprice:this.bigprice}
http.post('/task/pay',param).then(data => {
console.log(data)
data = data.data
console.log(data)
wx.requestPayment({
timeStamp: data.timeStamp,
......@@ -1008,6 +1074,7 @@ wepy.page({
})
},
openChange(){
this.showAddressSheet = false
this.showUnOpenSheet = false
this.showChangeSchoolSheet = true
},
......@@ -1112,7 +1179,7 @@ wepy.page({
parcelInfo: this.messageText,
courierCompany: this.messageComp,
pickupCode: this.messagePacketCode,
pay: this.paytype===1?"2":"5"
pay: this.paytype===1?this.smallprice:this.bigprice
}
http.post('/task/submit',param).then(data => {
......@@ -1244,7 +1311,20 @@ wepy.page({
if (arr && arr.length > 0 && !result) {
result = arr[0]
return result
}
pattern = /\d{1,}(\_|\/|.)\d{1,6}/
arr = str.match(pattern)
if (arr && arr.length > 0 && !result) {
result = arr[0]
return result
}
pattern = /\d{1,}(\_|\/|.)\d{1,}\1\d{1,}/
var arr = str.match(pattern)
if (arr && arr.length > 0) {
result = arr[0]
return result
}
......@@ -1272,7 +1352,7 @@ wepy.page({
onShow() {
this.showMark = !wx.getStorageSync("know")
// this.showMark = true
this.active = 0
//TODO 初始化学校 id
if(!wx.getStorageSync('schoolID')){
......@@ -1280,6 +1360,27 @@ wepy.page({
}
const _that = this
http.post('/schoolconfig/getBySchool').then(res => {
if(res.data){
if(res.data.bigprice){
this.bigprice = res.data.bigprice
}
if(res.data.smallprice){
this.smallprice = res.data.smallprice
}
if(res.data.smallprice){
this.smallprice = res.data.smallprice
}
if(res.data.amdeadline){
this.amdeadline = res.data.amdeadline
}
if(res.data.pmdeadline){
this.pmdeadline = res.data.pmdeadline
}
}
})
wx.login({
success(res) {
var code = res.code
......
......@@ -118,10 +118,11 @@
align-items: center;
width: 100%;
position: absolute;
margin-top: -44rpx;height: 52rpx;
margin-top: -46rpx;height: 52rpx;
}
.p1{
border-radius: 26rpx;
border: 8rpx solid white;
border-radius: 50%;
display: flex;
flex-direction: row;
align-items: center;
......@@ -129,8 +130,18 @@
position: absolute;
background: #BABABA;width: 52rpx;height: 52rpx;
}
//.p1{
// border-radius: 26rpx;
// display: flex;
// flex-direction: row;
// align-items: center;
// justify-content: center;
// position: absolute;
// background: #BABABA;width: 52rpx;height: 52rpx;
//}
.pp1{
border-radius: 26rpx;
border: 8rpx solid white;
border-radius: 50%;
display: flex;
flex-direction: row;
align-items: center;
......@@ -139,6 +150,16 @@
background: #45C9C2;
width: 52rpx;height: 52rpx;
}
//.pp1{
// border-radius: 26rpx;
// display: flex;
// flex-direction: row;
// align-items: center;
// justify-content: center;
// position: absolute;
// background: #45C9C2;
// width: 52rpx;height: 52rpx;
//}
label{
color: white;
font-size: 24rpx;
......@@ -209,14 +230,14 @@ module.exports.getTime = getTime;
<image style="width: 33rpx;height: 33rpx" src="@/assets/kd.png"/>
<span style="margin-left: 9rpx;font-size: 33rpx;color: #45C9C3">快递</span>
</div>
<div class="tab">
<div class="tab" @tap="mallClick">
<image style="width: 33rpx;height: 33rpx" src="@/assets/cs.png"/>
<span style="margin-left: 9rpx;font-size: 33rpx;color: #272727">超市</span>
</div>
</div>
<div class="main">
<van-empty v-if="list.length===0" description="您还没有发布过捎带订单哦">
<van-button custom-class="bottom-button">
<van-button @tap="toIndex" custom-class="bottom-button">
发布捎带
</van-button>
</van-empty>
......@@ -288,9 +309,10 @@ module.exports.getTime = getTime;
<span style="margin-left: 30rpx">取件点</span>
<div @tap="photo1(currentItem)" class="{{[currentItem.status>=1?'pp1':'p1']}}" style="margin-left: 116rpx">
<van-icon color="white" name="photograph" />
</div>
<!-- <div @tap="photo1(currentItem)" class="{{[currentItem.status>=1?'pp1':'p1']}}" style=";margin-left: 116rpx;">-->
<!-- <image style="position: absolute" src="@/assets/ty.png"/>-->
<!-- <van-icon color="white" name="photograph" />-->
<!-- </div>-->
<span style="margin-left:78rpx" >快到楼下</span>
<div @tap="photo2(currentItem)" class="{{[currentItem.status>=2?'pp1':'p1']}}" style="margin-left: 296rpx">
......@@ -397,6 +419,12 @@ const app = getApp().$wepy.$options
wepy.page({
onShareAppMessage: function (res) {
return {
title: '十秒下单,快速到寝',
path: '/pages/index'
}
},
data:{
active: 1,
list: [],
......@@ -405,10 +433,30 @@ wepy.page({
},
methods: {
toIndex(){
wx.switchTab({
url: "/pages/index"
});
},
mallClick(){
wx.showToast({
title: '尚未开放,尽请期待。',
icon: 'none',
duration: 3000,
mask: true
});
},
sub(item) {
wx.requestSubscribeMessage({
tmplIds: ['8VhR4ruZ-b6kZRzSzQ4TwI-Y8Rh8vSR1kg5R7kFDrfQ','8VhR4ruZ-b6kZRzSzQ4TwP1fPXITxSawzR-z_XsgMok','8VhR4ruZ-b6kZRzSzQ4TwOHT914KwUCpusAX0y6w2Wo'],
success (res) { }
tmplIds: ['CGlLzkCZy2Q5XaMvRw1-9gfHy_CRhk4_6LuXhKK2vI4','Lr1MlntU2DKsuxtrlTJT_d3uxOeIvKjIsjzHSKUpUOI','8VhR4ruZ-b6kZRzSzQ4TwIoQKtz7ODjkkHCgAsalFSE'],
success (res) {
wx.showToast({
title: '订阅成功',
icon: 'none',
duration: 1000,
mask: true
});
}
})
},
closeDetailSheet(){
......@@ -435,16 +483,16 @@ wepy.page({
},
photo2(item){
if(item.sendCredentials){
if(item.takeCredentials){
wx.previewImage({
current: app.config.urlPrefix+'/download/'+item.sendCredentials, // 当前显示图片的http链接
urls: [app.config.urlPrefix+'/download/'+item.sendCredentials]
current: app.config.urlPrefix+'/download/'+item.takeCredentials, // 当前显示图片的http链接
urls: [app.config.urlPrefix+'/download/'+item.takeCredentials]
})
}else{
wx.showToast({
title: '尚未送达宿舍楼',
title: '未上传图片',
icon: 'none',
duration: 4000
duration: 3000
})
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment