更换接口地址,调整用户会员数据

This commit is contained in:
唐明明
2022-06-12 13:10:03 +08:00
parent 564d5921bc
commit ae584629bd
7 changed files with 9833 additions and 10082 deletions

View File

@@ -10,7 +10,7 @@ import router from '../router'
// 基础配置 // 基础配置
const config = { const config = {
apiUrl : 'http://api.gl.shangkelian.cn/api/', // 正式环境 apiUrl : 'https://api.gongli.vip/api/', // 正式环境
// apiUrl : 'http://api.zh.shangkelian.cn/api/', // 大健康调试环境,目前没有任何数据无法正常显示,所以需要使用该环境,最后会删除 // apiUrl : 'http://api.zh.shangkelian.cn/api/', // 大健康调试环境,目前没有任何数据无法正常显示,所以需要使用该环境,最后会删除
timeout : 60000 timeout : 60000
} }

View File

@@ -19,6 +19,7 @@ const dt = (data) =>{
// 充值 // 充值
const recharge = (data) => { const recharge = (data) => {
console.log(data)
return request({ return request({
url: "user/transaction/recharge", url: "user/transaction/recharge",
method: "POST", method: "POST",
@@ -89,6 +90,13 @@ const integral = () => {
}) })
} }
// 快捷支付配置
const paymentpre = () => {
return request({
url: 'user/transaction/recharge/paymentpre'
})
}
export { export {
dt, dt,
recharge, recharge,
@@ -99,5 +107,6 @@ export {
setpassword, setpassword,
getSms, getSms,
submitTransfer, submitTransfer,
integral integral,
paymentpre
} }

View File

@@ -9,35 +9,17 @@
<input type="digit" v-model="priceValue" placeholder="输入充值金额" /> <input type="digit" v-model="priceValue" placeholder="输入充值金额" />
</view> </view>
</view> </view>
<view class="recharge-block"> <view class="recharge-block" v-if="paymentpre.length > 0">
<view class="recharge-title"> <view class="recharge-title">
快速充值 快速充值
</view> </view>
<view class="recharge-fast"> <view class="recharge-fast">
<view class="recharge-fast-item" @click="onRecharge(100)"> <block v-for="(item,index) in paymentpre" :key="index">
<view class="recharge-fast-price">100<text></text></view> <view class="recharge-fast-item" @click="onRecharge(item.price)">
<view class="recharge-fast-numb">100<text>DT积分</text></view> <view class="recharge-fast-price">{{item.price}}<text></text></view>
</view> <view class="recharge-fast-numb">{{item.dt}}<text>DT积分</text></view>
<view class="recharge-fast-item" @click="onRecharge(200)"> </view>
<view class="recharge-fast-price">200<text></text></view> </block>
<view class="recharge-fast-numb">200<text>DT积分</text></view>
</view>
<view class="recharge-fast-item" @click="onRecharge(500)">
<view class="recharge-fast-price">500<text></text></view>
<view class="recharge-fast-numb">500<text>DT积分</text></view>
</view>
<view class="recharge-fast-item" @click="onRecharge(1000)">
<view class="recharge-fast-price">1000<text></text></view>
<view class="recharge-fast-numb">1000<text>DT积分</text></view>
</view>
<view class="recharge-fast-item" @click="onRecharge(3000)">
<view class="recharge-fast-price">3000<text></text></view>
<view class="recharge-fast-numb">3000<text>DT积分</text></view>
</view>
<view class="recharge-fast-item" @click="onRecharge(5000)">
<view class="recharge-fast-price">5000<text></text></view>
<view class="recharge-fast-numb">5000<text>DT积分</text></view>
</view>
</view> </view>
</view> </view>
<view class="recharge-btn"> <view class="recharge-btn">
@@ -48,13 +30,24 @@
</template> </template>
<script> <script>
import { recharge, payment } from "@/apis/interfaces/account" import { recharge, payment, paymentpre } from "@/apis/interfaces/account"
export default { export default {
data() { data() {
return { return {
priceValue: '' priceValue: '',
paymentpre: []
}; };
}, },
created() {
paymentpre().then(res => {
this.paymentpre = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: { methods: {
// 充值说明 // 充值说明
rechargeToast(){ rechargeToast(){
@@ -71,7 +64,7 @@
title: '提交订单' title: '提交订单'
}) })
recharge({ recharge({
amount: typeof(value) === 'number' ? value: this.priceValue amount: typeof(value) === 'number' ? value : this.priceValue
}).then(res => { }).then(res => {
if(res.order_id){ if(res.order_id){
uni.showLoading({ uni.showLoading({

View File

@@ -189,7 +189,6 @@
getInfo() { getInfo() {
if (this.$store.state.token === '') return; if (this.$store.state.token === '') return;
info().then(res => { info().then(res => {
console.log(res)
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: res.nickname title: res.nickname
}); });

View File

@@ -47,23 +47,16 @@
<view class="item">折扣价</view> <view class="item">折扣价</view>
<view class="item">剩余名额</view> <view class="item">剩余名额</view>
</view> </view>
<view class="vip-content-rich-flex"> <view class="vip-content-rich-flex" v-for="(item,index) in prices" :key="index">
<view class="item">10</view> <view class="item">{{item.open_number}} - {{item.open_number + item.stock}}</view>
<view class="item">59.0</view> <view class="item">{{item.price}}</view>
<view class="item">10</view> <view class="item">{{item.margin === 0 ? '满员': item.margin}}</view>
</view> </view>
<view class="vip-content-rich-flex"> <view class="vip-content-rich-flex">
<view class="item">10</view> <view class="item">10000</view>
<view class="item">59.0</view> <view class="item">199.00</view>
<view class="item">10</view> <view class="item">-</view>
</view> </view>
<view class="vip-content-rich-flex">
<view class="item">10</view>
<view class="item">59.0</view>
<view class="item">10</view>
</view>
<!-- <view v-for="(item,index) in prices" :key="index">{{item.open_number}} - {{item.open_number + item.stock}}名享开通会员折扣价{{item.price}}</view>
<view>10000后会员恢复原价199.00</view> -->
</view> </view>
</view> </view>
<view class="footer-vip" v-if="isOpen"> <view class="footer-vip" v-if="isOpen">
@@ -329,6 +322,7 @@
} }
} }
.vip-content-rich{ .vip-content-rich{
margin-top: 20rpx;
font-size: 28rpx; font-size: 28rpx;
line-height: 50rpx; line-height: 50rpx;
color: gray; color: gray;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long