Compare commits

...

3 Commits

  1. 9
      api/paint.js
  2. 3
      main.js
  3. 543
      package-lock.json
  4. 14
      pages.json
  5. 276
      pages/ai/paint/loverPainResult.vue
  6. 262
      pages/ai/paint/loverPaint.vue
  7. 26
      pages/index/indexProto.vue

9
api/paint.js

@ -29,6 +29,15 @@ export function textToImg(data) {
})
}
// 520情侣头像
export function textToImgLove(data) {
return request({
url: `${serviceTitle}${prefix}/textToImgLove`,
method: 'post',
data
})
}
// 获取绘画者ai绘画分页
export function getAiPaintPage(data) {
return request({

3
main.js

@ -5,8 +5,9 @@ import common from './utils/common.js'
// const baseURL = 'http://localhost:7010'
// const baseURL = 'http://81.69.47.31:7010'
const baseURL = 'https://service.bnyer.cn'
// const baseURL = 'https://service.bnyer.cn'
//const baseURL = 'http://vaqc3e.natappfree.cc'
const baseURL = 'http://47.108.66.163:7010'
Vue.prototype.baseURL = baseURL;
Vue.prototype.$noMultipleClicks = common.noMultipleClicks;

543
package-lock.json

@ -1,473 +1,15 @@
{
"name": "bnyer-cloud-tiktok",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"axios": "^0.26.1",
"qs": "^6.10.3",
"vue-router": "^4.0.14",
"vuex": "^4.0.2"
}
},
"node_modules/@babel/parser": {
"version": "7.21.3",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.21.3.tgz",
"integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==",
"peer": true,
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@vue/compiler-core": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.2.47.tgz",
"integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==",
"peer": true,
"dependencies": {
"@babel/parser": "^7.16.4",
"@vue/shared": "3.2.47",
"estree-walker": "^2.0.2",
"source-map": "^0.6.1"
}
},
"node_modules/@vue/compiler-dom": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz",
"integrity": "sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==",
"peer": true,
"dependencies": {
"@vue/compiler-core": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz",
"integrity": "sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==",
"peer": true,
"dependencies": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.47",
"@vue/compiler-dom": "3.2.47",
"@vue/compiler-ssr": "3.2.47",
"@vue/reactivity-transform": "3.2.47",
"@vue/shared": "3.2.47",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7",
"postcss": "^8.1.10",
"source-map": "^0.6.1"
}
},
"node_modules/@vue/compiler-ssr": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz",
"integrity": "sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==",
"peer": true,
"dependencies": {
"@vue/compiler-dom": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"node_modules/@vue/devtools-api": {
"version": "6.1.4",
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.1.4.tgz",
"integrity": "sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ=="
},
"node_modules/@vue/reactivity": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.2.47.tgz",
"integrity": "sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==",
"peer": true,
"dependencies": {
"@vue/shared": "3.2.47"
}
},
"node_modules/@vue/reactivity-transform": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz",
"integrity": "sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==",
"peer": true,
"dependencies": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.47",
"@vue/shared": "3.2.47",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7"
}
},
"node_modules/@vue/runtime-core": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.2.47.tgz",
"integrity": "sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==",
"peer": true,
"dependencies": {
"@vue/reactivity": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"node_modules/@vue/runtime-dom": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.2.47.tgz",
"integrity": "sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==",
"peer": true,
"dependencies": {
"@vue/runtime-core": "3.2.47",
"@vue/shared": "3.2.47",
"csstype": "^2.6.8"
}
},
"node_modules/@vue/server-renderer": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.2.47.tgz",
"integrity": "sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==",
"peer": true,
"dependencies": {
"@vue/compiler-ssr": "3.2.47",
"@vue/shared": "3.2.47"
},
"peerDependencies": {
"vue": "3.2.47"
}
},
"node_modules/@vue/shared": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.47.tgz",
"integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==",
"peer": true
},
"node_modules/axios": {
"version": "0.26.1",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"dependencies": {
"follow-redirects": "^1.14.8"
}
},
"node_modules/call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"dependencies": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
}
},
"node_modules/csstype": {
"version": "2.6.21",
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-2.6.21.tgz",
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==",
"peer": true
},
"node_modules/estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"peer": true
},
"node_modules/follow-redirects": {
"version": "1.15.0",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.0.tgz",
"integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==",
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"node_modules/get-intrinsic": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
"dependencies": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1"
}
},
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dependencies": {
"function-bind": "^1.1.1"
},
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/magic-string": {
"version": "0.25.9",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz",
"integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
"peer": true,
"dependencies": {
"sourcemap-codec": "^1.4.8"
}
},
"node_modules/nanoid": {
"version": "3.3.6",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"peer": true,
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/object-inspect": {
"version": "1.12.0",
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.0.tgz",
"integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g=="
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
"peer": true
},
"node_modules/postcss": {
"version": "8.4.21",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.21.tgz",
"integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
"peer": true,
"dependencies": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/qs": {
"version": "6.10.3",
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.10.3.tgz",
"integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
"dependencies": {
"side-channel": "^1.0.4"
},
"engines": {
"node": ">=0.6"
}
},
"node_modules/side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"dependencies": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/sourcemap-codec": {
"version": "1.4.8",
"resolved": "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
"deprecated": "Please use @jridgewell/sourcemap-codec instead",
"peer": true
},
"node_modules/vue": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.2.47.tgz",
"integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==",
"peer": true,
"dependencies": {
"@vue/compiler-dom": "3.2.47",
"@vue/compiler-sfc": "3.2.47",
"@vue/runtime-dom": "3.2.47",
"@vue/server-renderer": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"node_modules/vue-router": {
"version": "4.0.15",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.0.15.tgz",
"integrity": "sha512-xa+pIN9ZqORdIW1MkN2+d9Ui2pCM1b/UMgwYUCZOiFYHAvz/slKKBDha8DLrh5aCG/RibtrpyhKjKOZ85tYyWg==",
"dependencies": {
"@vue/devtools-api": "^6.0.0"
},
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/vuex": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",
"integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==",
"dependencies": {
"@vue/devtools-api": "^6.0.0-beta.11"
},
"peerDependencies": {
"vue": "^3.0.2"
}
}
},
"lockfileVersion": 1,
"dependencies": {
"@babel/parser": {
"version": "7.21.3",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.21.3.tgz",
"integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==",
"peer": true
},
"@vue/compiler-core": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.2.47.tgz",
"integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==",
"peer": true,
"requires": {
"@babel/parser": "^7.16.4",
"@vue/shared": "3.2.47",
"estree-walker": "^2.0.2",
"source-map": "^0.6.1"
}
},
"@vue/compiler-dom": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz",
"integrity": "sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==",
"peer": true,
"requires": {
"@vue/compiler-core": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"@vue/compiler-sfc": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz",
"integrity": "sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==",
"peer": true,
"requires": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.47",
"@vue/compiler-dom": "3.2.47",
"@vue/compiler-ssr": "3.2.47",
"@vue/reactivity-transform": "3.2.47",
"@vue/shared": "3.2.47",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7",
"postcss": "^8.1.10",
"source-map": "^0.6.1"
}
},
"@vue/compiler-ssr": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz",
"integrity": "sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==",
"peer": true,
"requires": {
"@vue/compiler-dom": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"@vue/devtools-api": {
"version": "6.1.4",
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.1.4.tgz",
"integrity": "sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ=="
},
"@vue/reactivity": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.2.47.tgz",
"integrity": "sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==",
"peer": true,
"requires": {
"@vue/shared": "3.2.47"
}
},
"@vue/reactivity-transform": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz",
"integrity": "sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==",
"peer": true,
"requires": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.47",
"@vue/shared": "3.2.47",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7"
}
},
"@vue/runtime-core": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.2.47.tgz",
"integrity": "sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==",
"peer": true,
"requires": {
"@vue/reactivity": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"@vue/runtime-dom": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.2.47.tgz",
"integrity": "sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==",
"peer": true,
"requires": {
"@vue/runtime-core": "3.2.47",
"@vue/shared": "3.2.47",
"csstype": "^2.6.8"
}
},
"@vue/server-renderer": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.2.47.tgz",
"integrity": "sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==",
"peer": true,
"requires": {
"@vue/compiler-ssr": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"@vue/shared": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.47.tgz",
"integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==",
"peer": true
},
"axios": {
"version": "0.26.1",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.26.1.tgz",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"requires": {
"follow-redirects": "^1.14.8"
@ -482,22 +24,10 @@
"get-intrinsic": "^1.0.2"
}
},
"csstype": {
"version": "2.6.21",
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-2.6.21.tgz",
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==",
"peer": true
},
"estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"peer": true
},
"follow-redirects": {
"version": "1.15.0",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.0.tgz",
"integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ=="
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
},
"function-bind": {
"version": "1.1.1",
@ -527,43 +57,11 @@
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
},
"magic-string": {
"version": "0.25.9",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz",
"integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
"peer": true,
"requires": {
"sourcemap-codec": "^1.4.8"
}
},
"nanoid": {
"version": "3.3.6",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"peer": true
},
"object-inspect": {
"version": "1.12.0",
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.0.tgz",
"integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g=="
},
"picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
"peer": true
},
"postcss": {
"version": "8.4.21",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.21.tgz",
"integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
"peer": true,
"requires": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
}
},
"qs": {
"version": "6.10.3",
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.10.3.tgz",
@ -582,37 +80,6 @@
"object-inspect": "^1.9.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"peer": true
},
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"peer": true
},
"sourcemap-codec": {
"version": "1.4.8",
"resolved": "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
"peer": true
},
"vue": {
"version": "3.2.47",
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.2.47.tgz",
"integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==",
"peer": true,
"requires": {
"@vue/compiler-dom": "3.2.47",
"@vue/compiler-sfc": "3.2.47",
"@vue/runtime-dom": "3.2.47",
"@vue/server-renderer": "3.2.47",
"@vue/shared": "3.2.47"
}
},
"vue-router": {
"version": "4.0.15",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.0.15.tgz",

14
pages.json

@ -63,6 +63,20 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/ai/paint/loverPaint",
"style": {
"navigationBarTitleText": "专属情侣头像",
"enablePullDownRefresh": false
}
},
{
"path": "pages/ai/paint/loverPainResult",
"style": {
"navigationBarTitleText": "专属情侣头像",
"enablePullDownRefresh": false
}
},
{
"path": "pages/userInfo/userInfo",
"style": {

276
pages/ai/paint/loverPainResult.vue

@ -0,0 +1,276 @@
<template>
<view class="wrap">
<view class="top-box">
<view class="love-title">
</view>
<view class="top-img-box">
<view v-if="!finishDraw" class="loading">
<view class="loading-icon">
<uni-icons type="spinner-cycle" size="40"></uni-icons>
</view>
<view class="loading-tips">
Ai正在拼命绘制中.....
</view>
</view>
<view v-if="finishDraw" class="img-item-box">
<img class="img-item" :src="`data:image/png;base64,${resultImg[0]}`" >
<img class="img-item" :src="`data:image/png;base64,${resultImg[1]}`" >
<view class="heart-icon"></view>
</view>
</view>
<view v-if="finishDraw" class="button-box">
<view class="save-button" @click="clickSave(resultImg[0])"></view>
<view class="save-button" @click="clickSave(resultImg[1])"></view>
</view>
</view>
</view>
</template>
<script>
import base64ToImg from '@/utils/base64Utils';
import { textToImgLove} from '@/api/paint.js';
export default {
data() {
return {
resultImg: [],
finishDraw: false
}
},
onLoad(options) {
//
const paintData = JSON.parse(options.data);
// console.log('paintData',paintData);
// let paintData = {
// appType: 0,
// painterId: 1657690826066698200,
// painterName: "LangZ",
// platform: 1,
// prompt: "",
// scenePrompt: ""
// }
const that = this
textToImgLove(paintData).then(res =>{
if(res.data.code === 200){
uni.hideLoading();
console.log('res',res);
that.resultImg = res.data.data
that.finishDraw = true
console.log(that.resultImg);
}else{
uni.navigateBack({
success() {
uni.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
});
}
})
}
});
},
methods: {
//base64
clickSave(url){
let str = "data:image/png;base64,"+url;
base64ToImg(str,res =>{
console.log('解析出的图片路径为:',res)
// this.saveUrl = res;
this.download(res)
//complatecss
});
},
//
download(url) {
// url = this.base64ToPath(url)
let that = this;
//console.log('',that.transImg)
uni.showLoading({
title: '正在保存图片...',
success() {
//
uni.getSetting({
success: (res) => {
//
if (!res.authSetting["scope.album"]) {
//
uni.authorize({
scope: "scope.album",
success: () => {
uni.saveImageToPhotosAlbum({
//
filePath: url,
success: (res) => {
},
fail: (res) => {
return uni.showToast({
title: res.errMsg,
icon: 'none'
});
},
complete: (res) => {
uni.hideLoading();
if (res.errMsg !== "saveImageToPhotosAlbum:ok") {
return uni.showToast({
title: "下载失败!",
icon: 'none'
});
} else {
return uni.showToast({
title: "保存成功!",
icon: 'none',
success() {
}
});
}
},
});
},
//
fail: () => {
uni.hideLoading();
uni.showModal({
title: "您已拒绝获取相册权限",
content: "是否进入权限管理,调整授权?",
success: (res) => {
if (res.confirm) {
//
uni.openSetting({
success: (res) => {
},
});
} else if (res.cancel) {
return uni.showToast({
title: "已取消!",
icon: 'none'
});
}
},
});
},
});
} else {
//
uni.saveImageToPhotosAlbum({
filePath: url,
success: (res) => {
console.log('有权限下载图片结果为',res)
console.log('333333')
},
fail: (res) => {
return uni.showToast({
title: res.errMsg,
icon: 'none'
});
},
//
complete: (res) => {
uni.hideLoading();
if (res.errMsg !== "saveImageToPhotosAlbum:ok") {
return uni.showToast({
title: "下载失败!",
icon: 'none'
});
}else{
return uni.showToast({
title: "保存成功!",
duration: 2000,
icon: 'none'
});
}
},
});
}
},
fail: (res) => {},
});
}
});
}
}
}
</script>
<style lang="scss" scoped>
.wrap {
padding: 20px 0px;
width: 100%;
min-height: 100vh;
background-color: #faf0f3;
.top-box {
.love-title {
margin-top: 30rpx;
margin-left: 40rpx;
width: 677rpx;
height: 245rpx;
// border: 1px solid black;
background-image: url('https://vediocnd.corpring.com/520love/520_title.png');
background-size: 100% 100%;
// z-index: 10;
margin-bottom: -10px;
}
.top-img-box {
// margin-top: -10px;
width: 100%;
height: 750rpx;
background-image: url('https://vediocnd.corpring.com/520love/love_bg_1.gif');
background-size: 110% 110%;
background-position: center;
padding: 200rpx 30rpx;
box-sizing: border-box;
.loading {
margin-top: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fc1f8d;
}
.img-item-box {
// margin-top: 100rpx;
display: flex;
justify-content: space-around;
position: relative;
.heart-icon {
position: absolute;
width: 70px;
height: 60px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-image: url('https://vediocnd.corpring.com/520love/heart_icon_1.png');
background-size: 100% 100%;
}
.img-item {
box-sizing: border-box;
border: 3px solid #faf0f3;
width: 300rpx;
height: 300rpx;
// background-color: #fff;
border-radius: 10px;
}
}
}
.button-box {
padding: 0rpx 30rpx;
box-sizing: border-box;
display: flex;
justify-content: space-around;
.save-button {
width: 250rpx;
height: 75rpx;
background-image: url('https://vediocnd.corpring.com/520love/save_button.png');
background-size: 100% 100%;
}
}
}
}
</style>

