1.新增钱包功能

2.修改接口问题
master
杨杰 3 years ago
parent 8afa122693
commit 2a2f395f65
  1. 34
      high-unionPay/Utils/Api.js
  2. 55
      high-unionPay/Utils/js/date.js
  3. 5
      high-unionPay/main.js
  4. 2
      high-unionPay/manifest.json
  5. 331
      high-unionPay/pages.json
  6. 710
      high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue
  7. 1110
      high-unionPay/pages/goods/refuel-details/refuel-details.vue
  8. 845
      high-unionPay/pages/goods/refuel/refuel.vue
  9. 7
      high-unionPay/pages/login/register.vue
  10. 172
      high-unionPay/pages/pay/payment/payment.vue
  11. 77
      high-unionPay/pages/tabBar/home/home.vue
  12. 95
      high-unionPay/pages/tabBar/user/user.vue
  13. 563
      high-unionPay/pages/user/bindingCard/bindingCard.vue
  14. 1416
      high-unionPay/pages/user/order_details/order_details.vue
  15. 1073
      high-unionPay/pages/user/order_list/order_list.vue
  16. 48
      high-unionPay/pages/userLogin/userLogin.vue
  17. 2
      high-unionPay/static/css/login.scss
  18. BIN
      high-unionPay/static/img/ghkpay.png
  19. 407
      high-unionPay/subPages/cardsDetails/cardsDetails.vue
  20. 100
      high-unionPay/subPages/cardsList/cardsList.vue
  21. BIN
      high-unionPay/subPages/static/addcards.png
  22. BIN
      high-unionPay/subPages/static/oilcard.png
  23. BIN
      high-unionPay/subPages/static/unioncard.png
  24. 2
      high-unionPay/subPages/unionPay-orderList/unionPay-orderList.vue
  25. 34
      high-unionPay/uni.scss

