Compare commits

...

3 Commits
applet ... main

Author SHA1 Message Date
qsh 657f237b9f sc 2 weeks ago
qsh 4c65fb9bce sc 2 weeks ago
qsh 67cca9687e sc 3 weeks ago
  1. 6
      .env.production
  2. 12
      src/jtools/store/user.js
  3. 12
      src/manifest.json
  4. 12
      src/pages.json
  5. 21
      src/pages/course/detail.vue

@ -5,10 +5,10 @@ VITE_APP_TITLE = 耕读社
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
#开发环境 #开发环境
VITE_APP_BASE_API = 'https://xj.ahduima.com/' VITE_APP_BASE_API = 'https://cloud.ahduima.com/'
# #
VITE_WEB_BASE_URL = 'https://xj.ahduima.com' VITE_WEB_BASE_URL = 'https://cloud.ahduima.com'
# 资源地址 # 资源地址
VITE_UPLOAD_URL = 'http://huodong.ahduima.com' VITE_UPLOAD_URL = 'https://cloud.ahduima.com'

@ -1,7 +1,6 @@
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import { login, getInfo } from '@/jtools/api/login'; import { login, getInfo } from '@/jtools/api/login';
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
import { queryUserMember } from '@/jtools/api/user';
const useUserStore = defineStore({ const useUserStore = defineStore({
id: 'user', id: 'user',
@ -26,7 +25,6 @@ const useUserStore = defineStore({
this.isLogin = true; this.isLogin = true;
this.token = resp.data.token; this.token = resp.data.token;
this.userInfo = resp.data; this.userInfo = resp.data;
this.searchVip()
storage.set('isLogin', true); storage.set('isLogin', true);
storage.set('token', resp.data.token); storage.set('token', resp.data.token);
storage.set('userInfo', resp.data); storage.set('userInfo', resp.data);
@ -62,20 +60,10 @@ const useUserStore = defineStore({
getInfo().then(resp => { getInfo().then(resp => {
if (resp.code == '0000') { if (resp.code == '0000') {
this.userInfo = resp.data; this.userInfo = resp.data;
this.searchVip()
storage.set('userInfo', resp.data); storage.set('userInfo', resp.data);
} }
}); });
}, },
searchVip() {
queryUserMember({ userId: this.userInfo.userId }).then(resp => {
if (resp.code == '0000') {
// this.vipInfo = resp.data;
console.log(resp);
}
});
},
setUserInfo(info) { setUserInfo(info) {
this.userInfo = info; this.userInfo = info;
}, },

@ -2,7 +2,7 @@
"name": "耕读社", "name": "耕读社",
"appid": "__UNI__59447F7", "appid": "__UNI__59447F7",
"description": "", "description": "",
"versionName": "1.0.2", "versionName": "1.0.1",
"versionCode": "100", "versionCode": "100",
"transformPx": false, "transformPx": false,
"app-plus": { "app-plus": {
@ -41,6 +41,14 @@
} }
}, },
"quickapp": {}, "quickapp": {},
"h5": {
"title": "耕读社",
"base": "/gds/",
"router": {
"mode": "history",
"base": "/gds/"
}
},
"mp-weixin": { "mp-weixin": {
"appid": "wx0668c6fabb1a9c44", "appid": "wx0668c6fabb1a9c44",
"setting": { "setting": {
@ -77,4 +85,4 @@
"vueVersion": "3", "vueVersion": "3",
"fallbackLocale": "zh-Hans", "fallbackLocale": "zh-Hans",
"locale": "zh-Hans" "locale": "zh-Hans"
} }

@ -9,12 +9,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/choseCity/choseCity",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/me/index", "path": "pages/me/index",
"style": { "style": {
@ -51,12 +45,6 @@
"navigationBarTitleText": "我的收藏" "navigationBarTitleText": "我的收藏"
} }
}, },
{
"path": "pages/me/look",
"style": {
"navigationBarTitleText": "我的关注"
}
},
{ {
"path": "pages/me/login", "path": "pages/me/login",
"style": { "style": {

@ -1,6 +1,13 @@
<template> <template>
<view class="bc-fff p10 relative"> <view class="bc-fff p10 relative">
<u-parse :content="chapterInfo.content"></u-parse> <u-parse :content="chapterInfo.content"></u-parse>
<u-overlay :show="showMask" opacity="0.75">
<view class="p20 flex ai-c jc-c fld-c hp100" @tap="toMe" @scroll0.stop>
<u-icon name="lock" size="60" color="#999"></u-icon>
<view class="fs18 cor-999 mt20">请开通会员后继续学习</view>
<view class="fs14 cor-999 mt10">前往我的联系客服开通会员</view>
</view>
</u-overlay>
<!-- 右下角点赞收藏 --> <!-- 右下角点赞收藏 -->
<view class="btns"> <view class="btns">
<view class="btn"> <view class="btn">
@ -27,8 +34,9 @@
chapterInfo: { chapterInfo: {
content: "", content: "",
goodCount: 0, goodCount: 0,
collectCount: 0 collectCount: 0,
}, },
showMask: false
} }
}, },
onLoad(op) { onLoad(op) {
@ -44,6 +52,9 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: res.data.chapterIndex title: res.data.chapterIndex
}); });
if(!_this.userInfo.memberInfo && !_this.showMask && !res.data.isFree) {
_this.showMask = true;
}
} }
}); });
} catch (error) { } catch (error) {
@ -74,6 +85,12 @@
}); });
} }
}); });
},
toMe() {
uni.switchTab({
url: '/pages/me/index'
});
this.showMask = false;
} }
} }
} }
@ -98,7 +115,7 @@
padding: 5px; padding: 5px;
border: 1px solid #333; border: 1px solid #333;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
opacity: 0.6; opacity: 0.7;
} }
} }
</style> </style>
Loading…
Cancel
Save