Campus applet source code used books

Download Source, import applet development tool.

2. Configure basic functions.

With a program data storage applet cloud development, so we must first open cloud development and then configure the basic environment, locally installed dependence.

applet / app.js 中:

wx.cloud.init({
        env: ' Book-8sn74 ' , // modified to your cloud environment, the above mentioned id 
        traceUser: to true ,
      })
      
globalData: {
haved:false,
    share_title: " " Chongqing University secondhand "Come and share your zombie book club " ,   // share the title 
    SHARE_URL: " https://qiniu.98api.cn/cqubook/share.php "   // Share pictures 
  }    

Installation in dependence cloudfunctions.

3. The opening isbn query interface

Because watercress isbn not very wide, so here isbn interface to help speed up data

address:

https://www.jisuapi.com/api/isbn/

No PY transaction, select it because on the one hand data is very wide, on the one hand a very low price, I Baidu is the cheapest, will deliver the opening for the first time 1000, in fact, good enough for some time, because the data each identified I first stored in the library, the number of actual request interface is not much, after all, a lot of people's books are similar.

To modify the interface in cloudfunctions / bookinfo in

4. Interface Configuration FIG sharing poster

Address modified:

applet / pages / detail / details

qrcode(){
var that = this;
var url = 'https://qiniu.98api.cn/cqubook/qrcode.php?id=' + that.data.key;

Before the back-end file reference article:

php applet parameter passing to generate two-dimensional code

The corresponding need to configure the domain name was downedfile:

http://www.jisuapp.cn

And your two-dimensional code domain interfaces

Then there are some small details, Chongqing University own global search can be replaced, nothing of the need to modify.

download link:



Guess you like

Origin www.cnblogs.com/lanshu/p/11820305.html