sundry

Typecho generates wechat applet through JSON data

Wechat applet
Small program is a new open ability, developers can quickly develop a small program. Small programs can be easily obtained and spread in wechat, and have excellent use experience.

http://typecho.org/
Download and install the official website
Installation environment requirements

  • PHP 5.4 or above
  • Mysql, PostgreSQL, SQLite any kind of database support, and installed the related extensions in PHP
  • Curl extension support
  • Mbstring or iconv extension support

It needs to be set in typeecho ssl Fixed link Pseudo static And domain name keep on record Can be used normally.
Recommend SSL Typecho SSL configuration Pseudo static
Background settings

Bring code from Sunny day blog

  1. <?php
  2. if  ( stripos ( $this ->request->getRequestUri(), 'json')) {
  3.      $arr  =  array ();
  4.      while  ( $this ->next()) {
  5.          $a  =  array ('title' =>  $this ->title, ' date ' =>  $this -> date ->format('Y-m-j  H:i'), 'content' =>  $this ->content, 'categories' =>  $this ->categories, 'tags' =>  $this ->tags);
  6.          $arr [] =  $a ;
  7.     }
  8.      $this ->response->throwJson( array ( "servererror"  =>  "" "status"  => 1,  "message"  =>  $arr ));
  9. }
  10. ?>

Add to the beginning of the typeecho header template

  1. usr/themes/default/header.php

It can realize simple JSON output and API effect.

Recommendation: plug in Version (highly customized)

https://github.com/insoxin/typecho-json-miniprogram
 Typeecho JSON miniprogram settings page

Register the applet on the wechat public platform at https://mp.weixin.qq.com/cgi-bin/wx. After the registration, the information can be improved and developed synchronously.

In the background of wechat applet public platform, select "Settings" = > "development settings" to configure "server domain name" and "business domain name", as shown in the following figure:

among request The legal domain name must be configured. This parameter ensures that the applet can be sent normally request Request, the program can run. At the same time, this domain name must keep on record

Fill in the basic information of the small program, including name, picture, introduction and service scope, etc.

After completing the binding and development information configuration of the applet developer, the developer can download the developer tools and refer to the development documents for the development and debugging of the applet
Common applet developer tool
Download address of the latest version (1.02.1803210)
Mac link: https://share.weiyun.com/5r8wo2b (password: k9aj)
Supplement win64 link win64: https://share.weiyun.com/5nm8qin (password: yotl)
my


Code packaging link: https://pan.baidu.com/s/1EFIajj7lNmC4-_ V8m_ ZN-g (untried)
Modify the following parameters after downloading

  1. export default {
  2.   getDomain: blog.isoyu.com,
  3. Getwebsitename: Ji Changxin,
  4.   getAboutId: ABOUTID,
  5.   getPayTemplateId: PAYTEMPPLATEID,
  6.   getPageCount: PAGECOUNT,
  7.   getCategoriesID :CATEGORIESID,
  8.   getIndexNav: INDEXNAV,
  9.   getReplayTemplateId: REPLAYTEMPPLATEID,
  10.   getMinAppType: MINAPPTYPE,
  11.   getZanImageUrl: ZANIMAGEURL,
  12.   getIndexListType: INDEXLISTTYPE,
  13.   getLogo: LOGO,
  14.   getPostImageUrl: POSTERIMGURL
  15. }

After completing the development of the applet, submit the code to the wechat team for review, and the code can be released after passing the review (it cannot be released during the public test).

Welcome to applets

Add 151 other collected applet source code (Fri, 13 APR, 2018 14:12:41 GMT)

reminder: The content here requires Comment on this article After merging Refresh To view.

fabulous ( fifty-eight )

This paper is written by Ji Changxin Creation, article address: https://blog.isoyu.com/archives/typecho-json-miniprogram.html
use 4 Signature knowledge sharing International license agreement. Except for the reprint / source, they are all original or translated by our website. Please sign before reprinting. Last editing time: May 2, 2018 at 06:34 PM

Hot articles

Comments:

