Merge branch 'master' of https://git.dayouqiantu.cn/develop/yshop-uniapp
This commit is contained in:
7
App.vue
7
App.vue
@ -1,5 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
// #ifdef H5
|
||||||
|
var VConsole = require('@/utils/vconsole.min.js');
|
||||||
|
// #endif
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
const updateManager = uni.getUpdateManager()
|
const updateManager = uni.getUpdateManager()
|
||||||
@ -37,6 +40,10 @@ export default {
|
|||||||
console.log("App Hide");
|
console.log("App Hide");
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
// #ifdef H5
|
||||||
|
var vConsole = new VConsole();
|
||||||
|
console.log('开启调试');
|
||||||
|
// #endif
|
||||||
this.setAppInfo()
|
this.setAppInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -140,3 +140,11 @@ export function payOrder(uni, paytype, from) {
|
|||||||
export function orderVerific(verifyCode, isConfirm) {
|
export function orderVerific(verifyCode, isConfirm) {
|
||||||
return request.post("order/order_verific", { verifyCode, isConfirm });
|
return request.post("order/order_verific", { verifyCode, isConfirm });
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取订阅消息ID
|
||||||
|
* @param price
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function getSubscribeTemplate() {
|
||||||
|
return request.get("/order/getSubscribeTemplate");
|
||||||
|
}
|
||||||
|
@ -2,7 +2,8 @@ import {
|
|||||||
cancelOrder,
|
cancelOrder,
|
||||||
takeOrder,
|
takeOrder,
|
||||||
delOrder,
|
delOrder,
|
||||||
payOrder
|
payOrder,
|
||||||
|
getSubscribeTemplate
|
||||||
} from "@/api/order";
|
} from "@/api/order";
|
||||||
import dialog from "@/utils/dialog";
|
import dialog from "@/utils/dialog";
|
||||||
import {
|
import {
|
||||||
@ -196,10 +197,10 @@ export function handleOrderPayResults(data, type, payType) {
|
|||||||
export function subscribeMessage() {
|
export function subscribeMessage() {
|
||||||
// 调用订阅
|
// 调用订阅
|
||||||
console.log('调用订阅')
|
console.log('调用订阅')
|
||||||
|
getSubscribeTemplate()
|
||||||
|
.then(res => {
|
||||||
uni.requestSubscribeMessage({
|
uni.requestSubscribeMessage({
|
||||||
tmplIds: ['W5r2c2kzhbq8uxStkPAVx_sk-5aapMFCqe7b7KU5jXI', '2CB_1UyQrbnlyjJa5syraqJ3cfztPPDOAHe3DEXpMjg',
|
tmplIds: res.data,
|
||||||
'vuztugw9VbKbKJDAAVePkjqPpT5mdoREpd4Aq7EGPRU'
|
|
||||||
],
|
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
},
|
},
|
||||||
@ -207,6 +208,8 @@ export function subscribeMessage() {
|
|||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
.catch(err => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
"jweixin-module": "^1.6.0",
|
"jweixin-module": "^1.6.0",
|
||||||
"miniapp-color-thief": "^1.0.5",
|
"miniapp-color-thief": "^1.0.5",
|
||||||
"vue-ydui": "^1.2.6",
|
"vue-ydui": "^1.2.6",
|
||||||
|
"vconsole": "^3.3.4",
|
||||||
"wechat-jssdk": "^5.0.4"
|
"wechat-jssdk": "^5.0.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -125,6 +125,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="tip">可用余额:{{ userInfo.nowMoney || 0 }}</view>
|
<view class="tip">可用余额:{{ userInfo.nowMoney || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="payItem acea-row row-middle" :class="active === 'integral' ? 'on' : ''" @click="payItem('integral')">
|
||||||
|
<view class="name acea-row row-center-wrapper">
|
||||||
|
<view class="iconfont icon-icon-test" :class="active === 'integral' ? 'bounceIn' : ''"></view>积分支付
|
||||||
|
</view>
|
||||||
|
<view class="tip">可用积分:{{ userInfo.integral || 0 }}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -135,7 +135,9 @@
|
|||||||
v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0"
|
v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0"
|
||||||
@click="offlinePay"
|
@click="offlinePay"
|
||||||
>确认付款</view>
|
>确认付款</view>
|
||||||
<view class="bnt delivery" v-if="types == 1" @click="goGoodsDeliver(orderInfo)">去发货</view>
|
<view class="bnt delivery" v-if="title=='未发货' && types == 1" @click="goGoodsDeliver(orderInfo)">去发货</view>
|
||||||
|
<view class="bnt quick" v-if="title=='待核销' && types == 1" @click="storeCancellation(0)">快速核销</view>
|
||||||
|
<view class="bnt delivery" v-if="title=='待核销' && types == 1" @click="storeCancellation(1)">立即核销</view>
|
||||||
</view>
|
</view>
|
||||||
<PriceChange
|
<PriceChange
|
||||||
:change="change"
|
:change="change"
|
||||||
@ -156,6 +158,7 @@ import {
|
|||||||
setOfflinePay,
|
setOfflinePay,
|
||||||
setOrderRefund
|
setOrderRefund
|
||||||
} from "@/api/admin";
|
} from "@/api/admin";
|
||||||
|
import {orderVerific} from "@/api/order";
|
||||||
import { required, num } from "@/utils/validate";
|
import { required, num } from "@/utils/validate";
|
||||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
import { validatorDefaultCatch } from "@/utils/dialog";
|
||||||
import { copyClipboard } from "@/utils";
|
import { copyClipboard } from "@/utils";
|
||||||
@ -190,7 +193,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function() {
|
onShow: function() {
|
||||||
this.order_id = this.$yroute.query.oid;
|
this.order_id = this.$yroute.query.oid;
|
||||||
this.getIndex();
|
this.getIndex();
|
||||||
},
|
},
|
||||||
@ -349,7 +352,63 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
storeCancellation(index) {
|
||||||
|
const that = this;
|
||||||
|
that.check = true;
|
||||||
|
if (index == 0) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "确定核销订单?",
|
||||||
|
content: "注意:请务必核对核销码的与客户正确性",
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "查询中"
|
||||||
|
});
|
||||||
|
orderVerific(that.orderInfo.verifyCode, 1)
|
||||||
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
|
uni.hideLoading();
|
||||||
|
that.iShidden = false;
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
//最后就是返回上一个页面。
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1, // 返回上一级页面。
|
||||||
|
success: function() {
|
||||||
|
console.log('成功!')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title: err.data.msg,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
that.$yrouter.push({
|
||||||
|
path: '/pages/orderAdmin/OrderCancellation/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.quick {
|
||||||
|
background: #F25555;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<view class="money">
|
<view class="money">
|
||||||
<view class="x-money">¥{{ val.productInfo.price }}</view>
|
<view class="x-money">¥{{ val.productInfo.price }}</view>
|
||||||
<view class="num">x{{ val.cartNum }}</view>
|
<view class="num">x{{ val.cartNum }}</view>
|
||||||
<view class="y-money">¥{{ val.productInfo.otPrice }}</view>
|
<view class="y-money" v-if="val.productInfo.otPrice">¥{{ val.productInfo.otPrice }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -54,7 +54,9 @@
|
|||||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 0">一键改价</view>
|
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 0">一键改价</view>
|
||||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == -3 && item.refundStatus === 1">立即退款</view>
|
<view class="bnt" @click="modify(item, 0)" v-if="where.status == -3 && item.refundStatus === 1">立即退款</view>
|
||||||
<view class="bnt cancel" v-if="item.pay_type === 'offline' && item.paid === 0" @click="offlinePay(item)">确认付款</view>
|
<view class="bnt cancel" v-if="item.pay_type === 'offline' && item.paid === 0" @click="offlinePay(item)">确认付款</view>
|
||||||
<view class="bnt" v-if="where.status == 1" @click="goGoodsDeliver(item)">去发货</view>
|
<view class="bnt" v-if="where.status == 1 && item._status._title=='未发货'" @click="goGoodsDeliver(item)">去发货</view>
|
||||||
|
<view class="bnt cancel" v-if="item._status._title=='待核销' && where.status == 1" @click="storeCancellation(0,item.verifyCode)">快速核销</view>
|
||||||
|
<view class="bnt" v-if="item._status._title=='待核销' && where.status == 1" @click="storeCancellation(1,item.verifyCode)">立即核销</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -75,6 +77,7 @@
|
|||||||
setOfflinePay,
|
setOfflinePay,
|
||||||
setOrderRefund
|
setOrderRefund
|
||||||
} from "@/api/admin";
|
} from "@/api/admin";
|
||||||
|
import {orderVerific} from "@/api/order";
|
||||||
import {
|
import {
|
||||||
required,
|
required,
|
||||||
num
|
num
|
||||||
@ -119,7 +122,7 @@
|
|||||||
this.getIndex();
|
this.getIndex();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function() {
|
onShow: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.where.status = that.$yroute.query.types;
|
that.where.status = that.$yroute.query.types;
|
||||||
that.current = "";
|
that.current = "";
|
||||||
@ -318,10 +321,64 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
storeCancellation(index,verifyCode) {
|
||||||
|
const that = this;
|
||||||
|
that.check = true;
|
||||||
|
if (index == 0) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "确定核销订单?",
|
||||||
|
content: "注意:请务必核对核销码的与客户正确性",
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "查询中"
|
||||||
|
});
|
||||||
|
orderVerific(verifyCode, 1)
|
||||||
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
|
uni.hideLoading();
|
||||||
|
that.iShidden = false;
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
//最后就是返回上一个页面。
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1, // 返回上一级页面。
|
||||||
|
success: function() {
|
||||||
|
console.log('成功!')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title: err.data.msg,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
that.$yrouter.push({
|
||||||
|
path: '/pages/orderAdmin/OrderCancellation/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
.quick {
|
||||||
|
background: #F25555;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1061,3 +1061,4 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -215,6 +215,9 @@ export const login = () => {
|
|||||||
console.log(redirect)
|
console.log(redirect)
|
||||||
if (redirect) {
|
if (redirect) {
|
||||||
redirect = redirect.split('/pages')[1]
|
redirect = redirect.split('/pages')[1]
|
||||||
|
if(!redirect){
|
||||||
|
redirect="/Loading/index";
|
||||||
|
}
|
||||||
reLaunch({
|
reLaunch({
|
||||||
path: '/pages' + redirect,
|
path: '/pages' + redirect,
|
||||||
});
|
});
|
||||||
|
10
utils/vconsole.min.js
vendored
Normal file
10
utils/vconsole.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user