清理代码

This commit is contained in:
zpc 2024-09-20 16:17:02 +08:00
parent c517e50257
commit e3cbacc158
93 changed files with 10 additions and 11039 deletions

368
.gitignore vendored
View File

@ -1,369 +1 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
output/
logs/
.hbuilderx/
unpackage/*
uni_modules/*
unpackage/*

View File

@ -34,6 +34,7 @@
data() {
return {
systemBarHeight: 0,
isLogin: false
}
},
onLoad() {
@ -53,21 +54,15 @@
uni.navigateBack();
},
wxLogin() {
// wx.login({
// success: function(obj) {
// console.log('',obj);
// },
// fail: function(obj) {
// console.log(obj);
// },
// })
uni.login({
// provider: 'weixin', //使
success: function(loginRes) {
console.log(loginRes);
}
});
async wxLogin() {
if (this.isLogin) {
return;
}
this.isLogin = true;
var loginRes = await uni.login();
console.log(loginRes);
this.isLogin = false;
}

View File

@ -1,33 +0,0 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
if (!Math) {
"./pages/index/index.js";
"./pages/create/createpage.js";
"./pages/me/mepage.js";
"./pages/recharge/RechargePage.js";
"./pages/music/MusicPlayPage.js";
"./pages/create/CreateInfoPage.js";
"./pages/me/SettingPage.js";
"./pages/login/Loginpage.js";
}
const _sfc_main = {
onLaunch: function() {
console.log("App Launch");
},
onShow: function() {
console.log("App Show");
},
onHide: function() {
console.log("App Hide");
}
};
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/gitCode/uniapp/magicsound/App.vue"]]);
function createApp() {
const app = common_vendor.createSSRApp(App);
return {
app
};
}
createApp().app.mount("#app");
exports.createApp = createApp;

View File

@ -1,39 +0,0 @@
{
"pages": [
"pages/index/index",
"pages/create/createpage",
"pages/me/mepage",
"pages/recharge/RechargePage",
"pages/music/MusicPlayPage",
"pages/create/CreateInfoPage",
"pages/me/SettingPage",
"pages/login/Loginpage"
],
"tabBar": {
"color": "#808080",
"selectedColor": "#FFFFFF",
"borderStyle": "black",
"backgroundColor": "#0E0A10",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/image/ic_home.png",
"selectedIconPath": "static/image/ic_home.png",
"text": "首页"
},
{
"pagePath": "pages/create/createpage",
"iconPath": "static/image/ic_creat.png",
"selectedIconPath": "static/image/ic_creat.png",
"text": "创建"
},
{
"pagePath": "pages/me/mepage",
"iconPath": "static/image/ic_me.png",
"selectedIconPath": "static/image/ic_me.png",
"text": "我的"
}
]
},
"usingComponents": {}
}

View File

@ -1,3 +0,0 @@
/*每个页面公共css */
page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}

File diff suppressed because it is too large Load Diff

View File

@ -1,112 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const modules_api_md5 = require("./md5.js");
function objectToQueryParams(obj) {
return Object.keys(obj).map((key) => encodeURIComponent(key) + "=" + encodeURIComponent(obj[key])).join("&");
}
var AppServer = function() {
};
var serverConfig = {};
var baseUrl = "https://music.shhuanmeng.com";
serverConfig.apiUrl_Music_GetMusicGenresList = baseUrl + "/api/Music/GetMusicGenresList";
serverConfig.apiUrl_Music_GetMusicGenresInfo = baseUrl + "/api/Music/GetMusicGenresInfo";
AppServer.prototype.getPostFormBody = function(postData) {
Object.assign({}, postData);
};
AppServer.prototype.getSign = function(postData) {
let arr = [];
for (let key in postData) {
if (key == "sign")
continue;
arr.push(key);
}
arr.sort();
let str = "";
for (let i in arr) {
let value = postData[arr[i]];
if (value || value == 0) {
str += value;
}
}
let saltKey = "";
try {
let token = common_vendor.index.getStorageSync("token");
if (token) {
saltKey = token.split(".")[2];
}
} catch (e) {
saltKey = "";
}
str += saltKey;
let sign = modules_api_md5.md5(str);
return sign;
};
AppServer.prototype.postData = async function(url, postData) {
let authToken = common_vendor.index.getStorageSync("token");
return common_vendor.index.request({
url,
method: "POST",
header: {
"Content-Type": "application/json",
"Authorization": authToken
},
data: JSON.stringify(postData)
}).then((res) => {
console.log(`post,url=${url},form=${formBody},response=${res.data}`);
return res.data;
}).catch((err) => {
console.error(err);
return err;
});
};
AppServer.prototype.getData = async function(url, postData) {
let authToken = common_vendor.index.getStorageSync("token");
if (postData != null) {
var parmat = objectToQueryParams(postData);
if (url.indexOf("?") > -1) {
url += "&" + parmat;
} else {
url += "?" + parmat;
}
}
return common_vendor.index.request({
url,
method: "GET",
header: {
"Authorization": authToken
}
// data: JSON.stringify(postData)
}).then((res) => {
console.log(`post,url=${url},response=${res.data}`);
return res.data;
}).catch((err) => {
console.error(err);
return err;
});
};
AppServer.prototype.GetMusicGenresList = async function() {
var url = serverConfig.apiUrl_Music_GetMusicGenresList;
return this.getData(url).then((data) => {
return data;
});
};
AppServer.prototype.GetServerList = async function() {
return this.postData(serverConfig.apiUrl_AppConfig_GetServerList).then((data) => {
console.log(data);
});
};
AppServer.prototype.GetPlatformIsAndroid = function() {
let port = common_vendor.index.getSystemInfoSync().platform;
switch (port) {
case "android":
console.log("运行Android上", port);
return true;
case "ios":
console.log("运行iOS上", port);
return false;
default:
console.log("运行在开发者工具上");
return false;
}
};
exports.AppServer = AppServer;

View File

