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

__getUserInfo_CA

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