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

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 = {
apiUrl : 'http://api.gl.shangkelian.cn/api/', // 正式环境
apiUrl : 'https://api.gongli.vip/api/', // 正式环境
// apiUrl : 'http://api.zh.shangkelian.cn/api/', // 大健康调试环境,目前没有任何数据无法正常显示,所以需要使用该环境,最后会删除
timeout : 60000
}

View File

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

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long