更新优化
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
<!-- <image :src="require('')" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image> -->
|
||||
<view class="listrigth">
|
||||
<view>{{item.biz_name}}</view>
|
||||
<view :class="[checkIn(item.biz_code)?'colorStyle':'']">{{checkIn(item.biz_code)?'+':'-'}}{{item.amount}}</view>
|
||||
<view :class="[item.type == '+'?'colorStyle':'']">{{item.type}}{{item.amount}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="listrigth2">
|
||||
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
||||
@@ -60,9 +61,9 @@
|
||||
},
|
||||
methods: {
|
||||
// 检测是否包含In
|
||||
checkIn(str) {
|
||||
let reg = RegExp(/In/)
|
||||
return str.match(reg)
|
||||
checkIn(str) {
|
||||
let reg = RegExp(/In/)
|
||||
return str.match(reg)
|
||||
},
|
||||
async getlist() {
|
||||
if (this.active == 1) {
|
||||
@@ -155,9 +156,10 @@
|
||||
}
|
||||
|
||||
.listrigth {
|
||||
.colorStyle{
|
||||
.colorStyle {
|
||||
color: #FF7127;
|
||||
}
|
||||
|
||||
>view {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<text class="towcontentitemtowetext">VIP{{userInfo.code || '无'}}</text>
|
||||
</view>
|
||||
<view class="towcontentitevip">
|
||||
VIP{{userInfo.is_vip}}
|
||||
VIP{{userInfo.isVip}}
|
||||
</view>
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/erweima.png" class="imgStyle" mode=""
|
||||
@click="clickEvent"></image>
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
|
||||
console.log(e, '调试2')
|
||||
this.shopId = e.shopId
|
||||
if (e.type == 'list') { //从列表进来的
|
||||
this.paygetShopByMember(e.shopId)
|
||||
@@ -51,13 +49,13 @@
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
shopId: w
|
||||
shopId: this.shopId
|
||||
})
|
||||
this.userInfo = res.data.list[0]
|
||||
},
|
||||
async paygetActive(shopid) {
|
||||
async paygetActive() {
|
||||
let res = await this.api.paygetActive({
|
||||
shopId: shopid,
|
||||
shopId: this.shopId,
|
||||
page: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
@@ -80,7 +78,11 @@
|
||||
shopId: this.shopId, // 判断显示哪家的作品,
|
||||
amount: this.amount // 判断显示哪家的作品,
|
||||
})
|
||||
if (res) {
|
||||
if (res.code == 0) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
@@ -94,11 +96,16 @@
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
})
|
||||
uni.hideLoading()
|
||||
setTimeout(res => {
|
||||
uni.navigateBack()
|
||||
}, 500)
|
||||
},
|
||||
fail: (res) => {
|
||||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
uni.hideLoading()
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
|
||||
@@ -40,15 +40,17 @@
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
},
|
||||
userId:null
|
||||
userId: uni.cache.get('userInfo').id
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userId = uni.cache.get('userInfo').id
|
||||
// this.paygetShopByMember()
|
||||
},
|
||||
onShow() {
|
||||
this.paygetShopByMember()
|
||||
this.list = []
|
||||
this.form = {
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
},
|
||||
this.paygetShopByMember()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.paygetShopByMember()
|
||||
@@ -84,10 +86,8 @@
|
||||
}
|
||||
},
|
||||
eeInfo(item) {
|
||||
|
||||
uni.pro.navigateTo('member/memberdetails', {
|
||||
shopId_id: item.shopId,
|
||||
type: 'list'
|
||||
shopId_id: item.shopId
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<text>账单明细</text>
|
||||
<uni-icons type="right" style="color: #333;" size="20"></uni-icons>
|
||||
</view>
|
||||
<view @click="goUrl('member/index')">
|
||||
<view @click="goUrlinfo('member/index')">
|
||||
<text>会员充值</text>
|
||||
<uni-icons type="right" style="color: #333;" size="20"></uni-icons>
|
||||
</view>
|
||||
@@ -20,31 +20,26 @@
|
||||
<script>
|
||||
import card from './components/card.vue'
|
||||
export default {
|
||||
components:{card},
|
||||
components: {
|
||||
card
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info:null,
|
||||
shopId_id: null,
|
||||
inputshow: 0,
|
||||
memberlist: {},
|
||||
listdata: [],
|
||||
amount: '',
|
||||
shopUser: {},
|
||||
userInfo: {},
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.info = e
|
||||
if (e.type == 'list') { //从列表进来的
|
||||
this.paygetShopByMember(e.shopId_id)
|
||||
} else {
|
||||
this.paygetShopByMember(e.shopId_id)
|
||||
}
|
||||
|
||||
// this.paygetActive() //列表
|
||||
console.log(e)
|
||||
this.shopId_id = e.shopId_id
|
||||
},
|
||||
onShow() {
|
||||
this.paygetShopByMember(this.info.shopId_id)
|
||||
this.paygetShopByMember(this.shopId_id)
|
||||
},
|
||||
methods: {
|
||||
async paygetShopByMember(w) {
|
||||
@@ -56,71 +51,21 @@
|
||||
})
|
||||
this.userInfo = res.data.list[0]
|
||||
},
|
||||
async paygetActive() {
|
||||
let res = await this.api.paygetActive({
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
page: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
try {
|
||||
this.listdata = res.data.list
|
||||
this.amount = res.data.list[0].minNum
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
async userbalancerechangesub() {
|
||||
if (this.amount == null || this.amount == '') {
|
||||
uni.showToast({
|
||||
title: '金额不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.paymemeberIn({
|
||||
shopId: uni.cache.get('shopUser'), // 判断显示哪家的作品,
|
||||
amount: this.amount // 判断显示哪家的作品,
|
||||
})
|
||||
if (res) {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.data.appId, // 微信支付商户号
|
||||
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.data.nonceStr, // 随机字符串
|
||||
package: res.data.package, // 固定值
|
||||
signType: res.data.signType, //固定值
|
||||
paySign: res.data.paySign, //签名
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
})
|
||||
setTimeout(res => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败'
|
||||
})
|
||||
setTimeout(res => {
|
||||
uni.hideLoading()
|
||||
}, 1000)
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
clickinput(a, b) {
|
||||
console.log(a, b)
|
||||
this.inputshow = b
|
||||
this.amount = a.minNum
|
||||
},
|
||||
goUrl(url){
|
||||
uni.pro.navigateTo(url,this.userInfo)
|
||||
goUrl(url) {
|
||||
uni.pro.navigateTo(url, this.userInfo)
|
||||
},
|
||||
|
||||
goUrlinfo(url) {
|
||||
uni.pro.navigateTo(url, {
|
||||
shopId: this.shopId_id,
|
||||
type: 'list'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user