1
This commit is contained in:
parent
149de63487
commit
f0d75a0ae0
240
api/api.js
240
api/api.js
@ -11,206 +11,274 @@ import request from "@/utils/request.js";
|
|||||||
/**
|
/**
|
||||||
* 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册
|
* 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* 获取主页数据 无需授权
|
* 获取主页数据 无需授权
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getIndexData()
|
export function getIndexData() {
|
||||||
{
|
return request.get("common/home", {}, {
|
||||||
return request.get("common/home",{},{ noAuth : true});
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取app版本
|
* 获取app版本
|
||||||
*/
|
*/
|
||||||
export function getAppVersion() {
|
export function getAppVersion() {
|
||||||
return request.get('appVersion',{},{noAuth:true});
|
return request.get('appVersion', {}, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取登录授权login
|
* 获取登录授权login
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getLogo()
|
export function getLogo() {
|
||||||
{
|
return request.get('wechat/get_logo', {}, {
|
||||||
return request.get('wechat/get_logo', {}, { noAuth : true});
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 保存form_id
|
* 保存form_id
|
||||||
* @param string formId
|
* @param string formId
|
||||||
*/
|
*/
|
||||||
export function setFormId(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
|
* @param int couponId
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function setCouponReceive(couponId){
|
export function setCouponReceive(couponId) {
|
||||||
return request.post('coupon/receive/'+couponId);
|
return request.post('coupon/receive/' + couponId);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 商铺优惠券列表
|
* 商铺优惠券列表
|
||||||
* @param object data
|
* @param object data
|
||||||
*/
|
*/
|
||||||
export function getShopCoupons(id){
|
export function getShopCoupons(id) {
|
||||||
return request.get('coupon/store/'+id,{},{ noAuth: true})
|
return request.get('coupon/store/' + id, {}, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 商品优惠券列表
|
* 商品优惠券列表
|
||||||
* @param object data
|
* @param object data
|
||||||
*/
|
*/
|
||||||
export function getCoupons(data){
|
export function getCoupons(data) {
|
||||||
return request.get('coupon/product',data,{ noAuth: true})
|
return request.get('coupon/product', data, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 我的优惠券
|
* 我的优惠券
|
||||||
* @param int types 0全部 1未使用 2已使用
|
* @param int types 0全部 1未使用 2已使用
|
||||||
*/
|
*/
|
||||||
export function getUserCoupons(data){
|
export function getUserCoupons(data) {
|
||||||
return request.get('coupon/list',data)
|
return request.get('coupon/list', data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 文章分类列表
|
* 文章分类列表
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getArticleCategoryList(){
|
export function getArticleCategoryList() {
|
||||||
return request.get('article/category/lst',{},{noAuth:true})
|
return request.get('article/category/lst', {}, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 文章列表
|
* 文章列表
|
||||||
* @param int cid
|
* @param int cid
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getArticleList(cid,data){
|
export function getArticleList(cid, data) {
|
||||||
return request.get('article/lst/' + cid, data,{noAuth:true})
|
return request.get('article/lst/' + cid, data, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 文章 热门列表
|
* 文章 热门列表
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getArticleHotList(){
|
export function getArticleHotList() {
|
||||||
return request.get('article/hot/list',{},{noAuth:true});
|
return request.get('article/hot/list', {}, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 文章 轮播列表
|
* 文章 轮播列表
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getArticleBannerList(){
|
export function getArticleBannerList() {
|
||||||
return request.get('article/banner/list',{},{noAuth:true})
|
return request.get('article/banner/list', {}, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 文章详情
|
* 文章详情
|
||||||
* @param int id
|
* @param int id
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getArticleDetails(id){
|
export function getArticleDetails(id) {
|
||||||
return request.get('article/detail/'+id,{},{noAuth:true});
|
return request.get('article/detail/' + id, {}, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 手机号+验证码登录接口
|
* 手机号+验证码登录接口
|
||||||
* @param object data
|
* @param object data
|
||||||
*/
|
*/
|
||||||
export function loginMobile(data){
|
export function loginMobile(data) {
|
||||||
return request.post('login/mobile',data,{noAuth:true})
|
return request.post('login/mobile', data, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取短信KEY
|
* 获取短信KEY
|
||||||
* @param object phone
|
* @param object phone
|
||||||
*/
|
*/
|
||||||
export function verifyCode(){
|
export function verifyCode() {
|
||||||
return request.get('verify_code', {},{noAuth:true})
|
return request.get('verify_code', {}, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 验证码发送
|
* 验证码发送
|
||||||
* @param object phone
|
* @param object phone
|
||||||
*/
|
*/
|
||||||
export function registerVerify(phone, reset, key, code){
|
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})
|
return request.post('register/verify', {
|
||||||
|
phone: phone,
|
||||||
|
type: reset === undefined ? 'reset' : reset,
|
||||||
|
key: key,
|
||||||
|
code: code
|
||||||
|
}, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 手机号注册
|
* 手机号注册
|
||||||
* @param object data
|
* @param object data
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function phoneRegister(data){
|
export function phoneRegister(data) {
|
||||||
return request.post('register',data,{noAuth:true});
|
return request.post('register', data, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 手机号修改密码
|
* 手机号修改密码
|
||||||
* @param object data
|
* @param object data
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function phoneRegisterReset(data){
|
export function phoneRegisterReset(data) {
|
||||||
return request.post('register/reset',data,{noAuth:true})
|
return request.post('register/reset', data, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 手机号+密码登录
|
* 手机号+密码登录
|
||||||
* @param object data
|
* @param object data
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function phoneLogin(data){
|
export function phoneLogin(data) {
|
||||||
return request.post('login',data,{noAuth:true})
|
return request.post('login', data, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/* h5切换公众号登陆 */
|
/* h5切换公众号登陆 */
|
||||||
export function switchH5Login(data) {
|
export function switchH5Login(data) {
|
||||||
return request.post("user/switch", data);
|
return request.post("user/switch", data);
|
||||||
}
|
}
|
||||||
/** 绑定手机号 */
|
/** 绑定手机号 */
|
||||||
export function bindingPhone(data){
|
export function bindingPhone(data) {
|
||||||
return request.post('user/binding',data);
|
return request.post('user/binding', data);
|
||||||
}
|
}
|
||||||
/** 修改手机号 */
|
/** 修改手机号 */
|
||||||
export function modifyPhone(data){
|
export function modifyPhone(data) {
|
||||||
return request.post('user/change/phone',data);
|
return request.post('user/change/phone', data);
|
||||||
}
|
}
|
||||||
/** 修改密码 */
|
/** 修改密码 */
|
||||||
export function modifyPassword(data){
|
export function modifyPassword(data) {
|
||||||
return request.post('user/change/password',data);
|
return request.post('user/change/password', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** 设置登录密码 */
|
||||||
|
export function setPayPwd(data) {
|
||||||
|
return request.post('User/set/withdrawal_pwd', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** 退出登錄 */
|
/** 退出登錄 */
|
||||||
export function logout(){
|
export function logout() {
|
||||||
return request.get('logout');
|
return request.get('logout');
|
||||||
}
|
}
|
||||||
/** 获取订阅消息id */
|
/** 获取订阅消息id */
|
||||||
export function getTemlIds(){
|
export function getTemlIds() {
|
||||||
return request.get('wechat/teml_ids', {}, { noAuth:true});
|
return request.get('wechat/teml_ids', {}, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/** 首页拼团数据 */
|
/** 首页拼团数据 */
|
||||||
export function pink(){
|
export function pink() {
|
||||||
return request.get('pink', {}, { noAuth:true});
|
return request.get('pink', {}, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/** 获取城市信息 */
|
/** 获取城市信息 */
|
||||||
export function getCity() {
|
export function getCity() {
|
||||||
return request.get('system/city/lst', { }, { noAuth: true });
|
return request.get('system/city/lst', {}, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
export function getCityV2(pid) {
|
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){
|
export function getCityList(address) {
|
||||||
return request.get('v2/system/city', {address}, {noAuth: true});
|
return request.get('v2/system/city', {
|
||||||
|
address
|
||||||
|
}, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/** 获取小程序直播列表 */
|
/** 获取小程序直播列表 */
|
||||||
export function getLiveList(page,limit) {
|
export function getLiveList(page, limit) {
|
||||||
return request.get('wechat/live', { page, limit}, { noAuth: true });
|
return request.get('wechat/live', {
|
||||||
|
page,
|
||||||
|
limit
|
||||||
|
}, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/* APP登录 */
|
/* APP登录 */
|
||||||
export function wechatAppAuth(data) {
|
export function wechatAppAuth(data) {
|
||||||
return request.post("auth/app", data, { noAuth: true });
|
return request.post("auth/app", data, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/* APPLE登录 */
|
/* APPLE登录 */
|
||||||
export function appleAppAuth(data) {
|
export function appleAppAuth(data) {
|
||||||
return request.post("auth/apple", data, { noAuth: true });
|
return request.post("auth/apple", data, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/* 小程序获取手机号解密 */
|
/* 小程序获取手机号解密 */
|
||||||
export function appletsDecrypt(data) {
|
export function appletsDecrypt(data) {
|
||||||
return request.post("user/mp/binding", data);
|
return request.post("user/mp/binding", data);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取首页DIY;
|
* 获取首页DIY;
|
||||||
*/
|
*/
|
||||||
export function getDiy(data) {
|
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
|
* @param {Object} data
|
||||||
*/
|
*/
|
||||||
export function getAssistData(data) {
|
export function getAssistData(data) {
|
||||||
return request.get("diy/assist",data, {
|
return request.get("diy/assist", data, {
|
||||||
noAuth: true
|
noAuth: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -297,7 +365,7 @@ export function getProductData(data) {
|
|||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
*/
|
*/
|
||||||
export function graphicLstData(data) {
|
export function graphicLstData(data) {
|
||||||
return request.get("diy/community",data, {
|
return request.get("diy/community", data, {
|
||||||
noAuth: true
|
noAuth: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -306,7 +374,7 @@ export function graphicLstData(data) {
|
|||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
*/
|
*/
|
||||||
export function storeList(data) {
|
export function storeList(data) {
|
||||||
return request.get("diy/store",data, {
|
return request.get("diy/store", data, {
|
||||||
noAuth: true
|
noAuth: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -352,7 +420,9 @@ export function getCateData(data) {
|
|||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
*/
|
*/
|
||||||
export function village(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
|
* @param {Object} data
|
||||||
*/
|
*/
|
||||||
export function brigade(data) {
|
export function brigade(data) {
|
||||||
return request.get('v2/system/brigade', data, { noAuth: true });
|
return request.get('v2/system/brigade', data, {
|
||||||
|
noAuth: true
|
||||||
|
});
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
<view :style="viewColor">
|
<view :style="viewColor">
|
||||||
<view class='payment-status'>
|
<view class='payment-status'>
|
||||||
<!--失败时: 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-->
|
<!--失败时: 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-->
|
||||||
<view class='iconfont icon-duihao2 icon' v-if ="order_pay_info.paid !=0"></view>
|
<view class='iconfont icon-duihao2 icon' v-if="order_pay_info.paid !=0"></view>
|
||||||
<view class='iconfont icon-iconfontguanbi icon' v-else></view>
|
<view class='iconfont icon-iconfontguanbi icon' v-else></view>
|
||||||
<!-- 失败时:订单支付失败 -->
|
<!-- 失败时:订单支付失败 -->
|
||||||
<!-- <view v-if="order_type== 20" class='status'>{{order_pay_info.paid == 1 ? '商品兑换成功' : order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success' ? '支付失败' : '未支付'}}</view> -->
|
<!-- <view v-if="order_type== 20" class='status'>{{order_pay_info.paid == 1 ? '商品兑换成功' : order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success' ? '支付失败' : '未支付'}}</view> -->
|
||||||
@ -23,8 +23,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-else class='item acea-row row-between-wrapper'>
|
<view v-else class='item acea-row row-between-wrapper'>
|
||||||
<view>支付方式</view>
|
<view>支付方式</view>
|
||||||
<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3" class='itemCom'>微信</view>
|
<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3"
|
||||||
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝</view>
|
class='itemCom'>微信</view>
|
||||||
|
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝
|
||||||
|
</view>
|
||||||
<view v-else class='itemCom'>余额</view>
|
<view v-else class='itemCom'>余额</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="order_type== 20" class='item acea-row row-between-wrapper'>
|
<view v-if="order_type== 20" class='item acea-row row-between-wrapper'>
|
||||||
@ -35,12 +37,14 @@
|
|||||||
<view>支付金额</view>
|
<view>支付金额</view>
|
||||||
<view class='itemCom'>{{order_pay_info.pay_price}}</view>
|
<view class='itemCom'>{{order_pay_info.pay_price}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="order_pay_info.give_integral > 0 && order_pay_info.paid" class='item acea-row row-between-wrapper'>
|
<view v-if="order_pay_info.give_integral > 0 && order_pay_info.paid"
|
||||||
|
class='item acea-row row-between-wrapper'>
|
||||||
<view>赠送积分</view>
|
<view>赠送积分</view>
|
||||||
<view class='itemCom t-color'>{{order_pay_info.give_integral}}</view>
|
<view class='itemCom t-color'>{{order_pay_info.give_integral}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!--失败时加上这个 -->
|
<!--失败时加上这个 -->
|
||||||
<view class='item acea-row row-between-wrapper' v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success'">
|
<view class='item acea-row row-between-wrapper'
|
||||||
|
v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success'">
|
||||||
<view>失败原因</view>
|
<view>失败原因</view>
|
||||||
<view class='itemCom'>{{order_pay_info.pay_type==0 ? '余额不足':msg}}</view>
|
<view class='itemCom'>{{order_pay_info.pay_type==0 ? '余额不足':msg}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -49,9 +53,11 @@
|
|||||||
<view @tap="goOrderDetails">
|
<view @tap="goOrderDetails">
|
||||||
<button formType="submit" class='returnBnt gColor' hover-class='none'>查看订单</button>
|
<button formType="submit" class='returnBnt gColor' hover-class='none'>查看订单</button>
|
||||||
</view>
|
</view>
|
||||||
<button @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit" hover-class='none' v-if="order_pay_info.activity_type == 4 && order_pay_info.paid">邀请好友参团</button>
|
<button @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit"
|
||||||
<button v-if="!order_pay_info.paid || order_pay_info.activity_type != 4" @click="goIndex" class='returnBnt s-Color' formType="submit" hover-class='none'>返回首页</button>
|
hover-class='none' v-if="order_pay_info.activity_type == 4 && order_pay_info.paid">邀请好友参团</button>
|
||||||
<view class="coupon-wrapper" v-if="couponList.length>0 && order_pay_info.paid">
|
<button v-if="!order_pay_info.paid || order_pay_info.activity_type != 4" @click="goIndex"
|
||||||
|
class='returnBnt s-Color' formType="submit" hover-class='none'>返回首页</button>
|
||||||
|
<!-- <view class="coupon-wrapper" v-if="couponList.length>0 && order_pay_info.paid">
|
||||||
<view class="hd">
|
<view class="hd">
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="txt">赠送优惠券</view>
|
<view class="txt">赠送优惠券</view>
|
||||||
@ -79,7 +85,7 @@
|
|||||||
<text v-if="!isOpen" class="iconfont icon-xiangxia"></text>
|
<text v-if="!isOpen" class="iconfont icon-xiangxia"></text>
|
||||||
<text v-else class="iconfont icon-xiangshang"></text>
|
<text v-else class="iconfont icon-xiangshang"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -94,22 +100,32 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
import {getPayOrder} from '@/api/order.js';
|
import {
|
||||||
import {openOrderSubscribe} from '@/utils/SubscribeMessage.js';
|
getPayOrder
|
||||||
import {mapGetters} from "vuex";
|
} from '@/api/order.js';
|
||||||
import { toLogin } from '@/libs/login.js';
|
import {
|
||||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
openOrderSubscribe
|
||||||
|
} from '@/utils/SubscribeMessage.js';
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from "vuex";
|
||||||
|
import {
|
||||||
|
toLogin
|
||||||
|
} from '@/libs/login.js';
|
||||||
|
import {
|
||||||
|
HTTP_REQUEST_URL
|
||||||
|
} from '@/config/app';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
timeYMD: function (value) {
|
timeYMD: function(value) {
|
||||||
if(value){
|
if (value) {
|
||||||
var newDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(value)
|
var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(value)
|
||||||
return newDate[0]
|
return newDate[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -119,15 +135,15 @@
|
|||||||
order_pay_info: {},
|
order_pay_info: {},
|
||||||
status: 0,
|
status: 0,
|
||||||
msg: '',
|
msg: '',
|
||||||
couponList:[], //优惠券列表
|
couponList: [], //优惠券列表
|
||||||
isOpen:false ,//展开
|
isOpen: false, //展开
|
||||||
moneyBg: '/static/images/couponBg',
|
moneyBg: '/static/images/couponBg',
|
||||||
text: '展开更多',
|
text: '展开更多',
|
||||||
timer: null,
|
timer: null,
|
||||||
payResult: '正在查询支付结果...'
|
payResult: '正在查询支付结果...'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin','viewColor','keyColor']),
|
computed: mapGetters(['isLogin', 'viewColor', 'keyColor']),
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
if (!options.order_id) return this.$util.Tips({
|
if (!options.order_id) return this.$util.Tips({
|
||||||
title: '缺少参数无法查看订单支付状态'
|
title: '缺少参数无法查看订单支付状态'
|
||||||
@ -145,18 +161,18 @@
|
|||||||
toLogin()
|
toLogin()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onHide: function(){
|
onHide: function() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refreshData(){
|
refreshData() {
|
||||||
this.timer = setInterval(()=>{
|
this.timer = setInterval(() => {
|
||||||
this.getOrderPayInfo();
|
this.getOrderPayInfo();
|
||||||
},1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
// 优惠券展开
|
// 优惠券展开
|
||||||
bindMore(){
|
bindMore() {
|
||||||
this.isOpen = !this.isOpen
|
this.isOpen = !this.isOpen
|
||||||
this.text = this.text == '展开更多' ? '收起' : '展开更多';
|
this.text = this.text == '展开更多' ? '收起' : '展开更多';
|
||||||
},
|
},
|
||||||
@ -170,15 +186,15 @@
|
|||||||
getPayOrder(that.orderId).then(res => {
|
getPayOrder(that.orderId).then(res => {
|
||||||
that.$set(that, 'order_pay_info', res.data);
|
that.$set(that, 'order_pay_info', res.data);
|
||||||
that.couponList = res.data.give_coupon
|
that.couponList = res.data.give_coupon
|
||||||
if(that.order_type == 20){
|
if (that.order_type == 20) {
|
||||||
that.payResult = res.data.paid == 1 ? '商品兑换成功' : '支付失败'
|
that.payResult = res.data.paid == 1 ? '商品兑换成功' : '支付失败'
|
||||||
}else{
|
} else {
|
||||||
that.payResult = res.data.paid == 1 ? '支付成功' : '支付失败'
|
that.payResult = res.data.paid == 1 ? '支付成功' : '支付失败'
|
||||||
}
|
}
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: res.data.paid == 1 ? '支付成功' : '支付失败'
|
title: res.data.paid == 1 ? '支付成功' : '支付失败'
|
||||||
});
|
});
|
||||||
if(res.data.paid == 1){
|
if (res.data.paid == 1) {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
}
|
}
|
||||||
@ -206,20 +222,20 @@
|
|||||||
*/
|
*/
|
||||||
goOrderDetails: function(e) {
|
goOrderDetails: function(e) {
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.order_type == 20){
|
if (that.order_type == 20) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/points_mall/exchange_record?delte=1'
|
url: '/pages/points_mall/exchange_record?delte=1'
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
if (that.order_pay_info.paid == 0) {
|
if (that.order_pay_info.paid == 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/users/order_list/index'
|
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({
|
uni.navigateTo({
|
||||||
url: '/pages/users/order_list/index?status=3'
|
url: '/pages/users/order_list/index?status=3'
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/users/order_list/index?status=1'
|
url: '/pages/users/order_list/index?status=1'
|
||||||
})
|
})
|
||||||
@ -245,6 +261,7 @@
|
|||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 1rpx 0 28rpx 0;
|
padding: 1rpx 0 28rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-status .icon {
|
.payment-status .icon {
|
||||||
font-size: 70rpx;
|
font-size: 70rpx;
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
@ -256,19 +273,23 @@
|
|||||||
border: 6rpx solid #f5f5f5;
|
border: 6rpx solid #f5f5f5;
|
||||||
margin: -76rpx auto 0 auto;
|
margin: -76rpx auto 0 auto;
|
||||||
background-color: #999;
|
background-color: #999;
|
||||||
&.icon-duihao2{
|
|
||||||
|
&.icon-duihao2 {
|
||||||
background-color: var(--view-theme);
|
background-color: var(--view-theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-status .icon.fail {
|
.payment-status .icon.fail {
|
||||||
text-shadow: 0px 4px 0px #7a7a7a;
|
text-shadow: 0px 4px 0px #7a7a7a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-status .status {
|
.payment-status .status {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 25rpx 0 37rpx 0;
|
margin: 25rpx 0 37rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-status .wrapper {
|
.payment-status .wrapper {
|
||||||
border: 1px solid #eee;
|
border: 1px solid #eee;
|
||||||
margin: 0 30rpx 47rpx 30rpx;
|
margin: 0 30rpx 47rpx 30rpx;
|
||||||
@ -276,16 +297,20 @@
|
|||||||
border-left: 0;
|
border-left: 0;
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-status .wrapper .item {
|
.payment-status .wrapper .item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-status .wrapper .item~.item {
|
.payment-status .wrapper .item~.item {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-status .wrapper .item .itemCom {
|
.payment-status .wrapper .item .itemCom {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-status .returnBnt {
|
.payment-status .returnBnt {
|
||||||
width: 630rpx;
|
width: 630rpx;
|
||||||
height: 86rpx;
|
height: 86rpx;
|
||||||
@ -295,46 +320,56 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 86rpx;
|
line-height: 86rpx;
|
||||||
margin: 0 auto 20rpx auto;
|
margin: 0 auto 20rpx auto;
|
||||||
&.gColor{
|
|
||||||
|
&.gColor {
|
||||||
background-color: var(--view-theme);
|
background-color: var(--view-theme);
|
||||||
}
|
}
|
||||||
&.s-Color{
|
|
||||||
|
&.s-Color {
|
||||||
color: var(--view-theme);
|
color: var(--view-theme);
|
||||||
border: 1px solid var(--view-theme);
|
border: 1px solid var(--view-theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-color {
|
.t-color {
|
||||||
color: var(--view-theme)!important;
|
color: var(--view-theme) !important;
|
||||||
}
|
}
|
||||||
.coupon-wrapper{
|
|
||||||
.hd{
|
.coupon-wrapper {
|
||||||
|
.hd {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
.line{
|
|
||||||
|
.line {
|
||||||
width: 70rpx;
|
width: 70rpx;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: #DCDCDC;
|
background: #DCDCDC;
|
||||||
}
|
}
|
||||||
.txt{
|
|
||||||
|
.txt {
|
||||||
margin: 0 20rpx;
|
margin: 0 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.coupon-box{
|
|
||||||
|
.coupon-box {
|
||||||
height: 356rpx;
|
height: 356rpx;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
&.on{
|
|
||||||
|
&.on {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
.coupon-item{
|
|
||||||
|
.coupon-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.06);
|
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06);
|
||||||
.left-bg{
|
|
||||||
|
.left-bg {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -342,36 +377,42 @@
|
|||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 64rpx;
|
font-size: 64rpx;
|
||||||
text{
|
|
||||||
|
text {
|
||||||
margin-top: 26rpx;
|
margin-top: 26rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info{
|
|
||||||
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
color: #282828;
|
color: #282828;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
.des{
|
|
||||||
|
.des {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.more{
|
|
||||||
|
.more {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top: 24rpx;
|
padding-top: 24rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
.iconfont{
|
|
||||||
|
.iconfont {
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="v-btn-wrap" @click="cartForm.total_amount?submitOrder():null">
|
<view class="v-btn-wrap" @click="cartForm.total_amount?submitOrder():null">
|
||||||
<view class="v-btn">{{cartForm.total_amount||0}}元 确认支付</view>
|
<view class="v-btn">{{Number(cartForm.total_amount||0).toFixed(2)}}元 确认支付</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 登陆 -->
|
<!-- 登陆 -->
|
||||||
@ -116,7 +116,6 @@
|
|||||||
isAuto: false, //没有授权的不会自动授权
|
isAuto: false, //没有授权的不会自动授权
|
||||||
isShowAuth: false, //是否隐藏授权
|
isShowAuth: false, //是否隐藏授权
|
||||||
mer_id: '',
|
mer_id: '',
|
||||||
tips: '暂未登陆~',
|
|
||||||
changeTxt: '展开',
|
changeTxt: '展开',
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
keyBoardShow: false,
|
keyBoardShow: false,
|
||||||
@ -135,7 +134,6 @@
|
|||||||
this.isAuto = true;
|
this.isAuto = true;
|
||||||
this.isShowAuth = true;
|
this.isShowAuth = true;
|
||||||
if (this.isWeixin) {
|
if (this.isWeixin) {
|
||||||
this.tips = '加载中...';
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.authRef.toWecahtAuth();
|
this.$refs.authRef.toWecahtAuth();
|
||||||
})
|
})
|
||||||
@ -153,7 +151,6 @@
|
|||||||
this.isAuto = true;
|
this.isAuto = true;
|
||||||
this.isShowAuth = true;
|
this.isShowAuth = true;
|
||||||
if (this.isWeixin) {
|
if (this.isWeixin) {
|
||||||
this.tips = '加载中...';
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.authRef.toWecahtAuth();
|
this.$refs.authRef.toWecahtAuth();
|
||||||
})
|
})
|
||||||
@ -268,9 +265,10 @@
|
|||||||
that.merchantInfo = res.data.list;
|
that.merchantInfo = res.data.list;
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
that.tips = err.message || err.smg || err;
|
|
||||||
that.$util.Tips({
|
that.$util.Tips({
|
||||||
title: err.message || err.msg || err
|
title: err.message || err.msg || err
|
||||||
|
}, () => {
|
||||||
|
|
||||||
})
|
})
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -872,15 +872,23 @@
|
|||||||
merchantLicenseIdentify({
|
merchantLicenseIdentify({
|
||||||
image: res.data.path
|
image: res.data.path
|
||||||
}).then(res => {
|
}).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();
|
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) => {
|
}).catch((e) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
Toast(e)
|
that.$util.Tips({
|
||||||
|
title: "识别失败"
|
||||||
|
})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -375,7 +375,7 @@
|
|||||||
{{userInfo.now_money}}
|
{{userInfo.now_money}}
|
||||||
</block>
|
</block>
|
||||||
<block v-else-if="item.value == 'merBalance'">
|
<block v-else-if="item.value == 'merBalance'">
|
||||||
{{moneyInfo.extract_money}}
|
{{moneyInfo.extract_money}}
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -391,10 +391,10 @@
|
|||||||
<view class='tip'>
|
<view class='tip'>
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
<block v-if="item.value == 'balance'">
|
<block v-if="item.value == 'balance'">
|
||||||
{{userInfo.now_money}}
|
{{userInfo.now_money}}
|
||||||
</block>
|
</block>
|
||||||
<block v-else-if="item.value == 'merBalance'">
|
<block v-else-if="item.value == 'merBalance'">
|
||||||
{{moneyInfo.extract_money}}
|
{{moneyInfo.extract_money}}
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -481,6 +481,9 @@
|
|||||||
<timeranges :isShow='isShow' :time='timeranges' @confrim="confrim" @cancel="cancels"></timeranges>
|
<timeranges :isShow='isShow' :time='timeranges' @confrim="confrim" @cancel="cancels"></timeranges>
|
||||||
<areaWindow ref="areaWindow" :display="display" :address='addressInfoArea' :cityShow='cityShow'
|
<areaWindow ref="areaWindow" :display="display" :address='addressInfoArea' :cityShow='cityShow'
|
||||||
@submit="OnAreaAddress" @changeClose="changeAddressClose"></areaWindow>
|
@submit="OnAreaAddress" @changeClose="changeAddressClose"></areaWindow>
|
||||||
|
|
||||||
|
<!-- 支付密码 -->
|
||||||
|
<!-- <popups></popups> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -508,7 +511,7 @@
|
|||||||
getAddressDetail,
|
getAddressDetail,
|
||||||
getAddressList,
|
getAddressList,
|
||||||
getUserInfo,
|
getUserInfo,
|
||||||
getAdminApplyAPI,
|
getAdminApplyAPI,
|
||||||
getAgreementApi
|
getAgreementApi
|
||||||
} from '@/api/user.js';
|
} from '@/api/user.js';
|
||||||
import {
|
import {
|
||||||
@ -549,6 +552,7 @@
|
|||||||
import dayjs from "@/plugin/dayjs/dayjs.min.js";
|
import dayjs from "@/plugin/dayjs/dayjs.min.js";
|
||||||
import areaWindow from '@/components/areaWindow';
|
import areaWindow from '@/components/areaWindow';
|
||||||
import timeranges from '@/components/timeranges';
|
import timeranges from '@/components/timeranges';
|
||||||
|
import popups from "@/components/popups/index.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
couponListWindow,
|
couponListWindow,
|
||||||
@ -559,7 +563,8 @@
|
|||||||
discountDetails,
|
discountDetails,
|
||||||
"jyf-parser": parser,
|
"jyf-parser": parser,
|
||||||
areaWindow,
|
areaWindow,
|
||||||
timeranges
|
timeranges,
|
||||||
|
popups
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
filterDay(val) {
|
filterDay(val) {
|
||||||
@ -603,13 +608,13 @@
|
|||||||
title: '可用余额:',
|
title: '可用余额:',
|
||||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "商户余额",
|
"name": "商户余额",
|
||||||
"icon": "icon-yue2",
|
"icon": "icon-yue2",
|
||||||
value: 'merBalance',
|
value: 'merBalance',
|
||||||
title: '可用余额:',
|
title: '可用余额:',
|
||||||
payStatus: 2,
|
payStatus: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "线下支付",
|
"name": "线下支付",
|
||||||
"icon": "icon-yinhangqia",
|
"icon": "icon-yinhangqia",
|
||||||
@ -617,7 +622,7 @@
|
|||||||
title: '线下支付',
|
title: '线下支付',
|
||||||
payStatus: 2,
|
payStatus: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "对公转账",
|
"name": "对公转账",
|
||||||
"icon": "icon-yinhangqia",
|
"icon": "icon-yinhangqia",
|
||||||
value: 'public',
|
value: 'public',
|
||||||
@ -629,8 +634,7 @@
|
|||||||
img: 'width:100%;display:block;',
|
img: 'width:100%;display:block;',
|
||||||
video: 'width:100%;'
|
video: 'width:100%;'
|
||||||
},
|
},
|
||||||
radioList: [
|
radioList: [{
|
||||||
{
|
|
||||||
title: this.deliveryName,
|
title: this.deliveryName,
|
||||||
check: true
|
check: true
|
||||||
},
|
},
|
||||||
@ -744,7 +748,7 @@
|
|||||||
addressInfoArea: [],
|
addressInfoArea: [],
|
||||||
timeranges: [],
|
timeranges: [],
|
||||||
isShow: false,
|
isShow: false,
|
||||||
moneyInfo: {}
|
moneyInfo: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -895,13 +899,14 @@
|
|||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
this.userInfo = res.data;
|
this.userInfo = res.data;
|
||||||
//获取账户金额以及冻结金额 重新调了一次接口
|
//获取账户金额以及冻结金额 重新调了一次接口
|
||||||
if(this.userInfo.service&&this.userInfo.service.mer_id) getAdminApplyAPI(this.userInfo.service.mer_id).then(res => {
|
if (this.userInfo.service && this.userInfo.service.mer_id) getAdminApplyAPI(this.userInfo
|
||||||
this.moneyInfo = res.data;
|
.service.mer_id).then(res => {
|
||||||
this.cartArr.forEach(item=>{
|
this.moneyInfo = res.data;
|
||||||
if(item.value=='merBalance') item.payStatus=1;
|
this.cartArr.forEach(item => {
|
||||||
})
|
if (item.value == 'merBalance') item.payStatus = 1;
|
||||||
})
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/*获取发票说明*/
|
/*获取发票说明*/
|
||||||
@ -1704,7 +1709,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.order_form = []; // 取消表单
|
this.order_form = []; // 取消表单
|
||||||
for (var i = 0; i < that.order_form.length; i++) {
|
for (var i = 0; i < that.order_form.length; i++) {
|
||||||
let curdata = that.order_form[i]
|
let curdata = that.order_form[i]
|
||||||
if (['radios'].indexOf(curdata.name) == -1 && (curdata.titleShow.val || (['uploadPicture',
|
if (['radios'].indexOf(curdata.name) == -1 && (curdata.titleShow.val || (['uploadPicture',
|
||||||
@ -1802,11 +1807,18 @@
|
|||||||
data.takes.push(el.mer_id)
|
data.takes.push(el.mer_id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
|
if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
|
||||||
return that.$util
|
return that.$util.Tips({
|
||||||
.Tips({
|
title: '余额不足!'
|
||||||
title: '余额不足!'
|
});
|
||||||
});
|
|
||||||
|
// 设置支付密码
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '订单支付中',
|
title: '订单支付中',
|
||||||
mask: true
|
mask: true
|
||||||
|
@ -91,6 +91,16 @@
|
|||||||
<text class='iconfont icon-you'></text>
|
<text class='iconfont icon-you'></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class='item acea-row row-between-wrapper'>
|
||||||
|
<view>支付提现密码</view>
|
||||||
|
<view class='input acea-row row-between-wrapper' @click="changePayPwd">
|
||||||
|
<text class='id'>修改支付提现密码</text>
|
||||||
|
<text class='iconfont icon-you'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class='item acea-row row-between-wrapper'>
|
<view class='item acea-row row-between-wrapper'>
|
||||||
<view>填写邀请码</view>
|
<view>填写邀请码</view>
|
||||||
<view class='input acea-row row-between-wrapper' @click="showPopup">
|
<view class='input acea-row row-between-wrapper' @click="showPopup">
|
||||||
@ -380,7 +390,7 @@
|
|||||||
let that = this;
|
let that = this;
|
||||||
if (that.userInfo.phone) {
|
if (that.userInfo.phone) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/users/user_modify_pwd/index`
|
url: `/pages/users/user_modify_pwd/index?type=loginPwd`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
that.$util.Tips({
|
that.$util.Tips({
|
||||||
@ -388,6 +398,21 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 修改支付提现密码
|
||||||
|
changePayPwd() {
|
||||||
|
let that = this;
|
||||||
|
if (that.userInfo.phone) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/users/user_modify_pwd/index?type=payPwd`
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.$util.Tips({
|
||||||
|
title: '请先绑定手机号'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
showPopup() {
|
showPopup() {
|
||||||
if (this.promotion_code) return Toast('已经填写过了');
|
if (this.promotion_code) return Toast('已经填写过了');
|
||||||
this.$refs.popup.open();
|
this.$refs.popup.open();
|
||||||
|
@ -8,24 +8,29 @@
|
|||||||
<text class="phone">{{userInfo.phone}}</text>
|
<text class="phone">{{userInfo.phone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between-wrapper codeVal">
|
<view class="item acea-row row-between-wrapper codeVal">
|
||||||
<input type='number' placeholder='验证码' placeholder-class='placeholder' class="codeIput" v-model="captcha"></input>
|
<input type='number' placeholder='验证码' placeholder-class='placeholder' class="codeIput"
|
||||||
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled' @click="handleVerify">
|
v-model="captcha"></input>
|
||||||
|
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled'
|
||||||
|
@click="handleVerify">
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="border"></view>
|
<view class="border"></view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<input type='password' placeholder='新密码' placeholder-class='placeholder' v-model="password" autocomplete="off"></input>
|
<input type='password' :placeholder="type == 'payPwd'?'请设置支付密码':'新密码'"
|
||||||
|
placeholder-class='placeholder' v-model="password" autocomplete="off"></input>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<input type='password' placeholder='确认新密码' placeholder-class='placeholder' v-model="repassword" autocomplete="off"></input>
|
<input type='password' :placeholder="type == 'payPwd'?'请再次设置支付密码':'新密码'"
|
||||||
|
placeholder-class='placeholder' v-model="repassword" autocomplete="off"></input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button form-type="submit" @click="confirmSubmit" class="confirmBnt">确认</button>
|
<button form-type="submit" @click="confirmSubmit" class="confirmBnt">确认</button>
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
|
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }"
|
||||||
|
ref="verify"></Verify>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -40,32 +45,47 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||||
import { modifyPassword, verifyCode, appletsDecrypt } from '@/api/api.js';
|
import {
|
||||||
import { getUserInfo } from '@/api/user.js';
|
modifyPassword,
|
||||||
import { registerVerify } from '@/api/user.js'
|
verifyCode,
|
||||||
import { mapGetters } from "vuex";
|
appletsDecrypt,
|
||||||
import { toLogin } from '@/libs/login.js';
|
setPayPwd
|
||||||
import Verify from '@/components/verify/verify.vue';
|
} from '@/api/api.js';
|
||||||
|
import {
|
||||||
|
getUserInfo
|
||||||
|
} from '@/api/user.js';
|
||||||
|
import {
|
||||||
|
registerVerify
|
||||||
|
} from '@/api/user.js'
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from "vuex";
|
||||||
|
import {
|
||||||
|
toLogin
|
||||||
|
} from '@/libs/login.js';
|
||||||
|
import Verify from '@/components/verify/verify.vue';
|
||||||
export default {
|
export default {
|
||||||
mixins: [sendVerifyCode],
|
mixins: [sendVerifyCode],
|
||||||
components: {
|
components: {
|
||||||
Verify
|
Verify
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
phone:'',
|
phone: '',
|
||||||
repassword: '',
|
repassword: '',
|
||||||
password: '',
|
password: '',
|
||||||
captcha:'',
|
captcha: '',
|
||||||
key: '',
|
key: '',
|
||||||
codeVal: '',
|
codeVal: '',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
type: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin', 'viewColor']),
|
computed: mapGetters(['isLogin', 'viewColor']),
|
||||||
onLoad() {
|
onLoad(opt) {
|
||||||
let that = this
|
let that = this
|
||||||
|
this.type = opt.type;
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
} else {
|
} else {
|
||||||
@ -73,13 +93,13 @@
|
|||||||
}
|
}
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
wx.login({
|
wx.login({
|
||||||
success (res) {
|
success(res) {
|
||||||
if (res.code) {
|
if (res.code) {
|
||||||
that.codeVal = res.code
|
that.codeVal = res.code
|
||||||
} else {
|
} else {
|
||||||
console.log('登录失败!' + res.errMsg)
|
console.log('登录失败!' + res.errMsg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
@ -93,6 +113,7 @@
|
|||||||
that.userInfo = res.data
|
that.userInfo = res.data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
confirmSubmit: function() {
|
confirmSubmit: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (!that.password) return that.$util.Tips({
|
if (!that.password) return that.$util.Tips({
|
||||||
@ -107,23 +128,40 @@
|
|||||||
if (!that.captcha) return that.$util.Tips({
|
if (!that.captcha) return that.$util.Tips({
|
||||||
title: '请填写验证码'
|
title: '请填写验证码'
|
||||||
});
|
});
|
||||||
modifyPassword({
|
|
||||||
password: that.password,
|
if (this.type == 'payPwd') { //支付提现密码
|
||||||
repassword: that.repassword,
|
setPayPwd({
|
||||||
sms_code: that.captcha
|
password: that.password,
|
||||||
}).then(res => {
|
repassword: that.repassword,
|
||||||
return that.$util.Tips({
|
sms_code: that.captcha
|
||||||
title: '修改成功!',
|
}).then(res => {
|
||||||
icon: 'success'
|
return that.$util.Tips({
|
||||||
}, {
|
title: '设置成功!',
|
||||||
tab: 5,
|
icon: 'success'
|
||||||
url: '/pages/users/user_info/index'
|
}, {
|
||||||
});
|
tab: 5,
|
||||||
}).catch(err => {
|
url: '/pages/users/user_info/index'
|
||||||
return that.$util.Tips({
|
});
|
||||||
title: err
|
})
|
||||||
});
|
} else { // 登录密码
|
||||||
})
|
modifyPassword({
|
||||||
|
password: that.password,
|
||||||
|
repassword: that.repassword,
|
||||||
|
sms_code: that.captcha
|
||||||
|
}).then(res => {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '修改成功!',
|
||||||
|
icon: 'success'
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: '/pages/users/user_info/index'
|
||||||
|
});
|
||||||
|
}).catch(err => {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: err
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 发送验证码
|
* 发送验证码
|
||||||
@ -136,10 +174,10 @@
|
|||||||
// });
|
// });
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
await registerVerify({
|
await registerVerify({
|
||||||
phone:that.userInfo.phone,
|
phone: that.userInfo.phone,
|
||||||
code:that.captcha,
|
code: that.captcha,
|
||||||
type: 'change_pwd',
|
type: 'change_pwd',
|
||||||
captchaType: 'blockPuzzle',
|
captchaType: 'blockPuzzle',
|
||||||
captchaVerification: data.captchaVerification
|
captchaVerification: data.captchaVerification
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
@ -154,7 +192,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
success(data) {
|
success(data) {
|
||||||
this.$refs.verify.hide();
|
this.$refs.verify.hide();
|
||||||
this.code(data);
|
this.code(data);
|
||||||
},
|
},
|
||||||
@ -166,10 +204,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.ChangePassword{
|
.ChangePassword {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding-top: 53rpx;
|
padding-top: 53rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ChangePassword .phone {
|
.ChangePassword .phone {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
@ -188,7 +227,8 @@
|
|||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
/deep/.uni-input-input{
|
|
||||||
|
/deep/.uni-input-input {
|
||||||
// box-shadow: inset 0 0 0 0 #fff;
|
// box-shadow: inset 0 0 0 0 #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +245,8 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 26rpx;
|
padding-left: 26rpx;
|
||||||
color: var(--view-theme);
|
color: var(--view-theme);
|
||||||
&::before{
|
|
||||||
|
&::before {
|
||||||
content: "";
|
content: "";
|
||||||
width: 1rpx;
|
width: 1rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
@ -216,14 +257,17 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ChangePassword .list .item .code.on {
|
.ChangePassword .list .item .code.on {
|
||||||
color: #b9b9bc !important;
|
color: #b9b9bc !important;
|
||||||
}
|
}
|
||||||
.ChangePassword .list .border{
|
|
||||||
|
.ChangePassword .list .border {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 21rpx;
|
height: 21rpx;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirmBnt {
|
.confirmBnt {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
width: 580rpx;
|
width: 580rpx;
|
||||||
@ -235,7 +279,8 @@
|
|||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
background-color: var(--view-theme);
|
background-color: var(--view-theme);
|
||||||
}
|
}
|
||||||
.getPhoneBtn{
|
|
||||||
|
.getPhoneBtn {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
width: 580rpx;
|
width: 580rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
@ -245,7 +290,8 @@
|
|||||||
margin: 40rpx auto 0 auto;
|
margin: 40rpx auto 0 auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
.iconfont{
|
|
||||||
|
.iconfont {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user