请求
This commit is contained in:
parent
7e72cfc2e0
commit
e677158127
|
|
@ -82,9 +82,12 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
AppServer
|
||||
} from '../../modules/api/AppServer';
|
||||
export default {
|
||||
data() {
|
||||
var tabs = ['推荐', '摇滚', '民谣', '爵士', '说唱', '流行'];
|
||||
var tabs = [];
|
||||
return {
|
||||
systemBarHeight: 0,
|
||||
subtractedHeight: 0,
|
||||
|
|
@ -132,25 +135,26 @@
|
|||
this.current = e.detail.current
|
||||
this.swiperCurrent = e.detail.current
|
||||
},
|
||||
|
||||
|
||||
//获取音乐分类
|
||||
getMusicGenresList() {
|
||||
var that = this;
|
||||
var appserver = new AppServer();
|
||||
appserver.GetMusicGenresList().then(data => {
|
||||
console.log("getMusicGenresList", data);
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
console.log("getMusicGenresList", data.data);
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
that.tabs.push(data[i].genreName);
|
||||
console.log("data[i].genreName", data[i].genreName);
|
||||
}
|
||||
console.log("that.tabs", that.tabs);
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
toMusicPlay() {
|
||||
|
||||
let loginValue = uni.getStorageSync("isLoginKey");
|
||||
|
||||
|
||||
if (!loginValue) {
|
||||
//跳转进入登录页
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
2
unpackage/dist/dev/mp-weixin/app.js
vendored
2
unpackage/dist/dev/mp-weixin/app.js
vendored
|
|
@ -22,7 +22,7 @@ const _sfc_main = {
|
|||
console.log("App Hide");
|
||||
}
|
||||
};
|
||||
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/work/magicsound/magicsound/App.vue"]]);
|
||||
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 {
|
||||
|
|
|
|||
112
unpackage/dist/dev/mp-weixin/modules/api/AppServer.js
vendored
Normal file
112
unpackage/dist/dev/mp-weixin/modules/api/AppServer.js
vendored
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
"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;
|
||||
191
unpackage/dist/dev/mp-weixin/modules/api/md5.js
vendored
Normal file
191
unpackage/dist/dev/mp-weixin/modules/api/md5.js
vendored
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
"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;
|
||||
|
|
@ -31,5 +31,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
c: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/work/magicsound/magicsound/pages/create/CreateInfoPage.vue"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/create/CreateInfoPage.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
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", "c843519c-1,c843519c-0"),
|
||||
i: common_vendor.sr("inputClose", "5a233947-1,5a233947-0"),
|
||||
j: common_vendor.o($options.dialogInputConfirm),
|
||||
k: common_vendor.p({
|
||||
mode: "input",
|
||||
|
|
@ -100,7 +100,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
value: "",
|
||||
placeholder: "请输入内容"
|
||||
}),
|
||||
l: common_vendor.sr("inputDialog", "c843519c-0"),
|
||||
l: common_vendor.sr("inputDialog", "5a233947-0"),
|
||||
m: common_vendor.p({
|
||||
type: "center",
|
||||
["background-color"]: "#333333"
|
||||
|
|
@ -108,5 +108,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
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:/work/magicsound/magicsound/pages/create/createpage.vue"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/create/createpage.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<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="c843519c-0" bind:__l="__l" u-p="{{m}}"><uni-popup-dialog wx:if="{{k}}" class="r" u-r="inputClose" bindconfirm="{{j}}" u-i="c843519c-1,c843519c-0" bind:__l="__l" u-p="{{k}}"></uni-popup-dialog></uni-popup></view></view></view>
|
||||
<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>
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const modules_api_AppServer = require("../../modules/api/AppServer.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
var tabs = ["推荐", "摇滚", "民谣", "爵士", "说唱", "流行"];
|
||||
var tabs = [];
|
||||
return {
|
||||
systemBarHeight: 0,
|
||||
subtractedHeight: 0,
|
||||
|
|
@ -14,6 +15,7 @@ const _sfc_main = {
|
|||
onLoad() {
|
||||
this.getStatusBarHeight();
|
||||
this.getSubtractedHeight();
|
||||
this.getMusicGenresList();
|
||||
},
|
||||
methods: {
|
||||
// 获取状态栏高度的方法
|
||||
|
|
@ -41,6 +43,19 @@ const _sfc_main = {
|
|||
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);
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
that.tabs.push(data[i].genreName);
|
||||
console.log("data[i].genreName", data[i].genreName);
|
||||
}
|
||||
console.log("that.tabs", that.tabs);
|
||||
});
|
||||
},
|
||||
toMusicPlay() {
|
||||
let loginValue = common_vendor.index.getStorageSync("isLoginKey");
|
||||
if (!loginValue) {
|
||||
|
|
@ -92,5 +107,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
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:/work/magicsound/magicsound/pages/index/index.vue"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/index/index.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<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:100%;margin-top:50rpx;padding-left:36rpx"><v-tabs wx:if="{{d}}" bindchange="{{b}}" u-i="14252989-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 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:100%;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>
|
||||
|
|
@ -40,5 +40,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
d: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/work/magicsound/magicsound/pages/login/Loginpage.vue"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/login/Loginpage.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
|
|
|||
|
|
@ -31,5 +31,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
c: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/work/magicsound/magicsound/pages/me/SettingPage.vue"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/me/SettingPage.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
|
|
|||
|
|
@ -54,5 +54,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
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:/work/magicsound/magicsound/pages/me/mepage.vue"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/me/mepage.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
|
|
|||
|
|
@ -140,5 +140,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
j: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/work/magicsound/magicsound/pages/music/MusicPlayPage.vue"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/music/MusicPlayPage.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
|
|
|||
|
|
@ -106,5 +106,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
l: common_vendor.s("paddingTop: " + $data.systemBarHeight + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/work/magicsound/magicsound/pages/recharge/RechargePage.vue"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/gitCode/uniapp/magicsound/pages/recharge/RechargePage.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.5.1",
|
||||
"libVersion": "3.5.8",
|
||||
"appid": "wx595ec949c6efd72b",
|
||||
"projectname": "magicsound",
|
||||
"condition": {},
|
||||
|
|
|
|||
|
|
@ -166,5 +166,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
p: common_vendor.o((...args) => $options.onOk && $options.onOk(...args))
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/work/magicsound/magicsound/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue"]]);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -389,5 +389,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
l: common_vendor.n($options.isDesktop ? "fixforpc-z-index" : "")
|
||||
}) : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/work/magicsound/magicsound/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<view wx:if="{{a}}" class="{{['uni-popup', k, l]}}"><view bindtouchstart="{{j}}"><uni-transition wx:if="{{b}}" key="1" bindclick="{{c}}" u-i="43effc5e-0" bind:__l="__l" u-p="{{d}}"/><uni-transition wx:if="{{i}}" u-s="{{['d']}}" key="2" bindclick="{{h}}" u-i="43effc5e-1" bind:__l="__l" u-p="{{i}}"><view style="{{e}}" class="{{['uni-popup__wrapper', f]}}" bindtap="{{g}}"><slot/></view></uni-transition></view></view>
|
||||
<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>
|
||||
|
|
@ -261,5 +261,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
e: common_vendor.o((...args) => $options.onClick && $options.onClick(...args))
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/work/magicsound/magicsound/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -185,5 +185,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
F: _ctx.padding
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4a111109"], ["__file", "F:/work/magicsound/magicsound/uni_modules/v-tabs/components/v-tabs/v-tabs.vue"]]);
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user