90 comments, 79 visitors, 11 bloggers
  1.  tourist
    tourist Published on:

    I don't know if the boss is still updating

  2.  tourist
    tourist Published on:

    Let's have a look~~~~~~

  3.  tourist
    tourist Published on:

    Have a look

  4.  tourist
    tourist Published on:

    two hundred and twenty-two thousand two hundred and twenty-two trillion and two hundred and twenty-two billion two hundred and twenty-two million two hundred and twenty-two thousand two hundred and twenty-two

  5.  tourist
    tourist Published on:

    Good morning

  6.  seaHi
    seaHi Published on:

    Is there any plan to publish the source code?

  7.  Visitors 213
    Visitors 213 Published on:

    Let's see

  8.  kzeal
    kzeal Published on:

    Good morning

  9.  tourist
    tourist Published on:

    Good morning

  10.  tourist
    tourist Published on:

    Big guy this small program is developed well, as long as the configuration is OK?

  11.  tourist
    tourist Published on:

    The plug-in is installed and the configuration is configured. Visit 404

    •  tourist
      tourist Published on:

      thank
      How to get the content of the article...

  12.  tourist
    tourist Published on:

    You get a dick without a trial

    •  Ji Changxin
      Ji Changxin Published on:

      Oh

  13.  tourist
    tourist Published on:

    The article is good

  14.  tourist
    tourist Published on:

    Small program source Baidu disk hang

  15.  Baidu
    Baidu Published on:

    Learn about it

  16.  tourist
    tourist Published on:

    Good morning

  17.  tourist
    tourist Published on:

    Good morning

  18.  tourist
    tourist Published on:

    Source code is not put, this article has been deleted

  19.  SurgorX
    SurgorX Published on:

    Good morning

  20.  tourist
    tourist Published on:

    fabulous?

  21.  tourist
    tourist Published on:

    Code Baidu cloud hanging

  22.  tourist
    tourist Published on:

    Take a look at the source code

  23.  tourist
    tourist Published on:

    Take a look at the source code

  24.  long-term
    long-term Published on:

    Hello, WP just changed to Typecho. Come and have a look

  25.  tourist
    tourist Published on:

    Big guy, is there a small program? Please share.

  26.  Dostofkin
    Dorkins Published on:

    Great, but it seems that your small program code has not passed the audit, did not scan out, want to give their own https://www.nihaowua.com I'm afraid it won't pass the audit

    •  Ji Changxin
      Ji Changxin Published on:

      Just deal with JSON, but is the big guy too pornographic? Ha ha ha

  27.  Yue Jiuyue
    Jiuyue Published on:

    Hello

    •  Ji Changxin
      Ji Changxin Published on:

      Nine months? Yue?

  28.  tourist
    tourist Published on:

    Good morning, little Ji Ji

    •  Ji Changxin
      Ji Changxin Published on:

      Good morning

  29.  chen
    chen Published on:

    Study and study, thank you

  30.  chen
    chen Published on:

    Good article! Support it!

    •  Ji Changxin
      Ji Changxin Published on:

      Good domain name

      •  Chen
        Chen Published on:

        What if I said I got it for six dollars

        •  Ji Changxin
          Ji Changxin Published on:

          Do you think about it

  31.  swim
    swim Published on:

    Cheat IP, right? Is there a Typecho in it?

  32.  Drunk servant
    Drunk servant Published on:

    Which file is a small program of typeecho?

  33.  tourist
    tourist Published on:

    It's been refreshed many times, but I still can't see it

  34.  tourist
    tourist Published on:

    Can't be watched.

  35.  Drunk servant
    Drunk servant Published on:

    Failed to enable plug-in

    •  Ji Changxin
      Ji Changxin Published on:

      Contact me with photos

      •  Drunk servant
        Drunk servant Published on:

        There's no Typecho file at all

  36.  tourist
    tourist Published on:

    Do you have any apps for type?

  37.  Cyril
    Cyril Published on:

    Which is the corresponding Typecho?

    •  v2ex
      v2ex Published on:

      Ask the same question, turn the bottom to the sky, but can't find...

  38.  tourist
    tourist Published on:

    Come and support

  39.  Cyril
    Cyril Published on:

    Why can't I see it after the comment

    •  Ji Changxin
      Ji Changxin Published on:

      Refresh

      •  Cyril
        Cyril Published on:

        Well, a little bit late. Thank you for sharing

  40.  null
    null Published on:

    What is needed

  41.  V2EX
    V2EX Published on:

    Maggie ah, under your big gift bag, there is no small program of this typeecho

  42.  V2EX
    V2EX Published on:

    Boss, the network disk is invalid, please share. bese

    •  Ji Changxin
      Ji Changxin Published on:

      There's a remedy under the boss

      •  V2EX
        V2EX Published on:

        Which one is so long under the boss

  43.  tourist
    tourist Published on:

    。。。。。。。。

  44.  tourist
    tourist Published on:

    Good article! Support it!

  45.  Bean powder
    Bean powder Published on:

    Good article! Support it!

  46.  null
    null Published on:

    Good article! Support it!

  47.  tourist
    tourist Published on:

    Good article! Support it!

  48.  Hello Lu
    Hello Lu Published on:

    For a code package link, invalid

  49.  tourist
    tourist Published on:

    Blog app oke, but I want to do other small programs, bloggers can help organize and share

  50.  Liu Xiaohuan
    Liu Xiaohuan Published on:

    Baidu cloud connection is invalid, please change a GitHub

    •  Ji Changxin
      Ji Changxin Published on:

      Wait until the holiday is over

      •  Liu Xiaohuan
        Liu Xiaohuan Published on:

        When to update Baidu cloud?? The holiday is over

  51.  98K
    98K Published on:

    It's too monotonous to build and optimize the process

    •  Chinese robots
      Chinese robots Published on:

      Hello, the baidu cloud package link is invalid, can you send me a copy

  52.  Xifengli blog
    Xifengli blog Published on:

    Big guy this small program is developed well, as long as the configuration is OK?

    •  tourist
      tourist Published on:

      Search for a small way to make a plug-in, and then try to edit it tomorrow

    •  tourist
      tourist Published on:

      Go to bed early

  53.  Ji Changxin
    Ji Changxin Published on:

    This is a comment through wechat applet

Comment

[required]

invisibility?

Please wait three seconds after submitting to avoid unsuccessful submission and repetition