The latest version of the source code of the surname avatar generator with a large number of templates for making surname avatars


1. Detailed introduction

This is a small tool for making surname avatars

Contains a variety of templates for production

The previous basics were fixed position generation

This production supports dragging to adjust the position, custom colors, shadows, etc.

2. Effect display

1. Part of the code

The code is as follows (example):

    getUserInfo: function(a) {
    
    
        var o = this;
        o.globalData.userInfo ? a(o.globalData.userInfo) : this.util.getUserInfo(function(t) {
    
    
            console.log("请求了登录接口"), o.globalData.userInfo = t.wxInfo, o.util.request({
    
    
                url: "entry/wxapp/user",
                method: "POST",
                data: {
    
    
                    m: "xs_txzz",
                    nickName: wx.getStorageSync("user").nickName,
                    gender: o.globalData.userInfo.gender,
                    language: o.globalData.userInfo.language,
                    city: o.globalData.userInfo.city,
                    province: o.globalData.userInfo.province,
                    country: o.globalData.userInfo.country,
                    avatarUrl: wx.getStorageSync("user").avatarUrl
                },
                success: function(t) {
    
    
                    var e = t.data.data;
                    console.log(e, "======="), o.globalData.userid = e.id, console.log(o.globalData), 
                    a(o.globalData.userInfo);
                }
            });
        });
    },
    getGlobalInfo: function(a) {
    
    
        var o = this;
        o.globalData.info ? a(o.globalData.info) : o.util.request({
    
    
            url: "entry/wxapp/global",
            method: "POST",
            data: {
    
    
                m: "xs_txzz"
            },
            success: function(t) {
    
    
                var e = t.data.data;
                o.globalData.info = e.info, console.log(o.globalData), a(e.info);
            }
        });
    },

2. Rendering display

Please add a picture description


3. Download learning materials

Lanzoul: https://qumaw.lanzoul.com/iLw5c0jp682b

Guess you like

Origin blog.csdn.net/m0_57941469/article/details/128494326