商家入驻改版

This commit is contained in:
qiaojiale 2025-06-19 17:55:40 +08:00
parent ddd1b67aea
commit 970b59fa62
5 changed files with 109 additions and 41 deletions

View File

@ -13,5 +13,7 @@ export const apiArr = {
getPayList:"/api/v2/wechat/quick-payment-record-crud/page", //支付记录 getPayList:"/api/v2/wechat/quick-payment-record-crud/page", //支付记录
getUserPoints:"/api/v2/wechat/member-points-flow-crud/main",//获取用户积分 getUserPoints:"/api/v2/wechat/member-points-flow-crud/main",//获取用户积分
getPointsList:"/api/v2/wechat/member-points-flow-crud/page", //积分记录 getPointsList:"/api/v2/wechat/member-points-flow-crud/page", //积分记录
createPay:"/api/v2/wechat/quick-payment-record-crud/creat",//创建支付信息 createPay:"/api/v2/wechat/quick-payment-record-crud/creat",//创建支付信息
getPayInfo:"/api/v2/wechat/quick-payment-record-crud/info"
}; };

View File

@ -41,7 +41,7 @@
</span> </span>
</div> </div>
<div class="Msg2_con_right"> <div class="Msg2_con_right">
{{ room_name}} {{ room_name }}
</div> </div>
</div> </div>
</div> </div>
@ -68,8 +68,8 @@
</div> </div>
<u-picker :show="show" :columns="[commintyList]" keyName="label" @confirm='confirm' @close='onClose' @cancel='onClose' <u-picker :show="show" :columns="[commintyList]" keyName="label" @confirm='confirm' @close='onClose'
closeOnClickOverlay></u-picker> @cancel='onClose' closeOnClickOverlay></u-picker>
<div class="boxshadow" @click="changeBoxshadow" v-if="boxShow"> <div class="boxshadow" @click="changeBoxshadow" v-if="boxShow">
<div class="boxshadow_con"> <div class="boxshadow_con">
@ -93,6 +93,7 @@ import {
apiArr apiArr
} from '../../../api/v2local'; } from '../../../api/v2local';
import { apiPay } from '../../../api/pay'
export default { export default {
data() { data() {
@ -105,11 +106,13 @@ export default {
homeMoney: 0, homeMoney: 0,
Money: "", Money: "",
show: false, show: false,
remarks:"", remarks: "",
room_id:"", room_id: "",
room_name:"", room_name: "",
boxShow:false, boxShow: false,
commintyList: [], commintyList: [],
OrderMsg: "",
payId:""
} }
}, },
watch: { watch: {
@ -131,17 +134,17 @@ export default {
methods: { methods: {
changeBoxshadow(){ changeBoxshadow() {
this.boxShow = !this.boxShow this.boxShow = !this.boxShow
}, },
confirm(e){ confirm(e) {
console.log(e); console.log(e);
this.room_id = e.value[0].room_id this.room_id = e.value[0].room_id
this.room_name = e.value[0].label this.room_name = e.value[0].label
this.show = false this.show = false
}, },
onClose(){ onClose() {
this.show = false this.show = false
}, },
// //
@ -156,11 +159,11 @@ export default {
page_num: 1, page_num: 1,
page_size: 30, page_size: 30,
}).then(res => { }).then(res => {
res.rows.forEach(item=>{ res.rows.forEach(item => {
item.label = item.name item.label = item.name
}) })
this.commintyList = res.rows this.commintyList = res.rows
if(res.rows.length){ if (res.rows.length) {
this.room_id = res.rows[0].room_id this.room_id = res.rows[0].room_id
this.room_name = res.rows[0].name this.room_name = res.rows[0].name
} }
@ -168,33 +171,83 @@ export default {
}, },
pay() { pay() {
let that = this let that = this
if(!that.Money){ if (!that.Money) {
return uni.showToast({ return uni.showToast({
title:"请输入金额", title: "请输入金额",
icon:"none" icon: "none"
}) })
} }
request(apiArr.createPay, "POST", { request(apiArr.createPay, "POST", {
merchant_id:that.info.id, merchant_id: that.info.id,
order_amount:that.Money, // order_amount: that.Money, //
refund_property_fee:that.homeMoney, // refund_property_fee: that.homeMoney, //
refund_member_points:that.integral, // refund_member_points: that.integral, //
remark:that.remarks, remark: that.remarks,
room_id:that.room_id room_id: that.room_id
}).then(res=>{ }).then(res => {
console.log(res); that.payId = res.id
that.getPayInfo(res.id)
}) })
}, },
payList(){ payList() {
NavgateTo("../payInfo/index") NavgateTo("../payInfo/index")
}, },
homeMoneList(){ homeMoneList() {
NavgateTo("../houseProvident/index") NavgateTo("../houseProvident/index")
}, },
home(){ home() {
NavgateTo("/pages/index/index") NavgateTo("/pages/index/index")
} },
async getPayInfo(e) {
let that = this
await request(apiArr.getPayInfo, "POST", {
id: e
}).then(res => {
console.log(res);
this.OrderMsg = res
that.LakaLaPrePay()
})
},
async LakaLaPrePay() {
let that = this
request(apiPay.pay, "POST", {
total_amount: that.OrderMsg.order_amount,
subject: '快捷支付订单',
goods_id: that.payId,
address: "",
out_trade_no: that.OrderMsg.term_no,
remark: that.OrderMsg.remark,
quantity: '1',
user: uni.getStorageSync('userId'),
user_id: uni.getStorageSync('openId')
}).then(res => {
console.log(res,'res');
const { resp_data, msg } = res.data
wx.requestPayment({
timeStamp: String(resp_data.acc_resp_fields.time_stamp),
nonceStr: String(resp_data.acc_resp_fields.nonce_str),
package: String(resp_data.acc_resp_fields.package),
signType: String(resp_data.acc_resp_fields.sign_type),
paySign: String(resp_data.acc_resp_fields.pay_sign),
success(res) {
that.queryPay()
},
fail(fal) {
if (fal.errMsg == 'requestPayment:fail cancel') {
that.payFail(2)
} else {
that.payFail(1)
}
}
})
})
},
}, },

View File

@ -1,44 +1,47 @@
<template> <template>
<div class="container"> <div class="container">
<div class="payInfoList"> <div class="payInfoList">
<div class="PayInfoItem"> <div class="PayInfoItem" v-for="item in payList">
<div class="row"> <div class="row">
<div class="row_label">付款金额</div> <div class="row_label">付款金额</div>
<div class="row_con">53.1</div> <div class="row_con">{{ item.order_amount }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="row_label2">2025-06-06 18:10:08</div> <div class="row_label2">{{item.create_time}}</div>
<div class="row_label2">Adapay微信小程序支付</div> <div class="row_label2" v-if="false">Adapay微信小程序支付</div>
<div class="row_label2">{{item.payment_method}}</div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="row2"> <div class="row2">
<div class="label">订单号</div> <div class="label">订单号</div>
<div class="con3">6354245654125654</div> <div class="con3">{{item.order_no}}</div>
</div> </div>
<div class="row2"> <div class="row2">
<div class="label">消费门店</div> <div class="label">消费门店</div>
<div class="con3">真彩图文</div> <div class="con3">{{item.merchant_info.merchant_name}}</div>
</div> </div>
<div class="row2"> <div class="row2">
<div class="label">当前状态</div> <div class="label">当前状态</div>
<div class="con3">已支付</div> <div class="con3" v-if="item.status == 1">已支付</div>
<div class="con3" v-if="item.status == 2">待支付</div>
<div class="con3" v-if="item.status == 3">已退款</div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="row3"> <div class="row3">
<div class="label">返物业费</div> <div class="label">返物业费</div>
<div class="con3" @click="houseProvident">53.1 <div class="con3" @click="houseProvident">{{item.refund_property_fee}}
<u-icon name="arrow-right" color="#999999" size="40" style="max-lines: 10rpx;"></u-icon> <u-icon name="arrow-right" color="#999999" size="40" style="max-lines: 10rpx;"></u-icon>
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="row"> <div class="row">
<div class="label">返会员积分</div> <div class="label">返会员积分</div>
<div class="con3" @click="points">3 <div class="con3" @click="points">{{ item.refund_member_points }}
<u-icon name="arrow-right" color="#999999" size="40" style="max-lines: 10rpx;"></u-icon> <u-icon name="arrow-right" color="#999999" size="40" style="max-lines: 10rpx;"></u-icon>
</div> </div>
</div> </div>
@ -70,7 +73,8 @@ export default {
localHeight: "", localHeight: "",
page_num: 1, page_num: 1,
page_size: 10, page_size: 10,
flag:false flag:false,
payList:[]
} }
}, },
onLoad(options) { onLoad(options) {
@ -95,7 +99,13 @@ export default {
page_num:that.page_num, page_num:that.page_num,
page_size:that.page_size page_size:that.page_size
}).then(res=>{ }).then(res=>{
console.log(res); if(res.rows.length == that.page_size){
that.flag = true
}else{
that.flag = false
}
that.payList = that.payList.concat(res.rows)
that.page_num++
}) })
}, },
}, },

File diff suppressed because one or more lines are too long

View File

@ -20928,7 +20928,10 @@ var apiArr = {
//获取用户积分 //获取用户积分
getPointsList: "/api/v2/wechat/member-points-flow-crud/page", getPointsList: "/api/v2/wechat/member-points-flow-crud/page",
//积分记录 //积分记录
createPay: "/api/v2/wechat/quick-payment-record-crud/creat" //创建支付信息
createPay: "/api/v2/wechat/quick-payment-record-crud/creat",
//创建支付信息
getPayInfo: "/api/v2/wechat/quick-payment-record-crud/info"
}; };
exports.apiArr = apiArr; exports.apiArr = apiArr;