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

查企业资质上什么网站营销的主要目的有哪些

查企业资质上什么网站,营销的主要目的有哪些,阿里巴巴做网站吗,品牌推广方案策划书uni-app 多端开发 一、命令创建uni-app 项目二、在微信小程序后台找到 appId 填写 appId三、运行项目四、使用 uni-ui4-1、下载4-2、自动导入4-3、ts项目下载类型校验 #xff08;uni-ui 组件库#xff09;4-3-1、下载4-3-2、配置 五、持久化 pinia六、数据请求封装七、获取组… uni-app 多端开发 一、命令创建uni-app 项目二、在微信小程序后台找到 appId 填写 appId三、运行项目四、使用 uni-ui4-1、下载4-2、自动导入4-3、ts项目下载类型校验 uni-ui 组件库4-3-1、下载4-3-2、配置 五、持久化 pinia六、数据请求封装七、获取组件的实例类型八、上拉加载更多 开场白 要是在 vscode 书写代码 需要添加 几个插件来支持 uni-app 一、命令创建uni-app 项目 npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project 二、在微信小程序后台找到 appId 填写 appId 三、运行项目 运行命令 pnpm dev:mp-weixin会生成dist 文件目录导入到微信开发者工具查看 四、使用 uni-ui 官网地址uni-app 官网 使用uni-ui 4-1、下载 npm i dcloudio/uni-ui 或 yarn add dcloudio/uni-ui4-2、自动导入 // pages.json {// 自动导包配置easycom: {autoscan: true,custom: {// uni-ui 规则如下配置^uni-(.*): dcloudio/uni-ui/lib/uni-$1/uni-$1.vue}},// 其他内容pages:[// ...] }4-3、ts项目下载类型校验 uni-ui 组件库 uni-helper/uni-ui-types 后面的所有的点击事件对象都可以用 UniHelper 提供的类型 swiper changeonChangeswiper-item.../swiper-itemswiper-item.../swiper-item /swiper// js const onChange: UniHelper.SwiperOnChange (event) {// UniHelper.SwiperOnChange 这样 event 里面的所有的类型都有了 }4-3-1、下载 pnpm i -D uni-helper/uni-ui-types 4-3-2、配置 在 tsconfig.json 文件中 compilerOptions 配置上 compilerOptions: {allowJs: true,sourceMap: true,baseUrl: .,paths: {/*: [./src/*]},lib: [esnext, dom],types: [dcloudio/types,miniprogram-api-typings,uni-helper/uni-app-types,uni-helper/uni-ui-types // 配置的uni-ui类型书写标签时鼠标划上之后有代码提示] },五、持久化 pinia pinia 的使用和 vue3 一样 pinia配置只是持久化的时候需要改一下 // TODO: 持久化 {persist: {storage: {getItem(key) {return uni.getStorageSync(key)},setItem(key, value) {uni.setStorageSync(key, value)},},},},六、数据请求封装 utils包里面创建 http.ts 文件 // http.tsimport { useMemberStore } from /stores // store 取 tokenconst baseUrl https://pcapi-xiaotuxian-front-devtest.itheima.net// 拦截器 const httpInterceptor {// 拦截前触发invoke(options: UniApp.RequestOptions) {options.url baseUrl options.urloptions.timeout 10000options.header {...options.header,source-client: miniapp,}const memStore useMemberStore()const token memStore.profile?.tokenif (token) {options.header.Authorization token}}, } // 添加 request 请求拦截 和 文件上传拦截 uni.addInterceptor(request, httpInterceptor) uni.addInterceptor(uploadFile, httpInterceptor)// 封装响应 interface DataT {code: stringmessage: stringresult: T } export const http T(options: UniApp.RequestOptions) { // http 函数接受 泛型T由调用 http 函数地方传进来return new PromiseDataT((resolve, reject) { // Promise 响应数据进行泛型约束Data 在上面定义好了只有 result 类型会变化所以从 http 函数调用者传进来uni.request({...options,success(response) {if (response.statusCode 200 response.statusCode 300) {resolve(response.data as DataT)} else {uni.showToast({ icon: none, title: 请求错误 })reject(response)}},fail(err) {uni.showToast({ icon: none, title: 服务器异常 })reject(err)},})}) } 在 api / index.ts 目录下 import { http } from /utils/http/*** 首页轮播图* param distributionSite 区分首页还是分类页面* returns promise*/ export const getHomeBannerAPI (data: Banner ) {return httpBannerItem[]({url: /home/banner,method: GET,data}) } 在组件中正常使用就好了 七、获取组件的实例类型 Son refsonComponent /const sonComponent refInstanceTypetypeof Son() // typeof xxx 组件类型 InstanceType 获取的是实例类型sonComponent.value.getMore // 父组件拿到子组件的属性和方法子组件需要暴露出来vue3中 defineExpose({getMore: getGuessData // 前面定义的名字让父组件拿到 后面是子组件中的属性和方法 })八、上拉加载更多 // 分页参数 const params {currrentPage: 1,pageSize: 10 } // 定义的数组 const tableDataList ref([]) // 是否加载完数据 const isFinish ref(false) // 加载中状态 let isLoading false // 页面和加载更多方法 const getDataList async (params) {if(isLoading || isFinish.value) return // 加载中或者数据没有加载完 都不进行请求数据isLoading true // 请求数据制成 trueconst res await API(params)tableDataList.value [...tableDataList.value, res.result.list] // 数据拼接isLoading false // 数据回来加载中的状态制成 false// 判断要是当前的页码大于等于列表数据的总页码停止加载数据加载完了if(params.currentPage res.result.pages) {isFinish.value true // 数据加载完了return uni.showToast({title: 数据加载完了 icon: none})}params.currentPage // 加载下一页的数据 }
http://www.hkea.cn/news/14331401/

相关文章:

  • c2c电子商务网站的功能做动态logo网站
  • 主流网站编程语言wordpress删除导入xml
  • 知乎 阿里云 wordpress北京seo招聘
  • 如何对网站建设和维护vps 需刷新几次才能打开网站
  • 智能建站模板外贸网站 开源
  • 论坛网站免费建设模板下载安装大学学科建设网站
  • 手机网站定制 杭州平度市城乡建设局网站
  • 少部分网站ie打不开这些网站域名ping不通用axuer 做网站产品原型
  • 30天网站建设实录wordpress加中文
  • 服装定制网站模板中文单页面网站模板免费下载
  • oa办公系统网站开发淘点金 wordpress
  • 网站建设目的意义无锡市住房与城乡建设网站
  • 网站平台设计费用wordpress文章id排列
  • 用电脑做网站的历史在哪里找南宁网站建设公司seo优化
  • 营销网站建设专家江苏五星建设集团有限公司网站
  • 官方网站如何建设网上怎么卖东西
  • 自己如何做网站建设网站建设文化效果
  • 网站数据库安装教程中国纪检监察报记者电话
  • 网站pc端和手机端分离怎么做泰安市人才交流服务中心
  • delphi xe10网站开发怎么用wordpress建手机网站
  • 2021网站你懂我意思正能量宽带哪家好
  • 网站开发项目详细计划书如何在自己电脑上做网站服务器
  • 在那个网站做推广实用主题之家wordpress
  • 网站建设导航免费wordpress模板下载
  • 爱站关键词网站seo优化服务商
  • 上海企业网站建设公司怎么建设网站空间和备案
  • 基于云平台网站群建设网站建设众包平台
  • 制作好昆明搜索引擎的关键词优化
  • 如何制作论坛网站百度账号官网
  • 网站建设与设计ppt模板南乐网站开发