@ -1,191 +0,0 @@
"use strict";
function md5(string) {
function md5_RotateLeft(lValue, iShiftBits) {
return lValue << iShiftBits | lValue >>> 32 - iShiftBits;
}
function md5_AddUnsigned(lX, lY) {
var lX4, lY4, lX8, lY8, lResult;
lX8 = lX & 2147483648;
lY8 = lY & 2147483648;
lX4 = lX & 1073741824;
lY4 = lY & 1073741824;
lResult = (lX & 1073741823) + (lY & 1073741823);
if (lX4 & lY4) {
return lResult ^ 2147483648 ^ lX8 ^ lY8;
}
if (lX4 | lY4) {
if (lResult & 1073741824) {
return lResult ^ 3221225472 ^ lX8 ^ lY8;
} else {
return lResult ^ 1073741824 ^ lX8 ^ lY8;
}
} else {
return lResult ^ lX8 ^ lY8;
}
}
function md5_F(x2, y, z) {
return x2 & y | ~x2 & z;
}
function md5_G(x2, y, z) {
return x2 & z | y & ~z;
}
function md5_H(x2, y, z) {
return x2 ^ y ^ z;
}
function md5_I(x2, y, z) {
return y ^ (x2 | ~z);
}
function md5_FF(a2, b2, c2, d2, x2, s, ac) {
a2 = md5_AddUnsigned(a2, md5_AddUnsigned(md5_AddUnsigned(md5_F(b2, c2, d2), x2), ac));
return md5_AddUnsigned(md5_RotateLeft(a2, s), b2);
}
function md5_GG(a2, b2, c2, d2, x2, s, ac) {
a2 = md5_AddUnsigned(a2, md5_AddUnsigned(md5_AddUnsigned(md5_G(b2, c2, d2), x2), ac));
return md5_AddUnsigned(md5_RotateLeft(a2, s), b2);
}
function md5_HH(a2, b2, c2, d2, x2, s, ac) {
a2 = md5_AddUnsigned(a2, md5_AddUnsigned(md5_AddUnsigned(md5_H(b2, c2, d2), x2), ac));
return md5_AddUnsigned(md5_RotateLeft(a2, s), b2);
}
function md5_II(a2, b2, c2, d2, x2, s, ac) {
a2 = md5_AddUnsigned(a2, md5_AddUnsigned(md5_AddUnsigned(md5_I(b2, c2, d2), x2), ac));
return md5_AddUnsigned(md5_RotateLeft(a2, s), b2);
}
function md5_ConvertToWordArray(string2) {
var lWordCount;
var lMessageLength = string2.length;
var lNumberOfWords_temp1 = lMessageLength + 8;
var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - lNumberOfWords_temp1 % 64) / 64;
var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
var lWordArray = Array(lNumberOfWords - 1);
var lBytePosition = 0;
var lByteCount = 0;
while (lByteCount < lMessageLength) {
lWordCount = (lByteCount - lByteCount % 4) / 4;
lBytePosition = lByteCount % 4 * 8;
lWordArray[lWordCount] = lWordArray[lWordCount] | string2.charCodeAt(lByteCount) << lBytePosition;
lByteCount++;
}
lWordCount = (lByteCount - lByteCount % 4) / 4;
lBytePosition = lByteCount % 4 * 8;
lWordArray[lWordCount] = lWordArray[lWordCount] | 128 << lBytePosition;
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
return lWordArray;
}
function md5_WordToHex(lValue) {
var WordToHexValue = "", WordToHexValue_temp = "", lByte, lCount;
for (lCount = 0; lCount <= 3; lCount++) {
lByte = lValue >>> lCount * 8 & 255;
WordToHexValue_temp = "0" + lByte.toString(16);
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
}
return WordToHexValue;
}
function md5_Utf8Encode(string2) {
string2 = string2.replace(/\r\n/g, "\n");
var utftext = "";
for (var n = 0; n < string2.length; n++) {
var c2 = string2.charCodeAt(n);
if (c2 < 128) {
utftext += String.fromCharCode(c2);
} else if (c2 > 127 && c2 < 2048) {
utftext += String.fromCharCode(c2 >> 6 | 192);
utftext += String.fromCharCode(c2 & 63 | 128);
} else {
utftext += String.fromCharCode(c2 >> 12 | 224);
utftext += String.fromCharCode(c2 >> 6 & 63 | 128);
utftext += String.fromCharCode(c2 & 63 | 128);
}
}
return utftext;
}
var x = Array();
var k, AA, BB, CC, DD, a, b, c, d;
var S11 = 7, S12 = 12, S13 = 17, S14 = 22;
var S21 = 5, S22 = 9, S23 = 14, S24 = 20;
var S31 = 4, S32 = 11, S33 = 16, S34 = 23;
var S41 = 6, S42 = 10, S43 = 15, S44 = 21;
string = md5_Utf8Encode(string);
x = md5_ConvertToWordArray(string);
a = 1732584193;
b = 4023233417;
c = 2562383102;
d = 271733878;
for (k = 0; k < x.length; k += 16) {
AA = a;
BB = b;
CC = c;
DD = d;
a = md5_FF(a, b, c, d, x[k + 0], S11, 3614090360);
d = md5_FF(d, a, b, c, x[k + 1], S12, 3905402710);
c = md5_FF(c, d, a, b, x[k + 2], S13, 606105819);
b = md5_FF(b, c, d, a, x[k + 3], S14, 3250441966);
a = md5_FF(a, b, c, d, x[k + 4], S11, 4118548399);
d = md5_FF(d, a, b, c, x[k + 5], S12, 1200080426);
c = md5_FF(c, d, a, b, x[k + 6], S13, 2821735955);
b = md5_FF(b, c, d, a, x[k + 7], S14, 4249261313);
a = md5_FF(a, b, c, d, x[k + 8], S11, 1770035416);
d = md5_FF(d, a, b, c, x[k + 9], S12, 2336552879);
c = md5_FF(c, d, a, b, x[k + 10], S13, 4294925233);
b = md5_FF(b, c, d, a, x[k + 11], S14, 2304563134);
a = md5_FF(a, b, c, d, x[k + 12], S11, 1804603682);
d = md5_FF(d, a, b, c, x[k + 13], S12, 4254626195);
c = md5_FF(c, d, a, b, x[k + 14], S13, 2792965006);
b = md5_FF(b, c, d, a, x[k + 15], S14, 1236535329);
a = md5_GG(a, b, c, d, x[k + 1], S21, 4129170786);
d = md5_GG(d, a, b, c, x[k + 6], S22, 3225465664);
c = md5_GG(c, d, a, b, x[k + 11], S23, 643717713);
b = md5_GG(b, c, d, a, x[k + 0], S24, 3921069994);
a = md5_GG(a, b, c, d, x[k + 5], S21, 3593408605);
d = md5_GG(d, a, b, c, x[k + 10], S22, 38016083);
c = md5_GG(c, d, a, b, x[k + 15], S23, 3634488961);
b = md5_GG(b, c, d, a, x[k + 4], S24, 3889429448);
a = md5_GG(a, b, c, d, x[k + 9], S21, 568446438);
d = md5_GG(d, a, b, c, x[k + 14], S22, 3275163606);
c = md5_GG(c, d, a, b, x[k + 3], S23, 4107603335);
b = md5_GG(b, c, d, a, x[k + 8], S24, 1163531501);
a = md5_GG(a, b, c, d, x[k + 13], S21, 2850285829);
d = md5_GG(d, a, b, c, x[k + 2], S22, 4243563512);
c = md5_GG(c, d, a, b, x[k + 7], S23, 1735328473);
b = md5_GG(b, c, d, a, x[k + 12], S24, 2368359562);
a = md5_HH(a, b, c, d, x[k + 5], S31, 4294588738);
d = md5_HH(d, a, b, c, x[k + 8], S32, 2272392833);
c = md5_HH(c, d, a, b, x[k + 11], S33, 1839030562);
b = md5_HH(b, c, d, a, x[k + 14], S34, 4259657740);
a = md5_HH(a, b, c, d, x[k + 1], S31, 2763975236);
d = md5_HH(d, a, b, c, x[k + 4], S32, 1272893353);
c = md5_HH(c, d, a, b, x[k + 7], S33, 4139469664);
b = md5_HH(b, c, d, a, x[k + 10], S34, 3200236656);
a = md5_HH(a, b, c, d, x[k + 13], S31, 681279174);
d = md5_HH(d, a, b, c, x[k + 0], S32, 3936430074);
c = md5_HH(c, d, a, b, x[k + 3], S33, 3572445317);
b = md5_HH(b, c, d, a, x[k + 6], S34, 76029189);
a = md5_HH(a, b, c, d, x[k + 9], S31, 3654602809);
d = md5_HH(d, a, b, c, x[k + 12], S32, 3873151461);
c = md5_HH(c, d, a, b, x[k + 15], S33, 530742520);
b = md5_HH(b, c, d, a, x[k + 2], S34, 3299628645);
a = md5_II(a, b, c, d, x[k + 0], S41, 4096336452);
d = md5_II(d, a, b, c, x[k + 7], S42, 1126891415);
c = md5_II(c, d, a, b, x[k + 14], S43, 2878612391);
b = md5_II(b, c, d, a, x[k + 5], S44, 4237533241);
a = md5_II(a, b, c, d, x[k + 12], S41, 1700485571);
d = md5_II(d, a, b, c, x[k + 3], S42, 2399980690);
c = md5_II(c, d, a, b, x[k + 10], S43, 4293915773);
b = md5_II(b, c, d, a, x[k + 1], S44, 2240044497);
a = md5_II(a, b, c, d, x[k + 8], S41, 1873313359);
d = md5_II(d, a, b, c, x[k + 15], S42, 4264355552);
c = md5_II(c, d, a, b, x[k + 6], S43, 2734768916);
b = md5_II(b, c, d, a, x[k + 13], S44, 1309151649);
a = md5_II(a, b, c, d, x[k + 4], S41, 4149444226);
d = md5_II(d, a, b, c, x[k + 11], S42, 3174756917);
c = md5_II(c, d, a, b, x[k + 2], S43, 718787259);
b = md5_II(b, c, d, a, x[k + 9], S44, 3951481745);
a = md5_AddUnsigned(a, AA);
b = md5_AddUnsigned(b, BB);
c = md5_AddUnsigned(c, CC);
d = md5_AddUnsigned(d, DD);
}
return (md5_WordToHex(a) + md5_WordToHex(b) + md5_WordToHex(c) + md5_WordToHex(d)).toLowerCase();
}
exports.md5 = md5;

View File

@ -1,35 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
systemBarHeight: 0
};
},
onLoad() {
this.getStatusBarHeight();
},
methods: {
// 获取状态栏高度的方法
getStatusBarHeight: function() {
var that = this;
common_vendor.index.getSystemInfo({
success: function(res) {
that.systemBarHeight = res.statusBarHeight;
}
});
},
toBack() {
common_vendor.index.navigateBack();
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $options.toBack()),
b: $data.systemBarHeight + "px",
c: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/create/CreateInfoPage.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -1,4 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view><view class="content" style="{{c}}"><view class="" style="{{'display:flex;height:45rpx;width:100%;align-items:center;justify-content:center' + ';' + ('margin-top:' + b)}}"><image src="/static/image/ic_back.png" style="width:24.31rpx;height:43.06rpx;margin-left:36rpx;position:absolute;left:0" bindtap="{{a}}" alt=""/></view><image src="/static/image/ic_record.png" style="width:431.25rpx;height:431.25rpx;margin-top:88rpx" mode=""></image><text style="font-size:33rpx;color:white;margin-top:75rpx">正在生成中</text><text style="font-size:33rpx;color:#3FBBFEFF;margin-top:27rpx">35%</text></view></view>

View File

@ -1,9 +0,0 @@
.content {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
background-color: #0E0A10;
}

View File

@ -1,112 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
var typeData = ["爵士", "民谣", "流行", "古风", "车载", "摇滚", "自定义"];
return {
systemBarHeight: 0,
subtractedHeight: 0,
fontNum: 0,
inputData: "",
typeData,
styleIndex: 0,
songTitle: ""
};
},
onLoad() {
this.getStatusBarHeight();
this.getSubtractedHeight();
},
methods: {
// 获取状态栏高度的方法
getStatusBarHeight: function() {
var that = this;
common_vendor.index.getSystemInfo({
success: function(res) {
that.systemBarHeight = res.statusBarHeight;
}
});
},
getSubtractedHeight() {
const systemInfo = common_vendor.index.getSystemInfoSync();
systemInfo.screenWidth;
const windowHeight = systemInfo.windowHeight;
console.log("windowHeight", windowHeight);
this.subtractedHeight = windowHeight;
console.log("subtractedHeight", this.subtractedHeight);
},
sumfontnum(e) {
this.fontNum = e.detail.cursor;
},
clickStyle(index, data) {
this.styleIndex = index;
if (data == "自定义") {
this.$refs.inputDialog.open();
}
},
setStyleBg(index) {
if (this.styleIndex == index) {
return {
backgroundImage: "linear-gradient(to left, #a541ffFF, #3fbbfeFF)"
};
} else {
return {
backgroundImage: "linear-gradient(to left, #919191FF, #919191FF)"
};
}
},
dialogInputConfirm(value) {
this.typeData.unshift(value);
this.styleIndex = 0;
},
toCreateInfo() {
common_vendor.index.navigateTo({
url: "/pages/create/CreateInfoPage"
});
}
}
};
if (!Array) {
const _easycom_uni_popup_dialog2 = common_vendor.resolveComponent("uni-popup-dialog");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uni_popup_dialog2 + _easycom_uni_popup2)();
}
const _easycom_uni_popup_dialog = () => "../../uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uni_popup_dialog + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.systemBarHeight + "px",
b: common_vendor.o([($event) => $data.inputData = $event.detail.value, (...args) => $options.sumfontnum && $options.sumfontnum(...args)]),
c: $data.inputData,
d: common_vendor.t($data.fontNum),
e: common_vendor.f($data.typeData, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: common_vendor.o(($event) => $options.clickStyle(index, item)),
c: common_vendor.s($options.setStyleBg(index))
};
}),
f: $data.songTitle,
g: common_vendor.o(($event) => $data.songTitle = $event.detail.value),
h: common_vendor.o(($event) => $options.toCreateInfo()),
i: common_vendor.sr("inputClose", "5a233947-1,5a233947-0"),
j: common_vendor.o($options.dialogInputConfirm),
k: common_vendor.p({
mode: "input",
title: "输入内容",
value: "",
placeholder: "请输入内容"
}),
l: common_vendor.sr("inputDialog", "5a233947-0"),
m: common_vendor.p({
type: "center",
["background-color"]: "#333333"
}),
n: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px; height:" + $data.subtractedHeight + "px")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/create/createpage.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -1,7 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {
"uni-popup-dialog": "../../uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

View File

