WeChat mini-program review: how to bypass the online review of WeChat mini-programs, remember to like it if it is useful

How to bypass the online review of WeChat applets (it’s not easy to use and come back to complain about me)

foreword

When developing projects, many developers find that the most difficult part of launching WeChat Mini Programs is not the development stage, but the WeChat review mechanism. Because WeChat uses its own platform to avoid legal risks, many functions need to provide relevant certificates or qualifications, but related It is very difficult to apply for qualifications, or ordinary companies cannot do it at all. Then bypassing the review is a very important online skill.

Option One

Many solutions on the Internet set a state through the background, open it during the review, let the review see the prepared page, and close it after the review.
One disadvantage of this form of review is that during this period, normal users There will be an audit page when you visit. This is very uncomfortable.

The suggestion is to set two variables through the interface, use one variable each time, use another variable next time, and use them alternately, so as to avoid the situation that normal users see the audit page during the audit period

Option 2 (recommended)

The following is a way of seamless switching, which can pass the review without making the user aware.
Solution 1 The user cannot access the project normally during the review stage, so we consider letting the user pass the review without perception

Let me talk about the mechanism of WeChat review first, don't ask where it came from, the team has been groping for several years, and it will make me cry if I say too much (this is very important) 1. The version checked by WeChat reviewers
is the development version, not the official version And the experience version .
2. The time for WeChat review generally ranges from 1 hour to 1 day. The following is the approximate time:

The fastest review on non-working days | Within 1 hour,
the review will be very fast during the afternoon to 6 o'clock on weekdays | 1 hour to 2 hours,
the time is not fixed from 6 o'clock to early morning on weekdays |
The review time ranges from 1 to 6 hours after midnight It will be very long | Normally it will be reviewed the next morning

3. Due to the different reviewers, WeChat has different review efforts. Sometimes it is easy to pass, and sometimes you will be stuck for a long time. Generally, it is easy to pass the review on weekdays. If it is released on Saturday or Sunday, the reviewer will review it more strictly. For example, if the page used for review is too simple, it will be considered as a dome, or it will use routing to jump to other pages for review one by one. The summary is that when the review is not busy, it will be very painful to dig out the details. Although subsequent modifications can be processed, the process it's painful.
Please add a picture description

Here comes the important point : the WeChat applet provides an API to check whether it is an online version or a development version: wx.getAccountInfoSync()

Use wx.getAccountInfoSync() to obtain whether it is an experience version or an official version. Through the status judgment, write a simple review page and show it to the reviewer. The review page must have certain functions, and if it is too simple, it will be recognized as a dome page. In this
way audit bypassed.

the code

Create a new component page of onlineCompoenet, which is used to bypass WeChat audit

Audit component onlineCompoenet.js

const app = getApp()
Component({
    
    
  /**
   * 组件的属性列表
   */
  properties: {
    
    

  },
  lifetimes: {
    
    
    // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
    attached: function () {
    
    
      const that = this;
      const accountInfo = wx.getAccountInfoSync(); // develop  	开发版 
      accountInfo.miniProgram.envVersion = 'release';
      if (accountInfo.miniProgram.envVersion === 'release' || accountInfo.miniProgram.envVersion === 'trial') {
    
    
        that.setData({
    
    
          showComponenet: false,
        });
      } else {
    
    
        app.globalData.isOnline = true;
        that.setData({
    
    
          showComponenet: true
        });
    
        wx.setNavigationBarTitle({
    
    
          title: '列表',
        });
        try {
    
    
          wx.hideTabBar({
    
    
            fail: function () {
    
    
              setTimeout(function () {
    
     // 做了个延时重试一次,作为保底。
                wx.hideTabBar()
              }, 500)
            }
          });
        } catch (error) {
    
    

        }

      }
    },
    moved: function () {
    
    },
    detached: function () {
    
    },
  },
  /**
   * 组件的初始数据
   */
  data: {
    
    
    showComponenet:false
  },

  /**
   * 组件的方法列表
   */
  methods: {
    
    
    

  }
})



Audit component onlineCompoenet.wxml The content of the audit component should preferably be introductory content, such as official website introduction, product introduction, etc. This kind of page also needs to do some interactive functions to prevent the audit from thinking that the page is too simple and not approved. It is recommended to do something simple Secondary pages or maps, telephones, etc. can be considered.

<view wx:if="{
     
     {showComponenet}}" class="recommend_null">

</view>

Introduce the global component in app.json, so that any page can use this component


Just add components to index.wxml


wx.getAccountInfoSync()
Please add a picture description

I wish you all a smooth release of the online project, useful one-click three links

Guess you like

Origin blog.csdn.net/weixin_43614065/article/details/125778486