sundry

Typecho generates WeChat applets through JSON data.

WeChat applet
Small program is a new open capability, and developers can quickly develop a small program. Small programs can be easily acquired and disseminate in WeChat, and have excellent experience.

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

  • PHP 5.4 above
  • MySQL, PostgreSQL, SQLite support any kind of database and install related extensions in PHP.
  • CURL extension support
  • Extended support for mbstring or iconv

Need to set up in Typecho SSL , Fixed links , Pseudo static Domain name Keep on record It can be used normally.
Recommend SSL Typecho SSL configuration Pseudo static
Background settings

Source code Sunny 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 Typecho header template.

  1. Usr/themes/default/header.php

Simple JSON output can be achieved to achieve API effect.

Recommendation: plugin Version (highly customized)

Https://github.com/insoxin/typecho-json-miniprogram
 Typecho-json-miniprogram setup page

In the WeChat public platform https://mp.weixin.qq.com/cgi-bin/wx registration small program, after completing the registration, you can synchronize information improvement and development.

In the background of WeChat applet platform, select "Settings" = > "development settings", configure "server domain name" and "business domain name" as follows:

among Request The legitimate domain name must be configured, which ensures that the applet can be sent normally. Request Request, the program can run. At the same time, the domain name must be Keep on record

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

After completing the binding of small program developers and developing information configuration, developers can download developer tools and reference development documents to develop and debug small programs.
Common small program developer tools
Latest version download address (1.02.1803210)
Mac link: https://share.weiyun.com/5R8wo2B (password: K9AJ)
Add win64 link win64:https://share.weiyun.com/5NM8qin (password: YOTl)
My