@ -1 +0,0 @@
<view style="position:relative"><image src="/static/image/banner_bg.png" style="width:100%;position:absolute" mode="widthFix"></image><view class="content" style="{{n}}"><view class="" style="{{'display:flex;flex-direction:row;height:45rpx;width:100%;align-items:center;justify-content:space-between' + ';' + ('margin-top:' + a)}}"><image src="/static/image/ic_music.png" style="width:165.28rpx;height:40.97rpx;margin-left:36rpx" alt=""/></view><view class="" style="display:flex;justify-content:start;width:100%;margin-top:59rpx"><text style="font-size:33rpx;color:white;margin-left:33rpx">歌词生歌</text></view><view class="" style="margin-top:33rpx"><view class="" style="background-image:linear-gradient(to left, #a541ffFF, #3fbbfeFF);padding:1rpx;border-radius:20rpx"><view class="" style="width:623.33rpx;height:272.22rpx;padding:30rpx 30rpx 70rpx 30rpx;border-radius:20rpx;background-color:#221f35FF"><block wx:if="{{r0}}"><textarea type="text" style="color:white;width:100%" placeholder="描述歌词的场景" maxlength="500" bindinput="{{b}}" value="{{c}}"/></block><view style="text-align:end;color:white" class="input_holder"><text style="color:white">{{d}}</text>/500</view></view></view></view><view class="" style="display:flex;justify-content:start;width:100%;margin-top:59rpx"><text style="font-size:33rpx;color:white;margin-left:33rpx">音乐风格</text></view><view class="" style="margin-left:33rpx;margin-right:33rpx;display:flex;flex-wrap:wrap"><view wx:for="{{e}}" wx:for-item="item" class="" bindtap="{{item.b}}" style="{{'padding:1rpx;border-radius:50rpx;margin-top:25rpx;margin-right:30rpx' + ';' + item.c}}"><view class="" style="padding:6rpx 40rpx 6rpx 40rpx;background-color:#0E0A10FF;height:66.67rpx;display:flex;align-items:center;justify-content:center;border-radius:50rpx"><text style="font-size:29rpx;color:#B5B5B5FF">{{item.a}}</text></view></view></view><view class="" style="display:flex;justify-content:start;width:100%;margin-top:59rpx"><text style="font-size:33rpx;color:white;margin-left:33rpx">音乐名称</text></view><view class="" style="width:683.33rpx;margin-left:33rpx;margin-right:33rpx;margin-top:33rpx;background-image:linear-gradient(to left, #a541ffFF, #3fbbfeFF);padding:1rpx;border-radius:20rpx"><view class="" style="border-radius:20rpx;background-color:#0E0A10FF;width:100%;height:89.58rpx;display:flex;justify-content:center"><input class="uni-input" placeholder="请输入歌名" cursor-color="#FFFFFF" style="width:100%;height:100%;padding-left:20rpx;color:white" value="{{f}}" bindinput="{{g}}"/></view></view><view class="" bindtap="{{h}}" style="width:683.33rpx;height:83.33rpx;margin-left:33rpx;margin-right:33rpx;margin-top:50rpx;background-image:linear-gradient(to left, #a541ffFF, #3fbbfeFF);padding:1rpx;border-radius:50rpx;display:flex;align-items:center;justify-content:center"><text style="font-size:40rpx;color:white">立即生成</text></view><view><uni-popup wx:if="{{m}}" class="r" u-s="{{['d']}}" u-r="inputDialog" u-i="5a233947-0" bind:__l="__l" u-p="{{m}}"><uni-popup-dialog wx:if="{{k}}" class="r" u-r="inputClose" bindconfirm="{{j}}" u-i="5a233947-1,5a233947-0" bind:__l="__l" u-p="{{k}}"></uni-popup-dialog></uni-popup></view></view></view>

View File

@ -1,11 +0,0 @@
.content {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: #0E0A10;
}
input {
caret-color: #fff;
}

View File

@ -1,114 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const modules_api_AppServer = require("../../modules/api/AppServer.js");
const _sfc_main = {
data() {
return {
systemBarHeight: 0,
subtractedHeight: 0,
tabs: ["推荐"],
current: 0,
swiperCurrent: 0,
musicGenresList: []
};
},
onLoad() {
this.getStatusBarHeight();
this.getSubtractedHeight();
this.getMusicGenresList();
},
methods: {
// 获取状态栏高度的方法
getStatusBarHeight: function() {
var that = this;
common_vendor.index.getSystemInfo({
success: function(res) {
that.systemBarHeight = res.statusBarHeight;
}
});
},
getSubtractedHeight() {
const systemInfo = common_vendor.index.getSystemInfoSync();
systemInfo.screenWidth;
const windowHeight = systemInfo.windowHeight;
console.log("windowHeight", windowHeight);
this.subtractedHeight = windowHeight;
console.log("subtractedHeight", this.subtractedHeight);
},
changeTab(index) {
this.swiperCurrent = index;
console.log("当前选中索引:" + index);
},
swiperChange(e) {
this.current = e.detail.current;
this.swiperCurrent = e.detail.current;
},
//获取音乐分类
getMusicGenresList() {
var that = this;
var appserver = new modules_api_AppServer.AppServer();
appserver.GetMusicGenresList().then((data) => {
console.log("getMusicGenresList", data.data);
that.musicGenresList = data.data;
let _tabs = [];
for (var i = 0; i < data.data.length; i++) {
_tabs.push(data.data[i].genreName);
console.log("data[i].genreName", data.data[i].genreName);
}
that.tabs = _tabs;
console.log("that.tabs", that.tabs);
});
},
toMusicPlay() {
let loginValue = common_vendor.index.getStorageSync("isLoginKey");
if (!loginValue) {
common_vendor.index.navigateTo({
url: "/pages/login/Loginpage",
success: () => {
}
});
}
common_vendor.index.navigateTo({
url: "/pages/music/MusicPlayPage"
});
}
}
};
if (!Array) {
const _easycom_v_tabs2 = common_vendor.resolveComponent("v-tabs");
_easycom_v_tabs2();
}
const _easycom_v_tabs = () => "../../uni_modules/v-tabs/components/v-tabs/v-tabs.js";
if (!Math) {
_easycom_v_tabs();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.systemBarHeight + "px",
b: common_vendor.o($options.changeTab),
c: common_vendor.o(($event) => $data.current = $event),
d: common_vendor.p({
bgColor: "#0E0A10",
color: "#999999",
activeColor: "#FFFFFF",
lineColor: "#FFFFFF",
fontSize: "38rpx",
tabs: $data.tabs,
modelValue: $data.current
}),
e: common_vendor.f($data.tabs, (item, index, i0) => {
return {
a: common_vendor.f($data.tabs, (item2, index2, i1) => {
return {};
}),
b: index
};
}),
f: common_vendor.o(($event) => $options.toMusicPlay()),
g: $data.swiperCurrent,
h: common_vendor.o((...args) => $options.swiperChange && $options.swiperChange(...args)),
i: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px; height:" + $data.subtractedHeight + "px")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -1,6 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {
"v-tabs": "../../uni_modules/v-tabs/components/v-tabs/v-tabs"
}
}

View File

@ -1 +0,0 @@
<view class=""><view class="content" style="{{i}}"><view class="" style="{{'display:flex;flex-direction:row;height:45rpx;width:100%;align-items:center;justify-content:space-between' + ';' + ('margin-top:' + a)}}"><image src="/static/image/ic_music.png" style="width:165.28rpx;height:40.97rpx;margin-left:36rpx" alt=""/></view><view class="" style="width:100vw;margin-top:50rpx;padding-left:36rpx"><v-tabs wx:if="{{d}}" bindchange="{{b}}" u-i="17ee7f5e-0" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></v-tabs></view><view class="" style="height:100%;width:100%;margin-top:50rpx"><swiper style="height:100%" current="{{g}}" bindchange="{{h}}"><swiper-item wx:for="{{e}}" wx:for-item="item" wx:key="b" class="" style="width:100%;height:100%;overflow:auto"><view wx:for="{{item.a}}" wx:for-item="item" class="" bindtap="{{f}}" style="display:flex;justify-content:center;margin-bottom:28rpx;position:relative"><view class="" style="background-color:#302D4EFF;width:683.33rpx;height:213.89rpx;border-radius:10rpx;display:flex;flex-direction:row;align-items:center"><view class="" style="width:152rpx;height:152rpx;background-color:#3c3a3eFF;display:flex;align-items:center;justify-content:center;margin-left:24rpx"><image src="/static/image/ic_play.png" style="width:45rpx;height:45rpx" alt=""/></view><view class="" style="display:flex;flex-direction:column;margin-left:42rpx;width:35%"><text style="font-size:33rpx;color:white">歌词名</text><text style="font-size:27rpx;color:#9C9090FF;margin-top:18rpx">作者</text><view class="" style="display:flex;flex-direction:row;align-items:center;margin-top:20rpx"><image src="/static/image/ic_like.png" style="width:16rpx;height:16rpx" mode=""></image><text style="color:white;font-size:22rpx;margin-left:9rpx">111</text><image src="/static/image/ic_collect.png" style="width:16rpx;height:16rpx;margin-left:34rpx" mode=""></image><text style="color:white;font-size:22rpx;margin-left:9rpx">1.1万</text></view></view><view class="" style="width:176.39rpx;height:68.06rpx;background-image:linear-gradient(to left, #a541ffFF, #3fbbfeFF);border-radius:33rpx;margin-left:15rpx;display:flex;align-items:center;justify-content:center"><text style="font-size:28rpx;color:white">制作同款</text></view></view></view></swiper-item></swiper></view></view></view>

View File

@ -1,8 +0,0 @@
.content {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: #0E0A10;
}

View File

