| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <view class="sx-card-box">
- <view class="card-head-box">
- <!-- 封面 -->
- <image :src="item.cover" class="head-img"></image>
- <view class="head-right-box">
- <!-- 名称 -->
- <view class="head-title">{{item.name}}</view>
- <!-- 简介 -->
- <view class="head-content">{{item.intro}}</view>
- <!-- 共计 -->
- <view class="head-content">{{item.gongji}}</view>
- </view>
- </view>
- <view class="card-body-box">
- <view class="body-title">请选择学习等级</view>
- <view class="dj-item-row">
- <ezyActiveVue v-for="cItem in item.levelList" class="ezy-btn-active dj-item"
- @aclick="handleSelect(cItem)" :class="{active: cItem.active}">{{cItem.levelName}}</ezyActiveVue>
- </view>
- </view>
- </view>
- </template>
- <script setup>
- import * as jisuanHttp from "@/api/chanpinJiSuanTeXun.js"
- import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
- import cacheManager from "@/utils/cacheManager.js";
- const porps = defineProps({
- item: {
- type: Object
- }
- })
- // 选择产品等级
- function handleSelect(item) {
- porps.item.levelList.forEach(citem => {citem.active = false; if (item.dengjiId == citem.dengjiId) {citem.active = true}})
- const opt = {
- dengjiId: item.dengjiId,
- }
- jisuanHttp.getChanpin2DengjiSave(opt).then(res => {
- if (!res.data) {
- return;
- }
- cacheManager.get('contentInfo') && cacheManager.remove('contentInfo');
- // 跳转
- uni.switchTab({
- url: "/pages/chanpinneirong/index"
- })
- })
- }
- </script>
- <style scoped>
- </style>
|