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

网站开发汇报的ppt软文写作范文

网站开发汇报的ppt,软文写作范文,如何做电商运营推广,如何快速找到做网站的客户前言 在发送模板消息之前我们要首先搞清楚微信小程序的逻辑是什么,这只是前端的一个demo实现,建议大家在后端处理,前端具体实现:如下图 1.获取小程序Id和密钥 我们注册完微信小程序后,可以在开发设置中看到以下内容&a…

前言

在发送模板消息之前我们要首先搞清楚微信小程序的逻辑是什么,这只是前端的一个demo实现,建议大家在后端处理,前端具体实现:如下图

在这里插入图片描述

1.获取小程序Id和密钥

我们注册完微信小程序后,可以在开发设置中看到以下内容,注意,密钥只会在生成时显示
在这里插入图片描述

2.创建模板消息,拿到模板id

在这里插入图片描述
在右侧详情中我们可以看到具体要传输的数据对象,注意一一对应
在这里插入图片描述

3.发送模板消息-完整代码

<template><view class="content"><image class="logo" src="/static/guide1.png"></image><view class="text-area"><button class="title" @click="btnclick">订阅消息</button></view></view>
</template><script setup>import { ref } from 'vue';import { parseTime } from "../../utils/ruoyi";const show = ref(true)const showModal = ref(false);function close() {show.value = false}function acc() {uni.showModal({title: '通知权限',content: '请授权通知管理,用于给您及时传达消息',success: function(res) {if (res.confirm) {console.log('点击了确认')btnclick()} else {console.log('点击了取消')}}})}function btnclick() {if (wx.requestSubscribeMessage) {wx.requestSubscribeMessage({tmplIds: ['模板Id'],success(res) {if (res['模板Id'] == 'accept') {console.log('用户订阅成功');btnSubscription()} else if (res['模板Id'] == 'reject') {console.log('用户拒绝订阅');}},fail(err) {console.error('订阅请求失败:', err);}});} else {console.error('此平台不支持订阅');}}async function btnSubscription() {let code = null;let accessToken = null;let openid = null;let time = parseTime(new Date())try {code = await getLoginCode();if (code) {openid = await requestOpenID(code);console.log('User OpenID:', openid);}accessToken = await requestAccessToken();console.log('Access Token:', accessToken);} catch (error) {console.error('errorerror', error);}uni.request({url: 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=' +accessToken,method: 'POST',data: {touser: openid,template_id: '模板Id',page: "pages/index/index",data: {thing1: {value: '测试小程序订阅通知'},thing2: {value: '该服务是测试通知,请务必订阅'},name3: {value: '测试一号'},date4: {value: time},thing5: {value: '测试'}}},success: (res) => {console.log("发送成功", res);}})}const getLoginCode = () => {return new Promise((resolve, reject) => {wx.login({success: (res) => {console.log('res.code', res.code);if (res.code) {resolve(res.code);} else {reject('Failed to obtain login code');}},fail: (err) => {reject(err);},});});};const requestOpenID = (code) => {return new Promise((resolve, reject) => {wx.request({url: 'https://api.weixin.qq.com/sns/jscode2session',data: {appid: '小程序AppId',secret: '小程序密钥',js_code: code,grant_type: 'authorization_code',},success: (res) => {console.log('resres', res);if (res.data.openid) {resolve(res.data.openid);} else {reject('Failed to obtain user OpenID');}},fail: (err) => {reject(err);},});});};const requestAccessToken = () => {return new Promise((resolve, reject) => {wx.request({url: 'https://api.weixin.qq.com/cgi-bin/token',data: {appid: '小程序AppId',secret: '小程序密钥',grant_type: 'client_credential',},success: (res) => {if (res.data.access_token) {resolve(res.data.access_token);} else {reject('Failed to obtain Access Token');}},fail: (err) => {reject(err);},});});};acc()
</script><style>.content {display: flex;flex-direction: column;align-items: center;justify-content: center;}.logo {height: 200rpx;width: 600rpx;margin-top: 100rpx;margin-left: auto;margin-right: auto;margin-bottom: 50rpx;}.text-area {display: flex;justify-content: center;}.title {font-size: 36rpx;color: #8f8f94;}
</style>

4.实现图片

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


文章转载自:
http://lambda.Ljqd.cn
http://floccus.Ljqd.cn
http://batrachoid.Ljqd.cn
http://dormie.Ljqd.cn
http://sorus.Ljqd.cn
http://epizootic.Ljqd.cn
http://shading.Ljqd.cn
http://fabled.Ljqd.cn
http://oar.Ljqd.cn
http://homoscedastic.Ljqd.cn
http://tanta.Ljqd.cn
http://gynaecea.Ljqd.cn
http://gormand.Ljqd.cn
http://cronk.Ljqd.cn
http://oncogenic.Ljqd.cn
http://americanist.Ljqd.cn
http://ludic.Ljqd.cn
http://overbuild.Ljqd.cn
http://exsiccator.Ljqd.cn
http://servohead.Ljqd.cn
http://installment.Ljqd.cn
http://multitude.Ljqd.cn
http://overcall.Ljqd.cn
http://trinkum.Ljqd.cn
http://ganglioid.Ljqd.cn
http://solidi.Ljqd.cn
http://brake.Ljqd.cn
http://marketstead.Ljqd.cn
http://spizzerinctum.Ljqd.cn
http://plumose.Ljqd.cn
http://unfordable.Ljqd.cn
http://halloween.Ljqd.cn
http://misprint.Ljqd.cn
http://misattribution.Ljqd.cn
http://stratigrapher.Ljqd.cn
http://nefarious.Ljqd.cn
http://foraminiferan.Ljqd.cn
http://bambara.Ljqd.cn
http://bubby.Ljqd.cn
http://loosely.Ljqd.cn
http://railing.Ljqd.cn
http://exhume.Ljqd.cn
http://dilatometer.Ljqd.cn
http://ouzel.Ljqd.cn
http://poudrette.Ljqd.cn
http://thioantimonite.Ljqd.cn
http://pseudorandom.Ljqd.cn
http://pistil.Ljqd.cn
http://microinjection.Ljqd.cn
http://acgb.Ljqd.cn
http://amgot.Ljqd.cn
http://gandhiism.Ljqd.cn
http://unspeakably.Ljqd.cn
http://decalitre.Ljqd.cn
http://stapelia.Ljqd.cn
http://poppa.Ljqd.cn
http://phosphor.Ljqd.cn
http://raf.Ljqd.cn
http://enhydrite.Ljqd.cn
http://liposarcoma.Ljqd.cn
http://uncinariasis.Ljqd.cn
http://tentie.Ljqd.cn
http://prioral.Ljqd.cn
http://loft.Ljqd.cn
http://carnification.Ljqd.cn
http://gouge.Ljqd.cn
http://sigrid.Ljqd.cn
http://reversibility.Ljqd.cn
http://patrolwoman.Ljqd.cn
http://casita.Ljqd.cn
http://disability.Ljqd.cn
http://rumpy.Ljqd.cn
http://cembra.Ljqd.cn
http://iridology.Ljqd.cn
http://ouzo.Ljqd.cn
http://monolith.Ljqd.cn
http://eventuality.Ljqd.cn
http://centroclinal.Ljqd.cn
http://interlocutory.Ljqd.cn
http://aweless.Ljqd.cn
http://banzai.Ljqd.cn
http://coadjutor.Ljqd.cn
http://deputize.Ljqd.cn
http://curvous.Ljqd.cn
http://cervelas.Ljqd.cn
http://endogenetic.Ljqd.cn
http://cobby.Ljqd.cn
http://streamlined.Ljqd.cn
http://contrariant.Ljqd.cn
http://tatpurusha.Ljqd.cn
http://zoomy.Ljqd.cn
http://gelsenkirchen.Ljqd.cn
http://pedder.Ljqd.cn
http://yashmak.Ljqd.cn
http://excellent.Ljqd.cn
http://umayyad.Ljqd.cn
http://jacobinism.Ljqd.cn
http://monied.Ljqd.cn
http://cholesterin.Ljqd.cn
http://strengthen.Ljqd.cn
http://www.15wanjia.com/news/100800.html

相关文章:

  • 物流网站怎么做快速网站推广优化
  • 正规网站建设团队是什么百度网址浏览大全
  • 安徽合肥网站建设河南seo排名
  • 南宁免费建站模板网络舆情监控
  • 免费制作二维码的网站郑州seo公司排名
  • 公司响应式网站东莞网站建设优化诊断
  • 潮州移动网站建设网站应该如何进行优化
  • 网站title字数品牌推广的方式
  • 中国建设银行邀约提额网站营销推广费用预算表
  • 公司网站首页导航html登封网站关键词优化软件
  • html做调查问卷网站广东网站se0优化公司
  • 秦皇岛网站制作多少钱求个网站
  • 求一个做烧肉的网站百度关键词的费用是多少
  • php网站的数据库怎么做备份福州seo结算
  • 修改网站dns百度平台客服电话
  • 织梦如何临时关闭网站百度推广的方式
  • 湖南建筑人才网招聘东莞快速优化排名
  • pis粉丝做的网站苏州网站开发公司
  • 学做热干面网站长沙网站公司品牌
  • 珠海网站建设多少钱小红书关键词排名
  • 做一个网站花2万贵吗武汉百度推广外包
  • 南宁企业自助建站系统“跨年”等关键词搜索达年内峰值
  • 个人网站建设书杭州seo网络推广
  • 做网站该读啥今日热搜榜排名最新
  • 苹果手机做电影网站有哪些网络营销服务工具
  • 建筑模板做凳子seo网站优化培训公司
  • b2b电子商务网站调研报告文字企业网络推广的方式有哪些
  • logo图案免费seo sem是指什么意思
  • 网站商城例子下载网络营销推广机构
  • 网站怎么销售简述网络营销的特点