|
@@ -3,16 +3,28 @@
|
|
|
<Breadcrumb />
|
|
<Breadcrumb />
|
|
|
<div class="list">
|
|
<div class="list">
|
|
|
<div class="list_item bg_color_fff border_radius_16 box_shadow_card"
|
|
<div class="list_item bg_color_fff border_radius_16 box_shadow_card"
|
|
|
- v-for="item in 10" :key="item"
|
|
|
|
|
|
|
+ v-for="item in list" :key="item"
|
|
|
>
|
|
>
|
|
|
- <img src="" alt="" style="width: 291.2px; height: 291.2px;" class="bg_color_f5">
|
|
|
|
|
|
|
+ <img :src="item.imageUrl" alt="" style="width: 291.2px; height: 291.2px;border-radius: 16px 16px 0 0;" class="bg_color_f5">
|
|
|
<div class="item_info padding16">
|
|
<div class="item_info padding16">
|
|
|
<div class="line2 font_size18 bold line_height24">
|
|
<div class="line2 font_size18 bold line_height24">
|
|
|
- {{item==1?'小红xhs书虚拟电商赚钱项目开店选品定价上架自动发货在...':'小红xhs书虚拟'}}
|
|
|
|
|
|
|
+ {{item.itemName}}
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex-center-between">
|
|
<div class="flex-center-between">
|
|
|
- <div class="bold color_price font_size20">900米币</div>
|
|
|
|
|
- <div class="border_radius_4 lijiduihuan color_fff gradient font_size14 flex-center mt10">
|
|
|
|
|
|
|
+ <div class="bold color_price font_size20">{{item.points}}{{$t('common.mibi')}}</div>
|
|
|
|
|
+ <div class="border_radius_4 lijiduihuan color_fff gradient font_size14 flex-center mt10"
|
|
|
|
|
+ @click="confirmBuy({
|
|
|
|
|
+ callback:initList,
|
|
|
|
|
+ appStore,
|
|
|
|
|
+ router,
|
|
|
|
|
+ type:'pointsBalance',
|
|
|
|
|
+ price:item.points,
|
|
|
|
|
+ t,
|
|
|
|
|
+ productId:item.itemId,
|
|
|
|
|
+ orderType:'mi_mall',
|
|
|
|
|
+ payMethod:'MI'
|
|
|
|
|
+ })"
|
|
|
|
|
+ >
|
|
|
立即兑换
|
|
立即兑换
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -30,12 +42,14 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import Pagination from '@/components/Pagination.vue'
|
|
import Pagination from '@/components/Pagination.vue'
|
|
|
import { ref, onMounted,reactive } from 'vue'
|
|
import { ref, onMounted,reactive } from 'vue'
|
|
|
-import { useRoute } from 'vue-router'
|
|
|
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
import { useAppStore } from '@/pinia/appStore'
|
|
import { useAppStore } from '@/pinia/appStore'
|
|
|
|
|
+import { getMallList } from '@/api/mall.js'
|
|
|
|
|
+import { confirmBuy } from '@/utils/util.js'
|
|
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
|
|
+const { t } = useI18n()
|
|
|
const appStore = useAppStore()
|
|
const appStore = useAppStore()
|
|
|
-const route = useRoute()
|
|
|
|
|
-const query = route.query;
|
|
|
|
|
-const learnNoteId = ref(query.learnNoteId || '');
|
|
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
|
|
|
|
|
|
|
|
// 添加分页相关数据
|
|
// 添加分页相关数据
|
|
@@ -43,10 +57,10 @@ const list = ref([]);
|
|
|
const listTotal = ref(0);
|
|
const listTotal = ref(0);
|
|
|
const searchFom = reactive({
|
|
const searchFom = reactive({
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
|
|
|
|
+ pageSize: 20,
|
|
|
})
|
|
})
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- // getList();
|
|
|
|
|
|
|
+ getList('init');
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const handlePageChange = (page) => {
|
|
const handlePageChange = (page) => {
|
|
@@ -55,18 +69,23 @@ const handlePageChange = (page) => {
|
|
|
console.log('当前页:', page);
|
|
console.log('当前页:', page);
|
|
|
getList();
|
|
getList();
|
|
|
}
|
|
}
|
|
|
|
|
+const initList = ()=>{
|
|
|
|
|
+ getList('init');
|
|
|
|
|
+};
|
|
|
// 查询寻找工作流列表
|
|
// 查询寻找工作流列表
|
|
|
const getList = async (type) => {
|
|
const getList = async (type) => {
|
|
|
if(type === 'init'){
|
|
if(type === 'init'){
|
|
|
searchFom.pageNum = 1
|
|
searchFom.pageNum = 1
|
|
|
}
|
|
}
|
|
|
- // const res = await getQuestList(searchFom)
|
|
|
|
|
- // if(res.code === 200){
|
|
|
|
|
- // listTotal.value = res.total
|
|
|
|
|
- // list.value = res.rows
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ const res = await getMallList(searchFom)
|
|
|
|
|
+ if(res.code === 200){
|
|
|
|
|
+ listTotal.value = res.total || 0;
|
|
|
|
|
+ list.value = res.rows || [];
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
.mibiShop{
|
|
.mibiShop{
|