AI微信小程序源码下载人脸照片AI转换动漫照片全新源码安装简单无需服务器域名
源码
云开发AI视频换脸加AI工具箱微信小程序源码(附搭建教程)
源码下载
https://github.com/peizhou/faceoff
下载源码到本地后,修改appid
修改为你自己的微信小程序,打开 /dist/pages/ele/index.js
配置微信小程序request域名
管理后台配置
核心代码
(wx.webpackJsonp = wx.webpackJsonp || []).push([ [ 38 ], {274: function(e, c, a) {e.exports = a.p + "assets/face_delete.png";},433: function(e, c, a) {"use strict";a.r(c);var t = a(7), n = a(2), s = a.n(n), i = a(5), r = a(19), o = a(1), j = a(71), f = a.n(j), l = a(151), _ = a.n(l), b = a(274), u = a.n(b), p = a(20), O = a(22), d = a(90), h = a(111), m = a(155), g = a(110), x = a(4), w = a.n(x), v = a(8), N = a(152), k = a(66), C = a(18), A = a(0), F = function() {var e = Object(O.c)(function(e) {return e.face;}), c = Object(O.b)();Object(C.c)({type: "app"});var a, t, n, j, l = "", b = function() {t && t();}, x = function() {var e = Object(i.a)(s.a.mark(function e(a, t) {var n;return s.a.wrap(function(e) {for (;;) switch (e.prev = e.next) {case 0:return "camera" === a && Object(k.a)(500), Object(v.d)(), e.next = 4, Object(g.a)(a, t);case 4:0 == (n = e.sent).code ? (c(Object(d.c)(n.data)), Object(v.c)(), w.a.navigateTo({url: "/pages/preview/index",success: function() {j && j();}})) : (Object(v.c)(), 1 == n.code && Object(v.b)(n.err));case 6:case "end":return e.stop();}}, e);}));return function(c, a) {return e.apply(this, arguments);};}();return Object(A.jsxs)(r.b, {className: f.a.face_manager,children: [ Object(A.jsxs)(o.j, {className: f.a.container,children: [ Object(A.jsx)(o.j, {className: f.a.add,onClick: function() {n && n();},children: Object(A.jsx)(o.j, {className: f.a.content,children: Object(A.jsx)(o.c, {className: f.a.image,mode: "aspectFit",src: _.a})})}), e.items.map(function(e) {return Object(A.jsxs)(o.j, {className: f.a.item,children: [ Object(A.jsx)(N.a, {stateClassName: f.a.content,src: Object(p.b)(e.sign),width: e.width,height: e.height,viewWidth: 140,viewHeight: 140,focus: e.focus}, e.sign), Object(A.jsx)(o.j, {className: f.a.delete,onClick: function() {l = e.sign, a && a();},children: Object(A.jsx)(o.c, {className: f.a.image,mode: "aspectFit",src: u.a})}) ]});}) ]}), Object(A.jsx)(h.a, {title: "确定要删除头像吗?",texts: [ "删除头像后,您上传的照片将从服务器删除" ],textAlignment: "center",ok: "确定",cancel: "取消",fnAlertOpen: function(e) {a = e;},fnAlertClose: function(e) {t = e;},onAlertOk: function() {b(), c(Object(d.b)(l));},onAlertCancel: function() {b();}}), Object(A.jsx)(m.a, {title: "选择人脸图像",showFaceChoose: !1,showFacePicker: !0,showFaceOptions: !1,onPickerChanged: x,fnFaceOpen: function(e) {n = e;},fnFaceClose: function(e) {j = e;}}) ]});};F.enableShareTimeline = !0, F.enableShareAppMessage = !0, Page(Object(t.createPageConfig)(F, "pages/user/face", {root: {cn: []}}, {navigationBarTitleText: "人像管理",enableShareAppMessage: !0,enableShareTimeline: !0} || {}));},71: function(e, c, a) {e.exports = {face_manager: "face__face_manager___3Rezt",container: "face__container___1hyRh",add: "face__add___cANTz",content: "face__content___ZLj8f",image: "face__image___XehEj",item: "face__item___1OdsW",delete: "face__delete___lqczP"};}
}, [ [ 433, 0, 1, 2, 3 ] ] ]);
插屏广告,激励广告和原生广告,由于采用了微信云开发没有后台,
所以不需要域名和服务器也可以正常搭建使用,所有的配置都可以在app.js文件中进行修改,
目前接口还可以正常使用,小程序首页包含了八种类目、上百个短视频可供使用,
连肌肉金轮的原素材也是包括在内。
本程序不仅让用户体验一键换脸的快乐,右侧还有涵盖了5种功能的多功能工具箱,
不仅可以无水印提取热门短视频,还包含了智能抠图去除背景,选择照片后可以自动扣除背景图片,
直接导入小程序到微信开发者工具再添加合法域名就可以看到小程序的演示页面了.