Commit 42680539 authored by miko's avatar miko

aa

parent 4fddb929
......@@ -3,7 +3,9 @@
"setting": {
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": false,
"preloadBackgroundData": false,
"minified": false,
"newFeature": true,
"coverView": true,
......@@ -11,6 +13,7 @@
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
......@@ -22,6 +25,7 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
......@@ -30,10 +34,30 @@
"minifyWXSS": true
},
"compileType": "miniprogram",
"appid": "wx5cda879d33846e26",
"appid": "wxf362e74c32546fca",
"projectname": "mpshaodai",
"miniprogramRoot": "weapp/",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {}
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"name": "pages/approvePreview",
"pathName": "pages/approvePreview",
"query": "schoolId=4114",
"scene": null
}
]
}
}
}
\ No newline at end of file
<style lang="less">
.container {
width: 100%;
height: 100%;
display: flex;
overflow-y: scroll;
......@@ -88,7 +89,7 @@ wepy.app({
title_top: "24",
title_text: "xxx", // iphone X + 24
prefix: 24,
urlPrefix: 'https://api.favormylikes.com/spring/api'
urlPrefix: 'https://www.tmallab.com/fwhj'
// urlPrefix: "http://127.0.0.1:8888/api"
}
});
......@@ -98,6 +99,8 @@ wepy.app({
pages: [
'pages/index',
'pages/progress',
'pages/approvePreview'
],
<!--"plugins": {-->
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -11,7 +11,6 @@ const isLog = false
// 网络请求超时
const timeOut = 30 * 1000
const prefix = app.config.urlPrefix
// MARK 网络请求
function get(url, data) {
......@@ -27,6 +26,8 @@ function get(url, data) {
if(schoolID){
header.schoolID = schoolID
}
const prefix = wx.getStorageSync('urlPrefix')
return new Promise((resolve, reject) => {
wx.request({
url: prefix+url,
......@@ -79,18 +80,15 @@ function get(url, data) {
// MARK 网络请求
function post(url, data) {
let token = wx.getStorageSync("token")
let header = {
'content-type': 'application/json',
}
if (token){
header.token = token
if(url.indexOf('JPost')!==-1){
header = {
'content-type': 'application/x-www-form-urlencoded',
}
let schoolID = wx.getStorageSync("schoolID")
if(schoolID){
header.schoolID = schoolID
}
const prefix = wx.getStorageSync('urlPrefix')
return new Promise((resolve, reject) => {
wx.request({
......
<style lang="less">
.panel-title {
font-size: 36rpx;
color: black;
}
.main {
margin-bottom: 100rpx;
box-sizing: border-box;
flex: 1;
overflow-y: scroll;
width: 100%;
}
.header {
z-index: 1000;
width: 100%;
height: 170rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
.inner {
margin-top: 10rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 490rpx;
.avatar-small {
display: flex;flex-direction: row;
align-items: center;
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;
border-radius: 50%;
background: white;
width: 138rpx;
height: 138rpx;
}
}
}
.gaishu{
margin-bottom: 25rpx;
background: white;
box-sizing: border-box;
width: 100%;
margin-top: 10rpx;
display: flex;
padding: 10rpx 30rpx;
flex-direction: column;
label{
margin-top: 20rpx;
}
}
.detail{
width: 100%;
box-sizing: border-box;
padding: 30rpx;
border-bottom: 1rpx solid #EDEDED;
view{
margin-bottom: 10rpx;
}
}
.van-image{
display: block!important;
}
</style>
<!--<wxs module="m1" lang="babel">-->
<!--const getTime = (time) => {-->
<!--let date = getDate(time);-->
<!--let hour = date.getHours();-->
<!--let mins = date.getMinutes();-->
<!--let sec = date.getSeconds();-->
<!--let milli = date.getMilliseconds();-->
<!--return `${hour}:${mins}:${sec}.${milli}`;-->
<!--}-->
<!--module.exports.getTime = getTime;-->
<!--</wxs>-->
<template>
<div class="container" style="align-items: center">
<header background="#45C9C2" title_text="预览" isShow="true"/>
<div style="width: 100%">
<div class="gaishu">
<span style="font-size: 40rpx;font-weight: 600">订单总览</span>
<span>课题组名称:{{orderList[0]['课题组名称']}}</span>
<span>请购人:{{orderList[0]['请购人姓名']}}</span>
<span>提交人:{{orderList[0]['购物车提交人姓名']}}</span>
<span>提交时间:{{orderList[0]['购物车提交时间']}}</span>
<span>经费号:{{orderList[0]['课题卡号']}}</span>
<span>合计:{{orderList[0]['总价']}}</span>
</div>
<div style="background: white;width: 100%;margin-top: 20rpx;padding-top: 20rpx">
<span style="font-size: 40rpx;font-weight: 600;margin-left: 30rpx">商品明细</span>
<div class="detail" v-for="(item,index) in orderList">
<div>{{item['品名']}}</div>
<div>{{'品牌: '+ item['品牌']+';货号:'+ item['货号']+';包装规格'+item['包装规格']}}</div>
<div>数量:{{item['数量']}}</div>
<div>成交价:{{item['成交价']}}</div>
<div>总价:{{item['成交价']*item['数量']}}</div>
</div>
</div>
</div>
<div style="width: 100%;padding: 30rpx;box-sizing: border-box;display: flex;flex-direction: column">
<van-button @tap="pass()" block type="primary">审批通过</van-button>
<van-button @tap="showRefuse()" block type="warning" style="margin-top: 20rpx">审批驳回</van-button>
<!-- <van-button @tap="history()" block type="info" style="margin-top: 20rpx">查看审批历史</van-button>-->
</div>
<van-dialog
@close="onDClose"
use-slot
@confirm="refuse"
theme="round-button"
title="填写驳回原因"
show="{{ showM }}"
>
<input style="width: 550rpx" v-model="refuse_reason" placeholder="请输入驳回原因"/>
</van-dialog>
</div>
</template>
<script>
import wepy from '@wepy/core'
import { mapState } from '@wepy/x'
import store from '../store'
import testMixin from '../mixins/test'
import http from '../common/http.js'
const app = getApp().$wepy.$options
wepy.page({
store,
hooks: {
},
mixins: [testMixin],
data: {
orderList: [],
showM: false,
refuse_reason: ''
},
computed: {},
methods: {
onDClose(){
this.showM = false
},
pass(){
let order = wx.getStorageSync("order");
let username = wx.getStorageSync("username");
let role = wx.getStorageSync("role");
const param = {
username: username, 订单id: order, 审批角色: role,
审批通过: '1', 审批说明: '', 审批人帐号: username
}
http.post('/order/orderApproval', param).then(res => {
if(res.flag === '1'){
wx.showModal({
title: "提示",
showCancel: false,
content: '审批完成',
//点击确认返回main界面
success: function (res) {
wx.navigateBack({
delta: 1
})
}
})
}else{
wx.showModal({
title: "提示",
showCancel: false,
content: res.message,
//点击确认返回main界面
success: function (res) {
wx.navigateBack({
delta: 1
})
}
})
}
})
},
showRefuse(){
this.showM = true
},
refuse(){
if(!this.refuse_reason){
wx.showToast({
title: '请输入驳回原因',
icon: 'none'
})
return
}
let order = wx.getStorageSync("order");
let username = wx.getStorageSync("username");
let role = wx.getStorageSync("role");
const param = {
username: username, 订单id: order, 审批角色: role,
审批通过: '0', 审批说明: this.refuse_reason, 审批人帐号: username
}
http.post('/order/orderApproval', param).then(res => {
this.showM = false
if(res.flag === '1'){
wx.showModal({
title: "提示",
showCancel: false,
content: '审批完成',
//点击确认返回main界面
success: function (res) {
wx.navigateBack({
delta: 1
})
}
})
}else{
wx.showModal({
title: "提示",
showCancel: false,
content: res.message,
//点击确认返回main界面
success: function (res) {
wx.navigateBack({
delta: 1
})
}
})
}
})
},
history(){
}
},
onLoad() {
let role = wx.getStorageSync("role");
let order = wx.getStorageSync("order");
http.post('/JPost?query=订单详情_mp', { 订单号: order }).then(res => {
if(res.flag === "1"){
if(res.data[0]['等待审批']!==role){
wx.showModal({
title: "提示",
showCancel: false,
content: '您当前无法审批此订单,可能尚未流转至您或者您已审批过此订单',
//点击确认返回main界面
success: function (res) {
wx.navigateBack({
delta: 1
})
}
})
return
}
this.orderList = res.data
}else{
wx.showModal({
title: "提示",
showCancel: false,
content: '未找到此订单',
//点击确认返回main界面
success: function (res) {
wx.navigateBack({
delta: 1
})
}
})
}
})
}
})
</script>
<config>
{
navigationBarTextStyle: "white",
navigationBarBackgroundColor: "#45C9C3",
navigationBarTitleText: '小树懒捎带',
usingComponents: {
"van-card": "module:@vant/weapp/lib/card/index",
"van-icon": "module:@vant/weapp/lib/icon/index",
"van-overlay": "module:@vant/weapp/lib/overlay/index",
"van-cell": "module:@vant/weapp/lib/cell/index",
"van-cell-group": "module:@vant/weapp/lib/cell-group/index",
"van-search": "module:@vant/weapp/lib/search/index",
"van-image": "module:@vant/weapp/lib/image/index",
"van-dialog": "module:@vant/weapp/lib/dialog/index",
header: '~@/components/header',
"van-picker": "module:@vant/weapp/lib/picker/index",
"van-popup": "module:@vant/weapp/lib/popup/index",
'van-button': 'module:@vant/weapp/lib/button',
"van-action-sheet": "module:@vant/weapp/lib/action-sheet/index",
"van-tabbar": "module:@vant/weapp/lib/tabbar/index",
"van-tabbar-item": "module:@vant/weapp/lib/tabbar-item/index"
}
}
</config>
......@@ -4,7 +4,6 @@
color: black;
}
.main {
margin-bottom: 100rpx;
box-sizing: border-box;
......@@ -58,417 +57,11 @@
.van-image{
display: block!important;
}
.message {
border: 1px solid white;
border-radius: 7px;
background: #FFFFFFDB;
min-height: 228rpx;
width: 678rpx;
margin-left: 36rpx;
margin-top: -80rpx;
.inner {
border-radius: 7px;
box-sizing: border-box;
background: white;
margin-top: 80rpx;
display: flex;
flex-direction: column;
min-height: 148rpx;
.inner-top {
min-height: 148rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding-right: 24rpx;
.scroll-container {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
overflow-y: scroll;
min-height: 148rpx;
max-height: 152rpx;
}
}
.parse-result {
box-sizing: border-box;
justify-content: space-between;
border-top: 1px solid #EBEBEB;
display: flex;
flex-direction: row;
align-items: center;
margin: 0 24rpx;
height: 90rpx;
}
image {
height: 36rpx;
width: 36rpx
}
}
.input-null {
font-size: 33rpx;
margin-left: 25rpx;
width: 553rpx;
border: none
}
.placeholder {
color: #45C9C3 !important;
}
.input-notnull {
min-height: 148rpx;
max-height: 170rpx;
padding: 15rpx 13rpx;
align-self: flex-start;
font-size: 28rpx;
height: 33rpx;
width: 553rpx;
border: none
}
}
.bt-submit {
margin-bottom: 40rpx;
margin-left: 214rpx;
color: white !important;
margin-top: 43rpx;
height: 91rpx !important;
width: 322rpx;
}
.bt-submit-d {
margin-left: 214rpx;
color: white !important;
margin-top: 13rpx;
margin-bottom: 30rpx;
height: 91rpx !important;
width: 322rpx;
}
.bt-update {
color: white !important;
margin-top: 33rpx;
height: 91rpx !important;
width: 322rpx;
}
.address {
margin-left: 36rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
margin-top: 22rpx;
border-radius: 7px;
background: #FFFFFFDB;
min-height: 240rpx;
width: 678rpx;
padding: 25rpx 24rpx 5rpx 24rpx;
.top {
border-bottom: 1px solid #EDEDED;
height: 65rpx;
}
.bottom {
box-sizing: border-box;
display: flex;
flex: auto;
flex-direction: row;
align-items: center;
justify-content: space-between;
.address-text {
letter-spacing:2rpx;
font-size: 29rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6C6565;
line-height: 40px;
}
image {
width: 36rpx;
height: 36rpx;
}
}
}
.remark {
margin-left: 36rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
margin-top: 22rpx;
border-radius: 7px;
background: #FFFFFFDB;
min-height: 422rpx;
width: 678rpx;
padding: 25rpx 24rpx 5rpx 24rpx;
.top {
border-bottom: 1px solid #EDEDED;
height: 65rpx;
}
.middle {
padding-top: 17rpx;
display: flex;
align-content: flex-start;
flex-direction: row;
flex-wrap: wrap;
box-sizing: border-box;
height: 203rpx;
width: 100%;
.tag-uncheck {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin: 12rpx 24rpx 10rpx 0;
box-sizing: border-box;
height: 72rpx;
padding: 0rpx 31rpx;
font-size: 29rpx;
color: #606060;
border-radius: 34rpx;
background: #F7F7F7;
}
.tag-checked {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border: 1px solid #45C9C2;
margin: 12rpx 24rpx 10rpx 0;
box-sizing: border-box;
height: 72rpx;
padding: 0rpx 31rpx;
font-size: 29rpx;
color: #45C9C2;
border-radius: 34rpx;
background: #F7F7F7;
}
}
.bottom {
box-sizing: border-box;
display: flex;
flex: auto;
flex-direction: row;
align-items: center;
input {
margin-left: 15rpx;
color: #636363;
width: 558rpx;
font-size: 29rpx;
}
image {
width: 40rpx;
height: 40rpx;
}
}
}
.address-sheet {
--action-sheet-header-font-size: 36rpx;
--action-sheet-header-height: 108rpx;
--font-weight-bold: 400;
--popup-round-border-radius: 15rpx;
.container {
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
background: white;
height: 880rpx;
width: 100%;
}
.item-container {
margin-top: 42rpx;
margin-bottom: 22rpx;
box-sizing: border-box;
width: 100%;
display: flex;
flex-direction: column;
height: 132rpx;
padding: 0rpx 44rpx;
.top {
display: flex;
flex-direction: row;
width: 100%;
height: 66rpx;
align-items: flex-end;
label {
font-weight: 600;
font-size: 34rpx
}
.right {
align-items: flex-end;
margin-left: 46rpx;
flex: 1;
display: flex;
flex-direction: row;
input {
margin-bottom: 2rpx;
font-size: 33rpx;
width: 83rpx;
margin-right: 10rpx;
}
label {
margin-right: 30rpx;
font-weight: 600;
font-size: 34rpx
}
}
}
.bottom {
color: #858585;
display: flex;
flex-direction: row;
width: 100%;
height: 66rpx;
align-items: flex-end;
label {
letter-spacing:1px;
font-size: 24rpx;
margin-left: 26rpx
}
}
}
}
.pop-icon{
height: 162rpx;width: 162rpx;border-radius: 50%;background: white;margin-top: -74rpx;display: flex;flex-direction: column;align-items: center;justify-content: center
}
.pop-item{
margin-top: 22rpx;
display: flex;
flex-direction: row;
align-items: center;
width: 484rpx;
height: 82rpx;
background: rgba(4, 104, 195, 0.08);
border-radius: 46px;
image{
height: 44rpx;
width: 44rpx;
}
label{
font-size: 29rpx;
font-weight: 400;
color: #45C9C3;
line-height: 40rpx;
}
}
.pop-button{
display: flex;
align-items: center;
flex-direction: row;
justify-content:center;
margin-top: 64rpx;
font-size: 33rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 46rpx;
letter-spacing: 2rpx;
width: 651rpx;
height: 91rpx;
background: #45C9C3;
border-radius: 46rpx;
}
.cellChecked{
background-color: #07c1604C!important;
color: #969799!important;
}
.bt-service{
--button-normal-font-size: 30rpx!important;
background: white!important;
box-shadow:0px 0px 20px 10px #EAEAEA;
border-radius: 43rpx!important;
position: fixed!important;
--button-default-height: 88rpx;
width: 200rpx;
right: -30rpx!important;
}
.pay-sheet-container{
align-items: center;
height: 800rpx;
width: 100%;
padding: 10rpx 55rpx 0 55rpx;
.item{
margin-top: 10rpx;
padding-left: 20rpx;background: white;height: 150rpx;width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
.choose-container{
width: 100%;height: 150rpx;display: flex;flex-direction: row;justify-content: space-between;margin-top: 20rpx;
.item{
width: 311rpx;display: flex;flex-direction: column;align-items: center;justify-content: center;border: 1rpx solid #6F7270;border-radius: 8rpx;color: #6F7270;
}
}
.bt-pay{
margin-top: 30rpx;height: 84rpx;border-radius: 42rpx;width: 294rpx;background: #5BD0C7;display: flex;flex-direction: row;align-items: center;justify-content: center;font-size: 33rpx;color: white
}
.choose{
border: 1rpx solid #6FCAC2!important;
background: #ECFCF6!important;
color: #6FCAC2!important;
}
}
.sheet-title {
line-height: 52rpx;
height: 52rpx;
width: 100%;
font-size: 32rpx;
font-weight: 600;
}
.van-action-sheet__header{
--action-sheet-header-font-size: 43rpx!important;
--font-weight-bold: 400!important;
--action-sheet-header-height: 120rpx!important;
}
.auto-get{
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;
display: flex;flex-direction: row;align-items: center
}
</style>
......@@ -485,399 +78,16 @@ movable-area {
<!--</wxs>-->
<template>
<div class="container" style="align-items: center">
<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 class="avatar-small">-->
<!-- <van-image-->
<!-- round-->
<!-- fit="cover"-->
<!-- width="88rpx"-->
<!-- height="88rpx"-->
<!-- :src="schoolIconUrl"-->
<!-- />-->
<!-- </div>-->
<!-- <div class="avatar-big">-->
<!-- <van-image-->
<!-- round-->
<!-- fit="cover"-->
<!-- width="126rpx"-->
<!-- height="126rpx"-->
<!-- src="../assets/main-logo.png"-->
<!-- />-->
<!-- </div>-->
<!-- <div class="avatar-small">-->
<!-- <van-image-->
<!-- round-->
<!-- fit="cover"-->
<!-- width="88rpx"-->
<!-- height="88rpx"-->
<!-- src="../assets/mall.png"-->
<!-- />-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="message">-->
<!-- <div class="inner">-->
<!-- <div class="inner-top">-->
<!-- <div class="scroll-container">-->
<!-- <div style="width: 9rpx;height: 40rpx;margin-top: -3rpx;align-self: center;margin-left: 24rpx"-->
<!-- class="sc"/>-->
<!-- <span style="color: #45C9C3"-->
<!-- disabled="true"-->
<!-- class="input-null">粘贴短信或者输入快递及取货码</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<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>-->
<header background="#45C9C2" title_text="待审批列表"/>
<!-- <van-button style="z-index: 1000!important;margin-top: 500rpx;top: 500rpx" @tap="know()" round color="#45C9C3" custom-class="bt-submit">我知道了</van-button>-->
<div style="width: 100%;height: 100%;padding: 10rpx;box-sizing: border-box;">
<!-- </scroll-view>-->
</van-overlay>
<header background="#45C9C2" title_text="熊猫派捎带"/>
<van-empty v-if="orderList.length === 0" description="暂无待审批订单" />
<div class="main" v-if="!showMark">
<div class="header pc">
<div class="inner">
<div @tap="openChange" class="avatar-small">
<van-image
round
fit="cover"
width="88rpx"
height="88rpx"
:src="schoolIconUrl"
/>
</div>
<div class="avatar-big">
<image
style="object-fit: cover;width:126rpx;height: 126rpx;border-radius: 50%;"
src="../assets/main-logo.png"
/>
</div>
<div class="avatar-small" @tap="mallClick">
<image
round
style="object-fit: cover;width:88rpx;height: 88rpx;border-radius: 50%;"
src="../assets/mall.png"
/>
</div>
<div @tap="item_click(item)" v-for="(item,index) in orderList" class="item">
{{ item }}
</div>
</div>
<div class="message">
<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"
class="sc"/>
<textarea contenteditable="true" placeholder="粘贴短信或者输入快递及取货码"
auto-height="true"
@input="messageInput"
placeholder-style="color:#61BDBC;"
v-model="messageText"
class="{{messageText? 'input-notnull':'input-null'}}"/>
</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 style="max-width: 400rpx;">
<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>
<div class="address" @tap="showAddressSheet = !showAddressSheet" v-if="!showMark">
<div class="top">
<span class="panel-title">送达宿舍</span>
</div>
<div class="bottom">
<div class="address-text" v-if="address">{{ address.dormitoryName }}楼{{address.floor}}层{{address.room}} {{address.name}} {{address.phone}}</div>
<div class="address-text" v-else>1号楼1层101 姓名 13300000000</div>
<img src="@/assets/edit.png"/>
</div>
</div>
<div class="remark" v-if="!showMark">
<div class="top">
<span class="panel-title">留言</span>
</div>
<div class="middle">
<div class="{{item.checked?'tag-checked':'tag-uncheck'}}" @tap="remarkCheck(index)"
v-for="(item,index) in remarkList">{{ item.label }}
</div>
</div>
<div class="bottom">
<img src="@/assets/info.png"/>
<input v-model="remarkText" placeholder="也可以填写其他留言"/>
</div>
</div>
<van-button @tap="showPaySheet = true" round color="#45C9C3" custom-class="bt-submit">提 交</van-button>
</div>
<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"
class="address-sheet"
@click-overlay="closeAddressSheet"
v-bind:show="showAddressSheet" title="更新地址">
<div class="container">
<div class="item-container">
<div class="top">
<span>收件人</span>
<input v-model="addressSheet_Name" style="font-size: 34rpx;margin-left: 46rpx" placeholder="姓名"/>
</div>
<div class="bottom">
<image style="height: 32rpx;width: 32rpx" src="@/assets/info.png"></image>
<span>请注意, 是快递收件人的姓名</span>
</div>
</div>
<div class="item-container">
<div class="top" style="align-items: center">
<div style="width: 70%;display: flex;flex-direction: row;align-items: flex-end">
<span>手机号</span>
<input maxlength="11" v-model="addressSheet_Phone"
style="width: 220rpx;font-size: 34rpx;margin-left: 46rpx;"
placeholder="13000000000"/>
</div>
<!-- <van-button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" hairline plain type="primary" size="normal">自动获取</van-button>-->
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="auto-get">自动获取</button>
<!-- <div style="width: 20%;color: #45C9C2" @tap="getPhone">-->
<!-- 自动获取-->
<!-- </div>-->
</div>
<div class="bottom">
<image style="height: 32rpx;width: 32rpx" src="@/assets/info.png"></image>
<span>请注意, 是快递的收件联系方式</span>
</div>
</div>
<div class="item-container" style="height: 180rpx">
<div class="top">
<span>宿舍号</span>
<div class="right">
<input v-model="addressSheet_Dormitory" disabled="true" @tap="domi_input_tap" placeholder="其他"/>
<span>楼</span>
<input v-model="addressSheet_Floor" maxlength="5" placeholder="其他"/>
<span>层</span>
<input v-model="addressSheet_Room" maxlength="5" placeholder="其他"/>
<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>
</div>
</van-action-sheet>
<van-action-sheet
title="我所在的校区"
@close="closeSchoolSheet"
@click-overlay="closeSchoolSheet"
v-bind:show="showChangeSchoolSheet"
>
<div style="display: flex;flex-direction: column;align-items: center;width: 100%;padding: 20rpx 0 40rpx 0rpx">
<van-cell-group style="width: 100%">
<div style="width: 100%" v-for="item in schoolSearchResult" >
<van-cell v-if="item.checked" custom-class="cellChecked" @tap="schoolItmeClick(item)" :title="item.schoolName" />
<van-cell v-else @tap="schoolItmeClick(item)" :title="item.schoolName" />
</div>
</van-cell-group>
<van-search @change="onChange" style="width: 90%;border-radius: 10rpx"
@search="onSearch" :value="searchText" placeholder="请输入校区名" />
<van-button @tap="updateSchool" round custom-class="bt-update sc">更 新</van-button>
</div>
</van-action-sheet>
<van-popup
@close="closeUnOpen"
@click-overlay="closeUnOpen"
v-bind:show="showUnOpenSheet"
closeable
position="bottom"
custom-style="height: 1000rpx;display: flex;flex-direction: column;align-items: center;width: 100%;overflow-y: visible"
>
<div class="pop-icon" v-if="showUnOpenSheet">
<van-image
round
fit="cover"
width="150rpx"
height="150rpx"
:src="schoolIconUrl"
/>
</div>
<span style="height: 48rpx;font-size: 37rpx;color: #000000;line-height: 44rpx;letter-spacing: 2rpx;margin-top: 12rpx">{{school.schoolName}}</span>
<span style="font-size: 26rpx;margin-top: 24rpx;color: #858585">暂未开通</span>
<div class="pop-item" style="margin-top: 64rpx!important;">
<image style="margin-left: 48rpx" src="@/assets/r1.png"/>
<span style="margin-left: 48rpx">0元投入</span>
</div>
<div class="pop-item">
<image style="margin-left: 48rpx" src="@/assets/r2.png"/>
<span style="margin-left: 48rpx">全方位扶持</span>
</div>
<div class="pop-item">
<image style="margin-left: 48rpx" src="@/assets/r3.png"/>
<span style="margin-left: 48rpx">锻炼管理能力</span>
</div>
<div class="pop-item">
<image style="margin-left: 48rpx" src="@/assets/r4.png"/>
<span style="margin-left: 48rpx">服务同学,结交朋友</span>
</div>
<div class="pop-item">
<image style="margin-left: 48rpx" src="@/assets/r5.png"/>
<span style="margin-left: 48rpx">享受月薪+提成</span>
</div>
<button class="pop-button" open-type="contact">
申请成为校区负责人
</button>
</van-popup>
<van-action-sheet
title="订单支付"
@close="closePaySheet"
@click-overlay="closePaySheet"
v-bind:show="showPaySheet"
>
<div class="pay-sheet-container">
<div class="sheet-title">
服务说明
</div>
<span style="font-size: 24rpx;color: #787878">10秒下单,快递到寝</span>
<span style="font-size: 24rpx;color: #787878;margin-top: 5rpx">即使方寸大小的校园,也确保位置实时精确</span>
<div class="sheet-title" style="margin-top: 30rpx">
支付金额
</div>
<div class="choose-container">
<div class="item" :class="{'choose': paytype==1}" @tap="paytype = 1">
<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;">{{bigprice}}元/件</span>
<span style="font-size: 23rpx;margin-top: 18rpx;">比箱装饮料重或大</span>
</div>
</div>
<span style="margin-top: 35rpx;font-size: 28rpx;color: #6F7270">如未能取到快递,自动退还全部费用</span>
<span style="margin-top: 20rpx;font-size: 28rpx;color: #6F7270">大件实际为普通,自动退还多余费用</span>
<div class="bt-pay" @tap="pay">
支付
</div>
</div>
</van-action-sheet>
<van-action-sheet
title="选择宿舍楼"
@close="closeDormitorySheet"
@click-overlay="closeDormitorySheet"
v-bind:show="showDormitorySheet"
>
<van-picker
default-index="{{ 0 }}"
@change="onDormitorySelect"
columns="{{ dormitoryList }}"
/>
<van-button @tap="DormitoryConfirm" round custom-class="bt-submit-d pc" style="margin-bottom: 30rpx">确认
</van-button>
</van-action-sheet>
<!-- 自定义tabbar-->
<van-tabbar
v-if="!showMark"
active-color="#45C9C2"
active="{{ active }}" @change="onTabChange" class="mytabbar">
<van-tabbar-item>
<image
slot="icon"
src="@/assets/tab1.png"
mode="aspectFit"
style="width: 50rpx; height: 50rpx;"
/>
<image
slot="icon-active"
src="@/assets/tab1s.png"
mode="aspectFit"
style="width: 50rpx; height: 50rpx;"
/>
捎带快递
</van-tabbar-item>
<van-tabbar-item>
<image
slot="icon"
src="@/assets/tab2.png"
mode="aspectFit"
style="width: 50rpx; height: 50rpx;"
/>
<image
slot="icon-active"
src="@/assets/tab2s.png"
mode="aspectFit"
style="width: 50rpx; height: 50rpx;"
/>
我的捎带
</van-tabbar-item>
</van-tabbar>
</div>
</template>
......@@ -892,531 +102,174 @@ const app = getApp().$wepy.$options
wepy.page({
store,
hooks: {
// // Page 级别 hook, 只对当前 Page 的 setData 生效。
// 'before-setData': function(dirty) {
// if (Math.random() < 0.2) {
// console.log('setData canceled')
// return false // Cancel setData
// }
// dirty.time = +new Date()
// return dirty
// }
},
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,
showPaySheet: false,
school: {},
schoolSearchResult: [],
showChangeSchoolSheet: false,
schoolIconUrl: '',
active: 0,
messageComp: '',
messagePacketCode: '',
messageConfirmed: false,
carrierCoList: ['德邦', 'EMS',
'百世', '国通', '汇通', '联邦', '申通', '顺丰', '天天', '菜鸟', '韵达', '圆通', '邮政', '中铁', '中通', '宅急送', '中邮', '中环', '京东'],
dormitoryList: [],
showDormitorySheet: false,
smallprice: '2',
bigprice: '5',
amdeadline: '',
pmdeadline: '',
showAddressSheet: false,
addressSheet_Name: '',
addressSheet_Phone: '',
addressSheet_Dormitory: '',
addressSheet_Floor: '',
addressSheet_Room: '',
address: '',
messageText: '',
remarkText: '',
remarkList: [{
label: '晚上再送', checked: false
}, {
label: '我很着急', checked: false
}, {
label: '请敲门', checked: false
}, {
label: '易碎物品', checked: false
}, {
label: '冷藏物品 请勿暴晒', checked: false
}],
mixins: [testMixin],
showMessageParse: true
data: {
orderList: []
},
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
item_click(item){
wx.setStorageSync("order", item);
wx.login({
success: res => {
let param = {
encryptedData: encodeURIComponent(e.detail.encryptedData),
iv: encodeURIComponent(e.detail.iv),
code: res.code
}
http.post('/getWxPhone', param).then(data => {
_that.addressSheet_Phone = data.data.phoneNumber
})
}
wx.navigateTo({
url: '/pages/approvePreview'
})
},
pay(){
var d = new Date();
let h = d.getHours()
let m = d.getMinutes()
if(h<12&&this.amdeadline){
if(h+':'+m>this.amdeadline){
scanBtClick(){
wx.scanCode({
success: (res) => {
if (!res) {
wx.showToast({
title: '上午提交订单截止时间为'+this.amdeadline+', 请于12点之后重新提交',
icon: 'none',
duration: 4000
title: '扫描二维码错误',
icon: 'error',
duration: 3000
})
return
}
var order = res.path;
if(!order){
order = res.result
}
if(h>=12&&this.pmdeadline){
if(h+':'+m>this.pmdeadline){
wx.showToast({
title: '下午提交订单截止时间'+this.pmdeadline+', 请明天重新提交',
icon: 'none',
duration: 4000
})
return
}
if(order.indexOf("=")!==-1){
order = order.split("=")[1]
}
if (!this.messageComp || !this.messagePacketCode) {
if(order.indexOf('PO') === -1){
wx.showToast({
title: '未识别成功,请自行输入快递公司以及取货码',
icon: 'none',
duration: 4000
title: '二维码非法,请您扫描配送单二维码',
icon: 'error',
duration: 3000
})
return
}
this.messageConfirmed = true
if(!this.address){
wx.showToast({
title: '请填写正确的收货地址',
icon: 'none',
duration: 4000
})
return
//将货单号,储存到缓存中
wx.setStorageSync("order", order);
wx.navigateTo({
url: '/pages/approvePreview'
})
// let role = wx.getStorageSync("role");
// if(role === '验货员'){
// wx.navigateTo({
// url: '../inspectionPreview/inspectionPreview'
// })
// }else {
// wx.navigateTo({
// url: '../nosignpreview/nosignpreview'
// })
// }
}
let _that = this
let param = {yuan: this.paytype===1?this.smallprice:this.bigprice}
http.post('/task/pay',param).then(data => {
data = data.data
wx.requestPayment({
timeStamp: data.timeStamp,
nonceStr: data.nonceStr,
package: data.packageValue,
signType: 'MD5',
paySign: data.paySign,
success (res) {
_that.taskSubmit()
},
fail (res) {
wx.showToast({
title: '支付失败',
icon: 'none',
duration: 3000,
mask:true
})
}
})
})
},
openChange(){
this.showAddressSheet = false
this.showUnOpenSheet = false
this.showChangeSchoolSheet = true
},
know(){
this.showMark = false
wx.setStorageSync("know",true)
},
apply(){
},
mallClick(){
wx.showToast({
title: '超市功能尚未开启,尽请期待',
icon: 'none',
duration: 4000
})
},
closeUnOpen(){
this.showUnOpenSheet = false
},
updateSchool(){
this.showChangeSchoolSheet = false
let s = this.schoolSearchResult.find(v=>{
return v.checked
})
wx.setStorageSync('schoolID',s.schoolID)
this.$wx.onShow()
},
schoolItmeClick(item){
let i = JSON.parse(JSON.stringify(item))
let l = JSON.parse(JSON.stringify(this.schoolSearchResult))
onShow() {
let usernam = wx.getStorageSync("username");
let rol = wx.getStorageSync("role");
let pla = wx.getStorageSync("plat");
l.map(v=>{
v.checked = v.schoolName === i.schoolName
return v
})
this.schoolSearchResult = l
},
onChange(detail){
this.searchText = detail.$wx.detail
if(!this.searchText){
this.schoolSearchResult = []
return
}
let param = {
searchText: this.searchText
}
http.post('/school/search',param).then(data => {
this.schoolSearchResult = data.data
})
},
closeSchoolSheet(){
this.showChangeSchoolSheet = false
},
closePaySheet(){
this.showPaySheet = false
},
onTabChange(event){
this.active = event.$wx.detail
if(usernam&&rol){
let ktzCo = wx.getStorageSync("ktzCode");
if(this.active === 0){
let param = { 审批角色: rol }
if(ktzCo){
param.课题组编号 = ktzCo
}
if(pla === 'fwh'){
wx.setStorageSync('urlPrefix','https://www.tmallab.com/fwhj')
}else{
wx.switchTab({
url: '/pages/progress'
})
wx.setStorageSync('urlPrefix','https://www.tmallab.com/pkunxyj')
}
},
taskSubmit(){
//TODO 学校是否开启的判断
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
http.post('/JPost?query=vue_审批list', param).then(res => {
if(res.flag === "1"){
this.orderList = res.data.map(v=>{
return v['订单号']
})
return
}
let remark = this.remarkText
this.remarkList.forEach(item=>{
if(item.checked){
remark+= item.label
let l = Array.from(new Set(this.orderList))
this.orderList = l
}else{
this.orderList = []
}
})
let param = {
remark: remark,
phone: this.address.phone,
addressID: this.address.addressID,
receiverName: this.address.name,
parcelInfo: this.messageText,
courierCompany: this.messageComp,
pickupCode: this.messagePacketCode,
pay: this.paytype===1?this.smallprice:this.bigprice
}
http.post('/task/submit',param).then(data => {
this.closePaySheet()
wx.showToast({
title: '提交成功!',
icon: 'success',
duration: 4000
})
return
})
},
updateAddress() {
if (!this.addressSheet_Name) {
wx.showToast({
title: '请输入收件人姓名',
icon: 'none',
duration: 4000
})
return
}
if (!this.addressSheet_Phone) {
wx.showToast({
title: '请输入收件人电话',
icon: 'none',
duration: 4000
})
return
}
if (!this.addressSheet_Dormitory || this.addressSheet_Dormitory === '其他') {
wx.showToast({
title: '请选择宿舍楼',
icon: 'none',
duration: 4000
})
return
}
if (!this.addressSheet_Floor) {
wx.showToast({
title: '请输入楼层',
icon: 'none',
duration: 4000
})
return
}
if (!this.addressSheet_Room) {
wx.showToast({
title: '请输入房间号',
icon: 'none',
duration: 4000
})
return
}
onLoad(options) {
if(options.scene){
var scene = decodeURIComponent(options.scene);
http.post('/address/updateAddress', {
dormitoryName: this.addressSheet_Dormitory,
floor: this.addressSheet_Floor,
room: this.addressSheet_Room,
name: this.addressSheet_Name,
phone: this.addressSheet_Phone
}).then(res => {
if(res.code === 200){
this.address = res.data
this.showAddressSheet = false
}
})
console.log(scene)
var arrPara = scene.split(",");
},
var role = arrPara[0]
var username = arrPara[1]
var plat = arrPara[3]
confirmMessage() {
if (!this.messageComp || !this.messagePacketCode) {
wx.showToast({
title: '未识别成功,请自行输入快递公司以及取货码',
icon: 'none',
duration: 4000
})
return
}
this.messageConfirmed = true
},
messageInput() {
this.messageConfirmed = false
this.messageComp = ''
this.messagePacketCode = ''
for (var idx in this.carrierCoList) {
let item = this.carrierCoList[idx]
if (this.messageText.indexOf(item) !== -1) {
this.messageComp = item
break
}
}
this.messagePacketCode = this.parsePaketCode(this.messageText)
},
remarkCheck(e, item) {
this.remarkList[e].checked = !this.remarkList[e].checked
},
DormitoryConfirm() {
this.showDormitorySheet = false
},
onDormitorySelect(event) {
const { picker, value, index } = event.$wx.detail
this.addressSheet_Dormitory = value
},
closeDormitorySheet() {
this.showDormitorySheet = false
},
domi_input_tap() {
this.showDormitorySheet = true
},
closeAddressSheet() {
this.showAddressSheet = false
},
cleanMessage() {
this.messageText = ''
},
parsePaketCode(str) {
let result = ''
var pattern = /\d{1,}(\-|\/|.)\d{1,}\1\d{1,}/
var arr = str.match(pattern)
if (arr && arr.length > 0) {
result = arr[0]
return result
}
pattern = /\d{1,}(\-|\/|.)\d{1,6}/
wx.setStorageSync("plat", plat);
arr = str.match(pattern)
if (arr && arr.length > 0 && !result) {
result = arr[0]
return result
if(role==='JS0010'){
role = 'JSXXXX'
}
pattern = /\d{1,}(\_|\/|.)\d{1,6}/
wx.setStorageSync("username", username);
wx.setStorageSync("role", role);
arr = str.match(pattern)
if (arr && arr.length > 0 && !result) {
result = arr[0]
return result
try {
var ktzCode = arrPara[2]
wx.setStorageSync("ktzCode", ktzCode);
}catch (e){
console.log(e)
}
pattern = /\d{1,}(\_|\/|.)\d{1,}\1\d{1,}/
var arr = str.match(pattern)
if (arr && arr.length > 0) {
result = arr[0]
return result
}
let usernam = wx.getStorageSync("username");
let rol = wx.getStorageSync("role");
pattern = /\d{2,}/
let pla = wx.getStorageSync("plat");
let ktzCo = wx.getStorageSync("ktzCode");
arr = str.match(pattern)
if (arr && arr.length > 0 && !result) {
result = arr[0]
}
return result
},
getPhone() {
},initSchool(){
let schoolID = wx.getStorageSync('schoolID')
this.schoolIconUrl = app.config.urlPrefix+'/school/icon/'+schoolID
http.get('/school/info/'+schoolID).then(res => {
this.school = res.data
if(res.data.deleted === 1){
this.showUnOpenSheet = true
if(!usernam||!rol||!pla){
wx.showModal({
title: "提示",
showCancel: false,
content: '请登录网页扫码登录此小程序',
//点击确认返回main界面
success: function (res) {
}
})
return
}
},
onShow() {
this.showMark = !wx.getStorageSync("know")
// this.showMark = true
this.active = 0
//TODO 初始化学校 id
if(!wx.getStorageSync('schoolID')){
wx.setStorageSync('schoolID', 2)
}
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
}
if(pla === 'fwh'){
wx.setStorageSync('urlPrefix','https://www.tmallab.com/fwhj')
}else{
wx.setStorageSync('urlPrefix','https://www.tmallab.com/pkunxyj')
}
})
wx.login({
success(res) {
var code = res.code
http.post('/wxLogin', { code: code }).then(data => {
let customerID = data.data.customerID
if (customerID) {
wx.setStorageSync('customerID', customerID)
}
http.post('/address/getAddressByUser').then(data => {
data = data.data
if (data) {
_that.address = data
_that.addressSheet_Dormitory = data.dormitoryName
_that.addressSheet_Floor = data.floor
_that.addressSheet_Name = data.name
_that.addressSheet_Phone = data.phone
_that.addressSheet_Room = data.room
} else {
_that.address = null
let param = { 审批角色: rol }
if(ktzCo){
param.课题组编号 = ktzCo
}
})
_that.initSchool()
http.post('/dormitory/getBySchool', { pageIndex: 1, pageSize: 100 }).then(res => {
_that.dormitoryList = res.data.map(v => {
return v.name
})
_that.dormitoryList.unshift('其他')
})
http.post('/JPost?query=vue_审批list', param).then(res => {
if(res.flag === "1"){
this.orderList = res.data.map(v=>{
return v['订单号']
})
let l = Array.from(new Set(this.orderList))
this.orderList = l
}else{
this.orderList = []
}
})
}
})
</script>
......@@ -1426,12 +279,14 @@ navigationBarTextStyle: "white",
navigationBarBackgroundColor: "#45C9C3",
navigationBarTitleText: '小树懒捎带',
usingComponents: {
"van-empty": "module:@vant/weapp/lib/empty/index",
"van-icon": "module:@vant/weapp/lib/icon/index",
"van-overlay": "module:@vant/weapp/lib/overlay/index",
"van-cell": "module:@vant/weapp/lib/cell/index",
"van-cell-group": "module:@vant/weapp/lib/cell-group/index",
"van-search": "module:@vant/weapp/lib/search/index",
"van-image": "module:@vant/weapp/lib/image/index",
"van-dialog": "module:@vant/weapp/lib/dialog/index",
header: '~@/components/header',
"van-picker": "module:@vant/weapp/lib/picker/index",
"van-popup": "module:@vant/weapp/lib/popup/index",
......
......@@ -415,7 +415,7 @@ import store from '../store'
import testMixin from '../mixins/test'
import http from '../common/http.js'
const app = getApp().$wepy.$options
const prefix = wx.getStorageSync('urlPrefix')
wepy.page({
......@@ -448,7 +448,7 @@ wepy.page({
},
sub(item) {
wx.requestSubscribeMessage({
tmplIds: ['CGlLzkCZy2Q5XaMvRw1-9gfHy_CRhk4_6LuXhKK2vI4','Lr1MlntU2DKsuxtrlTJT_d3uxOeIvKjIsjzHSKUpUOI','8VhR4ruZ-b6kZRzSzQ4TwIoQKtz7ODjkkHCgAsalFSE'],
tmplIds: ['Lr1MlntU2DKsuxtrlTJT_d3uxOeIvKjIsjzHSKUpUOI','CGlLzkCZy2Q5XaMvRw1-9gfHy_CRhk4_6LuXhKK2vI4','8VhR4ruZ-b6kZRzSzQ4TwIoQKtz7ODjkkHCgAsalFSE'],
success (res) {
wx.showToast({
title: '订阅成功',
......@@ -468,10 +468,9 @@ wepy.page({
},
photo1(item){
if(item.takeCredentials){
console.log(app.config.urlPrefix+'/download/'+item.takeCredentials)
wx.previewImage({
current: app.config.urlPrefix+'/download/'+item.takeCredentials, // 当前显示图片的http链接
urls: [app.config.urlPrefix+'/download/'+item.takeCredentials]
current: prefix+'/download/'+item.takeCredentials, // 当前显示图片的http链接
urls: [prefix+'/download/'+item.takeCredentials]
})
}else{
wx.showToast({
......@@ -485,8 +484,8 @@ wepy.page({
if(item.takeCredentials){
wx.previewImage({
current: app.config.urlPrefix+'/download/'+item.takeCredentials, // 当前显示图片的http链接
urls: [app.config.urlPrefix+'/download/'+item.takeCredentials]
current: prefix+'/download/'+item.takeCredentials, // 当前显示图片的http链接
urls: [prefix+'/download/'+item.takeCredentials]
})
}else{
wx.showToast({
......@@ -499,8 +498,8 @@ wepy.page({
photo3(item){
if(item.innerSendCredentials){
wx.previewImage({
current: app.config.urlPrefix+'/download/'+item.innerSendCredentials, // 当前显示图片的http链接
urls: [app.config.urlPrefix+'/download/'+item.innerSendCredentials]
current: prefix+'/download/'+item.innerSendCredentials, // 当前显示图片的http链接
urls: [prefix+'/download/'+item.innerSendCredentials]
})
}else{
wx.showToast({
......
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