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

master
杨杰 2 years ago
parent 07fef7a563
commit d3a0e2503c
  1. 1
      .gitignore
  2. 4
      high-unionPay/App.vue
  3. 108
      high-unionPay/Utils/Api.js
  4. 53
      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. 78
      high-unionPay/node_modules/vue-jsonp/package.json
  9. 222
      high-unionPay/package-lock.json
  10. 4
      high-unionPay/package.json
  11. 2
      high-unionPay/pages/goods/goods.vue
  12. 21
      high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue
  13. 491
      high-unionPay/pages/order/confirmation.vue
  14. 3
      high-unionPay/pages/qianZhuPay/qianZhuPay.vue
  15. 265
      high-unionPay/pages/tabBar/home/home.vue
  16. 112
      high-unionPay/pages/tabBar/user/user.vue
  17. 50
      high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue
  18. 3
      high-unionPay/pages/user/deposit/deposit.vue
  19. 98
      high-unionPay/pages/user/news/news.vue
  20. 155
      high-unionPay/pages/user/order_details/order_details.vue
  21. 151
      high-unionPay/pages/user/order_list/order_list.vue
  22. 125
      high-unionPay/qianzhu-KFC/confirmOrder/confirmOrder.vue
  23. 108
      high-unionPay/qianzhu-KFC/order-details/order-details.vue
  24. 3
      high-unionPay/qianzhu-KFC/payment-method/payment-method.vue
  25. BIN
      high-unionPay/static/img/user/kefu.png
  26. BIN
      high-unionPay/static/img/user/notive.png
  27. BIN
      high-unionPay/static/img/user/order.png
  28. BIN
      high-unionPay/static/img/user/overdue.png
  29. BIN
      high-unionPay/static/img/user/use.png
  30. 76
      high-unionPay/subPages/coupon-comfirmation/coupon-comfirmation.vue

1
.gitignore vendored

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

@ -7,6 +7,8 @@
//
// url: 'https://hsg.dctpay.com/crest',
// v1url:'https://hsg.dctpay.com/v1',
// orderurl:' https://hsg.dctpay.com/order',
// userurl:'https://hsg.dctpay.com/user',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl: 'https://hsg.dctpay.com/brest',
// imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
@ -14,6 +16,8 @@
//
url: 'https://hsgcs.dctpay.com/crest',
v1url: 'https://hsgcs.dctpay.com/v1',
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/',