Code package link: Https://pan.baidu.com/s/1EFIajj7lNmC4-_V8m_ZN-g (no trial)
After downloading, modify the following parameters

  1. Export default {
  2. GetDomain: blog.isoyu.com,
  3. GetWebsiteName: Ji Long Xin,
  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 applet development, submit the code to the WeChat team for review. After the audit is approved, it can be released (public beta can not be released).

Applet welcome

Fill in 151 other collection of small program source code (Fri, 13 Apr 2018 14:12:41 GMT)

Reminder: Content needs here Comment on this article Later merge Refresh To view it.

Fabulous ( Fifty-four )

This article is composed of Ji Chang Xin Creation, article address: Https://blog.isoyu.com/archives/typecho-json-miniprogram.html
Use Knowledge sharing signature 4 The international license agreement is licensed. In addition to the reprint / provenance, all originals or translations of this site must be signed before retransmission. The final editing time is May, 2, 2018 at 06:34 afternoon.

Hot articles

Commentary:

85 comments, visitors: 74, blogger: 11
  1.  SeaHi
    SeaHi Published in:

    Does God have a plan to publish the source code?

  2.  Tourist 213
    Tourist 213 Published in:

    Let's see.

  3.  Kzeal
    Kzeal Published in:

    Morning.

  4.  Tourist
    Tourist Published in:

    Morning.

  5.  Tourist
    Tourist Published in:

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

  6.  Tourist
    Tourist Published in:

    The plug-in is ready and the configuration is ready. Visit 404

    •  Tourist
      Tourist Published in:

      Thank
      Consult the article page how to get it.

  7.  Tourist
    Tourist Published in:

    You didn't pass the trial, you sent a dick.

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      Ah

  8.  Tourist
    Tourist Published in:

    The article is good.

  9.  Tourist
    Tourist Published in:

    Small program source code of the Baidu disk hung up.

  10.  Baidu
    Baidu Published in:

    Learn something

  11.  Tourist
    Tourist Published in:

    Morning.

  12.  Tourist
    Tourist Published in:

    Morning.

  13.  Tourist
    Tourist Published in:

    No source code, this article deleted.

  14.  SurgorX
    SurgorX Published in:

    Morning.

  15.  Tourist
    Tourist Published in:

    Zan

  16.  Tourist
    Tourist Published in:

    Code Baidu cloud hung up

  17.  Tourist
    Tourist Published in:

    Look at the source code.

  18.  Tourist
    Tourist Published in:

    Look at the source code.

  19.  Long-term
    Long-term Published in:

    Hello, WP just changed to Typecho to check it out.

  20.  Tourist
    Tourist Published in:

    Big guy, is there any small program end? For sharing.

  21.  Duo Duo Jin
    Duo Duo Jin Published in:

    It's amazing, but it seems that your little code has not been checked yet, and it has not been scanned. Https://www.nihaowua.com Transplanted to small programs, but afraid of bad audit pass

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      Deal with JSON, but is it too pornographic?

  22.  Nine Yue
    Nine Yue Published in:

    Hello!

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      Nine months? Yue?

  23.  Tourist
    Tourist Published in:

    Little Ji Ji.

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      Big guy early

  24.  Chen
    Chen Published in:

    Learning, thank you.

  25.  Chen
    Chen Published in:

    Good article! Support it!

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      Big guy good domain name

      •  Chen
        Chen Published in:

        What if I said I bought it six dollars?

      •  Ji Chang Xin
        Ji Chang Xin Published in:

        Do big guys think about it?

  26.  swim
    swim Published in:

    Cheat IP? Is there Typecho in it?

  27.  Drunken servant
    Drunken servant Published in:

    Which file is a small program of Typecho?

  28.  Tourist
    Tourist Published in:

    It has been refreshed many times, but it still can't be seen.

  29.  Tourist
    Tourist Published in:

    Can't be watched.

  30.  Drunken servant
    Drunken servant Published in:

    Plugin enabled failure

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      Please contact me by mail.

      •  Drunken servant
        Drunken servant Published in:

        There is no Typecho file at all.

  31.  Tourist
    Tourist Published in:

    Big guy, is there any small program end of TYPECHO here?

  32.  Cyril
    Cyril Published in:

    Which is the corresponding Typecho?

    •  V2EX
      V2EX Published in:

      With questions, I couldn't find the bottom of the sky.

  33.  Tourist
    Tourist Published in:

    Come to support

  34.  Cyril
    Cyril Published in:

    Why can't I see it after comment?

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      Refresh

      •  Cyril
        Cyril Published in:

        Well, there is a little delay. Thanks for sharing.

  35.  Null
    Null Published in:

    What is needed

  36.  V2EX
    V2EX Published in:

    Big Ji Ji, down your big bag, there is no small program in Typecho.

  37.  V2EX
    V2EX Published in:

    Boss, SkyDrive is out of order. bese

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      There's a supplement under the Bigfoot.

      •  V2EX
        V2EX Published in:

        The big guy is so long. Which is it?

  38.  Tourist
    Tourist Published in:

    ......

  39.  Tourist
    Tourist Published in:

    Good article! Support it!

  40.  Bean end
    Bean end Published in:

    Good article! Support it!

  41.  Null
    Null Published in:

    Good article! Support it!

  42.  Tourist
    Tourist Published in:

    Good article! Support it!

  43.  Hello- Lu
    Hello- Lu Published in:

    Asking for a code package link failed.

  44.  Tourist
    Tourist Published in:

    Blog applet OKer, but I want to do other small programs, bloggers can help organize and share.

  45.  Liu Xiao Wang
    Liu Xiao Wang Published in:

    The connection of Baidu cloud is invalid. We need to change GitHub.

    •  Ji Chang Xin
      Ji Chang Xin Published in:

      End of the holidays

      •  Liu Xiao Wang
        Liu Xiao Wang Published in:

        When to update the link of Baidu cloud? The vacation is over.

  46.  98K
    98K Published in:

    Built successfully, hoping bloggers simplify the process and optimize the page (too monotonous).

    •  Chinese robot
      Chinese robot Published in:

      Hello, the packaging link of Baidu cloud is invalid. Can you send me one?

  47.  West Feng Li blog
    West Feng Li blog Published in:

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

    •  Tourist
      Tourist Published in:

      No, it is trying to make a plug-in, go to Google, and search for a small partner has finished products, ready to re edit the article tomorrow.

    •  Tourist
      Tourist Published in:

      Big guy goes to bed early.

Comment

[required]

Invisibility?

Please wait three seconds after submission, so as not to cause unsuccessful successes and duplication.