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

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

3
.gitignore vendored

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

@ -5,18 +5,22 @@
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
// url: 'https://hsg.dctpay.com/crest',
// v1url:'https://hsg.dctpay.com/v1',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl: 'https://hsg.dctpay.com/brest',
// imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
// imageqrImg: 'https://hsg.dctpay.com/filesystem/temporary/',
//
url: 'https://hsgcs.dctpay.com/crest',
v1url: 'https://hsgcs.dctpay.com/v1',
brestUrl: 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
// 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/',
// imageqrImg: 'https://hsg.dctpay.com/filesystem/temporary/',
//
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/',
imageqrImg: 'https://hsgcs.dctpay.com/filesystem/temporary/',
userInfo: "",
brestUserInfo: '',

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

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

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

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

@ -1,80 +1,50 @@
{
"_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",
"/"
],
"_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",
"author": {
"name": "LancerComet",
"email": "chw644@hotmail.com"
},
"bugs": {
"url": "https://github.com/LancerComet/vue-jsonp/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "A tiny library for handling JSONP request.",
"devDependencies": {
"@types/expect-puppeteer": "^4.4.3",
"@types/jest": "^26.0.14",
"@types/jest-environment-puppeteer": "^4.4.0",
"@types/puppeteer": "^3.0.2",
"jest": "^26.4.2",
"jest-puppeteer": "^4.4.0",
"puppeteer": "^5.3.1",
"rollup": "^2.28.2",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.27.3",
"ts-jest": "^26.4.1",
"tslint": "^6.1.3",
"typescript": "^4.0.3",
"vue": "^2.6.12"
},
"files": [
"dist/",
"index.d.ts",
"README.md"
],
"homepage": "https://github.com/LancerComet/vue-jsonp#readme",
"keywords": [
"Vue",
"JSONP"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"name": "vue-jsonp",
"repository": {
"type": "git",
"url": "git+https://github.com/LancerComet/vue-jsonp.git"
},
"scripts": {
"build": "rollup -c",
"prepublish": "npm run test",
"pretest": "npm run build",
"preversion": "npm run test",
"test": "jest"
},
"version": "2.0.0"
}
{
"name": "vue-jsonp",
"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"
],
"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"
},
"repository": {
"type": "git",
"url": "https://github.com/LancerComet/vue-jsonp.git"
},
"license": "MIT",
"devDependencies": {
"@types/expect-puppeteer": "^4.4.3",
"@types/jest": "^26.0.14",
"@types/jest-environment-puppeteer": "^4.4.0",
"@types/puppeteer": "^3.0.2",
"jest": "^26.4.2",
"jest-puppeteer": "^4.4.0",
"puppeteer": "^5.3.1",
"rollup": "^2.28.2",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.27.3",
"ts-jest": "^26.4.1",
"tslint": "^6.1.3",
"typescript": "^4.0.3",
"vue": "^2.6.12"
}
}

@ -1,23 +1,235 @@
{
"name": "视频播放器组件",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"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=="
"name": "视频播放器组件",
"version": "1.0.0",
"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"
}
}
},
"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=="
},
"vue-jsonp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA=="
"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=="
},
"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>
<!-- 服务-规则选择 -->