@ -1,44 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
systemBarHeight: 0
};
},
onLoad() {
this.getStatusBarHeight();
},
methods: {
// 获取状态栏高度的方法
getStatusBarHeight: function() {
var that = this;
common_vendor.index.getSystemInfo({
success: function(res) {
that.systemBarHeight = res.statusBarHeight;
}
});
},
toBack() {
common_vendor.index.navigateBack();
},
wxLogin() {
common_vendor.index.login({
// provider: 'weixin', //使用微信登录
success: function(loginRes) {
console.log(loginRes);
}
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $options.toBack()),
b: $data.systemBarHeight + "px",
c: common_vendor.o(($event) => $options.wxLogin()),
d: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/login/Loginpage.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -1,4 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view><view class="content" style="{{d}}"><view class="" style="{{'display:flex;height:45rpx;width:100%;align-items:center;justify-content:center' + ';' + ('margin-top:' + b)}}"><image src="/static/image/ic_back.png" style="width:24.31rpx;height:43.06rpx;margin-left:36rpx;position:absolute;left:0" bindtap="{{a}}" alt=""/><text style="font-size:38rpx;color:white">登录</text></view><view class="" style="padding-top:50rpx"><view class="" bindtap="{{c}}" style="width:300rpx;height:80rpx;display:flex;justify-content:center;align-items:center;background-color:green"><text style="color:white">登录</text></view></view></view></view>

View File

@ -1,9 +0,0 @@
.content {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
background-color: #0E0A10FF;
}

View File

@ -1,35 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
systemBarHeight: 0
};
},
onLoad() {
this.getStatusBarHeight();
},
methods: {
// 获取状态栏高度的方法
getStatusBarHeight: function() {
var that = this;
common_vendor.index.getSystemInfo({
success: function(res) {
that.systemBarHeight = res.statusBarHeight;
}
});
},
toBack() {
common_vendor.index.navigateBack();
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $options.toBack()),
b: $data.systemBarHeight + "px",
c: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/me/SettingPage.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -1,4 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view><view class="content" style="{{c}}"><view class="" style="{{'display:flex;height:45rpx;width:100%;align-items:center;justify-content:center' + ';' + ('margin-top:' + b)}}"><image src="/static/image/ic_back.png" style="width:24.31rpx;height:43.06rpx;margin-left:36rpx;position:absolute;left:0" bindtap="{{a}}" alt=""/><text style="font-size:38rpx;color:white">设置</text></view><view class="" style="display:flex;width:100%;height:120rpx;flex-direction:row;justify-content:space-between;align-items:center;margin-top:51rpx"><text style="font-size:29rpx;color:white;margin-left:33rpx">关于</text><image src="/static/image/ic_right.png" style="width:13rpx;height:25rpx;margin-right:33rpx" mode=""></image></view><view class="" style="width:93%;height:1rpx;background-color:#474649"></view><view class="" style="display:flex;width:100%;height:120rpx;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10rpx"><text style="font-size:29rpx;color:white;margin-left:33rpx">退出登录</text><image src="/static/image/ic_right.png" style="width:13rpx;height:25rpx;margin-right:33rpx" mode=""></image></view><view class="" style="width:93%;height:1rpx;background-color:#474649"></view><view class="" style="display:flex;width:100%;height:120rpx;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10rpx"><text style="font-size:29rpx;color:white;margin-left:33rpx">用户协议</text><image src="/static/image/ic_right.png" style="width:13rpx;height:25rpx;margin-right:33rpx" mode=""></image></view><view class="" style="width:93%;height:1rpx;background-color:#474649"></view></view></view>

View File

@ -1,9 +0,0 @@
.content {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
background-color: #0E0A10FF;
}

View File

@ -1,58 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
var dataList = [1, 2, 3, 4, 5, 6];
return {
systemBarHeight: 0,
subtractedHeight: 0,
dataList
};
},
onLoad() {
this.getStatusBarHeight();
this.getSubtractedHeight();
},
methods: {
// 获取状态栏高度的方法
getStatusBarHeight: function() {
var that = this;
common_vendor.index.getSystemInfo({
success: function(res) {
that.systemBarHeight = res.statusBarHeight;
}
});
},
getSubtractedHeight() {
const systemInfo = common_vendor.index.getSystemInfoSync();
systemInfo.screenWidth;
const windowHeight = systemInfo.windowHeight;
console.log("windowHeight", windowHeight);
this.subtractedHeight = windowHeight;
console.log("subtractedHeight", this.subtractedHeight);
},
toRecharge() {
common_vendor.index.navigateTo({
url: "/pages/recharge/RechargePage"
});
},
toSet() {
common_vendor.index.navigateTo({
url: "/pages/me/SettingPage"
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $options.toSet()),
b: $data.systemBarHeight + "px",
c: common_vendor.o(($event) => $options.toRecharge()),
d: common_vendor.f($data.dataList, (item, index, i0) => {
return {};
}),
e: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px; height:" + $data.subtractedHeight + "px")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/me/mepage.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -1,4 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view style="position:relative"><image src="/static/image/banner_bg.png" style="width:100%;position:absolute" mode="widthFix"></image><view class="content" style="{{e}}"><view class="" style="{{'display:flex;flex-direction:row;width:100%;align-items:center' + ';' + ('margin-top:' + b)}}"><view class="" style="width:138rpx;height:138rpx;background-color:#919191FF;margin-top:80rpx;margin-left:33rpx"></view><text style="color:white;font-size:38rpx;margin-top:80rpx;margin-left:22rpx">大帅比</text><image src="/static/image/ic_setting.png" bindtap="{{a}}" style="width:54rpx;height:54rpx;position:absolute;top:200rpx;right:33rpx" mode=""></image></view><image src="/static/image/vip.png" style="width:683.33rpx;height:153.47rpx;margin-top:50rpx" bindtap="{{c}}" mode=""></image><view class="" style="display:flex;flex-direction:row;width:100%;margin-top:67rpx;align-items:flex-end"><text style="color:white;font-size:33rpx;margin-left:33rpx">我的音乐</text><text style="color:white;font-size:25rpx;margin-left:52rpx">总点赞 1111</text><text style="color:white;font-size:25rpx;margin-left:52rpx">总收藏 1.1万</text></view><view class="" style="display:flex;flex-direction:column;width:100%;align-items:center;margin-top:38rpx;overflow:auto"><view wx:for="{{d}}" wx:for-item="item" class="" style="display:flex;justify-content:center;margin-bottom:28rpx"><view class="" style="background-color:#302D4EFF;width:683.33rpx;height:213.89rpx;border-radius:10rpx;display:flex;flex-direction:row;align-items:center"><view class="" style="width:152rpx;height:152rpx;background-color:#3c3a3eFF;display:flex;align-items:center;justify-content:center;margin-left:24rpx"><image src="/static/image/ic_play.png" style="width:45rpx;height:45rpx" alt=""/></view><view class="" style="display:flex;flex-direction:column;margin-left:42rpx;width:35%"><text style="font-size:33rpx;color:white">歌词名</text><text style="font-size:27rpx;color:#FF5959FF;margin-top:18rpx">作者</text><view class="" style="display:flex;flex-direction:row;align-items:center;margin-top:20rpx"><image src="/static/image/ic_like.png" style="width:16rpx;height:16rpx" mode=""></image><text style="color:white;font-size:22rpx;margin-left:9rpx">111</text><image src="/static/image/ic_collect.png" style="width:16rpx;height:16rpx;margin-left:34rpx" mode=""></image><text style="color:white;font-size:22rpx;margin-left:9rpx">1.1万</text></view></view></view></view></view></view></view>

View File

@ -1,8 +0,0 @@
.content {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: #0E0A10;
}

View File

@ -1,144 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
var innerAudioContext = null;
const _sfc_main = {
data() {
return {
systemBarHeight: 0,
speedValue: 0,
isPlay: true,
currentTime: "00:00",
musicDuration: "00:00",
//音乐长度
currentTimeIndex: 0,
currentTimeContent: "",
lyricList: [{
time: "00:00",
content: "晴天 - 周杰伦"
}, {
time: "00:03",
content: "词:周杰伦"
}, {
time: "00:05",
content: "曲:周杰伦"
}, {
time: "00:08",
content: "....."
}, {
time: "00:11",
content: "....."
}, {
time: "00:29",
content: "故事的小黄花"
}, {
time: "00:32",
content: "从出生那年就飘着"
}, {
time: "00:36",
content: "童年的荡秋千"
}]
};
},
onLoad() {
this.getStatusBarHeight();
innerAudioContext = common_vendor.index.createInnerAudioContext();
innerAudioContext.src = "https://cos.shhuanmeng.com/yinyue/%E5%91%A8%E6%9D%B0%E4%BC%A6%20-%20%E6%99%B4%E5%A4%A9.mp3";
innerAudioContext.autoplay = true;
innerAudioContext.onTimeUpdate(() => {
this.currentTime = this.convertSecondsToHMS(innerAudioContext.currentTime);
this.musicDuration = this.convertSecondsToHMS(innerAudioContext.duration);
this.speedValue = this.getPercentage(innerAudioContext.duration, innerAudioContext.currentTime);
console.log("进度==", this.speedValue);
for (let i = 0; i < this.lyricList.length; i++) {
if (this.currentTime == this.lyricList[i].time) {
this.currentTimeIndex = i;
this.currentTimeContent = "item-" + i;
console.log("歌词", this.currentTimeContent);
}
}
});
innerAudioContext.onPlay(() => {
console.log("开始播放");
});
innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
});
},
methods: {
// 获取状态栏高度的方法
getStatusBarHeight: function() {
var that = this;
common_vendor.index.getSystemInfo({
success: function(res) {
that.systemBarHeight = res.statusBarHeight;
}
});
},
toBack() {
common_vendor.index.navigateBack();
},
sliderChange(e) {
console.log("value 发生变化:" + e.detail.value);
},
musicPlay() {
console.log(innerAudioContext);
console.log("66666");
if (this.isPlay) {
console.log("111");
innerAudioContext.pause();
} else {
innerAudioContext.play();
}
this.isPlay = !this.isPlay;
},
convertSecondsToHMS(seconds) {
var minutes = Math.floor(seconds % 3600 / 60);
var secs = Math.floor(seconds % 60);
return [
// hours ? hours < 10 ? '0' + hours : hours : '00',
minutes < 10 ? "0" + minutes : minutes,
secs < 10 ? "0" + secs : secs
].join(":");
},
getPercentage(total, current) {
const percentage = current / total * 100;
return percentage.toFixed(2);
},
setlyricColor(index) {
if (this.currentTimeIndex == index) {
return {
fontSize: "40rpx",
color: "#FFFFFF"
};
} else {
return {
fontSize: "25rpx",
color: "#5D5D5D"
};
}
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $options.toBack()),
b: $data.systemBarHeight + "px",
c: common_vendor.o(($event) => $options.musicPlay()),
d: common_vendor.t($data.currentTime),
e: $data.speedValue,
f: common_vendor.o((...args) => $options.sliderChange && $options.sliderChange(...args)),
g: common_vendor.t($data.musicDuration),
h: common_vendor.f($data.lyricList, (item, index, i0) => {
return {
a: common_vendor.t(item.content),
b: "item-" + index,
c: common_vendor.s($options.setlyricColor(index))
};
}),
i: $data.currentTimeContent,
j: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/music/MusicPlayPage.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -1,4 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view><view class="content" style="{{j}}"><view class="" style="width:100%;background-image:url('/static/image/recharge_bg_1.png');background-size:cover;background-position:center;display:flex;flex-direction:column;align-items:center"><view class="" style="{{'display:flex;height:45rpx;width:100%;align-items:center;justify-content:center' + ';' + ('margin-top:' + b)}}"><image src="/static/image/ic_back.png" style="width:24.31rpx;height:43.06rpx;margin-left:36rpx;position:absolute;left:0" bindtap="{{a}}" alt=""/><text style="font-size:38rpx;color:white">音乐</text></view><view class="" style="width:431.25rpx;height:431.25rpx;background-color:#000000FF;margin-top:88rpx"></view><view class="" style="width:431.25rpx;display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin-top:40rpx"><image src="/static/image/ic_previous.png" style="width:25.69rpx;height:30.56rpx" mode=""/><image src="/static/image/ic_play_music.png" style="width:37.5rpx;height:52.78rpx" bindtap="{{c}}" mode=""/><image src="/static/image/ic_next.png" style="width:25.69rpx;height:30.56rpx" mode=""/></view><view class="" style="display:flex;flex-direction:row;margin-top:54rpx;width:100%;align-items:center"><text style="font-size:25rpx;color:#3FBBFEFF;margin-left:34rpx">{{d}}</text><slider step="1" value="{{e}}" max="100" bindchange="{{f}}" activeColor="#84bcd2FF" style="width:100%" backgroundColor="#d8d8d8FF" block-color="#3fbbfeFF" block-size="20"/><text style="font-size:25rpx;color:#3FBBFEFF;margin-right:34rpx">{{g}}</text></view><view class="" style="width:601.39rpx;display:flex;margin-top:36rpx;flex-direction:row;justify-content:space-between"><view class="" style="display:flex;flex-direction:row;align-items:center"><image src="/static/image/ic_report.png" style="width:22.92rpx;height:22.92rpx" mode=""></image><text style="font-size:29rpx;color:#999999FF;margin-left:20rpx">举报</text></view><view class="" style="display:flex;flex-direction:row;align-items:center"><image src="/static/image/ic_like.png" style="width:22.92rpx;height:22.92rpx" mode=""></image><text style="font-size:29rpx;color:#999999FF;margin-left:20rpx">点赞</text></view><view class="" style="display:flex;flex-direction:row;align-items:center"><image src="/static/image/ic_collect.png" style="width:22.92rpx;height:22.92rpx" mode=""></image><text style="font-size:29rpx;color:#999999FF;margin-left:20rpx">收藏</text></view><view class="" style="display:flex;flex-direction:row;align-items:center"><image src="/static/image/ic_download.png" style="width:22.92rpx;height:22.92rpx" mode=""></image><text style="font-size:29rpx;color:#999999FF;margin-left:20rpx">下载</text></view></view><scroll-view scroll-y="true" scroll-into-view="{{i}}" style="width:643.75rpx;height:200rpx;margin-top:60rpx"><view wx:for="{{h}}" wx:for-item="item" id="{{item.b}}" style="{{'width:100%;text-align:center;margin-top:11rpx;margin-bottom:11rpx' + ';' + item.c}}">{{item.a}}</view></scroll-view><view class="" style="width:683.33rpx;height:83.33rpx;margin-top:140rpx;display:flex;align-items:center;justify-content:center;background-image:linear-gradient(to left, #a541ffFF, #a541ffFF, #3fbbfeFF);border-radius:50rpx"><text style="font-size:38;color:white">制作同款</text></view></view></view></view>

View File

@ -1,9 +0,0 @@
.content {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
background-color: #0E0A10FF;
}

View File

@ -1,110 +0,0 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
var goodsList = [1, 2, 3, 4, 5, 6];
return {
systemBarHeight: 0,
goodsList,
currentIndex: 0,
currentVIPIndex: 0,
isVIP: false,
isWX: true,
price: "",
isAgreement: true
};
},
onLoad() {
this.getStatusBarHeight();
},
methods: {
// 获取状态栏高度的方法
getStatusBarHeight: function() {
var that = this;
common_vendor.index.getSystemInfo({
success: function(res) {
that.systemBarHeight = res.statusBarHeight;
}
});
},
toBack() {
common_vendor.index.navigateBack();
},
setBg(index) {
if (this.isVIP) {
return {
backgroundImage: null
};
}
if (this.currentIndex == index) {
return {
backgroundImage: "url('/static/image/recharge_goods_frame.png')"
};
} else {
return {
backgroundImage: null
};
}
},
clickGoods(index, price) {
this.isVIP = false;
this.currentIndex = index;
this.price = price;
},
clickVIPGoods(index, price) {
this.isVIP = true;
this.currentVIPIndex = index;
this.price = price;
},
setVIPBg(index) {
if (!this.isVIP) {
return {
backgroundImage: null
};
}
if (this.currentVIPIndex == index) {
return {
backgroundImage: "url('/static/image/recharge_goods_frame.png')"
};
} else {
return {
backgroundImage: null
};
}
},
setPayment(type) {
this.isWX = type;
},
clickAgreement() {
this.isAgreement = !this.isAgreement;
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $options.toBack()),
b: $data.systemBarHeight + "px",
c: common_vendor.f($data.goodsList, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.clickGoods(index, item)),
b: common_vendor.s($options.setBg(index))
};
}),
d: common_vendor.f($data.goodsList, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.clickVIPGoods(index, item)),
b: common_vendor.s($options.setVIPBg(index))
};
}),
e: $data.isWX ? "/static/image/ic_c_s.png" : "/static/image/ic_c.png",
f: common_vendor.o(($event) => $options.setPayment(true)),
g: !$data.isWX ? "/static/image/ic_c_s.png" : "/static/image/ic_c.png",
h: common_vendor.o(($event) => $options.setPayment(false)),
i: common_vendor.t($data.price),
j: $data.isAgreement ? "/static/image/ic_c_s.png" : "/static/image/ic_c.png",
k: common_vendor.o((...args) => $options.clickAgreement && $options.clickAgreement(...args)),
l: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/recharge/RechargePage.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -1,4 +0,0 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view><view class="content" style="{{l}}"><view class="" style="width:100%;height:370.14rpx;background-image:url('/static/image/recharge_bg_1.png');background-size:cover;background-position:center;display:flex;flex-direction:column;align-items:center"><view class="" style="{{'display:flex;height:45rpx;width:100%;align-items:center;justify-content:center' + ';' + ('margin-top:' + b)}}"><image src="/static/image/ic_back.png" style="width:24.31rpx;height:43.06rpx;margin-left:36rpx;position:absolute;left:0" bindtap="{{a}}" alt=""/><text style="font-size:38rpx;color:white">充值</text></view><image src="/static/image/recharge_info.png" style="width:683.33rpx;height:206.94rpx;margin-top:66rpx" mode=""></image></view><view class="" style="width:100%;height:1200.33rpx;background-image:url('/static/image/recharge_bg_2.png');background-size:cover;background-position:center;display:flex;flex-direction:column;align-items:center"><view class="" style="width:100%;display:flex;flex-direction:row;margin-top:61rpx;overflow:auto"><view wx:for="{{c}}" wx:for-item="item" class="" style="{{'width:192.36rpx;height:172.22rpx;margin-left:29rpx;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;padding:2rpx' + ';' + item.b}}"><image src="/static/image/recharge_goods.png" style="width:185.42rpx;height:164.58rpx" bindtap="{{item.a}}" mode=""></image></view></view><text style="color:white;font-size:38rpx;margin-top:73rpx">会员充值</text><text style="color:white;font-size:26rpx;margin-top:18rpx">会员服务期间,您将免费创作歌曲</text><view class="" style="width:100%;display:flex;flex-direction:row;margin-top:61rpx;overflow:auto"><view wx:for="{{d}}" wx:for-item="item" class="" style="{{'width:192.36rpx;height:172.22rpx;margin-left:29rpx;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;padding:2rpx' + ';' + item.b}}"><image src="/static/image/recharge_goods_2.png" style="width:185.42rpx;height:164.58rpx" bindtap="{{item.a}}" mode=""></image></view></view><view class="" bindtap="{{f}}" style="display:flex;width:100%;flex-direction:row;height:50rpx;margin-top:60rpx;align-items:center;justify-content:space-between"><view class="" style="display:flex;flex-direction:row;height:30rpx;align-items:center;justify-content:center;margin-left:33rpx"><image src="/static/image/ic_setting.png" style="width:30rpx;height:25rpx" mode=""></image><text style="color:white;font-size:22rpx;margin-left:11rpx">微信支付</text></view><image src="{{e}}" style="width:25rpx;height:25rpx;margin-right:33rpx" mode=""></image></view><view class="" bindtap="{{h}}" style="display:flex;width:100%;flex-direction:row;height:50rpx;margin-top:20rpx;align-items:center;justify-content:space-between"><view class="" style="display:flex;flex-direction:row;height:30rpx;align-items:center;justify-content:center;margin-left:33rpx"><image src="/static/image/ic_setting.png" style="width:30rpx;height:25rpx" mode=""></image><text style="color:white;font-size:22rpx;margin-left:11rpx">支付宝支付</text></view><image src="{{g}}" style="width:25rpx;height:25rpx;margin-right:33rpx" mode=""></image></view><view class="" style="width:683.33rpx;height:83.33rpx;margin-top:140rpx;display:flex;align-items:center;justify-content:center;background-image:linear-gradient(to left, #a541ffFF, #a541ffFF, #3fbbfeFF);border-radius:50rpx"><view class="" style="display:flex;flex-direction:row"><text style="font-size:38;color:white">¥{{i}}</text><text style="font-size:38;color:white;margin-left:33rpx">立即充值</text></view></view><view class="" style="display:flex;flex-direction:row;width:100%;color:white;font-size:21rpx;margin-top:28rpx;align-items:center;justify-content:center"><image src="{{j}}" bindtap="{{k}}" style="width:25rpx;height:25rpx;margin-right:33rpx" mode=""></image><text>我已阅并同意<text>《会员服务协议》</text><text>《自动续费服务协议》</text></text></view></view></view></view>