262
pages/ai/paint/loverPaint.vue

@ -0,0 +1,262 @@
<template>
<view class="wrap">
<view class="desc-box">
<text class="title">内容描述</text>
<textarea class="desc-input" v-model="contentDesc"
placeholder="请输入内容描述~" />
<!-- <view class="bottom-box">
<view class="keyTips" @click="clickRandomKey()"></view>
<view class="limit">{{drawDesc.length}}/50</view>
</view> -->
</view>
<view class="desc-box">
<text class="title">场景描述</text>
<textarea class="desc-input" v-model="sceneDesc"
placeholder="描述一下你们的场景吧~" />
<!-- <view class="bottom-box">
<view class="keyTips" @click="clickRandomKey()"></view>
<view class="limit">{{drawDesc.length}}/50</view>
</view> -->
</view>
<view class="type-box">
<text class="title">风格选择</text>
<view class="type-item-box">
<view class="type-item" v-for="(item, index) in paintStyle" @click="selectType(index)"
:style="{ backgroundImage: `url(${item.imgUrl})` }"
:class="curType == index? 'active' : ''">
<view class="title">
{{item.name}}
</view>
</view>
</view>
</view>
<view class="draw-button" @click="getDraw()">
生成图片
</view>
</view>
</template>
<script>
import {getPaintStyle, getPrompt, textToImg, checkUserCanAiPaint} from '@/api/paint.js';
export default {
data() {
return {
sceneDesc: '',
contentDesc: '',
paintStyle:[],
curType: 0,
userInfo: {},
checkData:{
checkCanPaint: false, //true;false
},
}
},
onLoad() {
this.getPaintStyleList();
// this.getPrompt();
},
onShow() {
this.checkLogin();
this.checkUserCanAiPaint();
},
methods: {
selectType(index) {
this.curType = index
},
//
async getPaintStyleList() {
const res = await getPaintStyle();
if (res.data.code === 200) {
this.paintStyle = res.data.data
//console.log('this.paintStyle',this.paintStyle)
}else {
uni.showModal({
content: '绘画风格加载失败!',
showCancel: false
});
}
},
//AI
async checkUserCanAiPaint(){
let that = this;
const data = {
userId: that.userInfo.id,
platform: 1,
appType: 0
}
const res = await checkUserCanAiPaint(data);
//console.log('res',res)
if(res.data.code === 200){
if(res.data.data === true){
that.checkData.checkCanPaint = true;
}else{
that.checkData.checkCanPaint = false;
}
}else{
return uni.showModal({
content: '检查绘画上限失败!',
showCancel: false
});
}
},
//
checkLogin(){
let that = this;
that.userInfo = uni.getStorageSync('userInfo');
console.log('userInfo:',that.userInfo)
let token = uni.getStorageSync('token');
if((Object.keys(that.userInfo).length==0) && (Object.keys(token).length==0)){
console.error('尚未登录!');
uni.showModal({
title:'提示',
content:'您还没有登录!点击确定跳转登录界面以体验服务',
success(res) {
if (res.confirm) {
//
uni.switchTab({
url: '/pages/userInfo/userInfo'
});
}else if(res.cancel){
uni.showToast({
title:'登录获取更好的服务体验哟!',
duration: 2000
});
}
}
});
}
},
getDraw() {
// if(this.userInfo.isVip != 1) {
// uni.showModal({
// title:'VIP使',
// content: 'VIP',
// })
// return
// }
if(!this.contentDesc || !this.sceneDesc) {
uni.showToast({
title: '请输入描述~',
duration: 2000,
icon: 'none'
});
return
}
const that = this;
//
uni.showModal({
title: '温馨提示',
content: '任务创建完成,点击跳转生成内容!',
success(res) {
if(res.confirm){
const data = {
prompt: that.contentDesc,
scenePrompt: that.sceneDesc,
styleName: that.paintStyle[that.curType].styleName,
painterId: that.userInfo.id,
painterName: that.userInfo.username,
appType: 0,
platform: 1,
}
uni.navigateTo({
url: './loverPainResult?data='+JSON.stringify(data)
})
}
}
});
}
}
}
</script>
<style lang="scss" scoped>
.wrap {
padding: 20px;
width: 100%;
min-height: 100vh;
background-color: #faf0f3;
.draw-button {
position: fixed;
left: 50%;
bottom: 50rpx;
transform: translateX(-50%);
background: linear-gradient(#fc1f8d, #d2158a);
width: 400rpx;
height: 100rpx;
border-radius: 50rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #fff;
font-size: 20px;
}
.desc-box {
margin-bottom: 10px;
.title {
color: #fff;
font-size: 18px;
// margin-bottom: 20px;
color: #fc1f8d;
font-weight: bold;
}
.desc-input {
border: 2px solid #fc1f8d;
margin-top: 5px;
width: 100%;
height: 200rpx;
background-color: #fff;
border-radius: 8px;
padding: 20rpx;
box-sizing: border-box;
// color: #fff;
}
}
.type-box {
.title {
color: #fff;
font-size: 18px;
// margin-bottom: 5px;
color: #fc1f8d;
font-weight: bold;
}
.type-item-box {
margin-top: 5px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.type-item {
width: 160rpx;
height: 160rpx;
background-size: 100% 100%;
border-radius: 5px;
box-sizing: border-box;
position: relative;
.title {
position: absolute;
bottom: 0px;
width: 100%;
background-color: rgba(255, 255, 255, 0.7);
color: #fc1f8d;
text-align: center;
font-size: 14px;
}
}
.active {
border: 4px solid #fc1f8d;
}
}
}
}
</style>

26
pages/index/indexProto.vue

@ -39,6 +39,9 @@
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view>
<view class="love-icon" @click="goLoveDraw()">
</view>
</view>
</template>
@ -119,6 +122,11 @@
}
},
methods: {
goLoveDraw() {
uni.navigateTo({
url:'/pages/ai/paint/loverPaint'
})
},
changeSwiper(e){
this.current = e.detail.current;
},
@ -249,6 +257,24 @@
</script>
<style lang="scss" scoped>
.love-icon {
width: 140rpx;
height: 140rpx;
background-image: url('https://vediocnd.corpring.com/520love/520_icon.png');
background-size: 100% 100%;
position: fixed;
bottom: 40rpx;
right: 10rpx;
animation-name: breath ;
animation-duration: 2.5s;
animation-iteration-count: infinite;
animation-fill-mode: both;
}
@keyframes breath {
0% { transform: scale(1); }
50% { transform: scale(1.1); }
100% { transform: scale(1); }
}
.swiper-box {
height: 30vh;

Loading…
Cancel
Save