@ -77,6 +77,13 @@
¥0
</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">
@ -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;
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;
@ -491,7 +502,8 @@
})
if (this.payPrice == 0 && !this.orderNo) {
let goods = {
"identificationCode": this.gasOrderList.identificationCode,
"identificationCode": this.gasOrderList.identificationCode,
"promoteCode":this.identificationCode,
"payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword,
@ -729,7 +741,8 @@
title: '提交订单中...'
})
let goods = {
"identificationCode": this.gasOrderList.identificationCode,
"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>
<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"
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
style="align-items: center;">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
{{rebateIntegral}}
</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="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" />
</view>
</view> -->
</view>
<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="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="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式
<!-- <text class="jfrecharge" @click="jumpdeposits" v-if="couponList.payType == 2">积分充值</text> -->
</view>
<view class="width15 flright fotct">
<image class="jtcs" src="../../static/img/jt.png"></image>
</view>
<view class="width100" v-for="(item,index) in paytypeList" :key="index">
<view class="width94 line1 mart5 marb5" v-if="item == 4"></view>
<view class="height50 width100 backcorfff" @tap="paytype='4'" v-if="item == 4">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
银联支付
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='4'" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5" v-if="item == 3"></view>
<view class="height50 width100 backcorfff" @tap="paytype='3'" v-if="item == 3">
<view class="width70 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
工会卡支付<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
</view>
</view> -->
</view>
<view 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>
<view class="sum">实付:<view class="money">{{paytheprice}}</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) {
//
this.deductionPrice = item.highDiscount.discountPrice;
this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2);
} else if (item.highDiscount.discountType == 2) {
if (this.orderPrice > item.highDiscount.discountCondition) {
this.memDiscountId = item.id;
//
this.deductionPrice = item.highDiscount.discountPrice;
let oldprice = this.orderPrice - this.deductionPrice;
this.priceCaluc(oldprice);
} else {
uni.showToast({
title: '请满' + item.highDiscount.discountCondition + '使用此券',
icon: 'none',
duration: 2000
})
}
}
if (item.highDiscount.discountType == 2) {
//
this.deductionPrice = item.highDiscount.discountPrice;
this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2);
} else 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)
let oldprice = this.orderPrice - this.deductionPrice;
this.priceCaluc(oldprice);
}
if (item.highDiscount.discountType == 3) {
//
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;
}
});
},
toPay() {
this.$refs.paymentPassword.modalFun('show');
return;
}
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,64 +650,97 @@
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
});
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
}
})
return;
}
let params = {
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: res.return_msg,
icon: 'none'
title: '支付成功'
})
})
return;
}
let params = {
"orderId": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
hltUnionCardPay(params).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
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
},
blockStart() {},
blockMoving() {
// console.log('')
},
//
blockEnd() {
this.isDiscount = 1;
if (this.deductionPrice == 0) {
this.paytheprice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2))
.toFixed(
2);
} else {
this.paytheprice = parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this
.deductionPrice).toFixed(2);
}
if (this.paytheprice == 0) {
this.isUse = false;
this.paytype = '';
} else {
this.isUse = true;
}
this.getRebateIntegral();
},
//
jumpdeposits() {
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 {

File diff suppressed because one or more lines are too long

@ -47,6 +47,9 @@
:text="therrNum" type="error" size="normal"></uni-badge>
<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>
@ -54,22 +57,22 @@
<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="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>
<view class="topay">
去支付
</view>
</view>
</swiper-item>
</swiper>
<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">剩余时间: {{countdownm}}:{{countdowns}}</view>
</view>
<view class="topay">
去支付
</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
@ -88,20 +91,22 @@
</view>
</view>
<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 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 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 font14 fcor333 mart5">工会卡余额</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">{{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">¥{{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">¥{{userAccount.hltCardPrice}}
</view>
<view class="fontspec font14 fcor333 mart5">工会卡余额</view>
</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
@ -275,42 +285,92 @@
})
}
});
},
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;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
this.toDeposit();
}
});
},
//
getUserOrderList() {
uni.showLoading({
title: '加载中...'
})
let params = {
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 = [];
}
})
},
//
swiperChange(e) {
this.timesettime(this.nopaylist[e.detail.current].createTime);
},
//
jumpDetails(e, item) {
this.orderCheck(e);
if (item == 1 || item == 2 || item == 3) {
uni.navigateTo({
url: '/qianzhu-KFC/order-details/order-details?id=' + e
})
return;
}
uni.navigateTo({
url: '/pages/user/order_details/order_details?id=' + e
})
},
//
orderCheck(item) {
let datas = {
orderNo: item
}
orderCheck(datas).then(res => {
});
},
//
geTel(tel) {
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.assetsstu = 1;
this.getUserAccount();
}
},
//
getUserAccount() {
getUserAccount().then(res => {
if (res.return_code == '000000') {
this.assetsstu = 1;
this.userAccount = res.return_data;
}
});
},
// 广
jumppage(item) {
// if (item == 1) {

@ -178,10 +178,10 @@
<script>
import {
addOrderPay,
orderToUnionPay,
create,
unionPay,
findUser,
hltUnionCardPayghk,
cardPay,
getHuiLianTongCardBalance,
getUserOrderPreList,
findById,
@ -410,7 +410,7 @@
} else {
this.payPrice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this
.deductionPrice).toFixed(2);
}
}
this.getRebateIntegral();
},
rechangeload() {
@ -444,19 +444,24 @@
}
let params = {
"childOrderList": [{
"goodsId": that.objectId,
"goodsType": 6,
"rechargeContent": that.rechargeContent,
"saleCount": 1
}],
"payGold": that.priceValue[1],
"companyId": app.globalData.companyId,
"memDiscountId": that.memDiscountId,
"rechargeContent": that.rechargeContent,
"goodsId": that.objectId,
"integralNum": that.priceValue[1],
"password": ''
"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: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //
newstypeid: 1 ,//id
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() {
},
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>
@ -78,10 +137,9 @@
background-color: #f3f3f3;
}
.srollview {
position: fixed;
top: 0px;
height: 70px;
.srollview {
position: fixed;
height: 70px;
background-color: #ffffff;
display: flex;
flex-direction: row;
@ -90,11 +148,11 @@
.conent {
height: 24px;
line-height: 24px;
line-height: 24px;
margin-top: 15px;
padding-left: 10px;
font-size: 11px;
padding-right: 10px;
font-size: 11px;
padding-right: 10px;
margin-left: 15px;
display: inline-flex;
flex-direction: column;

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
<template>
<view>
<!-- 搜索 -->
<view class="backcorfff width100 height120" style="position: fixed;z-index: 999;" :style="{top:headerTop}" >
<view class="backcorfff width100 height120" style="position: fixed;z-index: 999;" :style="{top:headerTop}">
<view class="alijusstart">
<view class="input-box">
<view class="icon search"></view>
@ -14,15 +14,16 @@
<!-- 顶部导航 -->
<view class="topTabBar">
<view class="grid" v-for="(grid,tbIndex) in orderType" :key="tbIndex" @tap="showType(tbIndex)">
<view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}}
<view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}}
</view>
</view>
</view>
</view>
<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 {
@ -101,8 +102,8 @@
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png',
imgadres1: 'dhf.png',
headerTop: "0px",
headerswper:'120px',
headerTop: "0px",
headerswper: '120px',
typeText: {
1: '等待付款',
2: '订单已支付',
@ -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,
}
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;
orderNo: row,
}
cancelOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
@ -335,19 +339,9 @@
} 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
url: '/qianzhu-KFC/payment-method/payment-method?orderId=' + row.id + '&amount=' + row
.payPrice + '&productType=' + row.productType
})
}
}
@ -437,8 +431,7 @@
.srollview {
position: fixed;
z-index: 999;
height: 50px;
top: 120px;
height: 50px;
background-color: #f3f3f3;
display: flex;
flex-direction: row;

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

@ -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>
<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);
@ -232,30 +241,53 @@
this.orderList.highChildOrderList.forEach((food) => {
this.coutnums += food.saleCount
})
},
//
getDetailByOrderNo() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderNo: this.orderId,
}
getDetailByOrderNo(params).then(res => {
uni.hideLoading();
// if (res.return_code == '000000') {
// this.recinfo = res.return_data;
// }
if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType;
this.orderList = res.return_data;
if (this.orderList.orderStatus == 1) {
this.timer = setInterval(() => {
this.showtime()
})
}
if (this.orderList.orderStatus == 2) {
this.setTimer();
}
this.coutnums = 0;
this.getAllCount();
this.getThirdOrderByOrderNo();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
//
getThirdOrderByOrderId() {
// uni.showLoading({
// title: '...'
// })
//
getThirdOrderByOrderNo() {
let datas = {
orderId: this.orderId
orderNo: this.orderId
}
getThirdOrderByOrderId(datas).then(res => {
// uni.hideLoading();
getThirdOrderByOrderNo(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType;
this.orderList = res.return_data;
if (this.orderList.orderStatus == 1) {
this.timer = setInterval(() => {
this.showtime()
})
}
if (this.orderList.orderStatus == 2) {
this.setTimer();
}
this.coutnums = 0;
this.getAllCount();
this.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

@ -22,6 +22,13 @@
{{couponList.packageDetail.price}}
</view>
</view>
</view>
<view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
<view class="width94 comorder mart10">
@ -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