1.对接银联2.0 新页面 接口

master
杨杰 2 years ago
parent 07fef7a563
commit d3a0e2503c
  1. 3
      .gitignore
  2. 28
      high-unionPay/App.vue
  3. 108
      high-unionPay/Utils/Api.js
  4. 61
      high-unionPay/member-Recharge/rec-confirmation/rec-confirmation.vue
  5. 30
      high-unionPay/node_modules/jweixin-module/README.md
  6. 1
      high-unionPay/node_modules/jweixin-module/lib/index.js
  7. 54
      high-unionPay/node_modules/jweixin-module/package.json
  8. 42
      high-unionPay/node_modules/vue-jsonp/LICENSE
  9. 306
      high-unionPay/node_modules/vue-jsonp/README.md
  10. 146
      high-unionPay/node_modules/vue-jsonp/dist/index.d.ts
  11. 40
      high-unionPay/node_modules/vue-jsonp/dist/utils/index.d.ts
  12. 130
      high-unionPay/node_modules/vue-jsonp/package.json
  13. 250
      high-unionPay/package-lock.json
  14. 4
      high-unionPay/package.json
  15. 2
      high-unionPay/pages/goods/goods.vue
  16. 27
      high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue
  17. 561
      high-unionPay/pages/order/confirmation.vue
  18. 3
      high-unionPay/pages/qianZhuPay/qianZhuPay.vue
  19. 915
      high-unionPay/pages/tabBar/home/home.vue
  20. 172
      high-unionPay/pages/tabBar/user/user.vue
  21. 52
      high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue
  22. 3
      high-unionPay/pages/user/deposit/deposit.vue
  23. 116
      high-unionPay/pages/user/news/news.vue
  24. 1661
      high-unionPay/pages/user/order_details/order_details.vue
  25. 165
      high-unionPay/pages/user/order_list/order_list.vue
  26. 297
      high-unionPay/qianzhu-KFC/confirmOrder/confirmOrder.vue
  27. 134
      high-unionPay/qianzhu-KFC/order-details/order-details.vue
  28. 3
      high-unionPay/qianzhu-KFC/payment-method/payment-method.vue
  29. BIN
      high-unionPay/static/img/user/kefu.png
  30. BIN
      high-unionPay/static/img/user/notive.png
  31. BIN
      high-unionPay/static/img/user/order.png
  32. BIN
      high-unionPay/static/img/user/overdue.png
  33. BIN
      high-unionPay/static/img/user/use.png
  34. 76
      high-unionPay/subPages/coupon-comfirmation/coupon-comfirmation.vue

3
.gitignore vendored

@ -1 +1,2 @@
unpackage/ unpackage/
node_modules

@ -5,18 +5,22 @@
// brestUrl: 'http://192.168.3.4:9302/brest', // brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/', // imgUrl: 'https://192.168.3.4:9301/filesystem/',
// //
// url: 'https://hsg.dctpay.com/crest', // url: 'https://hsg.dctpay.com/crest',
// v1url:'https://hsg.dctpay.com/v1', // v1url:'https://hsg.dctpay.com/v1',
// imgUrl: 'https://hsg.dctpay.com/filesystem/', // orderurl:' https://hsg.dctpay.com/order',
// brestUrl: 'https://hsg.dctpay.com/brest', // userurl:'https://hsg.dctpay.com/user',
// imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/', // imgUrl: 'https://hsg.dctpay.com/filesystem/',
// imageqrImg: 'https://hsg.dctpay.com/filesystem/temporary/', // brestUrl: 'https://hsg.dctpay.com/brest',
// // imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
url: 'https://hsgcs.dctpay.com/crest', // imageqrImg: 'https://hsg.dctpay.com/filesystem/temporary/',
v1url: 'https://hsgcs.dctpay.com/v1', //
brestUrl: 'https://hsgcs.dctpay.com/brest', url: 'https://hsgcs.dctpay.com/crest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/', v1url: 'https://hsgcs.dctpay.com/v1',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/', orderurl:'https://hsgcs.dctpay.com/order',
userurl:'https://hsgcs.dctpay.com/user',
brestUrl: 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
imageqrImg: 'https://hsgcs.dctpay.com/filesystem/temporary/', imageqrImg: 'https://hsgcs.dctpay.com/filesystem/temporary/',
userInfo: "", userInfo: "",
brestUserInfo: '', brestUserInfo: '',

