添加提货功能切分支
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
node_modules/
|
||||||
|
.project
|
||||||
|
unpackage/
|
||||||
|
.DS_Store
|
@ -24,3 +24,11 @@ export function addOrder(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取快递单号 body放phone和activityId(活动id)
|
||||||
|
export function getTrackingInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mobile/getTrackingInfo',
|
||||||
|
method:'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
109
components/code/code.vue
Normal file
109
components/code/code.vue
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<view class="canvas-img-code"
|
||||||
|
><canvas :style="{ width: width + 'px', height: height + 'px' }" canvas-id="imgcanvas" @tap="refresh"></canvas
|
||||||
|
></view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
width: 120,
|
||||||
|
height: 30,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.init()
|
||||||
|
}, 300)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
let context = uni.createCanvasContext('imgcanvas', this),
|
||||||
|
w = this.width,
|
||||||
|
h = this.height
|
||||||
|
context.setFillStyle('white')
|
||||||
|
context.setLineWidth(5)
|
||||||
|
context.fillRect(0, 0, w, h)
|
||||||
|
let pool = [
|
||||||
|
'A',
|
||||||
|
'B',
|
||||||
|
'C',
|
||||||
|
'D',
|
||||||
|
'E',
|
||||||
|
'F',
|
||||||
|
'G',
|
||||||
|
'H',
|
||||||
|
'J',
|
||||||
|
'K',
|
||||||
|
'L',
|
||||||
|
'M',
|
||||||
|
'N',
|
||||||
|
'P',
|
||||||
|
'Q',
|
||||||
|
'R',
|
||||||
|
'S',
|
||||||
|
'T',
|
||||||
|
'U',
|
||||||
|
'V',
|
||||||
|
'W',
|
||||||
|
'S',
|
||||||
|
'Y',
|
||||||
|
'Z',
|
||||||
|
'2',
|
||||||
|
'3',
|
||||||
|
'4',
|
||||||
|
'5',
|
||||||
|
'6',
|
||||||
|
'7',
|
||||||
|
'8',
|
||||||
|
'9',
|
||||||
|
],
|
||||||
|
str = ''
|
||||||
|
for (let i = 0; i < 4; i++) {
|
||||||
|
let c = pool[this.rn(0, pool.length - 1)] //<2F><><EFBFBD>榊<EFBFBD><E6A68A>絖<EFBFBD>
|
||||||
|
let deg = this.rn(-20, 20) //絖<>篏<EFBFBD><E7AF8F><EFBFBD><EFBFBD><EFBFBD>莉<EFBFBD><E88E89>綺<EFBFBD>
|
||||||
|
context.setFontSize(18)
|
||||||
|
context.setTextBaseline('top')
|
||||||
|
context.setFillStyle(this.rc(80, 150))
|
||||||
|
context.save()
|
||||||
|
context.translate(30 * i + 15, parseInt(h / 1.5))
|
||||||
|
context.rotate((deg * Math.PI) / 180)
|
||||||
|
context.fillText(c, -15 + 5, -15)
|
||||||
|
context.restore()
|
||||||
|
str += c
|
||||||
|
}
|
||||||
|
uni.setStorage({
|
||||||
|
key: 'imgcode',
|
||||||
|
data: str.toLowerCase(),
|
||||||
|
})
|
||||||
|
for (let i = 0; i < 40; i++) {
|
||||||
|
context.beginPath()
|
||||||
|
context.arc(this.rn(0, w), this.rn(0, h), 1, 0, 2 * Math.PI)
|
||||||
|
context.closePath()
|
||||||
|
context.setFillStyle(this.rc(150, 200))
|
||||||
|
context.fill()
|
||||||
|
}
|
||||||
|
context.draw()
|
||||||
|
},
|
||||||
|
rc(min, max) {
|
||||||
|
let r = this.rn(min, max)
|
||||||
|
let g = this.rn(min, max)
|
||||||
|
let b = this.rn(min, max)
|
||||||
|
return 'rgb(' + r + ',' + g + ',' + b + ')'
|
||||||
|
},
|
||||||
|
rn(max, min) {
|
||||||
|
return parseInt(Math.random() * (max - min)) + min
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.canvas-img-code {
|
||||||
|
// display: inline-block;
|
||||||
|
}
|
||||||
|
</style>
|
42
js_sdk/xb-copy/uni-copy.js
Normal file
42
js_sdk/xb-copy/uni-copy.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
export default function uniCopy({content,success,error}) {
|
||||||
|
if(!content) return error('复制的内容不能为空 !')
|
||||||
|
content = typeof content === 'string' ? content : content.toString() // 复制内容,必须字符串,数字需要转换为字符串
|
||||||
|
/**
|
||||||
|
* 小程序端 和 app端的复制逻辑
|
||||||
|
*/
|
||||||
|
//#ifndef H5
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: content,
|
||||||
|
success: function() {
|
||||||
|
success("复制成功~")
|
||||||
|
console.log('success');
|
||||||
|
},
|
||||||
|
fail:function(){
|
||||||
|
success("复制失败~")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* H5端的复制逻辑
|
||||||
|
*/
|
||||||
|
// #ifdef H5
|
||||||
|
if (!document.queryCommandSupported('copy')) { //为了兼容有些浏览器 queryCommandSupported 的判断
|
||||||
|
// 不支持
|
||||||
|
error('浏览器不支持')
|
||||||
|
}
|
||||||
|
let textarea = document.createElement("textarea")
|
||||||
|
textarea.value = content
|
||||||
|
textarea.readOnly = "readOnly"
|
||||||
|
document.body.appendChild(textarea)
|
||||||
|
textarea.select() // 选择对象
|
||||||
|
textarea.setSelectionRange(0, content.length) //核心
|
||||||
|
let result = document.execCommand("copy") // 执行浏览器复制命令
|
||||||
|
if(result){
|
||||||
|
success("复制成功~")
|
||||||
|
}else{
|
||||||
|
error("复制失败,请检查h5中调用该方法的方式,是不是用户点击的方式调用的,如果不是请改为用户点击的方式触发该方法,因为h5中安全性,不能js直接调用!")
|
||||||
|
}
|
||||||
|
textarea.remove()
|
||||||
|
// #endif
|
||||||
|
}
|
@ -69,7 +69,7 @@
|
|||||||
"enable" : false
|
"enable" : false
|
||||||
},
|
},
|
||||||
"h5" : {
|
"h5" : {
|
||||||
"title" : "金槐花",
|
"title" : "金淮花",
|
||||||
"domain" : "golden.shangqie.cn",
|
"domain" : "golden.shangqie.cn",
|
||||||
"router" : {
|
"router" : {
|
||||||
"mode" : "history"
|
"mode" : "history"
|
||||||
|
13
pages.json
13
pages.json
@ -6,7 +6,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "金槐花提货卡",
|
"navigationBarTitleText": "金淮花提货卡",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": false
|
"titleNView": false
|
||||||
@ -23,10 +23,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/index/check",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "金槐花提货卡",
|
"navigationBarTitleText": "金淮花提货卡",
|
||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
"backgroundColor": "#F8F8F8"
|
"backgroundColor": "#F8F8F8"
|
||||||
}
|
}
|
||||||
|
28
pages/index/check.vue
Normal file
28
pages/index/check.vue
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<web-view :src="src"></web-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// https://m.kuaidi100.com/result.jsp?nu=9884138059142
|
||||||
|
src:''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
console.log(options.src)
|
||||||
|
this.src = options.src
|
||||||
|
// console.log(this.$scope.$getAppWebview())
|
||||||
|
// console.log(plus.webview.currentWebview())
|
||||||
|
},
|
||||||
|
// http://localhost:8081/pages/index/check?src=https%3A%2F%2Fm.kuaidi100.com%2Fresult.jsp%3Fnu%3D9884138059142
|
||||||
|
// http://localhost:8081/pages/index/check?src=https%3A%2F%2Fm.kuaidi100.com%2Fresult.jsp%3Fnu%3D9884138059142
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@ -1,103 +1,218 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<div class="cro">
|
<view class="cro">
|
||||||
<div class="cro_left_bottom"></div>
|
<view class="cro_left_bottom"></view>
|
||||||
<div class="cro_right_bottom"></div>
|
<view class="cro_right_bottom"></view>
|
||||||
<view class="img">
|
<view class="img">
|
||||||
<u-image width="100%" height="580rpx" :src="info.pic"></u-image>
|
<u-image
|
||||||
<view class="" style="font-size: 36rpx;color: #333333;margin-top: 40rpx;">{{ info.name }}</view>
|
width="100%"
|
||||||
|
height="580rpx"
|
||||||
|
mode="aspectFill"
|
||||||
|
:src="item"
|
||||||
|
v-for="item in info.pic"
|
||||||
|
style="margin-bottom: 16rpx"
|
||||||
|
></u-image>
|
||||||
|
<view class="" style="font-size: 36rpx; color: #333333; margin-top: 40rpx">{{ info.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</view>
|
||||||
<div class="cro cro2">
|
<view class="cro cro2">
|
||||||
<div class="cro_left_top"></div>
|
<view class="cro_left_top"></view>
|
||||||
<div class="cro_right_top"></div>
|
<view class="cro_right_top"></view>
|
||||||
<view class="u-content ql-editor img"><u-parse :html="info.note"></u-parse></view>
|
<view class="u-content ql-editor img">
|
||||||
</div>
|
<u-parse :html="info.note"></u-parse>
|
||||||
<div class="cro3">
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="margin-top: 15px; border-radius: 10px; overflow: hidden">
|
||||||
|
<u-tabs :list="list" :is-scroll="false" :current="current" @change="changeTabs"></u-tabs>
|
||||||
|
</view>
|
||||||
|
<view class="cro3" v-show="current == 0">
|
||||||
<!-- :error-type="['border-bottom']" -->
|
<!-- :error-type="['border-bottom']" -->
|
||||||
<u-form :model="form" ref="uForm" label-width="200" :label-style="{ color: '#333333', fontSize: '34rpx', fontWeight: 'bold' }">
|
<u-form
|
||||||
<view style="text-align: center;color: #333;font-size: 36rpx;font-weight: bold;">添加收货地址</view>
|
:model="form"
|
||||||
<u-form-item label="收货人" prop="name"><u-input v-model="form.name" placeholder="请填写收货人姓名" /></u-form-item>
|
ref="uForm"
|
||||||
<u-form-item label="手机号码" prop="phone"><u-input placeholder="请填写收货人手机号" v-model="form.phone" type="number" maxlength="11"></u-input></u-form-item>
|
label-width="200"
|
||||||
|
:label-style="{ color: '#333333', fontSize: '34rpx', fontWeight: 'bold' }"
|
||||||
|
>
|
||||||
|
<view style="text-align: center; color: #333; font-size: 36rpx; font-weight: bold">身份验证</view>
|
||||||
|
|
||||||
|
<u-form-item label="手机号" prop="phone">
|
||||||
|
<u-input placeholder="请填写手机号" v-model="form.phone" type="number" maxlength="11"></u-input>
|
||||||
|
</u-form-item>
|
||||||
<u-form-item label="验证码" prop="code">
|
<u-form-item label="验证码" prop="code">
|
||||||
<u-input placeholder="请输入验证码" v-model="form.code" type="text"></u-input>
|
<u-input placeholder="请输入验证码" v-model="form.code" type="text"></u-input>
|
||||||
<view slot="right" @click="getCode" style="color: #F09B38;">{{ codeTips }}</view>
|
<view slot="right" @click="getCode" style="color: #f09b38">{{ codeTips }}</view>
|
||||||
|
</u-form-item>
|
||||||
|
<view style="text-align: center; margin: 15px; color: #333; font-size: 36rpx; font-weight: bold"
|
||||||
|
>收货地址</view
|
||||||
|
>
|
||||||
|
<u-alert-tips
|
||||||
|
type="warning"
|
||||||
|
title=""
|
||||||
|
description="默认收货手机号和领取手机号相同,如要用另外手机号提货,请修改下面收货手机号"
|
||||||
|
></u-alert-tips>
|
||||||
|
<u-form-item label="收货姓名" prop="otherName">
|
||||||
|
<u-input v-model="form.otherName" placeholder="请填写收货人姓名" />
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="收货手机号">
|
||||||
|
<u-input placeholder="请填写收货手机号" v-model="form.otherPhone" type="number" maxlength="11"></u-input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="选择地区" prop="city">
|
||||||
|
<u-input v-model="form.city" type="select" placeholder="请选择省市区" @click="show = true" />
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="详细地址" prop="details">
|
||||||
|
<u-input v-model="form.details" type="text" placeholder="街道楼栋门牌号" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="选择地区" prop="city"><u-input v-model="form.city" type="select" placeholder="请选择省市区" @click="show = true" /></u-form-item>
|
|
||||||
<u-form-item label="详细地址" prop="details"><u-input v-model="form.details" type="text" placeholder="街道楼栋门牌号" /></u-form-item>
|
|
||||||
</u-form>
|
</u-form>
|
||||||
<u-button class="custom-style" shape="circle" hover-class="none" @click="submit">我要提货</u-button>
|
<u-button class="custom-style" shape="circle" hover-class="none" @click="submit">我要提货</u-button>
|
||||||
<u-picker mode="region" v-model="show" :area-code="arrCode" @confirm="change"></u-picker>
|
<u-picker mode="region" v-model="show" :area-code="arrCode" @confirm="change"></u-picker>
|
||||||
<u-verification-code seconds="60" ref="uCode" @change="codeChange"></u-verification-code>
|
<u-verification-code seconds="60" ref="uCode" @change="codeChange"></u-verification-code>
|
||||||
</div>
|
|
||||||
</view>
|
</view>
|
||||||
<u-popup v-model="show2" mode="center" border-radius="14" :mask-close-able="false" closeable width="60%" height="100px">
|
<view class="cro3" v-show="current == 1">
|
||||||
<view style="height: 100%;line-height: 100px;text-align: center;">{{ message }}</view>
|
<u-form
|
||||||
|
:model="checkForm"
|
||||||
|
ref="check"
|
||||||
|
label-width="200"
|
||||||
|
:label-style="{ color: '#333333', fontSize: '34rpx', fontWeight: 'bold' }"
|
||||||
|
>
|
||||||
|
<view style="text-align: center; color: #333; font-size: 36rpx; font-weight: bold">物流单号</view>
|
||||||
|
<u-form-item label="手机号" prop="phone"
|
||||||
|
><u-input placeholder="请填写手机号" v-model="checkForm.phone" type="number" maxlength="11"></u-input
|
||||||
|
></u-form-item>
|
||||||
|
<!-- <u-form-item label="验证码" prop="code">
|
||||||
|
<u-input placeholder="请输入验证码" v-model="checkForm.code" type="text"></u-input>
|
||||||
|
<view slot="right" @click="getCode2" style="color: #f09b38">{{ codeTips2 }}</view>
|
||||||
|
</u-form-item> -->
|
||||||
|
<u-form-item label="验证码" prop="code">
|
||||||
|
<u-input placeholder="请输入验证码" v-model="checkForm.code" type="text"></u-input>
|
||||||
|
<view slot="right" v-if="current == 1"><code-pic ref="child" /></view>
|
||||||
|
</u-form-item>
|
||||||
|
<u-button class="custom-style" shape="circle" hover-class="none" @click="handleSubmit">查询物流单号</u-button>
|
||||||
|
<u-verification-code seconds="60" ref="uCode2" @change="codeChange2"></u-verification-code>
|
||||||
|
</u-form>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-popup
|
||||||
|
v-model="show2"
|
||||||
|
mode="center"
|
||||||
|
border-radius="14"
|
||||||
|
:mask-close-able="false"
|
||||||
|
closeable
|
||||||
|
width="60%"
|
||||||
|
height="100px"
|
||||||
|
>
|
||||||
|
<view style="height: 100%; line-height: 100px; text-align: center">{{ message }}</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-popup
|
||||||
|
v-model="handleShow.hidden"
|
||||||
|
mode="center"
|
||||||
|
border-radius="14"
|
||||||
|
:mask-close-able="false"
|
||||||
|
closeable
|
||||||
|
width="80%"
|
||||||
|
height="270px"
|
||||||
|
style="overflow: hidden;"
|
||||||
|
>
|
||||||
|
<view style="text-align: center; width: 100%;">
|
||||||
|
<u-image
|
||||||
|
width="60%"
|
||||||
|
height="450rpx"
|
||||||
|
mode="aspectFit"
|
||||||
|
src="../../static/404.jpg"
|
||||||
|
style="margin: auto"
|
||||||
|
></u-image>
|
||||||
|
</view>
|
||||||
|
<view style="text-align: center">{{handleShow.message}}</view>
|
||||||
|
</u-popup>
|
||||||
|
<u-modal title="快递单号" v-model="showModal" mask-close-able show-cancel-button cancel-text="复制单号" confirm-text="查看物流" @cancel="copy(logistics.trackingNumber)" @confirm="handlePage" :content="logistics.trackingUnit+':'+logistics.trackingNumber"></u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getInfo, getCode, addOrder } from '@/common/api.js'
|
import { getInfo, getCode, addOrder,getTrackingInfo } from '@/common/api.js'
|
||||||
|
import codePic from '@/components/code/code.vue'
|
||||||
|
import uniCopy from '@/js_sdk/xb-copy/uni-copy.js'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
codePic,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
name: '提货',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '查询',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
current: 0,
|
||||||
info: {},
|
info: {},
|
||||||
options: {},
|
options: {},
|
||||||
form: {
|
form: {
|
||||||
name: '',
|
otherName: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
city: '',
|
city: '',
|
||||||
details: '',
|
details: '',
|
||||||
address: ''
|
address: '',
|
||||||
|
otherPhone: '',
|
||||||
|
},
|
||||||
|
checkForm: {
|
||||||
|
phone: '',
|
||||||
},
|
},
|
||||||
show: false,
|
show: false,
|
||||||
show2: false,
|
show2: false,
|
||||||
|
handleShow:{
|
||||||
|
hidden:false,
|
||||||
|
message:''
|
||||||
|
},
|
||||||
|
showModal:false,
|
||||||
message: '',
|
message: '',
|
||||||
arrCode: [],
|
arrCode: [],
|
||||||
radio: '',
|
radio: '',
|
||||||
switchVal: false,
|
switchVal: false,
|
||||||
codeTips: '',
|
codeTips: '',
|
||||||
|
codeTips2: '',
|
||||||
|
logistics:{},
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
otherName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入姓名',
|
message: '请输入收货姓名',
|
||||||
// 可以单个或者同时写两个触发验证方式
|
// 可以单个或者同时写两个触发验证方式
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur'],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
phone: [
|
phone: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
min: 11,
|
min: 11,
|
||||||
message: '请输入正确的手机号',
|
message: '请输入正确的手机号',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
code: [
|
code: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入验证码',
|
message: '请输入验证码',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
city: [
|
city: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入验证码',
|
message: '请输入验证码',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
details: [
|
details: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入详细地址',
|
message: '请输入详细地址',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -105,13 +220,20 @@ export default {
|
|||||||
// uni.$showMsg('请扫描二维码访问')
|
// uni.$showMsg('请扫描二维码访问')
|
||||||
this.options = options
|
this.options = options
|
||||||
getInfo(options).then(({ data }) => {
|
getInfo(options).then(({ data }) => {
|
||||||
|
data.pic = data.pic.split(',')
|
||||||
this.info = data
|
this.info = data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 切换tab
|
||||||
|
changeTabs(index) {
|
||||||
|
this.current = index
|
||||||
|
},
|
||||||
|
// 提货提交
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.uForm.validate(valid => {
|
this.$refs.uForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
console.log(this.form)
|
||||||
console.log('验证通过')
|
console.log('验证通过')
|
||||||
this.form.address = this.form.city + this.form.details
|
this.form.address = this.form.city + this.form.details
|
||||||
this.form.activityId = this.options.id
|
this.form.activityId = this.options.id
|
||||||
@ -123,7 +245,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/index/fillForm'
|
url: '/pages/index/fillForm',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
@ -134,18 +256,81 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
if (this.checkForm.phone.length !== 11) return this.$u.toast('请填写正确的手机号')
|
||||||
|
if (!this.checkForm.code) return this.$u.toast('验证码不能为空')
|
||||||
|
uni.getStorage({
|
||||||
|
key:'imgcode',
|
||||||
|
success: (res) => {
|
||||||
|
if(this.checkForm.code.toLowerCase()!==res.data) return this.$u.toast('验证码不一致')
|
||||||
|
getTrackingInfo({phone:this.checkForm.phone,activityId:this.options.id}).then(({code,data,message})=>{
|
||||||
|
if(code!==200){
|
||||||
|
// this.show2 = true
|
||||||
|
// this.message = message
|
||||||
|
this.handleShow.hidden = true
|
||||||
|
this.handleShow.message = message
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.showModal = true
|
||||||
|
this.logistics = data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail:(err)=> this.$u.toast(err.errMsg)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
copy(numbers) {
|
||||||
|
uniCopy({
|
||||||
|
content:numbers,
|
||||||
|
success:(res)=>{
|
||||||
|
uni.showToast({
|
||||||
|
title: res,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
error:(e)=>{
|
||||||
|
uni.showToast({
|
||||||
|
title: e,
|
||||||
|
icon: 'none',
|
||||||
|
duration:3000,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handlePage() {
|
||||||
|
const id = this.logistics.trackingNumber
|
||||||
|
let url = ''
|
||||||
|
if(this.logistics.trackingUnit==='京东'){
|
||||||
|
url = 'https://www.jdl.cn/orderSearch?waybillNo='
|
||||||
|
|
||||||
|
}else if(this.logistics.trackingUnit==='德邦'){
|
||||||
|
url = 'https://www.deppon.com/mow/www/queryByText/waybillDetails.html?orderNumber='
|
||||||
|
}else{
|
||||||
|
url = 'https://m.kuaidi100.com/result.jsp?nu='
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url:'/pages/index/check?src='+'https://m.kuaidi100.com/result.jsp?nu='+id
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
window.location.href = url + id
|
||||||
|
},
|
||||||
codeChange(text) {
|
codeChange(text) {
|
||||||
this.codeTips = text
|
this.codeTips = text
|
||||||
},
|
},
|
||||||
// 获取验证码
|
codeChange2(text) {
|
||||||
|
this.codeTips2 = text
|
||||||
|
},
|
||||||
|
// 获取提货验证码
|
||||||
getCode() {
|
getCode() {
|
||||||
if (this.$refs.uCode.canGetCode) {
|
if (this.$refs.uCode.canGetCode) {
|
||||||
if (this.form.phone.length !== 11) return
|
if (this.form.phone.length !== 11) return
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在获取验证码',
|
title: '正在获取验证码',
|
||||||
mask: true
|
mask: true,
|
||||||
})
|
})
|
||||||
getCode({ phone: this.form.phone, activityId: this.options.id }).then(({ code, data, message }) => {
|
getCode({
|
||||||
|
phone: this.form.phone,
|
||||||
|
activityId: this.options.id,
|
||||||
|
unit: this.info.unit,
|
||||||
|
}).then(({ code, data, message }) => {
|
||||||
if (code != 200) {
|
if (code != 200) {
|
||||||
this.show2 = true
|
this.show2 = true
|
||||||
this.message = message
|
this.message = message
|
||||||
@ -153,6 +338,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.form.unit = data.unit
|
this.form.unit = data.unit
|
||||||
this.form.id = data.id
|
this.form.id = data.id
|
||||||
|
this.form.otherPhone = data.phone
|
||||||
|
this.form.otherName = data.name
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.$u.toast('验证码已发送')
|
this.$u.toast('验证码已发送')
|
||||||
this.$refs.uCode.start()
|
this.$refs.uCode.start()
|
||||||
@ -161,43 +348,64 @@ export default {
|
|||||||
this.$u.toast('倒计时结束后再发送')
|
this.$u.toast('倒计时结束后再发送')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 获取单号验证码
|
||||||
|
getCode2() {
|
||||||
|
if (this.checkForm.phone.length !== 11) return this.$u.toast('请填写正确的手机号')
|
||||||
|
if (this.$refs.uCode2.canGetCode) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '正在获取验证码',
|
||||||
|
mask: true,
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
this.$u.toast('验证码已发送')
|
||||||
|
this.$refs.uCode2.start()
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
change(e) {
|
change(e) {
|
||||||
this.form.city = e.province.label + e.city.label + e.area.label
|
this.form.city = e.province.label + e.city.label + e.area.label
|
||||||
this.arrCode = [e.province.value, e.city.value, e.area.value]
|
this.arrCode = [e.province.value, e.city.value, e.area.value]
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.$refs.uForm.setRules(this.rules)
|
this.$refs.uForm.setRules(this.rules)
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '/static/css/quill.core.css';
|
@import '/static/css/quill.core.css';
|
||||||
@import '/static/css/quill.snow.css';
|
@import '/static/css/quill.snow.css';
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
// height: calc(100vh - 100rpx);
|
// height: calc(100vh - 100rpx);
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: url(../../static/bgi.png) no-repeat;
|
background: url(../../static/bgi.png) no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
padding: 52rpx 25rpx 34rpx;
|
padding: 52rpx 25rpx 34rpx;
|
||||||
|
|
||||||
.cro {
|
.cro {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 15px 15px 0 0;
|
border-radius: 15px 15px 0 0;
|
||||||
|
|
||||||
.img {
|
.img {
|
||||||
padding: 40rpx;
|
padding: 40rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
|
||||||
.u-image {
|
.u-image {
|
||||||
border-radius: 15px !important;
|
border-radius: 15px !important;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cro2 {
|
.cro2 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-top: 1px dashed #dedede;
|
border-top: 1px dashed #dedede;
|
||||||
@ -205,16 +413,19 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 0 0 15px 15px;
|
border-radius: 0 0 15px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cro3 {
|
.cro3 {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 40rpx;
|
padding: 40rpx;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
|
|
||||||
/deep/.uni-input-input {
|
/deep/.uni-input-input {
|
||||||
color: #666 !important;
|
color: #666 !important;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cro_left_top,
|
.cro_left_top,
|
||||||
.cro_right_top,
|
.cro_right_top,
|
||||||
.cro_left_bottom,
|
.cro_left_bottom,
|
||||||
@ -225,22 +436,26 @@ export default {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: #fc843f;
|
background-color: #fc843f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cro_left_top {
|
.cro_left_top {
|
||||||
top: -1px;
|
top: -1px;
|
||||||
left: -1px;
|
left: -1px;
|
||||||
border-radius: 0 0 10px 0;
|
border-radius: 0 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cro_right_top {
|
.cro_right_top {
|
||||||
top: -1px;
|
top: -1px;
|
||||||
right: -1px;
|
right: -1px;
|
||||||
background-color: #f99954;
|
background-color: #f99954;
|
||||||
border-radius: 0 0 0 10px;
|
border-radius: 0 0 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cro_left_bottom {
|
.cro_left_bottom {
|
||||||
left: -1px;
|
left: -1px;
|
||||||
bottom: -1px;
|
bottom: -1px;
|
||||||
border-radius: 0 10px 0 0;
|
border-radius: 0 10px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cro_right_bottom {
|
.cro_right_bottom {
|
||||||
right: -1px;
|
right: -1px;
|
||||||
bottom: -1px;
|
bottom: -1px;
|
||||||
@ -248,6 +463,7 @@ export default {
|
|||||||
border-radius: 10px 0 0 0;
|
border-radius: 10px 0 0 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-style {
|
.custom-style {
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
color: #fffefd;
|
color: #fffefd;
|
||||||
@ -255,10 +471,12 @@ export default {
|
|||||||
border-radius: 44px;
|
border-radius: 44px;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m_btn {
|
.m_btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.u-btn {
|
.u-btn {
|
||||||
background: #ff4900;
|
background: #ff4900;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
BIN
static/404.jpg
Normal file
BIN
static/404.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
unpackage/dist/build/h5/h5.zip
vendored
BIN
unpackage/dist/build/h5/h5.zip
vendored
Binary file not shown.
4
unpackage/dist/build/h5/index.html
vendored
4
unpackage/dist/build/h5/index.html
vendored
@ -1,2 +1,2 @@
|
|||||||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>金槐花</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>金淮花</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.3e73f18a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.31e9fb55.js></script><script src=/static/js/index.454792ad.js></script></body></html>
|
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.3e73f18a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.31e9fb55.js></script><script src=/static/js/index.a37068bc.js></script></body></html>
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-fillForm"],{"66f3":function(n,t,r){n.exports=r.p+"static/img/icon.e87c2f51.png"},"6ca8":function(n,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return e}));var e={uImage:r("be05").default},a=function(){var n=this,t=n.$createElement,r=n._self._c||t;return r("v-uni-view",{staticClass:"content"},[r("v-uni-view",{staticClass:"info"},[r("u-image",{attrs:{width:"203rpx",height:"184rpx",src:n.img}}),r("v-uni-view",{staticClass:"text"},[n._v("包裹已整装待发~")])],1)],1)},i=[]},"6fe1":function(n,t,r){"use strict";r.r(t);var e=r("6ca8"),a=r("be1e");for(var i in a)"default"!==i&&function(n){r.d(t,n,(function(){return a[n]}))}(i);r("9e16");var o,u=r("f0c5"),c=Object(u["a"])(a["default"],e["b"],e["c"],!1,null,"23352293",null,!1,e["a"],o);t["default"]=c.exports},"75b8":function(n,t,r){var e=r("d1f0");"string"===typeof e&&(e=[[n.i,e,""]]),e.locals&&(n.exports=e.locals);var a=r("4f06").default;a("4122e123",e,!0,{sourceMap:!1,shadowMode:!1})},"7d9a":function(n,t,r){"use strict";var e=r("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;r("9f42");var a=e(r("66f3")),i={data:function(){return{img:a.default}},methods:{}};t.default=i},"9e16":function(n,t,r){"use strict";var e=r("75b8"),a=r.n(e);a.a},be1e:function(n,t,r){"use strict";r.r(t);var e=r("7d9a"),a=r.n(e);for(var i in e)"default"!==i&&function(n){r.d(t,n,(function(){return e[n]}))}(i);t["default"]=a.a},d1f0:function(n,t,r){var e=r("24fb"),a=r("1de5"),i=r("9eee");t=e(!1);var o=a(i);t.push([n.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.content[data-v-23352293]{height:100vh;background:url('+o+") no-repeat;background-size:100% 100%;padding:%?52?% %?25?% %?34?%}.content .info[data-v-23352293]{height:100%;padding-top:%?206?%;background-color:#fff;border-radius:15px}.content .info .u-image[data-v-23352293]{margin:auto}.content .info .text[data-v-23352293]{margin-top:%?40?%;color:#666;text-align:center;font-size:%?30?%}",""]),n.exports=t}}]);
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user