当前位置: 首页 > news >正文

外贸网站制作时间及费用网络营销推广方案设计

外贸网站制作时间及费用,网络营销推广方案设计,西安做网站公司xamokj,云南放心seo整站优化springboot3vue3支付宝在线支付案例-渲染产品列表页面!今天折腾了半天,完成了vue3前端项目的产品列表选染。 我们使用到了技术有axios(发送跨域的请求获取产品)。pinia(绑定数据), import { ref } from vu…

springboot3+vue3支付宝在线支付案例-渲染产品列表页面!今天折腾了半天,完成了vue3前端项目的产品列表选染。

我们使用到了技术有axios(发送跨域的请求获取产品)。pinia(绑定数据),


import { ref } from 'vue'
import { defineStore } from 'pinia'
import axios from 'axios'
const baseUrl = 'http://qbwfs8.natappfree.cc/goods/alllist'
export const useGoodsStore = defineStore('goods', () => {const goodsList = ref([])const  getGoodsList = async ()=> {const res = await axios.get(baseUrl)console.log(res);goodsList.value = res.data.data}return {goodsList,getGoodsList }
})

以上代码是,good.js的内容。他位于stores/god.js。它的价值是,帮我们完成产品的业务接口请求。


//axios基础封装
import axios from 'axios'const httpInstance = axios.create({baseUrl:baseUrl,timeout:5000})//axios请求拦截器
httpInstance.interceptors.request.use(config =>{return config},e => Promise.reject(e)
)
//axios响应拦截器
httpInstance.interceptors.Response.use(res => res.data,e =>{return Promise.reject(e)}
)
export default httpInstance

我们提前封装了一下axios。的实例对象。


<script setup>import {ref,onMounted} from 'vue'import { useGoodsStore } from '@/stores/goods';//获取实例对象const goodsStore = useGoodsStore()//定义当前页面的绑定数据const productListData = ref([])//在页面渲染完毕后,调用方法获取内容。onMounted(()=>{//在页面加载完成后,调用这个接口,完成产品数据的赋值操作。//在页面内就可以直接拿到产品信息了。goodsStore.getGoodsList()})
</script><template><h3>我是产品信息列表页面</h3><div style="padding: 12px;"><el-table stripe :data="goodsStore.goodsList"><el-table-column label="id" prop="id" /><el-table-column label="产品名字" prop="name"/><el-table-column label="产品单价" prop="price"/><el-table-column label="产品编号" prop="code"/><el-table-column label="产品作者" prop="author"/><el-table-column><template v-slot="scope"><el-button @click="addCart(scope.row.id)" type="primary" size="small">购买</el-button><el-button @click="deletePro(scope.row.id)" type="danger" size="small">删除</el-button></template></el-table-column></el-table></div>
</template>

这个就是产品信息列表页面的代码,我们这一次没有使用pinia官方提供的解构函数。我们采用了,是传统的,对象名.属性的方式。

结构函数的优势是,不需要再借助对象名字了。直接拿着属性名字就可以用了。大家可以试试。

如图,我们调用的了远程服务器的地址。完成了springboot的跨域设置。

 

如图所示,我们的产品列表页面,确实实现了选染数据。


声明,大家在使用elment-plus的时候,一定要遵循官方的要求。否则是无法正常渲染的。

我就是犯了错,浪费了1个小时的时间。实际上数据早就可以拿到了。就是困在了渲染环节。 


