mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-13 12:56:46 +08:00
Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/mobile into online
This commit is contained in:
@@ -289,21 +289,25 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkHas(){
|
checkHas(){
|
||||||
if(this.type>0){
|
if(this.type>0 && this.data.id){
|
||||||
apiPraises.has(this.type,this.data.id).then(rs=>{
|
if(this.praises){
|
||||||
if(rs.status==200 && rs.result){
|
apiPraises.has(this.type,this.data.id).then(rs=>{
|
||||||
this.isPraise=true;
|
if(rs.status==200 && rs.result){
|
||||||
}else{
|
this.isPraise=true;
|
||||||
this.isPraise=false;
|
}else{
|
||||||
}
|
this.isPraise=false;
|
||||||
});
|
}
|
||||||
apiFavorites.has(this.type,this.data.id).then(rs=>{
|
});
|
||||||
if(rs.status==200 && rs.result){
|
}
|
||||||
this.isFavorite=true;
|
if(this.favorites){
|
||||||
}else{
|
apiFavorites.has(this.type,this.data.id).then(rs=>{
|
||||||
this.isFavorite=false;
|
if(rs.status==200 && rs.result){
|
||||||
}
|
this.isFavorite=true;
|
||||||
})
|
}else{
|
||||||
|
this.isFavorite=false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submit(){
|
submit(){
|
||||||
|
|||||||
@@ -9,10 +9,23 @@ let fileUrl='';
|
|||||||
let version=1;
|
let version=1;
|
||||||
|
|
||||||
if(process.env.NODE_ENV === 'development'){
|
if(process.env.NODE_ENV === 'development'){
|
||||||
|
//本地开发环境
|
||||||
apiBaseUrl = '/systemapi';
|
apiBaseUrl = '/systemapi';
|
||||||
oldApiBaseUrl = '/uboeApi';
|
oldApiBaseUrl = '/uboeApi';
|
||||||
fileUrl = 'http://localhost:9090/cdn/upload';
|
fileUrl = 'http://localhost:9090/cdn/upload';
|
||||||
loginPath='/pages/login/login';
|
loginPath='/pages/login/login';
|
||||||
|
}else if(process.env.NODE_ENV === 'preview'){
|
||||||
|
// 预发布环境,当前配置未使用上
|
||||||
|
apiBaseUrl = '/systemapi';
|
||||||
|
oldApiBaseUrl = '/uboeApi';
|
||||||
|
fileUrl = 'https://u-pre.boe.com/upload';
|
||||||
|
loginPath='https://u-pre.boe.com/m/preview';
|
||||||
|
}else if(process.env.NODE_ENV === 'testing'){
|
||||||
|
// 测试环境
|
||||||
|
apiBaseUrl = '/systemapi';
|
||||||
|
oldApiBaseUrl = '/uboeApi';
|
||||||
|
fileUrl = 'https://u-pre.boe.com/upload';
|
||||||
|
loginPath='https://u-pre.boe.com/m/testing';
|
||||||
}else{
|
}else{
|
||||||
// 生产环境
|
// 生产环境
|
||||||
apiBaseUrl = '/systemapi';
|
apiBaseUrl = '/systemapi';
|
||||||
|
|||||||
42
package.json
Normal file
42
package.json
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"name": "mobile",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "移动端代码",
|
||||||
|
"main": "main.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/mobile.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"uni-app": {
|
||||||
|
"scripts": {
|
||||||
|
"h5:testing": {
|
||||||
|
"BROWSER": "Chrome",
|
||||||
|
"title": "build:testing",
|
||||||
|
"env": {
|
||||||
|
"UNI_PLATFORM": "h5",
|
||||||
|
"ENV_TYPE": "testing"
|
||||||
|
},
|
||||||
|
"define": {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"h5:preview": {
|
||||||
|
"BROWSER": "Chrome",
|
||||||
|
"title": "build:preview",
|
||||||
|
"env": {
|
||||||
|
"UNI_PLATFORM": "h5",
|
||||||
|
"ENV_TYPE": "preview"
|
||||||
|
},
|
||||||
|
"define": {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -196,6 +196,15 @@
|
|||||||
<view >
|
<view >
|
||||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
|
<u-overlay :show="signInShow">
|
||||||
|
<view style="padding-top: 180upx;">
|
||||||
|
<view style="margin-top: 180upx;width:624upx;margin: 0px auto;position: relative;">
|
||||||
|
<img usemap="#HotMap" src="/mobile/static/images/dlg.png" style="width:624upx;height: 864upx;">
|
||||||
|
<text @click="signInShow=false" style="position: absolute;right: 15upx;top: 0upx;color: #ffffff;font-size: 40px;">×</text>
|
||||||
|
<mapelement></mapelement>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-overlay>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -216,6 +225,8 @@
|
|||||||
noPageList: true,//判断接口是否还有数据
|
noPageList: true,//判断接口是否还有数据
|
||||||
noDataList: true,//判断接口是否还有数据
|
noDataList: true,//判断接口是否还有数据
|
||||||
msgNum:0,
|
msgNum:0,
|
||||||
|
signInShow:false,
|
||||||
|
signLocalTimesKey:'xboe_sign_dlg_times',
|
||||||
courseList:[],//课程列表数据
|
courseList:[],//课程列表数据
|
||||||
articleList: [],//文章列表数据
|
articleList: [],//文章列表数据
|
||||||
qaList: [],//问答列表数据
|
qaList: [],//问答列表数据
|
||||||
@@ -274,13 +285,71 @@
|
|||||||
//this.$watermark.set('');
|
//this.$watermark.set('');
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
this.countNoReadMsg();
|
this.countNoReadMsg();
|
||||||
},
|
},
|
||||||
|
components:{
|
||||||
|
'mapelement': {
|
||||||
|
render: function(createElement) {
|
||||||
|
|
||||||
|
var pElem1 = createElement('area', {
|
||||||
|
attrs:{
|
||||||
|
shape: "circle",
|
||||||
|
coords: "280,30,30",
|
||||||
|
href:"javascript:;",
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
click: function() {
|
||||||
|
//$this.signInShow=false;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var pElem2 = createElement('area', {
|
||||||
|
attrs:{
|
||||||
|
shape: "rectangle",
|
||||||
|
coords: "30,300,400,400",
|
||||||
|
href:"https://boehrsurvey.wjx.cn/vm/PmreuFN.aspx",
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return createElement('map', {attrs: {
|
||||||
|
name: "HotMap",
|
||||||
|
id: "HotMap"
|
||||||
|
}},[
|
||||||
|
pElem2 //想要添加更多area,可在数组中继续添加。如[pElem1,pElem2,…]
|
||||||
|
])
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
//控制弹出窗口的代码
|
||||||
|
let now = new Date() //当前时间
|
||||||
|
let end = new Date('2022/06/29 00:00:00') //对比时间
|
||||||
|
if(now.getTime() < end.getTime()){
|
||||||
|
let times = uni.getStorageSync(this.signLocalTimesKey);
|
||||||
|
let isNewLogin=uni.getStorageSync("boe_new_login");
|
||||||
|
//let isNewLogin='1';
|
||||||
|
if(isNewLogin && isNewLogin=='1'){
|
||||||
|
if(!times){
|
||||||
|
this.signInShow = true;//显示
|
||||||
|
uni.setStorageSync(this.signLocalTimesKey,1);
|
||||||
|
}else{
|
||||||
|
//console.log(times,'times');
|
||||||
|
let intTimes=parseInt(times);
|
||||||
|
if(intTimes<3){
|
||||||
|
this.signInShow = true;//显示
|
||||||
|
intTimes++;
|
||||||
|
uni.setStorageSync(this.signLocalTimesKey,intTimes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uni.setStorageSync("boe_new_login",0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
this.findCourseData();
|
this.findCourseData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
closeSignDlg(){
|
||||||
|
this.signInShow=false;
|
||||||
|
},
|
||||||
toNewLink(){
|
toNewLink(){
|
||||||
location.href='https://m.qingxuetang.com/x/?appId=qxtcorp306130';
|
location.href='https://m.qingxuetang.com/x/?appId=qxtcorp306130';
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
// uni.switchTab({
|
// uni.switchTab({
|
||||||
// url:'/pages/index/index'
|
// url:'/pages/index/index'
|
||||||
// })
|
// })
|
||||||
|
uni.setStorageSync("boe_new_login",1);//记录新登录
|
||||||
let openUrl=$this.toUrl;
|
let openUrl=$this.toUrl;
|
||||||
if(openUrl){
|
if(openUrl){
|
||||||
if(openUrl.startsWith('http')){
|
if(openUrl.startsWith('http')){
|
||||||
|
|||||||
@@ -52,6 +52,9 @@
|
|||||||
$this.loading = false;
|
$this.loading = false;
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
//console.log(rs);
|
//console.log(rs);
|
||||||
|
//记录已登录
|
||||||
|
uni.setStorageSync("boe_new_login",1);
|
||||||
|
|
||||||
$this.$store.dispatch("InitData").then(res => {
|
$this.$store.dispatch("InitData").then(res => {
|
||||||
//console.log(res)
|
//console.log(res)
|
||||||
//$this.$watermark.set(res.result.name + res.result.loginName);
|
//$this.$watermark.set(res.result.name + res.result.loginName);
|
||||||
|
|||||||
@@ -400,25 +400,25 @@
|
|||||||
this.loadBoeData(true);
|
this.loadBoeData(true);
|
||||||
// this.getLearning(); //这里应该是切换时再调用
|
// this.getLearning(); //这里应该是切换时再调用
|
||||||
//检查是否显示弹窗
|
//检查是否显示弹窗
|
||||||
let curTime = new Date();
|
// let curTime = new Date();
|
||||||
curTime = parseInt(curTime.getTime() / 1000);
|
// curTime = parseInt(curTime.getTime() / 1000);
|
||||||
//console.log(curTime,'curTime');
|
// //console.log(curTime,'curTime');
|
||||||
let hasDlgTime = uni.getStorageSync('user_dlg_temp');
|
// let hasDlgTime = uni.getStorageSync('user_dlg_temp');
|
||||||
if (hasDlgTime) {
|
// if (hasDlgTime) {
|
||||||
let lastTime = parseInt(hasDlgTime);
|
// let lastTime = parseInt(hasDlgTime);
|
||||||
//console.log(lastTime,'lastTime2');
|
// //console.log(lastTime,'lastTime2');
|
||||||
if (curTime > (lastTime + 24 * 60 * 60)) {
|
// if (curTime > (lastTime + 24 * 60 * 60)) {
|
||||||
this.xuanShow = true;
|
// this.xuanShow = true;
|
||||||
//console.log('显示');
|
// //console.log('显示');
|
||||||
uni.setStorageSync('user_dlg_temp', curTime);
|
// uni.setStorageSync('user_dlg_temp', curTime);
|
||||||
} else {
|
// } else {
|
||||||
this.xuanShow = false;
|
// this.xuanShow = false;
|
||||||
this.showOneStady();
|
// this.showOneStady();
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
this.xuanShow = true;
|
// this.xuanShow = true;
|
||||||
uni.setStorageSync('user_dlg_temp', curTime);
|
// uni.setStorageSync('user_dlg_temp', curTime);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
let $this = this;
|
let $this = this;
|
||||||
|
|||||||
BIN
static/images/dlg.png
Normal file
BIN
static/images/dlg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 309 KiB |
Reference in New Issue
Block a user