View File

@ -1,9 +0,0 @@
.content {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
background-color: #0E0A10;
}

View File

@ -1,29 +0,0 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
"es6": true,
"postcss": false,
"minified": false,
"newFeature": true,
"bigPackageSizeSupport": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram",
"libVersion": "3.5.8",
"appid": "wx595ec949c6efd72b",
"projectname": "magicsound",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

View File

@ -1,7 +0,0 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "magicsound",
"setting": {
"compileHotReLoad": true
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,170 +0,0 @@
"use strict";
const uni_modules_uniPopup_components_uniPopup_popup = require("../uni-popup/popup.js");
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uniPopup_components_uniPopup_i18n_index = require("../uni-popup/i18n/index.js");
const {
t
} = common_vendor.initVueI18n(uni_modules_uniPopup_components_uniPopup_i18n_index.messages);
const _sfc_main = {
name: "uniPopupDialog",
mixins: [uni_modules_uniPopup_components_uniPopup_popup.popup],
emits: ["confirm", "close", "update:modelValue", "input"],
props: {
inputType: {
type: String,
default: "text"
},
showClose: {
type: Boolean,
default: true
},
modelValue: {
type: [Number, String],
default: ""
},
placeholder: {
type: [String, Number],
default: ""
},
type: {
type: String,
default: "error"
},
mode: {
type: String,
default: "base"
},
title: {
type: String,
default: ""
},
content: {
type: String,
default: ""
},
beforeClose: {
type: Boolean,
default: false
},
cancelText: {
type: String,
default: ""
},
confirmText: {
type: String,
default: ""
},
maxlength: {
type: Number,
default: -1
},
focus: {
type: Boolean,
default: true
}
},
data() {
return {
dialogType: "error",
val: ""
};
},
computed: {
okText() {
return this.confirmText || t("uni-popup.ok");
},
closeText() {
return this.cancelText || t("uni-popup.cancel");
},
placeholderText() {
return this.placeholder || t("uni-popup.placeholder");
},
titleText() {
return this.title || t("uni-popup.title");
}
},
watch: {
type(val) {
this.dialogType = val;
},
mode(val) {
if (val === "input") {
this.dialogType = "info";
}
},
value(val) {
if (this.maxlength != -1 && this.mode === "input") {
this.val = val.slice(0, this.maxlength);
} else {
this.val = val;
}
},
val(val) {
this.$emit("update:modelValue", val);
}
},
created() {
this.popup.disableMask();
if (this.mode === "input") {
this.dialogType = "info";
this.val = this.value;
this.val = this.modelValue;
} else {
this.dialogType = this.type;
}
},
methods: {
/**
* 点击确认按钮
*/
onOk() {
if (this.mode === "input") {
this.$emit("confirm", this.val);
} else {
this.$emit("confirm");
}
if (this.beforeClose)
return;
this.popup.close();
},
/**
* 点击取消按钮
*/
closeDialog() {
this.$emit("close");
if (this.beforeClose)
return;
this.popup.close();
},
close() {
this.popup.close();
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.t($options.titleText),
b: common_vendor.n("uni-popup__" + $data.dialogType),
c: $props.mode === "base"
}, $props.mode === "base" ? {
d: common_vendor.t($props.content)
} : {
e: $props.maxlength,
f: $props.inputType,
g: $options.placeholderText,
h: $props.focus,
i: $data.val,
j: common_vendor.o(($event) => $data.val = $event.detail.value)
}, {
k: $props.showClose
}, $props.showClose ? {
l: common_vendor.t($options.closeText),
m: common_vendor.o((...args) => $options.closeDialog && $options.closeDialog(...args))
} : {}, {
n: common_vendor.t($options.okText),
o: common_vendor.n($props.showClose ? "uni-border-left" : ""),
p: common_vendor.o((...args) => $options.onOk && $options.onOk(...args))
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue"]]);
wx.createComponent(Component);

View File

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view class="uni-popup-dialog"><view class="uni-dialog-title"><text class="{{['uni-dialog-title-text', b]}}">{{a}}</text></view><view wx:if="{{c}}" class="uni-dialog-content"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><text class="uni-dialog-content-text">{{d}}</text></block></view><view wx:else class="uni-dialog-content"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><block wx:if="{{r0}}"><input class="uni-dialog-input" maxlength="{{e}}" type="{{f}}" placeholder="{{g}}" focus="{{h}}" value="{{i}}" bindinput="{{j}}"></input></block></block></view><view class="uni-dialog-button-group"><view wx:if="{{k}}" class="uni-dialog-button" bindtap="{{m}}"><text class="uni-dialog-button-text">{{l}}</text></view><view class="{{['uni-dialog-button', o]}}" bindtap="{{p}}"><text class="uni-dialog-button-text uni-button-color">{{n}}</text></view></view></view>

View File

@ -1,99 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.uni-popup-dialog {
width: 300px;
border-radius: 11px;
background-color: #fff;
}
.uni-dialog-title {
display: flex;
flex-direction: row;
justify-content: center;
padding-top: 25px;
}
.uni-dialog-title-text {
font-size: 16px;
font-weight: 500;
}
.uni-dialog-content {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 20px;
}
.uni-dialog-content-text {
font-size: 14px;
color: #6C6C6C;
}
.uni-dialog-button-group {
display: flex;
flex-direction: row;
border-top-color: #f5f5f5;
border-top-style: solid;
border-top-width: 1px;
}
.uni-dialog-button {
display: flex;
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
height: 45px;
}
.uni-border-left {
border-left-color: #f0f0f0;
border-left-style: solid;
border-left-width: 1px;
}
.uni-dialog-button-text {
font-size: 16px;
color: #333;
}
.uni-button-color {
color: #007aff;
}
.uni-dialog-input {
flex: 1;
font-size: 14px;
border: 1px #eee solid;
height: 40px;
padding: 0 10px;
border-radius: 5px;
color: #555;
}
.uni-popup__success {
color: #4cd964;
}
.uni-popup__warn {
color: #f0ad4e;
}
.uni-popup__error {
color: #dd524d;
}
.uni-popup__info {
color: #909399;
}

View File

@ -1,28 +0,0 @@
"use strict";
const en = {
"uni-popup.cancel": "cancel",
"uni-popup.ok": "ok",
"uni-popup.placeholder": "pleace enter",
"uni-popup.title": "Hint",
"uni-popup.shareTitle": "Share to"
};
const zhHans = {
"uni-popup.cancel": "取消",
"uni-popup.ok": "确定",
"uni-popup.placeholder": "请输入",
"uni-popup.title": "提示",
"uni-popup.shareTitle": "分享到"
};
const zhHant = {
"uni-popup.cancel": "取消",
"uni-popup.ok": "確定",
"uni-popup.placeholder": "請輸入",
"uni-popup.title": "提示",
"uni-popup.shareTitle": "分享到"
};
const messages = {
en,
"zh-Hans": zhHans,
"zh-Hant": zhHant
};
exports.messages = messages;

View File

@ -1,26 +0,0 @@
"use strict";
const popup = {
data() {
return {};
},
created() {
this.popup = this.getParent();
},
methods: {
/**
* 获取父元素实例
*/
getParent(name = "uniPopup") {
let parent = this.$parent;
let parentName = parent.$options.name;
while (parentName !== name) {
parent = parent.$parent;
if (!parent)
return false;
parentName = parent.$options.name;
}
return parent;
}
}
};
exports.popup = popup;

View File

@ -1,393 +0,0 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "uniPopup",
components: {},
emits: ["change", "maskClick"],
props: {
// 开启动画
animation: {
type: Boolean,
default: true
},
// 弹出层类型可选值top: 顶部弹出层bottom底部弹出层center全屏弹出层
// message: 消息提示 ; dialog : 对话框
type: {
type: String,
default: "center"
},
// maskClick
isMaskClick: {
type: Boolean,
default: null
},
// TODO 2 个版本后废弃属性 ,使用 isMaskClick
maskClick: {
type: Boolean,
default: null
},
backgroundColor: {
type: String,
default: "none"
},
safeArea: {
type: Boolean,
default: true
},
maskBackgroundColor: {
type: String,
default: "rgba(0, 0, 0, 0.4)"
},
borderRadius: {
type: String
}
},
watch: {
/**
* 监听type类型
*/
type: {
handler: function(type) {
if (!this.config[type])
return;
this[this.config[type]](true);
},
immediate: true
},
isDesktop: {
handler: function(newVal) {
if (!this.config[newVal])
return;
this[this.config[this.type]](true);
},
immediate: true
},
/**
* 监听遮罩是否可点击
* @param {Object} val
*/
maskClick: {
handler: function(val) {
this.mkclick = val;
},
immediate: true
},
isMaskClick: {
handler: function(val) {
this.mkclick = val;
},
immediate: true
},
// H5 下禁止底部滚动
showPopup(show) {
}
},
data() {
return {
duration: 300,
ani: [],
showPopup: false,
showTrans: false,
popupWidth: 0,
popupHeight: 0,
config: {
top: "top",
bottom: "bottom",
center: "center",
left: "left",
right: "right",
message: "top",
dialog: "center",
share: "bottom"
},
maskClass: {
position: "fixed",
bottom: 0,
top: 0,
left: 0,
right: 0,
backgroundColor: "rgba(0, 0, 0, 0.4)"
},
transClass: {
backgroundColor: "transparent",
borderRadius: this.borderRadius || "0",
position: "fixed",
left: 0,
right: 0
},
maskShow: true,
mkclick: true,
popupstyle: "top"
};
},
computed: {
getStyles() {
let res = { backgroundColor: this.bg };
if (this.borderRadius || "0") {
res = Object.assign(res, { borderRadius: this.borderRadius });
}
return res;
},
isDesktop() {
return this.popupWidth >= 500 && this.popupHeight >= 500;
},
bg() {
if (this.backgroundColor === "" || this.backgroundColor === "none") {
return "transparent";
}
return this.backgroundColor;
}
},
mounted() {
const fixSize = () => {
const {
windowWidth,
windowHeight,
windowTop,
safeArea,
screenHeight,
safeAreaInsets
} = common_vendor.index.getSystemInfoSync();
this.popupWidth = windowWidth;
this.popupHeight = windowHeight + (windowTop || 0);
if (safeArea && this.safeArea) {
this.safeAreaInsets = screenHeight - safeArea.bottom;
} else {
this.safeAreaInsets = 0;
}
};
fixSize();
},
// TODO vue3
unmounted() {
this.setH5Visible();
},
activated() {
this.setH5Visible(!this.showPopup);
},
deactivated() {
this.setH5Visible(true);
},
created() {
if (this.isMaskClick === null && this.maskClick === null) {
this.mkclick = true;
} else {
this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick;
}
if (this.animation) {
this.duration = 300;
} else {
this.duration = 0;
}
this.messageChild = null;
this.clearPropagation = false;
this.maskClass.backgroundColor = this.maskBackgroundColor;
},
methods: {
setH5Visible(visible = true) {
},
/**
* 公用方法不显示遮罩层
*/
closeMask() {
this.maskShow = false;
},
/**
* 公用方法遮罩层禁止点击
*/
disableMask() {
this.mkclick = false;
},
// TODO nvue 取消冒泡
clear(e) {
e.stopPropagation();
this.clearPropagation = true;
},
open(direction) {
if (this.showPopup) {
return;
}
let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"];
if (!(direction && innerType.indexOf(direction) !== -1)) {
direction = this.type;
}
if (!this.config[direction]) {
console.error("缺少类型:", direction);
return;
}
this[this.config[direction]]();
this.$emit("change", {
show: true,
type: direction
});
},
close(type) {
this.showTrans = false;
this.$emit("change", {
show: false,
type: this.type
});
clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.showPopup = false;
}, 300);
},
// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
touchstart() {
this.clearPropagation = false;
},
onTap() {
if (this.clearPropagation) {
this.clearPropagation = false;
return;
}
this.$emit("maskClick");
if (!this.mkclick)
return;
this.close();
},
/**
* 顶部弹出样式处理
*/
top(type) {
this.popupstyle = this.isDesktop ? "fixforpc-top" : "top";
this.ani = ["slide-top"];
this.transClass = {
position: "fixed",
left: 0,
right: 0,
backgroundColor: this.bg,
borderRadius: this.borderRadius || "0"
};
if (type)
return;
this.showPopup = true;
this.showTrans = true;
this.$nextTick(() => {
if (this.messageChild && this.type === "message") {
this.messageChild.timerClose();
}
});
},
/**
* 底部弹出样式处理
*/
bottom(type) {
this.popupstyle = "bottom";
this.ani = ["slide-bottom"];
this.transClass = {
position: "fixed",
left: 0,
right: 0,
bottom: 0,
paddingBottom: this.safeAreaInsets + "px",
backgroundColor: this.bg,
borderRadius: this.borderRadius || "0"
};
if (type)
return;
this.showPopup = true;
this.showTrans = true;
},
/**
* 中间弹出样式处理
*/
center(type) {
this.popupstyle = "center";
this.ani = ["fade"];
this.transClass = {
position: "fixed",
display: "flex",
flexDirection: "column",
bottom: 0,
left: 0,
right: 0,
top: 0,
justifyContent: "center",
alignItems: "center",
borderRadius: this.borderRadius || "0"
};
if (type)
return;
this.showPopup = true;
this.showTrans = true;
},
left(type) {
this.popupstyle = "left";
this.ani = ["slide-left"];
this.transClass = {
position: "fixed",
left: 0,
bottom: 0,
top: 0,
backgroundColor: this.bg,
borderRadius: this.borderRadius || "0",
display: "flex",
flexDirection: "column"
};
if (type)
return;
this.showPopup = true;
this.showTrans = true;
},
right(type) {
this.popupstyle = "right";
this.ani = ["slide-right"];
this.transClass = {
position: "fixed",
bottom: 0,
right: 0,
top: 0,
backgroundColor: this.bg,
borderRadius: this.borderRadius || "0",
display: "flex",
flexDirection: "column"
};
if (type)
return;
this.showPopup = true;
this.showTrans = true;
}
}
};
if (!Array) {
const _easycom_uni_transition2 = common_vendor.resolveComponent("uni-transition");
_easycom_uni_transition2();
}
const _easycom_uni_transition = () => "../../../uni-transition/components/uni-transition/uni-transition.js";
if (!Math) {
_easycom_uni_transition();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.showPopup
}, $data.showPopup ? common_vendor.e({
b: $data.maskShow
}, $data.maskShow ? {
c: common_vendor.o($options.onTap),
d: common_vendor.p({
name: "mask",
["mode-class"]: "fade",
styles: $data.maskClass,
duration: $data.duration,
show: $data.showTrans
})
} : {}, {
e: common_vendor.s($options.getStyles),
f: common_vendor.n($data.popupstyle),
g: common_vendor.o((...args) => $options.clear && $options.clear(...args)),
h: common_vendor.o($options.onTap),
i: common_vendor.p({
["mode-class"]: $data.ani,
name: "content",
styles: $data.transClass,
duration: $data.duration,
show: $data.showTrans
}),
j: common_vendor.o((...args) => $options.touchstart && $options.touchstart(...args)),
k: common_vendor.n($data.popupstyle),
l: common_vendor.n($options.isDesktop ? "fixforpc-z-index" : "")
}) : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
wx.createComponent(Component);

View File

@ -1,6 +0,0 @@
{
"component": true,
"usingComponents": {
"uni-transition": "../../../uni-transition/components/uni-transition/uni-transition"
}
}

View File

@ -1 +0,0 @@
<view wx:if="{{a}}" class="{{['uni-popup', k, l]}}"><view bindtouchstart="{{j}}"><uni-transition wx:if="{{b}}" key="1" bindclick="{{c}}" u-i="59d86e69-0" bind:__l="__l" u-p="{{d}}"/><uni-transition wx:if="{{i}}" u-s="{{['d']}}" key="2" bindclick="{{h}}" u-i="59d86e69-1" bind:__l="__l" u-p="{{i}}"><view style="{{e}}" class="{{['uni-popup__wrapper', f]}}" bindtap="{{g}}"><slot/></view></uni-transition></view></view>

View File

@ -1,47 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.uni-popup {
position: fixed;
z-index: 99;
}
.uni-popup.top, .uni-popup.left, .uni-popup.right {
top: 0;
}
.uni-popup .uni-popup__wrapper {
display: block;
position: relative;
/* iphonex 等安全区设置,底部安全区适配 */
}
.uni-popup .uni-popup__wrapper.left, .uni-popup .uni-popup__wrapper.right {
padding-top: 0;
flex: 1;
}
.fixforpc-z-index {
z-index: 999;
}
.fixforpc-top {
top: 0;
}

View File

@ -1,115 +0,0 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
class MPAnimation {
constructor(options, _this) {
this.options = options;
this.animation = common_vendor.index.createAnimation({
...options
});
this.currentStepAnimates = {};
this.next = 0;
this.$ = _this;
}
_nvuePushAnimates(type, args) {
let aniObj = this.currentStepAnimates[this.next];
let styles = {};
if (!aniObj) {
styles = {
styles: {},
config: {}
};
} else {
styles = aniObj;
}
if (animateTypes1.includes(type)) {
if (!styles.styles.transform) {
styles.styles.transform = "";
}
let unit = "";
if (type === "rotate") {
unit = "deg";
}
styles.styles.transform += `${type}(${args + unit}) `;
} else {
styles.styles[type] = `${args}`;
}
this.currentStepAnimates[this.next] = styles;
}
_animateRun(styles = {}, config = {}) {
let ref = this.$.$refs["ani"].ref;
if (!ref)
return;
return new Promise((resolve, reject) => {
nvueAnimation.transition(ref, {
styles,
...config
}, (res) => {
resolve();
});
});
}
_nvueNextAnimate(animates, step = 0, fn) {
let obj = animates[step];
if (obj) {
let {
styles,
config
} = obj;
this._animateRun(styles, config).then(() => {
step += 1;
this._nvueNextAnimate(animates, step, fn);
});
} else {
this.currentStepAnimates = {};
typeof fn === "function" && fn();
this.isEnd = true;
}
}
step(config = {}) {
this.animation.step(config);
return this;
}
run(fn) {
this.$.animationData = this.animation.export();
this.$.timer = setTimeout(() => {
typeof fn === "function" && fn();
}, this.$.durationTime);
}
}
const animateTypes1 = [
"matrix",
"matrix3d",
"rotate",
"rotate3d",
"rotateX",
"rotateY",
"rotateZ",
"scale",
"scale3d",
"scaleX",
"scaleY",
"scaleZ",
"skew",
"skewX",
"skewY",
"translate",
"translate3d",
"translateX",
"translateY",
"translateZ"
];
const animateTypes2 = ["opacity", "backgroundColor"];
const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"];
animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => {
MPAnimation.prototype[type] = function(...args) {
this.animation[type](...args);
return this;
};
});
function createAnimation(option, _this) {
if (!_this)
return;
clearTimeout(_this.timer);
return new MPAnimation(option, _this);
}
exports.createAnimation = createAnimation;

