diff --git a/api/api.js b/api/api.js index 0ec8f40..ad25809 100644 --- a/api/api.js +++ b/api/api.js @@ -11,206 +11,274 @@ import request from "@/utils/request.js"; /** * 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册 * -*/ + */ /** * 获取主页数据 无需授权 * -*/ -export function getIndexData() -{ - return request.get("common/home",{},{ noAuth : true}); + */ +export function getIndexData() { + return request.get("common/home", {}, { + noAuth: true + }); } /** * 获取app版本 */ export function getAppVersion() { - return request.get('appVersion',{},{noAuth:true}); + return request.get('appVersion', {}, { + noAuth: true + }); } /** * 获取登录授权login * -*/ -export function getLogo() -{ - return request.get('wechat/get_logo', {}, { noAuth : true}); + */ +export function getLogo() { + return request.get('wechat/get_logo', {}, { + noAuth: true + }); } /** * 保存form_id * @param string formId */ export function setFormId(formId) { - return request.post("wechat/set_form_id", { formId: formId}); + return request.post("wechat/set_form_id", { + formId: formId + }); } /** * 领取优惠卷 * @param int couponId * -*/ -export function setCouponReceive(couponId){ - return request.post('coupon/receive/'+couponId); + */ +export function setCouponReceive(couponId) { + return request.post('coupon/receive/' + couponId); } /** * 商铺优惠券列表 * @param object data -*/ -export function getShopCoupons(id){ - return request.get('coupon/store/'+id,{},{ noAuth: true}) + */ +export function getShopCoupons(id) { + return request.get('coupon/store/' + id, {}, { + noAuth: true + }) } /** * 商品优惠券列表 * @param object data -*/ -export function getCoupons(data){ - return request.get('coupon/product',data,{ noAuth: true}) + */ +export function getCoupons(data) { + return request.get('coupon/product', data, { + noAuth: true + }) } /** * 我的优惠券 * @param int types 0全部 1未使用 2已使用 -*/ -export function getUserCoupons(data){ - return request.get('coupon/list',data) + */ +export function getUserCoupons(data) { + return request.get('coupon/list', data) } /** * 文章分类列表 * -*/ -export function getArticleCategoryList(){ - return request.get('article/category/lst',{},{noAuth:true}) + */ +export function getArticleCategoryList() { + return request.get('article/category/lst', {}, { + noAuth: true + }) } /** * 文章列表 * @param int cid * -*/ -export function getArticleList(cid,data){ - return request.get('article/lst/' + cid, data,{noAuth:true}) + */ +export function getArticleList(cid, data) { + return request.get('article/lst/' + cid, data, { + noAuth: true + }) } /** * 文章 热门列表 * -*/ -export function getArticleHotList(){ - return request.get('article/hot/list',{},{noAuth:true}); + */ +export function getArticleHotList() { + return request.get('article/hot/list', {}, { + noAuth: true + }); } /** * 文章 轮播列表 * -*/ -export function getArticleBannerList(){ - return request.get('article/banner/list',{},{noAuth:true}) + */ +export function getArticleBannerList() { + return request.get('article/banner/list', {}, { + noAuth: true + }) } /** * 文章详情 * @param int id * -*/ -export function getArticleDetails(id){ - return request.get('article/detail/'+id,{},{noAuth:true}); + */ +export function getArticleDetails(id) { + return request.get('article/detail/' + id, {}, { + noAuth: true + }); } /** * 手机号+验证码登录接口 * @param object data -*/ -export function loginMobile(data){ - return request.post('login/mobile',data,{noAuth:true}) + */ +export function loginMobile(data) { + return request.post('login/mobile', data, { + noAuth: true + }) } /** * 获取短信KEY * @param object phone -*/ -export function verifyCode(){ - return request.get('verify_code', {},{noAuth:true}) + */ +export function verifyCode() { + return request.get('verify_code', {}, { + noAuth: true + }) } /** * 验证码发送 * @param object phone -*/ -export function registerVerify(phone, reset, key, code){ - return request.post('register/verify', { phone: phone, type: reset === undefined ? 'reset' : reset, key: key, code: code },{noAuth:true}) + */ +export function registerVerify(phone, reset, key, code) { + return request.post('register/verify', { + phone: phone, + type: reset === undefined ? 'reset' : reset, + key: key, + code: code + }, { + noAuth: true + }) } /** * 手机号注册 * @param object data * -*/ -export function phoneRegister(data){ - return request.post('register',data,{noAuth:true}); + */ +export function phoneRegister(data) { + return request.post('register', data, { + noAuth: true + }); } /** * 手机号修改密码 * @param object data * -*/ -export function phoneRegisterReset(data){ - return request.post('register/reset',data,{noAuth:true}) + */ +export function phoneRegisterReset(data) { + return request.post('register/reset', data, { + noAuth: true + }) } /** * 手机号+密码登录 * @param object data * -*/ -export function phoneLogin(data){ - return request.post('login',data,{noAuth:true}) + */ +export function phoneLogin(data) { + return request.post('login', data, { + noAuth: true + }) } /* h5切换公众号登陆 */ export function switchH5Login(data) { - return request.post("user/switch", data); + return request.post("user/switch", data); } /** 绑定手机号 */ -export function bindingPhone(data){ - return request.post('user/binding',data); +export function bindingPhone(data) { + return request.post('user/binding', data); } /** 修改手机号 */ -export function modifyPhone(data){ - return request.post('user/change/phone',data); +export function modifyPhone(data) { + return request.post('user/change/phone', data); } /** 修改密码 */ -export function modifyPassword(data){ - return request.post('user/change/password',data); +export function modifyPassword(data) { + return request.post('user/change/password', data); } + + +/** 设置登录密码 */ +export function setPayPwd(data) { + return request.post('User/set/withdrawal_pwd', data); +} + + /** 退出登錄 */ -export function logout(){ - return request.get('logout'); +export function logout() { + return request.get('logout'); } /** 获取订阅消息id */ -export function getTemlIds(){ - return request.get('wechat/teml_ids', {}, { noAuth:true}); +export function getTemlIds() { + return request.get('wechat/teml_ids', {}, { + noAuth: true + }); } /** 首页拼团数据 */ -export function pink(){ - return request.get('pink', {}, { noAuth:true}); +export function pink() { + return request.get('pink', {}, { + noAuth: true + }); } /** 获取城市信息 */ export function getCity() { - return request.get('system/city/lst', { }, { noAuth: true }); + return request.get('system/city/lst', {}, { + noAuth: true + }); } export function getCityV2(pid) { - return request.get('v2/system/city/lst/'+pid, {}, {noAuth: true}); + return request.get('v2/system/city/lst/' + pid, {}, { + noAuth: true + }); } -export function getCityList(address){ - return request.get('v2/system/city', {address}, {noAuth: true}); +export function getCityList(address) { + return request.get('v2/system/city', { + address + }, { + noAuth: true + }); } /** 获取小程序直播列表 */ -export function getLiveList(page,limit) { - return request.get('wechat/live', { page, limit}, { noAuth: true }); +export function getLiveList(page, limit) { + return request.get('wechat/live', { + page, + limit + }, { + noAuth: true + }); } /* APP登录 */ export function wechatAppAuth(data) { - return request.post("auth/app", data, { noAuth: true }); + return request.post("auth/app", data, { + noAuth: true + }); } /* APPLE登录 */ export function appleAppAuth(data) { - return request.post("auth/apple", data, { noAuth: true }); + return request.post("auth/apple", data, { + noAuth: true + }); } /* 小程序获取手机号解密 */ export function appletsDecrypt(data) { - return request.post("user/mp/binding", data); + return request.post("user/mp/binding", data); } /** * 获取首页DIY; */ export function getDiy(data) { - return request.get('diy',data,{ noAuth: true }); + return request.get('diy', data, { + noAuth: true + }); } /** * 获取首页微页面; @@ -270,7 +338,7 @@ export function getPresellData(data) { * @param {Object} data */ export function getAssistData(data) { - return request.get("diy/assist",data, { + return request.get("diy/assist", data, { noAuth: true }); } @@ -297,7 +365,7 @@ export function getProductData(data) { * @param {Object} data */ export function graphicLstData(data) { - return request.get("diy/community",data, { + return request.get("diy/community", data, { noAuth: true }); } @@ -306,7 +374,7 @@ export function graphicLstData(data) { * @param {Object} data */ export function storeList(data) { - return request.get("diy/store",data, { + return request.get("diy/store", data, { noAuth: true }); } @@ -352,7 +420,9 @@ export function getCateData(data) { * @param {Object} data */ export function village(data) { - return request.get('v2/system/geo/lst', data, { noAuth: true }); + return request.get('v2/system/geo/lst', data, { + noAuth: true + }); } /** @@ -360,5 +430,7 @@ export function village(data) { * @param {Object} data */ export function brigade(data) { - return request.get('v2/system/brigade', data, { noAuth: true }); + return request.get('v2/system/brigade', data, { + noAuth: true + }); } \ No newline at end of file diff --git a/pages/order_pay_status/index.vue b/pages/order_pay_status/index.vue index fc6da8d..da96a6e 100644 --- a/pages/order_pay_status/index.vue +++ b/pages/order_pay_status/index.vue @@ -2,7 +2,7 @@ - + @@ -23,8 +23,10 @@ 支付方式 - 微信 - 支付宝 + 微信 + 支付宝 + 余额 @@ -35,12 +37,14 @@ 支付金额 {{order_pay_info.pay_price}} - + 赠送积分 {{order_pay_info.give_integral}} - + 失败原因 {{order_pay_info.pay_type==0 ? '余额不足':msg}} @@ -49,9 +53,11 @@ - - - + + + @@ -94,22 +100,32 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- - import {getPayOrder} from '@/api/order.js'; - import {openOrderSubscribe} from '@/utils/SubscribeMessage.js'; - import {mapGetters} from "vuex"; - import { toLogin } from '@/libs/login.js'; - import { HTTP_REQUEST_URL } from '@/config/app'; + import { + getPayOrder + } from '@/api/order.js'; + import { + openOrderSubscribe + } from '@/utils/SubscribeMessage.js'; + import { + mapGetters + } from "vuex"; + import { + toLogin + } from '@/libs/login.js'; + import { + HTTP_REQUEST_URL + } from '@/config/app'; export default { components: { - + }, filters: { - timeYMD: function (value) { - if(value){ - var newDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(value) + timeYMD: function(value) { + if (value) { + var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(value) return newDate[0] } - } + } }, data() { return { @@ -119,15 +135,15 @@ order_pay_info: {}, status: 0, msg: '', - couponList:[], //优惠券列表 - isOpen:false ,//展开 + couponList: [], //优惠券列表 + isOpen: false, //展开 moneyBg: '/static/images/couponBg', text: '展开更多', timer: null, payResult: '正在查询支付结果...' }; }, - computed: mapGetters(['isLogin','viewColor','keyColor']), + computed: mapGetters(['isLogin', 'viewColor', 'keyColor']), onLoad: function(options) { if (!options.order_id) return this.$util.Tips({ title: '缺少参数无法查看订单支付状态' @@ -143,20 +159,20 @@ this.refreshData(); } else { toLogin() - } + } }, - onHide: function(){ + onHide: function() { clearInterval(this.timer); this.timer = null; }, methods: { - refreshData(){ - this.timer = setInterval(()=>{ + refreshData() { + this.timer = setInterval(() => { this.getOrderPayInfo(); - },1000) + }, 1000) }, // 优惠券展开 - bindMore(){ + bindMore() { this.isOpen = !this.isOpen this.text = this.text == '展开更多' ? '收起' : '展开更多'; }, @@ -170,15 +186,15 @@ getPayOrder(that.orderId).then(res => { that.$set(that, 'order_pay_info', res.data); that.couponList = res.data.give_coupon - if(that.order_type == 20){ + if (that.order_type == 20) { that.payResult = res.data.paid == 1 ? '商品兑换成功' : '支付失败' - }else{ + } else { that.payResult = res.data.paid == 1 ? '支付成功' : '支付失败' } uni.setNavigationBarTitle({ title: res.data.paid == 1 ? '支付成功' : '支付失败' }); - if(res.data.paid == 1){ + if (res.data.paid == 1) { clearInterval(this.timer); this.timer = null; } @@ -206,20 +222,20 @@ */ goOrderDetails: function(e) { let that = this; - if(that.order_type == 20){ + if (that.order_type == 20) { uni.navigateTo({ url: '/pages/points_mall/exchange_record?delte=1' - }) - }else{ + }) + } else { if (that.order_pay_info.paid == 0) { uni.navigateTo({ url: '/pages/users/order_list/index' - }) - } else if(that.order_pay_info&&that.order_pay_info.orderList[0]['is_virtual'] == 2){ + }) + } else if (that.order_pay_info && that.order_pay_info.orderList[0]['is_virtual'] == 2) { uni.navigateTo({ url: '/pages/users/order_list/index?status=3' }) - }else { + } else { uni.navigateTo({ url: '/pages/users/order_list/index?status=1' }) @@ -245,6 +261,7 @@ border-radius: 10rpx; padding: 1rpx 0 28rpx 0; } + .payment-status .icon { font-size: 70rpx; width: 140rpx; @@ -256,19 +273,23 @@ border: 6rpx solid #f5f5f5; margin: -76rpx auto 0 auto; background-color: #999; - &.icon-duihao2{ + + &.icon-duihao2 { background-color: var(--view-theme); } } + .payment-status .icon.fail { text-shadow: 0px 4px 0px #7a7a7a; } + .payment-status .status { font-size: 32rpx; font-weight: bold; text-align: center; margin: 25rpx 0 37rpx 0; } + .payment-status .wrapper { border: 1px solid #eee; margin: 0 30rpx 47rpx 30rpx; @@ -276,16 +297,20 @@ border-left: 0; border-right: 0; } + .payment-status .wrapper .item { font-size: 28rpx; color: #282828; } + .payment-status .wrapper .item~.item { margin-top: 20rpx; } + .payment-status .wrapper .item .itemCom { color: #666; } + .payment-status .returnBnt { width: 630rpx; height: 86rpx; @@ -295,46 +320,56 @@ text-align: center; line-height: 86rpx; margin: 0 auto 20rpx auto; - &.gColor{ + + &.gColor { background-color: var(--view-theme); } - &.s-Color{ + + &.s-Color { color: var(--view-theme); - border: 1px solid var(--view-theme); + border: 1px solid var(--view-theme); } } + .t-color { - color: var(--view-theme)!important; + color: var(--view-theme) !important; } - .coupon-wrapper{ - .hd{ + + .coupon-wrapper { + .hd { display: flex; align-items: center; justify-content: center; margin: 30rpx 0; color: #999999; font-size: 24rpx; - .line{ + + .line { width: 70rpx; height: 1px; background: #DCDCDC; } - .txt{ + + .txt { margin: 0 20rpx; } } - .coupon-box{ + + .coupon-box { height: 356rpx; padding: 0 20rpx; overflow: hidden; - &.on{ + + &.on { height: auto; } - .coupon-item{ + + .coupon-item { width: 100%; margin-bottom: 20rpx; - box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.06); - .left-bg{ + box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06); + + .left-bg { display: flex; align-items: center; justify-content: center; @@ -342,40 +377,46 @@ height: 160rpx; color: #fff; font-size: 64rpx; - text{ + + text { margin-top: 26rpx; font-size: 36rpx; } } - .info{ + + .info { display: flex; flex-direction: column; justify-content: space-between; margin-left: 20rpx; padding: 20rpx 0; - .title{ + + .title { color: #282828; font-size: 30rpx; } - .des{ + + .des { font-size: 24rpx; color: #999999; } } } } - .more{ + + .more { display: flex; align-items: center; justify-content: center; padding-top: 24rpx; font-size: 24rpx; color: #999999; - .iconfont{ + + .iconfont { margin-top: 6rpx; margin-left: 10rpx; font-size: 20rpx; } } } - + \ No newline at end of file diff --git a/pages/payment/get_payment.vue b/pages/payment/get_payment.vue index 5f4fcab..8638768 100644 --- a/pages/payment/get_payment.vue +++ b/pages/payment/get_payment.vue @@ -45,7 +45,7 @@ - {{cartForm.total_amount||0}}元 确认支付 + {{Number(cartForm.total_amount||0).toFixed(2)}}元 确认支付 @@ -116,7 +116,6 @@ isAuto: false, //没有授权的不会自动授权 isShowAuth: false, //是否隐藏授权 mer_id: '', - tips: '暂未登陆~', changeTxt: '展开', isOpen: false, keyBoardShow: false, @@ -135,7 +134,6 @@ this.isAuto = true; this.isShowAuth = true; if (this.isWeixin) { - this.tips = '加载中...'; this.$nextTick(() => { this.$refs.authRef.toWecahtAuth(); }) @@ -153,7 +151,6 @@ this.isAuto = true; this.isShowAuth = true; if (this.isWeixin) { - this.tips = '加载中...'; this.$nextTick(() => { this.$refs.authRef.toWecahtAuth(); }) @@ -268,9 +265,10 @@ that.merchantInfo = res.data.list; } }).catch((err) => { - that.tips = err.message || err.smg || err; that.$util.Tips({ title: err.message || err.msg || err + }, () => { + }) // #ifdef APP setTimeout(() => { diff --git a/pages/store/settled/index.vue b/pages/store/settled/index.vue index 931aaf3..ff6e302 100644 --- a/pages/store/settled/index.vue +++ b/pages/store/settled/index.vue @@ -872,15 +872,23 @@ merchantLicenseIdentify({ image: res.data.path }).then(res => { - that.merchantData.address = res.data.address; - that.merchantData.user_name = res.data.legal_person; - that.merchantData.social_credit_code = res.data.register_number; - that.merchantData.company_name = res.data.name; - // that.$set('merchantData', that.merchantData); uni.hideLoading(); + if (res.status == 200) { + that.merchantData.address = res.data.address; + that.merchantData.user_name = res.data.legal_person; + that.merchantData.social_credit_code = res.data.register_number; + that.merchantData.company_name = res.data.name; + // that.$set('merchantData', that.merchantData); + } else { + that.$util.Tips({ + title: "识别失败!" + }) + } }).catch((e) => { uni.hideLoading(); - Toast(e) + that.$util.Tips({ + title: "识别失败" + }) }) }); }, diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index 4e0cc0a..b549a87 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -375,7 +375,7 @@ {{userInfo.now_money}} - {{moneyInfo.extract_money}} + {{moneyInfo.extract_money}} @@ -391,10 +391,10 @@ {{item.title}} - {{userInfo.now_money}} + {{userInfo.now_money}} - {{moneyInfo.extract_money}} + {{moneyInfo.extract_money}} @@ -481,6 +481,9 @@ + + + + \ No newline at end of file