Commit 23390ed5 by 蒋勇

Merge branch 'igirl-web' of gitlab.gongsibao.com:jiangyong/zhichan into igirl-web

parents ca152021 44d19b46
......@@ -1429,11 +1429,6 @@ var app = new Vue({
title: "登录",
name: "/login"
});
setTimeout(() => {
this.$refs.topmenu.fetchMetaData(() => {
});
}, 300);
}
if (k == "roleview") {
this.pushx({
......
......@@ -142,7 +142,7 @@
register(){
this.$root.pushx({
title: "注册",
name: "/register"
name: "/register",
});
this.a=false;
this.b=false;
......@@ -242,7 +242,6 @@
var that=this;
var obj={
mobile:that.form1.mobile,
};
that.$refs.form1.validate(valid=>{
if(valid){
......
{
template: '${tmpl}',
data: function() {
return {
imgHeight: null,
orderNum: "",
orderInfo: {},
payType: "wx",
d: {},
action: "",
zfpzUrl: "",
accounts: [],
account_id: "",
account_index: "",
accountinfo: {},
qrcode: "",
tradekey: "",
time: "",
interval: null,
roleList: null,
isBizemp: false,
loading: false,
payOrderType: false
}
},
mounted: function() {
data: function () {
return {
imgHeight: null,
orderNum: "",
orderInfo: {},
payType: "wx",
d: {},
action: "",
zfpzUrl: "",
accounts: [],
account_id: "",
account_index: "",
accountinfo: {},
qrcode: "",
tradekey: "",
time: "",
interval: null,
roleList: null,
isBizemp: false,
loading: false,
payOrderType: false,
email: "",
poliyLevel: "",
address: "",
Deparment: "",
industry: "",
period:"3个月",
}
},
mounted: function () {
this.imgHeight = 'min-height:' + (document.documentElement.clientHeight - 221) + "px;";
var currentUser = this.currentUser;
if (currentUser) {
......@@ -41,7 +47,9 @@
}
this.orderNum = this.$router.history.current.query.orderNum;
var that = this;
this.$root.getReq("/web/orderCtl/getItemTmOrderDetail", { orderNum: this.orderNum }).then(function (d) {
this.$root.getReq("/web/orderCtl/getItemTmOrderDetail", {
orderNum: this.orderNum
}).then(function (d) {
if (d.code == 1) {
that.orderInfo = d.data;
that.closePayConfirm();
......@@ -72,23 +80,42 @@
console.log(e);
that.$message.warning("获取账户信息失败");
});
/*接受pay.js界面传的参数*/
this.poliyLevel = this.$router.history.current.query.poliyLevel;
this.address = this.$router.history.current.query.address;
this.Department = this.$router.history.current.query.Department;
this.industry = this.$router.history.current.query.industry;
this.email = this.$router.history.current.query.email;
this.period = this.$router.history.current.query.period;
if (this.$store.state.currentUser) {
this.userName = this.$store.state.currentUser.userName;
this.userId = this.$store.state.currentUser.id;
console.log(this.userName, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxuser");
}
if (this.$store.state.currentCompany) {
this.currentCompany = this.$store.state.currentCompany.name;
console.log(this.$store.state.currentCompany, "BeginTimexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcurrentCompany");
};
this.Subscribe();
},
created: function() {
created: function () {
},
methods: {
afterpayjump(){
afterpayjump() {
var that = this;
this.$root.getReq("/wxop/pushmsgWxop/getQr", {}).then(function (r) {
console.log("rrrrrrr");
console.log(r);
if(r && r.code==1 && r.data){
if (r && r.code == 1 && r.data) {
that.$root.pushx({
title: "支付成功",
name: "/paysuccess",
params: { orderNum: that.orderNum }
params: {
orderNum: that.orderNum
}
});
}else{
} else {
if (that.isBizemp) {
that.$root.pushx({
title: "我的订单",
......@@ -101,7 +128,7 @@
});
}
}
}).catch(e=>{
}).catch(e => {
if (that.isBizemp) {
that.$root.pushx({
title: "我的订单",
......@@ -115,7 +142,7 @@
}
});
},
bankchange(d){
bankchange(d) {
var account = this.accounts[d];
console.log(account);
if (account) {
......@@ -123,7 +150,7 @@
this.account_id = account.id;
}
},
copyLink(){
copyLink() {
var oInput = document.createElement('input');
oInput.value = "https://igirl.gongsibao.com/orderpay/orderpay?state=" + this.orderNum;
document.body.appendChild(oInput);
......@@ -136,11 +163,11 @@
message: '复制成功'
});
},
error(err){
error(err) {
this.$message.warning(`上传失败,请重新上传`);
console.log(err);
},
setKey(name, flag){
setKey(name, flag) {
console.log(name);
console.log(flag);
name = name.substring(name.length - 5);
......@@ -149,19 +176,19 @@
console.log(this.$refs[flag]);
this.$refs[flag].d.key = key;
},
uploadsuccess2(result, obj){
uploadsuccess2(result, obj) {
this.zfpzUrl = result;
this.payOrderType = true;
},
toOfflinePay(){
toOfflinePay() {
this.payType = "offline";
this.closePayConfirm();
},
toOtherPeoplePay(){
toOtherPeoplePay() {
this.payType = "otherPeople";
this.closePayConfirm();
},
offlinePaySubmit(){
offlinePaySubmit() {
var that = this;
var fileUrl = this.zfpzUrl;
var orderNum = this.orderNum;
......@@ -208,24 +235,28 @@
that.$message.warning("参数错误");
}
},
toWxPay(){
toWxPay() {
this.payType = "wx";
this.closePayConfirm();
this.getPayQrCode();
},
toAliPay(){
toAliPay() {
this.payType = "alipay";
this.closePayConfirm();
this.getPayQrCode();
},
getPayQrCode: function() {
getPayQrCode: function () {
var self = this;
if (!this.orderInfo || !this.orderInfo.code) {
this.$message.warning(`获取支付码失败,订单信息有误`);
return;
}
self.loading = true;
self.$root.postReq("/web/orderCtl/getQrCodeTl", { code: this.orderInfo.code, company_id: this.orderInfo.company_id, op_type: this.payType }).then(d => {
self.$root.postReq("/web/orderCtl/getQrCodeTl", {
code: this.orderInfo.code,
company_id: this.orderInfo.company_id,
op_type: this.payType
}).then(d => {
console.log(d, "getQrCode........................");
if (d && d.code == 1) {
var data = d.data;
......@@ -243,17 +274,24 @@
self.loading = false;
});
},
closePayConfirm(){
closePayConfirm() {
if (this.interval) {
window.clearInterval(this.interval);
}
},
checkOrderStatus(){
checkOrderStatus() {
var self = this;
var startTime = Number(this.time);
setTimeout(function () {
var inth = setInterval(function () {
self.$root.postReq("/web/orderCtl/findItemByCodeTl", { orderCode: self.orderInfo.code, wxPayOrderCode: self.orderInfo.wxPayOrderCode, aliPayOrderCode: self.orderInfo.aliPayOrderCode, company_id: self.orderInfo.company_id, sub_type: self.orderInfo.subType, op_type: self.payType }).then(d => {
self.$root.postReq("/web/orderCtl/findItemByCodeTl", {
orderCode: self.orderInfo.code,
wxPayOrderCode: self.orderInfo.wxPayOrderCode,
aliPayOrderCode: self.orderInfo.aliPayOrderCode,
company_id: self.orderInfo.company_id,
sub_type: self.orderInfo.subType,
op_type: self.payType
}).then(d => {
if (d && d.code == 1 && d.data && d.data.orderPayStatus == "yfk") {
self.orderInfo = d.data;
window.clearInterval(inth);
......@@ -283,6 +321,39 @@
self.interval = inth;
}, 5000);
},
Subscribe() {
console.log("oooooooooooo");
axios.post('http://106.13.228.212:8010/gsb/Subscribe', {
"userId": this.userId,
"poliyLevel": this.poliyLevel,
"city": this.address,
"Departments": this.Department,
"industry": this.industry,
"BeginTime": this.Date_new(new Date()),
"Email": this.email,
"comanyname": this.currentCompany,
"username": this.userName,
"period": this.period,
"money": this.money,
"pid": this.orderInfo.code
}).then(d => {
console.log(this.cities, "this.cities----------------------");
console.log(this.currentCompany, "this.currentCompany----------------------");
console.log(String(this.cities), "string----------------------");
console.log(JSON.stringify(this.cities), "cities----------------------");
})
},
Date_new(str) {
let date = str || new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hours = date.getHours(),
minutes = date.getMinutes();
second = date.getSeconds();
let a = `${year}-${month}-${day} ${hours}:${minutes}:${second}`;
return a;
},
},
vname: "gsb_orderpay"
}
}
\ No newline at end of file
......@@ -14,6 +14,6 @@
<el-input v-model="email" placeholder="请输入内容" type="email"></el-input>
</div>
<h3>实付金额:<span>{{money}}元</span></h3>
<el-button type="primary" @click="btnClick();Subscribe()">去支付</el-button>
<el-button type="primary" @click="btnClick()">去支付</el-button>
</div>
</div>
\ No newline at end of file
......@@ -24,12 +24,9 @@
itemCode: "zcdy3gy",
userId: "",
poliyLevel: "",
city: "",
address: "",
Deparment: "",
industry: "",
BeginTime: "",
currentCompany: "",
userName: "",
period: "3个月",
};
},
......@@ -37,20 +34,11 @@
},
mounted: function () {
/*由policycondition.js传递*/
this.poliyLevel = this.$router.history.current.query.poliyLevel;
this.cities = this.$router.history.current.query.cities;
this.address = this.$router.history.current.query.address;
this.Department = this.$router.history.current.query.Department;
this.industry = this.$router.history.current.query.industry;
if (this.$store.state.currentUser) {
this.userName = this.$store.state.currentUser.userName;
this.userId = this.$store.state.currentUser.id;
console.log(this.userName, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxuser");
}
if (this.$store.state.currentCompany) {
this.currentCompany = this.$store.state.currentCompany.name;
}
console.log(this.$store.state.currentCompany, "BeginTimexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcurrentCompany");
},
methods: {
timeClick(item, ind) {
......@@ -98,7 +86,13 @@
title: "订单支付",
name: "/orderpay",
params: {
orderNum: d.data.code
orderNum: d.data.code,
"poliyLevel":this.poliyLevel,
"address":this.address,
"Department":this.Department,
"industry":this.industry,
"email":this.email,
"period":this.period,
}
});
} else {
......@@ -106,41 +100,6 @@
}
})
},
Subscribe() {
axios.post('http://106.13.228.212:8010/gsb/Subscribe', {
/*axios.post('http://192.168.18.108:8009/gsb/Subscribe', {*/
"userId": this.userId,
"poliyLevel": this.poliyLevel,
"city": this.cities,
"Departments": this.Department,
"industry": this.industry,
"BeginTime": this.Date_new(new Date()),
/*"BeginTime": new Date(),*/
"Email": this.email,
"comanyname": this.currentCompany,
"username": this.userName,
"period": this.period,
"money": this.money,
}).then(d => {
console.log(d, "mysql----------------------");
console.log(money, "money----------------------");
console.log(String(this.cities), "string----------------------");
console.log(JSON.stringify(this.cities), "cities----------------------");
})
},
Date_new(str) {
/*let date = str || new Date(),*/
let date = new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hours = date.getHours(),
minutes = date.getMinutes();
second = date.getSeconds();
let a = `${year}-${month}-${day} ${hours}:${minutes}:${second}`;
return a
},
},
vname: "gsb-pay"
}
\ No newline at end of file
......@@ -266,7 +266,7 @@
name: "/pay",
params: {
"poliyLevel": this.level,
"cities": _arryCitys,
"address": _arryCitys,
"Department": this.checkedfabus,
"industry": this.checkedhangyes,
},
......
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