|
@@ -188,456 +188,547 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
-import PageHeader from '@/components/PageHeader/PageHeader.vue';
|
|
|
-import CircleAvatar from '@/components/CircleAvatar/CircleAvatar.vue';
|
|
|
-import NicknamePopup from '@/components/NicknamePopup/NicknamePopup.vue';
|
|
|
-import permission from '@/common/permission.js';
|
|
|
-import uvSwiper from '@/uni_modules/uv-swiper/components/uv-swiper/uv-swiper.vue';
|
|
|
-export default {
|
|
|
- components: {
|
|
|
- PageHeader,
|
|
|
- CircleAvatar,
|
|
|
- NicknamePopup,
|
|
|
- uvSwiper
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- showRights: false,
|
|
|
- title: '',
|
|
|
- sel: 1,
|
|
|
- info: {},
|
|
|
- showPop: false,
|
|
|
- nickname: '',
|
|
|
- content: '',
|
|
|
- sex: 1,
|
|
|
- age: 18,
|
|
|
- height: 160,
|
|
|
- weight: 50,
|
|
|
- avator: '../../static/me/avator.png',
|
|
|
- ziye: '',
|
|
|
- qianmin: '',
|
|
|
- bgImage: '',
|
|
|
- xinzuo_sel: '',
|
|
|
- xinzuo: ['水瓶座', '双鱼座', '白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座'],
|
|
|
-
|
|
|
- list_tag: [],
|
|
|
- sel_tags: [],
|
|
|
- sexText: '',
|
|
|
- birthday: '',
|
|
|
- sexOptions: ['男', '女', '其他'],
|
|
|
- endDate: new Date().toISOString().split('T')[0],
|
|
|
- showAddTag: false,
|
|
|
- newTag: '',
|
|
|
- bgList: [
|
|
|
- { url: require('../../static/me/theme1.jpg') },
|
|
|
- { url: require('../../static/me/theme2.jpg') },
|
|
|
- { url: require('../../static/me/theme3.jpg') },
|
|
|
- { url: require('../../static/me/theme4.jpg') },
|
|
|
- { url: require('../../static/me/theme5.jpg') },
|
|
|
- ],
|
|
|
- currentBgIndex: 0,
|
|
|
- uploading: false,
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad() {
|
|
|
- let tagStr =
|
|
|
- "老二次元了、coser、沉迷音乐、网游小达人、AJ控、白日梦想家、撸铁狂魔、古风汉服、爱画画、数码极客、盲盒玩家、三坑玩家、动漫达人、设计师、爱卡通、兜风去、爱夜跑、街头滑板、球类运动、lo娘、rapper、时尚达人、机甲狂潮、养宠物、风轻云淡、养多肉、热爱自然、赛博朋克、骨子里高冷、爱唠嗑、资深中二、天然呆、思想家、极度抽象、学院派、平平无奇、热情奔放、博古通今、labubu粉、玛特收藏家";
|
|
|
- this.list_tag = tagStr.split("、");
|
|
|
- this.getInfoData();
|
|
|
- },
|
|
|
- onShow() { },
|
|
|
- methods: {
|
|
|
- open() {
|
|
|
- this.$refs.calendar.open();
|
|
|
- },
|
|
|
- confirm(e) {
|
|
|
- console.log(e);
|
|
|
- this.birthday = e.fulldate
|
|
|
- this.xinzuo_sel = this.getConstellation(this.birthday);
|
|
|
- },
|
|
|
- openNicknamePopUpWindow() {
|
|
|
- this.$refs.openNicknamePopUpWindow.open();
|
|
|
- },
|
|
|
- openContentPopUpWindow() {
|
|
|
- this.$refs.openContentPopUpWindow.open();
|
|
|
+ import PageHeader from '@/components/PageHeader/PageHeader.vue';
|
|
|
+ import CircleAvatar from '@/components/CircleAvatar/CircleAvatar.vue';
|
|
|
+ import NicknamePopup from '@/components/NicknamePopup/NicknamePopup.vue';
|
|
|
+ import permission from '@/common/permission.js';
|
|
|
+ import uvSwiper from '@/uni_modules/uv-swiper/components/uv-swiper/uv-swiper.vue';
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ PageHeader,
|
|
|
+ CircleAvatar,
|
|
|
+ NicknamePopup,
|
|
|
+ uvSwiper
|
|
|
},
|
|
|
- openBackgroundImage() {
|
|
|
- this.$refs.backgroundImage.open();
|
|
|
- },
|
|
|
- closePropUp() {
|
|
|
- this.$refs.openNicknamePopUpWindow.close();
|
|
|
- this.$refs.openContentPopUpWindow.close();
|
|
|
- this.$refs.backgroundImage.close();
|
|
|
- },
|
|
|
- onBack() { },
|
|
|
- onPreview() { },
|
|
|
- chkSel() {
|
|
|
- if (this.sel == 1) {
|
|
|
- this.sel = 0;
|
|
|
- } else {
|
|
|
- this.sel = 1;
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ showRights: false,
|
|
|
+ title: '',
|
|
|
+ sel: 1,
|
|
|
+ info: {},
|
|
|
+ showPop: false,
|
|
|
+ nickname: '',
|
|
|
+ content: '',
|
|
|
+ sex: 1,
|
|
|
+ age: 18,
|
|
|
+ height: 160,
|
|
|
+ weight: 50,
|
|
|
+ avator: '../../static/me/avator.png',
|
|
|
+ ziye: '',
|
|
|
+ qianmin: '',
|
|
|
+ bgImage: '',
|
|
|
+ xinzuo_sel: '',
|
|
|
+ xinzuo: ['水瓶座', '双鱼座', '白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座'],
|
|
|
+
|
|
|
+ list_tag: [],
|
|
|
+ sel_tags: [],
|
|
|
+ sexText: '',
|
|
|
+ birthday: '',
|
|
|
+ sexOptions: ['男', '女', '其他'],
|
|
|
+ endDate: new Date().toISOString().split('T')[0],
|
|
|
+ showAddTag: false,
|
|
|
+ newTag: '',
|
|
|
+ bgList: [{
|
|
|
+ url: require('../../static/me/theme1.jpg')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: require('../../static/me/theme2.jpg')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: require('../../static/me/theme3.jpg')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: require('../../static/me/theme4.jpg')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url: require('../../static/me/theme5.jpg')
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ currentBgIndex: 0,
|
|
|
+ uploading: false,
|
|
|
}
|
|
|
},
|
|
|
- chkSex(sex) {
|
|
|
- this.sex = sex;
|
|
|
+ onLoad() {
|
|
|
+ let tagStr =
|
|
|
+ "老二次元了、coser、沉迷音乐、网游小达人、AJ控、白日梦想家、撸铁狂魔、古风汉服、爱画画、数码极客、盲盒玩家、三坑玩家、动漫达人、设计师、爱卡通、兜风去、爱夜跑、街头滑板、球类运动、lo娘、rapper、时尚达人、机甲狂潮、养宠物、风轻云淡、养多肉、热爱自然、赛博朋克、骨子里高冷、爱唠嗑、资深中二、天然呆、思想家、极度抽象、学院派、平平无奇、热情奔放、博古通今、labubu粉、玛特收藏家";
|
|
|
+ this.list_tag = tagStr.split("、");
|
|
|
+ this.getInfoData();
|
|
|
},
|
|
|
- delTag(tg) {
|
|
|
- let list_tag2 = [];
|
|
|
- for (let i = 0; i < this.sel_tags.length; i++) {
|
|
|
- if (this.sel_tags[i] != tg) {
|
|
|
- list_tag2.push(this.sel_tags[i]);
|
|
|
+ onShow() {},
|
|
|
+ methods: {
|
|
|
+ open() {
|
|
|
+ this.$refs.calendar.open();
|
|
|
+ },
|
|
|
+ confirm(e) {
|
|
|
+ console.log(e);
|
|
|
+ this.birthday = e.fulldate
|
|
|
+ this.xinzuo_sel = this.getConstellation(this.birthday);
|
|
|
+ },
|
|
|
+ openNicknamePopUpWindow() {
|
|
|
+ this.$refs.openNicknamePopUpWindow.open();
|
|
|
+ },
|
|
|
+ openContentPopUpWindow() {
|
|
|
+ this.$refs.openContentPopUpWindow.open();
|
|
|
+ },
|
|
|
+ openBackgroundImage() {
|
|
|
+ this.$refs.backgroundImage.open();
|
|
|
+ },
|
|
|
+ closePropUp() {
|
|
|
+ this.$refs.openNicknamePopUpWindow.close();
|
|
|
+ this.$refs.openContentPopUpWindow.close();
|
|
|
+ this.$refs.backgroundImage.close();
|
|
|
+ },
|
|
|
+ onBack() {},
|
|
|
+ onPreview() {},
|
|
|
+ chkSel() {
|
|
|
+ if (this.sel == 1) {
|
|
|
+ this.sel = 0;
|
|
|
+ } else {
|
|
|
+ this.sel = 1;
|
|
|
}
|
|
|
- }
|
|
|
- this.sel_tags = list_tag2;
|
|
|
- },
|
|
|
- selTags(itm) {
|
|
|
- let isIn = false;
|
|
|
- for (let entry of this.sel_tags) {
|
|
|
- if (entry == itm) {
|
|
|
- isIn = true;
|
|
|
- break;
|
|
|
+ },
|
|
|
+ chkSex(sex) {
|
|
|
+ this.sex = sex;
|
|
|
+ },
|
|
|
+ delTag(tg) {
|
|
|
+ let list_tag2 = [];
|
|
|
+ for (let i = 0; i < this.sel_tags.length; i++) {
|
|
|
+ if (this.sel_tags[i] != tg) {
|
|
|
+ list_tag2.push(this.sel_tags[i]);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- return isIn;
|
|
|
- },
|
|
|
- chkTag(itm) {
|
|
|
- if (this.selTags(itm)) {
|
|
|
- let tmpTags = [];
|
|
|
+ this.sel_tags = list_tag2;
|
|
|
+ },
|
|
|
+ selTags(itm) {
|
|
|
+ let isIn = false;
|
|
|
for (let entry of this.sel_tags) {
|
|
|
- if (entry != itm) {
|
|
|
- tmpTags.push(entry);
|
|
|
+ if (entry == itm) {
|
|
|
+ isIn = true;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- this.sel_tags = tmpTags;
|
|
|
- } else {
|
|
|
- if (this.sel_tags.length <= 4) {
|
|
|
- this.sel_tags.push(itm);
|
|
|
+ return isIn;
|
|
|
+ },
|
|
|
+ chkTag(itm) {
|
|
|
+ if (this.selTags(itm)) {
|
|
|
+ let tmpTags = [];
|
|
|
+ for (let entry of this.sel_tags) {
|
|
|
+ if (entry != itm) {
|
|
|
+ tmpTags.push(entry);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.sel_tags = tmpTags;
|
|
|
} else {
|
|
|
- uni.showToast({
|
|
|
- title: "最多选择5个标签",
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- sliderChange1(e) {
|
|
|
- this.age = e.detail.value;
|
|
|
- },
|
|
|
- sliderChange2(e) {
|
|
|
- this.height = e.detail.value;
|
|
|
- },
|
|
|
- sliderChange3(e) {
|
|
|
- this.weight = e.detail.value;
|
|
|
- },
|
|
|
- SetSex() {
|
|
|
- let that = this;
|
|
|
- uni.showActionSheet({
|
|
|
- itemColor: '#000000',
|
|
|
- itemList: this.sexOptions,
|
|
|
- success: function (res) {
|
|
|
- that.sexText = that.sexOptions[res.tapIndex];
|
|
|
- that.sex = res.tapIndex + 1;
|
|
|
- },
|
|
|
- fail: function (res) {
|
|
|
- console.log(res.errMsg);
|
|
|
+ if (this.sel_tags.length <= 4) {
|
|
|
+ this.sel_tags.push(itm);
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "最多选择5个标签",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- getInfoData() {
|
|
|
- uni.request({
|
|
|
- url: this.$apiHost + '/Member/getinfoData',
|
|
|
- data: {
|
|
|
- uuid: getApp().globalData.uuid
|
|
|
- },
|
|
|
- header: {
|
|
|
- 'content-type': 'application/json'
|
|
|
- },
|
|
|
- success: (res) => {
|
|
|
- console.log(res.data);
|
|
|
- this.nickname = res.data.nickname;
|
|
|
- this.wechat = res.data.wechat;
|
|
|
- this.sex = res.data.sex;
|
|
|
- this.sexText = this.sexOptions[res.data.sex - 1] || '';
|
|
|
- this.birthday = res.data.birthday;
|
|
|
- this.content = res.data.content;
|
|
|
- this.xinzuo_sel = this.getConstellation(this.birthday);
|
|
|
- this.bgImage = res.data.bgimg;
|
|
|
- if (res.data.avator != "") {
|
|
|
- this.avator = res.data.avator;
|
|
|
+ },
|
|
|
+ sliderChange1(e) {
|
|
|
+ this.age = e.detail.value;
|
|
|
+ },
|
|
|
+ sliderChange2(e) {
|
|
|
+ this.height = e.detail.value;
|
|
|
+ },
|
|
|
+ sliderChange3(e) {
|
|
|
+ this.weight = e.detail.value;
|
|
|
+ },
|
|
|
+ SetSex() {
|
|
|
+ let that = this;
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemColor: '#000000',
|
|
|
+ itemList: this.sexOptions,
|
|
|
+ success: function(res) {
|
|
|
+ that.sexText = that.sexOptions[res.tapIndex];
|
|
|
+ that.sex = res.tapIndex + 1;
|
|
|
+ },
|
|
|
+ fail: function(res) {
|
|
|
+ console.log(res.errMsg);
|
|
|
}
|
|
|
- if (res.data.aihao) {
|
|
|
- this.sel_tags = res.data.aihao.split(",");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getInfoData() {
|
|
|
+ uni.request({
|
|
|
+ url: this.$apiHost + '/Member/getinfoData',
|
|
|
+ data: {
|
|
|
+ uuid: getApp().globalData.uuid
|
|
|
+ },
|
|
|
+ header: {
|
|
|
+ 'content-type': 'application/json'
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ console.log(res.data);
|
|
|
+ this.nickname = res.data.nickname;
|
|
|
+ this.wechat = res.data.wechat;
|
|
|
+ this.sex = res.data.sex;
|
|
|
+ this.sexText = this.sexOptions[res.data.sex - 1] || '';
|
|
|
+ this.birthday = res.data.birthday;
|
|
|
+ this.content = res.data.content;
|
|
|
+ this.xinzuo_sel = this.getConstellation(this.birthday);
|
|
|
+ this.bgImage = res.data.bgimg;
|
|
|
+ if (res.data.avator != "") {
|
|
|
+ this.avator = res.data.avator;
|
|
|
+ }
|
|
|
+ if (res.data.aihao) {
|
|
|
+ this.sel_tags = res.data.aihao.split(",");
|
|
|
+ }
|
|
|
}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ submitData(isBack) {
|
|
|
+ let aihao = this.sel_tags.join(',')
|
|
|
+ let obj2 = {
|
|
|
+ uuid: getApp().globalData.uuid,
|
|
|
+ avator: this.avator,
|
|
|
+ nickname: this.nickname,
|
|
|
+ content: this.content,
|
|
|
+ sex: this.sex,
|
|
|
+ birthday: this.birthday,
|
|
|
+ xinzuo: this.xinzuo_sel,
|
|
|
+ ziye: this.ziye,
|
|
|
+ qianmin: this.qianmin,
|
|
|
+ aihao: aihao,
|
|
|
+ bgimg: this.bgImage
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- submitData(isBack) {
|
|
|
- let aihao = this.sel_tags.join(',')
|
|
|
- let obj2 = {
|
|
|
- uuid: getApp().globalData.uuid,
|
|
|
- avator: this.avator,
|
|
|
- nickname: this.nickname,
|
|
|
- content: this.content,
|
|
|
- sex: this.sex,
|
|
|
- birthday: this.birthday,
|
|
|
- xinzuo: this.xinzuo_sel,
|
|
|
- ziye: this.ziye,
|
|
|
- qianmin: this.qianmin,
|
|
|
- aihao: aihao,
|
|
|
- bgimg: this.bgImage
|
|
|
- }
|
|
|
- uni.request({
|
|
|
- url: this.$apiHost + '/Member/setinfoData',
|
|
|
- data: obj2,
|
|
|
- method: 'POST',
|
|
|
- header: {
|
|
|
- 'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
- 'sign': getApp().globalData.headerSign
|
|
|
- },
|
|
|
- dataType: 'json',
|
|
|
- success: (res) => {
|
|
|
- console.log("res", res.data)
|
|
|
- uni.showToast({
|
|
|
- title: res.data.str,
|
|
|
- animation: 0,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- if (res.data.success == 'yes' && isBack == true) {
|
|
|
- if (this.nickname) {
|
|
|
- getApp().globalData.nickname = this.nickname
|
|
|
- uni.removeStorageSync("nickname");
|
|
|
- uni.setStorageSync("nickname", this.nickname);
|
|
|
- }
|
|
|
+ uni.request({
|
|
|
+ url: this.$apiHost + '/Member/setinfoData',
|
|
|
+ data: obj2,
|
|
|
+ method: 'POST',
|
|
|
+ header: {
|
|
|
+ 'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
+ 'sign': getApp().globalData.headerSign
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ success: (res) => {
|
|
|
+ console.log("res", res.data)
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.str,
|
|
|
+ animation: 0,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ if (res.data.success == 'yes' && isBack == true) {
|
|
|
+ if (this.nickname) {
|
|
|
+ getApp().globalData.nickname = this.nickname
|
|
|
+ uni.removeStorageSync("nickname");
|
|
|
+ uni.setStorageSync("nickname", this.nickname);
|
|
|
+ }
|
|
|
|
|
|
- if (this.avator) {
|
|
|
- getApp().globalData.avator = this.avator
|
|
|
- uni.removeStorageSync("avator");
|
|
|
- uni.setStorageSync("avator", this.avator);
|
|
|
- }
|
|
|
- setTimeout(function () {
|
|
|
+ if (this.avator) {
|
|
|
+ getApp().globalData.avator = this.avator
|
|
|
+ uni.removeStorageSync("avator");
|
|
|
+ uni.setStorageSync("avator", this.avator);
|
|
|
+ }
|
|
|
+ setTimeout(function() {
|
|
|
|
|
|
|
|
|
- uni.navigateBack()
|
|
|
- }, 800)
|
|
|
- } else {
|
|
|
- this.closePropUp()
|
|
|
+ uni.navigateBack()
|
|
|
+ }, 800)
|
|
|
+ } else {
|
|
|
+ this.closePropUp()
|
|
|
+ }
|
|
|
+ this.getInfoData()
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ chooseAvatar() {
|
|
|
+ console.log("plus.os.name:", plus.os.name);
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: ['拍照', '从相册选择'],
|
|
|
+ success: (res) => {
|
|
|
+ const sourceType = res.tapIndex === 0 ? 'camera' : 'album';
|
|
|
+ this.chooseImage(sourceType);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async chooseImage(sourceType) {
|
|
|
+ try {
|
|
|
+ let hasPermission = false;
|
|
|
+
|
|
|
+ if (sourceType === 'camera') {
|
|
|
+ hasPermission = await this.checkCameraPermission();
|
|
|
+ } else if (sourceType === 'album') {
|
|
|
+ hasPermission = await this.checkPhotoLibraryPermission();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!hasPermission) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '未获得权限',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
}
|
|
|
- this.getInfoData()
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- chooseAvatar() {
|
|
|
- uni.showActionSheet({
|
|
|
- itemList: ['拍照', '从相册选择'],
|
|
|
- success: (res) => {
|
|
|
- const sourceType = res.tapIndex === 0 ? 'camera' : 'album';
|
|
|
- this.chooseImage(sourceType);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- async chooseImage(sourceType) {
|
|
|
- try {
|
|
|
- let hasPermission = false;
|
|
|
-
|
|
|
- if (sourceType === 'camera') {
|
|
|
- hasPermission = await this.checkCameraPermission();
|
|
|
- } else if (sourceType === 'album') {
|
|
|
- hasPermission = await this.checkPhotoLibraryPermission();
|
|
|
- }
|
|
|
|
|
|
- if (!hasPermission) {
|
|
|
+ uni.chooseImage({
|
|
|
+ count: 1,
|
|
|
+ sizeType: ['compressed'],
|
|
|
+ sourceType: [sourceType],
|
|
|
+ success: async (res) => {
|
|
|
+ console.log('res:', res)
|
|
|
+ if (res.tempFilePaths.length > 0) {
|
|
|
+ const tempFilePath = res.tempFilePaths[0];
|
|
|
+ console.log('tempFilePaths:', tempFilePath);
|
|
|
+ await this.uploadImage(tempFilePath);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: (err) => {
|
|
|
+ console.error('选择图片失败:', err);
|
|
|
+ uni.showToast({
|
|
|
+ title: '选择图片失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch (error) {
|
|
|
+ console.error('权限检查失败:', error);
|
|
|
uni.showToast({
|
|
|
- title: '未获得权限',
|
|
|
+ title: '权限检查失败',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
- return;
|
|
|
}
|
|
|
-
|
|
|
- uni.chooseImage({
|
|
|
- count: 1,
|
|
|
- sizeType: ['compressed'],
|
|
|
- sourceType: [sourceType],
|
|
|
- success: async (res) => {
|
|
|
- console.log('res:', res)
|
|
|
- if (res.tempFilePaths.length > 0) {
|
|
|
- const tempFilePath = res.tempFilePaths[0];
|
|
|
- console.log('tempFilePaths:', tempFilePath);
|
|
|
- await this.uploadImage(tempFilePath);
|
|
|
+ },
|
|
|
+ async checkCameraPermission() {
|
|
|
+ const hasPermission = await permission.request(permission.PermissionType.CAMERA, {
|
|
|
+ title: "“萌创星球”想访问你的相机",
|
|
|
+ describe: "萌创星球想访问您的摄像头,便于拍摄获取图片来替换头像图片"
|
|
|
+ });
|
|
|
+ return hasPermission;
|
|
|
+ },
|
|
|
+ async checkPhotoLibraryPermission() {
|
|
|
+ const hasPermission = await permission.request(permission.PermissionType.PHOTO_LIBRARY, {
|
|
|
+ title: "“萌创星球”想访问你的照片图库",
|
|
|
+ describe: "萌创星球想访问您本地照片图库,便于获取图片来替换头像图片"
|
|
|
+ });
|
|
|
+ return hasPermission;
|
|
|
+ },
|
|
|
+ uploadImage(tempFilePath) {
|
|
|
+ var _self = this;
|
|
|
+ const uploadTask = uni.uploadFile({
|
|
|
+ url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey,
|
|
|
+ filePath: tempFilePath,
|
|
|
+ name: 'file',
|
|
|
+ success: function(uploadFileRes) {
|
|
|
+ let resdata = JSON.parse(uploadFileRes.data)
|
|
|
+ console.log('Success11:', uploadFileRes);
|
|
|
+ console.log('Success21:', resdata);
|
|
|
+ if (resdata.success == 'yes') {
|
|
|
+ _self.showRights = false;
|
|
|
+ _self.avator = resdata.url;
|
|
|
}
|
|
|
},
|
|
|
- fail: (err) => {
|
|
|
- console.error('选择图片失败:', err);
|
|
|
- uni.showToast({
|
|
|
- title: '选择图片失败',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
+ fail: function(uploadFileFail) {
|
|
|
+ console.log('Error:', uploadFileFail.data);
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ console.log('Complete:');
|
|
|
}
|
|
|
});
|
|
|
- } catch (error) {
|
|
|
- console.error('权限检查失败:', error);
|
|
|
- uni.showToast({
|
|
|
- title: '权限检查失败',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- async checkCameraPermission() {
|
|
|
- const hasPermission = await permission.request(permission.PermissionType.CAMERA, {
|
|
|
- title: "“萌创星球”想访问你的相机",
|
|
|
- describe: "萌创星球想访问您的摄像头,便于拍摄获取图片来替换头像图片"
|
|
|
- });
|
|
|
- return hasPermission;
|
|
|
- },
|
|
|
- async checkPhotoLibraryPermission() {
|
|
|
- const hasPermission = await permission.request(permission.PermissionType.PHOTO_LIBRARY, {
|
|
|
- title: "“萌创星球”想访问你的照片图库",
|
|
|
- describe: "萌创星球想访问您本地照片图库,便于获取图片来替换头像图片"
|
|
|
- });
|
|
|
- return hasPermission;
|
|
|
- },
|
|
|
- uploadImage(tempFilePath) {
|
|
|
- var _self = this;
|
|
|
- const uploadTask = uni.uploadFile({
|
|
|
- url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey,
|
|
|
- filePath: tempFilePath,
|
|
|
- name: 'file',
|
|
|
- success: function (uploadFileRes) {
|
|
|
- let resdata = JSON.parse(uploadFileRes.data)
|
|
|
- console.log('Success11:', uploadFileRes);
|
|
|
- console.log('Success21:', resdata);
|
|
|
- if (resdata.success == 'yes') {
|
|
|
- _self.showRights = false;
|
|
|
- _self.avator = resdata.url;
|
|
|
+ },
|
|
|
+ onBirthdayChange(e) {
|
|
|
+ this.birthday = e.detail.value;
|
|
|
+ this.xinzuo_sel = this.getConstellation(this.birthday);
|
|
|
+ },
|
|
|
+ getConstellation(birthday) {
|
|
|
+ if (!birthday) return '';
|
|
|
+
|
|
|
+ const month = parseInt(birthday.split('-')[1]);
|
|
|
+ const day = parseInt(birthday.split('-')[2]);
|
|
|
+
|
|
|
+ // 星座日期范围数组,每个元素包含 [月份, 起始日期, 结束日期, 星座名称]
|
|
|
+ const constellationRanges = [
|
|
|
+ [1, 1, 19, "摩羯座"], // 1月1日-1月19日
|
|
|
+ [1, 20, 31, "水瓶座"], // 1月20日-1月31日
|
|
|
+ [2, 1, 18, "水瓶座"], // 2月1日-2月18日
|
|
|
+ [2, 19, 29, "双鱼座"], // 2月19日-2月29日
|
|
|
+ [3, 1, 20, "双鱼座"], // 3月1日-3月20日
|
|
|
+ [3, 21, 31, "白羊座"], // 3月21日-3月31日
|
|
|
+ [4, 1, 19, "白羊座"], // 4月1日-4月19日
|
|
|
+ [4, 20, 30, "金牛座"], // 4月20日-4月30日
|
|
|
+ [5, 1, 20, "金牛座"], // 5月1日-5月20日
|
|
|
+ [5, 21, 31, "双子座"], // 5月21日-5月31日
|
|
|
+ [6, 1, 21, "双子座"], // 6月1日-6月21日
|
|
|
+ [6, 22, 30, "巨蟹座"], // 6月22日-6月30日
|
|
|
+ [7, 1, 22, "巨蟹座"], // 7月1日-7月22日
|
|
|
+ [7, 23, 31, "狮子座"], // 7月23日-7月31日
|
|
|
+ [8, 1, 22, "狮子座"], // 8月1日-8月22日
|
|
|
+ [8, 23, 31, "处女座"], // 8月23日-8月31日
|
|
|
+ [9, 1, 22, "处女座"], // 9月1日-9月22日
|
|
|
+ [9, 23, 30, "天秤座"], // 9月23日-9月30日
|
|
|
+ [10, 1, 23, "天秤座"], // 10月1日-10月23日
|
|
|
+ [10, 24, 31, "天蝎座"], // 10月24日-10月31日
|
|
|
+ [11, 1, 22, "天蝎座"], // 11月1日-11月22日
|
|
|
+ [11, 23, 30, "射手座"], // 11月23日-11月30日
|
|
|
+ [12, 1, 21, "射手座"], // 12月1日-12月21日
|
|
|
+ [12, 22, 31, "摩羯座"] // 12月22日-12月31日
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 查找对应的星座
|
|
|
+ for (const [m, startDay, endDay, constellation] of constellationRanges) {
|
|
|
+ if (month === m && day >= startDay && day <= endDay) {
|
|
|
+ return constellation;
|
|
|
}
|
|
|
- },
|
|
|
- fail: function (uploadFileFail) {
|
|
|
- console.log('Error:', uploadFileFail.data);
|
|
|
- },
|
|
|
- complete: () => {
|
|
|
- console.log('Complete:');
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- onBirthdayChange(e) {
|
|
|
- this.birthday = e.detail.value;
|
|
|
- this.xinzuo_sel = this.getConstellation(this.birthday);
|
|
|
- },
|
|
|
- getConstellation(birthday) {
|
|
|
- if (!birthday) return '';
|
|
|
-
|
|
|
- const month = parseInt(birthday.split('-')[1]);
|
|
|
- const day = parseInt(birthday.split('-')[2]);
|
|
|
-
|
|
|
- // 星座日期范围数组,每个元素包含 [月份, 起始日期, 结束日期, 星座名称]
|
|
|
- const constellationRanges = [
|
|
|
- [1, 1, 19, "摩羯座"], // 1月1日-1月19日
|
|
|
- [1, 20, 31, "水瓶座"], // 1月20日-1月31日
|
|
|
- [2, 1, 18, "水瓶座"], // 2月1日-2月18日
|
|
|
- [2, 19, 29, "双鱼座"], // 2月19日-2月29日
|
|
|
- [3, 1, 20, "双鱼座"], // 3月1日-3月20日
|
|
|
- [3, 21, 31, "白羊座"], // 3月21日-3月31日
|
|
|
- [4, 1, 19, "白羊座"], // 4月1日-4月19日
|
|
|
- [4, 20, 30, "金牛座"], // 4月20日-4月30日
|
|
|
- [5, 1, 20, "金牛座"], // 5月1日-5月20日
|
|
|
- [5, 21, 31, "双子座"], // 5月21日-5月31日
|
|
|
- [6, 1, 21, "双子座"], // 6月1日-6月21日
|
|
|
- [6, 22, 30, "巨蟹座"], // 6月22日-6月30日
|
|
|
- [7, 1, 22, "巨蟹座"], // 7月1日-7月22日
|
|
|
- [7, 23, 31, "狮子座"], // 7月23日-7月31日
|
|
|
- [8, 1, 22, "狮子座"], // 8月1日-8月22日
|
|
|
- [8, 23, 31, "处女座"], // 8月23日-8月31日
|
|
|
- [9, 1, 22, "处女座"], // 9月1日-9月22日
|
|
|
- [9, 23, 30, "天秤座"], // 9月23日-9月30日
|
|
|
- [10, 1, 23, "天秤座"], // 10月1日-10月23日
|
|
|
- [10, 24, 31, "天蝎座"], // 10月24日-10月31日
|
|
|
- [11, 1, 22, "天蝎座"], // 11月1日-11月22日
|
|
|
- [11, 23, 30, "射手座"], // 11月23日-11月30日
|
|
|
- [12, 1, 21, "射手座"], // 12月1日-12月21日
|
|
|
- [12, 22, 31, "摩羯座"] // 12月22日-12月31日
|
|
|
- ];
|
|
|
-
|
|
|
- // 查找对应的星座
|
|
|
- for (const [m, startDay, endDay, constellation] of constellationRanges) {
|
|
|
- if (month === m && day >= startDay && day <= endDay) {
|
|
|
- return constellation;
|
|
|
+
|
|
|
+ // 如果没找到匹配的星座(这种情况理论上不会发生,因为日期范围是连续的)
|
|
|
+ return "未知星座";
|
|
|
+ },
|
|
|
+ showAddTagInput() {
|
|
|
+ this.showAddTag = true;
|
|
|
+ this.newTag = '';
|
|
|
+ },
|
|
|
+ cancelAddTag() {
|
|
|
+ this.showAddTag = false;
|
|
|
+ this.newTag = '';
|
|
|
+ },
|
|
|
+ addCustomTag() {
|
|
|
+ if (!this.newTag.trim()) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入标签名称',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- // 如果没找到匹配的星座(这种情况理论上不会发生,因为日期范围是连续的)
|
|
|
- return "未知星座";
|
|
|
- },
|
|
|
- showAddTagInput() {
|
|
|
- this.showAddTag = true;
|
|
|
- this.newTag = '';
|
|
|
- },
|
|
|
- cancelAddTag() {
|
|
|
- this.showAddTag = false;
|
|
|
- this.newTag = '';
|
|
|
- },
|
|
|
- addCustomTag() {
|
|
|
- if (!this.newTag.trim()) {
|
|
|
- uni.showToast({
|
|
|
- title: '请输入标签名称',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (this.list_tag.includes(this.newTag)) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '该标签已存在',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- if (this.list_tag.includes(this.newTag)) {
|
|
|
- uni.showToast({
|
|
|
- title: '该标签已存在',
|
|
|
- icon: 'none'
|
|
|
+ this.list_tag.unshift(this.newTag);
|
|
|
+ this.showAddTag = false;
|
|
|
+ this.newTag = '';
|
|
|
+ },
|
|
|
+ chooseBgImage() {
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: ['拍照', '从相册选择'],
|
|
|
+ success: (res) => {
|
|
|
+ const sourceType = res.tapIndex === 0 ? 'camera' : 'album';
|
|
|
+ this.checkRights(sourceType);
|
|
|
+ }
|
|
|
});
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.list_tag.unshift(this.newTag);
|
|
|
- this.showAddTag = false;
|
|
|
- this.newTag = '';
|
|
|
- },
|
|
|
- chooseBgImage() {
|
|
|
- uni.showActionSheet({
|
|
|
- itemList: ['拍照', '从相册选择'],
|
|
|
- success: (res) => {
|
|
|
- const sourceType = res.tapIndex === 0 ? 'camera' : 'album';
|
|
|
- this.checkRights(sourceType);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- async checkRights(sourceType) {
|
|
|
- try {
|
|
|
- let hasPermission = false;
|
|
|
-
|
|
|
- if (sourceType === 'camera') {
|
|
|
- hasPermission = await permission.request(permission.PermissionType.CAMERA, {
|
|
|
- title: '"萌创星球"想访问你的相机',
|
|
|
- describe: '萌创星球想访问您的摄像头,便于拍摄获取图片来替换背景图片'
|
|
|
- });
|
|
|
+ },
|
|
|
+ async checkRights(sourceType) {
|
|
|
+ try {
|
|
|
+ let hasPermission = false;
|
|
|
+
|
|
|
+ if (sourceType === 'camera') {
|
|
|
+ hasPermission = await permission.request(permission.PermissionType.CAMERA, {
|
|
|
+ title: '"萌创星球"想访问你的相机',
|
|
|
+ describe: '萌创星球想访问您的摄像头,便于拍摄获取图片来替换背景图片'
|
|
|
+ });
|
|
|
|
|
|
- if (!hasPermission) {
|
|
|
- uni.showToast({
|
|
|
- title: '未获得相机权限',
|
|
|
- icon: 'none'
|
|
|
+ if (!hasPermission) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '未获得相机权限',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ hasPermission = await permission.request(permission.PermissionType.PHOTO_LIBRARY, {
|
|
|
+ title: '"萌创星球"想访问你的照片图库',
|
|
|
+ describe: '萌创星球想访问您本地照片图库,便于获取图片来替换背景图片'
|
|
|
});
|
|
|
+
|
|
|
+ if (!hasPermission) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '未获得相册权限',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 权限获取成功后,继续执行上传
|
|
|
+ if (this.uploading) {
|
|
|
return;
|
|
|
}
|
|
|
- } else {
|
|
|
- hasPermission = await permission.request(permission.PermissionType.PHOTO_LIBRARY, {
|
|
|
- title: '"萌创星球"想访问你的照片图库',
|
|
|
- describe: '萌创星球想访问您本地照片图库,便于获取图片来替换背景图片'
|
|
|
+ this.uploading = true;
|
|
|
+ uni.showLoading({
|
|
|
+ title: '上传中...',
|
|
|
+ mask: true
|
|
|
});
|
|
|
-
|
|
|
- if (!hasPermission) {
|
|
|
+ this.uploadBgImage(sourceType);
|
|
|
+ } catch (error) {
|
|
|
+ console.error('权限检查失败:', error);
|
|
|
+ uni.showToast({
|
|
|
+ title: '权限检查失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ uploadBgImage(sourceType) {
|
|
|
+ var _self = this;
|
|
|
+ uni.chooseImage({
|
|
|
+ count: 1,
|
|
|
+ sizeType: ['compressed'],
|
|
|
+ sourceType: [sourceType],
|
|
|
+ success: function(res) {
|
|
|
+ console.log('res:', res)
|
|
|
+ if (res.tempFilePaths.length > 0) {
|
|
|
+ let filepath = "";
|
|
|
+ // #ifdef H5
|
|
|
+ filepath = res.tempFiles[0].path;
|
|
|
+ // #endif
|
|
|
+
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ filepath = res.tempFilePaths[0];
|
|
|
+ // #endif
|
|
|
+ console.log('filepath:', filepath);
|
|
|
+
|
|
|
+ const uploadTask = uni.uploadFile({
|
|
|
+ url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey,
|
|
|
+ filePath: filepath,
|
|
|
+ name: 'file',
|
|
|
+ success: function(uploadFileRes) {
|
|
|
+ let resdata = JSON.parse(uploadFileRes.data)
|
|
|
+ console.log('Success:', resdata);
|
|
|
+ if (resdata.success == 'yes') {
|
|
|
+ _self.bgImage = resdata.url;
|
|
|
+ _self.closePropUp();
|
|
|
+ uni.showToast({
|
|
|
+ title: '上传成功',
|
|
|
+ icon: 'success'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: resdata.str || '上传失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: function(uploadFileFail) {
|
|
|
+ console.log('Error:', uploadFileFail.data);
|
|
|
+ uni.showToast({
|
|
|
+ title: '上传失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ console.log('Complete:');
|
|
|
+ uni.hideLoading();
|
|
|
+ this.uploading = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ console.log('选择图片失败:', err);
|
|
|
uni.showToast({
|
|
|
- title: '未获得相册权限',
|
|
|
+ title: '选择图片失败',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
- return;
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- // 权限获取成功后,继续执行上传
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeBgSwiper(index) {
|
|
|
if (this.uploading) {
|
|
|
return;
|
|
|
}
|
|
@@ -646,415 +737,333 @@ export default {
|
|
|
title: '上传中...',
|
|
|
mask: true
|
|
|
});
|
|
|
- this.uploadBgImage(sourceType);
|
|
|
- } catch (error) {
|
|
|
- console.error('权限检查失败:', error);
|
|
|
- uni.showToast({
|
|
|
- title: '权限检查失败',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- uploadBgImage(sourceType) {
|
|
|
- var _self = this;
|
|
|
- uni.chooseImage({
|
|
|
- count: 1,
|
|
|
- sizeType: ['compressed'],
|
|
|
- sourceType: [sourceType],
|
|
|
- success: function (res) {
|
|
|
- console.log('res:', res)
|
|
|
- if (res.tempFilePaths.length > 0) {
|
|
|
- let filepath = "";
|
|
|
- // #ifdef H5
|
|
|
- filepath = res.tempFiles[0].path;
|
|
|
- // #endif
|
|
|
-
|
|
|
- // #ifdef APP-PLUS
|
|
|
- filepath = res.tempFilePaths[0];
|
|
|
- // #endif
|
|
|
- console.log('filepath:', filepath);
|
|
|
-
|
|
|
- const uploadTask = uni.uploadFile({
|
|
|
- url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey,
|
|
|
- filePath: filepath,
|
|
|
- name: 'file',
|
|
|
- success: function (uploadFileRes) {
|
|
|
- let resdata = JSON.parse(uploadFileRes.data)
|
|
|
- console.log('Success:', resdata);
|
|
|
- if (resdata.success == 'yes') {
|
|
|
- _self.bgImage = resdata.url;
|
|
|
- _self.closePropUp();
|
|
|
- uni.showToast({
|
|
|
- title: '上传成功',
|
|
|
- icon: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: resdata.str || '上传失败',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- fail: function (uploadFileFail) {
|
|
|
- console.log('Error:', uploadFileFail.data);
|
|
|
- uni.showToast({
|
|
|
- title: '上传失败',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- },
|
|
|
- complete: () => {
|
|
|
- console.log('Complete:');
|
|
|
- uni.hideLoading();
|
|
|
- this.uploading = false;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- fail: function (err) {
|
|
|
- console.log('选择图片失败:', err);
|
|
|
- uni.showToast({
|
|
|
- title: '选择图片失败',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
+ if (typeof index === 'number') {
|
|
|
+ this.currentBgIndex = index;
|
|
|
+ this.bgImage = this.bgList[index].url;
|
|
|
+ // 上传选中的背景图片
|
|
|
+ this.uploadBgImage1(this.bgList[index].url);
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- changeBgSwiper(index) {
|
|
|
- if (this.uploading) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.uploading = true;
|
|
|
- uni.showLoading({
|
|
|
- title: '上传中...',
|
|
|
- mask: true
|
|
|
- });
|
|
|
- if (typeof index === 'number') {
|
|
|
- this.currentBgIndex = index;
|
|
|
- this.bgImage = this.bgList[index].url;
|
|
|
- // 上传选中的背景图片
|
|
|
- this.uploadBgImage1(this.bgList[index].url);
|
|
|
- }
|
|
|
- },
|
|
|
- uploadBgImage1(filepath) {
|
|
|
- var _self = this;
|
|
|
- const uploadTask = uni.uploadFile({
|
|
|
- url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey,
|
|
|
- filePath: filepath,
|
|
|
- name: 'file',
|
|
|
- success: function (uploadFileRes) {
|
|
|
- let resdata = JSON.parse(uploadFileRes.data)
|
|
|
- console.log('Success:', resdata);
|
|
|
- if (resdata.success == 'yes') {
|
|
|
- _self.bgImage = resdata.url;
|
|
|
- _self.closePropUp();
|
|
|
- uni.showToast({
|
|
|
- title: '上传成功',
|
|
|
- icon: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
+ },
|
|
|
+ uploadBgImage1(filepath) {
|
|
|
+ var _self = this;
|
|
|
+ const uploadTask = uni.uploadFile({
|
|
|
+ url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey,
|
|
|
+ filePath: filepath,
|
|
|
+ name: 'file',
|
|
|
+ success: function(uploadFileRes) {
|
|
|
+ let resdata = JSON.parse(uploadFileRes.data)
|
|
|
+ console.log('Success:', resdata);
|
|
|
+ if (resdata.success == 'yes') {
|
|
|
+ _self.bgImage = resdata.url;
|
|
|
+ _self.closePropUp();
|
|
|
+ uni.showToast({
|
|
|
+ title: '上传成功',
|
|
|
+ icon: 'success'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: resdata.str || '上传失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: function(uploadFileFail) {
|
|
|
+ console.log('Error:', uploadFileFail.data);
|
|
|
uni.showToast({
|
|
|
- title: resdata.str || '上传失败',
|
|
|
+ title: '上传失败',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ console.log('Complete:');
|
|
|
+ uni.hideLoading();
|
|
|
+ this.uploading = false;
|
|
|
}
|
|
|
- },
|
|
|
- fail: function (uploadFileFail) {
|
|
|
- console.log('Error:', uploadFileFail.data);
|
|
|
- uni.showToast({
|
|
|
- title: '上传失败',
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- },
|
|
|
- complete: () => {
|
|
|
- console.log('Complete:');
|
|
|
- uni.hideLoading();
|
|
|
- this.uploading = false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-@import 'normal.scss';
|
|
|
-
|
|
|
-page {
|
|
|
- font-family: PingFang SC-Medium;
|
|
|
- // background: url("../../static/me/wd_bg_bianjiziliao.png") center top / 100%
|
|
|
- // auto no-repeat,
|
|
|
- // #f2f6f2;
|
|
|
-}
|
|
|
-
|
|
|
-page {
|
|
|
- background: #000 !important;
|
|
|
-}
|
|
|
-
|
|
|
-.popSel {
|
|
|
- position: fixed;
|
|
|
- z-index: 101;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- background-color: #f2f6f2;
|
|
|
- width: 100vh;
|
|
|
- min-height: 100vh;
|
|
|
-
|
|
|
- .headLabel {
|
|
|
- width: 686rpx;
|
|
|
- margin: 28rpx 32rpx;
|
|
|
- min-height: 222rpx;
|
|
|
- background: #fff;
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 30rpx 40rpx 46rpx 20rpx;
|
|
|
- border-radius: 20rpx;
|
|
|
+ @import 'normal.scss';
|
|
|
|
|
|
- .avator-box {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+ page {
|
|
|
+ font-family: PingFang SC-Medium;
|
|
|
+ // background: url("../../static/me/wd_bg_bianjiziliao.png") center top / 100%
|
|
|
+ // auto no-repeat,
|
|
|
+ // #f2f6f2;
|
|
|
+ }
|
|
|
+
|
|
|
+ page {
|
|
|
+ background: #000 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .popSel {
|
|
|
+ position: fixed;
|
|
|
+ z-index: 101;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ background-color: #f2f6f2;
|
|
|
+ width: 100vh;
|
|
|
+ min-height: 100vh;
|
|
|
+
|
|
|
+ .headLabel {
|
|
|
+ width: 686rpx;
|
|
|
+ margin: 28rpx 32rpx;
|
|
|
+ min-height: 222rpx;
|
|
|
+ background: #fff;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 30rpx 40rpx 46rpx 20rpx;
|
|
|
+ border-radius: 20rpx;
|
|
|
+
|
|
|
+ .avator-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .avator {
|
|
|
+ width: 80rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .avator {
|
|
|
- width: 80rpx;
|
|
|
- height: 80rpx;
|
|
|
- margin-right: 20rpx;
|
|
|
+ .tag-box {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ font-size: 24rpx;
|
|
|
+
|
|
|
+ .tag {
|
|
|
+ margin-right: 16rpx;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ padding: 6rpx 10rpx;
|
|
|
+ border: 2rpx solid #DCE1DC;
|
|
|
+ color: #9E9E9E;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border-radius: 42rpx;
|
|
|
+ line-height: 1;
|
|
|
+
|
|
|
+ .close {
|
|
|
+ width: 20rpx;
|
|
|
+ margin-left: 12rpx;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .tag-box {
|
|
|
+ .openNicknamePopUpWindow {
|
|
|
+ .length-indicator {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #999;
|
|
|
+ text-align: right;
|
|
|
+ margin-top: 10rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ position: absolute;
|
|
|
+ right: 24rpx;
|
|
|
+ top: 24rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .popSel {
|
|
|
+ .item_tag {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: flex-start;
|
|
|
align-items: center;
|
|
|
flex-wrap: wrap;
|
|
|
- font-size: 24rpx;
|
|
|
+ width: 690rpx;
|
|
|
+ padding: 20rpx;
|
|
|
|
|
|
.tag {
|
|
|
- margin-right: 16rpx;
|
|
|
- margin-top: 20rpx;
|
|
|
- padding: 6rpx 10rpx;
|
|
|
- border: 2rpx solid #DCE1DC;
|
|
|
- color: #9E9E9E;
|
|
|
+ border-radius: 94rpx;
|
|
|
+ margin-right: 10rpx;
|
|
|
+ margin-top: 10rpx;
|
|
|
+ padding: 8rpx 16rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333;
|
|
|
display: flex;
|
|
|
+ flex-direction: row;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
- border-radius: 42rpx;
|
|
|
- line-height: 1;
|
|
|
+ background: #fff;
|
|
|
+ border-width: 0;
|
|
|
|
|
|
.close {
|
|
|
- width: 20rpx;
|
|
|
- margin-left: 12rpx;
|
|
|
+ width: 28rpx;
|
|
|
+ margin-left: 2rpx;
|
|
|
position: relative;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.openNicknamePopUpWindow {
|
|
|
- .length-indicator {
|
|
|
- font-size: 24rpx;
|
|
|
- color: #999;
|
|
|
- text-align: right;
|
|
|
- margin-top: 10rpx;
|
|
|
- margin-right: 20rpx;
|
|
|
- position: absolute;
|
|
|
- right: 24rpx;
|
|
|
- top: 24rpx;
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
|
|
|
-.popSel {
|
|
|
- .item_tag {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
- flex-wrap: wrap;
|
|
|
- width: 690rpx;
|
|
|
- padding: 20rpx;
|
|
|
-
|
|
|
- .tag {
|
|
|
- border-radius: 94rpx;
|
|
|
- margin-right: 10rpx;
|
|
|
- margin-top: 10rpx;
|
|
|
- padding: 8rpx 16rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #333;
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- background: #fff;
|
|
|
- border-width: 0;
|
|
|
+ .active {
|
|
|
+ border-width: 0;
|
|
|
+ background: #ACF934;
|
|
|
+ }
|
|
|
|
|
|
- .close {
|
|
|
- width: 28rpx;
|
|
|
- margin-left: 2rpx;
|
|
|
- position: relative;
|
|
|
+ .addNew {
|
|
|
+ margin-right: 10rpx;
|
|
|
+ margin-top: 10rpx;
|
|
|
+ padding: 0rpx 20rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ border-radius: 12rpx;
|
|
|
+ background: #1f1f1f;
|
|
|
+ color: #fff;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .active {
|
|
|
- border-width: 0;
|
|
|
- background: #ACF934;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- .addNew {
|
|
|
- margin-right: 10rpx;
|
|
|
- margin-top: 10rpx;
|
|
|
- padding: 0rpx 20rpx;
|
|
|
- height: 60rpx;
|
|
|
- border-radius: 12rpx;
|
|
|
- background: #1f1f1f;
|
|
|
- color: #fff;
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
+ .reserveASeat {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(var(--status-bar-height) + 50rpx);
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
+ .page {
|
|
|
+ background: url("../../static/me/wd_bg_bianjiziliao.png") top center/ 100% auto no-repeat,
|
|
|
+ #f2f6f2;
|
|
|
+ }
|
|
|
|
|
|
-.reserveASeat {
|
|
|
- width: 100%;
|
|
|
- height: calc(var(--status-bar-height) + 50rpx);
|
|
|
-}
|
|
|
+ .PageHeader {
|
|
|
+ background: url("../../static/me/wd_bg_bianjiziliao.png") center top / 100% auto no-repeat,
|
|
|
+ #f2f6f2;
|
|
|
+ // background-position-y: var(--status-bar-height);
|
|
|
+ z-index: 99 !important;
|
|
|
+ }
|
|
|
|
|
|
-.page {
|
|
|
- background: url("../../static/me/wd_bg_bianjiziliao.png") top center/ 100% auto no-repeat,
|
|
|
- #f2f6f2;
|
|
|
-}
|
|
|
+ .add-tag-box {
|
|
|
+ background: #fff;
|
|
|
+ padding: 20rpx;
|
|
|
+ margin: 20rpx;
|
|
|
+ border-radius: 12rpx;
|
|
|
|
|
|
-.PageHeader {
|
|
|
- background: url("../../static/me/wd_bg_bianjiziliao.png") center top / 100% auto no-repeat,
|
|
|
- #f2f6f2;
|
|
|
- // background-position-y: var(--status-bar-height);
|
|
|
- z-index: 99 !important;
|
|
|
-}
|
|
|
+ .add-tag-input {
|
|
|
+ width: 100%;
|
|
|
+ height: 80rpx;
|
|
|
+ background: #f5f5f5;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ padding: 0 20rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ }
|
|
|
|
|
|
-.add-tag-box {
|
|
|
- background: #fff;
|
|
|
- padding: 20rpx;
|
|
|
- margin: 20rpx;
|
|
|
- border-radius: 12rpx;
|
|
|
+ .add-tag-btns {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ gap: 20rpx;
|
|
|
|
|
|
- .add-tag-input {
|
|
|
- width: 100%;
|
|
|
- height: 80rpx;
|
|
|
- background: #f5f5f5;
|
|
|
- border-radius: 8rpx;
|
|
|
- padding: 0 20rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- margin-bottom: 20rpx;
|
|
|
- }
|
|
|
+ .cancel-btn,
|
|
|
+ .confirm-btn {
|
|
|
+ padding: 10rpx 30rpx;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
|
|
|
- .add-tag-btns {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- gap: 20rpx;
|
|
|
+ .cancel-btn {
|
|
|
+ background: #f5f5f5;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
|
|
|
- .cancel-btn,
|
|
|
- .confirm-btn {
|
|
|
- padding: 10rpx 30rpx;
|
|
|
- border-radius: 8rpx;
|
|
|
- font-size: 28rpx;
|
|
|
+ .confirm-btn {
|
|
|
+ background: #1f1f1f;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .cancel-btn {
|
|
|
+ .item_tag {
|
|
|
+ .add-tag {
|
|
|
background: #f5f5f5;
|
|
|
color: #666;
|
|
|
- }
|
|
|
+ border: 2rpx dashed #ddd;
|
|
|
|
|
|
- .confirm-btn {
|
|
|
- background: #1f1f1f;
|
|
|
- color: #fff;
|
|
|
+ &:active {
|
|
|
+ background: #e5e5e5;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-.item_tag {
|
|
|
- .add-tag {
|
|
|
- background: #f5f5f5;
|
|
|
- color: #666;
|
|
|
- border: 2rpx dashed #ddd;
|
|
|
|
|
|
- &:active {
|
|
|
- background: #e5e5e5;
|
|
|
- }
|
|
|
+ .backgroundImage {
|
|
|
+ width: 88rpx;
|
|
|
+ height: 50rpx;
|
|
|
+ border-radius: 4rpx;
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-.backgroundImage {
|
|
|
- width: 88rpx;
|
|
|
- height: 50rpx;
|
|
|
- border-radius: 4rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.upload-bg-btn {
|
|
|
- width: 100%;
|
|
|
- height: 80rpx;
|
|
|
- background: #1f1f1f;
|
|
|
- color: #fff;
|
|
|
- border-radius: 12rpx;
|
|
|
- font-size: 32rpx;
|
|
|
- margin: 0 auto;
|
|
|
- display: block;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-.NicknamePopup-backgroundImage {
|
|
|
- .info_item {
|
|
|
- height: 100rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding: 0 30rpx;
|
|
|
- border-bottom: 1rpx solid #f5f5f5;
|
|
|
- padding-right: 20rpx;
|
|
|
- background: #fff;
|
|
|
+
|
|
|
+ .upload-bg-btn {
|
|
|
+ width: 100%;
|
|
|
+ height: 80rpx;
|
|
|
+ background: #1f1f1f;
|
|
|
+ color: #fff;
|
|
|
border-radius: 12rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ margin: 0 auto;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
|
|
|
- &:last-child {
|
|
|
- border-bottom: none;
|
|
|
- }
|
|
|
|
|
|
- .label {
|
|
|
- width: 160rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #1f1f1f;
|
|
|
- font-family: "PingFang SC-Medium";
|
|
|
- }
|
|
|
|
|
|
- .content {
|
|
|
- flex: 1;
|
|
|
+ .NicknamePopup-backgroundImage {
|
|
|
+ .info_item {
|
|
|
+ height: 100rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: flex-end;
|
|
|
+ padding: 0 30rpx;
|
|
|
+ border-bottom: 1rpx solid #f5f5f5;
|
|
|
+ padding-right: 20rpx;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 12rpx;
|
|
|
|
|
|
- input {
|
|
|
- text-align: right;
|
|
|
+ &:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .label {
|
|
|
+ width: 160rpx;
|
|
|
font-size: 28rpx;
|
|
|
- color: #333;
|
|
|
+ color: #1f1f1f;
|
|
|
+ font-family: "PingFang SC-Medium";
|
|
|
}
|
|
|
|
|
|
- .arrow {
|
|
|
- width: 36rpx;
|
|
|
- margin-left: 10rpx;
|
|
|
+ .content {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+
|
|
|
+ input {
|
|
|
+ text-align: right;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .arrow {
|
|
|
+ width: 36rpx;
|
|
|
+ margin-left: 10rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- ::v-deep .uv-popup__content {
|
|
|
- background: #f2f6f2 !important;
|
|
|
- }
|
|
|
+ ::v-deep .uv-popup__content {
|
|
|
+ background: #f2f6f2 !important;
|
|
|
+ }
|
|
|
|
|
|
- ::v-deep .uv-swiper__wrapper__item__wrapper__image {
|
|
|
- border-radius: 20rpx !important;
|
|
|
- }
|
|
|
+ ::v-deep .uv-swiper__wrapper__item__wrapper__image {
|
|
|
+ border-radius: 20rpx !important;
|
|
|
+ }
|
|
|
|
|
|
- .content {
|
|
|
- padding: 0 32rpx;
|
|
|
+ .content {
|
|
|
+ padding: 0 32rpx;
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
</style>
|