优化
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
<view v-for='(item,index) in orderActionList' :key='index' @click.stop='gotoPath(item.path)'>
|
||||
<image :src='item.icon' />
|
||||
<text>{{ item.title }}</text>
|
||||
<text v-if='item.amount>0'>{{ item.amount }}</text>
|
||||
<text v-if='index==0&&userInfo.orderNum>0'>{{ userInfo.orderNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -75,18 +75,15 @@ const officialAccountDialogRef = ref();
|
||||
const orderActionList = ref([{
|
||||
title: '进行中',
|
||||
icon: assetsUrl('ic_order_progressing.png'),
|
||||
path: '/pages/mine/subs/order/index',
|
||||
amount: 10
|
||||
path: '/pages/mine/subs/order/index'
|
||||
}, {
|
||||
title: '已结束',
|
||||
icon: assetsUrl('ic_order_finish.png'),
|
||||
path: '/pages/mine/subs/order/index?index=1',
|
||||
amount: 0
|
||||
path: '/pages/mine/subs/order/index?index=1'
|
||||
}, {
|
||||
title: '全部订单',
|
||||
icon: assetsUrl('ic_order_all.png'),
|
||||
path: '/pages/mine/subs/order/index?index=2',
|
||||
amount: 0
|
||||
path: '/pages/mine/subs/order/index?index=2'
|
||||
}]);
|
||||
|
||||
const serviceList = [
|
||||
|
@@ -25,7 +25,9 @@ onLoad((e) => {
|
||||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
const { rows } = await getIntegralList({ 'pageNum': 1, 'pageSize': 10, 'bean': {} });
|
||||
const { rows } = await getIntegralList({
|
||||
fbean: { 'pageNum': 1, 'pageSize': 10, 'bean': {} }
|
||||
});
|
||||
tradeList.value = rows;
|
||||
};
|
||||
|
||||
|
@@ -65,6 +65,10 @@ const { userInfo } = storeToRefs(store);
|
||||
|
||||
const currentGender = ref<number>(0);
|
||||
|
||||
onLoad(() => {
|
||||
store.getProfile();
|
||||
});
|
||||
|
||||
const chooseAvatar = (e: any) => {
|
||||
uni.showLoading();
|
||||
uni.uploadFile({
|
||||
|
@@ -18,15 +18,16 @@
|
||||
<view class='divider' />
|
||||
<view class='option-item'>
|
||||
<image :src='assetsUrl("bg_member_recharge_item.png")' />
|
||||
<text>充值{{ rechargeItems[currentIndex].rechargeamount }}送{{ rechargeItems[currentIndex].rewardamount }}元</text>
|
||||
<text>充值{{ rechargeItems[currentIndex]?.rechargeamount }}送{{ rechargeItems[currentIndex]?.rewardamount }}元
|
||||
</text>
|
||||
<text class='accent-text-color'>
|
||||
实得{{ rechargeItems[currentIndex].rechargeamount + (rechargeItems[currentIndex].rewardamount) }}元
|
||||
实得{{ rechargeItems[currentIndex]?.rechargeamount + (rechargeItems[currentIndex]?.rewardamount) }}元
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class='bottom-button-view'>
|
||||
<button class='primary-button'>充值</button>
|
||||
<button class='primary-button' @click.stop='goRecharge'>充值</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -34,22 +35,34 @@
|
||||
<script lang='ts' setup>
|
||||
import { assetsUrl } from '@/utils/assets';
|
||||
import { useUserStore } from '@/store';
|
||||
import { getRechargeList } from '@/api/user';
|
||||
import { getRechargeList, recharge } from '@/api/user';
|
||||
|
||||
const store = useUserStore();
|
||||
const { userInfo } = storeToRefs(store);
|
||||
|
||||
const rechargeItems = ref([]);
|
||||
const rechargeItems = ref<{
|
||||
itemid: string
|
||||
rechargeamount: number
|
||||
rewardamount: number
|
||||
rewardcouponamount: number,
|
||||
rechargetype: number
|
||||
}[]>([]);
|
||||
const currentIndex = ref<number>(0);
|
||||
|
||||
onLoad(async () => {
|
||||
const { rechargetype, ruleitems } = await getRechargeList();
|
||||
const { ruleitems } = await getRechargeList();
|
||||
rechargeItems.value = ruleitems;
|
||||
});
|
||||
|
||||
const change = (index: number) => {
|
||||
currentIndex.value = index;
|
||||
};
|
||||
|
||||
const goRecharge = () => {
|
||||
recharge({
|
||||
itemid: rechargeItems.value[currentIndex.value].itemid
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
|
Reference in New Issue
Block a user