@ -5,6 +5,8 @@ import {
POSTBREST} from "./bRequest.js";
let app = getApp();
let base = app.globalData.url;
let orderbase = app.globalData.orderurl;
let userbase = app.globalData.userurl;
let v1base = app.globalData.v1url;
let brestBase = app.globalData.brestUrl;
//公众号获取跳小程序参数
@ -26,10 +28,6 @@ export const HandleCode = params => {
export const GetPhoneNumber = params => {
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 => {
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);
}
//获取用户信息
export const findUser = params => {
return POST('GET', `${base}/highUser/findUser`, params).then(res => res.data);
}
//微信登录
export const WXlogin = params => {
return POST('GET', `${base}/wechat/login`, params).then(res => res.data);
@ -131,23 +125,12 @@ export const getUserCouponDetail = params => {
export const getUserNewCouponDetail = params => {
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 => {
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 => {
return POST('GET', `${base}/highMerchantStore/getMerchantList`, params).then(res => res.data);
@ -176,10 +159,6 @@ export const getCouponByDiscount = params => {
export const againReceiveCoupon = params => {
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 => {
return POST('GET', `${base}/userDiscount/getDiscountByUserDiscountId`, params).then(res => res.data);
@ -247,10 +226,6 @@ export const getPhoneOrderById = params => {
export const cancelRechargeOrder = params => {
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 => {
return POST('POST', `${base}/czOrder/orderToUnionPay`, params).then(res => res.data);
@ -315,10 +290,6 @@ export const getHuiLianTongCardBalance = params => {
export const getHuiLianTongCardConsume = params => {
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 => {
return POST('POST', `${base}/thirdOrder/hltUnionCardPay`, params).then(res => res.data);
}
@ -373,14 +344,7 @@ export const getKfcStoresList = params => {
export const listByStoreCode = params => {
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 => {
return POST('POST', `${base}/thirdOrder/orderToUnionPay`, params).then(res => res.data);
@ -527,3 +491,67 @@ export const getUserOrderListhuafei = params => {
export const getRebateIntegral = params => {
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 wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import {
xbkaddOrder,
create,
getThirdPartyByDetail,
getHuiLianTongCardBalance,
findUser,
qianzhuorderToUnionPay,
czhltUnionCardPay,
unionPay,
cardPay,
getUserOrderPreList,
getRebateIntegral
} from '../../Utils/Api.js';
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
let app = getApp();
export default {
components: {
@ -388,22 +385,25 @@
title: '提交订单中...'
})
let datas = {
"childOrderList": [{
"goodsId": this.goodId,
"customerMobile": this.customerMobile,
"regionId": app.globalData.cityId,
"productType": 3,
"platformId": this.showType,
"password": this.PaymentPassword,
"integralNum": this.priceValue[1],
"productType": this.productType,
"goodsType": 10,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
"memDiscountId": this.memDiscountId,
"goodsId": this.goodId
}
xbkaddOrder(datas).then(res => {
create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
let params = {
"orderId": res.return_data.id,
"orderNo": res.return_data.orderNo,
}
this.qianzhuorderToUnionPay(params);
} else {
@ -514,7 +514,7 @@
qianzhuorderToUnionPay(item) {
let that = this;
if (that.paytype == '4') {
qianzhuorderToUnionPay(item).then(res => {
unionPay(item).then(res => {
if (res.return_code == '000000') {
that.uniontopay(res.return_data.prepayid);
} else {
@ -606,20 +606,25 @@
}
if (this.payPrice == 0) {
let datas = {
"childOrderList": [{
"goodsId": this.goodId,
"customerMobile": this.customerMobile,
"regionId": app.globalData.cityId,
"productType": 3,
"platformId": this.showType,
"password": this.PaymentPassword,
"integralNum": this.priceValue[1],
"productType": 3,
"goodsType": 10,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"goodsId": this.goodId
"payPwd": this.PaymentPassword
}
xbkaddOrder(datas).then(res => {
create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
})
@ -640,11 +645,11 @@
return;
}
let params = {
"orderId": this.orderId,
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
czhltUnionCardPay(params).then(res => {
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
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,38 +1,34 @@
{
"_from": "vue-jsonp",
"_id": "vue-jsonp@2.0.0",
"_inBundle": false,
"_integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==",
"_location": "/vue-jsonp",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "vue-jsonp",
"name": "vue-jsonp",
"escapedName": "vue-jsonp",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
"version": "2.0.0",
"description": "A tiny library for handling JSONP request.",
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"keywords": [
"Vue",
"JSONP"
],
"files": [
"dist/",
"index.d.ts",
"README.md"
],
"_resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
"_shasum": "3bfac56bb72941a2511c11e1a123b876f03427f7",
"_spec": "vue-jsonp",
"_where": "C:\\Users\\Administrator\\Documents\\high-mini",
"scripts": {
"build": "rollup -c",
"test": "jest",
"pretest": "npm run build",
"preversion": "npm run test",
"prepublish": "npm run test"
},
"author": {
"name": "LancerComet",
"email": "chw644@hotmail.com"
},
"bugs": {
"url": "https://github.com/LancerComet/vue-jsonp/issues"
"repository": {
"type": "git",
"url": "https://github.com/LancerComet/vue-jsonp.git"
},
"bundleDependencies": false,
"deprecated": false,
"description": "A tiny library for handling JSONP request.",
"license": "MIT",
"devDependencies": {
"@types/expect-puppeteer": "^4.4.3",
"@types/jest": "^26.0.14",
@ -50,31 +46,5 @@
"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": "视频播放器组件",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "视频播放器组件",
"version": "1.0.0",
"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"
}
}
},
"dependencies": {
"@babel/parser": {
"version": "7.20.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.0.tgz",
"integrity": "sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg==",
"peer": true
},
"@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,
"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=="
},
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
"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"
],
"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="fcorfff font12 height20" style="background-color: #3da7e7;border-radius: 20px;padding: 0px 5px;">嗨森逛
</view>
<view class="width70 fotrt font14 fcor666">月销 500</view>
<view class="width70 fotrt font14 fcor666">月销 {{goodsData[0].salesCount}}</view>
</view>
</view>
<!-- 服务-规则选择 -->

@ -78,6 +78,13 @@
</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="height50 width100 paddtop5 backcorfff" @click="showPopup()">
@ -245,9 +252,6 @@
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '@/components/cj-slider/cj-slider.vue';
let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
components: {
ssPaymentPassword,
@ -278,12 +282,19 @@
availIntegal: 0, //
gasOrderList: '', //
rebateIntegral: '', //
Integrastu: 1 //
Integrastu: 1 ,//
identificationCode: '', //
}
},
onLoad(e) {
this.gasOrderList = app.globalData.pelletoilList;
this.orderPrice = this.gasOrderList.highChildOrderList[0].goodsPrice;
// #ifdef H5
this.identificationCode = app.globalData.staffCode;
// #endif
// #ifdef MP
this.identificationCode = app.globalData.identificationCode;
// #endif
},
onShow() {
let that = this;
@ -492,6 +503,7 @@
if (this.payPrice == 0 && !this.orderNo) {
let goods = {
"identificationCode": this.gasOrderList.identificationCode,
"promoteCode":this.identificationCode,
"payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword,
@ -730,6 +742,7 @@
})
let goods = {
"identificationCode": this.gasOrderList.identificationCode,
"promoteCode":this.identificationCode,
"payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId,
"highChildOrderList": [{

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

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

@ -1,11 +1,16 @@
<template>
<view>
<view class="status"></view>
<!-- 顶部菜单 -->
<view class="height80 backcorltop">
<!-- <view class="mart80" v-if="isdisplay">
<lottie :options="defaultOptions" :height="200" :width="200"
@animCreated="handleAnimation" />
</view> -->
<!-- <view class="status"></view> -->
<view v-for="(item,index) in homeCateList" :key="index">
<view class="height90 backcorltop" v-if="item.type == 1">
<view class="category-list">
<view class="category" style="width: 25%;" v-for="(row, index) in categoryList" :key="index"
@tap="toCategory(row)">
<view class="category" style="width: 25%;" v-for="(row, indexs) in item.childCategory" :key="indexs"
@click="toCategory(row)">
<view class="img">
<image :src="imageUrl+row.imgData"></image>
</view>
@ -14,12 +19,12 @@
</view>
</view>
<!-- 顶部活动图片 -->
<image class="width100" mode="widthFix" :src="imagewxUrl+imgadres"></image>
<image class="width100" mode="widthFix" :src="imagewxUrl+imgadres" v-if="item.type == 8"></image>
<!-- 顶部菜单 -->
<view class="category-list backcorfff" style="margin-top: -5px;">
<view class="category" style="width: 20%;" v-for="(row, index) in categoryList" :key="index"
@tap="toCategory(row)">
<view class="category-list backcorfff" style="margin-top: -5px;" v-if="item.type == 7">
<view class="category" style="width: 20%;" v-for="(row, indexc) in item.childCategory" :key="indexc"
@click="toCategory(row)">
<view class="img">
<image :src="imageUrl+row.imgData"></image>
</view>
@ -27,17 +32,31 @@
</view>
</view>
<!-- 消息 -->
<view class="height120 backcorfff">
<view class="height120 backcorfff" v-if="item.type == 3">
<view class="height20 width100"></view>
<view class="width92 message alijus">
<swiper circular="true" autoplay="true" display-multiple-items="2" :vertical="true">
<swiper-item class="alijus" v-for="(swiper,index) in swiperList" :key="swiper.id"
<view class="width100 alijus" style="margin-top: -20px;" @click="test(item.childDate)"
v-if="item.childDate.length == 1">
<view class="width80p paddleft10 alijusstart">
<view class="stus"></view>
<view class="paddleft10 font14 fcor666 text1 width70">
{{item.childDate[0].title}}
</view>
<view class="width25 font13 fcor999">{{swipers.timeData}}</view>
</view>
<view class="width20 alijus">
<image class="icon15" mode="widthFix" src="../../../static/img/jt.png"></image>
</view>
</view>
<swiper v-else circular="true" autoplay="true" display-multiple-items="2" :vertical="true">
<swiper-item class="alijus" v-for="(swipers,index) in item.childDate" :key="swipers.id"
@click="test(index)">
<view class="width80p paddleft10 alijusstart">
<view class="stus"></view>
<view class="paddleft10 font14 fcor666 text1 width70">
放松放松方放松放松方放松放松方</view>
<view class="width25 font13 fcor999">40分钟前</view>
{{swipers.title}}
</view>
<view class="width25 font13 fcor999">{{swipers.timeData}}</view>
</view>
<view class="width20 alijus">
<image class="icon15" mode="widthFix" src="../../../static/img/jt.png"></image>
@ -48,80 +67,60 @@
</view>
<!-- 轮播图 -->
<view class="swiper mart20">
<view class="swiper mart20" v-if="item.type == 2">
<view class="swiper-box">
<swiper circular="true" autoplay="true" @change="swiperChange">
<swiper-item v-for="swiper in swiperList" :key="swiper.id">
<swiper-item v-for="swiper in item.childCategory" :key="swiper.id">
<image :src="imageUrl+swiper.imgData" @click="jumplottery(swiper)"></image>
</swiper-item>
</swiper>
</view>
</view>
<!-- 加油专区 -->
<view class="width90 mart20 alijusstart" @click="goGoodsList(2)">
<!-- 加油专区 ,天天好券-->
<view class="width90 mart20 alijusstart" v-if="item.type == 6 || item.type == 9"
@click="goGoodsList(item.jumpUrl)">
<view class="width70 font18 fcor333">
加油专区
{{item.name}}
</view>
<view class="width30 font14 fotrt fcor666">更多</view>
</view>
<view class="width94 alijus mart20">
<view class="backcorfff spcarea">
<image mode="widthFix" class="width100" src="../../../static/img/home/home3.png"></image>
<view class="width96 fcor333 font15 fontwig6">ETC加油券</view>
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view>
<view class="width94 fcoreb5 font15 fontwig6">¥240</view>
</view>
<view class="backcorfff spcarea">
<image mode="widthFix" class="width100" src="../../../static/img/home/home3.png"></image>
<view class="width96 fcor333 font15 fontwig6">ETC加油券</view>
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view>
<view class="width94 fcoreb5 font15 fontwig6">¥240</view>
<view class="width94 alijus mart20" v-if="item.type == 6 ">
<view class="backcorfff spcarea" v-for="(goods,index) in item.childDate" :key="index">
<image mode="widthFix" class="width100" :src="imageUrl+goods.couponImg"></image>
<view class="width96 fcor333 font15 fontwig6">{{goods.couponName}}</view>
<view class="width96 fcor999 font11">{{goods.salesEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
<view class="backcorfff spcarea">
<image mode="widthFix" class="width100" src="../../../static/img/home/home3.png"></image>
<view class="width96 fcor333 font15 fontwig6">ETC加油券</view>
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view>
<view class="width94 fcoreb5 font15 fontwig6">¥240</view>
<view class="width94 fcoreb5 font15 fontwig6">¥{{goods.salesPrice}}</view>
</view>
</view>
<!-- 惠享生活 -->
<view class="width90 mart20 alijusstart">
<view class="width70 font18 fcor333">
惠享生活
<view class="width94 alijus mart20" v-if="item.type == 9 ">
<view class="backcorfff spcarea" v-for="(goods,index) in item.childDate" :key="index">
<image mode="widthFix" class="width100" :src="imageUrl+goods.listImg"></image>
<view class="width96 fcor333 font15 fontwig6">{{goods.title}}</view>
<view class="width96 fcor999 font11" v-if="goods.effectiveTiem">
{{goods.effectiveTiem | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
<view class="width94 fcoreb5 font15 fontwig6">¥{{goods.price}}</view>
</view>
<image class="width90 mart10" mode="widthFix" :src="imagewxUrl+imgadres1"></image>
<view class="width90 alijusstart mart10">
<image src="../../../static/img/home/home6.png" mode="widthFix" class="width31"></image>
<image src="../../../static/img/home/home7.png" mode="widthFix" class="width31"></image>
<image src="../../../static/img/home/home5.png" mode="widthFix" class="width31"></image>
</view>
<!-- 天天好券 -->
<view class="width90 mart20 alijusstart">
<!-- 惠享生活 -->
<view class="width90 mart20 alijusstart" v-if="item.type == 5">
<view class="width70 font18 fcor333">
天天好券
</view>
<view class="width30 font14 fotrt fcor666">更多</view>
</view>
<view class="width94 alijus mart20">
<view class="backcorfff spcarea">
<image mode="widthFix" class="width100" src="../../../static/img/home/home4.png"></image>
<view class="width96 fcor333 font15 fontwig6">加油优惠券包</view>
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view>
<view class="width94 fcoreb5 font15 fontwig6">¥240</view>
惠享生活
</view>
<view class="backcorfff spcarea">
<image mode="widthFix" class="width100" src="../../../static/img/home/home4.png"></image>
<view class="width96 fcor333 font15 fontwig6">加油优惠券包</view>
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view>
<view class="width94 fcoreb5 font15 fontwig6">¥240</view>
</view>
<view class="backcorfff spcarea">
<image mode="widthFix" class="width100" src="../../../static/img/home/home4.png"></image>
<view class="width96 fcor333 font15 fontwig6">加油优惠券包</view>
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view>
<view class="width94 fcoreb5 font15 fontwig6">¥240</view>
<image class="width90 mart10" mode="widthFix" v-if="item.type == 5"
:src="imageUrl+item.childCategory[0].imgData" @click="goGoodsList(item.childCategory[0].jumpUrl)">
</image>
<view class="width90 alijusstart mart10" v-if="item.type == 5">
<image :src="imageUrl+item.childCategory[1].imgData" mode="widthFix" class="width31"
@click="goGoodsList(item.childCategory[1].jumpUrl)"></image>
<image :src="imageUrl+item.childCategory[2].imgData" mode="widthFix" class="width31"
@click="goGoodsList(item.childCategory[2].jumpUrl)"></image>
<image :src="imageUrl+item.childCategory[3].imgData" mode="widthFix" class="width31"
@click="goGoodsList(item.childCategory[3].jumpUrl)"></image>
</view>
</view>
<!-- 弹窗 -->
<wybPopup ref="popup" type="center" height="850" width="600" bgColor="" radius="6" :showCloseIcon="true">
@ -134,17 +133,14 @@
<script>
import {
getUserInfo,
HandleCode,
WXlogin,
getCouponList,
getTPigKFCToken,
getTPigCinemaToken,
getCacheParam,
delCacheParam,
getCmsContent,
findByLatAndLng
} from "../../../Utils/Api.js"; //api
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
let app = getApp();
export default {
components: {
@ -152,13 +148,7 @@
},
data() {
return {
showHeader: true,
isShowAuth: false,
afterHeaderOpacity: 1, //
headerPosition: 'fixed',
headerTop: null,
statusTop: null,
nVueTitle: null,
city: '',
currentSwiper: 0,
imageUrl: app.globalData.imgUrl,
@ -170,18 +160,6 @@
imgadres3: '',
imgadres4: 'cusservice.png',
webUrl: '',
//
swiperList: [{
id: 1,
src: 'url1',
img: 'banner2.png'
},
{
id: 2,
src: 'url2',
img: 'banner3.png'
}
],
//
productList: [],
productListleg: '',
@ -190,35 +168,16 @@
loadingText: '正在加载...',
pageNum: 1,
pageSize: 6,
//
categoryList: [{
'title': '在线加油',
'imgData': 'onRefueling1.png'
},
{
'title': '话费充值',
'imgData': 'phonePay1.png'
}, {
'title': '积分专区',
'imgData': 'petCoder.png'
},
],
homeCateList: [{
'title': '在线加油',
'imgData': 'onRefueling2.png'
},
{
'title': '话费充值',
'imgData': 'phonePay2.png'
},
],
homeCateList: [],
//
cpStuats: 1,
jumpType: ''
jumpType: '',
isdisplay: true //
};
},
onShow() {
let that = this;
that.hqaddress();
uni.getStorage({
key: "user",
success(e) {
@ -233,10 +192,12 @@
}
})
},
onLoad() {
this.hqaddress();
},
onLoad() {},
methods: {
//
handleAnimation: function(anim) {
this.anim = anim;
},
//ID
getCacheParam() {
let that = this;
@ -286,11 +247,6 @@
upsdk.getLocationCity({
success: function(cityCd) {
app.globalData.cityId = cityCd;
that.getCmsAactibity();
that.getCouponListArea();
that.getCmsContent();
that.getCmsContentcmshome();
that.getCmsContentcmsContent();
},
fail: function(err) {}
});
@ -329,52 +285,33 @@
app.globalData.cityId = res.return_data.regionId;
// app.globalData.cityId = '520000';
app.globalData.companyId = res.return_data.companyId;
this.getCmsAactibity();
this.getCmsContentcmsContent();
}
});
},
//
getCmsContentcmsContent() {
let params = {
regionId: app.globalData.cityId,
categoryCode: 'CMS_UNIONPAY_IMG'
companyId: app.globalData.companyId,
platform: 3,
categoryCode: 'CMS_HOME'
}
getCmsContent(params).then(res => {
this.isdisplay = false;
if (res.return_code == '000000') {
this.homeCateList = res.return_data;
}
});
},
//
getCmsContentcmshome() {
let params = {
regionId: app.globalData.cityId,
categoryCode: 'CMS_UNIONPAY_FAST'
}
getCmsContent(params).then(res => {
if (res.return_code == '000000') {
this.categoryList = res.return_data;
}
});
},
//
getCmsContent() {
let params = {
regionId: app.globalData.cityId,
categoryCode: 'CMS_UNIONPAY_BANNER'
}
getCmsContent(params).then(res => {
if (res.return_code == '000000') {
this.swiperList = res.return_data;
}
});
},
//
getCmsAactibity() {
uni.showToast({
title: '加载中...'
})
let params = {
regionId: app.globalData.cityId,
companyId: app.globalData.companyId,
platform: 3,
categoryCode: 'CMS_UNIONPAY_ALERT'
}
getCmsContent(params).then(res => {
@ -436,25 +373,6 @@
url: '../../goods/goods?id=' + e
});
},
//
getCouponListArea() {
let params = {
regionId: app.globalData.cityId,
pageNum: this.pageNum,
pageSize: this.pageSize,
displayArea: 3
}
getCouponList(params).then(res => {
if (res.return_code == '000000' && res.return_data.list) {
this.productList = res.return_data.list;
if (res.return_data.total > 4) {
this.productListleg = 4;
return;
}
this.productListleg = res.return_data.total;
}
})
},
//
getCouponListgold() {
let params = {
@ -500,8 +418,11 @@
swiperChange(event) {
this.currentSwiper = event.detail.current;
},
eheckStu(item) {
this.cpStuats = item;
//
toCategory(item) {
uni.navigateTo({
url: item.jumpUrl
})
},
//
jumplottery(item) {
@ -511,16 +432,10 @@
})
}
},
//
jumphuafei(item) {
uni.navigateTo({
url: item.ext1
})
},
//
goGoodsList(item) {
uni.navigateTo({
url: '/pages/goods/goods-list/goods-list?id=' + item
url: item
})
},
},

@ -48,21 +48,24 @@
<uni-badge style="width: 20px;position: absolute; left: 42%;"
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>
<view class="img">
<image :src="row.icon" class="icon40" mode="widthFix"></image>
</view>
<view class="text mart10">{{row.text}}</view>
</view>
</view>
<view class="width90 mart10 height60">
<swiper circular="true" interval="3000" autoplay="true">
<swiper-item v-for="(swiper,index) in nopaylist" :key="index">
<view class="width90 mart10 height60" v-if="nopaylist != ''">
<swiper circular="true" interval="3000" autoplay="true" @change="swiperChange">
<swiper-item v-for="(swiper,index) in nopaylist" :key="index" @click="jumpDetails(swiper.orderNo,swiper.productType)">
<view class="alijusstart border-8r backcor9 height60 ">
<image mode="widthFix" class="icon40 margle10" src="../../../static/img/user/user5.png">
</image>
<view class="width50 margle10">
<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 class="topay">
去支付
@ -90,17 +93,19 @@
<view class="mart15 width90 alijus fotct paddbotm10">
<view class="width31">
<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>
<view class="width31">
<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>
<view class="fontspec font14 fcor333 mart5">油卡余额</view>
</view>
<view class="width31">
<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.hltCardPrice}}
</view>
<view class="fontspec font14 fcor333 mart5">工会卡余额</view>
</view>
</view>
@ -150,8 +155,10 @@
</template>
<script>
import {
GetPhoneNumber,
findUser
findUser,
getUserAccount,
getUserOrderList,
orderCheck
} from "../../../Utils/Api.js";
import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue";
let app = getApp()
@ -191,9 +198,12 @@
],
//
czList: '',
nopaylist: [1, 2, 3, 4, 5],
nopaylist: [], //
assetsstu: 2,
userphone:'' //
userphone:'' ,//
userAccount: '', //,
countdownm: '', //
countdowns: '', //
}
},
//page.json "enablePullDownRefresh": true
@ -276,25 +286,50 @@
}
});
},
getPhoneNumber(PhoneNumber) {
//
getUserOrderList() {
uni.showLoading({
title: '加载中...'
})
let params = {
openId: app.globalData.openId,
iv: PhoneNumber.detail.iv,
encryptedData: PhoneNumber.detail.encryptedData
status: 1,
pageNum: 1,
pageSize: 5
}
getUserOrderList(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.list != '') {
this.nopaylist = res.return_data.list;
this.timesettime(res.return_data.list[0].createTime);
} else {
this.nopaylist = [];
}
GetPhoneNumber(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
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 => {
});
},
//
@ -302,14 +337,39 @@
var reg = /^(\d{3})\d{4}(\d{4})$/;
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) {
if (item == 1) {
this.assetsstu = 2;
}
if (item == 2) {
this.getUserAccount();
}
},
//
getUserAccount() {
getUserAccount().then(res => {
if (res.return_code == '000000') {
this.assetsstu = 1;
this.userAccount = res.return_data;
}
});
},
// 广
jumppage(item) {

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

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

@ -1,37 +1,51 @@
<template>
<view>
<!-- 顶部类型 -->
<scroll-view scroll-x='true' class="srollview width100" scroll-with-animation>
<view class="conent" :class="[newstypeid == index ? 'activeconent' : 'frontconent']"
v-for="(item,index) in newsTyplist" :key="index">{{item}}</view>
<scroll-view scroll-x='true' class="srollview width100" :style="{top:headerTop}" scroll-with-animation>
<view class="conent" :class="[newstypeid == item.codeValue ? 'activeconent' : 'frontconent']"
v-for="(item,index) in newsTyplist" :key="index" @click="queryMsgByList(item.codeValue)">
{{item.codeName}}</view>
</scroll-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">
<image src="../../../static/img/cusservice.png" mode="widthFix" class="icon30"></image>
<view v-if="newsList == ''"
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>
</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 mart20" v-if="index != 1">
<view class="font18 fcor333">最新电影已上映快来抢购</view>
<image mode="widthFix" class="width100 mart10" src="../../../static/img/user/1.png"></image>
<view class="width90 mart20" v-if="item.type == 1">
<view class="font18 fcor333">{{item.title}}</view>
<image mode="widthFix" class="width100 mart10" :src="imageUrl+item.image"></image>
</view>
<!-- 交易信息 -->
<view class="width90 mart20" v-if="index == 1">
<view class="font18 fcor333">付款成功</view>
<view class="width90 mart20" v-if="item.type == 2">
<view class="font18 fcor333" >{{item.title}}</view>
<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="fontwig6 fcor333 width30">交易对象</view>
<view class="width70 fcor666 fotrt">电信话费充值200元</view>
<view class="width70 fcor666 fotrt">{{item.content | msgFormat('objectName') }}</view>
</view>
<view class="width94 mart15 alijusstart font14">
<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 class="font16 fcor666 alijus mart10 fotct paddbotm20">查看详情<image
src="../../../static/img/jt.png" mode="widthFix" class="icon15 margle"></image>
@ -40,11 +54,11 @@
</view>
<!-- 客服消息 -->
<view class="width90 mart20" v-if="index == 2">
<view class="font18 fcor333">客服消息提醒</view>
<view class="width90 mart20" v-if="item.type == 3">
<view class="font18 fcor333">{{item.title}}</view>
<view class="mart10 border-r backcor9">
<view class="width92 fcor333 fontwig6 paddtop15">
你的问题我们已提交技术人员处理请耐心等候
{{item.content}}
</view>
<view class="font16 fcor666 alijus mart10 fotct paddbotm20">查看详情<image
@ -58,17 +72,62 @@
</template>
<script>
import {
queryMsgByList,
getDictionaryByCodeType
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
newsTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //
imageUrl: app.globalData.imgUrl,
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() {
this.getDictionaryByCodeType();
},
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>
@ -80,7 +139,6 @@
.srollview {
position: fixed;
top: 0px;
height: 70px;
background-color: #ffffff;
display: flex;

@ -14,94 +14,103 @@
<view class="width100 font18 fcorfff fotct height40p">
{{typeText[recinfo.orderStatus]}}
</view>
<view class="width90 fcorfff font18 mart10">实付:{{recinfo.payRealPrice}}</view>
<view class="width90 fcorfff font18 mart10" v-if="recinfo.payRealPrice">实付:{{recinfo.payRealPrice}}</view>
<view class="width90 fcorfff font14 mart10">{{recinfo.createTime | formatDate('-')}}</view>
<view class="width90 mart20" style="border-bottom: 1px dashed #7BC1F5;"></view>
<view class="width90 mart20 alijusnostart font12">
<view class="paddleft5 paddtright5 border-r" style="border: 1px solid #5BB5F3;color: #5BB5F3;">本单优惠
</view>
<view class="fcorfff margle">立减-¥8.15</view>
<view class="fcorfff margle">立减-¥{{recinfo.totalDeductionPrice}}</view>
</view>
<view class="width90 mart20 backcorfff height50 fcor333 font15 border-8r">
<view class="width94">感谢您信任嗨森逛欢迎再次消费</view>
</view>
<view class="width90 mart20 paddleft10 backcorfff height50 fcor333 font15 border-8r">感谢您信任嗨森逛欢迎再次消费</view>
</view>
<!-- 订单信息 -->
<view class="width90 backcorfff border-8r mart10 paddbotm15">
<view class="paddtop20 font22 width94 fcor333">商家/订单信息</view>
<view class="paddtop20 font22 width94 fcor333" v-if="recinfo.productType == 6">商家/订单信息</view>
<view class="paddtop20 font22 width94 fcor333" v-if="recinfo.productType != 6">订单信息</view>
<view class="mart15 alijusstart font14 width94">
<view class="width20 fcor777">交易单号</view>
<view class="width80p fotrt fcor333">HF202220823829374671902</view>
<view class="width80p fotrt fcor333">{{recinfo.orderNo}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.paySerialNo">
<view class="width20 fcor777">流水号</view>
<view class="width80p fotrt fcor333">433423423425123123123211</view>
<view class="width80p fotrt fcor333">{{recinfo.paySerialNo}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="width20 fcor777">下单时间</view>
<view class="width80p fotrt fcor333">2022-09-06 10:36:38</view>
<view class="width80p fotrt fcor333">{{recinfo.createTime | formatDate('-')}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width20 fcor777">油站名称</view>
<view class="width80p fotrt fcor333">延长壳牌南充亚华加油站</view>
<view class="width80p fotrt fcor333">{{oilList.storeName}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.payType">
<view class="width20 fcor777">支付方式</view>
<view class="width80p fotrt fcor333">微信</view>
<view class="width80p fotrt fcor333" v-if="recinfo.payType == 1">支付宝</view>
<view class="width80p fotrt fcor333" v-if="recinfo.payType == 2">微信</view>
<view class="width80p fotrt fcor333" v-if="recinfo.payType == 4">汇联通工会卡</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width20 fcor777">地址</view>
<view class="width80p fotrt fcor333 text1">四川省南充市顺庆区金鱼领路541号1</view>
<view class="width80p fotrt fcor333 text1">{{oilList.storeAddress}}</view>
</view>
</view>
<!-- 商品信息 -->
<view class="width90 backcorfff border-8r mart10 paddbotm15">
<view class="paddtop20 font22 width94 fcor333">商品信息</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType != 6">
<view class="width50 fcor777">商品名称</view>
<view class="width50 fotrt fcor333">100元电信话费充值</view>
<view class="width50 fotrt fcor333">{{recinfo.highChildOrderList[0].goodsName}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType != 6">
<view class="width50 fcor777">商品单价</view>
<view class="width50 fotrt fcor333">¥99.00</view>
<view class="width50 fotrt fcor333">¥{{recinfo.highChildOrderList[0].goodsPrice}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType != 6">
<view class="width50 fcor777">商品数量</view>
<view class="width50 fotrt fcor333">2</view>
<view class="width50 fotrt fcor333">{{recinfo.highChildOrderList[0].saleCount}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType != 6">
<view class="width50 fcor777">商品总金额</view>
<view class="width50 fotrt fcor333">¥188.00</view>
<view class="width50 fotrt fcor333">¥{{recinfo.highChildOrderList[0].totalActualPrice}}</view>
</view>
<!-- <view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width50 fcor777">油号/枪号</view>
<view class="width50 fotrt fcor333">92#/25号枪</view>
<view class="width50 fotrt fcor333">{{oilList.gasOilNo}}#/{{oilList.gasGunNo}}号枪</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width50 fcor777">油站单价</view>
<view class="width50 fotrt fcor333">¥7.14/L</view>
<view class="width50 fotrt fcor333">¥{{oilList.gasPriceGun}}/L</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width70 fcor777">加油升数<text class="font11 fcor999">实际升数以油站加油机为准</text> </view>
<view class="width30 fotrt fcor333">44.12</view>
<view class="width30 fotrt fcor333">{{oilList.gasOilLiters}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width50 fcor777">加油金额</view>
<view class="width50 fotrt fcor333">¥315.00</view>
</view> -->
<view class="width50 fotrt fcor333">¥{{oilList.gasRefuelPrice}}</view>
</view>
</view>
<!-- 支付信息 -->
<view class="width90 backcorfff mart10 concont">
<view class="paddtop20 font22 width94 fcor333">商品信息</view>
<view class="paddtop20 font22 width94 fcor333">优惠信息</view>
<view class="mart15 alijusstart font14 width94">
<view class="width50 fcor777">加油优惠</view>
<view class="width50 fotrt fcoreb5">-¥2.86</view>
<view class="width50 fcor777">商品优惠</view>
<view class="width50 fotrt fcoreb5">-¥{{recinfo.deductionProductPrice}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="width50 fcor777">优惠券优惠</view>
<view class="width50 fotrt fcoreb5">-¥{{recinfo.deductionCouponPrice}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="width50 fcor777">积分抵扣</view>
<view class="width50 fotrt fcoreb5">-¥1.86</view>
<view class="width50 fotrt fcoreb5">-¥{{recinfo.payGold / 100}}</view>
</view>
<view class="width95 height20 borderleft alijusnostart">
<view style="width: 5%;"></view>
@ -112,7 +121,10 @@
<view class="width90w height20 bordertopleft alijusnostart">
</view>
<view class="width90 height50 fotrt fcor777 font16 paddbotm10">
<view class="width90 height50 fotrt fcor777 font16 paddbotm10" v-if="!recinfo.payRealPrice">
</view>
<view class="width90 height50 fotrt fcor777 font16 paddbotm10" v-else>
加油实付 <text class="font24 fcor333 margle">{{recinfo.payRealPrice}}</text>
</view>
</view>
@ -414,7 +426,7 @@
</image>{{recinfo.payPrice*100}}
</view>
</view>
<view class="btn" @tap="cancelOrder" style="border: 1px solid #0083f5;color: #0083f5;">取消订单</view>
<view class="btn" @tap="cancel" style="border: 1px solid #0083f5;color: #0083f5;">取消订单</view>
<view class="btn" @tap="toPay" style="background-color: #0083f5;color: #fff;">去支付</view>
</view>
</view>
@ -430,10 +442,11 @@
<script>
import {
getOrderById,
cancelOrder,
getDetailByOrderNo,
cancel,
getPreByOrderIdId,
orderComplete
orderComplete,
getOrderByOrderNo
} from '../../../Utils/Api.js';
let app = getApp()
export default {
@ -448,6 +461,7 @@
deduction: 0, //
recinfo: [],
orderId: '',
timers: null, //
imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg,
imgadres1: 'dhf.png',
@ -456,6 +470,7 @@
countdownm: '', //
countdowns: '', //
timer: null, //
oilList: '', //
typeText: {
1: '待支付',
2: '已支付',
@ -470,21 +485,20 @@
},
onShow() {
//
this.getOrderById();
this.getPreByOrderIdId();
this.getDetailByOrderNo();
// this.getPreByOrderIdId();
},
onHide() {
},
onUnload() {
clearInterval(this.timer);
clearInterval(this.timers);
},
onLoad(option) {
this.orderId = option.id
},
onBackPress() {
//退
this.clearOrder();
},
filters: {
toFixed: function(x) {
@ -516,19 +530,39 @@
}
},
getOrderById() {
//
getDetailByOrderNo() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderId: this.orderId,
orderNo: this.orderId,
}
getOrderById(params).then(res => {
if (res.return_code == '000000') {
getDetailByOrderNo(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.recinfo = res.return_data;
} else {
uni.hideLoading()
if (res.return_data.productType == 6) {
this.getOrderByOrderNo();
}
if (res.return_data.orderStatus == 1) {
this.timers = setInterval(() => {
this.showtime()
})
}
}
})
},
//
getOrderByOrderNo() {
let params = {
orderNo: this.orderId,
}
getOrderByOrderNo(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.oilList = res.return_data;
}
})
},
@ -546,7 +580,7 @@
//
showtime() {
var nowtime = new Date(), //
endtime = this.orderList.createTime + 900000; //
endtime = this.recinfo.createTime + 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 /
@ -561,8 +595,8 @@
this.countdowns = lefts //
// 00:00:00
if (lefttime < 0) {
this.getThirdOrderByOrderId();
clearInterval(this.timer);
clearInterval(this.timers);
// this.getDetailByOrderNo();
this.countdownh = this.countdownm = this.countdowns = "00"
}
},
@ -604,7 +638,7 @@
}
});
},
cancelOrder() {
cancel() {
let that = this;
uni.showModal({
title: '取消订单',
@ -615,9 +649,9 @@
title: '加载中...'
})
let params = {
orderId: this.recinfo.id
orderNo: this.recinfo.orderNo
}
cancelOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
@ -644,15 +678,6 @@
}
});
},
clearOrder() {
uni.removeStorage({
key: 'buylist',
success: (res) => {
this.buylist = [];
console.log('remove buylist success');
}
});
},
toPay() {
let payTypes;
if (this.recinfo.payType == 1 || this.recinfo.payType == null) {

@ -21,8 +21,9 @@
</view>
<scroll-view scroll-x='true' :style="{top:headerswper}" class="srollview width100" scroll-with-animation>
<view class="conent" :class="[ordertypeid == index ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index">{{item}}</view>
<view class="conent" :class="[ordertypeid == item.codeValue ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index" @click="selectlist(item.codeValue)">{{item.codeName}}
</view>
</scroll-view>
<!-- 考虑非APP端长列表和复杂的DOM使用scroll-view会卡顿所以漂浮顶部选项卡使用page本身的滑动 -->
<view class="order-list">
@ -31,10 +32,10 @@
<image :src="imagewxUrl+imgadres"></image>
</view>
<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="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>
<view class="width30 fotrt fcor666 font12">
@ -42,11 +43,12 @@
</view>
</view>
<view class="width96 height25 mart10">
<view class="width96 height22 mart10">
<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"
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 class="width30 flright fotrt fcor666 font15 fotrt">
@ -59,24 +61,23 @@
订单编号:{{row.orderNo}}
</view>
<view class="width96 height25 paddbotm10 alijusstart">
<view class="width70 fotlt ">
<view class="width60 fotlt ">
<view class="font12 text1 fcor999 mart5">
下单时间 : {{row.createTime | formatDate('-')}}
</view>
</view>
<view class="width30 fotrt fcor666 font15 fotrt">
<view class="fotrt font12 text1 fcor999 mart5">
合计:<text class="fcor333 font18"> {{row.payPrice}} </text>
<view class="width40 fotrt fcor666 font15 fotrt alijusend">
<view class="font12 width25 fcor999">合计:</view>
<view class="fotlt text1 font18 fcor333 ">
{{row.payPrice}}
</view>
</view>
</view>
<view class="width96 mart10 marb5" style="border:1px dashed #f4f4f4;"
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
<view class="width96 mart10 marb5" style="border:1px dashed #f4f4f4;" v-if="(row.orderStatus==1)">
</view>
<view class="btns"
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
<view class="btns" v-if="(row.orderStatus==1)">
<block>
<view class="default" @click.stop="cancelOrder(row.id,row.highChildOrderList[0].goodsType)">
<view class="default" @click.stop="cancel(row.orderNo)">
取消订单
</view>
<view class="pay" @click.stop="toPayment(row)">立即支付</view>
@ -90,9 +91,9 @@
<script>
import {
getUserOrderList,
cancelOrder,
thirdCancelOrder,
orderCheck
cancel,
orderCheck,
getDictionaryByCodeType
} from '../../../Utils/Api.js';
let app = getApp()
export default {
@ -125,8 +126,12 @@
typeId: '',
imageUrl: app.globalData.imgUrl,
reFresh: "",
orderTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //
ordertypeid: 1 //id
orderTyplist: [{
codeValue: '',
codeName: '全部'
}], //
ordertypeid: '', //id
couponName: '' //
}
},
@ -140,6 +145,7 @@
this.list = this.orderList[this.typeId];
this.tabbarIndex = tbIndex;
this.getUserOrderList();
this.getDictionaryByCodeType();
},
onReachBottom() {
this.getUserOrderList();
@ -163,6 +169,15 @@
mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + 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: {
@ -186,16 +201,11 @@
uni.hideLoading()
return false;
}
let statusId;
if (this.typeId == 2) {
statusId = '2,6,7';
} else {
statusId = this.typeId;
}
let pagenum = this.pageNum;
let params = {
status: statusId,
status: this.typeId,
searchTitle: this.couponName,
productType: this.ordertypeid,
pageNum: this.pageNum,
pageSize: this.pageSize
}
@ -214,14 +224,24 @@
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) {
console.log('===========')
jumpDetails(e, item) {
this.orderCheck(e);
if (item == 4 || item == 9 || item == 10) {
if (item == 1 || item == 2 || item == 3) {
uni.navigateTo({
url: '/qianzhu-KFC/order-details/order-details?id=' + e
})
@ -235,7 +255,7 @@
//
orderCheck(item) {
let datas = {
orderId: item
orderNo: item
}
orderCheck(datas).then(res => {
@ -253,15 +273,23 @@
}
this.getUserOrderList();
},
showLogistics(row) {
//
selectlist(item) {
this.ordertypeid = item;
this.pageNum = 1;
this.orderList = []
this.isNoMoreData = false;
this.getUserOrderList();
},
remindDeliver(row) {
uni.showToast({
title: '已提醒商家发货'
})
//
toSearch() {
this.pageNum = 1;
this.orderList = []
this.isNoMoreData = false;
this.getUserOrderList();
},
cancelOrder(row, item) {
//
cancel(row) {
let that = this;
uni.showModal({
title: '取消订单',
@ -272,33 +300,9 @@
title: '加载中...'
})
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') {
uni.hideLoading();
uni.showToast({
@ -335,20 +339,10 @@
} else {
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({
url: "/pages/pay/payment/payment?amount=" + row.payPrice +
'&paytype=' + payTypes + '&orderId=' + row.id + '&couponId=' + this.orderList[0]
.highChildOrderList[0].goodsId + '&typeaout=' + this.orderList[0].highChildOrderList[0]
.ext1 + '&goodsType=' + row.highChildOrderList[0].goodsType
})
}
}
}
@ -438,7 +432,6 @@
position: fixed;
z-index: 999;
height: 50px;
top: 120px;
background-color: #f3f3f3;
display: flex;
flex-direction: row;

@ -276,18 +276,15 @@
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'
import wybPopup from '@/components/wyb-popup/wyb-popup.vue'
import {
xbkaddOrder,
create,
getThirdPartyByDetail,
getHuiLianTongCardBalance,
findUser,
qianzhuorderToUnionPay,
czhltUnionCardPay,
unionPay,
cardPay,
getUserOrderPreList,
getRebateIntegral
} from '../../Utils/Api.js';
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
let app = getApp();
export default {
components: {
@ -574,35 +571,47 @@
})
data2 = data1.join(',');
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: data2,
eatType: this.sttypeid,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode": this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
"eatType": this.sttypeid,
"goodsType": 4,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
}
}
if (this.typeid == 2) {
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: this.orderList,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode": this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": this.orderList,
"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();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
let params = {
"orderId": res.return_data.id
"orderNo": res.return_data.orderNo
}
this.qianzhuorderToUnionPay(params);
} else {
@ -720,7 +729,7 @@
qianzhuorderToUnionPay(item) {
let that = this;
if (that.paytype == '4') {
qianzhuorderToUnionPay(item).then(res => {
unionPay(item).then(res => {
if (res.return_code == '000000') {
that.uniontopay(res.return_data.prepayid);
} else {
@ -781,7 +790,8 @@
title: '支付成功'
})
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) {
@ -820,36 +830,49 @@
})
data2 = data1.join(',');
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: data2,
eatType: this.sttypeid,
password: this.PaymentPassword,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode": this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
"eatType": this.sttypeid,
"goodsType": 4,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
}
}
if (this.typeid == 2) {
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: this.orderList,
password: this.PaymentPassword,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode": this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": this.orderList,
"goodsType": 9,
"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();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
})
@ -870,11 +893,11 @@
return;
}
let params = {
"orderId": this.orderId,
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
czhltUnionCardPay(params).then(res => {
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({

@ -21,18 +21,18 @@
</view>
<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="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>
</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="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>
</view>
</view>
@ -46,11 +46,11 @@
<view class="width94 fcor666 font12 mart5">如有询问手机尾号请点击右侧按钮查看</view>
</view>
<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)">
查看手机尾号
</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)">
隐藏手机尾号
</view>
@ -59,15 +59,15 @@
</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"
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 class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !orderList.list">
{{orderList.statusDesc}}
<view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !recinfo.list">
{{recinfo.statusDesc}}
</view>
<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>
@ -76,7 +76,7 @@
充值明细
</view>
<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 class="width100 mart5">
<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="../static/imgs/vipcz.png" v-else mode="widthFix" class="width90w"></image>
</view>
<view class="width50 font13 fcor666">
<view class="width50 font13 fcor333 fontwig6">
<view>{{item.goodsName}}</view>
<view class="font12 fcor999">{{item.saleCount}} </view>
<view class="font13 fcor999">{{item.saleCount}} </view>
</view>
<view class="width20">
<view class="width100 fcor333 font12">¥<text
<view class="width100 fcor333 font12 fotrt">¥<text
class="fontwig6 font16">{{item.goodsActualPrice}}</text>
</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;">
¥{{item.goodsPrice}}</view>
</view>
@ -117,7 +117,10 @@
</view>
<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 class="width92 fotrt mart5 font14 fcor999">
积分抵扣 <text class="margle fcoreb5 font16 fontwig6">¥ {{(orderList.payGold / 100).toFixed(2)}}</text>
@ -143,14 +146,18 @@
<view class="width30">流水号</view>
<view class="width70 fcor333 fotrt">{{orderList.paySerialNo}}</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="width70 fcor333 fotrt">{{orderList.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</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="width30">就餐方式</view>
<view class="width70 fotrt" v-if="orderList.eatType == 1">店内就餐</view>
<view class="width70 fcor333 fotrt" v-if="orderList.eatType == 2">打包带走</view>
<view class="width70 fotrt" v-if="recinfo.eatType == 1">店内就餐</view>
<view class="width70 fcor333 fotrt" v-if="recinfo.eatType == 2">打包带走</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.payType">
<view class="width30">支付方式</view>
@ -173,7 +180,7 @@
<!-- 再来一单 -->
<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>
<view class="buybtn font12 fcorfff">再来一单</view>
</view>
@ -183,8 +190,9 @@
<script>
import {
getThirdOrderByOrderId,
thirdCancelOrder
getThirdOrderByOrderNo,
cancel,
getDetailByOrderNo
} from '../../Utils/Api.js';
export default {
data() {
@ -209,14 +217,15 @@
6: '退款中',
7: '退款失败'
},
phonestu: 1 //
phonestu: 1 ,//
recinfo: [], //
}
},
onLoad(options) {
this.orderId = options.id;
},
onShow() {
this.getThirdOrderByOrderId();
this.getDetailByOrderNo();
},
onUnload() {
clearInterval(this.timer);
@ -234,15 +243,19 @@
})
},
//
getThirdOrderByOrderId() {
// uni.showLoading({
// title: '...'
// })
let datas = {
orderId: this.orderId
getDetailByOrderNo() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderNo: this.orderId,
}
getThirdOrderByOrderId(datas).then(res => {
// uni.hideLoading();
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;
@ -256,6 +269,25 @@
}
this.coutnums = 0;
this.getAllCount();
this.getThirdOrderByOrderNo();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
//
getThirdOrderByOrderNo() {
let datas = {
orderNo: this.orderId
}
getThirdOrderByOrderNo(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.recinfo = res.return_data;
} else {
uni.showToast({
title: res.return_msg,
@ -277,9 +309,9 @@
title: '加载中...'
})
let params = {
orderId: this.orderId,
orderNo: this.orderId,
}
thirdCancelOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
@ -324,7 +356,7 @@
this.timerdjs = setInterval(() => {
if (holdTime <= 0) {
clearInterval(this.timerdjs);
this.getThirdOrderByOrderId();
this.getThirdOrderByOrderNo();
holdTime = 10;
return;
}
@ -334,7 +366,7 @@
//
showtime() {
var nowtime = new Date(), //
endtime = this.orderList.createTime + 900000; //
endtime = this.orderList.createTime + 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 /
@ -349,7 +381,7 @@
this.countdowns = lefts //
// 00:00:00
if (lefttime < 0) {
this.getThirdOrderByOrderId();
this.getThirdOrderByOrderNo();
clearInterval(this.timer);
this.countdownh = this.countdownm = this.countdowns = "00"
}

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

@ -24,6 +24,13 @@
</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="width94 comorder mart10">
<view class="height50 width100 backcorfff">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
@ -47,15 +54,8 @@
<view class="settlement">
<view class="sum">实付:<view class="money">{{paytheprice}}</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-else @tap="toPay">立即支付</button>
<!-- #endif -->
</view>
</view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" />
@ -64,21 +64,15 @@
<script>
import {
addOrder,
create,
getDiscountPackageDetail,
loginByPhone,
orderToPay,
unionPay,
orderToGoldPay,
findUser,
hltUnionCardPay,
cardPay,
getHuiLianTongCardBalance
} from '../../Utils/Api.js';
import ssPaymentPassword from '../../components/sanshui-payment-password'
let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
components: {
ssPaymentPassword
@ -107,7 +101,8 @@
jumpType: '',
tongCardPrice: 0,
storeId: '',
isDiscont: false
isDiscont: false,
identificationCode: '' //
};
},
@ -257,18 +252,19 @@
this.storeId = app.globalData.storeid
}
let goods = {
"highChildOrderList": [{
"goodsType": 7,
"childOrderList": [{
"goodsId": this.couponId,
"goodsPrice": this.paytheprice,
"goodsType": 7,
"saleCount": 1,
"storeId": this.storeId
}]
}],
"promoteCode": this.identificationCode
}
addOrder(goods).then(res => {
create(goods).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
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);
} else {
uni.hideLoading();
@ -301,7 +297,7 @@
//
orderToPay(item) {
let goods = {
"orderId": this.orderId
"orderNo": this.orderId
}
unionPay(goods).then(res => {
if (res.return_code == '000000') {
@ -353,42 +349,12 @@
uni.showLoading({
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 = {
"orderId": this.orderId,
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
hltUnionCardPay(params).then(res => {
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({

Loading…
Cancel
Save