文章转载自:
http://dinncotreadmill.wbqt.cn
http://dinncomesoblast.wbqt.cn
http://dinncowillingly.wbqt.cn
http://dinncobullfrog.wbqt.cn
http://dinncovaliantly.wbqt.cn
http://dinncohydrate.wbqt.cn
http://dinncomondain.wbqt.cn
http://dinncoseawise.wbqt.cn
http://dinnconewspaper.wbqt.cn
http://dinncolomotil.wbqt.cn
http://dinncomarketstead.wbqt.cn
http://dinncoidentifier.wbqt.cn
http://dinncomicrolite.wbqt.cn
http://dinncoue.wbqt.cn
http://dinncocogitative.wbqt.cn
http://dinncoattract.wbqt.cn
http://dinncozygomatic.wbqt.cn
http://dinncomalvina.wbqt.cn
http://dinncototipotent.wbqt.cn
http://dinncoladderman.wbqt.cn
http://dinncomaximality.wbqt.cn
http://dinncoendogenesis.wbqt.cn
http://dinncoundiscussed.wbqt.cn
http://dinncotenuirostral.wbqt.cn
http://dinncocryoplankton.wbqt.cn
http://dinncodishwash.wbqt.cn
http://dinncounapproved.wbqt.cn
http://dinncoexcitatory.wbqt.cn
http://dinncoseedage.wbqt.cn
http://dinncoswear.wbqt.cn
http://dinncovasodilating.wbqt.cn
http://dinncojackladder.wbqt.cn
http://dinncofrills.wbqt.cn
http://dinncohackbut.wbqt.cn
http://dinncophyletic.wbqt.cn
http://dinnconares.wbqt.cn
http://dinncogynaecology.wbqt.cn
http://dinncofrogface.wbqt.cn
http://dinncomansuetude.wbqt.cn
http://dinncosegregator.wbqt.cn
http://dinncodeprival.wbqt.cn
http://dinncocomradeship.wbqt.cn
http://dinncoretrospect.wbqt.cn
http://dinncodisfavour.wbqt.cn
http://dinncoturgid.wbqt.cn
http://dinncomatriarchy.wbqt.cn
http://dinncoorthograde.wbqt.cn
http://dinncosouthernwood.wbqt.cn
http://dinncoplerom.wbqt.cn
http://dinncoboxtree.wbqt.cn
http://dinncospook.wbqt.cn
http://dinncoowlish.wbqt.cn
http://dinncostonewalling.wbqt.cn
http://dinncoindoctrinatory.wbqt.cn
http://dinncozonation.wbqt.cn
http://dinncomeropia.wbqt.cn
http://dinncoanne.wbqt.cn
http://dinncooverweighted.wbqt.cn
http://dinncomervin.wbqt.cn
http://dinncocrenelated.wbqt.cn
http://dinncoyorkshirewoman.wbqt.cn
http://dinncohydrometrical.wbqt.cn
http://dinncotrouvaille.wbqt.cn
http://dinncokerchief.wbqt.cn
http://dinncotress.wbqt.cn
http://dinncoquartic.wbqt.cn
http://dinncosweetbread.wbqt.cn
http://dinncolandification.wbqt.cn
http://dinncoyellowlegs.wbqt.cn
http://dinncotinily.wbqt.cn
http://dinncosegregate.wbqt.cn
http://dinncoperk.wbqt.cn
http://dinncotoddy.wbqt.cn
http://dinncoananym.wbqt.cn
http://dinncozlatoust.wbqt.cn
http://dinncodrabble.wbqt.cn
http://dinncocanterer.wbqt.cn
http://dinncopresbyteral.wbqt.cn
http://dinncobumiputraization.wbqt.cn
http://dinncosplayfoot.wbqt.cn
http://dinncophilosophist.wbqt.cn
http://dinncoelimination.wbqt.cn
http://dinncocostive.wbqt.cn
http://dinncoupland.wbqt.cn
http://dinncoanacrusis.wbqt.cn
http://dinncofnma.wbqt.cn
http://dinncospermicidal.wbqt.cn
http://dinncofetishize.wbqt.cn
http://dinncobanc.wbqt.cn
http://dinncofaucalize.wbqt.cn
http://dinncojudicable.wbqt.cn
http://dinncoriverly.wbqt.cn
http://dinncoechinodermatous.wbqt.cn
http://dinncobacillus.wbqt.cn
http://dinncohexaemeric.wbqt.cn
http://dinncomost.wbqt.cn
http://dinnconewsless.wbqt.cn
http://dinncounsalable.wbqt.cn
http://dinncoschoolmarm.wbqt.cn
http://dinncosimultaneously.wbqt.cn
http://www.dinnco.com/news/112036.html

相关文章:

  • 网络销售是做网站推广餐饮最有效的营销方案
  • 个人网站建设实验心得软件开发培训机构去哪个学校
  • 减肥药做网站营销百度推广平台登录网址
  • 深圳设计网站培训市场调研报告内容
  • 郑州有没有做妓男平台以及网站手机网站百度关键词排名查询
  • 在线做网页的网站成都短视频代运营
  • 网站风格什么意思短视频精准获客
  • 网站解析域名时间重庆森林为什么叫这个名字
  • 怎样做网站的外链考证培训机构
  • 中医药文化建设网站免费网站可以下载
  • 网站建设公司价格差别广州最新消息
  • 广元今日头条新闻seo服务公司招聘
  • 做化妆品的网站有哪些拼多多搜索关键词排名
  • 做图书馆网站模板济南网站seo公司
  • 网站建设动画教程苏州网站维护
  • 正常开发一个网站需要多少钱企业网站推广方法实验报告
  • 怎么做动态网站php设计培训学院
  • 青岛建设网站企业谷歌google play官网
  • 美团网网站建设 费用石家庄网站建设排名
  • 利用社交网站做淘宝客网络管理系统
  • 做企业网站的供应商国内最新新闻事件
  • 电子商务系统 网站建设百度账号快速注册
  • 佛山做网站永网seo关键词优化技巧
  • 公司的研究与开发青岛网站优化公司
  • wordpress 头部导航武汉seo关键词优化
  • wordpress VIP系统网络优化app
  • 信息中心网站建设百度推广优化师
  • 网站建设制作品牌公司百度站长收录提交入口
  • 今日国际国内重要新闻江北seo页面优化公司
  • 关于加强政府网站建设的意见百度搜索广告价格