Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/mobile into online

This commit is contained in:
dongruihua
2022-06-21 11:39:32 +08:00
8 changed files with 168 additions and 36 deletions

View File

@@ -289,21 +289,25 @@ export default {
})
},
checkHas(){
if(this.type>0){
apiPraises.has(this.type,this.data.id).then(rs=>{
if(rs.status==200 && rs.result){
this.isPraise=true;
}else{
this.isPraise=false;
}
});
apiFavorites.has(this.type,this.data.id).then(rs=>{
if(rs.status==200 && rs.result){
this.isFavorite=true;
}else{
this.isFavorite=false;
}
})
if(this.type>0 && this.data.id){
if(this.praises){
apiPraises.has(this.type,this.data.id).then(rs=>{
if(rs.status==200 && rs.result){
this.isPraise=true;
}else{
this.isPraise=false;
}
});
}
if(this.favorites){
apiFavorites.has(this.type,this.data.id).then(rs=>{
if(rs.status==200 && rs.result){
this.isFavorite=true;
}else{
this.isFavorite=false;
}
})
}
}
},
submit(){

View File

@@ -9,10 +9,23 @@ let fileUrl='';
let version=1;
if(process.env.NODE_ENV === 'development'){
//本地开发环境
apiBaseUrl = '/systemapi';
oldApiBaseUrl = '/uboeApi';
fileUrl = 'http://localhost:9090/cdn/upload';
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{
// 生产环境
apiBaseUrl = '/systemapi';

42
package.json Normal file
View 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": {
}
}
}
}
}

View File

@@ -196,6 +196,15 @@
<view >
<uni-load-more :status="loadStatus"></uni-load-more>
</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>
</template>
<script>
@@ -216,6 +225,8 @@
noPageList: true,//判断接口是否还有数据
noDataList: true,//判断接口是否还有数据
msgNum:0,
signInShow:false,
signLocalTimesKey:'xboe_sign_dlg_times',
courseList:[],//课程列表数据
articleList: [],//文章列表数据
qaList: [],//问答列表数据
@@ -274,13 +285,71 @@
//this.$watermark.set('');
},
onShow() {
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() {
//控制弹出窗口的代码
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();
},
methods: {
methods: {
closeSignDlg(){
this.signInShow=false;
},
toNewLink(){
location.href='https://m.qingxuetang.com/x/?appId=qxtcorp306130';
},

View File

@@ -40,6 +40,7 @@
// uni.switchTab({
// url:'/pages/index/index'
// })
uni.setStorageSync("boe_new_login",1);//记录新登录
let openUrl=$this.toUrl;
if(openUrl){
if(openUrl.startsWith('http')){

View File

@@ -52,6 +52,9 @@
$this.loading = false;
if(rs.status==200){
//console.log(rs);
//记录已登录
uni.setStorageSync("boe_new_login",1);
$this.$store.dispatch("InitData").then(res => {
//console.log(res)
//$this.$watermark.set(res.result.name + res.result.loginName);

View File

@@ -400,25 +400,25 @@
this.loadBoeData(true);
// this.getLearning(); //这里应该是切换时再调用
//检查是否显示弹窗
let curTime = new Date();
curTime = parseInt(curTime.getTime() / 1000);
//console.log(curTime,'curTime');
let hasDlgTime = uni.getStorageSync('user_dlg_temp');
if (hasDlgTime) {
let lastTime = parseInt(hasDlgTime);
//console.log(lastTime,'lastTime2');
if (curTime > (lastTime + 24 * 60 * 60)) {
this.xuanShow = true;
//console.log('显示');
uni.setStorageSync('user_dlg_temp', curTime);
} else {
this.xuanShow = false;
this.showOneStady();
}
} else {
this.xuanShow = true;
uni.setStorageSync('user_dlg_temp', curTime);
}
// let curTime = new Date();
// curTime = parseInt(curTime.getTime() / 1000);
// //console.log(curTime,'curTime');
// let hasDlgTime = uni.getStorageSync('user_dlg_temp');
// if (hasDlgTime) {
// let lastTime = parseInt(hasDlgTime);
// //console.log(lastTime,'lastTime2');
// if (curTime > (lastTime + 24 * 60 * 60)) {
// this.xuanShow = true;
// //console.log('显示');
// uni.setStorageSync('user_dlg_temp', curTime);
// } else {
// this.xuanShow = false;
// this.showOneStady();
// }
// } else {
// this.xuanShow = true;
// uni.setStorageSync('user_dlg_temp', curTime);
// }
let $this = this;

BIN
static/images/dlg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB