9 changed files with 866 additions and 843 deletions
@ -1,4 +1,4 @@ |
|||||||
|
|
||||||
export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; |
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
|
||||||
// export const VUE_APP_API_URL = 'https://h5api.dayouqiantu.cn/api';
|
export const VUE_APP_API_URL = 'https://h5api.dayouqiantu.cn/api'; |
||||||
export const VUE_APP_RESOURCES_URL = 'https://h5.dayouqiantu.cn/static'; |
export const VUE_APP_RESOURCES_URL = 'https://h5.dayouqiantu.cn/static'; |
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,159 +1,156 @@ |
|||||||
<template> |
<template> |
||||||
<view class="OrderCancellation"> |
<view class="OrderCancellation"> |
||||||
<view class="header"></view> |
<view class="header"></view> |
||||||
<view class="whiteBg"> |
<view class="whiteBg"> |
||||||
<view class="input"> |
<view class="input"> |
||||||
<input type="number" placeholder="0" v-model="verify_code" /> |
<input type="number" placeholder="0" v-model="verify_code" /> |
||||||
</view> |
</view> |
||||||
<view class="bnt" @click="storeCancellation">立即核销</view> |
<view class="bnt" @click="storeCancellation">立即核销</view> |
||||||
</view> |
</view> |
||||||
<view class="scan" v-if="iswechat"> |
<view class="scan" v-if="iswechat"> |
||||||
<image src="@/static/images/scan.gif" @click="openQRCode" /> |
<image src="@/static/images/scan.gif" @click="openQRCode" /> |
||||||
</view> |
</view> |
||||||
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff> |
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff> |
||||||
</view> |
</view> |
||||||
</template> |
</template> |
||||||
<style scoped lang="less"> |
<style scoped lang="less"> |
||||||
.OrderCancellation .header { |
.OrderCancellation .header { |
||||||
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat; |
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") |
||||||
width: 100%; |
no-repeat; |
||||||
height: 3*100rpx; |
width: 100%; |
||||||
background-size: 100% 100%; |
height: 3 * 100rpx; |
||||||
} |
background-size: 100% 100%; |
||||||
|
} |
||||||
|
|
||||||
.OrderCancellation .whiteBg { |
.OrderCancellation .whiteBg { |
||||||
width: 6.9*100rpx; |
width: 6.9 * 100rpx; |
||||||
background-color: #fff; |
background-color: #fff; |
||||||
margin: -0.93*100rpx auto 0 auto; |
margin: -0.93 * 100rpx auto 0 auto; |
||||||
padding-top: 0.8*100rpx; |
padding-top: 0.8 * 100rpx; |
||||||
border-radius: 0.06*100rpx 0.06*100rpx 0 0; |
border-radius: 0.06 * 100rpx 0.06 * 100rpx 0 0; |
||||||
} |
} |
||||||
|
|
||||||
.OrderCancellation .whiteBg .input { |
.OrderCancellation .whiteBg .input { |
||||||
width: 5.8*100rpx; |
width: 5.8 * 100rpx; |
||||||
margin: 0 auto; |
margin: 0 auto; |
||||||
border-bottom: 0.01*100rpx solid #eee; |
border-bottom: 0.01 * 100rpx solid #eee; |
||||||
} |
} |
||||||
|
|
||||||
.OrderCancellation .whiteBg .input input { |
.OrderCancellation .whiteBg .input input { |
||||||
padding-bottom: 0.25*100rpx; |
padding-bottom: 0.25 * 100rpx; |
||||||
font-size: 0.6*100rpx; |
font-size: 0.6 * 100rpx; |
||||||
color: #282828; |
color: #282828; |
||||||
width: 100%; |
width: 100%; |
||||||
text-align: center; |
text-align: center; |
||||||
} |
} |
||||||
|
|
||||||
.OrderCancellation .whiteBg .bnt { |
.OrderCancellation .whiteBg .bnt { |
||||||
font-size: 0.32*100rpx; |
font-size: 0.32 * 100rpx; |
||||||
color: #fff; |
color: #fff; |
||||||
width: 5.8*100rpx; |
width: 5.8 * 100rpx; |
||||||
height: 0.86*100rpx; |
height: 0.86 * 100rpx; |
||||||
border-radius: 0.43*100rpx; |
border-radius: 0.43 * 100rpx; |
||||||
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||||
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||||
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||||
text-align: center; |
text-align: center; |
||||||
line-height: 0.86*100rpx; |
line-height: 0.86 * 100rpx; |
||||||
margin: 0.55*100rpx auto 0 auto; |
margin: 0.55 * 100rpx auto 0 auto; |
||||||
} |
} |
||||||
|
|
||||||
.OrderCancellation .scan { |
.OrderCancellation .scan { |
||||||
width: 3*100rpx; |
width: 3 * 100rpx; |
||||||
height: 3*100rpx; |
height: 3 * 100rpx; |
||||||
margin: 1.1*100rpx auto 0 auto; |
margin: 1.1 * 100rpx auto 0 auto; |
||||||
} |
} |
||||||
|
|
||||||
.OrderCancellation .scan image { |
.OrderCancellation .scan image { |
||||||
width: 100%; |
width: 100%; |
||||||
height: 100%; |
height: 100%; |
||||||
display: block; |
display: block; |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
<script> |
<script> |
||||||
import WriteOff from "@/components/WriteOff"; |
import WriteOff from "@/components/WriteOff"; |
||||||
import { |
import { isWeixin } from "@/utils"; |
||||||
isWeixin |
// import { wechatEvevt } from "@/libs/wechat"; |
||||||
} from "@/utils"; |
import { orderVerific } from "@/api/order"; |
||||||
// import { wechatEvevt } from "@/libs/wechat"; |
const NAME = "OrderCancellation"; |
||||||
import { |
|
||||||
orderVerific |
|
||||||
} from "@/api/order"; |
|
||||||
const NAME = "OrderCancellation"; |
|
||||||
|
|
||||||
export default { |
export default { |
||||||
name: NAME, |
name: NAME, |
||||||
components: { |
components: { |
||||||
WriteOff |
WriteOff |
||||||
}, |
}, |
||||||
props: {}, |
props: {}, |
||||||
data: function() { |
data: function() { |
||||||
return { |
return { |
||||||
iShidden: true, |
iShidden: true, |
||||||
iswechat: isWeixin(), |
iswechat: isWeixin(), |
||||||
orderInfo: {}, |
orderInfo: {}, |
||||||
verify_code: "" |
verify_code: "" |
||||||
}; |
}; |
||||||
}, |
}, |
||||||
mounted: function() {}, |
mounted: function() {}, |
||||||
methods: { |
methods: { |
||||||
cancel: function(res) { |
cancel: function(res) { |
||||||
this.iShidden = res; |
this.iShidden = res; |
||||||
}, |
}, |
||||||
confirm: function() { |
confirm: function() { |
||||||
orderVerific(this.verify_code, 1) |
orderVerific(this.verify_code, 1) |
||||||
.then(res => { |
.then(res => { |
||||||
this.iShidden = true; |
this.iShidden = true; |
||||||
this.verify_code = ""; |
this.verify_code = ""; |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: res.msg, |
title: res.msg, |
||||||
icon: 'none', |
icon: "none", |
||||||
duration: 2000 |
duration: 2000 |
||||||
}); |
}); |
||||||
}) |
}) |
||||||
.catch(err => { |
.catch(err => { |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: err.msg || err.response.data.msg|| err.response.data.message, |
title: |
||||||
icon: 'none', |
err.msg || err.response.data.msg || err.response.data.message, |
||||||
duration: 2000 |
icon: "none", |
||||||
}); |
duration: 2000 |
||||||
|
}); |
||||||
}); |
}); |
||||||
}, |
}, |
||||||
storeCancellation: function() { |
storeCancellation: function() { |
||||||
let ref = /[0-9]{12}/; |
let ref = /[0-9]{12}/; |
||||||
if (!this.verify_code) { |
if (!this.verify_code) { |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: "请输入核销码", |
title: "请输入核销码", |
||||||
icon: 'none', |
icon: "none", |
||||||
duration: 2000 |
duration: 2000 |
||||||
}); |
}); |
||||||
return |
return; |
||||||
} |
} |
||||||
if (!ref.test(this.verify_code)) { |
if (!ref.test(this.verify_code)) { |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: "请输入正确的核销码", |
title: "请输入正确的核销码", |
||||||
icon: 'none', |
icon: "none", |
||||||
duration: 2000 |
duration: 2000 |
||||||
}); |
}); |
||||||
return |
return; |
||||||
} |
} |
||||||
uni.showLoading({ |
uni.showLoading({ |
||||||
title: "查询中" |
title: "查询中" |
||||||
}); |
}); |
||||||
orderVerific(this.verify_code, 0) |
orderVerific(this.verify_code, 0) |
||||||
.then(res => { |
.then(res => { |
||||||
uni.hideLoading(); |
uni.hideLoading(); |
||||||
this.orderInfo = res.data; |
this.orderInfo = res.data; |
||||||
this.iShidden = false; |
this.iShidden = false; |
||||||
}) |
}) |
||||||
.catch(() => { |
.catch(() => { |
||||||
uni.hideLoading(); |
uni.hideLoading(); |
||||||
}); |
}); |
||||||
}, |
}, |
||||||
openQRCode: function() { |
openQRCode: function() { |
||||||
let that = this; |
let that = this; |
||||||
// 这里需要调用扫码功能 |
// 这里需要调用扫码功能 |
||||||
} |
} |
||||||
} |
} |
||||||
}; |
}; |
||||||
</script> |
</script> |
||||||
|
Loading…
Reference in new issue