View File

@ -1,265 +0,0 @@
"use strict";
const uni_modules_uniTransition_components_uniTransition_createAnimation = require("./createAnimation.js");
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "uniTransition",
emits: ["click", "change"],
props: {
show: {
type: Boolean,
default: false
},
modeClass: {
type: [Array, String],
default() {
return "fade";
}
},
duration: {
type: Number,
default: 300
},
styles: {
type: Object,
default() {
return {};
}
},
customClass: {
type: String,
default: ""
},
onceRender: {
type: Boolean,
default: false
}
},
data() {
return {
isShow: false,
transform: "",
opacity: 1,
animationData: {},
durationTime: 300,
config: {}
};
},
watch: {
show: {
handler(newVal) {
if (newVal) {
this.open();
} else {
if (this.isShow) {
this.close();
}
}
},
immediate: true
}
},
computed: {
// 生成样式数据
stylesObject() {
let styles = {
...this.styles,
"transition-duration": this.duration / 1e3 + "s"
};
let transform = "";
for (let i in styles) {
let line = this.toLine(i);
transform += line + ":" + styles[i] + ";";
}
return transform;
},
// 初始化动画条件
transformStyles() {
return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject;
}
},
created() {
this.config = {
duration: this.duration,
timingFunction: "ease",
transformOrigin: "50% 50%",
delay: 0
};
this.durationTime = this.duration;
},
methods: {
/**
* ref 触发 初始化动画
*/
init(obj = {}) {
if (obj.duration) {
this.durationTime = obj.duration;
}
this.animation = uni_modules_uniTransition_components_uniTransition_createAnimation.createAnimation(Object.assign(this.config, obj), this);
},
/**
* 点击组件触发回调
*/
onClick() {
this.$emit("click", {
detail: this.isShow
});
},
/**
* ref 触发 动画分组
* @param {Object} obj
*/
step(obj, config = {}) {
if (!this.animation)
return;
for (let i in obj) {
try {
if (typeof obj[i] === "object") {
this.animation[i](...obj[i]);
} else {
this.animation[i](obj[i]);
}
} catch (e) {
console.error(`方法 ${i} 不存在`);
}
}
this.animation.step(config);
return this;
},
/**
* ref 触发 执行动画
*/
run(fn) {
if (!this.animation)
return;
this.animation.run(fn);
},
// 开始过度动画
open() {
clearTimeout(this.timer);
this.transform = "";
this.isShow = true;
let { opacity, transform } = this.styleInit(false);
if (typeof opacity !== "undefined") {
this.opacity = opacity;
}
this.transform = transform;
this.$nextTick(() => {
this.timer = setTimeout(() => {
this.animation = uni_modules_uniTransition_components_uniTransition_createAnimation.createAnimation(this.config, this);
this.tranfromInit(false).step();
this.animation.run();
this.$emit("change", {
detail: this.isShow
});
}, 20);
});
},
// 关闭过度动画
close(type) {
if (!this.animation)
return;
this.tranfromInit(true).step().run(() => {
this.isShow = false;
this.animationData = null;
this.animation = null;
let { opacity, transform } = this.styleInit(false);
this.opacity = opacity || 1;
this.transform = transform;
this.$emit("change", {
detail: this.isShow
});
});
},
// 处理动画开始前的默认样式
styleInit(type) {
let styles = {
transform: ""
};
let buildStyle = (type2, mode) => {
if (mode === "fade") {
styles.opacity = this.animationType(type2)[mode];
} else {
styles.transform += this.animationType(type2)[mode] + " ";
}
};
if (typeof this.modeClass === "string") {
buildStyle(type, this.modeClass);
} else {
this.modeClass.forEach((mode) => {
buildStyle(type, mode);
});
}
return styles;
},
// 处理内置组合动画
tranfromInit(type) {
let buildTranfrom = (type2, mode) => {
let aniNum = null;
if (mode === "fade") {
aniNum = type2 ? 0 : 1;
} else {
aniNum = type2 ? "-100%" : "0";
if (mode === "zoom-in") {
aniNum = type2 ? 0.8 : 1;
}
if (mode === "zoom-out") {
aniNum = type2 ? 1.2 : 1;
}
if (mode === "slide-right") {
aniNum = type2 ? "100%" : "0";
}
if (mode === "slide-bottom") {
aniNum = type2 ? "100%" : "0";
}
}
this.animation[this.animationMode()[mode]](aniNum);
};
if (typeof this.modeClass === "string") {
buildTranfrom(type, this.modeClass);
} else {
this.modeClass.forEach((mode) => {
buildTranfrom(type, mode);
});
}
return this.animation;
},
animationType(type) {
return {
fade: type ? 0 : 1,
"slide-top": `translateY(${type ? "0" : "-100%"})`,
"slide-right": `translateX(${type ? "0" : "100%"})`,
"slide-bottom": `translateY(${type ? "0" : "100%"})`,
"slide-left": `translateX(${type ? "0" : "-100%"})`,
"zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
"zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
};
},
// 内置动画类型与实际动画对应字典
animationMode() {
return {
fade: "opacity",
"slide-top": "translateY",
"slide-right": "translateX",
"slide-bottom": "translateY",
"slide-left": "translateX",
"zoom-in": "scale",
"zoom-out": "scale"
};
},
// 驼峰转中横线
toLine(name) {
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.isShow,
b: $data.animationData,
c: common_vendor.n($props.customClass),
d: common_vendor.s($options.transformStyles),
e: common_vendor.o((...args) => $options.onClick && $options.onClick(...args))
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
wx.createComponent(Component);

View File

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view hidden="{{!a}}" ref="ani" animation="{{b}}" class="{{c}}" style="{{d}}" bindtap="{{e}}"><slot></slot></view>

View File

@ -1,102 +0,0 @@
"use strict";
const props = {
value: {
type: Number,
default: 0
},
modelValue: {
type: Number,
default: 0
},
tabs: {
type: Array,
default() {
return [];
}
},
bgColor: {
type: String,
default: "#fff"
},
padding: {
type: String,
default: "0"
},
color: {
type: String,
default: "#333"
},
activeColor: {
type: String,
default: "#2979ff"
},
fontSize: {
type: String,
default: "28rpx"
},
activeFontSize: {
type: String,
default: "32rpx"
},
bold: {
type: Boolean,
default: false
},
scroll: {
type: Boolean,
default: true
},
height: {
type: String,
default: "70rpx"
},
lineColor: {
type: String,
default: "#2979ff"
},
lineHeight: {
type: [String, Number],
default: "10rpx"
},
lineScale: {
type: Number,
default: 0.5
},
lineRadius: {
type: String,
default: "10rpx"
},
pills: {
type: Boolean,
default: false
},
pillsColor: {
type: String,
default: "#2979ff"
},
pillsBorderRadius: {
type: String,
default: "10rpx"
},
field: {
type: String,
default: ""
},
fixed: {
type: Boolean,
default: false
},
paddingItem: {
type: String,
default: "0 22rpx"
},
lineAnimation: {
type: Boolean,
default: true
},
zIndex: {
type: Number,
default: 1993
}
};
exports.props = props;

View File

@ -1,14 +0,0 @@
"use strict";
function startMicroTask(callback) {
if (typeof queueMicrotask === "function") {
queueMicrotask(callback);
} else if (typeof MutationObserver === "function") {
const node = document.createElement("div");
const observer = new MutationObserver(callback);
observer.observe(node, { childList: true });
node.textContent = "xfjpeter";
} else {
setTimeout(callback, 0);
}
}
exports.startMicroTask = startMicroTask;

View File

@ -1,189 +0,0 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_vTabs_components_vTabs_utils = require("./utils.js");
const uni_modules_vTabs_components_vTabs_props = require("./props.js");
const _sfc_main = {
name: "VTabs",
props: uni_modules_vTabs_components_vTabs_props.props,
emits: ["update:modelValue", "change"],
data() {
return {
lineWidth: 30,
currentWidth: 0,
// 当前选项的宽度
lineLeft: 0,
// 滑块距离左侧的位置
pillsLeft: 0,
// 胶囊距离左侧的位置
scrollLeft: 0,
// 距离左边的位置
container: { width: 0, height: 0, left: 0, right: 0 },
// 容器的宽高,左右距离
current: 0,
// 当前选中项
scrollWidth: 0
// 可以滚动的宽度
};
},
computed: {
getDomId() {
const len = 16;
const $chars = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678";
const maxPos = $chars.length;
let pwd = "";
for (let i = 0; i < len; i++) {
pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
}
return `xfjpeter_${pwd}`;
}
},
watch: {
modelValue: {
immediate: true,
handler(newVal) {
this.current = newVal > -1 && newVal < this.tabs.length ? newVal : 0;
this.$nextTick(this.update);
}
}
},
methods: {
// 切换事件
change(index) {
const isDisabled = !!this.tabs[index].disabled;
if (this.current !== index && !isDisabled) {
this.current = index;
this.$emit("update:modelValue", index);
this.$emit("change", index);
}
},
createQueryHandler() {
const query = common_vendor.index.createSelectorQuery().in(this);
return query;
},
update() {
const _this = this;
uni_modules_vTabs_components_vTabs_utils.startMicroTask(() => {
if (!this.tabs.length)
return;
_this.createQueryHandler().select(`#${this.getDomId}`).boundingClientRect((data) => {
const { width, height, left, right } = data || {};
this.container = { width, height, left, right: right - width };
_this.calcScrollWidth();
_this.setScrollLeft();
_this.setLine();
}).exec();
});
},
// 计算可以滚动的宽度
calcScrollWidth(callback) {
const view = this.createQueryHandler().select(`#${this.getDomId}`);
view.fields({ scrollOffset: true });
view.scrollOffset((res) => {
if (typeof callback === "function") {
callback(res);
} else {
this.scrollWidth = res.scrollWidth;
}
}).exec();
},
// 设置滚动条滚动的进度
setScrollLeft() {
this.calcScrollWidth((res) => {
let scrollLeft = res.scrollLeft;
this.createQueryHandler().select(`#${this.getDomId} .v-tabs__container-item.active`).boundingClientRect((data) => {
if (!data)
return;
let curHalfWidth = (this.container.width - data.width) / 2;
let scrollDiff = this.scrollWidth - this.container.width;
scrollLeft += data.left - curHalfWidth - this.container.left;
if (scrollLeft < 0)
scrollLeft = 0;
else if (scrollLeft > scrollDiff)
scrollLeft = scrollDiff;
this.scrollLeft = scrollLeft;
}).exec();
});
},
setLine() {
this.calcScrollWidth((res) => {
const scrollLeft = res.scrollLeft;
this.createQueryHandler().select(`#${this.getDomId} .v-tabs__container-item.active`).boundingClientRect((data) => {
if (!data)
return;
if (this.pills) {
this.currentWidth = data.width;
this.pillsLeft = scrollLeft + data.left - this.container.left;
} else {
this.lineWidth = data.width * this.lineScale;
this.lineLeft = scrollLeft + data.left + (data.width - data.width * this.lineScale) / 2 - this.container.left;
}
}).exec();
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.f(_ctx.tabs, (v, i, i0) => {
return {
a: common_vendor.t(_ctx.field ? v[_ctx.field] : v),
b: "d-" + i0,
c: common_vendor.r("d", {
row: v,
index: i
}, i0),
d: common_vendor.n({
disabled: !!v.disabled
}),
e: common_vendor.n({
active: $data.current == i
}),
f: i,
g: $data.current == i ? _ctx.activeColor : _ctx.color,
h: $data.current == i ? _ctx.fontSize : _ctx.fontSize,
i: _ctx.bold && $data.current == i ? "bold" : "",
j: common_vendor.o(($event) => $options.change(i), i)
};
}),
b: !_ctx.scroll ? "center" : "",
c: _ctx.scroll ? "" : 1,
d: _ctx.paddingItem,
e: !!_ctx.tabs.length
}, !!_ctx.tabs.length ? common_vendor.e({
f: !_ctx.pills
}, !_ctx.pills ? {
g: common_vendor.n({
animation: _ctx.lineAnimation
}),
h: _ctx.lineColor,
i: $data.lineWidth + "px",
j: _ctx.lineHeight,
k: _ctx.lineRadius,
l: `translate3d(${$data.lineLeft}px, 0, 0)`
} : {
m: common_vendor.n({
animation: _ctx.lineAnimation
}),
n: _ctx.pillsColor,
o: _ctx.pillsBorderRadius,
p: $data.currentWidth + "px",
q: `translate3d(${$data.pillsLeft}px, 0, 0)`,
r: _ctx.height
}) : {}, {
s: _ctx.scroll ? "inline-flex" : "flex",
t: _ctx.scroll ? "nowrap" : "normal",
v: _ctx.bgColor,
w: _ctx.height,
x: _ctx.padding,
y: $options.getDomId,
z: _ctx.scroll,
A: _ctx.scroll ? $data.scrollLeft : 0,
B: _ctx.scroll,
C: _ctx.fixed ? "fixed" : "relative",
D: _ctx.zIndex,
E: _ctx.fixed ? _ctx.height : "0",
F: _ctx.padding
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4a111109"], ["__file", "F:/gitCode/uniapp/magicsound/uni_modules/v-tabs/components/v-tabs/v-tabs.vue"]]);
wx.createComponent(Component);

View File

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -1 +0,0 @@
<view class="v-tabs data-v-4a111109"><scroll-view class="data-v-4a111109" id="{{y}}" scroll-x="{{z}}" scroll-left="{{A}}" scroll-with-animation="{{B}}" style="{{'position:' + C + ';' + ('z-index:' + D) + ';' + ('width:' + '100%')}}"><view class="v-tabs__container data-v-4a111109" style="{{'display:' + s + ';' + ('white-space:' + t) + ';' + ('background:' + v) + ';' + ('height:' + w) + ';' + ('padding:' + x)}}"><view wx:for="{{a}}" wx:for-item="v" wx:key="f" class="{{['data-v-4a111109', 'v-tabs__container-item', v.d, v.e]}}" style="{{'color:' + v.g + ';' + ('font-size:' + v.h) + ';' + ('font-weight:' + v.i) + ';' + ('justify-content:' + b) + ';' + ('flex:' + c) + ';' + ('padding:' + d)}}" bindtap="{{v.j}}"><block wx:if="{{$slots.d}}"><slot name="{{v.b}}"></slot></block><block wx:else>{{v.a}}</block></view><block wx:if="{{e}}"><view wx:if="{{f}}" class="{{['data-v-4a111109', 'v-tabs__container-line', g]}}" style="{{'background:' + h + ';' + ('width:' + i) + ';' + ('height:' + j) + ';' + ('border-radius:' + k) + ';' + ('transform:' + l)}}"/><view wx:else class="{{['data-v-4a111109', 'v-tabs__container-pills', m]}}" style="{{'background:' + n + ';' + ('border-radius:' + o) + ';' + ('width:' + p) + ';' + ('transform:' + q) + ';' + ('height:' + r)}}"/></block></view></scroll-view><view class="v-tabs__placeholder data-v-4a111109" style="{{'height:' + E + ';' + ('padding:' + F)}}"></view></view>

View File

@ -1,64 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.v-tabs.data-v-4a111109 {
width: 100%;
box-sizing: border-box;
overflow: hidden;
}
.v-tabs__container.data-v-4a111109 {
min-width: 100%;
position: relative;
display: inline-flex;
align-items: center;
white-space: nowrap;
overflow: hidden;
}
.v-tabs__container-item.data-v-4a111109 {
flex-shrink: 0;
display: flex;
align-items: center;
height: 100%;
position: relative;
z-index: 10;
transition: all 0.3s;
white-space: nowrap;
}
.v-tabs__container-item.disabled.data-v-4a111109 {
opacity: 0.5;
color: #999;
}
.v-tabs__container-line.data-v-4a111109 {
position: absolute;
left: 0;
bottom: 0;
}
.v-tabs__container-pills.data-v-4a111109 {
position: absolute;
z-index: 9;
}
.v-tabs__container-line.animation.data-v-4a111109, .v-tabs__container-pills.animation.data-v-4a111109 {
transition: all 0.3s linear;
}