diff --git a/App.vue b/App.vue
index cc1058b..651fe9f 100644
--- a/App.vue
+++ b/App.vue
@@ -3,7 +3,7 @@
onLaunch: function() {
},
onShow: function() {
- // this.$store.commit('initConfig')
+ this.$store.commit('initConfig')
},
onHide: function() {
}
diff --git a/api/http.js b/api/http.js
index 6c3da63..bc01a4c 100644
--- a/api/http.js
+++ b/api/http.js
@@ -35,7 +35,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
if(res.statusCode == 401 ||
res.data.message == '操作失败,token非法无效!' ||
res.data.message == '操作失败,用户不存在!'){
- store.commit('logout')
+ store.commit('logout', '登录过期了,你可以停留在此页面或去重新登录')
console.error('登录过期');
utils.toLogin()
}
diff --git a/api/model/bookshelf.js b/api/model/bookshelf.js
index 3e39305..5c5615b 100644
--- a/api/model/bookshelf.js
+++ b/api/model/bookshelf.js
@@ -30,14 +30,15 @@ const api = {
url: '/all_book/saveOrUpdateBook',
method: 'POST',
auth: true,
- limit: 500,
+ limit: 800,
showLoading: true,
},
// 增加或修改作品章节
saveOrUpdateCatalog: {
url: '/all_book/saveOrUpdateCatalog',
- method: 'GET',
+ method: 'POST',
auth: true,
+ limit: 800,
},
}
diff --git a/api/model/login.js b/api/model/login.js
index 7ea631c..1d34227 100644
--- a/api/model/login.js
+++ b/api/model/login.js
@@ -21,7 +21,7 @@ const api = {
auth: true,
},
// 更新用户信息
- updateUserInfo: {
+ updateInfo: {
url: '/all_login/updateUserInfo',
method: 'POST',
auth: true,
diff --git a/common.scss b/common.scss
index 5fd3072..65f6566 100644
--- a/common.scss
+++ b/common.scss
@@ -24,12 +24,13 @@
.share{
padding: 0;
margin: 0;
- background-color: #fff;
- display: flex !important;
- flex-direction: column !important;
- justify-content: center !important;
- align-items: center !important;
- font-size: 26rpx;
+ background-color: unset;
+ display: unset !important;
+ flex-direction: unset !important;
+ justify-content: unset !important;
+ align-items: unset !important;
+ font-size: unset;
+ line-height: unset;
}
.share::after{
border: none;
diff --git a/components/base/tabbar.vue b/components/base/tabbar.vue
index e4303da..d25d0a8 100644
--- a/components/base/tabbar.vue
+++ b/components/base/tabbar.vue
@@ -17,14 +17,10 @@
diff --git a/pages/index/index.vue b/pages/index/index.vue
index a8833bd..11cbfab 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -97,7 +97,7 @@
查看更多 >
-
@@ -115,16 +115,13 @@
import tabber from '@/components/base/tabbar.vue'
import novelItem from '@/components/novel/novelItem.vue'
import mixinsList from '@/mixins/list.js'
- import {
- mapGetters
- } from 'vuex'
export default {
+ mixins: [mixinsList],
components: {
tabber,
PrivacyAgreementPoup,
novelItem,
},
- mixins: [mixinsList],
data() {
return {
// 轮播图数据
@@ -183,7 +180,7 @@
// 获取最近更新小说列表
async getNewList() {
const data = await this.$fetch('getNewList')
- this.novelList = data
+ this.novelList = data.records
},
}
}
diff --git a/pages_order/announcement/announcementDetail.vue b/pages_order/announcement/announcementDetail.vue
index 1c5be41..a5313da 100644
--- a/pages_order/announcement/announcementDetail.vue
+++ b/pages_order/announcement/announcementDetail.vue
@@ -4,7 +4,10 @@
-
+
+
+
+
@@ -47,41 +50,33 @@
\ No newline at end of file
diff --git a/pages_order/auth/wxLogin.vue b/pages_order/auth/wxLogin.vue
index 292f9d1..0cc5df2 100644
--- a/pages_order/auth/wxLogin.vue
+++ b/pages_order/auth/wxLogin.vue
@@ -1,30 +1,28 @@
-
+
+
- 欢迎使用酒店桌布租赁平台
+ 欢迎使用{{ configList.logo_name }}
+
-
+
- 微信授权登录
+ 手机号授权登录
-
+
取消登录
-
-
-
- 阅读并同意我们的“服务协议与隐私条款”
+ 阅读并同意我们的“用户协议”
- 以及个人信息保护指引
+ 以及隐私政策
@@ -58,18 +55,36 @@
name : 'Login',
data() {
return {
- checkboxValue : []
+ checkboxValue : [],
+ config : {},
+ }
+ },
+ onLoad(query) {
+ if (query.shareId) {
+ uni.setStorageSync('shareId', query.shareId)
+ }
+ if(query.path){
+ this.config = query
}
},
methods: {
- wxLogin(){
+ getPhoneNumber(e){
+ console.log(e, e.detail.code);
+ this.wxLogin(phoneCode)
+ },
+ wxLogin(phoneCode){
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意隐私协议',
icon:'none'
})
}
- this.$store.commit('login')
+ this.$store.commit('login', this.config)
+ },
+
+ //打开应用配置
+ openConfigDetail(key){
+ this.$refs.popup.open(key)
},
qux(){
uni.reLaunch({
@@ -91,8 +106,6 @@
.logo{
height: 140rpx;
width: 140rpx;
- background-color: #ddd;
- border-radius: 30rpx;
image{
height: 140rpx;
width: 140rpx;
@@ -116,6 +129,7 @@
}
}
.btn{
+ all: unset;
width: 80%;
height: 100rpx;
background-color: $uni-color;
@@ -125,6 +139,10 @@
align-items: center;
margin: 20rpx 0;
border-radius: 20rpx;
+ border: none;
+ &::after{
+
+ }
.icon{
margin-right: 10rpx;
image{
diff --git a/pages_order/auth/wxUserInfo.vue b/pages_order/auth/wxUserInfo.vue
index 50c988f..6b64099 100644
--- a/pages_order/auth/wxUserInfo.vue
+++ b/pages_order/auth/wxUserInfo.vue
@@ -1,7 +1,10 @@
+
- 酒店桌布租赁平台
+ {{ configList.logo_name }}
申请获取你的头像、昵称
@@ -13,7 +16,7 @@
头像
-
@@ -26,9 +29,34 @@
+ v-model="userInfoForm.nickName" />
+
+
+ 手机号
+
+
+
+
+
+
+
+
+
+
+
+
+
确认
@@ -39,21 +67,42 @@
export default {
data() {
return {
- userInfo: {
+ userInfoForm: {
headImage: '',
nickName: '',
- }
+ phone : '',
+ },
};
},
onShow() {},
+ onLoad() {
+ this.userInfoForm.phone = this.userInfo.phone || ''
+ this.userInfoForm.nickName = this.userInfo.nickName || ''
+ this.userInfoForm.headImage = this.userInfo.headImage || ''
+ },
computed: {},
methods: {
onChooseAvatar(res) {
- let self = this
- self.$Oss.ossUpload(res.target.avatarUrl)
- .then(url => {
- self.userInfo.headImage = url
- })
+ this.$Oss.ossUpload(res.target.avatarUrl)
+ .then(url => {
+ this.userInfoForm.headImage = url
+ })
+ },
+ getPhone(e){
+ this.$api('bindPhone', {
+ phoneCode : e.detail.code
+ }, res => {
+ if(res.code == 200){
+ let phoneObj = JSON.parse(res.result)
+ if(phoneObj.errmsg == 'ok'){
+ this.userInfoForm.phone = phoneObj.phone_info.phoneNumber
+ }else{
+ uni.showModal({
+ title: phoneObj.errmsg
+ })
+ }
+ }
+ })
},
submit() {
let self = this
@@ -65,18 +114,23 @@
})
.exec((res) => {
const nickName = res?.[0]?.value
- self.userInfo.nickName = nickName
+ self.userInfoForm.nickName = nickName
- if (self.$utils.verificationAll(self.userInfo, {
+ if (self.$utils.verificationAll(self.userInfoForm, {
headImage: '请选择头像',
nickName: '请填写昵称',
+ phone: '请填写手机号',
})) {
return
}
- self.$api('updateInfo', self.userInfo, res => {
+ self.$api('updateInfo', {
+ avatarUrl : self.userInfoForm.headImage,
+ nickName : self.userInfoForm.nickName,
+ phone : self.userInfoForm.phone,
+ }, res => {
if (res.code == 200) {
- uni.switchTab({
+ uni.reLaunch({
url:'/pages/index/index'
})
}
@@ -95,6 +149,16 @@
justify-content: center;
align-items: center;
height: 80vh;
+ .logo{
+ height: 140rpx;
+ width: 140rpx;
+ image{
+ height: 140rpx;
+ width: 140rpx;
+ border-radius: 30rpx;
+ }
+ margin-bottom: 20rpx;
+ }
.title {
line-height: 45rpx;
@@ -129,5 +193,18 @@
border-radius: 15rpx;
margin-top: 10vh;
}
+ .getPhoneNumber{
+ // all: unset;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ // background: $uni-linear-gradient-btn-color;
+ background: $uni-color;
+ color: #fff;
+ width: 200rpx;
+ height: 60rpx;
+ border-radius: 30rpx;
+ font-size: 24rpx;
+ }
}
\ No newline at end of file
diff --git a/pages_order/author/editor.vue b/pages_order/author/editor.vue
index 9dddd0b..75fa76f 100644
--- a/pages_order/author/editor.vue
+++ b/pages_order/author/editor.vue
@@ -5,17 +5,34 @@
*
章节名称
-
+
*
章节内容
-
+
+
+
+
+
+
@@ -24,209 +41,169 @@
export default {
data() {
return {
- formats: {},
form: {
title: '',
- content: '',
+ details: '',
},
+ id : 0,
+ cid : 0,
}
},
- onLoad() {
+ onLoad({id, cid}) {
+ this.id = id
+ this.cid = cid || 0
},
methods: {
- onInput(e){
- console.log(e.detail);
- },
- onEditorReady() {
- uni.createSelectorQuery().select('#editor').context((res) => {
- this.editorCtx = res.context
- }).exec()
- },
- undo() {
- this.editorCtx.undo()
- },
- redo() {
- this.editorCtx.redo()
- },
- format(e) {
- let {
- name,
- value
- } = e.target.dataset
- if (!name) return
- // console.log('format', name, value)
- this.editorCtx.format(name, value)
- },
- onStatusChange(e) {
- const formats = e.detail
- this.formats = formats
- },
- insertDivider() {
- this.editorCtx.insertDivider({
- success: function() {
- console.log('insert divider success')
- }
- })
- },
- clear() {
- uni.showModal({
- title: '清空编辑器',
- content: '确定清空编辑器全部内容?',
- success: res => {
- if (res.confirm) {
- this.editorCtx.clear({
- success: function(res) {
- console.log("clear success")
- }
- })
- }
- }
- })
- },
- removeFormat() {
- this.editorCtx.removeFormat()
- },
- insertDate() {
- const date = new Date()
- const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
- this.editorCtx.insertText({
- text: formatDate
+ async onPublish(status) {
+
+ let data = {
+ bookId : this.id,
+ num : this.form.details.length,
+ title : this.form.title,
+ details : this.form.details,
+ }
+
+ if(this.cid){
+ data.id = this.id
+ }
+
+ if(status == 1){
+ data.status = status
+ }
+
+ await this.$fetch('saveOrUpdateCatalog', data)
+
+ uni.showToast({
+ title: status ? '发布成功' : '保存成功'
})
- },
- insertImage() {
- uni.chooseImage({
- count: 1,
- success: (res) => {
- this.editorCtx.insertImage({
- src: res.tempFilePaths[0],
- alt: '图像',
- success: function() {
- console.log('insert image success')
- }
- })
- }
- })
- },
- onSave() {
- // 保存逻辑
- const newChapter = {
- title: this.form.title,
- content: this.form.content
- };
- // 获取原有章节
- let chapters = uni.getStorageSync('chapters') || [];
- chapters.push(newChapter);
- uni.setStorageSync('chapters', chapters);
- // 跳转并传递参数
- uni.redirectTo({
- url: '/pages_order/novel/chapterList?fromSave=1'
- });
- },
- onPublish() {
- // 发布逻辑
- const newChapter = {
- title: this.form.title,
- content: this.form.content,
- time: Date.now()
- };
- // 保存到已发布章节
- let publishedChapters = uni.getStorageSync('publishedChapters') || [];
- publishedChapters.push(newChapter);
- uni.setStorageSync('publishedChapters', publishedChapters);
- // 跳转到bookshelf作品tab并弹窗
- uni.redirectTo({
- url: '/pages/index/bookshelf?fromPublish=1'
- });
+
+ setTimeout(uni.navigateBack, 800, -1)
},
}
}
+ .page {
+ min-height: 100vh;
+ background: #f7f8fa;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .form-box {
+ background: #fff;
+ margin: 0;
+ padding: 0 32rpx;
+ border-radius: 0;
+ position: relative;
+ }
+
+ .top-fixed {
+ margin-top: 0;
+ }
+
+ .form-item {
+ display: flex;
+ flex-direction: column;
+ margin-top: 32rpx;
+ position: relative;
+ }
+
+ .label {
+ font-size: 28rpx;
+ color: #222;
+ margin-bottom: 12rpx;
+ margin-left: 32rpx;
+ }
+
+ .required {
+ color: #f44;
+ position: absolute;
+ left: 0;
+ top: 0;
+ font-size: 32rpx;
+ }
+
+ .input {
+ border: none;
+ border-bottom: 1rpx solid #eee;
+ font-size: 28rpx;
+ padding: 16rpx 0;
+ background: transparent;
+ }
+
+ .textarea-container {
+ position: relative;
+ line-height: 50rpx;
+ /deep/ .uv-textarea{
+ min-height: 70vh;
+ border: none !important;
+ font-size: 28rpx;
+ padding: 16rpx 0;
+ background: transparent;
+ resize: none;
+ width: 100%;
+ }
+ }
+
+ .textarea {
+ min-height: 70vh;
+ border: none;
+ border-bottom: 1rpx solid #eee;
+ font-size: 28rpx;
+ padding: 16rpx 0;
+ background: transparent;
+ resize: none;
+ width: 100%;
+ }
+
+ .toolbar {
+ display: flex;
+ padding: 10rpx 0;
+ margin-top: 10rpx;
+ }
+
+ .indent-btn {
+ background: #eaeaea;
+ color: #333;
+ padding: 8rpx 20rpx;
+ border-radius: 6rpx;
+ font-size: 26rpx;
+ }
+
+ .footer-btns {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100vw;
+ background: #fff;
+ display: flex;
+ justify-content: space-between;
+ padding: 24rpx 48rpx 32rpx 48rpx;
+ box-sizing: border-box;
+ z-index: 10;
+ box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.03);
+ }
+
+ .btn {
+ flex: 1;
+ height: 80rpx;
+ font-size: 32rpx;
+ border-radius: 40rpx;
+ margin: 0 12rpx;
+ font-weight: 500;
+ }
+
+ .save-btn {
+ background: #fff;
+ color: #0a225f;
+ border: 2rpx solid #0a225f;
+ }
+
+ .publish-btn {
+ background: #0a225f;
+ color: #fff;
+ border: none;
+ }
+
\ No newline at end of file
diff --git a/pages_order/novel/Giftbox.vue b/pages_order/novel/Giftbox.vue
index 6364994..407829f 100644
--- a/pages_order/novel/Giftbox.vue
+++ b/pages_order/novel/Giftbox.vue
@@ -1,166 +1,244 @@
-
-
-
-
-
-
-
-
- {{ gift.emoji }}
-
- {{ gift.name }}
-
- x{{ gift.count }}
- {{ gift.price }}豆豆
-
-
-
-
-
-
- 剩余:{{ gifts[selectedIndex].count }} 个
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ gift.emoji }}
+
+ {{ gift.name }}
+
+ x{{ gift.count }}
+ {{ gift.price }}豆豆
+
+
+
+
+
+
+ 剩余:{{ gifts[selectedIndex].count }} 个
+
+
+
+
+
+
+ .giftbox-container {
+ min-height: 100vh;
+ background: #f8f8f8;
+ padding-bottom: 120rpx;
+ }
+
+ .gift-list {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 24rpx;
+ padding: 32rpx 16rpx 0 16rpx;
+ }
+
+ .gift-item {
+ width: 30%;
+ background: #fff;
+ border-radius: 18rpx;
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
+ margin-bottom: 24rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 24rpx 0 16rpx 0;
+ border: 2rpx solid transparent;
+ transition: border 0.2s;
+ }
+
+ .gift-item.selected {
+ border: 2rpx solid #223a7a;
+ box-shadow: 0 4rpx 16rpx 0 rgba(34, 58, 122, 0.08);
+ }
+
+ .gift-img {
+ width: 80rpx;
+ height: 80rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 8rpx;
+ }
+
+ .gift-emoji {
+ font-size: 56rpx;
+ }
+
+ .gift-name {
+ font-size: 28rpx;
+ color: #222;
+ margin-bottom: 4rpx;
+ }
+
+ .gift-info {
+ display: flex;
+ align-items: center;
+ gap: 8rpx;
+ font-size: 22rpx;
+ color: #888;
+ }
+
+ .giftbox-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 90rpx;
+ background: #fff;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 100rpx;
+ padding: 0 32rpx;
+ box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
+ z-index: 10;
+ }
+
+ .giftbox-left {
+ font-size: 28rpx;
+ color: #666;
+ }
+
+ .giftbox-buy {
+ display: flex;
+ align-items: center;
+ gap: 18rpx;
+ }
+
+ .buy-btn {
+ background: #223a7a;
+ color: #fff;
+ font-size: 28rpx;
+ border-radius: 32rpx;
+ padding: 0 36rpx;
+ height: 68rpx;
+ line-height: 68rpx;
+ border: none;
+ }
+
\ No newline at end of file
diff --git a/pages_order/novel/Modifyinformation.vue b/pages_order/novel/Modifyinformation.vue
deleted file mode 100644
index 7386ed9..0000000
--- a/pages_order/novel/Modifyinformation.vue
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
-
-
- 个人信息
-
- * 昵称
- {{ form.nickname }}
-
-
-
- * 个性签名
- {{ form.signature }}
-
-
-
-
- 手机号
-
- * 手机号
- {{ form.phone }}
-
-
-
-
-
-
-
-
-
-
diff --git a/pages_order/novel/chapterList.vue b/pages_order/novel/chapterList.vue
index 82dda2e..b90fe58 100644
--- a/pages_order/novel/chapterList.vue
+++ b/pages_order/novel/chapterList.vue
@@ -33,11 +33,10 @@
\ No newline at end of file
+ .create-novel {
+ min-height: 100vh;
+ background-color: #F8F8F8;
+
+ .form-container {
+ padding: 20rpx;
+
+ .section {
+ background-color: #FFFFFF;
+ border-radius: 12rpx;
+ padding: 30rpx;
+ margin-bottom: 20rpx;
+
+ .section-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 30rpx;
+ }
+
+ .upload-cover {
+ .sub-title {
+ font-size: 28rpx;
+ color: #666;
+ margin-bottom: 20rpx;
+ }
+
+ .cover-box {
+ width: 200rpx;
+ height: 266rpx;
+ background-color: #F5F5F5;
+ border-radius: 8rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+
+ .cover-image {
+ width: 100%;
+ height: 100%;
+ }
+
+ .upload-placeholder {
+ .plus {
+ font-size: 60rpx;
+ color: #999;
+ }
+ }
+ }
+ }
+
+ .form-item {
+ margin-bottom: 30rpx;
+ position: relative;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ .required {
+ color: #FF0000;
+ margin-right: 4rpx;
+ }
+
+ .label {
+ font-size: 28rpx;
+ color: #333;
+ margin-bottom: 16rpx;
+ display: block;
+ }
+
+ input,
+ textarea {
+ width: 100%;
+ height: 80rpx;
+ background-color: #F5F5F5;
+ border-radius: 8rpx;
+ padding: 20rpx;
+ font-size: 28rpx;
+ color: #333;
+ box-sizing: border-box;
+ position: relative;
+ z-index: 1;
+ }
+
+ textarea {
+ height: 200rpx;
+ }
+
+ .input-placeholder {
+ color: #999;
+ }
+
+ .status-options {
+ display: flex;
+ gap: 40rpx;
+
+ .status-item {
+ display: flex;
+ align-items: center;
+ gap: 10rpx;
+
+ .radio-dot {
+ width: 32rpx;
+ height: 32rpx;
+ border: 2rpx solid #999;
+ border-radius: 50%;
+ position: relative;
+
+ &.checked {
+ border-color: #001351;
+
+ &::after {
+ content: '';
+ position: absolute;
+ width: 20rpx;
+ height: 20rpx;
+ background-color: #001351;
+ border-radius: 50%;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ }
+ }
+ }
+
+ text {
+ font-size: 28rpx;
+ color: #333;
+ }
+ }
+ }
+
+ .value {
+ font-size: 28rpx;
+ color: #999;
+ }
+ }
+ }
+
+ .submit-btn {
+ background-color: #001351;
+ color: #FFFFFF;
+ font-size: 32rpx;
+ text-align: center;
+ padding: 24rpx 0;
+ border-radius: 12rpx;
+ margin-top: 40rpx;
+
+ &:active {
+ opacity: 0.9;
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages_order/novel/novelDetail.vue b/pages_order/novel/novelDetail.vue
index c07ffac..6a7c2bf 100644
--- a/pages_order/novel/novelDetail.vue
+++ b/pages_order/novel/novelDetail.vue
@@ -6,20 +6,31 @@
-
+
- {{ novelData.title }}
+ {{ novelData.name }}
作者:
{{ novelData.author }}
-
+
+
+
+
+ {{novelData.status}}
+
+
+ {{ novelData.service }}
+
+
- {{ novelData.score || 2814}}
+ {{ novelData.qmNum || 0}}
作者累计亲密度值
@@ -28,7 +39,7 @@
- 2814
+ {{ novelData.tuiNum }}
推荐票数
@@ -92,10 +103,7 @@
简介:
- 这游戏也太真实了吧!
- 搬砖、跑腿、捡垃圾、送快递。......公司最多能让你体会到996的艰辛,在这里你能体会到超级加倍的007。
- 好了,不废话了,伟大的管理者大人嘛就去搬砖了。那位大人说了,只要我们努力献上自己的肝,下个月他又能换一套全新的动力甲,到时候候带我们开全新的地图,去广阔的废土捡更多的垃圾!
- 穿越到废土世界的基光发现,自己解锁了游戏所系统,能够从平行世界召唤名为"玩家"的生物。
+ {{ novelData.details }}
@@ -114,10 +122,6 @@
-
-
-
-