提交 57768da5 编写于 作者: 杨广俊's avatar 杨广俊

__getUserInfo_CA

上级 3360d1a5
......@@ -43,6 +43,7 @@
</template>
<script>
import { mapGetters, mapActions } from 'vuex'
import {
Loadmore,
Spinner,
......@@ -51,6 +52,7 @@ import {
import GroupTitle from '@/components/business/group-title';
// import { setEventByModuleCode } from '@/utils/index'
// import LOADING from '../../components/common/loading-new';
export default {
data() {
return {
......@@ -95,19 +97,34 @@ export default {
type: Array,
default: () => []
},
},
mounted() {
},
created() {
window.__getUserInfo_CA = function(params){
_self.setUserInfo(params)
}
window.__refresh = function (parm) {
_this.getUserInfo();
}
},
mounted() {
},
computed: {
...mapGetters({
userInfo: 'userInfo'
})
},
components: {
GroupTitle
},
methods: {
...mapActions({
setUserInfo: 'setUserInfo'
}),
getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo_CA'})
},
//跳转
goToPage(item) {
this.pageBurialPoin({
......@@ -154,7 +171,6 @@ export default {
//滑动加载更多
loadMore() {
let _this = this;
if (_this.isReauestBack) {
......@@ -181,7 +197,7 @@ export default {
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
menuCode: 'm_search',
functionCode: 'f_recommend',
actionCode: 'c_collect',
labelId: id,
......@@ -189,22 +205,15 @@ export default {
})
let _this = this,
parm = {
token: _this.userToken,
token: _this.userInfo.userToken,
type: status,
courseId: id,
setEntry: 'headers',
data: {
token: _this.userToken,
}
}
/// alert(this.token)
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
//alert(res.message);
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
......
......@@ -15,6 +15,9 @@
</template>
<script>
import {
m_search_history_hot_search
} from '@/utils/buryingPoint'
import {
mapMutations
} from 'vuex'
......@@ -64,12 +67,10 @@ export default {
})
}
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_module',
actionCode: 'c_module',
...m_search_history_hot_search,
labelId: itemData.id,
labelValue: itemData.keyword,
createdTime: new Date().getTime()
})
},
searchAction(searchText) {
......
......@@ -6,7 +6,7 @@
<div class="teach-list">
<div :class="index % 2 == 1 ? 'list-item mr0' : 'list-item'"
v-for="(item, index) in cParamData" :key="index"
@click="goToDetail(item)">
@click="goToPage(item)">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.appImageUrl">
<span class="learn-p">{{item.joinNum}}人已学</span>
......@@ -27,6 +27,7 @@
<script>
import { mapGetters } from 'vuex'
import { jumpWebPageUrl } from '@/utils/index'
import { sortParmData } from '@/utils/index'
import {
......@@ -71,15 +72,6 @@ export default {
}
},
mounted() {
let _this = this
this.token = this.$route.query.userToken || this.$route.query.token
// this.getUserInfo()
// this.getData();
// window.__getUserInfo = function(parm){
// // alert('in __getUserInfo')
// _this.token = parm.userToken || _this.$route.query.token;
// this.getData();
// }
window.__refresh = function (parm) {
_this.getData();
}
......@@ -88,13 +80,14 @@ export default {
},
computed: {
...mapGetters({
cSearchText: 'cSearchText'
cSearchText: 'cSearchText',
userInfo: 'userInfo'
}),
cParamData() {
if (this.list && this.list.length) {
return this.list
return this.randomBg(this.list)
} else {
return this.parmData
return this.randomBg(this.parmData)
}
}
},
......@@ -113,27 +106,70 @@ export default {
__funcName: '__getUserInfo'
})
},
goToDetail(item) {
let _this = this;
this.$router.push({
path: '/details',
query: {
id: item.doctorId,
token: _this.token
//跳转
goToPage(item){
let _this = this,
url = '',action_code = '',label_id = '';
url = jumpWebPageUrl+'teachersDetail?id='+item.id+"&from=appHome&userToken="+ _this.userInfo.userToken
action_code = 'c_teacher';
label_id = item.id;
let itemData={
"title":"",
"imageUrl":"",
"appModuleInfo":{
"code":"M300",
"type":4,
"name":"wwww",
"paramFlag":1,
"paramList":[
{
"key":"pageUrl",
"value": url,
"type":4,
"seqNo":1
},{
"key":"showTitle",
"value": false,
"type":1,
"seqNo":2
},{
"key":"title",
"value": '',
"type":1,
"seqNo":3
}
]
}
};
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: itemData.appModuleInfo.paramList
})
this.pageBurialPoin({
...m_search_result_lecturer_detail,
labelValue: item.name,
createdTime: new Date().getTime(),
labelId: label_id,
labelValue :item.name,
createdTime: new Date().getTime()
})
},
//排序
sortFun() {
this.dir = this.dir == 1 ? 2 : 1;
this.getData()
},
// goToDetail(item) {
// let _this = this;
// this.$router.push({
// path: '/details',
// query: {
// id: item.doctorId,
// token: _this.token
// }
// })
// this.pageBurialPoin({
// ...m_search_result_lecturer_detail,
// labelValue: item.name,
// createdTime: new Date().getTime(),
// })
// },
randomBg(d) {
for (let i = 0; i < d.length; i++) {
......@@ -147,28 +183,9 @@ export default {
d[i].bgColor = '#F6EFE6'
}
}
/// console.log(d);
return d
},
getData() {
let _this = this,
para = {
token: _this.token,
setEntry: 'headers'
}
let url = 'contents/courseDoctor/getAllTeacher/orderby/' + _this.col + '/dir/' + _this.dir
this.GET(url, para).then(res => {
if (res.code == '000000') {
_this.list = res.data.teacherList || [];
_this.followCount = res.data.followCount || 0;
_this.studyCount = res.data.studyCount || 0;
if (_this.list.length > 0) {
_this.randomBg(_this.list);
}
}
})
},
orderAction(orderIndex) {
this.pageBurialPoin({
...m_search_result_lecturer_order,
......
......@@ -87,21 +87,25 @@ export function jumpEvaluatPage(){
// const baseUrl = 'https://dev-sc.yunqueyi.com/'
// const apiUrl = 'https://dev-api.yunqueyi.com/'
// const evaluatPageUrl = 'https://dev-phome.yunqueyi.com/gpr/#/home'
// export const jumpWebPageUrl = 'https://dev-phome.yunqueyi.com/appl/#/'
// test1地址
const baseUrl = 'https://test1-sc.yunqueyi.com/'
const apiUrl = 'https://test1-api.yunqueyi.com/'
const evaluatPageUrl = 'https://test1-phome.yunqueyi.com/gpr/#/home'
export const jumpWebPageUrl = 'https://test1-phome.yunqueyi.com/appl/#/'
// // uat地址
// const baseUrl = 'https://uat-sc.yunqueyi.com/'
// const apiUrl = 'https://uat-api.yunqueyi.com/'
// const evaluatPageUrl = 'https://uat-phome.yunqueyi.com/gpr/#/home'
// export const jumpWebPageUrl = 'https://uat-phome.yunqueyi.com/appl/#/'
// // pro地址
// const baseUrl = 'https://sc.yunqueyi.com/'
// const apiUrl = 'https://api.yunqueyi.com/'
// const evaluatPageUrl = 'https://phome.yunqueyi.com/gpr/#/home'
// export const jumpWebPageUrl = 'https://phome.yunqueyi.com/appl/#/'
// 为每个URL添加应用校验密钥
......
......@@ -11,7 +11,10 @@
__getUserInfo(n);
}
if(t == '__getUserInfo_S'){
__getUserInfo_S(n);
__getUserInfo_S(n)
}
if(t == '__getUserInfo_CA'){
__getUserInfo_CA(n)
}
if(t == '__getStatusBarHeight'){
__getStatusBarHeight(n);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册