@ -5,6 +5,8 @@ import {
POSTBREST} from "./bRequest.js"; POSTBREST} from "./bRequest.js";
let app = getApp(); let app = getApp();
let base = app.globalData.url; let base = app.globalData.url;
let orderbase = app.globalData.orderurl;
let userbase = app.globalData.userurl;
let v1base = app.globalData.v1url; let v1base = app.globalData.v1url;
let brestBase = app.globalData.brestUrl; let brestBase = app.globalData.brestUrl;
//公众号获取跳小程序参数 //公众号获取跳小程序参数
@ -26,10 +28,6 @@ export const HandleCode = params => {
export const GetPhoneNumber = params => { export const GetPhoneNumber = params => {
return POST('GET', `${base}/wechat/getPhoneNumber`, params).then(res => res.data); return POST('GET', `${base}/wechat/getPhoneNumber`, params).then(res => res.data);
}; };
//银联手机号登录
export const unionPhoneLogin = params => {
return POST('GET', `${base}/user/unionPhoneLogin`, params).then(res => res.data);
};
//获取用户授权信息 //获取用户授权信息
export const getUserInfo = params => { export const getUserInfo = params => {
return POST('GET', `${base}/wechat/getUserInfo`, params).then(res => res.data); return POST('GET', `${base}/wechat/getUserInfo`, params).then(res => res.data);
@ -47,10 +45,6 @@ export const updateUserPayPwd = params => {
return POST('POST', `${base}/highUser/updateUserPayPwd`, params).then(res => res.data); return POST('POST', `${base}/highUser/updateUserPayPwd`, params).then(res => res.data);
} }
//获取用户信息
export const findUser = params => {
return POST('GET', `${base}/highUser/findUser`, params).then(res => res.data);
}
//微信登录 //微信登录
export const WXlogin = params => { export const WXlogin = params => {
return POST('GET', `${base}/wechat/login`, params).then(res => res.data); return POST('GET', `${base}/wechat/login`, params).then(res => res.data);
@ -131,23 +125,12 @@ export const getUserCouponDetail = params => {
export const getUserNewCouponDetail = params => { export const getUserNewCouponDetail = params => {
return POST('GET', `${base}/coupon/getUserNewCouponDetail`, params).then(res => res.data); return POST('GET', `${base}/coupon/getUserNewCouponDetail`, params).then(res => res.data);
} }
//获取订单信息
export const getUserOrderList = params => {
return POST('GET', `${base}/highOrder/getUserOrderList`, params).then(res => res.data);
}
//取消订单
export const cancelOrder = params => {
return POST('GET', `${base}/highOrder/cancelOrder`, params).then(res => res.data);
}
//订单查询详情 //订单查询详情
export const getOrderById = params => { export const getOrderById = params => {
return POST('GET', `${base}/highOrder/getOrderById`, params).then(res => res.data); return POST('GET', `${base}/highOrder/getOrderById`, params).then(res => res.data);
} }
//已完成未查看
export const orderCheck = params => {
return POST('GET', `${base}/highOrder/orderCheck`, params).then(res => res.data);
}
//获取商户列表 //获取商户列表
export const getMerchantList = params => { export const getMerchantList = params => {
return POST('GET', `${base}/highMerchantStore/getMerchantList`, params).then(res => res.data); return POST('GET', `${base}/highMerchantStore/getMerchantList`, params).then(res => res.data);
@ -176,10 +159,6 @@ export const getCouponByDiscount = params => {
export const againReceiveCoupon = params => { export const againReceiveCoupon = params => {
return POST('GET', `${base}/coupon/againReceiveCoupon`, params).then(res => res.data); return POST('GET', `${base}/coupon/againReceiveCoupon`, params).then(res => res.data);
} }
//查询我的优惠券
export const getUserDiscountList = params => {
return POST('GET', `${base}/userDiscount/getUserDiscountList`, params).then(res => res.data);
}
//我的优惠券查详情 //我的优惠券查详情
export const getDiscountByUserDiscountId = params => { export const getDiscountByUserDiscountId = params => {
return POST('GET', `${base}/userDiscount/getDiscountByUserDiscountId`, params).then(res => res.data); return POST('GET', `${base}/userDiscount/getDiscountByUserDiscountId`, params).then(res => res.data);
@ -247,10 +226,6 @@ export const getPhoneOrderById = params => {
export const cancelRechargeOrder = params => { export const cancelRechargeOrder = params => {
return POST('GET', `${base}/outRechargeOrder/cancelOrder`, params).then(res => res.data); return POST('GET', `${base}/outRechargeOrder/cancelOrder`, params).then(res => res.data);
} }
//银联提交订单
export const unionPay = params => {
return POST('POST', `${base}/order/unionPay`, params).then(res => res.data);
}
// 银联话费充值 // 银联话费充值
export const orderToUnionPay = params => { export const orderToUnionPay = params => {
return POST('POST', `${base}/czOrder/orderToUnionPay`, params).then(res => res.data); return POST('POST', `${base}/czOrder/orderToUnionPay`, params).then(res => res.data);
@ -315,10 +290,6 @@ export const getHuiLianTongCardBalance = params => {
export const getHuiLianTongCardConsume = params => { export const getHuiLianTongCardConsume = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardConsume`, params).then(res => res.data); return POST('GET', `${base}/highUserCard/getHuiLianTongCardConsume`, params).then(res => res.data);
} }
// 汇联通工会卡支付
export const hltUnionCardPay = params => {
return POST('POST', `${base}/order/hltUnionCardPay`, params).then(res => res.data);
}
export const czhltUnionCardPay = params => { export const czhltUnionCardPay = params => {
return POST('POST', `${base}/thirdOrder/hltUnionCardPay`, params).then(res => res.data); return POST('POST', `${base}/thirdOrder/hltUnionCardPay`, params).then(res => res.data);
} }
@ -373,14 +344,7 @@ export const getKfcStoresList = params => {
export const listByStoreCode = params => { export const listByStoreCode = params => {
return POST('GET', `${base}/highThirdParty/listByStoreCode`, params).then(res => res.data); return POST('GET', `${base}/highThirdParty/listByStoreCode`, params).then(res => res.data);
} }
//肯德基订单详情
export const getThirdOrderByOrderId = params => {
return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderId`, params).then(res => res.data);
}
//肯德基,星巴克取消订单
export const thirdCancelOrder = params => {
return POST('GET', `${base}/highThirdParty/thirdCancelOrder`, params).then(res => res.data);
}
//肯德基银联支付 //肯德基银联支付
export const qianzhuorderToUnionPay = params => { export const qianzhuorderToUnionPay = params => {
return POST('POST', `${base}/thirdOrder/orderToUnionPay`, params).then(res => res.data); return POST('POST', `${base}/thirdOrder/orderToUnionPay`, params).then(res => res.data);
@ -527,3 +491,67 @@ export const getUserOrderListhuafei = params => {
export const getRebateIntegral = params => { export const getRebateIntegral = params => {
return POST('POST', `${base}/common/getRebateIntegral`, params).then(res => res.data); return POST('POST', `${base}/common/getRebateIntegral`, params).then(res => res.data);
} }
//站内信列表
export const queryMsgByList = params => {
return POST('GET', `${base}/bsMsg/queryMsgByList`, params).then(res => res.data);
}
// -----------订单新接口------------
//新建订单
export const create = params => {
return POST('POST', `${orderbase}/create`, params).then(res => res.data);
}
//获取订单列表
export const getUserOrderList = params => {
return POST('GET', `${orderbase}/getUserOrderList`, params).then(res => res.data);
}
//订单详情
export const getDetailByOrderNo = params => {
return POST('GET', `${orderbase}/getDetailByOrderNo`, params).then(res => res.data);
}
//取消订单
export const cancel = params => {
return POST('POST', `${orderbase}/cancel`, params).then(res => res.data);
}
//银联支付
export const unionPay = params => {
return POST('POST', `${orderbase}/orderPay/unionPay`, params).then(res => res.data);
}
//工会卡、油卡
export const cardPay = params => {
return POST('POST', `${orderbase}/orderPay/cardPay`, params).then(res => res.data);
}
//已完成未查看
export const orderCheck = params => {
return POST('GET', `${orderbase}/orderCheck`, params).then(res => res.data);
}
//在线加油详情
export const getOrderByOrderNo = params => {
return POST('GET', `${orderbase}/oil/getOrderByOrderNo`, params).then(res => res.data);
}
//----------------我的页面接口
// 手机号登录
export const unionPhoneLogin = params => {
return POST('POST', `${userbase}/login/union`, params).then(res => res.data);
}
// 获取用户信息
export const findUser = params => {
return POST('POST', `${userbase}/getUserDetail`, params).then(res => res.data);
}
// 获取用户余额
export const getUserAccount = params => {
return POST('POST', `${userbase}/getUserAccount`, params).then(res => res.data);
}
//查询优惠券
export const getUserDiscountList = params => {
return POST('GET', `${userbase}/discount/getUserDiscountList`, params).then(res => res.data);
}

@ -167,18 +167,15 @@
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'; import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue'; import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import { import {
xbkaddOrder, create,
getThirdPartyByDetail, getThirdPartyByDetail,
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
findUser, findUser,
qianzhuorderToUnionPay, unionPay,
czhltUnionCardPay, cardPay,
getUserOrderPreList, getUserOrderPreList,
getRebateIntegral getRebateIntegral
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
let app = getApp(); let app = getApp();
export default { export default {
components: { components: {
@ -388,22 +385,25 @@
title: '提交订单中...' title: '提交订单中...'
}) })
let datas = { let datas = {
"customerMobile": this.customerMobile, "childOrderList": [{
"regionId": app.globalData.cityId, "goodsId": this.goodId,
"productType": 3, "customerMobile": this.customerMobile,
"platformId": this.showType, "platformId": this.showType,
"password": this.PaymentPassword, "productType": this.productType,
"integralNum": this.priceValue[1], "goodsType": 10,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
"memDiscountId": this.memDiscountId, "memDiscountId": this.memDiscountId,
"goodsId": this.goodId
} }
xbkaddOrder(datas).then(res => { create(datas).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.orderId = res.return_data.id; this.orderId = res.return_data.orderNo;
let params = { let params = {
"orderId": res.return_data.id, "orderNo": res.return_data.orderNo,
} }
this.qianzhuorderToUnionPay(params); this.qianzhuorderToUnionPay(params);
} else { } else {
@ -514,7 +514,7 @@
qianzhuorderToUnionPay(item) { qianzhuorderToUnionPay(item) {
let that = this; let that = this;
if (that.paytype == '4') { if (that.paytype == '4') {
qianzhuorderToUnionPay(item).then(res => { unionPay(item).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
that.uniontopay(res.return_data.prepayid); that.uniontopay(res.return_data.prepayid);
} else { } else {
@ -606,20 +606,25 @@
} }
if (this.payPrice == 0) { if (this.payPrice == 0) {
let datas = { let datas = {
"customerMobile": this.customerMobile, "childOrderList": [{
"regionId": app.globalData.cityId, "goodsId": this.goodId,
"productType": 3, "customerMobile": this.customerMobile,
"platformId": this.showType, "platformId": this.showType,
"password": this.PaymentPassword, "productType": 3,
"integralNum": this.priceValue[1], "goodsType": 10,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId, "memDiscountId": this.memDiscountId,
"goodsId": this.goodId "payPwd": this.PaymentPassword
} }
xbkaddOrder(datas).then(res => { create(datas).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.orderId = res.return_data.id; this.orderId = res.return_data.orderNo;
uni.reLaunch({ uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
}) })
@ -640,11 +645,11 @@
return; return;
} }
let params = { let params = {
"orderId": this.orderId, "orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
czhltUnionCardPay(params).then(res => { cardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({

@ -1,30 +0,0 @@
# jweixin-module
微信JS-SDK
## 安装
### NPM
```shell
npm install jweixin-module --save
```
### UMD
```http
https://unpkg.com/jweixin-module/out/index.js
```
## 使用
```js
var jweixin = require('jweixin-module')
jweixin.ready(function(){
// TODO
});
```
## 完整API
>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115)

File diff suppressed because one or more lines are too long

@ -1,54 +0,0 @@
{
"_from": "jweixin-module",
"_id": "jweixin-module@1.6.0",
"_inBundle": false,
"_integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==",
"_location": "/jweixin-module",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "jweixin-module",
"name": "jweixin-module",
"escapedName": "jweixin-module",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"_shasum": "4a7ea614083e3c9c3f49e2fdc2bb882cfa58dfcd",
"_spec": "jweixin-module",
"_where": "D:\\Documents\\high-mini",
"author": {
"name": "Shengqiang Guo"
},
"bugs": {
"url": "https://github.com/zhetengbiji/jweixin-module/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "微信JS-SDK",
"devDependencies": {},
"homepage": "https://github.com/zhetengbiji/jweixin-module#readme",
"keywords": [
"wxjssdk",
"weixin",
"jweixin",
"wechat",
"jssdk",
"wx"
],
"license": "ISC",
"main": "lib/index.js",
"name": "jweixin-module",
"repository": {
"type": "git",
"url": "git+https://github.com/zhetengbiji/jweixin-module.git"
},
"scripts": {},
"version": "1.6.0"
}

@ -1,21 +1,21 @@
MIT License MIT License
Copyright (c) 2020 LancerComet Copyright (c) 2020 LancerComet
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.

@ -1,153 +1,153 @@
# Vue-jsonp # Vue-jsonp
[![VueJsonp](https://github.com/LancerComet/vue-jsonp/workflows/Test/badge.svg)](https://github.com/LancerComet/vue-jsonp/actions) [![VueJsonp](https://github.com/LancerComet/vue-jsonp/workflows/Test/badge.svg)](https://github.com/LancerComet/vue-jsonp/actions)
A tiny library for handling JSONP request. A tiny library for handling JSONP request.
## Quick Start ## Quick Start
As Vue plugin: As Vue plugin:
```ts ```ts
import { VueJsonp } from 'vue-jsonp' import { VueJsonp } from 'vue-jsonp'
// Vue Plugin. // Vue Plugin.
Vue.use(VueJsonp) Vue.use(VueJsonp)
// Now you can use this.$jsonp in Vue components. // Now you can use this.$jsonp in Vue components.
const vm = new Vue() const vm = new Vue()
vm.$jsonp('/some-jsonp-url', { vm.$jsonp('/some-jsonp-url', {
myCustomUrlParam: 'veryNice' myCustomUrlParam: 'veryNice'
}) })
``` ```
Use function directly: Use function directly:
```ts ```ts
import { jsonp } from 'vue-jsonp' import { jsonp } from 'vue-jsonp'
jsonp('/some-jsonp-url', { jsonp('/some-jsonp-url', {
myCustomUrlParam: 'veryNice' myCustomUrlParam: 'veryNice'
}) })
``` ```
## Send data and set query & function name ## Send data and set query & function name
### Send data ### Send data
```ts ```ts
// The request url will be "/some-jsonp-url?name=LancerComet&age=100&callback=jsonp_{RANDOM_STR}". // The request url will be "/some-jsonp-url?name=LancerComet&age=100&callback=jsonp_{RANDOM_STR}".
jsonp('/some-jsonp-url', { jsonp('/some-jsonp-url', {
name: 'LancerComet', name: 'LancerComet',
age: 100 age: 100
}) })
``` ```
### Custom query & function name ### Custom query & function name
The url uniform is `/url?{callbackQuery}={callbackName}&...`, the default is `/url?callback=jsonp_{RANDOM_STRING}&...`. The url uniform is `/url?{callbackQuery}={callbackName}&...`, the default is `/url?callback=jsonp_{RANDOM_STRING}&...`.
And you can change it like this: And you can change it like this:
```ts ```ts
// The request url will be "/some-jsonp-url?name=LancerComet&age=100&cb=jsonp_func". // The request url will be "/some-jsonp-url?name=LancerComet&age=100&cb=jsonp_func".
jsonp('/some-jsonp-url', { jsonp('/some-jsonp-url', {
callbackQuery: 'cb', callbackQuery: 'cb',
callbackName: 'jsonp_func', callbackName: 'jsonp_func',
name: 'LancerComet', name: 'LancerComet',
age: 100 age: 100
}) })
``` ```
## Module exports ## Module exports
- `VueJsonp: PluginObject<never>` - `VueJsonp: PluginObject<never>`
- `jsonp<T>: (url: string, param?: IJsonpParam, timeout?: number) => Promise<T>` - `jsonp<T>: (url: string, param?: IJsonpParam, timeout?: number) => Promise<T>`
## API ## API
### IJsonpParam ### IJsonpParam
IJsonpParam is the type of param for jsonp function. IJsonpParam is the type of param for jsonp function.
```ts ```ts
/** /**
* JSONP parameter declaration. * JSONP parameter declaration.
*/ */
interface IJsonpParam { interface IJsonpParam {
/** /**
* Callback query name. * Callback query name.
* This param is used to define the query name of the callback function. * This param is used to define the query name of the callback function.
* *
* @example * @example
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice" * // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
* jsonp('/some-url', { * jsonp('/some-url', {
* callbackQuery: 'myCallback', * callbackQuery: 'myCallback',
* callbackName: 'jsonp_func', * callbackName: 'jsonp_func',
* myCustomUrlParam: 'veryNice' * myCustomUrlParam: 'veryNice'
* }) * })
* *
* @default callback * @default callback
*/ */
callbackQuery?: string callbackQuery?: string
/** /**
* Callback function name. * Callback function name.
* This param is used to define the jsonp function name. * This param is used to define the jsonp function name.
* *
* @example * @example
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice" * // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
* jsonp('/some-url', { * jsonp('/some-url', {
* callbackQuery: 'myCallback', * callbackQuery: 'myCallback',
* callbackName: 'jsonp_func', * callbackName: 'jsonp_func',
* myCustomUrlParam: 'veryNice' * myCustomUrlParam: 'veryNice'
* }) * })
* *
* @default jsonp_ + randomStr() * @default jsonp_ + randomStr()
*/ */
callbackName?: string callbackName?: string
/** /**
* Custom data. * Custom data.
*/ */
[key: string]: any [key: string]: any
} }
``` ```
## Example ## Example
```ts ```ts
import Vue from 'vue' import Vue from 'vue'
import { VueJsonp } from 'vue-jsonp' import { VueJsonp } from 'vue-jsonp'
Vue.use(VueJsonp) Vue.use(VueJsonp)
const vm = new Vue() const vm = new Vue()
const { code, data, message } = await vm.$jsonp<{ const { code, data, message } = await vm.$jsonp<{
code: number, code: number,
message: string, message: string,
data: { data: {
id: number, id: number,
nickname: string nickname: string
} }
}>('/my-awesome-url', { }>('/my-awesome-url', {
name: 'MyName', age: 20 name: 'MyName', age: 20
}) })
assert(code === 0) assert(code === 0)
assert(message === 'ok') assert(message === 'ok')
assert(data.id === 1) assert(data.id === 1)
assert(data.nickname === 'John Smith') assert(data.nickname === 'John Smith')
``` ```
```ts ```ts
import { jsonp } from 'vue-jsonp' import { jsonp } from 'vue-jsonp'
const result = await jsonp<string>('/my-awesome-url') const result = await jsonp<string>('/my-awesome-url')
assert(result === 'such a jsonp') assert(result === 'such a jsonp')
``` ```
## License ## License
MIT MIT

@ -1,73 +1,73 @@
/** /**
* Vue Jsonp. * Vue Jsonp.
* # Carry Your World # * # Carry Your World #
* *
* @author: LancerComet * @author: LancerComet
* @license: MIT * @license: MIT
*/ */
import { PluginObject } from 'vue/types/plugin'; import { PluginObject } from 'vue/types/plugin';
declare module 'vue/types/vue' { declare module 'vue/types/vue' {
interface Vue { interface Vue {
$jsonp: typeof jsonp; $jsonp: typeof jsonp;
} }
} }
/** /**
* Vue JSONP. * Vue JSONP.
*/ */
declare const VueJsonp: PluginObject<never>; declare const VueJsonp: PluginObject<never>;
/** /**
* JSONP function. * JSONP function.
* *
* @param { string } url Target URL address. * @param { string } url Target URL address.
* @param { IJsonpParam } param Querying params object. * @param { IJsonpParam } param Querying params object.
* @param { number } timeout Timeout setting (ms). * @param { number } timeout Timeout setting (ms).
* *
* @example * @example
* jsonp('/url', { * jsonp('/url', {
* callbackQuery: '' * callbackQuery: ''
* callbackName: '', * callbackName: '',
* name: 'LancerComet', * name: 'LancerComet',
* age: 26 * age: 26
* }, 1000) * }, 1000)
*/ */
declare function jsonp<T = any>(url: string, param?: IJsonpParam, timeout?: number): Promise<T>; declare function jsonp<T = any>(url: string, param?: IJsonpParam, timeout?: number): Promise<T>;
export { VueJsonp, jsonp }; export { VueJsonp, jsonp };
/** /**
* JSONP parameter declaration. * JSONP parameter declaration.
*/ */
interface IJsonpParam { interface IJsonpParam {
/** /**
* Callback query name. * Callback query name.
* This param is used to define the query name of the callback function. * This param is used to define the query name of the callback function.
* *
* @example * @example
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice" * // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
* jsonp('/some-url', { * jsonp('/some-url', {
* callbackQuery: 'myCallback', * callbackQuery: 'myCallback',
* callbackName: 'jsonp_func', * callbackName: 'jsonp_func',
* myCustomUrlParam: 'veryNice' * myCustomUrlParam: 'veryNice'
* }) * })
* *
* @default callback * @default callback
*/ */
callbackQuery?: string; callbackQuery?: string;
/** /**
* Callback function name. * Callback function name.
* This param is used to define the jsonp function name. * This param is used to define the jsonp function name.
* *
* @example * @example
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice" * // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
* jsonp('/some-url', { * jsonp('/some-url', {
* callbackQuery: 'myCallback', * callbackQuery: 'myCallback',
* callbackName: 'jsonp_func', * callbackName: 'jsonp_func',
* myCustomUrlParam: 'veryNice' * myCustomUrlParam: 'veryNice'
* }) * })
* *
* @default jsonp_ + randomStr() * @default jsonp_ + randomStr()
*/ */
callbackName?: string; callbackName?: string;
/** /**
* Custom data. * Custom data.
*/ */
[key: string]: any; [key: string]: any;
} }

@ -1,20 +1,20 @@
/** /**
* Generate random string. * Generate random string.
* *
* @return { string } * @return { string }
*/ */
declare function randomStr(): string; declare function randomStr(): string;
/** /**
* Format params into querying string. * Format params into querying string.
* *
* @return {string[]} * @return {string[]}
*/ */
declare function formatParams(queryKey: string, value: any): string[]; declare function formatParams(queryKey: string, value: any): string[];
/** /**
* Flat querys. * Flat querys.
* *
* @param {string[] | (string[])[]} array * @param {string[] | (string[])[]} array
* @returns * @returns
*/ */
declare function flatten(array: string[] | (string[])[]): string[]; declare function flatten(array: string[] | (string[])[]): string[];
export { formatParams, flatten, randomStr }; export { formatParams, flatten, randomStr };

@ -1,80 +1,50 @@
{ {
"_from": "vue-jsonp", "name": "vue-jsonp",
"_id": "vue-jsonp@2.0.0", "version": "2.0.0",
"_inBundle": false, "description": "A tiny library for handling JSONP request.",
"_integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==", "main": "./dist/index.js",
"_location": "/vue-jsonp", "module": "./dist/index.esm.js",
"_phantomChildren": {}, "keywords": [
"_requested": { "Vue",
"type": "tag", "JSONP"
"registry": true, ],
"raw": "vue-jsonp", "files": [
"name": "vue-jsonp", "dist/",
"escapedName": "vue-jsonp", "index.d.ts",
"rawSpec": "", "README.md"
"saveSpec": null, ],
"fetchSpec": "latest" "scripts": {
}, "build": "rollup -c",
"_requiredBy": [ "test": "jest",
"#USER", "pretest": "npm run build",
"/" "preversion": "npm run test",
], "prepublish": "npm run test"
"_resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz", },
"_shasum": "3bfac56bb72941a2511c11e1a123b876f03427f7", "author": {
"_spec": "vue-jsonp", "name": "LancerComet",
"_where": "C:\\Users\\Administrator\\Documents\\high-mini", "email": "chw644@hotmail.com"
"author": { },
"name": "LancerComet", "repository": {
"email": "chw644@hotmail.com" "type": "git",
}, "url": "https://github.com/LancerComet/vue-jsonp.git"
"bugs": { },
"url": "https://github.com/LancerComet/vue-jsonp/issues" "license": "MIT",
}, "devDependencies": {
"bundleDependencies": false, "@types/expect-puppeteer": "^4.4.3",
"deprecated": false, "@types/jest": "^26.0.14",
"description": "A tiny library for handling JSONP request.", "@types/jest-environment-puppeteer": "^4.4.0",
"devDependencies": { "@types/puppeteer": "^3.0.2",
"@types/expect-puppeteer": "^4.4.3", "jest": "^26.4.2",
"@types/jest": "^26.0.14", "jest-puppeteer": "^4.4.0",
"@types/jest-environment-puppeteer": "^4.4.0", "puppeteer": "^5.3.1",
"@types/puppeteer": "^3.0.2", "rollup": "^2.28.2",
"jest": "^26.4.2", "rollup-plugin-cleanup": "^3.2.1",
"jest-puppeteer": "^4.4.0", "rollup-plugin-delete": "^2.0.0",
"puppeteer": "^5.3.1", "rollup-plugin-terser": "^7.0.2",
"rollup": "^2.28.2", "rollup-plugin-typescript2": "^0.27.3",
"rollup-plugin-cleanup": "^3.2.1", "ts-jest": "^26.4.1",
"rollup-plugin-delete": "^2.0.0", "tslint": "^6.1.3",
"rollup-plugin-terser": "^7.0.2", "typescript": "^4.0.3",
"rollup-plugin-typescript2": "^0.27.3", "vue": "^2.6.12"
"ts-jest": "^26.4.1", }
"tslint": "^6.1.3", }
"typescript": "^4.0.3",
"vue": "^2.6.12"
},
"files": [
"dist/",
"index.d.ts",
"README.md"
],
"homepage": "https://github.com/LancerComet/vue-jsonp#readme",
"keywords": [
"Vue",
"JSONP"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"name": "vue-jsonp",
"repository": {
"type": "git",
"url": "git+https://github.com/LancerComet/vue-jsonp.git"
},
"scripts": {
"build": "rollup -c",
"prepublish": "npm run test",
"pretest": "npm run build",
"preversion": "npm run test",
"test": "jest"
},
"version": "2.0.0"
}

@ -1,23 +1,235 @@
{ {
"name": "视频播放器组件", "name": "视频播放器组件",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 2,
"requires": true, "requires": true,
"dependencies": { "packages": {
"base-64": { "": {
"version": "1.0.0", "name": "视频播放器组件",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", "version": "1.0.0",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==" "dependencies": {
"base-64": "^1.0.0",
"vue-jsonp": "^2.0.0",
"vue-lottie": "^0.2.1"
}
},
"node_modules/@babel/parser": {
"version": "7.20.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.0.tgz",
"integrity": "sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg==",
"peer": true,
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "2.7.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.13.tgz",
"integrity": "sha512-zzu2rLRZlgIU+OT3Atbr7Y6PG+LW4wVQpPfNRrGDH3dM9PsrcVfa+1pKb8bW467bGM3aDOvAnsYLWVpYIv3GRg==",
"peer": true,
"dependencies": {
"@babel/parser": "^7.18.4",
"postcss": "^8.4.14",
"source-map": "^0.6.1"
}
},
"node_modules/base-64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
},
"node_modules/csstype": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
"integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==",
"peer": true
},
"node_modules/lottie-web": {
"version": "5.9.6",
"resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.9.6.tgz",
"integrity": "sha512-JFs7KsHwflugH5qIXBpB4905yC1Sub2MZWtl/elvO/QC6qj1ApqbUZJyjzJseJUtVpgiDaXQLjBlIJGS7UUUXA=="
},
"node_modules/nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"peer": true,
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
"peer": true
},
"node_modules/postcss": {
"version": "8.4.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
"integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
}
],
"peer": true,
"dependencies": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/vue": {
"version": "2.7.13",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.13.tgz",
"integrity": "sha512-QnM6ULTNnPmn71eUO+4hdjfBIA3H0GLsBnchnI/kS678tjI45GOUZhXd0oP/gX9isikXz1PAzSnkPspp9EUNfQ==",
"peer": true,
"dependencies": {
"@vue/compiler-sfc": "2.7.13",
"csstype": "^3.1.0"
}
},
"node_modules/vue-jsonp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA=="
},
"node_modules/vue-lottie": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/vue-lottie/-/vue-lottie-0.2.1.tgz",
"integrity": "sha512-zInUX69Ij8MhVR3XArpu4PqqBoufwKxS5UMutWCPm59VUaB5H6GtnaIzf9M+l6aYU+Kr8gF/W9dzWLgRuU6V+Q==",
"dependencies": {
"lottie-web": "^5.1.9"
},
"peerDependencies": {
"vue": "^2.5.16"
}
}
}, },
"jweixin-module": { "dependencies": {
"version": "1.6.0", "@babel/parser": {
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz", "version": "7.20.0",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==" "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.0.tgz",
}, "integrity": "sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg==",
"vue-jsonp": { "peer": true
"version": "2.0.0", },
"resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz", "@vue/compiler-sfc": {
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==" "version": "2.7.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.13.tgz",
"integrity": "sha512-zzu2rLRZlgIU+OT3Atbr7Y6PG+LW4wVQpPfNRrGDH3dM9PsrcVfa+1pKb8bW467bGM3aDOvAnsYLWVpYIv3GRg==",
"peer": true,
"requires": {
"@babel/parser": "^7.18.4",
"postcss": "^8.4.14",
"source-map": "^0.6.1"
}
},
"base-64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
},
"csstype": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
"integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==",
"peer": true
},
"lottie-web": {
"version": "5.9.6",
"resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.9.6.tgz",
"integrity": "sha512-JFs7KsHwflugH5qIXBpB4905yC1Sub2MZWtl/elvO/QC6qj1ApqbUZJyjzJseJUtVpgiDaXQLjBlIJGS7UUUXA=="
},
"nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"peer": true
},
"picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
"peer": true
},
"postcss": {
"version": "8.4.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
"integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==",
"peer": true,
"requires": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"peer": true
},
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"peer": true
},
"vue": {
"version": "2.7.13",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.13.tgz",
"integrity": "sha512-QnM6ULTNnPmn71eUO+4hdjfBIA3H0GLsBnchnI/kS678tjI45GOUZhXd0oP/gX9isikXz1PAzSnkPspp9EUNfQ==",
"peer": true,
"requires": {
"@vue/compiler-sfc": "2.7.13",
"csstype": "^3.1.0"
}
},
"vue-jsonp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA=="
},
"vue-lottie": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/vue-lottie/-/vue-lottie-0.2.1.tgz",
"integrity": "sha512-zInUX69Ij8MhVR3XArpu4PqqBoufwKxS5UMutWCPm59VUaB5H6GtnaIzf9M+l6aYU+Kr8gF/W9dzWLgRuU6V+Q==",
"requires": {
"lottie-web": "^5.1.9"
}
}
} }
}
} }

@ -11,6 +11,8 @@
"uniapp" "uniapp"
], ],
"dependencies": { "dependencies": {
"base-64": "^1.0.0" "base-64": "^1.0.0",
"vue-jsonp": "^2.0.0",
"vue-lottie": "^0.2.1"
} }
} }

@ -54,7 +54,7 @@
<view class="width96 mart10 alijusstart"> <view class="width96 mart10 alijusstart">
<view class="fcorfff font12 height20" style="background-color: #3da7e7;border-radius: 20px;padding: 0px 5px;">嗨森逛 <view class="fcorfff font12 height20" style="background-color: #3da7e7;border-radius: 20px;padding: 0px 5px;">嗨森逛
</view> </view>
<view class="width70 fotrt font14 fcor666">月销 500</view> <view class="width70 fotrt font14 fcor666">月销 {{goodsData[0].salesCount}}</view>
</view> </view>
</view> </view>
<!-- 服务-规则选择 --> <!-- 服务-规则选择 -->

@ -77,6 +77,13 @@
¥0 ¥0
</view> </view>
</view> </view>
<view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
<!-- // --> <!-- // -->
<view class="width100 concont mart10 backcorfff"> <view class="width100 concont mart10 backcorfff">
@ -245,9 +252,6 @@
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '@/components/cj-slider/cj-slider.vue'; import cjSlider from '@/components/cj-slider/cj-slider.vue';
let app = getApp(); let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default { export default {
components: { components: {
ssPaymentPassword, ssPaymentPassword,
@ -278,12 +282,19 @@
availIntegal: 0, // availIntegal: 0, //
gasOrderList: '', // gasOrderList: '', //
rebateIntegral: '', // rebateIntegral: '', //
Integrastu: 1 // Integrastu: 1 ,//
identificationCode: '', //
} }
}, },
onLoad(e) { onLoad(e) {
this.gasOrderList = app.globalData.pelletoilList; this.gasOrderList = app.globalData.pelletoilList;
this.orderPrice = this.gasOrderList.highChildOrderList[0].goodsPrice; this.orderPrice = this.gasOrderList.highChildOrderList[0].goodsPrice;
// #ifdef H5
this.identificationCode = app.globalData.staffCode;
// #endif
// #ifdef MP
this.identificationCode = app.globalData.identificationCode;
// #endif
}, },
onShow() { onShow() {
let that = this; let that = this;
@ -491,7 +502,8 @@
}) })
if (this.payPrice == 0 && !this.orderNo) { if (this.payPrice == 0 && !this.orderNo) {
let goods = { let goods = {
"identificationCode": this.gasOrderList.identificationCode, "identificationCode": this.gasOrderList.identificationCode,
"promoteCode":this.identificationCode,
"payGold": this.priceValue[1], "payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId, "memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword, "payPwd": this.PaymentPassword,
@ -729,7 +741,8 @@
title: '提交订单中...' title: '提交订单中...'
}) })
let goods = { let goods = {
"identificationCode": this.gasOrderList.identificationCode, "identificationCode": this.gasOrderList.identificationCode,
"promoteCode":this.identificationCode,
"payGold": this.priceValue[1], "payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId, "memDiscountId": this.memDiscountId,
"highChildOrderList": [{ "highChildOrderList": [{

@ -8,29 +8,15 @@
<view class="font18 fontwig6 fcor333 text1">{{couponList.couponName}}</view> <view class="font18 fontwig6 fcor333 text1">{{couponList.couponName}}</view>
<view class="font13 fcor666 mart10">规格: 默认</view> <view class="font13 fcor666 mart10">规格: 默认</view>
<view class="price-number mart10" v-if="isDiscont"> <view class="price-number mart10" v-if="isDiscont">
<view class="price font16" v-if="couponList.payType == 1">{{couponList.salesPrice}}</view> <view class="price font16">{{couponList.salesPrice}}</view>
<view class="price font16" v-else>
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
</image>{{couponList.salesPrice * 100}}
</view>
<view class="flright fotrt paddleft10">x1</view> <view class="flright fotrt paddleft10">x1</view>
</view> </view>
<view class="price-number mart10" v-if="!isDiscont"> <view class="price-number mart10" v-if="!isDiscont">
<view class="price font16" v-if="couponList.payType == 1">{{couponList.discountPrice}}</view> <view class="price font16">{{couponList.discountPrice}}</view>
<view class="price font16" v-else>
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
</image>{{couponList.discountPrice*100}}
</view>
<view class="number fcor666 font13 margle" <view class="number fcor666 font13 margle"
v-if="couponList.payType == 1 && couponList.salesPrice != couponList.discountPrice"> v-if="couponList.salesPrice != couponList.discountPrice">
{{couponList.salesPrice}} {{couponList.salesPrice}}
</view> </view>
<view class="number fcor666 font13 margle"
v-if="couponList.payType != 1 && couponList.salesPrice != couponList.discountPrice">
<image style="width: 15px;height: 15px;" src="../../static/img/jfh.png">
</image>{{couponList.salesPrice*100}}
</view>
<view class="flright fotrt paddleft10">x1</view> <view class="flright fotrt paddleft10">x1</view>
</view> </view>
</view> </view>
@ -40,24 +26,12 @@
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
商品总额 商品总额
</view> </view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" <view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" v-if=" isDiscont">
v-if="couponList.payType == 1 && isDiscont">
{{couponList.salesPrice}} {{couponList.salesPrice}}
</view> </view>
<view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem" <view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" v-if="!isDiscont">
v-if="couponList.payType != 1 && isDiscont">
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
</image>{{couponList.salesPrice*100}}
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999"
v-if="couponList.payType == 1 && !isDiscont">
{{couponList.discountPrice}} {{couponList.discountPrice}}
</view> </view>
<view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem"
v-if="couponList.payType != 1 && !isDiscont">
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
</image>{{couponList.discountPrice*100}}
</view>
</view> </view>
<view class="width94 line1 mart5 marb5"></view> <view class="width94 line1 mart5 marb5"></view>
@ -96,85 +70,88 @@
</view> </view>
<view class="width94 comorder mart10"> <view class="width94 comorder mart10">
<view class="height50 width100 backcorfff">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="width92 alijusstart paddtop20">
支付方式<text class="jfrecharge" @click="jumpdeposits" v-if="couponList.payType == 2">积分充值</text> <view class="width30 fcor333 fontwig6 font16">
积分抵扣
</view>
<view class="cj-slider">
<view class="flleft fotct font14 fcor666" style="width: 15%;">0</view>
<cj-slider style="width: 60%; float:left;" v-if="isDiscount" v-model="priceValue" :min="0"
:max="availIntegal" :step="1" :blockWidth="40" @start="blockStart" @moving="blockMoving"
@end="blockEnd" />
<view class="flright fotrt font14 fcor666" style="width: 25%;">{{availIntegal}}</view>
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5" v-if="couponList.payType == 2"></view> <view class="width94 line1 mart15 marb5"></view>
<view class="height50 width100 backcorfff" @tap="paytype='jinbi'" v-if="couponList.payType == 2 "> <view class="height50 width100 backcorfff">
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;"> <view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;">
积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text> 抵扣金额
</view> </view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" <view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;"> style="align-items: center;">
<radio :checked="paytype=='jinbi'" color="#0083f5" /> ¥{{priceValue[1] / 100}}
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5" v-if="couponList.payType != 2"></view> <view class="width94 line1 mart5 marb5"></view>
<view class="height50 width100 backcorfff" @tap="paytype='unionPay'" v-if="couponList.payType != 2">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="height40 width100 backcorfff">
银联支付 <view class="width40 flleft fcor666 font15 fontwig6 text1 alijusstart" style="padding-left: 2%;">
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text>
</view> </view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" <view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1"
style="align-items: center;"> style="align-items: center;">
<radio :checked="paytype=='unionPay'" color="#0083f5" /> {{rebateIntegral}}积分
</view> </view>
</view> <view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
<view class="width94 line1 mart5 marb5" v-if="couponList.payType == 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='gonghuika'" v-if="couponList.payType == 2">
<view class="width70 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
工会卡支付<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;"> style="align-items: center;">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" /> {{rebateIntegral}}
</view> </view>
</view> </view>
<!-- <view class="width94 line1 mart5 marb5" v-if="couponList.displayArea == 4"></view> <view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;">
<view class="height50 width100 backcorfff" @tap="paytype='unionPaystags'" <image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
v-if="couponList.displayArea == 4"> <text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> </view>
银联分期
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
<radio :checked="paytype=='unionPaystags'" color="#0083f5" />
</view>
</view> -->
</view>
<!-- <view class="width94 comorder mart10">
<view class="height50 width100 backcorfff"> <view class="height50 width100 backcorfff">
<view class="width80p flleft fcor333 fontwig6 font14" style="padding-left: 4%;"> <view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
<text style="color: #0083F5;">条约协议</text>点击立即支付即代表同意 支付方式
<!-- <text class="jfrecharge" @click="jumpdeposits" v-if="couponList.payType == 2">积分充值</text> -->
</view> </view>
<view class="width15 flright fotct"> </view>
<image class="jtcs" src="../../static/img/jt.png"></image> <view class="width100" v-for="(item,index) in paytypeList" :key="index">
<view class="width94 line1 mart5 marb5" v-if="item == 4"></view>
<view class="height50 width100 backcorfff" @tap="paytype='4'" v-if="item == 4">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
银联支付
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='4'" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5" v-if="item == 3"></view>
<view class="height50 width100 backcorfff" @tap="paytype='3'" v-if="item == 3">
<view class="width70 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
工会卡支付<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view>
</view> </view>
</view> </view>
</view> --> </view>
<view class="width100 height60"></view> <view class="width100 height60"></view>
<view class="footer"> <view class="footer">
<view class="settlement"> <view class="settlement">
<view class="sum">实付:<view class="money" v-if="couponList.payType == 1">{{paytheprice}}</view> <view class="sum">实付:<view class="money">{{paytheprice}}</view>
<view class="money aliitem" v-else>
<image style="width: 15px;height: 15px;vertical-align: sub;" src="../../static/img/jfx.png">
</image>{{paytheprice*100}}
</view>
</view> </view>
<!-- #ifdef MP -->
<button class="btn" open-type="getPhoneNumber" v-if="user.phone == null"
@getphonenumber="getPhoneNumber">立即支付</button>
<button class="btn" v-else @tap="toPay">立即支付</button>
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="btn" v-if="user.phone == null" @click="jumpH5Bding">立即支付</button> <button class="btn" v-if="user.phone == null" @click="jumpH5Bding">立即支付</button>
<button class="btn" v-else @tap="toPay">立即支付</button> <button class="btn" v-else @tap="toPay">立即支付</button>
<!-- #endif -->
</view> </view>
</view> </view>
@ -199,19 +176,18 @@
<script> <script>
import { import {
addOrder, create,
getCouponById, getCouponById,
GetPhoneNumber,
getUserNormalDiscountList, getUserNormalDiscountList,
bindUserPhone,
orderToPay,
orderToGoldPay,
findUser, findUser,
unionPay, unionPay,
hltUnionCardPay, getRebateIntegral,
getHuiLianTongCardBalance cardPay,
getHuiLianTongCardBalance,
getThirdPartyByDetail
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue'; import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '../../components/cj-slider/cj-slider.vue';
import ssPaymentPassword from '../../components/sanshui-payment-password' import ssPaymentPassword from '../../components/sanshui-payment-password'
let app = getApp(); let app = getApp();
@ -222,19 +198,14 @@
}, },
data() { data() {
return { return {
buylist: [], //
goodsPrice: 0.0, //
sumPrice: 0.0, //
freight: 12.00, //
note: '', //
int: 1200, //
deduction: 0, //
couponId: '', couponId: '',
couponList: [], couponList: [],
UserNormalDiscountList: [], UserNormalDiscountList: [],
imageUrl: app.globalData.imgUrl, imageUrl: app.globalData.imgUrl,
deductionPrice: '0.00', deductionPrice: '0.00',
paytheprice: '', paytheprice: '', //
saveprice: '', //
orderPrice: '', //
radioStatus: true, radioStatus: true,
memDiscountId: '', memDiscountId: '',
user: '', user: '',
@ -246,21 +217,28 @@
storeId: '', storeId: '',
isDiscont: false, isDiscont: false,
coupondiscountid: '', coupondiscountid: '',
typeId: '', orderDetails: '', //
identificationCode: '' // payGold: '', //
identificationCode: '', //
paytypeList: [], //
priceValue: [0, 0], //
changePrice: '', //
isDiscount: true,
availIntegal: '', //
isUse: true, //
rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1 //
}; };
}, },
onLoad(option) { onLoad(option) {
this.couponId = option.id; this.couponId = option.id;
this.typeId = option.typeid;
this.getCouponById(); this.getCouponById();
}, },
onShow() { onShow() {
let that = this; let that = this;
that.paytype = ''; that.paytype = '';
that.user = app.globalData.userInfo; that.user = app.globalData.userInfo;
that.getUserNormalDiscountList();
that.findUser(); that.findUser();
}, },
onHide() { onHide() {
@ -291,6 +269,31 @@
} }
}, },
methods: { methods: {
//
getThirdPartyByDetail() {
let datas = {
platformId: 3,
regionId: app.globalData.cityId,
productType: 4,
productId: this.couponList.couponSource
}
getThirdPartyByDetail(datas).then(res => {
if (res.return_code == '000000') {
this.rechargeDes = res.return_data;
this.paytypeList = res.return_data.productPayType.split(',');
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1);
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2);
let pprice = parseFloat(this.paytheprice * 100).toFixed(0)
let payprice = parseFloat(this.paytheprice * 100 * zkprice).toFixed(
0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
} else {
this.availIntegal = payprice;
}
}
});
},
// //
findUser() { findUser() {
let params; let params;
@ -301,6 +304,8 @@
if (this.user.hltCardNo) { if (this.user.hltCardNo) {
this.getHuiLianTongCardBalance(); this.getHuiLianTongCardBalance();
} }
this.getUserNormalDiscountList();
this.getRebateIntegral();
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: res.return_data data: res.return_data
@ -321,6 +326,24 @@
}); });
}, },
//
getRebateIntegral() {
let datas = {
"companyId": app.globalData.companyId,
"price": this.paytheprice,
"productId": 1,
"type": 1,
}
getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') {
this.rebateIntegral = res.return_data;
this.Integrastu = 1;
} else {
this.rebateIntegral = res.return_msg;
this.Integrastu = 2;
}
})
},
// //
getCouponById() { getCouponById() {
uni.showLoading({ uni.showLoading({
@ -330,12 +353,13 @@
couponId: this.couponId couponId: this.couponId
} }
getCouponById(params).then(res => { getCouponById(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.couponList = res.return_data; this.couponList = res.return_data;
this.paytheprice = res.return_data.discountPrice; this.paytheprice = res.return_data.discountPrice;
uni.hideLoading() this.saveprice = res.return_data.discountPrice;
} else { this.orderPrice = res.return_data.salesPrice
uni.hideLoading() this.getThirdPartyByDetail();
} }
}) })
}, },
@ -343,37 +367,88 @@
showPopup() { showPopup() {
this.$refs.popup.show(); this.$refs.popup.show();
}, },
//
radioChanges(item) { radioChanges(item) {
if (this.memDiscountId == item.highDiscount.id) { // this.paytheprice = this.orderPrice;
this.rechangeload();
if (this.memDiscountId == item.id) { //
this.memDiscountId = ''; this.memDiscountId = '';
this.coupondiscountid = '';
this.paytheprice = this.couponList.discountPrice;
this.deductionPrice = '0.00'; this.deductionPrice = '0.00';
this.priceCaluc(this.saveprice);
this.isDiscont = false; this.isDiscont = false;
} else { // } else { //
this.isDiscont = true; this.isDiscont = true;
this.memDiscountId = item.highDiscount.id; this.memDiscountId = item.id;
this.coupondiscountid = item.id;
if (item.highDiscount.discountType == 1) { if (item.highDiscount.discountType == 1) {
// //
this.deductionPrice = item.highDiscount.discountPrice; if (this.orderPrice > item.highDiscount.discountCondition) {
this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2); this.memDiscountId = item.id;
} else if (item.highDiscount.discountType == 2) { //
this.deductionPrice = item.highDiscount.discountPrice;
let oldprice = this.orderPrice - this.deductionPrice;
this.priceCaluc(oldprice);
} else {
uni.showToast({
title: '请满' + item.highDiscount.discountCondition + '使用此券',
icon: 'none',
duration: 2000
})
}
}
if (item.highDiscount.discountType == 2) {
// //
this.deductionPrice = item.highDiscount.discountPrice; this.deductionPrice = item.highDiscount.discountPrice;
this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2); let oldprice = this.orderPrice - this.deductionPrice;
} else if (item.highDiscount.discountType == 3) { this.priceCaluc(oldprice);
// }
this.deductionPrice = parseFloat(this.couponList.salesPrice - (this.couponList.salesPrice * if (item.highDiscount.discountType == 3) {
item //
.highDiscount.discountPrice)).toFixed(2) this.deductionPrice = parseFloat(this.orderPrice - (this.orderPrice * item.highDiscount
this.paytheprice = parseFloat(this.couponList.salesPrice * item.highDiscount.discountPrice) .discountPrice))
.toFixed(2); .toFixed(2);
let oldprice = parseFloat(this.orderPrice * item.highDiscount.discountPrice).toFixed(2);
this.priceCaluc(oldprice);
} }
} }
this.$refs.popup.hide(); this.$refs.popup.hide();
}, },
//
priceCaluc(item) {
let zkprice = parseFloat(this.rechargeDes.integralDiscount / 100).toFixed(2);
let pprice = parseFloat(item * 100).toFixed(0);
let payprice = parseFloat(item * 100 * zkprice).toFixed(0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
this.priceValue[1] = 0;
} else {
this.availIntegal = payprice;
this.priceValue[1] = 0;
}
this.reload();
this.calculatepayPrice();
},
//
calculatepayPrice() {
if (this.deductionPrice == 0) {
this.paytheprice = parseFloat(this.saveprice - (parseFloat(this.priceValue[1] / 100).toFixed(2)))
.toFixed(
2);
} else {
this.paytheprice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) -
this
.deductionPrice).toFixed(2);
}
this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
this.$nextTick(() => (this.isUse = true))
},
//
reload() {
this.isDiscount = false;
this.$nextTick(() => (this.isDiscount = true))
},
// //
getUserNormalDiscountList() { getUserNormalDiscountList() {
let params = { let params = {
@ -391,33 +466,17 @@
url: '/pages/login/register?id=2' url: '/pages/login/register?id=2'
}) })
}, },
// toPay() {
getPhoneNumber(PhoneNumber) { if (this.paytheprice == 0) {
let params = { if (!this.user.isSetPayPwd) {
openId: app.globalData.openId, uni.navigateTo({
iv: PhoneNumber.detail.iv, url: '../login/updatePas/updatePas'
encryptedData: PhoneNumber.detail.encryptedData
}
GetPhoneNumber(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
this.user = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
}) })
let that = this; return;
that.toPay();
} }
}); this.$refs.paymentPassword.modalFun('show');
}, return;
toPay() { }
if (this.paytype == '') { if (this.paytype == '') {
uni.showToast({ uni.showToast({
title: '请选择支付方式', title: '请选择支付方式',
@ -426,6 +485,12 @@
}) })
return; return;
} }
if (this.orderDetails) {
this.wechatPay(this.orderDetails);
return;
}
uni.showLoading({ uni.showLoading({
title: '提交订单中...' title: '提交订单中...'
}) })
@ -433,21 +498,22 @@
this.storeId = app.globalData.storeid this.storeId = app.globalData.storeid
} }
let goods = { let goods = {
"memDiscountId": this.coupondiscountid, "childOrderList": [{
"identificationCode": this.identificationCode,
"highChildOrderList": [{
"goodsType": 1,
"goodsId": this.couponId, "goodsId": this.couponId,
"goodsPrice": this.paytheprice,
"goodsType": 1,
"saleCount": 1, "saleCount": 1,
"storeId": this.storeId }],
}] "payGold": this.priceValue[1],
"promoteCode": this.identificationCode,
memDiscountId: this.memDiscountId
} }
addOrder(goods).then(res => { create(goods).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.hideLoading(); uni.hideLoading();
this.jumpType = res.return_data.highChildOrderList[0].ext1; this.jumpType = res.return_data.highChildOrderList[0].ext1;
this.orderId = res.return_data.id; this.orderId = res.return_data.orderNo;
this.orderToPay(res.return_data); this.wechatPay(res.return_data);
} else { } else {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
@ -477,39 +543,16 @@
} }
}, },
// //
orderToPay(item) { wechatPay(item) {
let that = this; let that = this;
if (that.paytype == 'jinbi') { if (that.paytype == '4') {
if (that.user.gold < that.paytheprice * 100) {
uni.showToast({
icon: 'none',
title: '积分不足',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../user/deposit/deposit'
})
}, 1000)
}
});
return;
}
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../login/updatePas/updatePas'
})
return;
}
that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'unionPay') {
that.unionPay(); that.unionPay();
} else if (that.paytype == 'unionPaystags') { } else if (that.paytype == 'unionPaystags') {
// //
uni.redirectTo({ uni.redirectTo({
url: '../tabBar/order/stagesUrl/stagesUrl?orderid=' + that.orderId url: '../tabBar/order/stagesUrl/stagesUrl?orderid=' + that.orderId
}) })
} else if (that.paytype == 'gonghuika') { } else if (that.paytype == '3') {
if (that.tongCardPrice < that.paytheprice) { if (that.tongCardPrice < that.paytheprice) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -552,7 +595,7 @@
// //
unionPay() { unionPay() {
let goods = { let goods = {
"orderId": this.orderId "orderNo": this.orderId
} }
unionPay(goods).then(res => { unionPay(goods).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
@ -607,64 +650,97 @@
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
}) })
if (this.paytype == 'jinbi') {
let params = { if (this.paytheprice == 0) {
"orderId": this.orderId, let goods = {
"password": this.PaymentPassword "childOrderList": [{
"goodsId": this.couponId,
"goodsPrice": this.paytheprice,
"goodsType": 1,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword,
memDiscountId: this.memDiscountId
} }
orderToGoldPay(params).then(res => { create(goods).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({ uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId url: '../pay/success/success?id=' + this
.couponId
});
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
}); });
} }
if (res.return_code == '102130') { })
uni.navigateTo({ return;
url: '../../login/updatePas/updatePas' }
})
} let params = {
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({ uni.showToast({
title: res.return_msg, title: '支付成功'
icon: 'none'
}) })
}) app.globalData.storeid = '';
return; app.globalData.storename = '';
} uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
let params = { });
"orderId": this.orderId, return;
"cardNo": this.user.hltCardNo.cardNo, }
"password": this.PaymentPassword if (res.return_code == '102130') {
} uni.navigateTo({
hltUnionCardPay(params).then(res => { url: '../../login/updatePas/updatePas'
uni.hideLoading(); })
if (res.return_code == '000000') { return;
uni.showToast({ }
title: '支付成功' uni.showToast({
}) title: res.return_msg,
app.globalData.storeid = ''; icon: 'none'
app.globalData.storename = ''; })
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
}) })
}, },
blockStart() {},
blockMoving() {
// console.log('')
},
//
blockEnd() {
this.isDiscount = 1;
if (this.deductionPrice == 0) {
this.paytheprice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2))
.toFixed(
2);
} else {
this.paytheprice = parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this
.deductionPrice).toFixed(2);
}
if (this.paytheprice == 0) {
this.isUse = false;
this.paytype = '';
} else {
this.isUse = true;
}
this.getRebateIntegral();
},
// //
jumpdeposits() { jumpdeposits() {
uni.navigateTo({ uni.navigateTo({
@ -691,16 +767,10 @@
margin-top: 30rpx; margin-top: 30rpx;
} }
.cj-slider {
.jfrecharge { width: 100%;
background-color: #0083f5;
padding: 5px 20rpx;
color: #fff;
margin-left: 50%;
justify-content: center;
align-items: center; align-items: center;
font-size: 30rpx; display: flex;
border-radius: 40rpx;
} }
.goodsimg { .goodsimg {
@ -802,8 +872,8 @@
display: flex; display: flex;
image { image {
width: 170rpx; width: 160rpx;
max-height: 170rpx; max-height: 160rpx;
} }
} }
@ -893,6 +963,17 @@
} }
} }
.jfrecharge {
background-color: #0083f5;
padding: 5px 20rpx;
color: #fff;
margin-left: 50%;
justify-content: center;
align-items: center;
font-size: 30rpx;
border-radius: 40rpx;
}
.goods-list { .goods-list {
width: 100%; width: 100%;
padding: 0; padding: 0;

@ -10,9 +10,6 @@
cancelOrderByOrderNo cancelOrderByOrderNo
} from '../../Utils/Api.js' } from '../../Utils/Api.js'
let app = getApp(); let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default { export default {
data() { data() {
return { return {

File diff suppressed because one or more lines are too long

@ -47,6 +47,9 @@
:text="therrNum" type="error" size="normal"></uni-badge> :text="therrNum" type="error" size="normal"></uni-badge>
<uni-badge style="width: 20px;position: absolute; left: 42%;" <uni-badge style="width: 20px;position: absolute; left: 42%;"
v-if="row.text == '已支付' && orderPayNum " :text="orderPayNum" type="error" size="normal"> v-if="row.text == '已支付' && orderPayNum " :text="orderPayNum" type="error" size="normal">
</uni-badge>
<uni-badge style="width: 20px;position: absolute; left: 63%;"
v-if="row.text == '已完成' && whetherCheckNum " :text="whetherCheckNum" type="error" size="normal">
</uni-badge> </uni-badge>
<view class="img"> <view class="img">
<image :src="row.icon" class="icon40" mode="widthFix"></image> <image :src="row.icon" class="icon40" mode="widthFix"></image>
@ -54,22 +57,22 @@
<view class="text mart10">{{row.text}}</view> <view class="text mart10">{{row.text}}</view>
</view> </view>
</view> </view>
<view class="width90 mart10 height60"> <view class="width90 mart10 height60" v-if="nopaylist != ''">
<swiper circular="true" interval="3000" autoplay="true"> <swiper circular="true" interval="3000" autoplay="true" @change="swiperChange">
<swiper-item v-for="(swiper,index) in nopaylist" :key="index"> <swiper-item v-for="(swiper,index) in nopaylist" :key="index" @click="jumpDetails(swiper.orderNo,swiper.productType)">
<view class="alijusstart border-8r backcor9 height60 "> <view class="alijusstart border-8r backcor9 height60 ">
<image mode="widthFix" class="icon40 margle10" src="../../../static/img/user/user5.png"> <image mode="widthFix" class="icon40 margle10" src="../../../static/img/user/user5.png">
</image> </image>
<view class="width50 margle10"> <view class="width50 margle10">
<view class="font15 fcor333 fontspec">等待付款</view> <view class="font15 fcor333 fontspec">等待付款</view>
<view class="font12 fcor666 fontspec mart5">剩余时间: 13:44</view> <view class="font12 fcor666 fontspec mart5">剩余时间: {{countdownm}}:{{countdowns}}</view>
</view> </view>
<view class="topay"> <view class="topay">
去支付 去支付
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
</view> </view>
@ -88,20 +91,22 @@
</view> </view>
</view> </view>
<view class="mart15 width90 alijus fotct paddbotm10"> <view class="mart15 width90 alijus fotct paddbotm10">
<view class="width31"> <view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view> <view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥2400</view> <view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">{{userAccount.integral}}</view>
<view class="fontspec font14 fcor333 mart5">积分余额</view> <view class="fontspec font14 fcor333 mart5">积分余额</view>
</view> </view>
<view class="width31"> <view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view> <view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥2400</view> <view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥{{userAccount.oilCardPrice}}
<view class="fontspec font14 fcor333 mart5">油卡余额</view> </view>
</view> <view class="fontspec font14 fcor333 mart5">油卡余额</view>
<view class="width31"> </view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view> <view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥2400</view> <view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view>
<view class="fontspec font14 fcor333 mart5">工会卡余额</view> <view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥{{userAccount.hltCardPrice}}
</view>
<view class="fontspec font14 fcor333 mart5">工会卡余额</view>
</view> </view>
</view> </view>
</view> </view>
@ -150,8 +155,10 @@
</template> </template>
<script> <script>
import { import {
GetPhoneNumber, findUser,
findUser getUserAccount,
getUserOrderList,
orderCheck
} from "../../../Utils/Api.js"; } from "../../../Utils/Api.js";
import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue"; import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue";
let app = getApp() let app = getApp()
@ -191,9 +198,12 @@
], ],
// //
czList: '', czList: '',
nopaylist: [1, 2, 3, 4, 5], nopaylist: [], //
assetsstu: 2, assetsstu: 2,
userphone:'' // userphone:'' ,//
userAccount: '', //,
countdownm: '', //
countdowns: '', //
} }
}, },
//page.json "enablePullDownRefresh": true //page.json "enablePullDownRefresh": true
@ -275,42 +285,92 @@
}) })
} }
}); });
}, },
getPhoneNumber(PhoneNumber) { //
let params = { getUserOrderList() {
openId: app.globalData.openId, uni.showLoading({
iv: PhoneNumber.detail.iv, title: '加载中...'
encryptedData: PhoneNumber.detail.encryptedData })
} let params = {
GetPhoneNumber(params).then(res => { status: 1,
if (res.return_code == '000000') { pageNum: 1,
app.globalData.userInfo = res.return_data pageSize: 5
.object }
.highUser; getUserOrderList(params).then(res => {
uni.setStorage({ uni.hideLoading();
key: "user", if (res.return_code == '000000' && res.return_data.list != '') {
data: res.return_data this.nopaylist = res.return_data.list;
.object this.timesettime(res.return_data.list[0].createTime);
.highUser } else {
}) this.nopaylist = [];
this.toDeposit(); }
} })
}); },
//
swiperChange(e) {
this.timesettime(this.nopaylist[e.detail.current].createTime);
},
//
jumpDetails(e, item) {
this.orderCheck(e);
if (item == 1 || item == 2 || item == 3) {
uni.navigateTo({
url: '/qianzhu-KFC/order-details/order-details?id=' + e
})
return;
}
uni.navigateTo({
url: '/pages/user/order_details/order_details?id=' + e
})
},
//
orderCheck(item) {
let datas = {
orderNo: item
}
orderCheck(datas).then(res => {
});
}, },
// //
geTel(tel) { geTel(tel) {
var reg = /^(\d{3})\d{4}(\d{4})$/; var reg = /^(\d{3})\d{4}(\d{4})$/;
this.userphone = tel.replace(reg, "$1****$2"); this.userphone = tel.replace(reg, "$1****$2");
}, },
//
timesettime(item) {
var nowtime = new Date(), //
endtime = item + 600000; //
var lefttime = endtime - nowtime, //
leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), //
lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime /
(1000 * 60 * 60) % 24) + leftd * 24) : Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd *
24), //
leftm = Math.floor(lefttime / (1000 * 60) % 60) < 10 ? "0" + Math.floor(lefttime / (1000 * 60) % 60) :
Math.floor(lefttime / (1000 * 60) % 60), //
lefts = Math.floor(lefttime / 1000 % 60) < 10 ? "0" + Math.floor(lefttime / 1000 % 60) : Math.floor(
lefttime / 1000 % 60); //
this.countdownm = leftm //
this.countdowns = lefts //
},
// //
updatestu(item) { updatestu(item) {
if (item == 1) { if (item == 1) {
this.assetsstu = 2; this.assetsstu = 2;
} }
if (item == 2) { if (item == 2) {
this.assetsstu = 1; this.getUserAccount();
} }
}, },
//
getUserAccount() {
getUserAccount().then(res => {
if (res.return_code == '000000') {
this.assetsstu = 1;
this.userAccount = res.return_data;
}
});
},
// 广 // 广
jumppage(item) { jumppage(item) {
// if (item == 1) { // if (item == 1) {

@ -178,10 +178,10 @@
<script> <script>
import { import {
addOrderPay, create,
orderToUnionPay, unionPay,
findUser, findUser,
hltUnionCardPayghk, cardPay,
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
getUserOrderPreList, getUserOrderPreList,
findById, findById,
@ -410,7 +410,7 @@
} else { } else {
this.payPrice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this this.payPrice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this
.deductionPrice).toFixed(2); .deductionPrice).toFixed(2);
} }
this.getRebateIntegral(); this.getRebateIntegral();
}, },
rechangeload() { rechangeload() {
@ -444,19 +444,24 @@
} }
let params = { let params = {
"childOrderList": [{
"goodsId": that.objectId,
"goodsType": 6,
"rechargeContent": that.rechargeContent,
"saleCount": 1
}],
"payGold": that.priceValue[1],
"companyId": app.globalData.companyId,
"memDiscountId": that.memDiscountId, "memDiscountId": that.memDiscountId,
"rechargeContent": that.rechargeContent, "payPwd": ""
"goodsId": that.objectId,
"integralNum": that.priceValue[1],
"password": ''
} }
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}) })
addOrderPay(params).then(res => { create(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.return_code == '000000') { if (res.return_code == '000000') {
that.orderToUnionPay(res.return_data.id); that.orderToUnionPay(res.return_data.orderNo);
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
@ -468,9 +473,9 @@
// //
orderToUnionPay(item) { orderToUnionPay(item) {
let params = { let params = {
"orderId": item "orderNo": item
} }
orderToUnionPay(params).then(res => { unionPay(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.uniontopay(res.return_data.prepayid, item); this.uniontopay(res.return_data.prepayid, item);
} else { } else {
@ -590,16 +595,21 @@
} }
if (this.payPrice == 0) { if (this.payPrice == 0) {
let params = { let params = {
"memDiscountId": this.memDiscountId, "childOrderList": [{
"rechargeContent": this.rechargeContent, "goodsId": that.objectId,
"goodsId": this.objectId, "goodsType": 6,
"integralNum": this.priceValue[1], "rechargeContent": that.rechargeContent,
"password": this.PaymentPassword "saleCount": 1
}],
"payGold": that.priceValue[1],
"companyId": app.globalData.companyId,
"memDiscountId": that.memDiscountId,
"payPwd": ""
} }
addOrderPay(params).then(res => { create(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.orderId = res.return_data.id; this.orderId = res.return_data.orderNo;
uni.reLaunch({ uni.reLaunch({
url: '../Phone-recharge-details/Phone-recharge-details?id=' + url: '../Phone-recharge-details/Phone-recharge-details?id=' +
this.orderId this.orderId
@ -621,11 +631,11 @@
return; return;
} }
let params = { let params = {
"orderId": this.orderId, "orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
hltUnionCardPayghk(params).then(res => { cardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({

@ -70,9 +70,6 @@
orderToPay, orderToPay,
unionPay unionPay
} from "../../../Utils/Api.js"; } from "../../../Utils/Api.js";
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default { export default {
data() { data() {
return { return {

@ -1,37 +1,51 @@
<template> <template>
<view> <view>
<!-- 顶部类型 --> <!-- 顶部类型 -->
<scroll-view scroll-x='true' class="srollview width100" scroll-with-animation> <scroll-view scroll-x='true' class="srollview width100" :style="{top:headerTop}" scroll-with-animation>
<view class="conent" :class="[newstypeid == index ? 'activeconent' : 'frontconent']" <view class="conent" :class="[newstypeid == item.codeValue ? 'activeconent' : 'frontconent']"
v-for="(item,index) in newsTyplist" :key="index">{{item}}</view> v-for="(item,index) in newsTyplist" :key="index" @click="queryMsgByList(item.codeValue)">
{{item.codeName}}</view>
</scroll-view> </scroll-view>
<view class="mart10 height70"></view> <view class="mart10 height70"></view>
<!-- 内容 --> <!-- 内容 -->
<view class="newscont width90 border-8r backcorfff mart20" v-for="(item,index) in newsTyplist" :key="index">
<view class="alijusstart mart10 margle10"> <view v-if="newsList == ''"
<image src="../../../static/img/cusservice.png" mode="widthFix" class="icon30"></image> class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="newscont width90 border-8r backcorfff mart20" v-for="(item,index) in newsList" :key="index">
<view class="alijusstart mart10 margle10" v-if="item.type == 1">
<image src="../../../static/img/user/notive.png" mode="widthFix" class="icon30"></image>
<text class="font18 margle" style="color: #0B1D83;">服务通知</text> <text class="font18 margle" style="color: #0B1D83;">服务通知</text>
</view> </view>
<view class="alijusstart mart10 margle10" v-if="item.type == 2">
<image src="../../../static/img/user/order.png" mode="widthFix" class="icon30"></image>
<text class="font18 margle" style="color: #0B1D83;">交易信息</text>
</view>
<view class="alijusstart mart10 margle10" v-if="item.type == 3">
<image src="../../../static/img/user/kefu.png" mode="widthFix" class="icon30"></image>
<text class="font18 margle" style="color: #0B1D83;">客服消息</text>
</view>
<view class="width90 line1 mart10"></view> <view class="width90 line1 mart10"></view>
<!-- 服务通知 --> <!-- 服务通知 -->
<view class="width90 mart20" v-if="index != 1"> <view class="width90 mart20" v-if="item.type == 1">
<view class="font18 fcor333">最新电影已上映快来抢购</view> <view class="font18 fcor333">{{item.title}}</view>
<image mode="widthFix" class="width100 mart10" src="../../../static/img/user/1.png"></image> <image mode="widthFix" class="width100 mart10" :src="imageUrl+item.image"></image>
</view> </view>
<!-- 交易信息 --> <!-- 交易信息 -->
<view class="width90 mart20" v-if="index == 1"> <view class="width90 mart20" v-if="item.type == 2">
<view class="font18 fcor333">付款成功</view> <view class="font18 fcor333" >{{item.title}}</view>
<view class="mart10 border-r backcor9"> <view class="mart10 border-r backcor9">
<view class="font20 colore95 fontwig6 paddtop10 fotct">¥9.58</view> <view class="font20 colore95 fontwig6 paddtop10 fotct">¥{{item.content | msgFormat('price')}}</view>
<view class="width94 mart10 alijusstart font14"> <view class="width94 mart10 alijusstart font14">
<view class="fontwig6 fcor333 width30">交易对象</view> <view class="fontwig6 fcor333 width30">交易对象</view>
<view class="width70 fcor666 fotrt">电信话费充值200元</view> <view class="width70 fcor666 fotrt">{{item.content | msgFormat('objectName') }}</view>
</view> </view>
<view class="width94 mart15 alijusstart font14"> <view class="width94 mart15 alijusstart font14">
<view class="fontwig6 fcor333 width30">交易时间</view> <view class="fontwig6 fcor333 width30">交易时间</view>
<view class="width70 fcor666 fotrt">2022年9月30日</view> <view class="width70 fcor666 fotrt">{{item.content | msgFormat('time') }}</view>
</view> </view>
<view class="font16 fcor666 alijus mart10 fotct paddbotm20">查看详情<image <view class="font16 fcor666 alijus mart10 fotct paddbotm20">查看详情<image
src="../../../static/img/jt.png" mode="widthFix" class="icon15 margle"></image> src="../../../static/img/jt.png" mode="widthFix" class="icon15 margle"></image>
@ -40,11 +54,11 @@
</view> </view>
<!-- 客服消息 --> <!-- 客服消息 -->
<view class="width90 mart20" v-if="index == 2"> <view class="width90 mart20" v-if="item.type == 3">
<view class="font18 fcor333">客服消息提醒</view> <view class="font18 fcor333">{{item.title}}</view>
<view class="mart10 border-r backcor9"> <view class="mart10 border-r backcor9">
<view class="width92 fcor333 fontwig6 paddtop15"> <view class="width92 fcor333 fontwig6 paddtop15">
你的问题我们已提交技术人员处理请耐心等候 {{item.content}}
</view> </view>
<view class="font16 fcor666 alijus mart10 fotct paddbotm20">查看详情<image <view class="font16 fcor666 alijus mart10 fotct paddbotm20">查看详情<image
@ -58,17 +72,62 @@
</template> </template>
<script> <script>
import {
queryMsgByList,
getDictionaryByCodeType
} from '../../../Utils/Api.js';
let app = getApp();
export default { export default {
data() { data() {
return { return {
newsTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], // imageUrl: app.globalData.imgUrl,
newstypeid: 1 ,//id imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png',
newsTyplist: [], //
newsList: [], //
newstypeid: 1, //id
headerTop: '0px'
}
},
filters: {
//
msgFormat: function(value,value1) {
let a = JSON.parse(value);
return a[value1];
} }
}, },
onLoad() { onLoad() {
this.getDictionaryByCodeType();
}, },
methods: { methods: {
//
getDictionaryByCodeType() {
let datas = {
codeType: 'MSG_TYPE'
}
getDictionaryByCodeType(datas).then(res => {
if (res.return_code == '000000') {
this.newsTyplist = res.return_data;
this.newstypeid = res.return_data[0].codeValue;
this.queryMsgByList(res.return_data[0].codeValue);
}
})
},
//
queryMsgByList(item) {
this.newstypeid = item;
let datas = {
companyId: app.globalData.companyId,
type: item
}
queryMsgByList(datas).then(res => {
if (res.return_code == '000000' && res.return_data) {
this.newsList = res.return_data;
}else{
this.newsList = [];
}
})
}
} }
} }
</script> </script>
@ -78,10 +137,9 @@
background-color: #f3f3f3; background-color: #f3f3f3;
} }
.srollview { .srollview {
position: fixed; position: fixed;
top: 0px; height: 70px;
height: 70px;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -90,11 +148,11 @@
.conent { .conent {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
margin-top: 15px; margin-top: 15px;
padding-left: 10px; padding-left: 10px;
font-size: 11px; font-size: 11px;
padding-right: 10px; padding-right: 10px;
margin-left: 15px; margin-left: 15px;
display: inline-flex; display: inline-flex;
flex-direction: column; flex-direction: column;

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<!-- 搜索 --> <!-- 搜索 -->
<view class="backcorfff width100 height120" style="position: fixed;z-index: 999;" :style="{top:headerTop}" > <view class="backcorfff width100 height120" style="position: fixed;z-index: 999;" :style="{top:headerTop}">
<view class="alijusstart"> <view class="alijusstart">
<view class="input-box"> <view class="input-box">
<view class="icon search"></view> <view class="icon search"></view>
@ -14,15 +14,16 @@
<!-- 顶部导航 --> <!-- 顶部导航 -->
<view class="topTabBar"> <view class="topTabBar">
<view class="grid" v-for="(grid,tbIndex) in orderType" :key="tbIndex" @tap="showType(tbIndex)"> <view class="grid" v-for="(grid,tbIndex) in orderType" :key="tbIndex" @tap="showType(tbIndex)">
<view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}} <view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<scroll-view scroll-x='true' :style="{top:headerswper}" class="srollview width100" scroll-with-animation> <scroll-view scroll-x='true' :style="{top:headerswper}" class="srollview width100" scroll-with-animation>
<view class="conent" :class="[ordertypeid == index ? 'activeconent' : 'frontconent']" <view class="conent" :class="[ordertypeid == item.codeValue ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index">{{item}}</view> v-for="(item,index) in orderTyplist" :key="index" @click="selectlist(item.codeValue)">{{item.codeName}}
</view>
</scroll-view> </scroll-view>
<!-- 考虑非APP端长列表和复杂的DOM使用scroll-view会卡顿所以漂浮顶部选项卡使用page本身的滑动 --> <!-- 考虑非APP端长列表和复杂的DOM使用scroll-view会卡顿所以漂浮顶部选项卡使用page本身的滑动 -->
<view class="order-list"> <view class="order-list">
@ -31,10 +32,10 @@
<image :src="imagewxUrl+imgadres"></image> <image :src="imagewxUrl+imgadres"></image>
</view> </view>
<view class="row" v-for="(row,index) in orderList" :key="index" <view class="row" v-for="(row,index) in orderList" :key="index"
@click="jumpDetails(row.highChildOrderList[0].goodsType,row.id)"> @click="jumpDetails(row.orderNo,row.productType)">
<view class="width96 mart10 alijusstart"> <view class="width96 mart10 alijusstart">
<view class="width70"> <view class="width70">
<view class="orderlabel">在线加油</view> <view class="orderlabel">{{orderTyplist | msgFormat(row.productType)}}</view>
<view class="unread" v-if="row.orderStatus == 3 && !row.whetherCheck"></view> <view class="unread" v-if="row.orderStatus == 3 && !row.whetherCheck"></view>
</view> </view>
<view class="width30 fotrt fcor666 font12"> <view class="width30 fotrt fcor666 font12">
@ -42,11 +43,12 @@
</view> </view>
</view> </view>
<view class="width96 height25 mart10"> <view class="width96 height22 mart10">
<view class="width70 flleft fotlt "> <view class="width70 flleft fotlt ">
<view class="font16 fontwig6 text1 fcor333 alijusstart"> <view class="font16 fontwig6 fcor333 alijusstart">
<image src="../../../static/img/order5.png" class="marglerig" <image src="../../../static/img/order5.png" class="marglerig"
style="width: 50rpx;height: 50rpx;"></image>{{row.highChildOrderList[0].goodsName}} style="width: 50rpx;height: 50rpx;"></image>
<view class="width100 text1">{{row.title}}</view>
</view> </view>
</view> </view>
<view class="width30 flright fotrt fcor666 font15 fotrt"> <view class="width30 flright fotrt fcor666 font15 fotrt">
@ -59,24 +61,23 @@
订单编号:{{row.orderNo}} 订单编号:{{row.orderNo}}
</view> </view>
<view class="width96 height25 paddbotm10 alijusstart"> <view class="width96 height25 paddbotm10 alijusstart">
<view class="width70 fotlt "> <view class="width60 fotlt ">
<view class="font12 text1 fcor999 mart5"> <view class="font12 text1 fcor999 mart5">
下单时间 : {{row.createTime | formatDate('-')}} 下单时间 : {{row.createTime | formatDate('-')}}
</view> </view>
</view> </view>
<view class="width30 fotrt fcor666 font15 fotrt"> <view class="width40 fotrt fcor666 font15 fotrt alijusend">
<view class="fotrt font12 text1 fcor999 mart5"> <view class="font12 width25 fcor999">合计:</view>
合计:<text class="fcor333 font18"> {{row.payPrice}} </text> <view class="fotlt text1 font18 fcor333 ">
{{row.payPrice}}
</view> </view>
</view> </view>
</view> </view>
<view class="width96 mart10 marb5" style="border:1px dashed #f4f4f4;" <view class="width96 mart10 marb5" style="border:1px dashed #f4f4f4;" v-if="(row.orderStatus==1)">
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
</view> </view>
<view class="btns" <view class="btns" v-if="(row.orderStatus==1)">
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
<block> <block>
<view class="default" @click.stop="cancelOrder(row.id,row.highChildOrderList[0].goodsType)"> <view class="default" @click.stop="cancel(row.orderNo)">
取消订单 取消订单
</view> </view>
<view class="pay" @click.stop="toPayment(row)">立即支付</view> <view class="pay" @click.stop="toPayment(row)">立即支付</view>
@ -90,9 +91,9 @@
<script> <script>
import { import {
getUserOrderList, getUserOrderList,
cancelOrder, cancel,
thirdCancelOrder, orderCheck,
orderCheck getDictionaryByCodeType
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp() let app = getApp()
export default { export default {
@ -101,8 +102,8 @@
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png', imgadres: 'noorder.png',
imgadres1: 'dhf.png', imgadres1: 'dhf.png',
headerTop: "0px", headerTop: "0px",
headerswper:'120px', headerswper: '120px',
typeText: { typeText: {
1: '等待付款', 1: '等待付款',
2: '订单已支付', 2: '订单已支付',
@ -125,8 +126,12 @@
typeId: '', typeId: '',
imageUrl: app.globalData.imgUrl, imageUrl: app.globalData.imgUrl,
reFresh: "", reFresh: "",
orderTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], // orderTyplist: [{
ordertypeid: 1 //id codeValue: '',
codeName: '全部'
}], //
ordertypeid: '', //id
couponName: '' //
} }
}, },
@ -140,6 +145,7 @@
this.list = this.orderList[this.typeId]; this.list = this.orderList[this.typeId];
this.tabbarIndex = tbIndex; this.tabbarIndex = tbIndex;
this.getUserOrderList(); this.getUserOrderList();
this.getDictionaryByCodeType();
}, },
onReachBottom() { onReachBottom() {
this.getUserOrderList(); this.getUserOrderList();
@ -163,6 +169,15 @@
mm = mm >= 10 ? mm : "0" + mm; mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s; s = s >= 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`; return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;
},
//
msgFormat: function(value, value1) {
for (var i = 0; i < value.length; i++) {
if (value1 == value[i].codeValue) {
let a = value[i].codeName;
return a;
}
}
} }
}, },
watch: { watch: {
@ -186,16 +201,11 @@
uni.hideLoading() uni.hideLoading()
return false; return false;
} }
let statusId;
if (this.typeId == 2) {
statusId = '2,6,7';
} else {
statusId = this.typeId;
}
let pagenum = this.pageNum; let pagenum = this.pageNum;
let params = { let params = {
status: statusId, status: this.typeId,
searchTitle: this.couponName,
productType: this.ordertypeid,
pageNum: this.pageNum, pageNum: this.pageNum,
pageSize: this.pageSize pageSize: this.pageSize
} }
@ -214,14 +224,24 @@
uni.hideLoading() uni.hideLoading()
} }
}) })
},
//
getDictionaryByCodeType() {
let datas = {
codeType: 'ORDER_PRODUCT_TYPE'
}
getDictionaryByCodeType(datas).then(res => {
if (res.return_code == '000000') {
for (var i = 0; i < res.return_data.length; i++) {
this.orderTyplist.push(res.return_data[i]);
}
}
})
}, },
// //
jumpDetails(item, e) { jumpDetails(e, item) {
console.log('===========')
this.orderCheck(e); this.orderCheck(e);
if (item == 4 || item == 9 || item == 10) { if (item == 1 || item == 2 || item == 3) {
uni.navigateTo({ uni.navigateTo({
url: '/qianzhu-KFC/order-details/order-details?id=' + e url: '/qianzhu-KFC/order-details/order-details?id=' + e
}) })
@ -235,7 +255,7 @@
// //
orderCheck(item) { orderCheck(item) {
let datas = { let datas = {
orderId: item orderNo: item
} }
orderCheck(datas).then(res => { orderCheck(datas).then(res => {
@ -253,15 +273,23 @@
} }
this.getUserOrderList(); this.getUserOrderList();
}, },
showLogistics(row) { //
selectlist(item) {
this.ordertypeid = item;
this.pageNum = 1;
this.orderList = []
this.isNoMoreData = false;
this.getUserOrderList();
}, },
remindDeliver(row) { //
uni.showToast({ toSearch() {
title: '已提醒商家发货' this.pageNum = 1;
}) this.orderList = []
this.isNoMoreData = false;
this.getUserOrderList();
}, },
cancelOrder(row, item) { //
cancel(row) {
let that = this; let that = this;
uni.showModal({ uni.showModal({
title: '取消订单', title: '取消订单',
@ -272,33 +300,9 @@
title: '加载中...' title: '加载中...'
}) })
let params = { let params = {
orderId: row, orderNo: row,
}
if (item == 9 || item == 4) {
thirdCancelOrder(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
title: res.return_data,
icon: 'none',
duration: 2000
})
this.pageNum = 1;
this.orderList = []
this.isNoMoreData = false;
that.getUserOrderList();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
uni.hideLoading()
}
})
return;
} }
cancelOrder(params).then(res => { cancel(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
@ -335,19 +339,9 @@
} else { } else {
payTypes = 2; payTypes = 2;
} }
if (row.highChildOrderList[0].goodsType == 4 || row.highChildOrderList[0].goodsType == 9 || row
.highChildOrderList[0].goodsType == 10) {
uni.redirectTo({
url: '/qianzhu-KFC/payment-method/payment-method?orderId=' + row.id + '&amount=' + row
.payPrice + '&productType=' + row.productType
})
return;
}
uni.redirectTo({ uni.redirectTo({
url: "/pages/pay/payment/payment?amount=" + row.payPrice + url: '/qianzhu-KFC/payment-method/payment-method?orderId=' + row.id + '&amount=' + row
'&paytype=' + payTypes + '&orderId=' + row.id + '&couponId=' + this.orderList[0] .payPrice + '&productType=' + row.productType
.highChildOrderList[0].goodsId + '&typeaout=' + this.orderList[0].highChildOrderList[0]
.ext1 + '&goodsType=' + row.highChildOrderList[0].goodsType
}) })
} }
} }
@ -437,8 +431,7 @@
.srollview { .srollview {
position: fixed; position: fixed;
z-index: 999; z-index: 999;
height: 50px; height: 50px;
top: 120px;
background-color: #f3f3f3; background-color: #f3f3f3;
display: flex; display: flex;
flex-direction: row; flex-direction: row;

@ -113,27 +113,27 @@
<view class="width20 flright fotrt paddtright10 font15 fcor666 alijun" style="align-items: center;"> <view class="width20 flright fotrt paddtright10 font15 fcor666 alijun" style="align-items: center;">
¥{{priceValue[1] / 100}} ¥{{priceValue[1] / 100}}
</view> </view>
</view> </view>
<view class="width94 line1 marb5"></view> <view class="width94 line1 marb5"></view>
<view class="height40 width100 backcorfff"> <view class="height40 width100 backcorfff">
<view class="width40 flleft fcor666 font15 text1 alijusstart" style="padding-left: 2%;"> <view class="width40 flleft fcor666 font15 text1 alijusstart" style="padding-left: 2%;">
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image> <image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text> <text>下单返积分</text>
</view> </view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1" <view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1"
style="align-items: center;"> style="align-items: center;">
{{rebateIntegral}}积分 {{rebateIntegral}}积分
</view> </view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2" <view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
style="align-items: center;"> style="align-items: center;">
{{rebateIntegral}} {{rebateIntegral}}
</view> </view>
</view> </view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;"> <view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;">
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image> <image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text> <text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view> </view>
<view class="width94 line1 marb5"></view> <view class="width94 line1 marb5"></view>
<view class="height50 width100"> <view class="height50 width100">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式 支付方式
@ -237,7 +237,7 @@
<view class="width92 height110 tccs mart10 alijus" v-for="(items, index) in OrderPreList" :key="index" <view class="width92 height110 tccs mart10 alijus" v-for="(items, index) in OrderPreList" :key="index"
@click="radioChanges(items)"> @click="radioChanges(items)">
<image mode="widthFix" :src="imageUrl+items.discountImg"></image> <image mode="widthFix" :src="imageUrl+items.discountImg"></image>
<view class="alijus width60 margle10"> <view class="alijus width60 margle10">
<view class="width80p"> <view class="width80p">
<view class="font16 fontwig6 fcor333 text1">{{items.discountName}}</view> <view class="font16 fontwig6 fcor333 text1">{{items.discountName}}</view>
<view class="font13 fcor999 mart5">有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}} <view class="font13 fcor999 mart5">有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
@ -276,18 +276,15 @@
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue' import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'
import wybPopup from '@/components/wyb-popup/wyb-popup.vue' import wybPopup from '@/components/wyb-popup/wyb-popup.vue'
import { import {
xbkaddOrder, create,
getThirdPartyByDetail, getThirdPartyByDetail,
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
findUser, findUser,
qianzhuorderToUnionPay, unionPay,
czhltUnionCardPay, cardPay,
getUserOrderPreList, getUserOrderPreList,
getRebateIntegral getRebateIntegral
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
let app = getApp(); let app = getApp();
export default { export default {
components: { components: {
@ -325,8 +322,8 @@
OrderPreList: [], // OrderPreList: [], //
imageUrl: app.globalData.imgUrl, // imageUrl: app.globalData.imgUrl, //
orderPrice: 0, // orderPrice: 0, //
rechargeDes: '', // rechargeDes: '', //
rebateIntegral: '', // rebateIntegral: '', //
Integrastu: 1 // Integrastu: 1 //
} }
}, },
@ -336,14 +333,14 @@
this.getAllPrice(); this.getAllPrice();
this.getAllCount(); this.getAllCount();
}, },
onShow() { onShow() {
this.customerMobile = app.globalData.userInfo.phone; this.customerMobile = app.globalData.userInfo.phone;
this.findUser(); this.findUser();
}, },
methods: { methods: {
// //
getThirdPartyByDetail() { getThirdPartyByDetail() {
if (this.typeid == 1) { if (this.typeid == 1) {
this.productType = 2; this.productType = 2;
} }
@ -371,24 +368,24 @@
} }
} }
}); });
}, },
// //
getRebateIntegral() { getRebateIntegral() {
let datas = { let datas = {
"companyId": app.globalData.companyId, "companyId": app.globalData.companyId,
"price": this.payPrice, "price": this.payPrice,
"productId": this.productType, "productId": this.productType,
"type": 4, "type": 4,
} }
getRebateIntegral(datas).then(res => { getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.rebateIntegral = res.return_data; this.rebateIntegral = res.return_data;
this.Integrastu = 1; this.Integrastu = 1;
} else { } else {
this.rebateIntegral = res.return_msg; this.rebateIntegral = res.return_msg;
this.Integrastu = 2; this.Integrastu = 2;
} }
}) })
}, },
// //
findUser() { findUser() {
@ -398,7 +395,7 @@
this.user = res.return_data; this.user = res.return_data;
this.getHuiLianTongCardBalance(); this.getHuiLianTongCardBalance();
this.getThirdPartyByDetail(); this.getThirdPartyByDetail();
this.getUserOrderPreList(); this.getUserOrderPreList();
this.getRebateIntegral(); this.getRebateIntegral();
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
@ -494,7 +491,7 @@
this.paytype = ''; this.paytype = '';
} else { } else {
this.isUse = true; this.isUse = true;
} }
this.getRebateIntegral(); this.getRebateIntegral();
}, },
// //
@ -574,35 +571,47 @@
}) })
data2 = data1.join(','); data2 = data1.join(',');
datas = { datas = {
customerMobile: this.customerMobile, "childOrderList": [{
regionId: app.globalData.cityId, "goodsId": 9999,
storeCode: this.storeCode, "customerMobile": this.customerMobile,
productType: this.productType, "storeCode": this.storeCode,
platformId: this.showType, "platformId": this.showType,
orderItems: data2, "productType": this.productType,
eatType: this.sttypeid, "orderItems": data2,
integralNum: this.priceValue[1], "eatType": this.sttypeid,
memDiscountId: this.memDiscountId "goodsType": 4,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
} }
} }
if (this.typeid == 2) { if (this.typeid == 2) {
datas = { datas = {
customerMobile: this.customerMobile, "childOrderList": [{
regionId: app.globalData.cityId, "goodsId": 9999,
storeCode: this.storeCode, "customerMobile": this.customerMobile,
productType: this.productType, "storeCode": this.storeCode,
platformId: this.showType, "platformId": this.showType,
orderItems: this.orderList, "productType": this.productType,
integralNum: this.priceValue[1], "orderItems": this.orderList,
memDiscountId: this.memDiscountId "goodsType": 9,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
} }
} }
xbkaddOrder(datas).then(res => { create(datas).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.orderId = res.return_data.id; this.orderId = res.return_data.orderNo;
let params = { let params = {
"orderId": res.return_data.id "orderNo": res.return_data.orderNo
} }
this.qianzhuorderToUnionPay(params); this.qianzhuorderToUnionPay(params);
} else { } else {
@ -703,8 +712,8 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed( this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this 2)) - this
.deductionPrice).toFixed(2)); .deductionPrice).toFixed(2));
} }
this.getRebateIntegral(); this.getRebateIntegral();
}, },
rechangeload() { rechangeload() {
@ -720,9 +729,9 @@
qianzhuorderToUnionPay(item) { qianzhuorderToUnionPay(item) {
let that = this; let that = this;
if (that.paytype == '4') { if (that.paytype == '4') {
qianzhuorderToUnionPay(item).then(res => { unionPay(item).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
that.uniontopay(res.return_data.prepayid); that.uniontopay(res.return_data.prepayid);
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
@ -769,31 +778,32 @@
duration: 2000 duration: 2000
}) })
} }
}, },
// //
uniontopay(item) { uniontopay(item) {
let that = this; let that = this;
upsdk.pluginReady(function() { upsdk.pluginReady(function() {
upsdk.pay({ upsdk.pay({
tn: item, tn: item,
success: function(res) { success: function(res) {
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.reLaunch({ uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId url: '/qianzhu-KFC/order-details/order-details?id=' + this
}) .orderId
}, })
fail: function(err) { },
uni.showToast({ fail: function(err) {
title: err.msg, uni.showToast({
icon: 'none', title: err.msg,
duration: 2000 icon: 'none',
}) duration: 2000
// , err.msg , TN, })
} // , err.msg , TN,
}); }
}); });
});
}, },
submitHandle(e) { submitHandle(e) {
uni.showLoading({ uni.showLoading({
@ -820,36 +830,49 @@
}) })
data2 = data1.join(','); data2 = data1.join(',');
datas = { datas = {
customerMobile: this.customerMobile, "childOrderList": [{
regionId: app.globalData.cityId, "goodsId": 9999,
storeCode: this.storeCode, "customerMobile": this.customerMobile,
productType: this.productType, "storeCode": this.storeCode,
platformId: this.showType, "platformId": this.showType,
orderItems: data2, "productType": this.productType,
eatType: this.sttypeid, "orderItems": data2,
password: this.PaymentPassword, "eatType": this.sttypeid,
integralNum: this.priceValue[1], "goodsType": 4,
memDiscountId: this.memDiscountId "saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
} }
} }
if (this.typeid == 2) { if (this.typeid == 2) {
datas = { datas = {
customerMobile: this.customerMobile, "childOrderList": [{
regionId: app.globalData.cityId, "goodsId": 9999,
storeCode: this.storeCode, "customerMobile": this.customerMobile,
productType: this.productType, "storeCode": this.storeCode,
platformId: this.showType, "platformId": this.showType,
orderItems: this.orderList, "productType": this.productType,
password: this.PaymentPassword, "orderItems": this.orderList,
integralNum: this.priceValue[1], "goodsType": 9,
memDiscountId: this.memDiscountId "saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
} }
} }
xbkaddOrder(datas).then(res => { create(datas).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.orderId = res.return_data.id; this.orderId = res.return_data.orderNo;
uni.reLaunch({ uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
}) })
@ -870,11 +893,11 @@
return; return;
} }
let params = { let params = {
"orderId": this.orderId, "orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
czhltUnionCardPay(params).then(res => { cardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({
@ -940,7 +963,7 @@
.footbtn { .footbtn {
bottom: 0px; bottom: 0px;
position: fixed; position: fixed;
} }
.btnpay { .btnpay {
@ -986,16 +1009,16 @@
margin-left: 180rpx; margin-left: 180rpx;
} }
.tccs { .tccs {
box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.2); box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.2);
border: 1px solid #f6f6f6; border: 1px solid #f6f6f6;
border-radius: 8px; border-radius: 8px;
image { image {
// float: left; // float: left;
width: 160rpx; width: 160rpx;
max-height: 160rpx; max-height: 160rpx;
// margin-left: 10px; // margin-left: 10px;
} }
} }
</style> </style>

@ -21,18 +21,18 @@
</view> </view>
<view v-if="(orderList.orderStatus == 2 || orderList.orderStatus == 3 )"> <view v-if="(orderList.orderStatus == 2 || orderList.orderStatus == 3 )">
<view v-if="typeid == 4 && orderList.list && phonestu == 2"> <view v-if="typeid == 4 && recinfo.list && phonestu == 2">
<view class="width90 mart15" style="display: flow-root;"> <view class="width90 mart15" style="display: flow-root;">
<view class="fcor333 mart15 font24 fontspec width50 fotlt flleft height30h fontwig6" <view class="fcor333 mart15 font24 fontspec width50 fotlt flleft height30h fontwig6"
v-for="(item,index) in orderList.list" :key='index'>{{item.code}} v-for="(item,index) in recinfo.list" :key='index'>{{item.code}}
<text class="medldcode fcorfff border-r font11">尾号{{item.phone}}</text> <text class="medldcode fcorfff border-r font11">尾号{{item.phone}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="fotct" v-if="typeid == 4 && orderList.list && phonestu == 1"> <view class="fotct" v-if="typeid == 4 && recinfo.list && phonestu == 1">
<view class="width90 mart15" style="display: flow-root;"> <view class="width90 mart15" style="display: flow-root;">
<view class="fcor333 mart15 font24 fontspec width50 fotlt flleft height30h fontwig6" <view class="fcor333 mart15 font24 fontspec width50 fotlt flleft height30h fontwig6"
v-for="(item,index) in orderList.list" :key='index'>{{item.code}} v-for="(item,index) in recinfo.list" :key='index'>{{item.code}}
<text class="medldcode fcorfff border-r font11">取餐码</text> <text class="medldcode fcorfff border-r font11">取餐码</text>
</view> </view>
</view> </view>
@ -46,11 +46,11 @@
<view class="width94 fcor666 font12 mart5">如有询问手机尾号请点击右侧按钮查看</view> <view class="width94 fcor666 font12 mart5">如有询问手机尾号请点击右侧按钮查看</view>
</view> </view>
<view class="width30"> <view class="width30">
<view class="phoneck width85 border-r" v-if="typeid == 4 && orderList.list && phonestu == 1" <view class="phoneck width85 border-r" v-if="typeid == 4 && recinfo.list && phonestu == 1"
@click="updatestu(2)"> @click="updatestu(2)">
查看手机尾号 查看手机尾号
</view> </view>
<view class="phoneck width85 border-r" v-if="typeid == 4 && orderList.list && phonestu == 2" <view class="phoneck width85 border-r" v-if="typeid == 4 && recinfo.list && phonestu == 2"
@click="updatestu(1)"> @click="updatestu(1)">
隐藏手机尾号 隐藏手机尾号
</view> </view>
@ -59,15 +59,15 @@
</view> </view>
<!-- 星巴克 --> <!-- 星巴克 -->
<view v-if="typeid == 9 && orderList.object.orderItems[0].code"> <view v-if="typeid == 9 && recinfo.object.orderItems[0].code">
<view class="fotct font18 width100 mart10 color2f6f43" <view class="fotct font18 width100 mart10 color2f6f43"
v-for="(item,index) in orderList.object.orderItems" :key='index'>{{item.code}}</view> v-for="(item,index) in recinfo.object.orderItems" :key='index'>{{item.code}}</view>
</view> </view>
<view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !orderList.list"> <view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !recinfo.list">
{{orderList.statusDesc}} {{recinfo.statusDesc}}
</view> </view>
<view class="fotct font20 width100 mart10 color2f6f43" <view class="fotct font20 width100 mart10 color2f6f43"
v-if="typeid == 9 && !orderList.object.orderItems[0].code">{{orderList.statusDesc}}</view> v-if="typeid == 9 && !recinfo.object.orderItems[0].code">{{recinfo.statusDesc}}</view>
</view> </view>
</view> </view>
@ -76,7 +76,7 @@
充值明细 充值明细
</view> </view>
<view class="width94 paddtop15 font16 fontwig6 alijusstart" v-else> <view class="width94 paddtop15 font16 fontwig6 alijusstart" v-else>
<image src="../static/imgs/desloca.png" mode="widthFix" class="icon20 marglerig"></image> 南充麦当劳潆华南路餐厅 <image src="../static/imgs/desloca.png" mode="widthFix" class="icon20 marglerig"></image> {{orderList.highChildOrderList[0].storeName}}
</view> </view>
<view class="width100 mart5"> <view class="width100 mart5">
<view class="width90 alijusstart mart15" v-for="(item,index) in orderList.highChildOrderList" <view class="width90 alijusstart mart15" v-for="(item,index) in orderList.highChildOrderList"
@ -85,15 +85,15 @@
<image :src="item.goodsImg" v-if="item.goodsImg" mode="widthFix" class="width100"></image> <image :src="item.goodsImg" v-if="item.goodsImg" mode="widthFix" class="width100"></image>
<image src="../static/imgs/vipcz.png" v-else mode="widthFix" class="width90w"></image> <image src="../static/imgs/vipcz.png" v-else mode="widthFix" class="width90w"></image>
</view> </view>
<view class="width50 font13 fcor666"> <view class="width50 font13 fcor333 fontwig6">
<view>{{item.goodsName}}</view> <view>{{item.goodsName}}</view>
<view class="font12 fcor999">{{item.saleCount}} </view> <view class="font13 fcor999">{{item.saleCount}} </view>
</view> </view>
<view class="width20"> <view class="width20">
<view class="width100 fcor333 font12">¥<text <view class="width100 fcor333 font12 fotrt">¥<text
class="fontwig6 font16">{{item.goodsActualPrice}}</text> class="fontwig6 font16">{{item.goodsActualPrice}}</text>
</view> </view>
<view class="width100 fcor999 font12" v-if="item.goodsActualPrice != item.goodsPrice" <view class="width100 fcor999 font14 fotrt" v-if="item.goodsActualPrice != item.goodsPrice"
style="text-decoration: line-through;"> style="text-decoration: line-through;">
¥{{item.goodsPrice}}</view> ¥{{item.goodsPrice}}</view>
</view> </view>
@ -117,7 +117,10 @@
</view> </view>
<view class="width92 fotrt mart5 font14 fcor999"> <view class="width92 fotrt mart5 font14 fcor999">
优惠券 <text class="margle fcoreb5 font16 fontwig6">¥ {{orderList.deductionPrice}}</text> 优惠券优惠 <text class="margle fcoreb5 font16 fontwig6">¥ {{orderList.deductionCouponPrice}}</text>
</view>
<view class="width92 fotrt mart5 font14 fcor999">
商品优惠 <text class="margle fcoreb5 font16 fontwig6">¥ {{orderList.deductionProductPrice}}</text>
</view> </view>
<view class="width92 fotrt mart5 font14 fcor999"> <view class="width92 fotrt mart5 font14 fcor999">
积分抵扣 <text class="margle fcoreb5 font16 fontwig6">¥ {{(orderList.payGold / 100).toFixed(2)}}</text> 积分抵扣 <text class="margle fcoreb5 font16 fontwig6">¥ {{(orderList.payGold / 100).toFixed(2)}}</text>
@ -143,14 +146,18 @@
<view class="width30">流水号</view> <view class="width30">流水号</view>
<view class="width70 fcor333 fotrt">{{orderList.paySerialNo}}</view> <view class="width70 fcor333 fotrt">{{orderList.paySerialNo}}</view>
</view> </view>
<view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.paySerialNo"> <view class="width94 alijusstart mart20 font14 fcor666">
<view class="width30">下单时间</view> <view class="width30">下单时间</view>
<view class="width70 fcor333 fotrt">{{orderList.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view> <view class="width70 fcor333 fotrt">{{orderList.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view>
</view> </view>
<view class="width94 alijusstart mart20 font14 fcor666">
<view class="width30">支付时间</view>
<view class="width70 fcor333 fotrt">{{orderList.payTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666" v-if="typeid == 4"> <view class="width94 alijusstart mart20 font14 fcor666" v-if="typeid == 4">
<view class="width30">就餐方式</view> <view class="width30">就餐方式</view>
<view class="width70 fotrt" v-if="orderList.eatType == 1">店内就餐</view> <view class="width70 fotrt" v-if="recinfo.eatType == 1">店内就餐</view>
<view class="width70 fcor333 fotrt" v-if="orderList.eatType == 2">打包带走</view> <view class="width70 fcor333 fotrt" v-if="recinfo.eatType == 2">打包带走</view>
</view> </view>
<view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.payType"> <view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.payType">
<view class="width30">支付方式</view> <view class="width30">支付方式</view>
@ -173,7 +180,7 @@
<!-- 再来一单 --> <!-- 再来一单 -->
<view class="height50 width100"></view> <view class="height50 width100"></view>
<view class="bottomstu backcorfff width100 height50 alijusend"> <view class="bottomstu backcorfff width100 height50 alijusend" v-if="orderList.orderStatus == 3">
<button open-type="contact" class="cusservice font12 fcor666">联系客服</button> <button open-type="contact" class="cusservice font12 fcor666">联系客服</button>
<view class="buybtn font12 fcorfff">再来一单</view> <view class="buybtn font12 fcorfff">再来一单</view>
</view> </view>
@ -183,8 +190,9 @@
<script> <script>
import { import {
getThirdOrderByOrderId, getThirdOrderByOrderNo,
thirdCancelOrder cancel,
getDetailByOrderNo
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
export default { export default {
data() { data() {
@ -209,14 +217,15 @@
6: '退款中', 6: '退款中',
7: '退款失败' 7: '退款失败'
}, },
phonestu: 1 // phonestu: 1 ,//
recinfo: [], //
} }
}, },
onLoad(options) { onLoad(options) {
this.orderId = options.id; this.orderId = options.id;
}, },
onShow() { onShow() {
this.getThirdOrderByOrderId(); this.getDetailByOrderNo();
}, },
onUnload() { onUnload() {
clearInterval(this.timer); clearInterval(this.timer);
@ -232,30 +241,53 @@
this.orderList.highChildOrderList.forEach((food) => { this.orderList.highChildOrderList.forEach((food) => {
this.coutnums += food.saleCount this.coutnums += food.saleCount
}) })
},
//
getDetailByOrderNo() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderNo: this.orderId,
}
getDetailByOrderNo(params).then(res => {
uni.hideLoading();
// if (res.return_code == '000000') {
// this.recinfo = res.return_data;
// }
if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType;
this.orderList = res.return_data;
if (this.orderList.orderStatus == 1) {
this.timer = setInterval(() => {
this.showtime()
})
}
if (this.orderList.orderStatus == 2) {
this.setTimer();
}
this.coutnums = 0;
this.getAllCount();
this.getThirdOrderByOrderNo();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
}, },
// //
getThirdOrderByOrderId() { getThirdOrderByOrderNo() {
// uni.showLoading({
// title: '...'
// })
let datas = { let datas = {
orderId: this.orderId orderNo: this.orderId
} }
getThirdOrderByOrderId(datas).then(res => { getThirdOrderByOrderNo(datas).then(res => {
// uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType; this.recinfo = res.return_data;
this.orderList = res.return_data;
if (this.orderList.orderStatus == 1) {
this.timer = setInterval(() => {
this.showtime()
})
}
if (this.orderList.orderStatus == 2) {
this.setTimer();
}
this.coutnums = 0;
this.getAllCount();
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
@ -277,9 +309,9 @@
title: '加载中...' title: '加载中...'
}) })
let params = { let params = {
orderId: this.orderId, orderNo: this.orderId,
} }
thirdCancelOrder(params).then(res => { cancel(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
@ -324,7 +356,7 @@
this.timerdjs = setInterval(() => { this.timerdjs = setInterval(() => {
if (holdTime <= 0) { if (holdTime <= 0) {
clearInterval(this.timerdjs); clearInterval(this.timerdjs);
this.getThirdOrderByOrderId(); this.getThirdOrderByOrderNo();
holdTime = 10; holdTime = 10;
return; return;
} }
@ -334,7 +366,7 @@
// //
showtime() { showtime() {
var nowtime = new Date(), // var nowtime = new Date(), //
endtime = this.orderList.createTime + 900000; // endtime = this.orderList.createTime + 600000; //
var lefttime = endtime - nowtime, // var lefttime = endtime - nowtime, //
leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), // leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), //
lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime / lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime /
@ -349,7 +381,7 @@
this.countdowns = lefts // this.countdowns = lefts //
// 00:00:00 // 00:00:00
if (lefttime < 0) { if (lefttime < 0) {
this.getThirdOrderByOrderId(); this.getThirdOrderByOrderNo();
clearInterval(this.timer); clearInterval(this.timer);
this.countdownh = this.countdownm = this.countdowns = "00" this.countdownh = this.countdownm = this.countdowns = "00"
} }

@ -76,9 +76,6 @@
} from '../../Utils/Api.js' } from '../../Utils/Api.js'
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'; import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue';
let app = getApp(); let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default { export default {
components: { components: {
ssPaymentPassword ssPaymentPassword

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

@ -22,6 +22,13 @@
{{couponList.packageDetail.price}} {{couponList.packageDetail.price}}
</view> </view>
</view> </view>
</view>
<view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view>
</view> </view>
<view class="width94 comorder mart10"> <view class="width94 comorder mart10">
@ -47,15 +54,8 @@
<view class="settlement"> <view class="settlement">
<view class="sum">实付:<view class="money">{{paytheprice}}</view> <view class="sum">实付:<view class="money">{{paytheprice}}</view>
</view> </view>
<!-- #ifdef MP -->
<button class="btn" open-type="getPhoneNumber" v-if="user == null"
@getphonenumber="loginByPhone">立即支付</button>
<button class="btn" v-else @tap="toPay">立即支付</button>
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="btn" v-if="user.phone == null" @click="jumpH5Bding">立即支付</button> <button class="btn" v-if="user.phone == null" @click="jumpH5Bding">立即支付</button>
<button class="btn" v-else @tap="toPay">立即支付</button> <button class="btn" v-else @tap="toPay">立即支付</button>
<!-- #endif -->
</view> </view>
</view> </view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" /> <ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" />
@ -64,21 +64,15 @@
<script> <script>
import { import {
addOrder, create,
getDiscountPackageDetail, getDiscountPackageDetail,
loginByPhone,
orderToPay,
unionPay, unionPay,
orderToGoldPay,
findUser, findUser,
hltUnionCardPay, cardPay,
getHuiLianTongCardBalance getHuiLianTongCardBalance
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
import ssPaymentPassword from '../../components/sanshui-payment-password' import ssPaymentPassword from '../../components/sanshui-payment-password'
let app = getApp(); let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default { export default {
components: { components: {
ssPaymentPassword ssPaymentPassword
@ -107,7 +101,8 @@
jumpType: '', jumpType: '',
tongCardPrice: 0, tongCardPrice: 0,
storeId: '', storeId: '',
isDiscont: false isDiscont: false,
identificationCode: '' //
}; };
}, },
@ -257,18 +252,19 @@
this.storeId = app.globalData.storeid this.storeId = app.globalData.storeid
} }
let goods = { let goods = {
"highChildOrderList": [{ "childOrderList": [{
"goodsType": 7,
"goodsId": this.couponId, "goodsId": this.couponId,
"goodsPrice": this.paytheprice,
"goodsType": 7,
"saleCount": 1, "saleCount": 1,
"storeId": this.storeId }],
}] "promoteCode": this.identificationCode
} }
addOrder(goods).then(res => { create(goods).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.hideLoading(); uni.hideLoading();
this.jumpType = res.return_data.highChildOrderList[0].ext1; this.jumpType = res.return_data.highChildOrderList[0].ext1;
this.orderId = res.return_data.id; this.orderId = res.return_data.orderNo;
this.orderToPay(res.return_data); this.orderToPay(res.return_data);
} else { } else {
uni.hideLoading(); uni.hideLoading();
@ -301,7 +297,7 @@
// //
orderToPay(item) { orderToPay(item) {
let goods = { let goods = {
"orderId": this.orderId "orderNo": this.orderId
} }
unionPay(goods).then(res => { unionPay(goods).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
@ -353,42 +349,12 @@
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
}) })
if (this.paytype == 'jinbi') {
let params = {
"orderId": this.orderId,
"password": this.PaymentPassword
}
orderToGoldPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../coupon-comfirmation-success/coupon-comfirmation-success'
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../pages/login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
let params = { let params = {
"orderId": this.orderId, "orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
hltUnionCardPay(params).then(res => { cardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({

Loading…
Cancel
Save