@ -171,7 +171,19 @@ export const getGasStoreList = params => {
export const getGasDetailByStoreKey = params => { export const getGasDetailByStoreKey = params => {
return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data); return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data);
} }
//团油距离限制
export const getDictionaryByCodeTypeOl = params => {
return POST('GET', `${base}/common/getDictionaryByCodeTypeOl`, params).then(res => res.data);
}
//团油计算价格
export const oilPriceCompute = params => {
return POST('GET', `${base}/highGas/oilPriceCompute`, params).then(res => res.data);
}
//查询卡数据字典
export const getDictionaryByCodeType = params => {
return POST('GET', `${base}/common/getDictionaryByCodeType`, params).then(res => res.data);
}
//获取已开通的省份 //获取已开通的省份
export const getDredgeProvince = params => { export const getDredgeProvince = params => {
return POST('GET', `${base}/common/getDredgeProvince`, params).then(res => res.data); return POST('GET', `${base}/common/getDredgeProvince`, params).then(res => res.data);
@ -181,10 +193,15 @@ export const getCmsContent = params => {
return POST('GET', `${base}/cmsContent/getCmsContent`, params).then(res => res.data); return POST('GET', `${base}/cmsContent/getCmsContent`, params).then(res => res.data);
} }
//油卡支付
export const oilCardPay = params => {
return POST('POST', `${base}/order/oilCardPay`, params).then(res => res.data);
}
//提交订单 //提交订单
export const addOrderPay = params => { export const addOrderPay = params => {
return POST('POST', `${base}/outRechargeOrder/addOrder`, params).then(res => res.data); return POST('POST', `${base}/outRechargeOrder/addOrder`, params).then(res => res.data);
} }
//话费充值查询 //话费充值查询
export const getListOutRechargePrice = params => { export const getListOutRechargePrice = params => {
return POST('GET', `${base}/outRechargePrice/getListOutRechargePrice`, params).then(res => res.data); return POST('GET', `${base}/outRechargePrice/getListOutRechargePrice`, params).then(res => res.data);
@ -233,6 +250,10 @@ export const getDiscountPackageDetail = params => {
export const getHuiLianTongCardByCardNo = params => { export const getHuiLianTongCardByCardNo = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardByCardNo`, params).then(res => res.data); return POST('GET', `${base}/highUserCard/getHuiLianTongCardByCardNo`, params).then(res => res.data);
} }
//查询油卡详情
export const getDetailByCardNo = params => {
return POST('GET', `${base}/oilCard/getDetailByCardNo`, params).then(res => res.data);
}
// 获取用户卡号列表 // 获取用户卡号列表
export const getUserCardList = params => { export const getUserCardList = params => {
return POST('GET', `${base}/highUserCard/getUserCardList`, params).then(res => res.data); return POST('GET', `${base}/highUserCard/getUserCardList`, params).then(res => res.data);
@ -241,6 +262,10 @@ export const getUserCardList = params => {
export const getHuiLianTongCardByPhone = params => { export const getHuiLianTongCardByPhone = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardByPhone`, params).then(res => res.data); return POST('GET', `${base}/highUserCard/getHuiLianTongCardByPhone`, params).then(res => res.data);
} }
//查询油卡消费
export const getOilCardRecordList = params => {
return POST('GET', `${base}/oilCard/getOilCardRecordList`, params).then(res => res.data);
}
// 删除用户卡号 // 删除用户卡号
export const delUserCard = params => { export const delUserCard = params => {
return POST('POST', `${base}/highUserCard/delUserCard`, params).then(res => res.data); return POST('POST', `${base}/highUserCard/delUserCard`, params).then(res => res.data);
@ -257,8 +282,9 @@ export const getHuiLianTongCardConsume = params => {
export const hltUnionCardPay = params => { export const hltUnionCardPay = params => {
return POST('POST', `${base}/order/hltUnionCardPay`, params).then(res => res.data); return POST('POST', `${base}/order/hltUnionCardPay`, params).then(res => res.data);
} }
export const bindHuiLianTongCard = params => { //绑定卡包
return POST('POST', `${base}/highUserCard/bindHuiLianTongCard`, params).then(res => res.data); export const bindHuiLianTongCard = params => {
return POST('POST', `${base}/highUserCard/bindCard`, params).then(res => res.data);
} }
/** /**
* 工会卡 * 工会卡
@ -319,8 +345,8 @@ export const getH5UserInfo = params => {
return POST('GET', `${base}/wechat/getH5UserInfo`, params).then(res => res.data); return POST('GET', `${base}/wechat/getH5UserInfo`, params).then(res => res.data);
} }
//获取验证码 //获取验证码
export const sendSmsCode = params => { export const sendSmsCodeByHw = params => {
return POST('GET', `${base}/sms/sendSmsCode`, params).then(res => res.data); return POST('GET', `${base}/SendSms/sendSmsCodeByHw`, params).then(res => res.data);
} }
//绑定手机号 //绑定手机号
export const bindUserPhone = params => { export const bindUserPhone = params => {

@ -0,0 +1,55 @@
const isNullOrEmpty = function(val) {
if (val == null || val == "" || typeof(val) == undefined) {
return true;
} else {
return false;
}
}
const timeFormat = (value, format) => {
let date = new Date(value);
let y = date.getFullYear();
let m = date.getMonth() + 1;
let d = date.getDate();
let h = date.getHours();
let min = date.getMinutes();
let s = date.getSeconds();
let result = "";
if (format == undefined) {
result = `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} ${
h < 10 ? "0" + h : h
}:${min < 10 ? "0" + min : min}:${s < 10 ? "0" + s : s}`;
}
if (format == "yyyy-mm-dd hh:mm") {
result = `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} `;
}
if (format == "yyyy-mm-dd") {
result = `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d}`;
}
if (format == "yyyy-mm") {
result = `${y}-${m < 10 ? "0" + m : m}`;
}
if (format == "mm-dd") {
result = ` ${mm < 10 ? "0" + mm : mm}:${ddmin < 10 ? "0" + dd : dd}`;
}
if (format == "hh:mm") {
result = ` ${h < 10 ? "0" + h : h}:${min < 10 ? "0" + min : min}`;
}
if (format == "yyyy") {
result = `${y}`;
}
return result;
};
// {{date|isNullOrEmpty}}
// {{date|timeFormat('yyyy-mm-dd')}}
// {{date|timeFormat('yyyy-mm')}}
// {{date|timeFormat('hh:mm')}}
// {{date|timeFormat('yyyy')}}
// {{date|timeFormat}}
export {
isNullOrEmpty,
timeFormat
}

@ -2,6 +2,11 @@ import Vue from 'vue'
import App from './App' import App from './App'
import {VueJsonp} from 'vue-jsonp' import {VueJsonp} from 'vue-jsonp'
import share from 'common/share.js' import share from 'common/share.js'
import * as filters from './Utils/js/date.js'
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
import vueCupUi from "components/vue-cup-ui/lib/vue-cup-ui.common.js" import vueCupUi from "components/vue-cup-ui/lib/vue-cup-ui.common.js"
Vue.use(vueCupUi) Vue.use(vueCupUi)

@ -80,7 +80,7 @@
} }
} }
}, },
"title" : "嗨加油", "title" : "嗨森逛",
"router" : { "router" : {
"mode" : "hash", "mode" : "hash",
"base" : "/unionPay" "base" : "/unionPay"

@ -4,7 +4,7 @@
"path": "pages/tabBar/home/home", "path": "pages/tabBar/home/home",
"style": { "style": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "嗨加油", "navigationBarTitleText": "嗨森逛",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"onReachBottomDistance": 50, "onReachBottomDistance": 50,
@ -21,21 +21,27 @@
}, { }, {
"path": "pages/unionPay/unionPay-entrance/unionPay-entrance", "path": "pages/unionPay/unionPay-entrance/unionPay-entrance",
"style": { "style": {
"navigationBarTitleText": "嗨加油", "navigationBarTitleText": "嗨森逛",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/unionPay/unionPay", "path": "pages/unionPay/unionPay",
"style": { "style": {
"navigationBarTitleText": "嗨加油", "navigationBarTitleText": "嗨森逛",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -45,7 +51,10 @@
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -55,6 +64,7 @@
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": false, //
"bounce": "none", // "bounce": "none", //
"softinputNavBar": "none" "softinputNavBar": "none"
} }
@ -67,7 +77,10 @@
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -77,7 +90,10 @@
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -86,7 +102,10 @@
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -97,7 +116,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -107,7 +129,10 @@
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, },
@ -118,7 +143,8 @@
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"bounce": "none" "bounce": "none",
"titleNView": false //
} }
} }
}, },
@ -129,7 +155,11 @@
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "门店列表", "navigationBarTitleText": "门店列表",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, },
@ -140,7 +170,6 @@
"navigationBarTitleText": "分类", "navigationBarTitleText": "分类",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": false, // "titleNView": false, //
"bounce": "none" "bounce": "none"
@ -176,14 +205,14 @@
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"softinputNavBar": "none" "softinputNavBar": "none",
"titleNView": false //
} }
} }
}, },
{ {
"path": "pages/goods/goods", "path": "pages/goods/goods",
"style": { "style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTitleText": "详情", "navigationBarTitleText": "详情",
@ -207,6 +236,7 @@
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": false, //
"bounce": "none", // "bounce": "none", //
"softinputNavBar": "none" "softinputNavBar": "none"
} }
@ -221,7 +251,8 @@
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"bounce": "none", // "bounce": "none", //
"softinputNavBar": "none" "softinputNavBar": "none",
"titleNView": false //
} }
} }
}, { }, {
@ -231,7 +262,10 @@
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"softinputNavBar": "none" "softinputNavBar": "none",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/user/coupon/coupon", "path": "pages/user/coupon/coupon",
@ -241,6 +275,7 @@
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": false, //
"bounce": "none" "bounce": "none"
} }
} }
@ -252,7 +287,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/pay/payment/payment", "path": "pages/pay/payment/payment",
@ -262,7 +300,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/pay/success/success", "path": "pages/pay/success/success",
@ -272,7 +313,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, },
{ {
@ -282,7 +326,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, },
@ -294,14 +341,20 @@
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/user/business/business", "path": "pages/user/business/business",
"style": { "style": {
"navigationBarTitleText": "门店", "navigationBarTitleText": "门店",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -310,47 +363,68 @@
"navigationBarTitleText": "我的订单", "navigationBarTitleText": "我的订单",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"backgroundColorBottom": "#ffffff" "backgroundColorBottom": "#ffffff",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/goods/recording/recording", "path": "pages/goods/recording/recording",
"style": { "style": {
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/user/mineCoupons/mineCoupons", "path": "pages/user/mineCoupons/mineCoupons",
"style": { "style": {
"navigationBarTitleText": "我的卡券", "navigationBarTitleText": "我的卡券",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/goods/coupons-info-details/coupons-info-details", "path": "pages/goods/coupons-info-details/coupons-info-details",
"style": { "style": {
"navigationBarTitleText": "卡券详情", "navigationBarTitleText": "卡券详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/user/mineCouponsDestails/mineCouponsDestails", "path": "pages/user/mineCouponsDestails/mineCouponsDestails",
"style": { "style": {
"navigationBarTitleText": "优惠券详情", "navigationBarTitleText": "优惠券详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/goods/externalCoupon/externalCoupon", "path": "pages/goods/externalCoupon/externalCoupon",
"style": { "style": {
"navigationBarTitleText": "扫码领取优惠券", "navigationBarTitleText": "扫码领取优惠券",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/user/agentCoupons/agentCoupons", "path": "pages/user/agentCoupons/agentCoupons",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -360,7 +434,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, },
{ {
@ -371,7 +448,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -380,35 +460,50 @@
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationBarTitleText": "充值", "navigationBarTitleText": "充值",
"backgroundColorTop": "#ffffff", "backgroundColorTop": "#ffffff",
"backgroundColorBottom": "#ffffff" "backgroundColorBottom": "#ffffff",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/user/positioning/positioning", "path": "pages/user/positioning/positioning",
"style": { "style": {
"navigationBarTitleText": "地区选择", "navigationBarTitleText": "地区选择",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/tabBar/order/order", "path": "pages/tabBar/order/order",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/qianZhuPay/qianZhuPay", "path": "pages/qianZhuPay/qianZhuPay",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/tabBar/order/webUrl/webUrl", "path": "pages/tabBar/order/webUrl/webUrl",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -419,7 +514,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/login/updatePas/resetPas", "path": "pages/login/updatePas/resetPas",
@ -429,7 +527,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -440,7 +541,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -450,7 +554,10 @@
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -461,29 +568,38 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/userLogin/userLogin", "path": "pages/userLogin/userLogin",
"style": { "style": {
"navigationBarTitleText": "嗨加油", "navigationBarTitleText": "嗨森逛",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "pages/user/cardDes/cardDes", "path": "pages/user/cardDes/cardDes",
"style": { "style": {
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTitleText": "绑定卡号", "navigationBarTitleText": "卡包",
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -493,7 +609,10 @@
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
} }
@ -505,7 +624,10 @@
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
} }
@ -514,27 +636,27 @@
"path": "pages/unionPay/unionorder-des/unionorder-des", "path": "pages/unionPay/unionorder-des/unionorder-des",
"style": { "style": {
"navigationBarTitleText": "充值详情", "navigationBarTitleText": "充值详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
} }
}, {
"path": "pages/tabBar/order/stagesUrl/stagesUrl",
"style": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
} }
,{ ],
"path" : "pages/tabBar/order/stagesUrl/stagesUrl",
"style" :
{
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}
],
"subpackages": [{ "subpackages": [{
"root": "subPages", "root": "subPages",
"pages": [{ "pages": [{
@ -545,7 +667,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -556,7 +681,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#e62601", "navigationBarBackgroundColor": "#e62601",
"backgroundColorTop": "#e62601", "backgroundColorTop": "#e62601",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -567,7 +695,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -577,7 +708,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -587,7 +721,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "coupon-packge-details/coupon-packge-details", "path": "coupon-packge-details/coupon-packge-details",
@ -596,7 +733,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
"path": "coupon-comfirmation/coupon-comfirmation", "path": "coupon-comfirmation/coupon-comfirmation",
@ -605,7 +745,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -616,7 +759,10 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}, { }, {
@ -627,7 +773,38 @@
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
}
}, {
"path": "cardsList/cardsList",
"style": {
"navigationBarTitleText": "卡包",
"enablePullDownRefresh": false,
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
}
}, {
"path": "cardsDetails/cardsDetails",
"style": {
"navigationBarTitleText": "卡详情",
"enablePullDownRefresh": false,
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false //
}
} }
}] }]
@ -649,7 +826,7 @@
"pagePath": "pages/tabBar/home/home", "pagePath": "pages/tabBar/home/home",
"iconPath": "static/img/tabBar/home.png", "iconPath": "static/img/tabBar/home.png",
"selectedIconPath": "static/img/tabBar/home-on.png", "selectedIconPath": "static/img/tabBar/home-on.png",
"text": "嗨加油" "text": "嗨森逛"
}, },
// { // {
// "pagePath": "pages/tabBar/category/category", // "pagePath": "pages/tabBar/category/category",

@ -1,313 +1,399 @@
<template> <template>
<view> <view>
<!-- 头部 --> <!-- 头部 -->
<view class="width100 height120 backcorfff"> <view class="width100 height120 backcorfff">
<image :src="orderList.goodsImg" class="flleft conImg mart10 margle10"></image> <image :src="orderList.goodsImg" class="flleft conImg mart10 margle10"></image>
<view class="conCont paddtop15"> <view class="conCont paddtop15">
<view class="font20 fontwig6 fcor333 text1 paddtright10">{{orderList.goodsName}}</view> <view class="font20 fontwig6 fcor333 text1 paddtright10">{{orderList.goodsName}}</view>
<view class="font14 fcor999 text2 paddtop5 paddtright10">{{refulAdress}}</view> <view class="font14 fcor999 text2 paddtop5 paddtright10">{{refulAdress}}</view>
<view class="font20 fontwig6 fcoreb5 paddtop5">{{orderList.gasPriceVip}} <view class="font20 fontwig6 fcoreb5 paddtop5">{{orderList.gasPriceVip}}
<text class="margle10 slogan font14">{{orderList.gasPriceGun}}</text> <text class="margle10 slogan font14">{{orderList.gasPriceGun}}</text>
</view> </view>
</view> </view>
</view> </view>
<!-- // --> <!-- // -->
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">订单详情</view> <view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">订单详情</view>
<view class="line1"></view> <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 font16 width100 backcorfff"> <view class="heightl60 paddleft10 fcor666 font16 width100 backcorfff">
<view class="flleft width50"> <view class="flleft width50">
油号\油枪 油号\油枪
</view> </view>
<view class="flright width40 fotct"> <view class="flright width40 fotct">
{{orderList.gasOilNo}}#/{{orderList.gasGunNo}} {{orderList.gasOilNo}}#/{{orderList.gasGunNo}}
</view> </view>
</view> </view>
<view class="line1"></view> <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 font16 width100 backcorfff"> <view class="heightl60 paddleft10 fcor666 font16 width100 backcorfff">
<view class="flleft width50"> <view class="flleft width50">
加油金额 加油金额
</view> </view>
<view class="flright width40 fotct"> <view class="flright width40 fotct">
{{orderList.totalPrice}} {{orderList.totalPrice}}
</view> </view>
</view> </view>
<!-- // --> <!-- // -->
<!-- <view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式</view> <view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式</view>
<view class="line1"></view> <view class="line1"></view>
<view class="width100 backcorfff"> <view class="width100 backcorfff">
<view class="line1"></view> <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='weixin'"> <view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='weixin'">
<view class="width60 flleft fontwig6"> <view class="width60 flleft fontwig6">
银联支付 银联支付
</view> </view>
<view class="flright width30 fotct"> <view class="flright width30 fotct">
<radio :checked="paytype=='weixin'" color="#0083f5" /> <radio :checked="paytype=='weixin'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="line1"></view> <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='gonghuika'"> <view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='oilcard'">
<view class="width60 flleft fontwig6"> <view class="width60 flleft fontwig6">
积分<text class="font14 fcor666 margle">(积分:{{user.gold}})</text> 油卡支付<text class="font14 fcor666 margle">余额: {{oilPirce}}</text>
</view> </view>
<view class="flright width30 fotct"> <view class="flright width30 fotct">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" /> <radio :checked="paytype=='oilcard'" @click="changeRiado()" color="#0083f5" />
</view> </view>
</view> </view>
</view> --> <!-- <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='gonghuika'">
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view> <view class="width60 flleft fontwig6">
<view class="width95 paddleft10 font14 fcor999 mart5">1.<text 积分<text class="font14 fcor666 margle">(积分:{{user.gold}})</text>
class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view> </view>
<view class="width95 paddleft10 font14 fcor999 mart5"> <view class="flright width30 fotct">
2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view> <radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
<view class="height80 width100"></view> </view>
<!-- 底部按钮 --> </view> -->
<view class="footer"> </view>
<view class="width50 flleft fcoreb5 padleft15 font15">
合计: <text class="font24">{{payprice}}</text> <view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view>
</view> <view class="width95 paddleft10 font14 fcor999 mart5">1.<text
<button class="reBtn flright" @click="unionPay">去支付</button> class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view>
</view> <view class="width95 paddleft10 font14 fcor999 mart5">
2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle"/> <view class="height80 width100"></view>
</view> <!-- 底部按钮 -->
</template> <view class="footer">
<view class="width50 flleft fcoreb5 padleft15 font15">
<script> 合计: <text class="font24">{{payprice}}</text>
import { </view>
getOrderById, <button class="reBtn flright" @click="orderToPay">去支付</button>
orderToPay, </view>
unionPay,
orderToGoldPay, <ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" />
hltUnionCardPay </view>
} from '../../../Utils/Api.js'; </template>
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
let app = getApp(); <script>
export default { import {
components: { getOrderById,
ssPaymentPassword orderToPay,
}, unionPay,
data() { orderToGoldPay,
return { hltUnionCardPay,
orderNo: '', findUser,
couponId: '', oilCardPay
payprice: '', } from '../../../Utils/Api.js';
orderList: '', import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
refulAdress: '', let app = getApp();
tongCardPrice: 0, export default {
user: '', components: {
paytype: '', ssPaymentPassword
PaymentPassword: '', },
} data() {
}, return {
onLoad(e) { orderNo: '',
this.payprice = e.payprice; couponId: '',
this.orderNo = e.orderId; payprice: '',
this.couponId = e.couponId; orderList: '',
this.refulAdress = e.adres; refulAdress: '',
this.getOrderById(); tongCardPrice: 0,
}, oilPirce: 0, //
onShow() { user: '',
let that = this; paytype: '',
that.paytype = ''; PaymentPassword: '',
that.user = app.globalData.userInfo; }
}, },
methods: { onLoad(e) {
// this.payprice = e.payprice;
submitHandle(e) { this.orderNo = e.orderId;
this.PaymentPassword = e.value; this.couponId = e.couponId;
if(this.PaymentPassword == ''){ this.refulAdress = e.adres;
uni.showToast({ this.getOrderById();
title: '请勿手动关闭弹窗', },
icon: 'none', onShow() {
duration: 2000 let that = this;
}) that.paytype = '';
return; that.findUser();
} // that.user = app.globalData.userInfo;
uni.showLoading({ },
title: '支付中...' methods: {
}) findUser() {
let params = { let params;
"orderId": this.orderNo, findUser(params).then(res => {
"password": this.PaymentPassword if (res.return_code == '000000') {
} app.globalData.userInfo = res.return_data;
orderToGoldPay(params).then(res => { this.user = res.return_data;
uni.hideLoading(); if (res.return_data.oilCard) {
if (res.return_code == '000000') { this.oilPirce = res.return_data.oilCard.amount;
uni.showToast({ }
title: '支付成功' uni.setStorage({
}) key: "user",
uni.reLaunch({ data: res.return_data
url: '/pages/goods/refuel-succes/refuel-succes?id=' +this.orderNo })
}); }
return; });
} },
if (res.return_code == '102130') { //
uni.navigateTo({ submitHandle(e) {
url: '../../login/updatePas/updatePas' this.PaymentPassword = e.value;
}) if (this.PaymentPassword == '') {
return; uni.showToast({
} title: '请勿手动关闭弹窗',
uni.showToast({ icon: 'none',
title: res.return_msg, duration: 2000
icon: 'none' })
}) return;
}) }
uni.showLoading({
title: '支付中...'
}, })
// if (this.paytype == 'jifen') {
changeRiado() { let params = {
if (!this.user.isSetHltCard) { "orderId": this.orderNo,
uni.showToast({ "password": this.PaymentPassword
icon: 'none', }
title: '当前账号还未绑定,前往绑定', orderToGoldPay(params).then(res => {
duration: 2000, uni.hideLoading();
success() { if (res.return_code == '000000') {
setTimeout(() => { uni.showToast({
uni.navigateTo({ title: '支付成功'
url: '../../user/bindingCard/bindingCard' })
}) uni.reLaunch({
}, 1000) url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
} });
}); return;
return; }
} if (res.return_code == '102130') {
}, uni.navigateTo({
getOrderById() { url: '../../login/updatePas/updatePas'
uni.showLoading({ })
title: '加载中...' return;
}) }
let params = { uni.showToast({
orderId: this.orderNo, title: res.return_msg,
} icon: 'none'
getOrderById(params).then(res => { })
uni.hideLoading(); })
if (res.return_code == '000000') { return;
this.orderList = res.return_data.highChildOrderList[0]; }
} if (this.paytype == 'oilcard') {
}) let params = {
}, "orderId": this.orderNo,
"cardNo": this.user.oilCard.cardNo,
// "password": this.PaymentPassword
orderToPay() { }
let that = this; oilCardPay(params).then(res => {
if (that.paytype == '') { uni.hideLoading();
uni.showToast({ if (res.return_code == '000000') {
title: '请选择支付方式', uni.showToast({
icon: 'none', title: '支付成功'
duration: 2000 })
}) uni.reLaunch({
return; url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
} });
if (that.paytype == 'weixin') { return;
that.unionPay(); }
return; if (res.return_code == '102130') {
} uni.navigateTo({
if(that.paytype == 'gonghuika'){ url: '../../login/updatePas/updatePas'
if (!that.user.isSetPayPwd) { })
uni.navigateTo({ return;
url: '../../login/updatePas/updatePas' }
}) uni.showToast({
return; title: res.return_msg,
} icon: 'none'
that.$refs.paymentPassword.modalFun('show'); })
} })
return;
}, }
//
unionPay() { },
let goods = { //
"orderId": this.orderNo changeRiado() {
} if (!this.user.isSetHltCard) {
unionPay(goods).then(res => { uni.showToast({
if (res.return_code == '000000') { icon: 'none',
this.uniontopay(res.return_data.prepayid); title: '当前账号还未绑定,前往绑定',
} else { duration: 2000,
uni.showToast({ success() {
title: res.return_msg, setTimeout(() => {
icon: 'none', uni.navigateTo({
duration: 2000 url: '../../user/bindingCard/bindingCard'
}); })
} }, 1000)
}) }
}, });
// return;
uniontopay(item) { }
let that = this; },
upsdk.pluginReady(function() { getOrderById() {
upsdk.pay({ uni.showLoading({
tn: item, title: '加载中...'
success: function(res) { })
uni.showToast({ let params = {
title: '支付成功' orderId: this.orderNo,
}) }
uni.reLaunch({ getOrderById(params).then(res => {
url: '/pages/goods/refuel-succes/refuel-succes?id=' +that.orderNo uni.hideLoading();
}); if (res.return_code == '000000') {
}, this.orderList = res.return_data.highChildOrderList[0];
fail: function(err) { }
uni.showToast({ })
title: err.msg, },
icon: 'none',
duration: 2000 //
}) orderToPay() {
// , err.msg , TN, let that = this;
} if (that.paytype == '') {
}); uni.showToast({
}); title: '请选择支付方式',
} icon: 'none',
} duration: 2000
} })
</script> return;
}
<style lang="less"> if (that.paytype == 'weixin') {
page { that.unionPay();
background-color: #f7f7f7; return;
} }
if (that.paytype == 'gonghuika') {
.conImg { if (!that.user.isSetPayPwd) {
width: 100px; uni.navigateTo({
height: 100px; url: '../../login/updatePas/updatePas'
border-radius: 8px; })
} return;
}
.conCont { that.$refs.paymentPassword.modalFun('show');
margin-left: 115px; }
} if (that.paytype == 'oilcard') {
if (!that.user.isSetPayPwd) {
.slogan { uni.navigateTo({
color: #807c87; url: '../../login/updatePas/updatePas'
text-decoration: line-through; })
} return;
}
.footer { if (!that.user.isSetHltCard) {
position: fixed; uni.showToast({
bottom: 0upx; icon: 'none',
width: 100%; title: '当前账号还未绑定,前往绑定',
height: 100rpx; duration: 2000,
color: #FFFFFF; success() {
border-top: solid 1upx #eee; setTimeout(() => {
background-color: #FFFFFF; uni.navigateTo({
z-index: 2; url: '../../user/bindingCard/bindingCard'
display: flex; })
justify-content: space-between; }, 1000)
align-items: center; }
});
.reBtn { return;
width: 120px; }
background-color: #089bf5; that.$refs.paymentPassword.modalFun('show');
color: #FFFFFF; }
text-align: center;
padding: 0; },
font-size: 16px; //
border-radius: 0px; unionPay() {
height: 50px; let goods = {
line-height: 50px; "orderId": this.orderNo
position: absolute; }
right: 0px; unionPay(goods).then(res => {
} if (res.return_code == '000000') {
} this.uniontopay(res.return_data.prepayid);
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
}
})
},
//
uniontopay(item) {
let that = this;
upsdk.pluginReady(function() {
upsdk.pay({
tn: item,
success: function(res) {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
.orderNo
});
},
fail: function(err) {
uni.showToast({
title: err.msg,
icon: 'none',
duration: 2000
})
// , err.msg , TN,
}
});
});
}
}
}
</script>
<style lang="less">
page {
background-color: #f7f7f7;
}
.conImg {
width: 100px;
height: 100px;
border-radius: 8px;
}
.conCont {
margin-left: 115px;
}
.slogan {
color: #807c87;
text-decoration: line-through;
}
.footer {
position: fixed;
bottom: 0upx;
width: 100%;
height: 100rpx;
color: #FFFFFF;
border-top: solid 1upx #eee;
background-color: #FFFFFF;
z-index: 2;
display: flex;
justify-content: space-between;
align-items: center;
.reBtn {
width: 120px;
background-color: #089bf5;
color: #FFFFFF;
text-align: center;
padding: 0;
font-size: 16px;
border-radius: 0px;
height: 50px;
line-height: 50px;
position: absolute;
right: 0px;
}
}
</style> </style>

File diff suppressed because it is too large Load Diff

@ -1,488 +1,359 @@
<template> <template>
<view> <view>
<view class="width100 backcorfff"> <view class="width100 backcorfff">
<image mode="widthFix" class=" flleft sear mart15" :src="imagewxUrl+imgadres"></image> <image mode="widthFix" class=" flleft sear mart15" :src="imagewxUrl+imgadres"></image>
<uSearchBar @confirm="search" @input="input"></uSearchBar> <uSearchBar @confirm="search" @input="input"></uSearchBar>
</view> </view>
<!-- <slFilter :independence="true" :color="titleColor" :themeColor="themeColor" :menuList.sync="menuList" <!-- <slFilter :independence="true" :color="titleColor" :themeColor="themeColor" :menuList.sync="menuList"
@result="result"></slFilter> --> @result="result"></slFilter> -->
<view class="width100 height40 backcorfff"> <view class="width100 height40 backcorfff">
<view class="stuMenu flleft fotct" @click="showPopup(1)">{{distance}} <view class="width90">
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> <view class="stuMenu flleft fotct" @click="showPopup(3)">{{onilName}}
</view> <image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
<view class="stuMenu flleft fotct" @click="showPopup(2)">{{distanceName}} </view>
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> <view class="stuMenu flleft fotct" @click="showPopup(1)">{{distance}}
</view> <image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
<view class="stuMenu flleft fotct" @click="showPopup(3)">{{onilName}} </view>
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image> <!-- <view class="stuMenu flleft fotct" @click="showPopup(2)">{{distanceName}}
</view> <image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
</view> </view> -->
<view v-if="refuelList == '' " class="mart60 fotct font14 fcor666"> </view>
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image> </view>
</view>
<view class="width96 height100p backcorfff border-r mart10" v-for="(item,index) in refuelList" :key="index"> <view v-if="refuelList == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" :src="item.store_logo" class="recontleft flleft mart10 border-r" <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image>
style="max-height: 80px;" @click="goDetails(item.store_key,item.id)"> </view>
</image> <view class="width96 height100p backcorfff border-r mart10" v-for="(item,index) in refuelList" :key="index">
<view class="recontright"> <image mode="widthFix" :src="item.store_logo" class="recontleft flleft mart10 border-r"
<view class="text1 width100 font18 fontwig6 paddtop10" @click="goDetails(item.store_key,item.id)"> style="max-height: 80px;" @click="goDetails(item.store_key,item.id)">
{{item.store_name}}</view> </image>
<view class="width100 mart5 height22"> <view class="recontright">
<view class="width70 flleft text1 font13 fcor999" @click="goDetails(item.store_key,item.id)"> <view class="text1 width100 font18 fontwig6 paddtop10" @click="goDetails(item.store_key,item.id)">
{{item.address}} {{item.store_name}}
</view> </view>
<view class="width30 flright font13 fcor666 fotct" @click="seeloaction(item)"> <view class="width100 mart5 height22">
<image mode="widthFix" :src="imagewxUrl+imgadres1" style="width: 10px;"></image> <view class="width70 flleft text1 font13 fcor999" @click="goDetails(item.store_key,item.id)">
{{item.distance}}km {{item.address}}
</view> </view>
</view> <view class="width30 flright font13 fcor666 fotct" @click="seeloaction(item)">
<view class="font14 width100 fcoreb5 mart5 height22" @click="goDetails(item.store_key,item.id)"> <image mode="widthFix" :src="imagewxUrl+imgadres1" style="width: 10px;"></image>
<text class="font18 fontwig6">{{item.price_vip}}</text><text {{item.distance}}km
class="fcor999 margle">油站价{{item.price_gun}}</text> </view>
</view> </view>
</view> <view class="font14 width100 fcoreb5 mart5 height22" @click="goDetails(item.store_key,item.id)">
</view> <text class="font18 fontwig6">{{item.price_vip}}</text><text
class="fcor999 margle">油站价{{item.price_gun}}</text>
<wybPopup ref="popup" type="bottom" height="800" width="500" radius="6" :showCloseIcon="false"> </view>
<view class="fotct font18 fontwig6 fcor333 mart10 height30" v-if="typeId == 1">筛选距离</view> </view>
<view class="fotct font18 fontwig6 fcor333 mart10 height30" v-if="typeId == 2">优先条件</view> </view>
<view class="fotct font18 fontwig6 fcor333 mart10 height30" v-if="typeId == 3">油号选择</view>
<view class="mart15" v-if="typeId == 1"> <wybPopup ref="popup" type="bottom" height="800" width="500" radius="6" :showCloseIcon="false">
<view :class="item.name == distance?'activeRefuel':'refuel'" v-for="(item,index) in gunnumber" <view class="fotct font18 fontwig6 fcor333 mart10 height30" v-if="typeId == 1">筛选距离</view>
:key="index" @click="changeValue(item)"> <!-- <view class="fotct font18 fontwig6 fcor333 mart10 height30" v-if="typeId == 2">优先条件</view> -->
{{item.name}} <view class="fotct font18 fontwig6 fcor333 mart10 height30" v-if="typeId == 3">油号选择</view>
</view> <view class="mart15" v-if="typeId == 1">
</view> <view :class="item.name == distance?'activeRefuel':'refuel'" v-for="(item,index) in gunnumber"
:key="index" @click="changeValue(item)">
<view class="mart15" v-if="typeId == 2"> {{item.name}}
<view :class="item.name == distanceName?'activeRefuel':'refuel'" v-for="(item,index) in detailList" </view>
:key="index" @click="changeValue1(item)"> </view>
{{item.name}}
</view> <!-- <view class="mart15" v-if="typeId == 2">
</view> <view :class="item.name == distanceName?'activeRefuel':'refuel'" v-for="(item,index) in detailList"
<view class="mart15" v-if="typeId == 3"> :key="index" @click="changeValue1(item)">
<view v-for="(item,index) in oilList" :key="index"> {{item.name}}
<view class="font15 fcor666 width90 mart10 height22">{{item.name}}</view> </view>
<view :class="items.name == onilName?'activeRefuel':'refuel'" </view> -->
v-for="(items,indexs) in item.nillist" :key="indexs" @click="changeValue2(items)"> <view class="mart15" v-if="typeId == 3">
{{items.name}} <view class="font15 fcor666 width90 mart10 height22">油品</view>
</view> <view :class="items.codeName == onilName?'activeRefuel':'refuel'" v-for="(items,indexs) in oilList"
</view> :key="indexs" @click="changeValue2(items)">
</view> {{items.codeName}}
</wybPopup> </view>
<!-- <authorize></authorize> --> </view>
</view> </wybPopup>
</template> <!-- <authorize></authorize> -->
<script> </view>
import { </template>
getGasStoreList
} from '../../../Utils/Api.js'; <script>
import slFilter from '@/components/sl-filter/sl-filter.vue'; import {
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; getGasStoreList,
import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue'; getDictionaryByCodeType
// import authorize from '../../../components/Authorize.vue' } from '../../../Utils/Api.js';
let app = getApp(); import slFilter from '@/components/sl-filter/sl-filter.vue';
export default { import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
components: { import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue';
slFilter, // import authorize from '../../../components/Authorize.vue'
// authorize, let app = getApp();
uSearchBar, export default {
wybPopup components: {
}, slFilter,
data() { // authorize,
return { uSearchBar,
themeColor: '#089bf5', wybPopup
titleColor: '#666666', },
filterResult: '', data() {
imagewxUrl: app.globalData.imageWxImg, return {
imgadres:'btjy.png', themeColor: '#089bf5',
imgadres1:'dh.png', titleColor: '#666666',
imgadres2:'xiala.png', filterResult: '',
imgadres3:'noorder.png', imagewxUrl: app.globalData.imageWxImg,
menuList: [ imgadres: 'btjy.png',
{ imgadres1: 'dh.png',
'title': '油号', imgadres2: 'xiala.png',
'key': 'single2', imgadres3: 'noorder.png',
'isMutiple': false, refuelList: [],
'detailTitle': '', pageNum: 1,
'reflexTitle': true, pageSize: 10,
'defaultSelectedIndex': 0, isNoMoreData: false,
'detailList': [{ searname: '',
'title': '90#', gunnumber: [{
'value': '' id: 1,
}, { name: '6km内',
'title': '92#', value: 6
'value': '92#' },
}, { {
'title': '95#', id: 2,
'value': '95#' name: '10km内',
}, { value: 10
'title': '98#', },
'value': '98#' {
}, { id: 3,
'title': '101#', name: '15km内',
'value': '101#' value: 15
}, ] },
}, {
{ id: 4,
'title': '距离', name: '20km内',
'key': 'single3', value: 20
'isMutiple': false, },
'detailTitle': '', {
'reflexTitle': true, id: 5,
'defaultSelectedIndex': 0, name: '50km内',
'detailList': [{ value: 50
'title': '6km内', }, {
'value': '' id: 6,
}, name: '2000km内',
{ value: 2000
'title': '10km内', }
'value': '10km内' ],
}, distance: '50km内',
{ distanceNum: '50',
'title': '15km内', distanceName: '距离最近',
'value': '15km内' detailList: [{
}, id: 1,
{ name: '距离最近'
'title': '20km内', }],
'value': '20km内' typeId: '',
}, oilList: [],
{ onilName: '0#',
'title': '50km内', latitudeful: '',
'value': '50km内' longitudeful: '',
}, { isTyAgent: false //
'title': '2000km内', }
'value': '2000' },
} onLoad() {
] let that = this;
}, { that.getDictionaryByCodeType();
'title': '距离', if (app.globalData.accountId) {
'key': 'single1', that.isTyAgent = true;
'isMutiple': false, }
'detailTitle': '', uni.getLocation({
'reflexTitle': true, type: 'wgs84',
'defaultSelectedIndex': 0, success: function(res) {
'detailList': [{ that.latitudeful = res.latitude;
'title': '距离最近', that.longitudeful = res.longitude;
'value': '' that.getGasStoreList();
}] }
})
} },
], onReachBottom() {
refuelList: [], this.getGasStoreList();
pageNum: 1, },
pageSize: 10, methods: {
isNoMoreData: false, //
searname: '', getDictionaryByCodeType() {
gunnumber: [{ let datas = {
id: 1, codeType: 'GAS_OIL_TYPE'
name: '6km内', }
value: 6 getDictionaryByCodeType(datas).then(res => {
}, if (res.return_code == '000000') {
{ this.oilList = res.return_data;
id: 2, }
name: '10km内', })
value: 10 },
}, //
{ changeValue(item) {
id: 3, this.distance = item.name;
name: '15km内', this.distanceNum = item.value;
value: 15 this.pageNum = 1;
}, this.isNoMoreData = false;
{ this.refuelList = [];
id: 4, this.getGasStoreList();
name: '20km内', this.$refs.popup.hide();
value: 20 },
},
{ seeloaction(item) {
id: 5, uni.openLocation({
name: '50km内', latitude: Number(item.latitude), //
value: 50 longitude: Number(item.longitude), //
}, { name: item.store_name,
id: 6, address: item.address
name: '2000km内', })
value: 2000 },
} changeValue1(item) {
], this.distanceName = item.name;
distance: '50km内', this.pageNum = 1;
distanceNum: '50', this.isNoMoreData = false;
distanceName: '距离最近', this.refuelList = [];
detailList: [{ this.getGasStoreList();
id: 1, this.$refs.popup.hide();
name: '距离最近' },
}],
typeId: '', changeValue2(item) {
oilList: [{ this.onilName = item.codeName;
id: 1, this.pageNum = 1;
name: '汽油', this.isNoMoreData = false;
nillist: [{ this.refuelList = [];
id: 1, this.getGasStoreList();
name: '90#' this.$refs.popup.hide();
}, },
{ //
id: 2, showPopup(item) {
name: '92#' this.typeId = item;
}, this.$refs.popup.show();
{ },
id: 3, search(res) {
name: '95#' uni.showToast({
}, title: '搜索:' + res.value,
{ icon: 'none'
id: 4, })
name: '98#' },
}, input(res) {
{ this.searname = res;
id: 5, this.pageNum = 1;
name: '101#' this.isNoMoreData = false;
}, this.refuelList = [];
{ this.getGasStoreList();
id: 6, },
name: '95(甲醇)#' //
}, getGasStoreList() {
{ uni.showLoading({
id: 7, title: '加载中...'
name: '92(甲醇)#' })
} if (this.isNoMoreData) {
] uni.hideLoading()
}, return false;
{ }
id: 2, let pagenum = this.pageNum;
name: '柴油', let params = {
nillist: [{ storeName: this.searname,
id: 1, distance: this.distanceNum,
name: '-40#' regionId: app.globalData.cityId,
}, oilNoName: this.onilName,
{ latitude: this.latitudeful,
id: 2, longitude: this.longitudeful,
name: '-35#' pageNum: pagenum,
}, pageSize: this.pageSize,
{ isTyAgent: this.isTyAgent
id: 3, }
name: '-30#' getGasStoreList(params).then(res => {
}, if (res.return_code == '000000') {
{ uni.hideLoading();
id: 4, this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
name: '-20#' if (res.return_data.total == (this.pageNum * this.pageSize)) {
}, this.isNoMoreData = true;
{ }
id: 5, this.refuelList = this.refuelList.concat(res.return_data.list);
name: '-10#' this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
}, } else {
{ this.refuelList = [];
id: 6, uni.hideLoading()
name: '车队0#' }
}, })
{ },
id: 7, //
name: '0#' goDetails(items, itemId) {
}, uni.navigateTo({
{ url: '../refuel-details/refuel-details?id=' + items + '&desId=' + itemId
id: 8, })
name: '柴油#' },
}, result(val) {
] console.log('filter_result:' + JSON.stringify(val));
}, this.filterResult = JSON.stringify(val, null, 2)
{ }
id: 3, }
name: '天然气', }
nillist: [{ </script>
id: 1,
name: 'CNG' <style lang="scss">
}, page {
{ background-color: #f1f3f5;
id: 2, }
name: 'LNG'
}, .refuel {
{ padding: 6px 5px;
id: 3, border-radius: 5px;
name: 'LPG' background-color: #f6f6f6;
} color: #666666;
] margin-left: 10px;
} margin-top: 15px;
], display: inline-block;
onilName: '92#' font-size: 13px;
} width: 18%;
}, text-align: center;
onLoad() { }
this.getGasStoreList();
}, .activeRefuel {
onReachBottom() { padding: 6px 5px;
this.getGasStoreList(); border-radius: 5px;
}, border: 1px solid #089bf5;
methods: { color: #089bf5;
// margin-left: 10px;
changeValue(item) { margin-top: 15px;
this.distance = item.name; display: inline-block;
this.distanceNum = item.value; font-size: 13px;
this.pageNum = 1; width: 18%;
this.isNoMoreData = false; text-align: center;
this.refuelList = []; }
this.getGasStoreList();
this.$refs.popup.hide(); .stuMenu {
}, width: 33.3%;
height: 30px;
seeloaction(item) { line-height: 30px;
uni.openLocation({ font-size: 14px;
latitude: Number(item.latitude), // color: #333333;
longitude: Number(item.longitude), //
name: item.store_name, .stuimg {
address: item.address width: 10px;
}) vertical-align: middle;
}, }
changeValue1(item) { }
this.distanceName = item.name;
this.pageNum = 1; .sear {
this.isNoMoreData = false; margin-left: 10px;
this.refuelList = []; width: 50px;
this.getGasStoreList(); }
this.$refs.popup.hide();
}, .searImg {
margin-left: 55px;
changeValue2(item) { }
this.onilName = item.name;
this.pageNum = 1; .recontleft {
this.isNoMoreData = false; width: 80px;
this.refuelList = []; margin-left: 10px;
this.getGasStoreList(); }
this.$refs.popup.hide();
}, .recontright {
// margin-left: 95px;
showPopup(item) { }
this.typeId = item;
this.$refs.popup.show(); .text {
}, margin-top: 50px;
search(res) { margin-left: 20px;
uni.showToast({ width: 100%;
title: '搜索:' + res.value, }
icon: 'none'
})
},
input(res) {
this.searname = res;
this.pageNum = 1;
this.isNoMoreData = false;
this.refuelList = [];
this.getGasStoreList();
},
//
getGasStoreList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
storeName: this.searname,
distance: this.distanceNum,
regionId: app.globalData.cityId,
// regionId: '510000',
oilNoName: this.onilName,
latitude: app.globalData.latitude,
longitude: app.globalData.longitude,
// latitude: '30.83876',
// longitude: '106.129505',
pageNum: pagenum,
pageSize: this.pageSize
}
getGasStoreList(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.refuelList = this.refuelList.concat(res.return_data.list);
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.refuelList = [];
uni.hideLoading()
}
})
},
//
goDetails(items, itemId) {
uni.navigateTo({
url: '../refuel-details/refuel-details?id=' + items + '&desId=' + itemId
})
},
result(val) {
console.log('filter_result:' + JSON.stringify(val));
this.filterResult = JSON.stringify(val, null, 2)
}
}
}
</script>
<style lang="scss">
page {
background-color: #f1f3f5;
}
.refuel {
padding: 6px 5px;
border-radius: 5px;
background-color: #f6f6f6;
color: #666666;
margin-left: 10px;
margin-top: 15px;
display: inline-block;
font-size: 13px;
width: 18%;
text-align: center;
}
.activeRefuel {
padding: 6px 5px;
border-radius: 5px;
border: 1px solid #089bf5;
color: #089bf5;
margin-left: 10px;
margin-top: 15px;
display: inline-block;
font-size: 13px;
width: 18%;
text-align: center;
}
.stuMenu {
width: 33%;
height: 30px;
line-height: 30px;
font-size: 14px;
color: #333333;
.stuimg {
width: 10px;
vertical-align: middle;
}
}
.sear {
margin-left: 10px;
width: 50px;
}
.searImg {
margin-left: 55px;
}
.recontleft {
width: 80px;
margin-left: 10px;
}
.recontright {
margin-left: 95px;
}
.text {
margin-top: 50px;
margin-left: 20px;
width: 100%;
}
</style> </style>

@ -33,7 +33,7 @@
<script> <script>
import md5 from "@/common/SDK/md5.min.js"; import md5 from "@/common/SDK/md5.min.js";
import { import {
sendSmsCode, sendSmsCodeByHw,
bindUserPhone, bindUserPhone,
H5login H5login
} from "../../Utils/Api.js"; } from "../../Utils/Api.js";
@ -73,9 +73,10 @@
title: '发送中...' title: '发送中...'
}) })
let params = { let params = {
phone: this.phoneNumber phone: this.phoneNumber,
HWMSG:3
} }
sendSmsCode(params).then(res => { sendSmsCodeByHw(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.getCodeisWaiting = true; this.getCodeisWaiting = true;
this.getCodeBtnColor = "rgba(255,255,255,0.5)" this.getCodeBtnColor = "rgba(255,255,255,0.5)"

@ -18,7 +18,7 @@
</view> </view>
<view class="content"> <view class="content">
<view class="pay-list"> <view class="pay-list">
<view class="row" @tap="paytype='jinbi'"> <view class="row" @tap="paytype='jinbi'">
<view class="left"> <view class="left">
<image src="../../../static/img/jfx.png"></image> <image src="../../../static/img/jfx.png"></image>
</view> </view>
@ -40,7 +40,18 @@
<view class="right"> <view class="right">
<radio :checked="paytype=='gonghuika'" color="#0083f5" /> <radio :checked="paytype=='gonghuika'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="row" @tap="paytype='oilcard'" v-if="goodsType == 3">
<view class="left">
<image :src="imagewxUrl+imgadres1"></image>
</view>
<view class="center">
油卡支付(余额:{{oilPirce}})
</view>
<view class="right">
<radio :checked="paytype=='oilcard'" @click="changeRiado1()" color="#0083f5" />
</view>
</view>
<!-- <view class="width100 line1 mart5 marb5"></view> <!-- <view class="width100 line1 mart5 marb5"></view>
<view class="row" @tap="paytype='unionPaystags'"> <view class="row" @tap="paytype='unionPaystags'">
<view class="left"> <view class="left">
@ -74,7 +85,9 @@
orderToPay, orderToPay,
orderToGoldPay, orderToGoldPay,
hltUnionCardPay, hltUnionCardPay,
unionPay unionPay,
oilCardPay,
findUser
} from '../../../Utils/Api.js' } from '../../../Utils/Api.js'
import ssPaymentPassword from '../../../components/sanshui-payment-password' import ssPaymentPassword from '../../../components/sanshui-payment-password'
let app = getApp(); let app = getApp();
@ -87,6 +100,7 @@
amount: 0, amount: 0,
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'wxpay.png', imgadres: 'wxpay.png',
imgadres1: 'oilcard.png',
pryType: '', pryType: '',
paytype: '', // paytype: '', //
orderNo: '', orderNo: '',
@ -94,7 +108,9 @@
couponId: '', couponId: '',
jumpType: '', jumpType: '',
PaymentPassword: '', PaymentPassword: '',
tongCardPrice: 0 tongCardPrice: 0,
oilPirce: 0, //
goodsType: ''
}; };
}, },
onLoad(e) { onLoad(e) {
@ -102,21 +118,61 @@
this.orderNo = e.orderId; this.orderNo = e.orderId;
this.couponId = e.couponId; this.couponId = e.couponId;
this.jumpType = e.typeaout; this.jumpType = e.typeaout;
this.goodsType = e.goodsType;
if (this.pryType == 1) { if (this.pryType == 1) {
this.paytype = 'wxpay'; this.paytype = 'wxpay';
} else if (this.pryType == 2) { } else if (this.pryType == 2) {
this.paytype = 'jinbi' this.paytype = 'jinbi'
} else { } else {
this.paytype = '' this.paytype = ''
}
if (!app.globalData.userInfo) {
this.findUser()
} }
this.amount = parseFloat(e.amount).toFixed(2); this.amount = parseFloat(e.amount).toFixed(2);
}, },
onShow() { onShow() {
let that = this; let that = this;
that.user = app.globalData.userInfo; that.user = app.globalData.userInfo;
if (app.globalData.userInfo) {
this.findUser();
}
}, },
methods: { methods: {
//
changeRiado1() {
if (!this.user.isSetOilCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
},
findUser() {
let params;
findUser(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
if (res.return_data.oilCard) {
this.oilPirce = res.return_data.oilCard.amount;
}
uni.setStorage({
key: "user",
data: res.return_data
})
}
});
},
// //
orderToPay() { orderToPay() {
let that = this; let that = this;
@ -134,6 +190,29 @@
uni.navigateTo({ uni.navigateTo({
url: '../../tabBar/order/stagesUrl/stagesUrl?orderid=' + that.orderNo url: '../../tabBar/order/stagesUrl/stagesUrl?orderid=' + that.orderNo
}) })
} else if (that.paytype == 'oilcard') {
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
if (!that.user.isSetOilCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
that.$refs.paymentPassword.modalFun('show');
} else { } else {
uni.showToast({ uni.showToast({
title: '请选择支付方式', title: '请选择支付方式',
@ -225,33 +304,66 @@
}) })
return; return;
} }
let params = { if (this.paytype == 'gonghuika') {
"orderId": this.orderNo, let params = {
"cardNo": this.user.hltCardNo.cardNo, "orderId": this.orderNo,
"password": this.PaymentPassword "cardNo": this.user.hltCardNo.cardNo,
} "password": this.PaymentPassword
hltUnionCardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../success/success?id=' + this.couponId
});
return;
} }
if (res.return_code == '102130') { hltUnionCardPay(params).then(res => {
uni.navigateTo({ uni.hideLoading();
url: '../../login/updatePas/updatePas' if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../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'
}) })
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
}) })
}) return;
}
if (this.paytype == 'oilcard') {
let params = {
"orderId": this.orderNo,
"cardNo": this.user.oilCard.cardNo,
"password": this.PaymentPassword
}
oilCardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url:'../../goods/refuel-succes/refuel-succes?id=' + this.orderNo
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
} }
} }
} }

@ -37,8 +37,10 @@
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit"> <image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
</image> </image>
<view class="fotlt fcor333 font14 text1 mart10">{{pro.couponName}}</view> <view class="fotlt fcor333 font14 text1 mart10">{{pro.couponName}}</view>
<view class="subject fotct mart5"><image style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfx.png"> <view class="subject fotct mart5">
</image>{{pro.discountPrice *100}}</view> <image style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfx.png">
</image>{{pro.discountPrice *100}}
</view>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -49,6 +51,7 @@
<wybPopup ref="popup" type="center" height="850" width="600" radius="6" bgColor="" :showCloseIcon="true"> <wybPopup ref="popup" type="center" height="850" width="600" radius="6" bgColor="" :showCloseIcon="true">
<image class="popImg" :src="imageUrl+imgadres3" @click="jumpWeb"></image> <image class="popImg" :src="imageUrl+imgadres3" @click="jumpWeb"></image>
</wybPopup> </wybPopup>
<image :src="imagewxUrl+imgadres4" mode="widthFix" class="h5xfimg" @click="playPhone"></image>
<view class="height60"></view> <view class="height60"></view>
</view> </view>
</template> </template>
@ -88,6 +91,7 @@
imgadres1: 'jbhed.png', imgadres1: 'jbhed.png',
imgadres2: 'jt.png', imgadres2: 'jt.png',
imgadres3: '', imgadres3: '',
imgadres4: 'cusservice.png',
webUrl: '', webUrl: '',
// //
swiperList: [{ swiperList: [{
@ -146,25 +150,20 @@
key: 'token', key: 'token',
success(e) { success(e) {
app.globalData.token = e.data; app.globalData.token = e.data;
},
fail() {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
} }
// fail() {
// uni.navigateTo({
// url: '../../userLogin/userLogin'
// })
// }
}) })
if (!app.globalData.userInfo.phone) { // if (!app.globalData.userInfo.phone) {
uni.navigateTo({ // uni.navigateTo({
url: '../../userLogin/userLogin' // url: '../../userLogin/userLogin'
}) // })
return; // return;
} // }
that.getCacheParam(); that.getCacheParam();
},
fail: res => {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
} }
}) })
// if (app.globalData.cityName != '') { // if (app.globalData.cityName != '') {
@ -391,6 +390,27 @@
} }
}) })
}, },
//
playPhone() {
uni.showModal({
title: '客服',
content: '4006780738',
success: function(res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: '4006780738', //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
}
})
}
}
})
},
// //
swiperChange(event) { swiperChange(event) {
this.currentSwiper = event.detail.current; this.currentSwiper = event.detail.current;
@ -437,12 +457,12 @@
url: '/pages/goods/goods-list/goods-list?id=3' url: '/pages/goods/goods-list/goods-list?id=3'
}) })
return; return;
} }
if (item.title == '优选商品') { if (item.title == '优选商品') {
uni.navigateTo({ uni.navigateTo({
url: '../../../subPages/preferred-goods/preferred-goods' url: '../../../subPages/preferred-goods/preferred-goods'
}) })
return; return;
} }
if (item.title == '优惠券包') { if (item.title == '优惠券包') {
uni.navigateTo({ uni.navigateTo({
@ -468,6 +488,13 @@
background-color: #F5F5F5; background-color: #F5F5F5;
} }
.h5xfimg {
width: 80rpx;
bottom: 140rpx;
position: fixed;
right: 40rpx;
}
.popImg { .popImg {
width: 300px; width: 300px;
height: 440px; height: 440px;
@ -940,7 +967,7 @@
.orange-content .swiper-item { .orange-content .swiper-item {
height: 180rpx; height: 180rpx;
margin-left: 14rpx; margin-left: 14rpx;
margin-top: 14rpx; margin-top: 14rpx;
float: left; float: left;
} }

@ -75,13 +75,13 @@
<uni-badge text="1" type="error" /> <uni-badge text="1" type="error" />
</view> --> </view> -->
<uni-badge style="width: 20px;position: absolute; right: 30%;" v-if="row.text == '我的卡券' && textnum " <uni-badge style="width: 20px;position: absolute; right: 30%;" v-if="row.text == '我的卡券' && textnum "
:text="textnum" type="error" size="normal"></uni-badge> :text="textnum" type="error" size="normal"></uni-badge>
<uni-badge style="width: 20px;position: absolute; right: 7%;" <uni-badge style="width: 20px;position: absolute; right: 7%;"
v-if="row.text == '我的优惠券' && textSend " :text="textSend" type="error" size="normal"></uni-badge> v-if="row.text == '我的优惠券' && textSend " :text="textSend" type="error" size="normal"></uni-badge>
<view class="img"> <view class="img">
<image :src="imagewxUrl+row.img"></image> <image :src="imagewxUrl+row.img"></image>
</view> </view>
<view class="text">{{row.text}}</view> <view class="text">{{row.text}}</view>
</view> </view>
</view> </view>
@ -189,8 +189,7 @@
} }
], ],
// //
mytoolbarList: [ mytoolbarList: [{
{
url: '/pages/goods/recording/recording?id=1', url: '/pages/goods/recording/recording?id=1',
text: '充值记录', text: '充值记录',
img: 'user/mingxi.png' img: 'user/mingxi.png'
@ -211,31 +210,6 @@
img: 'user/momey.png' img: 'user/momey.png'
} }
], ],
// 广
mytgbarList: [{
url: '',
text: '客服',
img: 'user/kefu.png'
}
// ,
// {
// url: '../../login/login?id=1',
// text: '',
// img: 'user/point.png'
// },
// {
// url: '../../login/login?id=2',
// text: '广',
// img: 'user/renw.png'
// }
// ,
// {
// url: '/pages/user/Charge/Charge',
// text: '',
// img: 'user/bank.png'
// }
],
// //
czList: '', czList: '',
} }
@ -272,9 +246,13 @@
if (app.globalData.userInfo) { if (app.globalData.userInfo) {
this.findUser(); this.findUser();
} }
if (!app.globalData.userInfo.isSetPayPwd) { if (!app.globalData.userInfo.isSetPayPwd) {
this.czList = [{ this.czList = [{
url: '../../../subPages/cardsList/cardsList',
text: '卡包',
img: '../../../static/img/ghkpay.png',
type: 2
}, {
url: '', url: '',
text: '客服', text: '客服',
img: 'user/kefu.png', img: 'user/kefu.png',
@ -291,6 +269,11 @@
} }
// '../../user/unionCard/unionCard' // '../../user/unionCard/unionCard'
this.czList = [{ this.czList = [{
url: '../../../subPages/cardsList/cardsList',
text: '卡包',
img: '../../../static/img/ghkpay.png',
type: 2
}, {
url: '', url: '',
text: '客服', text: '客服',
img: 'user/kefu.png', img: 'user/kefu.png',
@ -341,12 +324,12 @@
this.toDeposit(); this.toDeposit();
} }
}); });
}, },
// //
jumplogin() { jumplogin() {
uni.navigateTo({ uni.navigateTo({
url: '../../userLogin/userLogin' url: '../../userLogin/userLogin'
}) })
}, },
// H5 // H5
jumpH5Bding() { jumpH5Bding() {
@ -420,12 +403,34 @@
url: url url: url
}) })
} else { } else {
uni.showModal({ // uni.showModal({
title: '客服', // title: '',
content: '4006780738' // content: '4006780738'
}) // })
this.playPhone();
} }
},
//
playPhone() {
uni.showModal({
title: '客服',
content: '4006780738',
success: function(res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: '4006780738', //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
}
})
}
}
})
} }
} }
} }

@ -1,246 +1,323 @@
<template> <template>
<view> <view>
<view class="form re" style="top: 100rpx;"> <view class="form re" style="top: 100rpx;">
<view class="username paddtop10" v-if="UserCard">
<picker mode="selector" style="width: 90%;" :range="UserCard" range-key="cardNo" <view class="username paddtop10">
@change="bindUserCard"> <picker mode="selector" style="width: 90%;" :range="cardList" range-key="codeName"
<view class="date text1">{{cardNoNumber}}</view> @change="changeUserCard">
</picker> <view class="date text1" style="padding: 0 25rpx;">{{typeName}}</view>
<image class="flright" style="width: 15px;height: 15px;" src="../../../static/img/downj.png"></image> </picker>
</view> <image class="flright" style="width: 15px;height: 15px;" src="../../../static/img/downj.png"></image>
<view class="username" v-if="!UserCard"> </view>
<input style="width: 100%;" :disabled="disStute" maxlength="19" placeholder="请输入工会卡号" v-model="cardNoNumber"
placeholder-style="color: #333333;"/> <!-- <view class="username paddtop10" v-if="UserCard && type == 2">
</view> <picker mode="selector" style="width: 90%;" :range="UserCard" range-key="cardNo" @change="bindUserCard">
<view class="username" v-if="phoneNumber"> <view class="date text1">{{cardNoNumber}}</view>
<view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">{{getCodeText}}</view> </picker>
<input disabled="true" v-model="phoneNumber" placeholder-style="color: #333333;" /> <image class="flright" style="width: 15px;height: 15px;" src="../../../static/img/downj.png"></image>
</view> </view> -->
<view class="code" v-if="phoneNumber">
<input placeholder="请输入验证码" v-model="code" placeholder-style="color: #333333;" />
</view> <view class="username">
<view class="btn mart50" @tap="bindHuiLianTongCard" v-if="phoneNumber">绑定卡号</view> <input style="width: 100%;" :disabled="disStute" maxlength="19" placeholder="请输入卡号"
<view class="btn mart50" @tap="doCardNonum" v-else>获取预留手机号</view> v-model="cardNoNumber" placeholder-style="color: #333333;" />
</view> </view>
<view class="width90 mart20 height120 backcorfff fotct" style="position: absolute;top: 390px;"> <view class="username" v-if="phoneNumber">
<view class="fontlet font20 fcor666 fontwig6 height45l " style="border-bottom: 1px solid #F4F4F4;">温馨提示</view> <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">{{getCodeText}}</view>
<view class="fontlet font20 fcor666 fontwig6 height45l paddtop10">1元可抵扣100积分</view> <input disabled="true" v-model="phoneNumber" placeholder-style="color: #333333;" />
</view> </view>
</view> <view class="code" v-if="phoneNumber">
</template> <input placeholder="请输入验证码" v-model="code" placeholder-style="color: #333333;" />
</view>
<script> <view class="btn mart50" @tap="bindHuiLianTongCard" v-if="phoneNumber">绑定卡号</view>
import md5 from "@/common/SDK/md5.min.js"; <view class="btn mart50" @tap="doCardNonum" v-else>获取预留手机号</view>
</view>
<view class="width90 mart20 height120 backcorfff fotct" style="position: absolute;top: 70%;" v-if="type == 1">
<view class="fontlet font20 fcor666 fontwig6 height45l " style="border-bottom: 1px solid #F4F4F4;">温馨提示
</view>
<view class="fontlet font20 fcor666 fontwig6 height45l paddtop10">1元可抵扣100积分</view>
</view>
</view>
</template>
<script>
import md5 from "@/common/SDK/md5.min.js";
import { import {
sendSmsCode, sendSmsCodeByHw,
getHuiLianTongCardByCardNo, getHuiLianTongCardByCardNo,
bindHuiLianTongCard, getDetailByCardNo,
getUserCardList, bindHuiLianTongCard,
getHuiLianTongCardByPhone getUserCardList,
} from '../../../Utils/Api.js'; getHuiLianTongCardByPhone,
let app = getApp(); getDictionaryByCodeType
export default { } from '../../../Utils/Api.js';
data() { let app = getApp();
return { export default {
cardNoNumber: "", data() {
phoneNumber: "", return {
code: '', cardNoNumber: "",
getCodeText: '获取验证码', phoneNumber: "",
getCodeBtnColor: "#0083f5", code: '',
getCodeisWaiting: false, getCodeText: '获取验证码',
disStute: false, getCodeBtnColor: "#0083f5",
UserCard:'' getCodeisWaiting: false,
} disStute: false,
}, UserCard: '',
onLoad(options) { cardList: [], //
this.user = app.globalData.userInfo; typeName: '', //
this.getHuiLianTongCardByPhone(); type: '' //
}, }
},
methods: { onLoad(options) {
Timer() {}, this.user = app.globalData.userInfo;
// // this.getHuiLianTongCardByPhone();
getHuiLianTongCardByPhone() { this.getDictionaryByCodeType();
let params = { },
phone : this.user.phone
} methods: {
uni.showLoading(); Timer() {},
getHuiLianTongCardByPhone(params).then(res => { getDictionaryByCodeType() {
uni.hideLoading(); let datas = {
if (res.return_code == '000000' && res.return_data !='') { codeType: 'USER_CARD_TYPE'
this.UserCard = res.return_data; }
this.cardNoNumber = res.return_data[0].cardNo; getDictionaryByCodeType(datas).then(res => {
return; if (res.return_code == '000000') {
} this.cardList = res.return_data;
this.UserCard = ''; this.type = res.return_data[0].codeValue;
}); this.typeName = res.return_data[0].codeName;
}, }
// })
bindUserCard(e) { },
this.cardNoNumber = this.UserCard[e.target.value].cardNo; //
}, getHuiLianTongCardByPhone() {
getCode() { let params = {
uni.hideKeyboard() phone: this.user.phone
if (this.getCodeisWaiting) { }
return; uni.showLoading();
} getHuiLianTongCardByPhone(params).then(res => {
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { uni.hideLoading();
uni.showToast({ if (res.return_code == '000000' && res.return_data != '') {
title: '请填写正确手机号码', this.UserCard = res.return_data;
icon: "none" this.cardNoNumber = res.return_data[0].cardNo;
}); return;
return false; }
} this.UserCard = '';
uni.showLoading({ });
title: '发送中...' },
}) //
let params = { changeUserCard(e) {
phone: this.phoneNumber this.type = this.cardList[e.target.value].codeValue;
} this.typeName = this.cardList[e.target.value].codeName;
sendSmsCode(params).then(res => { this.cardNoNumber = '';
if (res.return_code == '000000') { this.phoneNumber = '';
this.getCodeisWaiting = true; this.disStute = false;
this.getCodeBtnColor = "#999999" },
uni.showToast({ //
title: '验证码已发送', bindUserCard(e) {
icon: "none" this.cardNoNumber = this.UserCard[e.target.value].cardNo;
}); },
this.setTimer(); getCode() {
} else { uni.hideKeyboard()
uni.hideLoading() if (this.getCodeisWaiting) {
} return;
}) }
}, if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) {
setTimer() { uni.showToast({
let holdTime = 60; title: '请填写正确手机号码',
this.getCodeText = "重新获取(60)" icon: "none"
this.Timer = setInterval(() => { });
if (holdTime <= 0) { return false;
this.getCodeisWaiting = false; }
this.getCodeBtnColor = "#333333"; uni.showLoading({
this.getCodeText = "获取验证码" title: '发送中...'
clearInterval(this.Timer); })
return; let params = {
}
this.getCodeText = "重新获取(" + holdTime + ")"
holdTime--;
}, 1000)
},
//
doCardNonum() {
if (!this.cardNoNumber) {
uni.showToast({
title: '请填写卡号',
icon: "none"
});
return false;
}
if (this.cardNoNumber.length != 19) {
uni.showToast({
title: '请填写正确的19位卡号',
icon: "none"
});
return false;
}
uni.showLoading({
title: '查询中...'
})
let params = {
cardNo: this.cardNoNumber
}
getHuiLianTongCardByCardNo(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
this.phoneNumber = res.return_data.userMobile;
// this.phoneNumber = 15583658692;
this.disStute = true
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
},
//
bindHuiLianTongCard() {
uni.hideKeyboard()
//
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) {
uni.showToast({
title: '请填写正确手机号码',
icon: "none"
});
return false;
}
if (!this.code) {
uni.showToast({
title: '请填写验证码',
icon: "none"
});
return false;
}
uni.showLoading({
title: '提交中...'
})
let params = {
cardNo: this.cardNoNumber,
phone: this.phoneNumber, phone: this.phoneNumber,
smsCode: this.code HWMSG:1
} }
bindHuiLianTongCard(params).then(res => { sendSmsCodeByHw(params).then(res => {
uni.hideLoading() if (res.return_code == '000000') {
if (res.return_code == '000000') { this.getCodeisWaiting = true;
app.globalData.userInfo = res.return_data this.getCodeBtnColor = "#999999"
.object uni.showToast({
.highUser; title: '验证码已发送',
app.globalData.token = res.return_data.uniqueCode; icon: "none"
uni.setStorage({ });
key: "user", this.setTimer();
data: res.return_data } else {
.object uni.hideLoading()
.highUser }
}) })
uni.showToast({ },
title: '绑定成功', setTimer() {
icon: "success", let holdTime = 60;
duration: 2000, this.getCodeText = "重新获取(60)"
success() { this.Timer = setInterval(() => {
setTimeout(() => { if (holdTime <= 0) {
uni.navigateBack({ this.getCodeisWaiting = false;
delta: 2 this.getCodeBtnColor = "#333333";
}) this.getCodeText = "获取验证码"
}, 1000) clearInterval(this.Timer);
} return;
}); }
} else { this.getCodeText = "重新获取(" + holdTime + ")"
uni.showToast({ holdTime--;
title: res.return_msg,
icon: "none" }, 1000)
}); },
} //
}) doCardNonum() {
if (!this.cardNoNumber) {
}, uni.showToast({
} title: '请填写卡号',
} icon: "none"
</script> });
return;
<style lang="scss"> }
@import "../../../static/css/login.scss"; if (this.cardNoNumber.length != 19 && this.type == 1) {
.wximg { uni.showToast({
width: 50px; title: '请填写正确的19位工会卡号',
height: 50px; icon: "none"
margin-left: 40%; });
margin-top: 250upx; return;
} }
.flex1 { if (this.cardNoNumber.length != 16 && this.type == 2) {
flex: 1; uni.showToast({
text-align: right; title: '请填写正确的16位油卡号',
width: 70%; icon: "none"
padding-right: 25rpx; });
color: #999999; return;
font-size: 32rpx; }
}
let params = {
cardNo: this.cardNoNumber
}
if (this.type == 1) {
this.getHuiLianTongCardByCardNo(params);
}
if (this.type == 2) {
this.getDetailByCardNo(params);
}
},
//
getHuiLianTongCardByCardNo(items) {
uni.showLoading({
title: '查询中...'
})
getHuiLianTongCardByCardNo(items).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
this.phoneNumber = res.return_data.userMobile;
// this.phoneNumber = 15583658692;
this.disStute = true
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
},
//
getDetailByCardNo(items) {
uni.showLoading({
title: '查询中...'
})
getDetailByCardNo(items).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
this.phoneNumber = res.return_data.contactPhone;
// this.phoneNumber = 15583658692;
this.disStute = true
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
},
//
bindHuiLianTongCard() {
uni.hideKeyboard()
//
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) {
uni.showToast({
title: '请填写正确手机号码',
icon: "none"
});
return false;
}
if (!this.code) {
uni.showToast({
title: '请填写验证码',
icon: "none"
});
return false;
}
uni.showLoading({
title: '提交中...'
})
let params = {
type: this.type,
cardNo: this.cardNoNumber,
phone: this.phoneNumber,
smsCode: this.code
}
bindHuiLianTongCard(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
app.globalData.token = res.return_data.uniqueCode;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.showToast({
title: '绑定成功',
icon: "success",
duration: 2000,
success() {
setTimeout(() => {
uni.navigateBack({
})
}, 1000)
}
});
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
},
}
}
</script>
<style lang="scss">
@import "../../../static/css/login.scss";
.wximg {
width: 50px;
height: 50px;
margin-left: 40%;
margin-top: 250upx;
}
.flex1 {
flex: 1;
text-align: right;
width: 70%;
padding-right: 25rpx;
color: #999999;
font-size: 32rpx;
}
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -18,7 +18,6 @@
<script> <script>
const app = getApp(); const app = getApp();
import { import {
getUserInfo,
GetPhoneNumber, GetPhoneNumber,
unionPhoneLogin unionPhoneLogin
} from "../../Utils/Api.js" } from "../../Utils/Api.js"
@ -44,53 +43,6 @@
this.unionPhoneLogin(result.code) this.unionPhoneLogin(result.code)
} }
}, },
getuserinfo() {
let that = this;
uni.getUserProfile({
desc: '登录中...',
success: function(res) {
let params = {
openId: app.globalData.openId,
iv: res.iv,
encryptedData: res.encryptedData
}
getUserInfo(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
that.user = res.return_data.object.highUser;
app.globalData.token = res.return_data.uniqueCode;
that.isShowAuth = false
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
if (res.return_data.object.highUser.phone) {
uni.navigateBack({})
}
} else {
uni.showToast({
title: res.return_msg
})
}
});
},
fail: res => {
uni.showToast({
title: "微信登录授权失败",
icon: "none"
});
}
})
that.isShowAuth = false
},
// //
unionPhoneLogin(item) { unionPhoneLogin(item) {
let params = { let params = {

@ -57,7 +57,7 @@ page {
background-color: #0083f5; background-color: #0083f5;
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
margin-top: 100rpx; margin-top: 80rpx;
margin-bottom: 50rpx; margin-bottom: 50rpx;
height: 90rpx; height: 90rpx;
display: flex; display: flex;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -0,0 +1,407 @@
<template>
<view>
<view class="backcorf06 height220 width100 fotct">
<image src="../static/unioncard.png" v-if="types == 1" mode="widthFix" style="width: 120rpx;"></image>
<image src="../static/oilcard.png" v-if="types == 2" mode="widthFix" style="width: 120rpx;"></image>
<view class="mart10 font18 fontwig6 fcorfff" v-if="types == 1">工会卡</view>
<view class="mart10 font18 fontwig6 fcorfff" v-if="types == 2">油卡
<text class="fcor41c font14 margle" v-if="cardList.status == 1">(正常)</text>
<text class="fcorred font14 margle" v-if="cardList.status == 2">(禁用)</text>
</view>
<view class="mart5 font18 fontwig6 fcorfff fontspec">余额: {{tongCardPrice}}</view>
<view class="mart5 font18 fontwig6 fcorfff fontspec">{{cardNo}}</view>
<view class="width40w height30 font16 fontlet fcorfff mart10 fotct border-r"
style="background-color: #b2b2b2;" @click="delUserCard()">解绑</view>
</view>
<!-- <view class="width90 mart20 fcor666 font12">
支付限额
</view>
<view class="width90 mart20 fcor666 font14 height25">
<view class="width50 font14 fcor333 flleft">单笔限额</view>
<view class="width50 font14 fcor666 flright fotrt">¥20000</view>
</view>
<view class="width90 mart20 fcor666 font14 mart5 height25">
<view class="width50 font14 fcor333 flleft">每日限额</view>
<view class="width50 font14 fcor666 flright fotrt">¥50000</view>
</view> -->
<view class="leave_cont">
<view class="ul">
<view class="li" v-if="types == 1">
<text class="font15 fcor333">业务类型</text>
<view class="flex1">
<picker mode="selector" :range="title_list" range-key="name" @change="bindtitleList">
<view class="date text1 margle10">{{titleName}}</view>
</picker>
</view>
</view>
<view class="li">
<text class="font15 fcor333">开始时间</text>
<view class="flex1">
<picker mode="date" :value="start_date" :start="startDate" :end="endDate"
@change="bindDateChange">
<view class="date">{{start_date}}</view>
</picker>
</view>
</view>
<view class="li">
<text class="font15 fcor333">结束时间</text>
<view class="flex1">
<picker mode="date" :value="end_date" :start="startDate" :end="endDate"
@change="bindDateChange2">
<view class="date">{{end_date}}</view>
</picker>
</view>
</view>
</view>
</view>
<view class="width90 mart30 fcor666 font12">
订单列表
</view>
<view class="width90 mart20 alijusstart fcor666 font12">
<view class="width40">订单号</view>
<view class="width10 fotct">类型</view>
<view class="width20 fotct">金额</view>
<view class="width30">时间</view>
</view>
<view class="width100" v-if="types == 1">
<view class="width90 mart5 alijusstart fcor666 font12" v-for="(item,index) in orderList" :key="index"
@click="popupOrderNo(item.orderNo)">
<view class="width40 fcor333 text1">{{item.orderNo}}</view>
<view class="width10 fotct">支出</view>
<view class="width20 fotct">¥{{item.tranAmount}}</view>
<view class="width30">{{item.tranTime}}</view>
<!-- {{phoneorderdes.createTimed | timeFormat('yyyy-mm-dd')}} {{phoneorderdes.createTimed | timeFormat('hh:mm')}} -->
</view>
</view>
<view class="width100" v-if="types == 2">
<view class="width90 mart5 alijusstart fcor666 font12" v-for="(item,index) in orderList" :key="index"
@click="popupOrderNo(item.sourceOrderNo)">
<view class="width40 fcor333 text1">{{item.sourceOrderNo}}</view>
<view class="width10 fotct fcor41c" v-if="item.type == 1">收入</view>
<view class="width10 fotct fcoreb5" v-if="item.type == 2">支出</view>
<view class="width20 fotct fcor41c" v-if="item.type == 1">+{{item.amount}}</view>
<view class="width20 fotct fcoreb5" v-if="item.type == 2">-{{item.amount}}</view>
<view class="width30">
<view class="width100">{{item.createTime | timeFormat('yyyy-mm-dd')}}</view>
<view class="width100">{{item.createTime | timeFormat('hh:mm')}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
delUserCard,
getDetailByCardNo,
getHuiLianTongCardBalance,
getOilCardRecordList,
getHuiLianTongCardConsume
} from '../../Utils/Api.js';
export default {
data() {
const currentDate = this.getDate({
format: true
})
return {
types: '', //
orderList: [], //
cardNo: '', //
tongCardPrice: 0, //
start_date: currentDate, //
end_date: currentDate, //
pageNum: 1,
pageSize: 10,
titleValue: 'sinopec_oil_code', //
titleName: '中石化加油券',
title_list: [{
name: '中石化加油券',
value: 'sinopec_oil_code'
},
{
name: '其他商品或服务',
value: 'hisen_consume'
}
],
isNoMoreData: false,
cardList: ''
}
},
onLoad(options) {
let that = this;
that.cardNo = options.cardNo;
that.types = options.des;
if (options.des == 1) {
that.getHuiLianTongCardBalance();
that.getHuiLianTongCardConsume();
}
if (options.des == 2) {
that.getDetailByCardNo();
that.getOilCardRecordList();
}
},
//
onReachBottom() {
if (this.types == 1) {
this.getHuiLianTongCardConsume();
}
if (this.types == 2) {
this.getOilCardRecordList();
}
},
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
methods: {
//
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
//
popupOrderNo(item) {
uni.showToast({
title: item,
icon: 'none',
duration: 2000
})
},
//
bindDateChange: function(e) {
this.start_date = e.target.value;
this.pageNum = 1;
this.isNoMoreData = false;
this.orderList = [];
if (this.types == 1) {
this.getHuiLianTongCardConsume();
}
if (this.types == 2) {
this.getOilCardRecordList();
}
},
bindDateChange2: function(e) {
this.end_date = e.target.value;
this.pageNum = 1;
this.isNoMoreData = false;
this.orderList = [];
if (this.types == 1) {
this.getHuiLianTongCardConsume();
}
if (this.types == 2) {
this.getOilCardRecordList();
}
},
//
bindtitleList(e) {
this.titleName = this.title_list[e.target.value].name;
this.titleValue = this.title_list[e.target.value].value;
this.pageNum = 1;
this.isNoMoreData = false;
this.orderList = [];
this.getHuiLianTongCardConsume();
},
//
delUserCard() {
let that = this;
uni.showModal({
content: '是否确定解除当前绑定卡号?',
success: (res) => {
if (res.confirm) {
let params = {
cardNo: that.cardNo
}
delUserCard(params).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '解除成功',
duration: 2000,
icon: 'success',
success() {
setTimeout(() => {
uni.navigateBack({})
}, 1000)
}
})
} else {
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
getDetailByCardNo() {
uni.showLoading({
title: '查询中...'
})
let params = {
cardNo: this.cardNo
}
getDetailByCardNo(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.amount;
this.cardList = res.return_data;
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
},
//
getHuiLianTongCardBalance() {
uni.showLoading({
title: '查询中...'
})
let params = {
cardNo: this.cardNo
}
getHuiLianTongCardBalance(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
});
},
//
getOilCardRecordList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return;
}
let pagenum = this.pageNum;
let Time1 = new Date(this.start_date.split('-').join('/'));
let timestemp1 = Time1.getTime();
let Time2 = new Date(this.end_date.split('-').join('/'));
let timestemp2 = Time2.getTime() + 86399000;
let params = {
pageNum: pagenum,
createTimeS: timestemp1,
createTimeE: timestemp2,
cardNo: this.cardNo,
pageSize: this.pageSize
}
getOilCardRecordList(params).then(res => {
if (res.return_code == '000000' && res.return_data.list != '') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.orderList = this.orderList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.orderList = [];
uni.hideLoading()
}
})
},
//
getHuiLianTongCardConsume() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
return false;
}
let pagenum = this.pageNum;
let Time1 = new Date(this.start_date.split('-').join('/'));
let timestemp1 = Time1.getTime();
let Time2 = new Date(this.end_date.split('-').join('/'));
let timestemp2 = Time2.getTime() + 86399000;
let params = {
businessType: this.titleValue,
sdate: timestemp1,
edate: timestemp2,
cardNo: this.cardNo,
pageNum: pagenum,
pageSize: this.pageSize
}
getHuiLianTongCardConsume(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.records != '') {
this.isNoMoreData = res.return_data.records.length == this.pageSize ? false : true;
this.orderList = this.orderList.concat(res.return_data.records);
this.pageNum = res.return_data.records.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.orderList = [];
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
this.isNoMoreData = true;
}
});
},
}
}
</script>
<style lang="scss">
.leave_cont {
background: #FFFFFF;
}
.leave_cont .ul {
width: 90%;
margin-left: 5%;
}
.leave_cont .ul .li {
display: flex;
align-items: center;
border-bottom: 1px solid #efefef;
}
.leave_cont .ul .li text {
padding: 40rpx 0;
}
.leave_cont .ul .li .flex1 {
flex: 1;
text-align: right;
width: 70%;
padding-right: 25rpx;
color: #999999;
font-size: 32rpx;
}
</style>

@ -0,0 +1,100 @@
<template>
<view>
<view class="width100 mart20" v-for="(item,index) in cardList" :key="index">
<view class="width90 conts backcolorb9" v-if="item.type == 1">
<view class="width90 alijusstart">
<image src="../static/unioncard.png" mode="widthFix" style="width: 80rpx;"></image>
<text class="font18 fontwig6 fcorfff">工会卡</text>
</view>
<view class="width90 font18 fontwig6 fcorfff">
卡号:<text class="margle">{{item.cardNo}}</text>
</view>
<!-- <view class="width90 font18 fontwig6 fcorfff">
余额:<text class="margle">122</text>
</view> -->
<view class="width90 mart10 alijusstart font14">
<view class="width30 height30 backcorfff colorb9 fotct border-r"
@click="jumpDetails(item.cardNo,item.type)">查看详情</view>
</view>
</view>
<view class="width90 conts backcolor32" v-if="item.type == 2">
<view class="width90 alijusstart">
<image src="../static/oilcard.png" mode="widthFix" style="width: 80rpx;"></image>
<text class="font18 fontwig6 fcorfff">油卡</text>
</view>
<view class="width90 font18 fontwig6 fcorfff">
卡号:<text class="margle">{{item.cardNo}}</text>
</view>
<!-- <view class="width90 font18 fontwig6 fcorfff">
余额:<text class="margle">122</text>
</view> -->
<view class="width90 mart10 alijusstart font14">
<view class="width30 height30 backcorfff color32 fotct border-r"
@click="jumpDetails(item.cardNo,item.type)">查看详情</view>
</view>
</view>
</view>
<view class="width90 height70w border-r mart20 alijusstart backcorfff" @click="jumpBindCard()">
<image src="../static/addcards.png" mode="widthFix" class="margle10" style="width: 40rpx;"></image>
<text class="margle font16 fcor333">添加新卡</text>
</view>
</view>
</template>
<script>
import {
getUserCardList
} from '../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
cardList: [] //
}
},
onLoad() {
this.user = app.globalData.userInfo;
},
onShow() {
this.getUserCardList();
},
methods: {
//
getUserCardList() {
uni.showLoading({
title: '加载中...'
})
getUserCardList().then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.cardList = res.return_data;
return;
}
});
},
//
jumpDetails(item, item1) {
uni.navigateTo({
url: '../cardsDetails/cardsDetails?cardNo=' + item + '&des=' + item1
})
},
//
jumpBindCard() {
uni.navigateTo({
url: '../../pages/user/bindingCard/bindingCard'
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.conts {
border-radius: 12rpx;
padding: 12px 0;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@ -88,7 +88,7 @@
onLoad(option) { onLoad(option) {
// #ifdef H5 // #ifdef H5
this.headerTop = '44px'; this.headerTop = '0px';
// #endif // #endif
let tbIndex = parseInt(option.tbIndex) + 1; let tbIndex = parseInt(option.tbIndex) + 1;
this.list = this.orderList[tbIndex]; this.list = this.orderList[tbIndex];

@ -225,11 +225,26 @@ $uni-font-size-paragraph:30upx;
color: #41cda2; color: #41cda2;
} }
.colorb9 {
color: #b95859;
}
.color32 {
color: #32649d;
}
/* 背景颜色 */ /* 背景颜色 */
.backcor9 { .backcor9 {
background-color: #f6f6f6; background-color: #f6f6f6;
} }
.backcolorb9 {
background-color: #b85958;
}
.backcolor32 {
background-color: #32649d;
}
//渐变 //渐变
.backcorlr{ .backcorlr{
background: linear-gradient(to right, #fe1a1a, #ff722e); background: linear-gradient(to right, #fe1a1a, #ff722e);
@ -318,6 +333,11 @@ $uni-font-size-paragraph:30upx;
margin-left: 20%; margin-left: 20%;
} }
.width40w {
width: 40%;
margin-left: 30%;
}
.width35 { .width35 {
width: 35%; width: 35%;
} }
@ -372,6 +392,14 @@ $uni-font-size-paragraph:30upx;
height: 100%; height: 100%;
} }
.height70w {
height: 70px;
line-height: 70px;
}
.height220{
height: 220px;
}
.height10 { .height10 {
height: 10px; height: 10px;
@ -659,6 +687,12 @@ $uni-font-size-paragraph:30upx;
display: flex; display: flex;
} }
.alijusstart{
justify-content: flex-start;
align-items: center;
display: flex;
}
.font12{ .font12{
font-size: 12px; font-size: 12px;
} }

Loading…
Cancel
Save