From 25896ec86f2a9b28256e421939be7faec6139657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com> Date: Wed, 26 Apr 2023 17:02:15 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B1=87=E4=BB=98?= =?UTF-8?q?=E5=A4=A9=E4=B8=8B=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/interfaces/pay.js | 33 ++++++++++-- pages/pay/pay.vue | 119 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 141 insertions(+), 11 deletions(-) diff --git a/apis/interfaces/pay.js b/apis/interfaces/pay.js index 12085dc..e1a1054 100644 --- a/apis/interfaces/pay.js +++ b/apis/interfaces/pay.js @@ -32,7 +32,6 @@ const umsPay = (orderId, data) => { // 银联支付补差价 const diffUmsPay = (orderId, data) => { - console.log(data) return request({ url: 'pay/diff/' + orderId + '/ums', data @@ -59,7 +58,32 @@ const umsFree = (orderNo, type) => { return request({ url : 'app/services/recharge/' + orderNo + '/ums', data : { type }, - method: 'POST' + method: 'POST' + }) +} + +// 斗拱支付 +const dgPay = (orderId, data) => { + return request({ + url : 'pay/order/' + orderId + '/dg', + data + }) +} + +// 斗拱支付补差价 +const diffDgPay = (orderId, data) => { + return request({ + url: 'pay/diff/' + orderId + '/dg', + data + }) +} + +// 斗拱支付自由服务包 +const dgFree = (orderNo, type) => { + return request({ + url : 'app/services/recharge/' + orderNo + '/dg', + data : { ...type }, + method: 'POST' }) } @@ -70,5 +94,8 @@ export { diffUmsPay, umsState, umsFree, - umsFreeInfo + umsFreeInfo, + dgPay, + diffDgPay, + dgFree } \ No newline at end of file diff --git a/pages/pay/pay.vue b/pages/pay/pay.vue index 3425605..351c08d 100644 --- a/pages/pay/pay.vue +++ b/pages/pay/pay.vue @@ -23,6 +23,14 @@ --> + - - - @@ -44,6 +30,13 @@ + + @@ -73,6 +73,28 @@ + + + + 支付二维码 + + + + + + 请使用{{payQrType == 'app' ? '微信': '支付宝'}}扫码 + + + + + + @@ -97,49 +119,16 @@ orderNo : '', balance : 0, isDeduction : false, - deductionVal: '' + deductionVal: '', + // 二维码支付 + payCodeShow : false, + payQrUrl : '', + payQrType : '' }; }, onShow() { if(this.getState && this.trade_id != ''){ - // 查询支付状态 - uni.showLoading({ - title: '查询支付结果...', - mask : true - }) - let outTime; - let resNumb = 0; - outTime = setInterval(() => { - if(resNumb >= 3){ - clearInterval(outTime) - uni.showToast({ - title: '暂未查询到你的支付订单', - icon : 'none' - }) - return - } - umsState(this.trade_id).then(res => { - resNumb++ - if(res.state === 'success'){ - clearInterval(outTime) - wx.showModal({ - title : '提示', - content : '支付成功', - showCancel : false, - confirmColor: '#446EFE', - success : () => { - this.onRrmoveItem() - } - }) - } - }).catch(err => { - clearInterval(outTime) - uni.showToast({ - title: err.message, - icon : 'none' - }) - }) - }, 2000) + this.onGetOrderPayState() } }, created() { @@ -183,6 +172,53 @@ }) }, methods: { + // 查询订单状态 + onGetOrderPayState(){ + // 查询支付状态 + uni.showLoading({ + title: '查询支付结果...', + mask : true + }) + let outTime; + let resNumb = 0; + outTime = setInterval(() => { + if(resNumb >= 3){ + clearInterval(outTime) + uni.showToast({ + title: '暂未查询到你的支付订单', + icon : 'none' + }) + return + } + umsState(this.trade_id).then(res => { + resNumb++ + if(res.state === 'success'){ + clearInterval(outTime) + wx.showModal({ + title : '提示', + content : '支付成功', + showCancel : false, + confirmColor: '#446EFE', + success : () => { + this.onRrmoveItem() + } + }) + } + }).catch(err => { + clearInterval(outTime) + uni.showToast({ + title: err.message, + icon : 'none' + }) + }) + }, 2000) + }, + // 取消支付 + onCancel(){ + this.payCodeShow = false, + this.payQrUrl = '', + this.payQrType = '' + }, // 抵扣金额 onDeductionSwitch(e){ this.deductionVal = '' @@ -203,9 +239,21 @@ if(this.payType == 'diff') this.onDiffCoinPay() break; case 'code': - uni.showToast({ - title: '付款码支付暂未开放,请敬期待', - icon : 'none' + uni.showActionSheet({ + itemList:["微信付款码", "支付宝付款码"], + success : actionRes => { + console.log(actionRes.tapIndex) + if(actionRes.tapIndex === 0){ + if(this.payType == 'price') this.onDgPay('app', true) + if(this.payType == 'diff') this.onDgDiffPay('app', true) + if(this.payType == 'free') this.onDgFreePay('app', true) + } + if(actionRes.tapIndex === 1){ + if(this.payType == 'price') this.onDgPay('app_alipay', true) + if(this.payType == 'diff') this.onDgDiffPay('app_alipay', true) + if(this.payType == 'free') this.onDgFreePay('app_alipay', true) + } + } }) break; case 'wx': @@ -219,19 +267,19 @@ if(this.payType == 'free') this.onFreePay('app_alipay') break; case 'dgwx': - if(this.payType == 'price') this.onDgPay('app') - if(this.payType == 'diff') this.onDgDiffPay('app') - if(this.payType == 'free') this.onDgFreePay('app') + if(this.payType == 'price') this.onDgPay('app', false) + if(this.payType == 'diff') this.onDgDiffPay('app', false) + if(this.payType == 'free') this.onDgFreePay('app', false) break; case 'dgali': - if(this.payType == 'price') this.onDgPay('app_alipay') - if(this.payType == 'diff') this.onDgDiffPay('app_alipay') - if(this.payType == 'free') this.onDgFreePay('app_alipay') + if(this.payType == 'price') this.onDgPay('app_alipay', false) + if(this.payType == 'diff') this.onDgDiffPay('app_alipay', false) + if(this.payType == 'free') this.onDgFreePay('app_alipay', false) break } }, // 斗拱支付 - onDgPay(type){ + onDgPay(type, code){ uni.showLoading({ title: '加载中...', mask : true @@ -242,15 +290,24 @@ fire : this.deductionVal || 0, app_schema : 'doufire://' }).then(res => { + let { params, trade_id } = res; + uni.hideLoading() + // 二维码支付 + if(code){ + this.onDgPayCode(type, params, trade_id) + return + } + // 转跳付款 + this.getState = true + this.trade_id = trade_id if(type == 'app'){ - let jumpUrl = JSON.parse(res.miniapp_data) + let jumpUrl = JSON.parse(params.miniapp_data) plus.runtime.openURL(jumpUrl.scheme_code) } if(type == 'app_alipay'){ - plus.runtime.openURL(res.jump_url) + plus.runtime.openURL(params.jump_url) } }).catch(err => { - console.log(err) uni.showToast({ title: err.message, icon : 'none' @@ -260,7 +317,7 @@ }) }, // 斗拱补差价 - onDgDiffPay(type){ + onDgDiffPay(type, code){ uni.showLoading({ title: '加载中...', mask : true @@ -271,12 +328,22 @@ fire : this.deductionVal || 0, app_schema : 'doufire://' }).then(res => { + let { params, trade_id } = res; + uni.hideLoading() + // 二维码支付 + if(code){ + this.onDgPayCode(type, params, trade_id) + return + } + // 转跳付款 + this.getState = true + this.trade_id = trade_id if(type == 'app'){ - let jumpUrl = JSON.parse(res.miniapp_data) + let jumpUrl = JSON.parse(params.miniapp_data) plus.runtime.openURL(jumpUrl.scheme_code) } if(type == 'app_alipay'){ - plus.runtime.openURL(res.jump_url) + plus.runtime.openURL(params.jump_url) } }).catch(err => { uni.showToast({ @@ -288,17 +355,31 @@ }) }, // 斗拱自由服务包 - onDgFreePay(type){ + onDgFreePay(type, code){ + uni.showLoading({ + title: '加载中...', + mask : true + }) dgFree(this.orderId, { type, app_schema : 'doufire://' }).then(res => { + let { params, trade_id } = res; + uni.hideLoading() + // 二维码支付 + if(code){ + this.onDgPayCode(type, params, trade_id) + return + } + // 转跳付款 + this.getState = true + this.trade_id = trade_id if(type == 'app'){ - let jumpUrl = JSON.parse(res.miniapp_data) + let jumpUrl = JSON.parse(params.miniapp_data) plus.runtime.openURL(jumpUrl.scheme_code) } if(type == 'app_alipay'){ - plus.runtime.openURL(res.jump_url) + plus.runtime.openURL(params.jump_url) } }).catch(err => { uni.showToast({ @@ -309,6 +390,13 @@ uni.hideLoading() }) }, + // 抖拱二维码付款 + onDgPayCode(type, params, trade_id){ + this.trade_id = trade_id + this.payQrUrl = type == 'app_alipay' ? params.jump_url : 'https://dg-pay.douhuofalv.com?miniurlcode=' + encodeURIComponent(JSON.parse(params.miniapp_data).scheme_code) + this.payQrType = type + this.payCodeShow = true + }, // 银联三方支付 onUmsPay(type){ uni.showLoading({ @@ -463,6 +551,36 @@ \ No newline at end of file diff --git a/components/expandOrder.vue b/components/expandOrder.vue new file mode 100644 index 0000000..89bfc90 --- /dev/null +++ b/components/expandOrder.vue @@ -0,0 +1,152 @@ + + + + + \ No newline at end of file diff --git a/components/mould-input.vue b/components/mould-input.vue new file mode 100644 index 0000000..43c6b44 --- /dev/null +++ b/components/mould-input.vue @@ -0,0 +1,67 @@ + + + + + \ No newline at end of file diff --git a/components/servicesOrder.vue b/components/servicesOrder.vue new file mode 100644 index 0000000..0a6f798 --- /dev/null +++ b/components/servicesOrder.vue @@ -0,0 +1,148 @@ + + + + + \ No newline at end of file diff --git a/components/synthesisOrder.vue b/components/synthesisOrder.vue new file mode 100644 index 0000000..068aa88 --- /dev/null +++ b/components/synthesisOrder.vue @@ -0,0 +1,129 @@ + + + + + \ No newline at end of file diff --git a/dhdg-pay/dgali-pay.html b/dhdg-pay/dgali-pay.html new file mode 100644 index 0000000..31fe437 --- /dev/null +++ b/dhdg-pay/dgali-pay.html @@ -0,0 +1,57 @@ + + + + + + + 抖火收银台 + + + +
+ 抖火法律 +

抖火支付宝收银台

+ + + + +
+ + + \ No newline at end of file diff --git a/js_sdk/wa-permission/permission.js b/js_sdk/wa-permission/permission.js new file mode 100644 index 0000000..5df5623 --- /dev/null +++ b/js_sdk/wa-permission/permission.js @@ -0,0 +1,272 @@ +/** + * 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启 + */ + +var isIos +// #ifdef APP-PLUS +isIos = (plus.os.name == "iOS") +// #endif + +// 判断推送权限是否开启 +function judgeIosPermissionPush() { + var result = false; + var UIApplication = plus.ios.import("UIApplication"); + var app = UIApplication.sharedApplication(); + var enabledTypes = 0; + if (app.currentUserNotificationSettings) { + var settings = app.currentUserNotificationSettings(); + enabledTypes = settings.plusGetAttribute("types"); + console.log("enabledTypes1:" + enabledTypes); + if (enabledTypes == 0) { + console.log("推送权限没有开启"); + } else { + result = true; + console.log("已经开启推送功能!") + } + plus.ios.deleteObject(settings); + } else { + enabledTypes = app.enabledRemoteNotificationTypes(); + if (enabledTypes == 0) { + console.log("推送权限没有开启!"); + } else { + result = true; + console.log("已经开启推送功能!") + } + console.log("enabledTypes2:" + enabledTypes); + } + plus.ios.deleteObject(app); + plus.ios.deleteObject(UIApplication); + return result; +} + +// 判断定位权限是否开启 +function judgeIosPermissionLocation() { + var result = false; + var cllocationManger = plus.ios.import("CLLocationManager"); + var status = cllocationManger.authorizationStatus(); + result = (status != 2) + console.log("定位权限开启:" + result); + // 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation + /* var enable = cllocationManger.locationServicesEnabled(); + var status = cllocationManger.authorizationStatus(); + console.log("enable:" + enable); + console.log("status:" + status); + if (enable && status != 2) { + result = true; + console.log("手机定位服务已开启且已授予定位权限"); + } else { + console.log("手机系统的定位没有打开或未给予定位权限"); + } */ + plus.ios.deleteObject(cllocationManger); + return result; +} + +// 判断麦克风权限是否开启 +function judgeIosPermissionRecord() { + var result = false; + var avaudiosession = plus.ios.import("AVAudioSession"); + var avaudio = avaudiosession.sharedInstance(); + var permissionStatus = avaudio.recordPermission(); + console.log("permissionStatus:" + permissionStatus); + if (permissionStatus == 1684369017 || permissionStatus == 1970168948) { + console.log("麦克风权限没有开启"); + } else { + result = true; + console.log("麦克风权限已经开启"); + } + plus.ios.deleteObject(avaudiosession); + return result; +} + +// 判断相机权限是否开启 +function judgeIosPermissionCamera() { + var result = false; + var AVCaptureDevice = plus.ios.import("AVCaptureDevice"); + var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide'); + console.log("authStatus:" + authStatus); + if (authStatus == 3) { + result = true; + console.log("相机权限已经开启"); + } else { + console.log("相机权限没有开启"); + } + plus.ios.deleteObject(AVCaptureDevice); + return result; +} + +// 判断相册权限是否开启 +function judgeIosPermissionPhotoLibrary() { + var result = false; + var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary"); + var authStatus = PHPhotoLibrary.authorizationStatus(); + console.log("authStatus:" + authStatus); + if (authStatus == 3) { + result = true; + console.log("相册权限已经开启"); + } else { + console.log("相册权限没有开启"); + } + plus.ios.deleteObject(PHPhotoLibrary); + return result; +} + +// 判断通讯录权限是否开启 +function judgeIosPermissionContact() { + var result = false; + var CNContactStore = plus.ios.import("CNContactStore"); + var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0); + if (cnAuthStatus == 3) { + result = true; + console.log("通讯录权限已经开启"); + } else { + console.log("通讯录权限没有开启"); + } + plus.ios.deleteObject(CNContactStore); + return result; +} + +// 判断日历权限是否开启 +function judgeIosPermissionCalendar() { + var result = false; + var EKEventStore = plus.ios.import("EKEventStore"); + var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0); + if (ekAuthStatus == 3) { + result = true; + console.log("日历权限已经开启"); + } else { + console.log("日历权限没有开启"); + } + plus.ios.deleteObject(EKEventStore); + return result; +} + +// 判断备忘录权限是否开启 +function judgeIosPermissionMemo() { + var result = false; + var EKEventStore = plus.ios.import("EKEventStore"); + var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1); + if (ekAuthStatus == 3) { + result = true; + console.log("备忘录权限已经开启"); + } else { + console.log("备忘录权限没有开启"); + } + plus.ios.deleteObject(EKEventStore); + return result; +} + +// Android权限查询 +function requestAndroidPermission(permissionID) { + return new Promise((resolve, reject) => { + plus.android.requestPermissions( + [permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装 + function(resultObj) { + var result = 0; + for (var i = 0; i < resultObj.granted.length; i++) { + var grantedPermission = resultObj.granted[i]; + console.log('已获取的权限:' + grantedPermission); + result = 1 + } + for (var i = 0; i < resultObj.deniedPresent.length; i++) { + var deniedPresentPermission = resultObj.deniedPresent[i]; + console.log('拒绝本次申请的权限:' + deniedPresentPermission); + result = 0 + } + for (var i = 0; i < resultObj.deniedAlways.length; i++) { + var deniedAlwaysPermission = resultObj.deniedAlways[i]; + console.log('永久拒绝申请的权限:' + deniedAlwaysPermission); + result = -1 + } + resolve(result); + // 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限 + // if (result != 1) { + // gotoAppPermissionSetting() + // } + }, + function(error) { + console.log('申请权限错误:' + error.code + " = " + error.message); + resolve({ + code: error.code, + message: error.message + }); + } + ); + }); +} + +// 使用一个方法,根据参数判断权限 +function judgeIosPermission(permissionID) { + if (permissionID == "location") { + return judgeIosPermissionLocation() + } else if (permissionID == "camera") { + return judgeIosPermissionCamera() + } else if (permissionID == "photoLibrary") { + return judgeIosPermissionPhotoLibrary() + } else if (permissionID == "record") { + return judgeIosPermissionRecord() + } else if (permissionID == "push") { + return judgeIosPermissionPush() + } else if (permissionID == "contact") { + return judgeIosPermissionContact() + } else if (permissionID == "calendar") { + return judgeIosPermissionCalendar() + } else if (permissionID == "memo") { + return judgeIosPermissionMemo() + } + return false; +} + +// 跳转到**应用**的权限页面 +function gotoAppPermissionSetting() { + if (isIos) { + var UIApplication = plus.ios.import("UIApplication"); + var application2 = UIApplication.sharedApplication(); + var NSURL2 = plus.ios.import("NSURL"); + // var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES"); + var setting2 = NSURL2.URLWithString("app-settings:"); + application2.openURL(setting2); + + plus.ios.deleteObject(setting2); + plus.ios.deleteObject(NSURL2); + plus.ios.deleteObject(application2); + } else { + // console.log(plus.device.vendor); + var Intent = plus.android.importClass("android.content.Intent"); + var Settings = plus.android.importClass("android.provider.Settings"); + var Uri = plus.android.importClass("android.net.Uri"); + var mainActivity = plus.android.runtimeMainActivity(); + var intent = new Intent(); + intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); + var uri = Uri.fromParts("package", mainActivity.getPackageName(), null); + intent.setData(uri); + mainActivity.startActivity(intent); + } +} + +// 检查系统的设备服务是否开启 +// var checkSystemEnableLocation = async function () { +function checkSystemEnableLocation() { + if (isIos) { + var result = false; + var cllocationManger = plus.ios.import("CLLocationManager"); + var result = cllocationManger.locationServicesEnabled(); + console.log("系统定位开启:" + result); + plus.ios.deleteObject(cllocationManger); + return result; + } else { + var context = plus.android.importClass("android.content.Context"); + var locationManager = plus.android.importClass("android.location.LocationManager"); + var main = plus.android.runtimeMainActivity(); + var mainSvr = main.getSystemService(context.LOCATION_SERVICE); + var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER); + console.log("系统定位开启:" + result); + return result + } +} + +module.exports = { + judgeIosPermission: judgeIosPermission, + requestAndroidPermission: requestAndroidPermission, + checkSystemEnableLocation: checkSystemEnableLocation, + gotoAppPermissionSetting: gotoAppPermissionSetting +} diff --git a/pages.json b/pages.json index 9eca141..5a79595 100644 --- a/pages.json +++ b/pages.json @@ -547,6 +547,7 @@ }, { "path": "pages/im/msg", "name": "ImMsg", + "auth": true, "style": { "navigationBarTitleText": "消息", "enablePullDownRefresh": false, @@ -555,19 +556,155 @@ }, { "path": "pages/user/signLog", "name": "SignLog", + "auth": true, "style": { "navigationBarTitleText": "合同记录", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#FFFFFF" } }, { - "path": "pages/user/contract", + "path": "pages/user/contract", "name": "SignContract", + "auth": true, "style": { "navigationBarTitleText": "合同", - "enablePullDownRefresh": false, + "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#FFFFFF" } + }, { + "path": "pages/synthesize/individual", + "name": "Individual", + "auth": true, + "style": { + "navigationBarTitleText": "个人全年法律", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF" + } + }, { + "path": "pages/synthesize/entrust", + "name": "Entrust", + "auth": true, + "style": { + "navigationBarTitleText": "案件委托", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF" + } + }, { + "path": "pages/synthesize/enterprise", + "name": "Enterprise", + "auth": true, + "style": { + "navigationBarTitleText": "企业全年法律", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF" + } + + }, { + "path": "pages/synthesize/service", + "name": "Service", + "auth": true, + "style": { + "navigationBarTitleText": "拓展服务", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF" + } + }, { + "path": "pages/synthesize/order", + "name": "SynthesizeOrder", + "auth": true, + "style": { + "navigationBarTitleText": "订单列表", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF" + } + }, { + "path": "pages/synthesize/servicesInfo", + "name": "OrderServicesInfo", + "auth": true, + "style": { + "navigationBarTitleText": "年费订单详情", + "enablePullDownRefresh": false, + "navigationStyle": "custom", + "app-plus": { + "titleNView": { + "type": "transparent" + } + } + } + }, { + "path": "pages/synthesize/synthesisInfo", + "name": "OrderSynthesisInfo", + "auth": true, + "style": { + "navigationBarTitleText": "咨询订单详情", + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": { + "type": "transparent" + } + } + } + }, { + "path": "pages/synthesize/expandInfo", + "name": "OrderExpandInfo", + "auth": true, + "style": { + "navigationBarTitleText": "委托订单详情", + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": { + "type": "transparent" + } + } + } + }, { + "path": "pages/synthesize/entrustInfo", + "name": "OrderEntrustInfo", + "auth": true, + "style": { + "navigationBarTitleText": "委托订单详情", + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": { + "type": "transparent" + } + } + } + }, { + "path": "pages/synthesize/PersonWrite", + "name": "PersonWrite", + "auth": true, + "style": { + "navigationBarTitleText": "个人法律咨询365服务包", + "enablePullDownRefresh": false + } + }, { + "path": "pages/pay/bankPay", + "name": "BankPay", + "auth": true, + "style": { + "navigationBarTitleText": "银行打款支付", + "enablePullDownRefresh": false + } + }, { + "path": "pages/synthesize/entrustCivil", + "name": "EntrustCivil", + "auth": true, + "style": { + "navigationBarTitleText": "案件委托-民事诉讼", + "enablePullDownRefresh": false, + "backgroundColor": "#FFF" + } + + }, { + "path": "pages/synthesize/entrustWrite", + "name": "EntrustWrite", + "auth": true, + "style": { + "navigationBarTitleText": "案件委托-服务包", + "enablePullDownRefresh": false, + "backgroundColor": "#FFF" + } }], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/index/index.vue b/pages/index/index.vue index ee95bd2..2aff17f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -34,7 +34,7 @@
- + @@ -71,14 +71,46 @@ 综法产品 - 更多 - - + + - 2022年尊享综法服务包 - 2200 + + 个人全年法律 + 咨询服务 抖火法律 + + 365.00/年 + + + + + + + 案件委托 + 咨询服务 抖火法律 + + 200元起 + + + + + + + 企业全年法律 + 咨询服务 抖火法律 + + 3650.00起/年 + + + + + + + 拓展服务 + 咨询服务 抖火法律 + + 500元起 @@ -247,10 +279,8 @@ // console.log(this.bannerArr[e]) }, // 点击轮播图跳转自由服务包 - clickFree(){ - uni.navigateTo({ - url:'/pages/index/free' - }) + onView(name){ + this.$Router.push({ name }) }, // 获取城市数据 getRegion(id){ @@ -382,21 +412,30 @@ .colum-flex{ display: flex; flex-direction: column; - justify-content: space-around; + justify-content: space-between; height: 180rpx; .title{ - line-height: 40rpx; - font-size: 28rpx; + font-size: 34rpx; color: #111111; + line-height: 40rpx; + margin-bottom: 10rpx; + @extend .nowrap; + } + .subtitle{ + font-size: 28rpx; + color: gray; + line-height: 40rpx; + @extend .nowrap; } .price{ - line-height: 40rpx; font-weight: bold; color: #d51959; - font-size: 38rpx; + font-size: 36rpx; + line-height: 40rpx; text{ font-size: 80%; } + @extend .nowrap; } } } diff --git a/pages/pay/bankPay.vue b/pages/pay/bankPay.vue new file mode 100644 index 0000000..1f86235 --- /dev/null +++ b/pages/pay/bankPay.vue @@ -0,0 +1,357 @@ + + + + + diff --git a/pages/pay/pay.vue b/pages/pay/pay.vue index 019d8cf..8616f41 100644 --- a/pages/pay/pay.vue +++ b/pages/pay/pay.vue @@ -4,11 +4,15 @@ 实付金额 {{total}} + + 火力值:{{totalFire}} + 当前火力值比例1:{{rate}} + 订单号:{{orderNo}} - + - + + + + @@ -45,6 +52,10 @@ }; }, props: { + isSelf: { + type : Boolean, + default : false + }, no : { type : String, default : '' @@ -84,14 +95,34 @@ default : () => { return { name: '' } } + }, + can: { + typeof: Object, + default : () => { + return {} + } } }, methods: { + // 订单签约 + onSing(id){ + this.$emit('sing', id) + }, + // 订单详情 onInfo(id){ this.$emit('info', id) }, + // 联系客户 onPhone(mobile){ this.$emit('callPhone', mobile) + }, + // 补差价支付 + onDiff(id){ + this.$emit('diff', id) + }, + // 支付 + onOPay(id){ + this.$emit('pay', id) } } } @@ -101,7 +132,7 @@ // 列表模块 .order-block{ background: white; - margin: 30rpx; + margin: 0 30rpx 30rpx 30rpx; border-radius: 10rpx; &-header{ border-bottom: solid 1rpx #eee; @@ -112,7 +143,7 @@ align-items: center; line-height: 70rpx; .order-no{ font-size: 28rpx; color: #111; } - .order-state{ color: #353EF4; font-weight: bold; font-size: 30rpx; } + .order-state{ color: #446EFE; font-weight: bold; font-size: 30rpx; } } &-content{ padding: 30rpx; @@ -142,10 +173,11 @@ padding-top: 30rpx; display: flex; justify-content: flex-end; - button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 150rpx; font-size: 30rpx; } + button{ margin: 0; padding: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 135rpx; font-size: 30rpx; } button::after{ display: none; } - button.btn-cancel{ margin-right: 20rpx; color: #353EF4; border:solid 1rpx #353EF4; background: white; line-height: 68rpx; box-sizing: border-box; } - button.btn-sign{ background: #353EF4; color: white; } + button.btn-cancel{ margin-right: 20rpx; color: #446EFE; border:solid 1rpx #446EFE; background: white; line-height: 68rpx; box-sizing: border-box; } + button.btn-cancel.in{ opacity: .8; } + button.btn-sign{ background: #446EFE; color: white; } } } } diff --git a/components/expandOrder.vue b/components/expandOrder.vue index 89bfc90..2c8b3aa 100644 --- a/components/expandOrder.vue +++ b/components/expandOrder.vue @@ -29,7 +29,13 @@ - + + + @@ -79,6 +85,12 @@ type : Number, default : 0 }, + can: { + type : Object, + default : () => { + return { } + } + }, lawyer: { type : Object, default : () => { @@ -87,11 +99,21 @@ } }, methods: { + // 订单详情 onInfo(id){ this.$emit('info', id) }, + // 联系客户 onPhone(mobile){ this.$emit('callPhone', mobile) + }, + // 补差价支付 + onDiff(id){ + this.$emit('diff', id) + }, + // 支付 + onOPay(id){ + this.$emit('pay', id) } } } @@ -101,7 +123,7 @@ // 列表模块 .order-block{ background: white; - margin: 30rpx; + margin: 0 30rpx 30rpx 30rpx; border-radius: 10rpx; &-header{ border-bottom: solid 1rpx #eee; @@ -112,7 +134,7 @@ align-items: center; line-height: 70rpx; .order-no{ font-size: 28rpx; color: #111; } - .order-state{ color: #353EF4; font-weight: bold; font-size: 30rpx; } + .order-state{ color: #446EFE; font-weight: bold; font-size: 30rpx; } } &-content{ padding: 30rpx; @@ -142,10 +164,11 @@ padding-top: 30rpx; display: flex; justify-content: flex-end; - button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 150rpx; font-size: 30rpx; } + button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 135rpx; font-size: 30rpx; padding: 0; } button::after{ display: none; } - button.btn-cancel{ margin-right: 20rpx; color: #353EF4; border:solid 1rpx #353EF4; background: white; line-height: 68rpx; box-sizing: border-box; } - button.btn-sign{ background: #353EF4; color: white; } + button.btn-cancel{ margin-right: 20rpx; color: #446EFE; border:solid 1rpx #446EFE; background: white; line-height: 68rpx; box-sizing: border-box; } + button.btn-cancel.in{ opacity: .8; } + button.btn-sign{ background: #446EFE; color: white; } } } } diff --git a/components/servicesOrder.vue b/components/servicesOrder.vue index 0a6f798..8ff975a 100644 --- a/components/servicesOrder.vue +++ b/components/servicesOrder.vue @@ -29,7 +29,14 @@ - + + + + @@ -45,6 +52,10 @@ }; }, props: { + isSelf: { + type : Boolean, + default : false, + }, no : { type : String, default : '' @@ -80,12 +91,32 @@ default : () => { return { name: '' } } + }, + can: { + type : Object, + default : () => { + return { } + } } }, methods: { + // 订单签约 + onSing(id){ + this.$emit('sing', id) + }, + // 订单详情 onInfo(id){ this.$emit('info', id) }, + // 联系客户 + onPhone(mobile){ + this.$emit('callPhone', mobile) + }, + // 补差价支付 + onDiff(id){ + this.$emit('diff', id) + }, + // 支付 onOPay(id){ this.$emit('pay', id) } @@ -97,7 +128,7 @@ // 列表模块 .order-block{ background: white; - margin: 30rpx; + margin: 0 30rpx 30rpx 30rpx; border-radius: 10rpx; &-header{ border-bottom: solid 1rpx #eee; @@ -108,7 +139,7 @@ align-items: center; line-height: 70rpx; .order-no{ font-size: 28rpx; color: #111; } - .order-state{ color: #353EF4; font-weight: bold; font-size: 30rpx; } + .order-state{ color: #446EFE; font-weight: bold; font-size: 30rpx; } } &-content{ padding: 30rpx; @@ -138,10 +169,10 @@ padding-top: 30rpx; display: flex; justify-content: flex-end; - button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 150rpx; font-size: 30rpx; } + button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 135rpx; font-size: 30rpx; } button::after{ display: none; } - button.btn-cancel{ margin-right: 20rpx; color: #353EF4; border:solid 1rpx #353EF4; background: white; line-height: 68rpx; box-sizing: border-box; } - button.btn-sign{ background: #353EF4; color: white; } + button.btn-cancel{ margin-right: 20rpx; color: #446EFE; border:solid 1rpx #446EFE; background: white; line-height: 68rpx; box-sizing: border-box; } + button.btn-sign{ background: #446EFE; color: white; } } } } diff --git a/components/synthesisOrder.vue b/components/synthesisOrder.vue index 068aa88..4057c87 100644 --- a/components/synthesisOrder.vue +++ b/components/synthesisOrder.vue @@ -20,7 +20,7 @@ - + @@ -72,7 +72,12 @@ this.$emit('info', id) }, onPhone(mobile){ + console.log(mobile) + this.$emit('callPhone', mobile) + }, + onSing(id){ + this.$emit('info', id) } } } @@ -82,7 +87,7 @@ // 列表模块 .order-block{ background: white; - margin: 30rpx; + margin: 0 30rpx 30rpx 30rpx; border-radius: 10rpx; &-header{ border-bottom: solid 1rpx #eee; @@ -119,10 +124,10 @@ padding-top: 30rpx; display: flex; justify-content: flex-end; - button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 150rpx; font-size: 30rpx; } + button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 135rpx; padding: 0; font-size: 30rpx; } button::after{ display: none; } - button.btn-cancel{ margin-right: 20rpx; color: #353EF4; border:solid 1rpx #353EF4; background: white; line-height: 68rpx; box-sizing: border-box; } - button.btn-sign{ background: #353EF4; color: white; } + button.btn-cancel{ margin-right: 20rpx; color: #446EFE; border:solid 1rpx #446EFE; background: white; line-height: 68rpx; box-sizing: border-box; } + button.btn-sign{ background: #446EFE; color: white; } } } } diff --git a/pages.json b/pages.json index 5a79595..94a4334 100644 --- a/pages.json +++ b/pages.json @@ -687,24 +687,60 @@ "enablePullDownRefresh": false } }, { - "path": "pages/synthesize/entrustCivil", - "name": "EntrustCivil", + "path": "pages/synthesize/entrustCivil", + "name": "EntrustCivil", "auth": true, "style": { "navigationBarTitleText": "案件委托-民事诉讼", - "enablePullDownRefresh": false, + "enablePullDownRefresh": false, "backgroundColor": "#FFF" } }, { - "path": "pages/synthesize/entrustWrite", - "name": "EntrustWrite", + "path": "pages/synthesize/entrustWrite", + "name": "EntrustWrite", "auth": true, "style": { - "navigationBarTitleText": "案件委托-服务包", - "enablePullDownRefresh": false, + "navigationBarTitleText": "案件委托-", + "enablePullDownRefresh": false, "backgroundColor": "#FFF" } + }, { + "path": "pages/synthesize/standWrite", + "name": "StandWrite", + "auth": true, + "style": { + "navigationBarTitleText": "企业全年法律-购买", + "enablePullDownRefresh": false, + "backgroundColor": "#FFF" + } + }, { + "path": "pages/synthesize/expandWrite", + "name": "ExpandWrite", + "auth": true, + "style": { + "navigationBarTitleText": "拓展服务-", + "enablePullDownRefresh": false, + "backgroundColor": "#FFF" + } + }, { + "path": "pages/synthesize/difference", + "name": "Difference", + "auth": true, + "style": { + "navigationBarTitleText": "订单补差价", + "enablePullDownRefresh": false + } + }, { + "path": "pages/synthesize/feeWrite", + "name": "FeeWrite", + "auth": true, + "style": { + "navigationBarTitleText": "个人法律咨询", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFF" + } + }], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/pay/bankPay.vue b/pages/pay/bankPay.vue index 1f86235..f934b29 100644 --- a/pages/pay/bankPay.vue +++ b/pages/pay/bankPay.vue @@ -39,19 +39,6 @@ - - @@ -182,7 +169,7 @@ onBack(){ uni.showModal({ title : '提示', - content : '打款凭证已提交,请耐心等待审核', + content : '打款凭证已提交,请耐心等待审核,通过后请前往工作台综法订单管理中进行签约', showCancel : false, success : modalRes => { if(modalRes.confirm){ diff --git a/pages/pay/pay.vue b/pages/pay/pay.vue index 8616f41..97109ff 100644 --- a/pages/pay/pay.vue +++ b/pages/pay/pay.vue @@ -241,7 +241,7 @@ clearInterval(outTime) wx.showModal({ title : '提示', - content : '支付成功', + content : this.$Route.query.paytype === 'synthesize' ? '支付成功,可在工作台综法订单管理查询您的订单' : '支付成功', showCancel : false, confirmColor: '#446EFE', success : () => { diff --git a/pages/synthesize/difference.vue b/pages/synthesize/difference.vue new file mode 100644 index 0000000..b821297 --- /dev/null +++ b/pages/synthesize/difference.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/pages/synthesize/enterprise.vue b/pages/synthesize/enterprise.vue index 1e886a4..f41548d 100644 --- a/pages/synthesize/enterprise.vue +++ b/pages/synthesize/enterprise.vue @@ -6,9 +6,9 @@ 企业法律咨询服务包 legal advice - - - 到期时间:{{item.service_order.ended_at}} + + + 到期时间:{{item.service_user.ended_at}} {{item.title}} diff --git a/pages/synthesize/entrustInfo.vue b/pages/synthesize/entrustInfo.vue index 9fd1bde..19cb66d 100644 --- a/pages/synthesize/entrustInfo.vue +++ b/pages/synthesize/entrustInfo.vue @@ -78,13 +78,13 @@ mask : true }) entrustInfo(this.$Route.query.id).then(res => { - let { entrust, params, created_at, user, order_no, price } = res; + let { entrust, params, created_at, user, order_no, total } = res; this.entrust = entrust this.params = params this.createdAt = created_at this.user = user this.no = order_no - this.price = price + this.price = total }).catch(err => { uni.showToast({ title: err.message, diff --git a/pages/synthesize/expandInfo.vue b/pages/synthesize/expandInfo.vue index 0a4961a..7ac0ccc 100644 --- a/pages/synthesize/expandInfo.vue +++ b/pages/synthesize/expandInfo.vue @@ -77,13 +77,13 @@ mask : true }) expandInfo(this.$Route.query.id).then(res => { - let { expand, params, created_at, user, order_no, price } = res; + let { expand, params, created_at, user, order_no, total } = res; this.expand = expand this.params = params this.createdAt = created_at this.user = user this.no = order_no - this.price = price + this.price = total }).catch(err => { console.log(err) diff --git a/pages/synthesize/expandWrite.vue b/pages/synthesize/expandWrite.vue new file mode 100644 index 0000000..ed10eb2 --- /dev/null +++ b/pages/synthesize/expandWrite.vue @@ -0,0 +1,430 @@ + + + + + \ No newline at end of file diff --git a/pages/synthesize/feeWrite.vue b/pages/synthesize/feeWrite.vue new file mode 100644 index 0000000..d5a0361 --- /dev/null +++ b/pages/synthesize/feeWrite.vue @@ -0,0 +1,420 @@ + + + + + \ No newline at end of file diff --git a/pages/synthesize/individual.vue b/pages/synthesize/individual.vue index 1ba7e58..6c39898 100644 --- a/pages/synthesize/individual.vue +++ b/pages/synthesize/individual.vue @@ -46,7 +46,7 @@ 打款被驳回 - 到期时间:{{item.service_user.ended_at}} + 到期时间:{{item.service_user.ended_at}} @@ -56,13 +56,16 @@ @@ -288,7 +446,7 @@ // 滑块 .header-sticky{ padding-bottom: 12rpx; } // 列表 - .list{ overflow: hidden; } + .list{ overflow: hidden; padding-top: 30rpx; } // 内容为空 .null-pages{ height: 70vh; display: flex; align-items: center; justify-content: center; } diff --git a/pages/synthesize/service.vue b/pages/synthesize/service.vue index ee381f4..00ecd7d 100644 --- a/pages/synthesize/service.vue +++ b/pages/synthesize/service.vue @@ -8,12 +8,12 @@ - + {{item.title}} - 购买 + 购买 diff --git a/pages/synthesize/servicesInfo.vue b/pages/synthesize/servicesInfo.vue index 54dc852..c82d50a 100644 --- a/pages/synthesize/servicesInfo.vue +++ b/pages/synthesize/servicesInfo.vue @@ -77,13 +77,13 @@ mask : true }) servicesInfo(this.$Route.query.id).then(res => { - let { service, params, created_at, user, order_no, price } = res; + let { service, params, created_at, user, order_no, total } = res; this.service = service this.params = params this.createdAt = created_at this.user = user this.no = order_no - this.price = price + this.price = total }).catch(err => { uni.showToast({ title: err.message, diff --git a/pages/synthesize/standWrite.vue b/pages/synthesize/standWrite.vue new file mode 100644 index 0000000..efc18c8 --- /dev/null +++ b/pages/synthesize/standWrite.vue @@ -0,0 +1,473 @@ + + + + + \ No newline at end of file diff --git a/pages/work/create.vue b/pages/work/create.vue index 99c56dd..b161f6e 100644 --- a/pages/work/create.vue +++ b/pages/work/create.vue @@ -103,11 +103,14 @@ } } synthesisObj = synthesisArr.find(val => val.synthesis_id === this.businessId) + if(synthesisObj.can.buy){ - console.log('提交免费咨询') - // this.$Router.replace({ - // name: 'PersonWrite' - // }) + this.$Router.replace({ + name : 'FeeWrite', + params : { + synthesisId : synthesisObj.synthesis_id + } + }) return } uni.showModal({ @@ -118,7 +121,7 @@ success : modalRes => { if(modalRes.confirm){ this.$Router.replace({ - name: 'PersonWrite' + name: 'Individual' }) } } diff --git a/pages/work/index.vue b/pages/work/index.vue index 58055e0..e0618ec 100644 --- a/pages/work/index.vue +++ b/pages/work/index.vue @@ -162,22 +162,22 @@ - {{orderCount.transfer_out}} + {{synthesisData.service.all}} 年费订单 - {{orderCount.transfer_in}} + {{synthesisData.synthesis.all}} 咨询订单 - {{orderCount.transfer_out}} + {{synthesisData.entrust.all}} 委托订单 - {{orderCount.transfer_in}} + {{synthesisData.expand.all}} 拓展订单 @@ -233,7 +233,7 @@