Commit 5a142f17 authored by zhuang_cong's avatar zhuang_cong

Merge branch 'dev' of https://gitlab.33.cn/yimu/h5-front into dev

parents c6874dc8 17f34494
...@@ -18,7 +18,6 @@ class MFetch { ...@@ -18,7 +18,6 @@ class MFetch {
console.info('better alert better experience~') console.info('better alert better experience~')
alertServerErrMsg = window.alert alertServerErrMsg = window.alert
} }
this.apiConfig = apiConfig this.apiConfig = apiConfig
this.verify = verify this.verify = verify
this.alertServerErrMsg = alertServerErrMsg this.alertServerErrMsg = alertServerErrMsg
...@@ -41,7 +40,12 @@ class MFetch { ...@@ -41,7 +40,12 @@ class MFetch {
let error = new Error('clearAdminInfo') let error = new Error('clearAdminInfo')
throw error throw error
} else { } else {
let error = new Error(response.statusText) let error
if(response.data.message==="repetitive_operation_fail"){
error = new Error("请勿重复操作!")
}else{
error = new Error(response.statusText)
}
error.response = response error.response = response
throw error throw error
} }
...@@ -67,8 +71,9 @@ class MFetch { ...@@ -67,8 +71,9 @@ class MFetch {
requireAuth = true, requireAuth = true,
isUpload = false, isUpload = false,
onUploadProgress, onUploadProgress,
header={}
} = config } = config
if (!type || !this.httpMap[type]) { if (!type || !this.httpMap[type]) {
type = 'root' type = 'root'
} }
...@@ -87,7 +92,8 @@ class MFetch { ...@@ -87,7 +92,8 @@ class MFetch {
'ip': '0.0.0.0', 'ip': '0.0.0.0',
'version': '1.0.0', 'version': '1.0.0',
'platform': 'chrome', 'platform': 'chrome',
'type': 2 'type': 2,
...header
} }
if (isUpload) { if (isUpload) {
headers['Content-Type'] = 'multipart/form-data' headers['Content-Type'] = 'multipart/form-data'
...@@ -110,7 +116,7 @@ class MFetch { ...@@ -110,7 +116,7 @@ class MFetch {
if (isUpload && onUploadProgress) { if (isUpload && onUploadProgress) {
requestConfig.onUploadProgress = onUploadProgress requestConfig.onUploadProgress = onUploadProgress
} }
return this.httpMap[type].request(requestConfig).then(this.checkStatus) return this.httpMap[type].request(requestConfig).then(this.checkStatus)
.then(res => { .then(res => {
complete && complete() complete && complete()
......
...@@ -240,4 +240,7 @@ export const getTransferOrderList = { ...@@ -240,4 +240,7 @@ export const getTransferOrderList = {
// 转让商品订单详情 // 转让商品订单详情
export const getTransferOrderDetail = { export const getTransferOrderDetail = {
} }
\ No newline at end of file export const getCreatApiToken = {
url:"/apiToken/creatApiToken"
}
export const AssetsRecordType = { export const AssetsRecordType = {
ALIPAY_IN: 1, // ALIPAY_IN: 1,
ALIPAY_OUT: 2, // ALIPAY_OUT: 2,
WX_IN: 3, // WX_IN: 3,
WX_OUT: 4, // WX_OUT: 4,
COIN_IN: 5, // COIN_IN: 5,
COIN_OUT: 6, // COIN_OUT: 6,
RECHARGE: 7, // RECHARGE: 7,
WITHDRAW_CASH: 8, // WITHDRAW_CASH: 8,
PAY: 9, // PAY: 9,
REFUND: 10, // REFUND: 10,
SALE: 11, // SALE: 11,
RELEASE: 12, // RELEASE: 12,
ADD_RELEASE: 13, // ADD_RELEASE: 13,
RECOVERY: 14, // RECOVERY: 14,
REDUCE_RELEASE: 15, // REDUCE_RELEASE: 15,
WITHDRAW_COIN: 16, // WITHDRAW_COIN: 16,
DEDUCTION: 17, // DEDUCTION: 17,
WITHDRAW_GOODS: 18, // WITHDRAW_GOODS: 18,
// COMMENT_REWARD: 19,
// TRANSFER_GIFT_IN: 20,
// TRANSFER_GIFT_OUT: 21,
// INVITE_REGISTER_REWARD: 22,
// REGISTER_REWARD: 23
INTEGRAL_RECHARGE: 7,
INTEGRAL_BUY: 9,
REFUND_MONEY: 10,
GOODS_BUY: 11,
ISSUE:12,
INTEGRAL_DEDUCTION: 17,
GOODS_WITHDRAW: 18,
COMMENT_REWARD: 19, COMMENT_REWARD: 19,
TRANSFER_GIFT_IN: 20, TRANSFER_GIFT_IN: 20,
TRANSFER_GIFT_OUT: 21, TRANSFER_GIFT_OUT: 21,
INVITE_REGISTER_REWARD: 22, REGISTER_REWARD: 22,
REGISTER_REWARD: 23 OUT_TOKEN_IN: 23,
OUT_NFT_IN: 24,
TRANSFER_RAW_OUT: 25,
REFUND_GOODS: 26,
REGISTER_INVITE_REWARD: 27,
RELEASE_TRANSFER: 28,
REFUND_MONEY_COIN: 29,
ORDER_CANCEL_INTEGRAL_UNFREEZE: 30
} }
export const AssetsRecordTypeObj = { export const AssetsRecordTypeObj = {
[AssetsRecordType.ALIPAY_IN]: {
label: "支付宝", [AssetsRecordType.INTEGRAL_RECHARGE]: {
symbol: "+"
},
[AssetsRecordType.ALIPAY_OUT]: {
label: "支付宝",
symbol: "+"
},
[AssetsRecordType.WX_IN]: {
label: "微信支付",
symbol: "+"
},
[AssetsRecordType.WX_OUT]: {
label: "微信支付",
symbol: "-"
},
[AssetsRecordType.COIN_IN]: {
label: "数字资产转入",
symbol: "+"
},
[AssetsRecordType.COIN_OUT]: {
label: "数字资产转出",
symbol: "-"
},
[AssetsRecordType.RECHARGE]: {
label: "充值", label: "充值",
symbol: "+" symbol: "+"
}, },
[AssetsRecordType.WITHDRAW_CASH]: { [AssetsRecordType.INTEGRAL_BUY]: {
label: "提现", label: "购买",
symbol: "-" symbol: "-"
}, },
[AssetsRecordType.PAY]: { [AssetsRecordType.REFUND_MONEY]: {
label: "支付",
symbol: "-"
},
[AssetsRecordType.REFUND]: {
label: "退款", label: "退款",
symbol: "+" symbol: "+"
}, },
[AssetsRecordType.SALE]: { [AssetsRecordType.GOODS_BUY]: {
label: "销售", label: "购买",
symbol: "+" symbol: "+"
}, },
[AssetsRecordType.RELEASE]: { [AssetsRecordType.ISSUE]: {
label: "发行", label: "发行",
symbol: "+" symbol: "+"
}, },
[AssetsRecordType.ADD_RELEASE]: { [AssetsRecordType.INTEGRAL_DEDUCTION]: {
label: "增发",
symbol: "+"
},
[AssetsRecordType.RECOVERY]: {
label: "回收",
symbol: "-"
},
[AssetsRecordType.REDUCE_RELEASE]: {
label: "减发",
symbol: "-"
},
[AssetsRecordType.WITHDRAW_COIN]: {
label: "提币",
symbol: "-"
},
[AssetsRecordType.DEDUCTION]: {
label: "扣除", label: "扣除",
symbol: "-" symbol: "-"
}, },
[AssetsRecordType.WITHDRAW_GOODS]: { [AssetsRecordType.GOODS_WITHDRAW]: {
label: "提货", label: "提货",
symbol: "-" symbol: "-"
}, },
...@@ -109,14 +85,42 @@ export const AssetsRecordTypeObj = { ...@@ -109,14 +85,42 @@ export const AssetsRecordTypeObj = {
label: "转赠", label: "转赠",
symbol: "-" symbol: "-"
}, },
[AssetsRecordType.INVITE_REGISTER_REWARD]: {
label: "邀请注册奖励",
symbol: "+"
},
[AssetsRecordType.REGISTER_REWARD]: { [AssetsRecordType.REGISTER_REWARD]: {
label: "注册奖励", label: "注册奖励",
symbol: "+" symbol: "+"
}, },
[AssetsRecordType.OUT_TOKEN_IN]: {
label: "外部Token转入",
symbol: "+"
},
[AssetsRecordType.OUT_NFT_IN]: {
label: "外部NFT转入",
symbol: "+"
},
[AssetsRecordType.TRANSFER_RAW_OUT]: {
label: "外部划转",
symbol: "-"
},
[AssetsRecordType.REFUND_GOODS]: {
label: "退货",
symbol: "+"
},
[AssetsRecordType.REGISTER_INVITE_REWARD]: {
label: "邀请奖励",
symbol: "+"
},
[AssetsRecordType.RELEASE_TRANSFER]: {
label: "发布转让",
symbol: "-"
},
[AssetsRecordType.REFUND_MONEY_COIN]: {
label: "退款",
symbol: "-"
},
[AssetsRecordType.ORDER_CANCEL_INTEGRAL_UNFREEZE]: {
label: "抵扣退回",
symbol: "+"
}
} }
export const TransferType = { export const TransferType = {
......
...@@ -80,6 +80,39 @@ Vue.mixin({ ...@@ -80,6 +80,39 @@ Vue.mixin({
c.destroy() c.destroy()
}) })
}, },
getVideoBase64(url,width=400,height=240) {
// url="http://localhost:8080/f5f7c8e13cd6f11ef8eed12ea93a642c.MP4"
return new Promise(function (resolve, reject) {
let dataURL=""
// 在缓存中创建video标签
var video = document.createElement("video")
// video.setAttribute('crossOrigin', 'anonymous');//处理跨域
// video.setAttribute('useCORS', true);//处理跨域
video.setAttribute('src', url);
// 再添加一个静音的属性,否则自动播放会有声音
// video.setAttribute('muted', 'muted')
// 通过setAttribute给video dom元素添加自动播放的属性,因为视频播放才
// video.setAttribute('autoplay', 'autoplay')
video.setAttribute('width', width);
video.setAttribute('height', height);
video.setAttribute('controls','controls')
// document.body.appendChild(video)
// // video注册canplay自动播放事件
video.addEventListener('loadeddata', function() {
let canvas = document.createElement("canvas"),
width = video.width, //canvas的尺寸和图片一样
height = video.height;
canvas.width = width;
canvas.height = height;
canvas.getContext("2d").drawImage(video, 0, 0, width, height); //绘制canvas
dataURL = canvas.toDataURL('image/jpeg'); //转换为base64
video.remove()
canvas.remove()
console.log(dataURL)
resolve(dataURL);
});
})
}
}, },
filters: { filters: {
timeFilter(val) { timeFilter(val) {
......
...@@ -2,8 +2,8 @@ import { ...@@ -2,8 +2,8 @@ import {
OrderStatus, OrderStatus,
OrderType, OrderType,
CommentStatus CommentStatus
} from "@/enums"; } from "@/enums"
import bus from "@/utils/bus"
export const OrderMixin = { export const OrderMixin = {
computed: { computed: {
btnList() { btnList() {
...@@ -92,18 +92,39 @@ export const OrderMixin = { ...@@ -92,18 +92,39 @@ export const OrderMixin = {
// return this.commBtn ? [this.commBtn].concat(arr) : arr // return this.commBtn ? [this.commBtn].concat(arr) : arr
return arr return arr
}, },
handleCancelOrder() { async handleCancelOrder() {
let apiToken=await this.getApiToken()
if(apiToken){
this.$api({
apiName: "cancelOrder",
header:{
"apiToken":apiToken
},
postData: this.data.payId,
success: () => {
this.data.orderState = OrderStatus.CLOSE;
bus.$emit("changeState", this.data);
},
complete: () => {
this.$hideLoading();
},
});
}else{
this.$hideLoading();
}
},
getApiToken(){
this.$showLoading(); this.$showLoading();
this.$api({ return new Promise(reslove=>{
apiName: "cancelOrder", this.$api({
postData: this.data.payId, apiName:"getCreatApiToken",
success: () => { success:(res)=>{
this.data.orderState = OrderStatus.CLOSE; reslove(res)
}, }
complete: () => { })
this.$hideLoading(); })
},
});
}, },
handleCancelRefund() { handleCancelRefund() {
this.$showLoading(); this.$showLoading();
...@@ -112,6 +133,7 @@ export const OrderMixin = { ...@@ -112,6 +133,7 @@ export const OrderMixin = {
postData: this.data.oid, postData: this.data.oid,
success: () => { success: () => {
this.data.orderState = OrderStatus.SUCCESS; this.data.orderState = OrderStatus.SUCCESS;
bus.$emit("changeState", this.data);
}, },
complete: () => { complete: () => {
this.$hideLoading(); this.$hideLoading();
......
import Vue from 'vue'
const bus = new Vue()
export default bus
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
<div class="header"> <div class="header">
商品详情 商品详情
</div> </div>
<div class="detail" v-html="data && data.detail"></div> <div class="detail" v-html="data&&data.detail" v-finishHtml></div>
</div> </div>
<van-popup v-model="showPopup" position="bottom" round closeable> <van-popup v-model="showPopup" position="bottom" round closeable>
<div class="blind-rule"> <div class="blind-rule">
<div class="title">规则说明</div> <div class="title">规则说明</div>
<div class="content" v-html="data && data.blindBoxRule"></div> <div class="content" v-html="data &&data.blindBoxRule" v-finishHtml></div>
</div> </div>
</van-popup> </van-popup>
</div> </div>
...@@ -46,6 +46,18 @@ ...@@ -46,6 +46,18 @@
<script> <script>
export default { export default {
directives:{
finishHtml:{
update(el) {
let children=el.childNodes
for(let item of children){
if(item.style.paddingLeft!=='10px'){
item.style.padding="0 10px"
}
}
}
},
},
props: { props: {
data: { data: {
type: Object, type: Object,
...@@ -62,7 +74,7 @@ export default { ...@@ -62,7 +74,7 @@ export default {
methods: { methods: {
handleRule() { handleRule() {
this.showPopup = true this.showPopup = true
} },
}, },
}; };
</script> </script>
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
.video-play-icon { .video-play-icon {
position: absolute; position: absolute;
top: 50%; top: calc(~"50% - 38px");
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<div class="blind-sku-scroll"> <div class="blind-sku-scroll">
<div class="blind-sku-scroll-box flex-default"> <div class="blind-sku-scroll-box flex-default">
<div class="blind-card" v-for="(prop, index) in skus" :key="index" @click="showDetail(prop)"> <div class="blind-card" v-for="(prop, index) in skus" :key="index" @click="showDetail(prop)">
<img class="thumb" :src="prop.thumb" alt=""/> <img class="thumb" :src="prop.thumb" alt=""/>
<div class="name">{{prop.name}}</div> <div class="name">{{prop.skuProps?prop.skuProps[0].propVal:" "}}</div>
<div class="num">丨限量{{prop.circulation}}份丨</div> <div class="num">丨限量{{prop.circulation}}份丨</div>
<img src="@/assets/img/hide-box.png" class="hide-box" alt="" v-show="prop.isHide" > <img src="@/assets/img/hide-box.png" class="hide-box" alt="" v-show="prop.isHide" >
</div> </div>
</div> </div>
</div> </div>
<div class="blind-buy"> <div class="blind-buy">
...@@ -15,15 +15,22 @@ ...@@ -15,15 +15,22 @@
<img v-else src="@/assets/img/sell-out.png" class="buy-btn" alt=""> <img v-else src="@/assets/img/sell-out.png" class="buy-btn" alt="">
</div> </div>
<van-popup v-model="showPopup" round > <van-popup v-model="showPopup" round >
<div class="blind-large-card"> <div class="blind-large-con">
<img class="thumb" :src="selectBlind.thumb" alt="" /> <div class="blind-large-card">
<div class="name">{{selectBlind.name}}</div> <img class="thumb" :src="selectBlind.thumb" alt="" />
<div class="num">丨限量{{selectBlind.circulation}}份丨</div> <div class="name">{{selectBlind.skuProps?selectBlind.skuProps[0].propVal:" "}}</div>
<div class="num">丨限量{{selectBlind.circulation}}份丨</div>
</div>
<div class="close-img flex-center" @click="showPopup=false">
<van-icon name="cross" color="#ffffff" size="12px"/>
</div>
</div> </div>
</van-popup> </van-popup>
</div> </div>
</template> </template>
<script> <script>
import { Icon } from 'vant';
export default { export default {
props: { props: {
value: { value: {
...@@ -48,6 +55,9 @@ export default { ...@@ -48,6 +55,9 @@ export default {
}, },
// isHasStock: Boolean // isHasStock: Boolean
}, },
components:{
[Icon.name]: Icon,
},
data() { data() {
return { return {
showPopup: false, showPopup: false,
...@@ -77,8 +87,12 @@ export default { ...@@ -77,8 +87,12 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.blind-sku-page { .blind-sku-page {
.van-popup--center.van-popup--round{
// padding-left: 16px; border-radius: 0px;
}
.van-popup{
background: transparent;
}
} }
.blind-sku-scroll { .blind-sku-scroll {
margin: auto; margin: auto;
...@@ -87,14 +101,15 @@ export default { ...@@ -87,14 +101,15 @@ export default {
padding: 42px 12px 20px; padding: 42px 12px 20px;
background: url("~@/assets/img/blind-box-sku.png") no-repeat; background: url("~@/assets/img/blind-box-sku.png") no-repeat;
background-size: 100%; background-size: 100%;
&-box { &-box {
width: 100%; width: 100%;
overflow-x: scroll; overflow-x: auto;
overflow-y: hidden;
} }
} }
.blind-card { .blind-card {
width: 92px; width: 92px;
min-width: 92px;
height: 116px; height: 116px;
background: #ffffff; background: #ffffff;
border-radius: 6px; border-radius: 6px;
...@@ -134,28 +149,43 @@ export default { ...@@ -134,28 +149,43 @@ export default {
height: 75px; height: 75px;
} }
} }
.blind-large-card { .blind-large-con{
width:227px ; .blind-large-card {
height: 296px; width:227px ;
text-align: center; height: 296px;
padding:20px 18px; text-align: center;
> .thumb { padding:20px 18px;
width: 120px; background: #ffffff;
height: 167px; border-radius: 4px;
margin-bottom: 32px; > .thumb {
} width: 120px;
.name { height: 167px;
color: #030711; margin-bottom: 32px;
overflow: hidden; object-fit: cover;
text-overflow: ellipsis; }
white-space: nowrap; .name {
height: 24px; color: #030711;
margin-bottom: 10px; overflow: hidden;
font-size: 14px; text-overflow: ellipsis;
font-weight: 500; white-space: nowrap;
height: 24px;
margin-bottom: 10px;
font-size: 14px;
font-weight: 500;
}
.num {
color: #999999;
}
} }
.num { .close-img{
color: #999999; margin: 0 auto;
width: 28px;
height: 28px;
border-radius: 50%;
background: #333333;
margin-top: 65px;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> --> <!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> -->
<div class="title">简介</div> <div class="title">简介</div>
</div> </div>
<div class="detail" v-html="data && data.detail"></div> <div class="detail" v-html="data && data.detail" v-finishHtml></div>
<div class="desc hash flex-default"> <div class="desc hash flex-default">
<!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> --> <!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> -->
<div class="title">溯源</div> <div class="title">溯源</div>
...@@ -51,7 +51,18 @@ export default { ...@@ -51,7 +51,18 @@ export default {
props: { props: {
data: Object, data: Object,
}, },
directives:{
finishHtml:{
update(el) {
let children=el.childNodes
for(let item of children){
if(item.style.paddingLeft!=='10px'){
item.style.padding="0 10px"
}
}
}
},
},
computed: { computed: {
progressWidth() { progressWidth() {
return this.data && this.data.sales / this.data.circulation * 100 return this.data && this.data.sales / this.data.circulation * 100
......
...@@ -60,11 +60,24 @@ ...@@ -60,11 +60,24 @@
<div class="tip"> <div class="tip">
温馨提醒:支付结果可能因为外部支付服务繁忙,无法及时获取支付结果,您可以稍后到我的订单查看本订单的支付结果! 温馨提醒:支付结果可能因为外部支付服务繁忙,无法及时获取支付结果,您可以稍后到我的订单查看本订单的支付结果!
</div> </div>
<van-popup v-model="showPopup" round >
<div class="goods-detail-con">
<div class="goods-detail-card">
<div class="title">恭喜您获得数字藏品</div>
<img class="thumb" :src="goodsDetail.thumb" alt="" />
<div class="name">{{goodsName}}</div>
</div>
<div class="close-img flex-center" @click="showPopup=false">
<van-icon name="cross" color="#ffffff" size="12px"/>
</div>
</div>
</van-popup>
</div> </div>
</template> </template>
<script> <script>
import { PayType, PayTypeObj } from "@/enums"; import { PayType, PayTypeObj,SalesType } from "@/enums";
import { Icon } from 'vant';
const PayMethodType = { const PayMethodType = {
DEFAULT: 0, DEFAULT: 0,
ALIPAY: 1, ALIPAY: 1,
...@@ -80,6 +93,9 @@ const PayMethodTypeLabel = { ...@@ -80,6 +93,9 @@ const PayMethodTypeLabel = {
[PayMethodType.CREDIT]: "积分", [PayMethodType.CREDIT]: "积分",
}; };
export default { export default {
components:{
[Icon.name]: Icon,
},
data() { data() {
return { return {
PayMethodType, PayMethodType,
...@@ -92,6 +108,9 @@ export default { ...@@ -92,6 +108,9 @@ export default {
paidAmount: 0, paidAmount: 0,
payType: 0, payType: 0,
}, },
oid:"",
showPopup:false,
goodsDetail:{}
}; };
}, },
computed: { computed: {
...@@ -112,6 +131,15 @@ export default { ...@@ -112,6 +131,15 @@ export default {
let obj = PayTypeObj[this.payType]; let obj = PayTypeObj[this.payType];
return obj || PayTypeObj[PayType.NORMAL]; return obj || PayTypeObj[PayType.NORMAL];
}, },
goodsName(){
let name=""
if(this.goodsDetail.salesType===SalesType.BLINDBOX){
name=this.goodsDetail.propList?this.goodsDetail.propList[0].value:this.goodsDetail.name
}else{
name=this.goodsDetail.name
}
return name
},
}, },
methods: { methods: {
pollingPayState() { pollingPayState() {
...@@ -140,8 +168,21 @@ export default { ...@@ -140,8 +168,21 @@ export default {
paySuccess() { paySuccess() {
setTimeout(() => { setTimeout(() => {
this.type = "success"; this.type = "success";
this.getOrderDetail()
}, 1000); }, 1000);
}, },
getOrderDetail(){
this.$api({
apiName:"getOrderDetail",
postData:this.oid,
success:(res)=>{
if(res.orders&&res.orders.length>0){
this.goodsDetail=res.orders[0]
this.showPopup=true
}
}
})
},
payFail() { payFail() {
setTimeout(() => { setTimeout(() => {
this.type = "fail"; this.type = "fail";
...@@ -158,6 +199,7 @@ export default { ...@@ -158,6 +199,7 @@ export default {
created() { created() {
this.pid = this.$route.params.pid; this.pid = this.$route.params.pid;
this.payType = this.$route.query.type; this.payType = this.$route.query.type;
this.oid=this.$route.query.oid
this.pollingPayState(); this.pollingPayState();
}, },
}; };
...@@ -307,5 +349,56 @@ export default { ...@@ -307,5 +349,56 @@ export default {
line-height: 17px; line-height: 17px;
padding: 0 13px; padding: 0 13px;
} }
.van-popup--center.van-popup--round{
border-radius: 0px;
}
.van-popup{
background: transparent;
}
.goods-detail-con{
.goods-detail-card {
width:227px ;
height: 284px;
text-align: center;
padding:17px 18px 14px;
background: #ffffff;
border-radius: 4px;
.title{
color: #030711;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 24px;
margin-bottom: 21px;
font-size: 14px;
font-weight: 500;
line-height: 24px;
}
> .thumb {
width: 120px;
height: 167px;
margin-bottom: 17px;
object-fit: cover;
}
.name {
color: #030711;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 24px;
font-size: 14px;
font-weight: 500;
line-height: 24px;
}
}
.close-img{
margin: 0 auto;
width: 28px;
height: 28px;
border-radius: 50%;
background: #333333;
margin-top: 65px;
}
}
} }
</style> </style>
\ No newline at end of file
...@@ -135,6 +135,7 @@ export default { ...@@ -135,6 +135,7 @@ export default {
leftTime: 15 * 60 * 1000, leftTime: 15 * 60 * 1000,
formType: "order", formType: "order",
timeFinish: false, timeFinish: false,
oid:""
}; };
}, },
computed: { computed: {
...@@ -174,7 +175,6 @@ export default { ...@@ -174,7 +175,6 @@ export default {
if (this.accountInfo.isPayPassword) { if (this.accountInfo.isPayPassword) {
return true; return true;
} }
console.log(this.accountInfo.isPayPassword)
this.$confirm({ this.$confirm({
content: "您当前尚未设置支付密码,是否前往设置?", content: "您当前尚未设置支付密码,是否前往设置?",
confirm: () => { confirm: () => {
...@@ -241,8 +241,8 @@ export default { ...@@ -241,8 +241,8 @@ export default {
// alert(response) // alert(response)
if(response==0){ if(response==0){
let params = { pid:this.pid }; let params = { pid:this.pid };
let query = { type: this.payType }; let query = { type: this.payType,oid:this.oid };
this.$router.replace({ name: "pay-result", params, query }); this.$router.replace({ name: "pay-result", params, query});
}else if(response==-2){ }else if(response==-2){
this.$toast("取消支付"); this.$toast("取消支付");
}else{ }else{
...@@ -297,6 +297,8 @@ export default { ...@@ -297,6 +297,8 @@ export default {
apiName: this.payTypeObj.detailApi, apiName: this.payTypeObj.detailApi,
postData: this.pid, postData: this.pid,
success: (res) => { success: (res) => {
let oids=JSON.parse(res.oidsJson)
this.oid=oids[0] || ""
this.payInfo = res; this.payInfo = res;
let timeOut = this.payInfo.createTime + 15 * 60 * 1000 - +new Date(); let timeOut = this.payInfo.createTime + 15 * 60 * 1000 - +new Date();
this.leftTime = timeOut > 0 ? timeOut : 0; this.leftTime = timeOut > 0 ? timeOut : 0;
...@@ -331,7 +333,7 @@ export default { ...@@ -331,7 +333,7 @@ export default {
pid = res; pid = res;
} }
let params = { pid }; let params = { pid };
let query = { type: payType }; let query = { type: payType,oid:this.oid };
this.$router.replace({ name: "pay-result", params, query }); this.$router.replace({ name: "pay-result", params, query });
}, },
complete: () => { complete: () => {
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
import { OrderStatus, OrderStatusObj, CommentStatus, OrderType } from "@/enums"; import { OrderStatus, OrderStatusObj, CommentStatus, OrderType } from "@/enums";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import { OrderMixin } from "@/mixins"; import { OrderMixin } from "@/mixins";
import bus from "@/utils/bus"
export default { export default {
mixins: [OrderMixin], mixins: [OrderMixin],
props: { props: {
...@@ -133,6 +134,13 @@ export default { ...@@ -133,6 +134,13 @@ export default {
}, },
}, },
mounted(){
bus.$on("changeState", (data) => {
if(data.oid===this.data.oid){
this.data.orderState=data.orderState
}
});
},
}; };
</script> </script>
......
...@@ -10,7 +10,8 @@ const BASE_URL = process.env.NODE_ENV === 'production' ...@@ -10,7 +10,8 @@ const BASE_URL = process.env.NODE_ENV === 'production'
module.exports = { module.exports = {
publicPath: BASE_URL, publicPath: BASE_URL,
outputDir: 'mallFrontH5', // outputDir: 'mallFrontH5',
outputDir: 'yimuFrontH5',
lintOnSave: false, lintOnSave: false,
productionSourceMap: false, productionSourceMap: false,
...@@ -63,9 +64,9 @@ module.exports = { ...@@ -63,9 +64,9 @@ module.exports = {
// target: 'http://146.56.197.42:12009' // target: 'http://146.56.197.42:12009'
// target: 'http://172.22.20.64:8100/root' // target: 'http://172.22.20.64:8100/root'
// target: 'http://172.22.17.176:12008' // target: 'http://172.22.17.176:12008'
// target: 'http://172.22.17.108:12008' // target: 'http://172.22.17.108:9089'
// target: 'https://mall.inmvo.com/root' // target: 'https://mall.inmvo.com/root'
target: 'https://testym.8n.cn/root' target: 'https://testym.8n.cn/root'
}, },
'/chat': { '/chat': {
pathRewrite: { pathRewrite: {
......
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