diff --git a/config/baseUrl.js b/config/baseUrl.js index 913a4c6..699e812 100644 --- a/config/baseUrl.js +++ b/config/baseUrl.js @@ -2,12 +2,12 @@ let baseUrl = ""; let socketUrl = ""; if (process.env.NODE_ENV === 'development') { //开发环境 - baseUrl = "https://api.nuttyreading.com/"; // 线上正式 - //baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 + //baseUrl = "https://api.nuttyreading.com/"; // 线上正式 + baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 } else if (process.env.NODE_ENV === 'production') { //生产环境 - baseUrl = "https://api.nuttyreading.com/"; - //baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 + //baseUrl = "https://api.nuttyreading.com/"; + baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 } const courtConfig = { //微信公众号APPID diff --git a/main.js b/main.js index 5318953..b1587f3 100644 --- a/main.js +++ b/main.js @@ -16,9 +16,9 @@ import { Vue.prototype.$getHours = nowHour // 地址 -// Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/" -// Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/" -Vue.prototype.$baseUrl = "https://api.nuttyreading.com/" +Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/" +//Vue.prototype.$baseUrl = "https://api.nuttyreading.com/" + // 安卓安卓包下载地址 // Vue.prototype.$apkUrl = "https://www.nuttyreading.com/nuttyreading.apk" // 本地地址 Vue.prototype.$apkUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.nuttyreading" // 应用宝 @@ -85,8 +85,8 @@ import config from 'uview-ui/libs/config/config' Vue.component("mescroll-body", MescrollBody); import commonCoupon from '@/pages/component/commonComponents/coupon/index.vue' Vue.component('common-coupon', commonCoupon); -// import musicPlay from '@/components/music.vue' -// Vue.component('music-play', musicPlay); +import commonList from '@/pages/component/commonComponents/list.vue' +Vue.component('common-list', commonList); import commonAdvertisement from '@/pages/component/commonComponents/advertisement.vue' Vue.component('common-advertisement', commonAdvertisement); diff --git a/pages.json b/pages.json index b3e41ca..b94e0c0 100644 --- a/pages.json +++ b/pages.json @@ -157,6 +157,13 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/user/points", + "style": { + "navigationBarTitleText": "我的积分", + "enablePullDownRefresh": false + } + }, { "path": "pages/user/bindPhone", "style": { diff --git a/pages/comments/comments.vue b/pages/comments/comments.vue deleted file mode 100644 index e1c7d3e..0000000 --- a/pages/comments/comments.vue +++ /dev/null @@ -1,839 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/comments/commentsDetail.vue b/pages/comments/commentsDetail.vue deleted file mode 100644 index 4df1ac6..0000000 --- a/pages/comments/commentsDetail.vue +++ /dev/null @@ -1,853 +0,0 @@ - - - - - diff --git a/pages/comments/commentsList-old.vue b/pages/comments/commentsList-old.vue deleted file mode 100644 index 2142354..0000000 --- a/pages/comments/commentsList-old.vue +++ /dev/null @@ -1,352 +0,0 @@ - - - - - diff --git a/pages/comments/commentsList.vue b/pages/comments/commentsList.vue deleted file mode 100644 index e2b9d71..0000000 --- a/pages/comments/commentsList.vue +++ /dev/null @@ -1,847 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/component/commonComponents/advertisement.vue b/pages/component/commonComponents/advertisement.vue deleted file mode 100644 index d8c98b7..0000000 --- a/pages/component/commonComponents/advertisement.vue +++ /dev/null @@ -1,251 +0,0 @@ - - - - - diff --git a/pages/component/commonComponents/coupon/index.vue b/pages/component/commonComponents/coupon/index.vue deleted file mode 100644 index 6240537..0000000 --- a/pages/component/commonComponents/coupon/index.vue +++ /dev/null @@ -1,287 +0,0 @@ - - - - - diff --git a/pages/peanut/home.vue b/pages/peanut/home.vue index ca8d8fd..10a2b75 100644 --- a/pages/peanut/home.vue +++ b/pages/peanut/home.vue @@ -201,7 +201,7 @@ - + diff --git a/pages/peanut/mine.vue b/pages/peanut/mine.vue index be2ab8f..660606a 100644 --- a/pages/peanut/mine.vue +++ b/pages/peanut/mine.vue @@ -31,46 +31,26 @@
- - - - + - + - + {{ userMes.peanutCoin }} 天医币 + + {{ userMes.jf }} + 积分 + {{ userCouponNum }} 优惠券 - - - - 充 值 + 充 值 @@ -78,41 +58,15 @@ 我的订单 - - - - - - - 购物车 - - 修改个人资料 地址管理 - - - 分享App @@ -161,20 +115,13 @@ export default { userCouponNum: 0, signShow: false, signContent: "是否要退出登录?", - playData: {}, - isAndorid: true, - platform: null, // 设备系统 + playData: {} }; }, //第一次加载 onLoad(e) { // 隐藏原生的tabbar uni.hideTabBar(); - // #ifdef APP-PLUS - this.getOS(); - this.platform = uni.getSystemInfoSync().platform; - console.log('操纵系统',this.platform) - // #endif }, computed: { ...mapState(["userInfo"]), @@ -184,7 +131,6 @@ export default { // 隐藏原生的tabbar uni.hideTabBar(); this.getData(); - }, components: { musicPlay, @@ -193,43 +139,32 @@ export default { methods: { ...mapMutations(["setUserInfo"]), async getUserCouponList(){ - await this.$http - .request({ - url: "common/coupon/getCouponHistoryList", - method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 - data: { - "page":1, - "limit":10, - "getType":"",//获取类型 0 后台赠送 1 主动获取 - "status":"0",//使用状态 0 未使用 1 已使用 2 已过期 - "userInfo":"",//用户信息 - "userId":this.userMes.id - }, - header: { - //默认 无 说明:请求头 - "Content-Type": "application/json", - }, - }) - .then(async (res) => { - if(res.code != 0) return; - this.userCouponNum = res.couponList.total - - }).catch(e => { - console.log(e); - this.$commonJS.showToast(e.errMsg); - }) + await this.$http + .request({ + url: "common/coupon/getCouponHistoryList", + method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 + data: { + "page":1, + "limit":10, + "getType":"",//获取类型 0 后台赠送 1 主动获取 + "status":"0",//使用状态 0 未使用 1 已使用 2 已过期 + "userInfo":"",//用户信息 + "userId":this.userMes.id }, - // 获得操作系统 - getOS() { - let oprateOs = ""; - oprateOs = uni.getSystemInfoSync().platform; - // console.log(oprateOs) - if (oprateOs == "android") { - this.isAndorid = true; - } else { - this.isAndorid = false; - } - }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json", + }, + }) + .then(async (res) => { + if(res.code != 0) return; + this.userCouponNum = res.couponList.total + + }).catch(e => { + console.log(e); + this.$commonJS.showToast(e.errMsg); + }) + }, haveSelected(data) { console.log(data, " 选择的是"); if (data.index == 0) { @@ -422,9 +357,8 @@ export default { .chong_zhi { background-color: #fff; - margin: 0 0 30upx 0; - padding: 0 30upx; - height: 240upx; + padding: 30upx; + margin-bottom: 30rpx; .zhanghu { font-size: 32upx; @@ -440,7 +374,7 @@ export default { color: #a3a1a1; b { - font-size: 45rpx; + font-size: 40rpx; display: block; margin: 0 0 10rpx 0; color: #76757b; @@ -455,7 +389,7 @@ export default { color: #fffbf6; padding: 12rpx 42rpx; margin: 20rpx 0 0 0; - background: #815219; + background: #11a669; } } } diff --git a/pages/peanut/reCharge.vue b/pages/peanut/reCharge.vue index 06a3890..29e85b7 100644 --- a/pages/peanut/reCharge.vue +++ b/pages/peanut/reCharge.vue @@ -16,32 +16,20 @@ : 'cj_price' " > - - - {{ item.money }} - - ¥{{ item.realMoney }} - {{item.description}} - + ¥{{ item.realMoney }} + {{ item.money }}天医币(赠{{ item.givejf }}积分) + {{item.description}}
- 说明 : 天医币属于虚拟产品,一经购买概不退还 + + 其他金额 + + + + 说明 : 天医币属于虚拟产品,一经购买概不退还 + +
@@ -88,7 +76,7 @@ { + if(data.code==0){ + if(data.res&&data.res.length>0){ + this.activityContent = data.res[0]; + } + } + }) + }, + //输入金额 + input(val){ + this.stepsCj = {}; + }, + //ios充值 iosPay() { this.iphonepay(); @@ -518,6 +532,31 @@ export default { }, // 正常充值 kaiChar() { + if(!this.stepsCj.priceTypeId&&!this.limitVal){ + uni.showToast({ + title: "请选择充值商品", + icon: "none", + }); + return false; + } + + const regex = /^[1-9]\d*$/; + //如果输入其他金额 + if(this.limitVal){ + if(!regex.test(this.limitVal)){ + uni.showToast({ + title: "充值金额必须为正整数", + icon: "none", + }); + return false; + } + //设置充值金额和id + this.stepsCj = { + money: this.limitVal, + priceTypeId: 0 + } + } + // 常规充值 if (this.radioValue == "1") { uni.showLoading({ @@ -781,43 +820,56 @@ export default { margin-top: 40rpx; .cj_price { - border: 4rpx solid #ebebeb; - // box-shadow: 0 0 20rpx 0 #0000001a; + box-shadow: 0 0 20rpx 0 #0000001a; float: left; - width: 31%; - margin: 0 3% 30rpx 0; + width: 47%; + margin: 0 5% 30rpx 0; text-align: center; - padding: 25rpx 0 30rpx 0; + padding: 30rpx 0 0; border-radius: 15rpx; position: relative; color: #2d2d2d; + height: 160rpx; + line-height: 44rpx; .pr_jg { - font-size: 38rpx; - margin: 0rpx 0 10rpx 0; + font-size: 45rpx; font-weight: bold; } .pr_yl { - font-size: 28rpx; - // text-decoration: line-through; - color: #8d8f8e; + padding-top: 10rpx; + font-size: 26rpx; + color: #575555; + + text{ + width: 100%; + text-align: center; + line-height: 40rpx; + position: absolute; + left: 0; + bottom: 10rpx; + color: red; + display: block; + font-size: 24rpx; + } } .pr_lj { - background-image: linear-gradient(90deg, #fe6e09 0%, #efa574 100%); + background-image: linear-gradient(180deg, #fe6e09 0%, #efa574 100%); color: #fff; position: absolute; top: -22rpx; right: -22rpx; font-size: 24rpx; - padding: 5rpx 4rpx; + line-height: 20px; + padding: 5rpx 10rpx; border-top-left-radius: 20rpx; border-bottom-right-radius: 20rpx; } } - .cj_price:nth-child(3n) { + .cj_price:nth-child(2n) { margin-right: 0; } @@ -835,7 +887,7 @@ export default { } .highlight { - color: $uni-color-primary; + color: #fe6e09; } .cha_fangsh { @@ -863,10 +915,6 @@ export default { vertical-align: bottom; } } - - .Tab_xf { - background-color: #fdf1e9cc; - } } } @@ -879,10 +927,12 @@ export default { } .char_btn { - position: fixed; - left: 0; - right: 0; - bottom: 30rpx; + width: 100%; + background: #fff; + padding: 20rpx 0; + position: fixed; + right: 0; + bottom: 0; view { background-image: linear-gradient(90deg, #ed7161 0%, #efa574 100%); @@ -890,10 +940,67 @@ export default { width: 90%; margin: 0 auto; text-align: center; - font-size: 35rpx; - font-weight: bold; - padding: 25rpx 0; + font-size: 30rpx; + padding: 20rpx 0; border-radius: 50rpx; } } + +.limitBlock{ + display: flex; + align-items: center; + margin-bottom: 10rpx; + + text{ + font-size: 28rpx; + } + + input{ + display: inline-block; + margin-left: 20rpx; + width: 300rpx; + height: 70rpx; + border: 1rpx solid #ededed; + border-radius: 10rpx; + line-height: 40rpx; + padding: 20rpx; + font-size: 28rpx; + color: #666; + } +} + +.limit-placeholder{ + font-size: 25rpx; + color: #8b8c90 !important; +} + +.active_block{ + width: 100%; + background-color: rgba(238, 147, 109, 0.2); + border-radius: 10rpx; + padding: 10rpx 20rpx; + font-size: 28rpx; + line-height: 42rpx; + margin-top: 15rpx; + color: #333; +} + +/deep/.active_block span{ + color: red; + font-size: 32rpx; + font-weight: bold; + padding: 0 5rpx; +} +/deep/.active_block span:first-child{ + padding: 0 5rpx 0 0; +} +/deep/.active_block p{ + padding-top: 10rpx; + color: #666; + font-size: 24rpx; + line-height: 34rpx; +} +/deep/.active_block p span{ + padding: 0 5rpx !important; +} diff --git a/pages/user/persCount.vue b/pages/user/persCount.vue index c059d6e..cb51a69 100644 --- a/pages/user/persCount.vue +++ b/pages/user/persCount.vue @@ -3,41 +3,53 @@ + + - - + :activeStyle="{color: '#303133',fontWeight: 'bold',transform: 'scale(1.1)'}" v-if="!iosHide"> --> + + 立即充值 + + + + - - {{userMes.peanutCoin}} - 天医币 - - 充值 - - - - 充值记录 + 充值消费记录 {{item.orderType}} + {{item.changeAmount}} - 天医币 - {{item.remark}} + {{item.remark}} + 说明:{{item.note}} {{item.createTime}} - {{item.name}} @@ -117,6 +129,7 @@ export default { data() { return { + goBuyTitle:'【天医币】仅为我平台支付使用币种 。一人民币=一天医币,仅为了方便用户支付使用。【天医币】可以用于在我平台支付书籍或课程使用。【天医币】这个名称是为适应我们平台的定位属性,所起名称。与区块链虚拟货币无任何关系。', playData: {}, platform: null, tab_list: [{ @@ -196,10 +209,7 @@ onLoad(e) { // 隐藏原生的tabbar uni.hideTabBar(); - // #ifdef APP-PLUS this.platform = uni.getSystemInfoSync().platform - console.log('操纵系统', this.platform) - // #endif }, computed: { ...mapState(['userInfo']) @@ -209,8 +219,6 @@ // 隐藏原生的tabbar uni.hideTabBar(); this.getData(); - this.getCourpe(); - }, components: { musicPlay @@ -222,6 +230,9 @@ if(!this.iosHide){ this.tab_muJian=1 } + var data = { + userId: this.userInfo.id, + }; // 用户详情 if (this.userInfo.id != undefined) { this.$http @@ -230,45 +241,29 @@ this.userMes = res.user }); } - - + uni.showLoading({ + title: '加载中' + }) // 充值记录 - this.$http - .post('book/transactiondetails/list?userId=' + this.userInfo.id + '&page=' + this.RecordScreen - .page + '&limit=' + this.RecordScreen.limit) - .then(res => { - this.MoneyRecord = res.page.list - this.totalPage = res.page.totalPage - this.totalCount = res.page.totalCount - }); - + $http + .request({ + url: 'common/transactionDetails/getTransactionDetailsList', + method: "POST", + data, + header: { + "Content-Type": "application/json", + }, + }) + .then((res) => { + uni.hideLoading(); + this.MoneyRecord = res.transactionDetailsList; + }); }, - - // 点击tab tab_click(e) { this.tab_muJian = e.index }, - - // 优惠券 - // getCourpe() { - // this.$http - // .post('/book/couponhistory/appGetUserCenterCoupon?userId=' + this.userInfo.id + '&useStatus=' + this - // .couponListTab) - // .then(res => { - // // this.cardList = res.couponVos - // this.cardList = res.couponVos - // }); - // }, - // 切换优惠券 - couponTabCLi(e) { - // this.couponListTab = e - // this.getCourpe() - }, - - - // 充值天医币 buPoint() { uni.navigateTo({ @@ -314,8 +309,7 @@ } .AC_con { - margin-top: 50rpx; - padding: 30rpx 30rpx; + padding: 20rpx; box-shadow: 0 0px 10px 1px #d3d1d133; background-color: #fff; border-radius: 15rpx; @@ -323,20 +317,17 @@ font-size: 30rpx; .AC_jilu { - font-size: 32rpx; - text-align: center; - margin-bottom: 30rpx; - - + font-size: 42rpx; + text-align: left; + color: $themeColor; + padding: 20rpx 0; } .AC_List { - border-bottom: 1px solid #eee; - padding: 40rpx 10rpx; + overflow: hidden; .AC_title { font-size: 32rpx; - margin-bottom: 20rpx; view { float: right; @@ -346,14 +337,21 @@ } .AC_mark { - font-size: 28rpx; - margin-bottom: 15rpx; - color: #888; + width: 100%; + font-size: 28rpx; + margin-top: 20rpx; + margin-bottom: 15rpx; + color: #888; + display: inline-block; + } + .AC_note { + color: #888; + font-size: 26rpx; } - .AC_time { color: #bababa; - font-size: 25rpx; + font-size: 26rpx; + display: inline-block; } } @@ -569,10 +567,28 @@ background: #c6c6c6; } } - - - - - + } + /deep/.u-alert__content__title{ + font-size: 24rpx !important; + line-height: 28rpx !important; + } + .AC_chong { + display: flex; + align-items: center; + justify-content: space-between; + background-image: linear-gradient(90deg, #54a966 0%, #a3d7ae 100%); + color: #fff; + border-top-left-radius: 15rpx; + border-top-right-radius: 15rpx; + padding: 20rpx 20rpx; + font-size: 36rpx; + font-weight: 800; + text-align: right; + } + .rightArrow { + width: 40rpx; + height: 40rpx; + float: right; + margin-left: 10rpx; } \ No newline at end of file diff --git a/pages/user/points.vue b/pages/user/points.vue new file mode 100644 index 0000000..ebcec05 --- /dev/null +++ b/pages/user/points.vue @@ -0,0 +1,429 @@ + + + + diff --git a/style/common.scss b/style/common.scss index aa35ce1..a45049c 100644 --- a/style/common.scss +++ b/style/common.scss @@ -27,6 +27,9 @@ button { button::after { border: none; } +.PM_font { + font-family: PangMenZhengDaoBiaoTiTiMianFeiBan; +} // 主题背景色 .themeBgColor { background-color: $themeColor;