添加提货功能切分支
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
|
||||
})
|
||||
}
|
||||
// 获取快递单号 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
|
||||
},
|
||||
"h5" : {
|
||||
"title" : "金槐花",
|
||||
"title" : "金淮花",
|
||||
"domain" : "golden.shangqie.cn",
|
||||
"router" : {
|
||||
"mode" : "history"
|
||||
|
15
pages.json
15
pages.json
@ -6,7 +6,7 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金槐花提货卡",
|
||||
"navigationBarTitleText": "金淮花提货卡",
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"titleNView": false
|
||||
@ -23,10 +23,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
,{
|
||||
"path" : "pages/index/check",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "金槐花提货卡",
|
||||
"navigationBarTitleText": "金淮花提货卡",
|
||||
"navigationBarBackgroundColor": "#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,271 +1,489 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="info">
|
||||
<div class="cro">
|
||||
<div class="cro_left_bottom"></div>
|
||||
<div class="cro_right_bottom"></div>
|
||||
<view class="img">
|
||||
<u-image width="100%" height="580rpx" :src="info.pic"></u-image>
|
||||
<view class="" style="font-size: 36rpx;color: #333333;margin-top: 40rpx;">{{ info.name }}</view>
|
||||
</view>
|
||||
</div>
|
||||
<div class="cro cro2">
|
||||
<div class="cro_left_top"></div>
|
||||
<div class="cro_right_top"></div>
|
||||
<view class="u-content ql-editor img"><u-parse :html="info.note"></u-parse></view>
|
||||
</div>
|
||||
<div class="cro3">
|
||||
<!-- :error-type="['border-bottom']" -->
|
||||
<u-form :model="form" ref="uForm" 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="name"><u-input v-model="form.name" placeholder="请填写收货人姓名" /></u-form-item>
|
||||
<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-input placeholder="请输入验证码" v-model="form.code" type="text"></u-input>
|
||||
<view slot="right" @click="getCode" style="color: #F09B38;">{{ codeTips }}</view>
|
||||
</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-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-verification-code seconds="60" ref="uCode" @change="codeChange"></u-verification-code>
|
||||
</div>
|
||||
<view class="content">
|
||||
<view class="info">
|
||||
<view class="cro">
|
||||
<view class="cro_left_bottom"></view>
|
||||
<view class="cro_right_bottom"></view>
|
||||
<view class="img">
|
||||
<u-image
|
||||
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>
|
||||
<view class="cro cro2">
|
||||
<view class="cro_left_top"></view>
|
||||
<view class="cro_right_top"></view>
|
||||
<view class="u-content ql-editor img">
|
||||
<u-parse :html="info.note"></u-parse>
|
||||
</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']" -->
|
||||
<u-form
|
||||
:model="form"
|
||||
ref="uForm"
|
||||
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-input placeholder="请输入验证码" v-model="form.code" type="text"></u-input>
|
||||
<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>
|
||||
<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-verification-code seconds="60" ref="uCode" @change="codeChange"></u-verification-code>
|
||||
</view>
|
||||
<view class="cro3" v-show="current == 1">
|
||||
<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
|
||||
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>
|
||||
<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>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
options: {},
|
||||
form: {
|
||||
name: '',
|
||||
phone: '',
|
||||
city: '',
|
||||
details: '',
|
||||
address: ''
|
||||
components: {
|
||||
codePic,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
name: '提货',
|
||||
},
|
||||
{
|
||||
name: '查询',
|
||||
},
|
||||
],
|
||||
current: 0,
|
||||
info: {},
|
||||
options: {},
|
||||
form: {
|
||||
otherName: '',
|
||||
phone: '',
|
||||
city: '',
|
||||
details: '',
|
||||
address: '',
|
||||
otherPhone: '',
|
||||
},
|
||||
checkForm: {
|
||||
phone: '',
|
||||
},
|
||||
show: false,
|
||||
show2: false,
|
||||
handleShow:{
|
||||
hidden:false,
|
||||
message:''
|
||||
},
|
||||
show: false,
|
||||
show2: false,
|
||||
message: '',
|
||||
arrCode: [],
|
||||
radio: '',
|
||||
switchVal: false,
|
||||
codeTips: '',
|
||||
rules: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入姓名',
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
min: 11,
|
||||
message: '请输入正确的手机号',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入验证码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
city: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入验证码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
details: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入详细地址',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (!options.id) return this.$u.toast('请扫描二维码访问')
|
||||
// uni.$showMsg('请扫描二维码访问')
|
||||
this.options = options
|
||||
getInfo(options).then(({ data }) => {
|
||||
this.info = data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.$refs.uForm.validate(valid => {
|
||||
if (valid) {
|
||||
console.log('验证通过')
|
||||
this.form.address = this.form.city + this.form.details
|
||||
this.form.activityId = this.options.id
|
||||
addOrder(this.form)
|
||||
.then(({ code, message }) => {
|
||||
if (code != 200) {
|
||||
this.show2 = true
|
||||
this.message = message
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/fillForm'
|
||||
showModal:false,
|
||||
message: '',
|
||||
arrCode: [],
|
||||
radio: '',
|
||||
switchVal: false,
|
||||
codeTips: '',
|
||||
codeTips2: '',
|
||||
logistics:{},
|
||||
rules: {
|
||||
otherName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入收货姓名',
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
min: 11,
|
||||
message: '请输入正确的手机号',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入验证码',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
city: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入验证码',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
details: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入详细地址',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (!options.id) return this.$u.toast('请扫描二维码访问')
|
||||
// uni.$showMsg('请扫描二维码访问')
|
||||
this.options = options
|
||||
getInfo(options).then(({ data }) => {
|
||||
data.pic = data.pic.split(',')
|
||||
this.info = data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 切换tab
|
||||
changeTabs(index) {
|
||||
this.current = index
|
||||
},
|
||||
// 提货提交
|
||||
submit() {
|
||||
this.$refs.uForm.validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.form)
|
||||
console.log('验证通过')
|
||||
this.form.address = this.form.city + this.form.details
|
||||
this.form.activityId = this.options.id
|
||||
addOrder(this.form)
|
||||
.then(({ code, message }) => {
|
||||
if (code != 200) {
|
||||
this.show2 = true
|
||||
this.message = message
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/fillForm',
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
} else {
|
||||
console.log('验证失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
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'
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
} else {
|
||||
console.log('验证失败')
|
||||
}
|
||||
},
|
||||
error:(e)=>{
|
||||
uni.showToast({
|
||||
title: e,
|
||||
icon: 'none',
|
||||
duration:3000,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
codeChange(text) {
|
||||
this.codeTips = text
|
||||
},
|
||||
// 获取验证码
|
||||
getCode() {
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
if (this.form.phone.length !== 11) return
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
mask: true
|
||||
})
|
||||
getCode({ phone: this.form.phone, activityId: this.options.id }).then(({ code, data, message }) => {
|
||||
if (code != 200) {
|
||||
this.show2 = true
|
||||
this.message = message
|
||||
return
|
||||
}
|
||||
this.form.unit = data.unit
|
||||
this.form.id = data.id
|
||||
uni.hideLoading()
|
||||
this.$u.toast('验证码已发送')
|
||||
this.$refs.uCode.start()
|
||||
})
|
||||
} else {
|
||||
this.$u.toast('倒计时结束后再发送')
|
||||
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
|
||||
// })
|
||||
}
|
||||
},
|
||||
change(e) {
|
||||
this.form.city = e.province.label + e.city.label + e.area.label
|
||||
this.arrCode = [e.province.value, e.city.value, e.area.value]
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules)
|
||||
}
|
||||
window.location.href = url + id
|
||||
},
|
||||
codeChange(text) {
|
||||
this.codeTips = text
|
||||
},
|
||||
codeChange2(text) {
|
||||
this.codeTips2 = text
|
||||
},
|
||||
// 获取提货验证码
|
||||
getCode() {
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
if (this.form.phone.length !== 11) return
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
mask: true,
|
||||
})
|
||||
getCode({
|
||||
phone: this.form.phone,
|
||||
activityId: this.options.id,
|
||||
unit: this.info.unit,
|
||||
}).then(({ code, data, message }) => {
|
||||
if (code != 200) {
|
||||
this.show2 = true
|
||||
this.message = message
|
||||
return
|
||||
}
|
||||
this.form.unit = data.unit
|
||||
this.form.id = data.id
|
||||
this.form.otherPhone = data.phone
|
||||
this.form.otherName = data.name
|
||||
uni.hideLoading()
|
||||
this.$u.toast('验证码已发送')
|
||||
this.$refs.uCode.start()
|
||||
})
|
||||
} else {
|
||||
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) {
|
||||
this.form.city = e.province.label + e.city.label + e.area.label
|
||||
this.arrCode = [e.province.value, e.city.value, e.area.value]
|
||||
},
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '/static/css/quill.core.css';
|
||||
@import '/static/css/quill.snow.css';
|
||||
|
||||
.content {
|
||||
// height: calc(100vh - 100rpx);
|
||||
height: 100vh;
|
||||
background: url(../../static/bgi.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
overflow: auto;
|
||||
.info {
|
||||
padding: 52rpx 25rpx 34rpx;
|
||||
.cro {
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
border-radius: 15px 15px 0 0;
|
||||
.img {
|
||||
padding: 40rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
.u-image {
|
||||
border-radius: 15px !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cro2 {
|
||||
width: 100%;
|
||||
border-top: 1px dashed #dedede;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
border-radius: 0 0 15px 15px;
|
||||
}
|
||||
.cro3 {
|
||||
margin-top: 15px;
|
||||
background-color: #ffffff;
|
||||
padding: 40rpx;
|
||||
border-radius: 15px;
|
||||
/deep/.uni-input-input {
|
||||
color: #666 !important;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
.cro_left_top,
|
||||
.cro_right_top,
|
||||
.cro_left_bottom,
|
||||
.cro_right_bottom {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
z-index: 1;
|
||||
background-color: #fc843f;
|
||||
}
|
||||
.cro_left_top {
|
||||
top: -1px;
|
||||
left: -1px;
|
||||
border-radius: 0 0 10px 0;
|
||||
}
|
||||
.cro_right_top {
|
||||
top: -1px;
|
||||
right: -1px;
|
||||
background-color: #f99954;
|
||||
border-radius: 0 0 0 10px;
|
||||
}
|
||||
.cro_left_bottom {
|
||||
left: -1px;
|
||||
bottom: -1px;
|
||||
border-radius: 0 10px 0 0;
|
||||
}
|
||||
.cro_right_bottom {
|
||||
right: -1px;
|
||||
bottom: -1px;
|
||||
background-color: #f99954;
|
||||
border-radius: 10px 0 0 0;
|
||||
}
|
||||
}
|
||||
.custom-style {
|
||||
height: 88rpx;
|
||||
color: #fffefd;
|
||||
background: #f09b38;
|
||||
border-radius: 44px;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.m_btn {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
.u-btn {
|
||||
background: #ff4900;
|
||||
border-radius: 0;
|
||||
height: 100rpx;
|
||||
font-size: 36rpx;
|
||||
color: #fffefd;
|
||||
}
|
||||
}
|
||||
// height: calc(100vh - 100rpx);
|
||||
height: 100vh;
|
||||
background: url(../../static/bgi.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
overflow: auto;
|
||||
|
||||
.info {
|
||||
padding: 52rpx 25rpx 34rpx;
|
||||
|
||||
.cro {
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
border-radius: 15px 15px 0 0;
|
||||
|
||||
.img {
|
||||
padding: 40rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
|
||||
.u-image {
|
||||
border-radius: 15px !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cro2 {
|
||||
width: 100%;
|
||||
border-top: 1px dashed #dedede;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
border-radius: 0 0 15px 15px;
|
||||
}
|
||||
|
||||
.cro3 {
|
||||
margin-top: 15px;
|
||||
background-color: #ffffff;
|
||||
padding: 40rpx;
|
||||
border-radius: 15px;
|
||||
|
||||
/deep/.uni-input-input {
|
||||
color: #666 !important;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cro_left_top,
|
||||
.cro_right_top,
|
||||
.cro_left_bottom,
|
||||
.cro_right_bottom {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
z-index: 1;
|
||||
background-color: #fc843f;
|
||||
}
|
||||
|
||||
.cro_left_top {
|
||||
top: -1px;
|
||||
left: -1px;
|
||||
border-radius: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.cro_right_top {
|
||||
top: -1px;
|
||||
right: -1px;
|
||||
background-color: #f99954;
|
||||
border-radius: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.cro_left_bottom {
|
||||
left: -1px;
|
||||
bottom: -1px;
|
||||
border-radius: 0 10px 0 0;
|
||||
}
|
||||
|
||||
.cro_right_bottom {
|
||||
right: -1px;
|
||||
bottom: -1px;
|
||||
background-color: #f99954;
|
||||
border-radius: 10px 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-style {
|
||||
height: 88rpx;
|
||||
color: #fffefd;
|
||||
background: #f09b38;
|
||||
border-radius: 44px;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.m_btn {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
|
||||
.u-btn {
|
||||
background: #ff4900;
|
||||
border-radius: 0;
|
||||
height: 100rpx;
|
||||
font-size: 36rpx;
|
||||
color: #fffefd;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
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)'))
|
||||
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>
|
||||
<!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.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