mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-23 12:08:33 +08:00
更新代码
This commit is contained in:
@@ -67,13 +67,13 @@
|
||||
<view v-else>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>联系人</view>
|
||||
<view class="discount">
|
||||
<view class="discount textR">
|
||||
<input type="text" placeholder="请填写您的联系姓名" placeholder-class="placeholder" @blur='realName'></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>联系电话</view>
|
||||
<view class="discount">
|
||||
<view class="discount textR">
|
||||
<input type="text" placeholder="请填写您的联系电话" placeholder-class="placeholder" @blur='phone'></input>
|
||||
</view>
|
||||
</view>
|
||||
@@ -650,43 +650,6 @@
|
||||
title: err
|
||||
});
|
||||
});
|
||||
// orderCreate(that.orderKey, data).then(res => {
|
||||
// let result = res.data.result,
|
||||
// status = res.data.status,
|
||||
// orderId = result.orderId,
|
||||
// jsConfig = res.data.jsConfig,
|
||||
// message = res.data.message;
|
||||
// if(that.totalPrice===0)return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// });
|
||||
// if(that.news == "false"){
|
||||
// orderPay({
|
||||
// 'paytype': that.payType,
|
||||
// 'uni':res.data.result.key,
|
||||
// // #ifdef MP
|
||||
// 'from': 'routine',
|
||||
// // #endif
|
||||
// // #ifdef H5 || APP-PLUS
|
||||
// 'from': this.$wechat.isWeixin() ? 'public' : 'weixinh5',
|
||||
// // #endif
|
||||
// }).then(res=>{
|
||||
// result = res.data.result;
|
||||
// status = res.data.status;
|
||||
// orderId = result.orderId;
|
||||
// jsConfig = res.data.jsConfig;
|
||||
// message = res.data.message;
|
||||
// that.getPayType(status,orderId,message,jsConfig);
|
||||
// })
|
||||
// }else{
|
||||
// that.getPayType(status,orderId,message,jsConfig);
|
||||
// }
|
||||
// }).catch(err => {
|
||||
// uni.hideLoading();
|
||||
// return that.$util.Tips({
|
||||
// title: err
|
||||
// });
|
||||
// });
|
||||
},
|
||||
getOrderPay: function(orderNo, message) {
|
||||
let that = this;
|
||||
@@ -783,7 +746,14 @@
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
}).cache(res => {
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '&status=0'
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
break;
|
||||
case 'yue':
|
||||
@@ -795,18 +765,19 @@
|
||||
url: goPages + '&status=1'
|
||||
});
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
that.$util.Tips({
|
||||
title: '订单创建成功'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '&status=0'
|
||||
});
|
||||
setTimeout(() => {
|
||||
location.href = jsConfig.mwebUrl;
|
||||
}, 100)
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
that.$util.Tips({
|
||||
title: '订单创建成功'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '&status=0'
|
||||
});
|
||||
setTimeout(() => {
|
||||
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host +
|
||||
goPages + '&status=1';
|
||||
}, 100)
|
||||
break;
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
@@ -1008,21 +979,25 @@
|
||||
uni.showLoading({
|
||||
title: '订单支付中'
|
||||
});
|
||||
// // #ifdef MP
|
||||
// openPaySubscribe().then(() => {
|
||||
// that.payment(data);
|
||||
// });
|
||||
// // #endif
|
||||
// // #ifndef MP
|
||||
// that.payment(data);
|
||||
// // #endif
|
||||
// #ifdef MP
|
||||
openPaySubscribe().then(() => {
|
||||
that.payment(data);
|
||||
});
|
||||
// #endif
|
||||
// #ifndef MP
|
||||
that.payment(data);
|
||||
// #endif
|
||||
// that.payment(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.textR {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.order-submission .line {
|
||||
width: 100%;
|
||||
height: 3rpx;
|
||||
|
||||
@@ -95,7 +95,10 @@
|
||||
multiIndex: [0, 0, 0],
|
||||
cityId: 0,
|
||||
defaultRegion: ['广东省', '广州市', '番禺区'],
|
||||
defaultRegionCode: '440113'
|
||||
defaultRegionCode: '440113',
|
||||
bargain: false, //是否是砍价
|
||||
combination: false, //是否是拼团
|
||||
secKill: false //是否是秒杀
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
@@ -105,6 +108,9 @@
|
||||
this.pinkId = options.pinkId || 0;
|
||||
this.couponId = options.couponId || 0;
|
||||
this.id = options.id || 0;
|
||||
this.secKill = options.secKill || false;
|
||||
this.combination = options.combination || false;
|
||||
this.bargain = options.bargain || false;
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.id ? '修改地址' : '添加地址'
|
||||
})
|
||||
@@ -271,7 +277,7 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
|
||||
res.data
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
});
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
@@ -346,7 +352,7 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
|
||||
res.data
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
@@ -427,7 +433,7 @@
|
||||
that.pinkId = '';
|
||||
that.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data.id) +'&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data.id) +'&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
});
|
||||
} else {
|
||||
// #ifdef H5
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
this.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' +
|
||||
couponId
|
||||
couponId + '&secKill' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -343,7 +343,7 @@
|
||||
this.pinkId = '';
|
||||
this.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
|
||||
})
|
||||
},
|
||||
goOrder: function(id) {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view>
|
||||
<view class='bill-details'>
|
||||
<view class='nav acea-row'>
|
||||
<view class='item' :class='type==0 ? "on":""' @click='changeType(0)'>全部</view>
|
||||
<view class='item' :class='type==1 ? "on":""' @click='changeType(1)'>支出</view>
|
||||
<view class='item' :class='type==2 ? "on":""' @click='changeType(2)'>收入</view>
|
||||
<view class='item' :class='type==="all" ? "on":""' @click='changeType("all")'>全部</view>
|
||||
<view class='item' :class='type==="expenditure" ? "on":""' @click='changeType("expenditure")'>支出</view>
|
||||
<view class='item' :class='type==="income" ? "on":""' @click='changeType("income")'>收入</view>
|
||||
</view>
|
||||
<view class='sign-record'>
|
||||
<view class='list' v-for="(item,index) in userBillList" :key="index">
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCommissionInfo
|
||||
getBillList
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
toLogin
|
||||
@@ -67,7 +67,7 @@
|
||||
loadend: false,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
type: 0,
|
||||
type: 'all',
|
||||
userBillList: [],
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false //是否隐藏授权
|
||||
@@ -91,7 +91,7 @@
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function(options) {
|
||||
this.type = options.type || 0;
|
||||
this.type = options.type;
|
||||
},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
@@ -121,9 +121,10 @@
|
||||
that.loadTitle = "";
|
||||
let data = {
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
limit: that.limit,
|
||||
type: that.type
|
||||
}
|
||||
getCommissionInfo(data, that.type).then(function(res) {
|
||||
getBillList(data).then(function(res) {
|
||||
let list = res.data.list?res.data.list:[],
|
||||
loadend = list.length < that.limit;
|
||||
that.userBillList = that.$util.SplitArray(list, that.userBillList);
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
//领取优惠券
|
||||
setCouponReceive(ids).then(function (res) {
|
||||
setCouponReceive(id).then(function (res) {
|
||||
list[index].isUse = true;
|
||||
that.$set(that,'couponsList',list);
|
||||
that.$util.Tips({ title: '领取成功' });
|
||||
|
||||
@@ -37,19 +37,19 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class='nav acea-row row-middle'>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index'>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=all'>
|
||||
<view class='pictrue'>
|
||||
<image src='../../../static/images/record1.png'></image>
|
||||
</view>
|
||||
<view>账单记录</view>
|
||||
</navigator>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=1'>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=expenditure'>
|
||||
<view class='pictrue'>
|
||||
<image src='../../../static/images/record2.png'></image>
|
||||
</view>
|
||||
<view>消费记录</view>
|
||||
</navigator>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2' v-if="rechargeSwitch">
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=income' v-if="rechargeSwitch">
|
||||
<view class='pictrue'>
|
||||
<image src='../../../static/images/record3.png'></image>
|
||||
</view>
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
extractBank,
|
||||
transferIn
|
||||
} from '@/api/user.js';
|
||||
import { wechatQueryPayResult } from '@/api/order.js';
|
||||
import {
|
||||
toLogin
|
||||
} from '@/libs/login.js';
|
||||
@@ -251,12 +252,11 @@
|
||||
rechar_id: this.rechar_id
|
||||
}).then(res => {
|
||||
uni.hideLoading();
|
||||
let jsConfig = res.data.data;
|
||||
let packages = 'prepay_id=' + jsConfig.prepayId;
|
||||
let jsConfig = res.data.data.jsConfig;
|
||||
uni.requestPayment({
|
||||
timeStamp: jsConfig.timeStamp.toString(),
|
||||
timeStamp: jsConfig.timeStamp,
|
||||
nonceStr: jsConfig.nonceStr,
|
||||
package: packages,
|
||||
package: jsConfig.packages,
|
||||
signType: jsConfig.signType,
|
||||
paySign: jsConfig.paySign,
|
||||
success: function(res) {
|
||||
@@ -294,38 +294,49 @@
|
||||
rechar_id: that.rechar_id,
|
||||
payType: 0
|
||||
}).then(res => {
|
||||
let jsConfig = res.data;
|
||||
let packages = 'prepay_id=' + jsConfig.prepayId;
|
||||
let jsConfig = res.data.jsConfig;
|
||||
let orderNo = res.data.orderNo;
|
||||
let data = {
|
||||
timestamp:jsConfig.timeStamp,
|
||||
nonceStr:jsConfig.nonceStr,
|
||||
package:packages,
|
||||
package:jsConfig.packages,
|
||||
signType:jsConfig.signType,
|
||||
paySign:jsConfig.paySign,
|
||||
h5PayUrl:jsConfig.h5PayUrl
|
||||
paySign:jsConfig.paySign
|
||||
};
|
||||
if (that.from == "weixinh5") {
|
||||
let domain = encodeURIComponent(location.href.split('/pages')[0]);
|
||||
let urls = data.h5PayUrl + '&redirect_url='+ domain + '/pages/users/user_money/index';
|
||||
let urls = jsConfig.mwebUrl + '&redirect_url='+ domain + '/pages/users/user_money/index';
|
||||
location.replace(urls);
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: '/pages/users/user_money/index'
|
||||
});
|
||||
// return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: '/pages/users/user_money/index'
|
||||
// });
|
||||
} else {
|
||||
that.$wechat.pay(data)
|
||||
.finally(() => {
|
||||
that.$set(that, 'userinfo.nowMoney', that.$util.$h.Add(value, that.userinfo.nowMoney));
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: '/pages/users/user_money/index'
|
||||
});
|
||||
wechatQueryPayResult({
|
||||
orderNo: orderNo
|
||||
}).then(res => {
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: '/pages/users/user_money/index'
|
||||
});
|
||||
}).cache(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(function(err) {
|
||||
return that.$util.Tips({
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="phone">当前手机号:{{phone}}</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
<input type='password' placeholder='设置新密码' placeholder-class='placeholder' name="password" :value="password"></input>
|
||||
<input type='password' placeholder='以字母开头,长度在6~18之间,只能包含字符、数字和下划线' placeholder-class='placeholder' name="password" :value="password"></input>
|
||||
</view>
|
||||
<view class="item">
|
||||
<input type='password' placeholder='确认新密码' placeholder-class='placeholder' name="qr_password" :value="qr_password"></input>
|
||||
@@ -132,6 +132,9 @@
|
||||
if (!password) return that.$util.Tips({
|
||||
title: '请输入新密码'
|
||||
});
|
||||
if (!/^[a-zA-Z]\w{5,17}$/i.test(password)) return that.$util.Tips({
|
||||
title: '以字母开头,长度在6~18之间,只能包含字符、数字和下划线'
|
||||
});
|
||||
if (qr_password != password) return that.$util.Tips({
|
||||
title: '两次输入的密码不一致!'
|
||||
});
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
// #ifdef H5
|
||||
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
||||
// #endif
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import {
|
||||
getUserInfo,
|
||||
spreadBanner
|
||||
@@ -46,6 +45,7 @@
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
// #ifdef MP
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
getQrcode
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
<view class='itemn acea-row row-between-wrapper'>
|
||||
<view>
|
||||
<view class='name line1'>{{child.title}}</view>
|
||||
<view>{{child.add_time}}</view>
|
||||
<view>{{child.price}}</view>
|
||||
</view>
|
||||
<view class='num font-color' v-if="child.pm == 1">+{{child.number}}</view>
|
||||
<view class='num' v-else>-{{child.number}}</view>
|
||||
<view class='num font-color' v-if="child.type == 1">+{{child.price}}</view>
|
||||
<view class='num' v-else>-{{child.price}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -181,14 +181,12 @@
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
let len = res.data.list.length;
|
||||
let recordListData = res.data.list;
|
||||
recordListNew = recordList.concat(recordListData);
|
||||
that.status = that.limit > len;
|
||||
that.page = that.page + 1;
|
||||
that.$set(that, 'recordList', recordListNew);
|
||||
console.log(that.recordList)
|
||||
});
|
||||
},
|
||||
getCount: function() {
|
||||
@@ -213,7 +211,7 @@
|
||||
getCommissionInfo({
|
||||
page: page,
|
||||
limit: limit
|
||||
}, recordType).then(res => {
|
||||
}).then(res => {
|
||||
if(res.data.list){
|
||||
let len = res.data.list.length;
|
||||
let recordListData = res.data.list;
|
||||
|
||||
Reference in New Issue
Block a user