微信小程序的发布

发布基本需要三个步骤

1.发布代码

2.提交审核

3.更新版本

首先在微信开发工具中设置服务器白名单

把自己需要的服务器地址放在白名单里,这样微信才能识别文件从而获取数据,这样做的话要记得把微信中的不校验合法域名的对勾点了

2.点击上传代码

上传成功后点击确定

3.去小程序界面https://mp.weixin.qq.com

点击左侧版本管理在右侧提交之前上传的代码

4.填写资料,第一次提交比较繁琐,会提交一些关于程序和个人的资料

之后添加开发者,是添加可以修改代码操作代码的人

全部填写完成后提交审核

之后填写对小程序的描述

提交成功后会在1-7添给你回复

一般加急的话比较快

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
微信小程序发布动态的代码示例: 1. 在 wxml 文件中创建一个表单,用于用户输入动态内容和上传图片。 ```html <view> <form bindsubmit="submitForm"> <textarea name="content" placeholder="输入动态内容"></textarea> <button type="button" bindtap="chooseImage">选择图片</button> <image wx:if="{{imageList.length > 0}}" wx:for="{{imageList}}" wx:key="{{item.id}}" src="{{item.path}}" mode="aspectFit"></image> <button type="submit">发布动态</button> </form> </view> ``` 2. 在 js 文件中编写 submitForm 函数,用于提交表单数据。 ```javascript Page({ data: { imageList: [] }, chooseImage() { wx.chooseImage({ success: res => { const tempFilePaths = res.tempFilePaths const imageList = this.data.imageList.concat(tempFilePaths.map(path => ({ id: Date.now(), path }))) this.setData({ imageList }) } }) }, submitForm(e) { const content = e.detail.value.content const images = this.data.imageList.map(item => item.path) wx.request({ url: 'https://example.com/api/post', method: 'POST', data: { content, images }, success: res => { wx.showToast({ title: '发布成功' }) // 返回上一页 wx.navigateBack() } }) } }) ``` 3. 在后端服务器中编写接收动态数据的 API,用于将用户发布的动态保存到数据库中。 ```javascript app.post('/api/post', (req, res) => { const { content, images } = req.body const post = new Post({ content, images, createdAt: new Date() }) post.save(err => { if (err) { res.status(500).send(err.message) } else { res.sendStatus(200) } }) }) ``` 以上就是一个简单的微信小程序发布动态的代码示例,具体实现细节还需要根据你的具体需求进行调整和完善。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值