提交 b0b04a40 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-compliance-0708' into 'release'

中华医学会合规改造  code reviewer:杨广俊

中华医学会合规改造  code reviewer:杨广俊

See merge request !14
...@@ -692,15 +692,13 @@ ...@@ -692,15 +692,13 @@
"version": "0.3.2", "version": "0.3.2",
"resolved": "http://192.168.110.93:4873/array-unique/-/array-unique-0.3.2.tgz", "resolved": "http://192.168.110.93:4873/array-unique/-/array-unique-0.3.2.tgz",
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
"dev": true, "dev": true
"optional": true
}, },
"braces": { "braces": {
"version": "2.3.2", "version": "2.3.2",
"resolved": "http://192.168.110.93:4873/braces/-/braces-2.3.2.tgz", "resolved": "http://192.168.110.93:4873/braces/-/braces-2.3.2.tgz",
"integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"arr-flatten": "^1.1.0", "arr-flatten": "^1.1.0",
"array-unique": "^0.3.2", "array-unique": "^0.3.2",
...@@ -719,7 +717,6 @@ ...@@ -719,7 +717,6 @@
"resolved": "http://192.168.110.93:4873/extend-shallow/-/extend-shallow-2.0.1.tgz", "resolved": "http://192.168.110.93:4873/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"is-extendable": "^0.1.0" "is-extendable": "^0.1.0"
} }
...@@ -902,7 +899,6 @@ ...@@ -902,7 +899,6 @@
"resolved": "http://192.168.110.93:4873/fill-range/-/fill-range-4.0.0.tgz", "resolved": "http://192.168.110.93:4873/fill-range/-/fill-range-4.0.0.tgz",
"integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"extend-shallow": "^2.0.1", "extend-shallow": "^2.0.1",
"is-number": "^3.0.0", "is-number": "^3.0.0",
...@@ -915,7 +911,6 @@ ...@@ -915,7 +911,6 @@
"resolved": "http://192.168.110.93:4873/extend-shallow/-/extend-shallow-2.0.1.tgz", "resolved": "http://192.168.110.93:4873/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"is-extendable": "^0.1.0" "is-extendable": "^0.1.0"
} }
...@@ -942,8 +937,7 @@ ...@@ -942,8 +937,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -964,14 +958,12 @@ ...@@ -964,14 +958,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -986,20 +978,17 @@ ...@@ -986,20 +978,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -1116,8 +1105,7 @@ ...@@ -1116,8 +1105,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -1129,7 +1117,6 @@ ...@@ -1129,7 +1117,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -1144,7 +1131,6 @@ ...@@ -1144,7 +1131,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -1152,14 +1138,12 @@ ...@@ -1152,14 +1138,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -1178,7 +1162,6 @@ ...@@ -1178,7 +1162,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -1259,8 +1242,7 @@ ...@@ -1259,8 +1242,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -1272,7 +1254,6 @@ ...@@ -1272,7 +1254,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -1358,8 +1339,7 @@ ...@@ -1358,8 +1339,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -1395,7 +1375,6 @@ ...@@ -1395,7 +1375,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -1415,7 +1394,6 @@ ...@@ -1415,7 +1394,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -1459,14 +1437,12 @@ ...@@ -1459,14 +1437,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -1540,7 +1516,6 @@ ...@@ -1540,7 +1516,6 @@
"resolved": "http://192.168.110.93:4873/is-number/-/is-number-3.0.0.tgz", "resolved": "http://192.168.110.93:4873/is-number/-/is-number-3.0.0.tgz",
"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"kind-of": "^3.0.2" "kind-of": "^3.0.2"
}, },
...@@ -1550,7 +1525,6 @@ ...@@ -1550,7 +1525,6 @@
"resolved": "http://192.168.110.93:4873/kind-of/-/kind-of-3.2.2.tgz", "resolved": "http://192.168.110.93:4873/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"is-buffer": "^1.1.5" "is-buffer": "^1.1.5"
} }
...@@ -1561,15 +1535,13 @@ ...@@ -1561,15 +1535,13 @@
"version": "3.0.1", "version": "3.0.1",
"resolved": "http://192.168.110.93:4873/isobject/-/isobject-3.0.1.tgz", "resolved": "http://192.168.110.93:4873/isobject/-/isobject-3.0.1.tgz",
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
"dev": true, "dev": true
"optional": true
}, },
"kind-of": { "kind-of": {
"version": "6.0.2", "version": "6.0.2",
"resolved": "http://192.168.110.93:4873/kind-of/-/kind-of-6.0.2.tgz", "resolved": "http://192.168.110.93:4873/kind-of/-/kind-of-6.0.2.tgz",
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"dev": true, "dev": true
"optional": true
}, },
"micromatch": { "micromatch": {
"version": "3.1.10", "version": "3.1.10",
...@@ -2395,7 +2367,6 @@ ...@@ -2395,7 +2367,6 @@
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"hoek": "2.x.x" "hoek": "2.x.x"
} }
...@@ -3885,8 +3856,7 @@ ...@@ -3885,8 +3856,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -3907,14 +3877,12 @@ ...@@ -3907,14 +3877,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -3929,20 +3897,17 @@ ...@@ -3929,20 +3897,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -4059,8 +4024,7 @@ ...@@ -4059,8 +4024,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -4072,7 +4036,6 @@ ...@@ -4072,7 +4036,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -4087,7 +4050,6 @@ ...@@ -4087,7 +4050,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -4095,14 +4057,12 @@ ...@@ -4095,14 +4057,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -4121,7 +4081,6 @@ ...@@ -4121,7 +4081,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -4202,8 +4161,7 @@ ...@@ -4202,8 +4161,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -4215,7 +4173,6 @@ ...@@ -4215,7 +4173,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -4301,8 +4258,7 @@ ...@@ -4301,8 +4258,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -4338,7 +4294,6 @@ ...@@ -4338,7 +4294,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -4358,7 +4313,6 @@ ...@@ -4358,7 +4313,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -4402,14 +4356,12 @@ ...@@ -4402,14 +4356,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -4767,8 +4719,7 @@ ...@@ -4767,8 +4719,7 @@
"version": "2.16.3", "version": "2.16.3",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
"dev": true, "dev": true
"optional": true
}, },
"home-or-tmp": { "home-or-tmp": {
"version": "2.0.0", "version": "2.0.0",
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<article @click.stop="deleteFlow()" class="cell-container"> <article @click.stop="deleteFlow()" class="cell-container">
<span class="" v-for="(item, index) in portalModule.contentList" :key="index"> <span class="" v-for="(item, index) in portalModule.contentList" :key="index">
<div v-if="index > 0 && portalModule.contentList[index].templetId!= portalModule.contentList[index-1].templetId" class="bottom-line"></div> <div v-if="index > 0 && portalModule.contentList[index].templetId!= portalModule.contentList[index-1].templetId" class="bottom-line"></div>
<div class="cell-container-item" @click="gotoExamOrCourse(item)" > <div class="cell-container-item" >
<div class="name"> <div class="name">
<div class="name-img"> <div class="name-img">
<img v-if="item.type == 1 && item.useFlag == 1" class="img-icon" src="../../images/exam.png"> <img v-if="item.type == 1 && item.useFlag == 1" class="img-icon" src="../../images/exam.png">
...@@ -29,26 +29,17 @@ ...@@ -29,26 +29,17 @@
<img v-if="item.type == 2 && item.useFlag == 1" class="img-icon" src="../../images/learn.png"> <img v-if="item.type == 2 && item.useFlag == 1" class="img-icon" src="../../images/learn.png">
<img v-if="item.type == 2 && item.useFlag == 2" class="img-icon" src="../../images/learn-dark.png"> <img v-if="item.type == 2 && item.useFlag == 2" class="img-icon" src="../../images/learn-dark.png">
</div> </div>
<!-- <div class="name-logo" :class="{'name-learn': item.type == 2, 'name-logo-no': item.useFlag == 2}" >
{{item.type | contentType}}
</div> -->
<p class="name-title" :class="{'name-title-no': item.useFlag == 2}">{{item.name | shortName(30)}}</p> <p class="name-title" :class="{'name-title-no': item.useFlag == 2}">{{item.name | shortName(30)}}</p>
<!-- <span v-if="item.certificateFlag !== 2 && index == 0">
<img class="cert-img" src="../../images/has-owner-cert.png">
</span> -->
</div> </div>
<!-- 'bg-13': item.status == 13 -->
<span <span
@click="gotoExamOrCourse(item)"
v-show="hasBindCard"
class="text-action" class="text-action"
:class="{'text-action-no': item.useFlag == 2}" :class="{'text-action-no': item.useFlag == 2}"
> >
<!-- <img v-show="item.status == 13" class="text-action-dh" src="../../images/icon-dh.png"> -->
{{getActionText(item.status)}} {{getActionText(item.status)}}
</span> </span>
<!-- <div class="connect-line" <img @click="toastToBuy" class="key" v-show="!hasBindCard" src="../../images/cme/phrase2/key.png" alt="">
:class="{'len1': item.height === 1, 'len2': item.height === '1','len3': item.height === 2, 'len4': item.height === '2', 'line-complete': index+1 < portalModule.contentList.length && portalModule.contentList[index+1].useFlag == 1}"
v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId">
</div> -->
<div class="foot-line" <div class="foot-line"
v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId"> v-if="index+1 < portalModule.contentList.length && portalModule.contentList[index].templetId == portalModule.contentList[index+1].templetId">
</div> </div>
...@@ -60,12 +51,7 @@ ...@@ -60,12 +51,7 @@
</article> </article>
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
<!-- <Toast ref="toastTitle"></Toast> -->
<!-- <div v-if="index+1 < projectComponent.length" class="line-component"></div> -->
</div> </div>
<!-- <NoMoreContent v-if="detailNum > 9" /> -->
<!-- <NoMoreContent />
<div v-if="detailNum <= 9" class="no-more-bottom"></div> -->
<van-dialog <van-dialog
v-model="dialogState" v-model="dialogState"
title="标题" title="标题"
...@@ -75,11 +61,9 @@ ...@@ -75,11 +61,9 @@
</template> </template>
<script> <script>
// import CommonTitle from "@/components/common/common-title";
import MergeTitle from "@/components/business/merge-title"; import MergeTitle from "@/components/business/merge-title";
import NoMoreContent from "@/components/business/no-more-content"; import NoMoreContent from "@/components/business/no-more-content";
import CertShow from "@/components/business/cert-show"; import CertShow from "@/components/business/cert-show";
// import Toast from "@/components/common/common-toast";
import { Collapse, CollapseItem, Dialog, Toast } from 'vant'; import { Collapse, CollapseItem, Dialog, Toast } from 'vant';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { getAppVersion } from "@/utils"; import { getAppVersion } from "@/utils";
...@@ -114,14 +98,10 @@ export default { ...@@ -114,14 +98,10 @@ export default {
}; };
}, },
props: { props: {
// moduleName: { hasBindCard: {
// type: String, type: Boolean,
// default: "" default: false
// }, },
// paramData: {
// type: Array,
// default: () => []
// },
projectComponent: { projectComponent: {
type: Array, type: Array,
default: () => [] default: () => []
...@@ -144,10 +124,8 @@ export default { ...@@ -144,10 +124,8 @@ export default {
}, },
components: { components: {
MergeTitle, MergeTitle,
// CommonTitle,
CertShow, CertShow,
NoMoreContent, NoMoreContent,
// Toast,
Dialog, Dialog,
}, },
watch:{ watch:{
...@@ -200,7 +178,6 @@ export default { ...@@ -200,7 +178,6 @@ export default {
paramList = [ paramList = [
{ {
key: "className", key: "className",
// value: "com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController",
value: "com.picahealth.yunque.activitys.courseplaynew.MyTcPlayVideoActivity###CourseMultiMediaPlayController", value: "com.picahealth.yunque.activitys.courseplaynew.MyTcPlayVideoActivity###CourseMultiMediaPlayController",
type: 4, type: 4,
seqNo: 1 seqNo: 1
...@@ -281,6 +258,11 @@ export default { ...@@ -281,6 +258,11 @@ export default {
console.log('item',item); console.log('item',item);
Toast('尚未开始,敬请期待'); Toast('尚未开始,敬请期待');
} }
},
// 弹框提示
toastToBuy() {
Toast('购买后可学习课程');
} }
} }
}; };
...@@ -423,17 +405,11 @@ export default { ...@@ -423,17 +405,11 @@ export default {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
// margin: px2rem(6px) px2rem(0px);
// height: px2rem(51px);
margin-bottom: px2rem(39px); margin-bottom: px2rem(39px);
line-height: px2rem(51px); line-height: px2rem(51px);
font-size: px2rem(15px); font-size: px2rem(15px);
// padding: px2rem(0px) px2rem(15px);
// background: rgba(248, 249, 250, 1);
// border-bottom: 1px solid #f0f0f0;
// border-radius: px2rem(6px);
justify-content: space-between; justify-content: space-between;
// align-items: center; align-items: center;
.name { .name {
.name-img { .name-img {
position: relative; position: relative;
...@@ -558,6 +534,10 @@ export default { ...@@ -558,6 +534,10 @@ export default {
color: #c7c8c9; color: #c7c8c9;
} }
} }
.key {
width: px2rem(15px);
height: px2rem(15px);
}
} }
span { span {
.cert-img { .cert-img {
......
<template>
<!-- 专项合作列表 -->
<section class="coop-container">
<div
v-show="paramData.length && isShow"
v-for="(item , index) in paramData"
:key="index"
class="coop-item"
@click="coopDetails(item)"
>
<div class="coop-item-left">
<img :src="item.imgUrl" />
<span
v-if="item.projectStatusValue"
class="coop-container-status"
:style="{'background': cBgColor(item)}"
>{{item.projectStatusValue | statusText}}</span>
</div>
<div class="coop-item-right">
<span class="coop-item-right-title">{{item.name}}</span>
<span class="coop-item-right-other">{{item.level}} | {{item.credit}} | {{item.scope}}</span>
<!-- <span v-if="item.pType == 1"
class="coop-item-right-other"
>起止日期 {{item.oldTime}}</span>-->
<!-- <span v-else
class="coop-item-right-other"
>起止日期 {{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}}</span>-->
<span class="coop-item-right-other">{{item.startDate | formatTime('{y}.{m}.{d}')}}{{item.endDate | formatTime('{y}.{m}.{d}')}}</span>
</div>
</div>
<NoMoreContent v-show="paramData.length > 9"></NoMoreContent>
<NoContent v-show="!paramData.length && isShow" :tabNum="tabTo"></NoContent>
<!--<UpdateDialog :showGoUpdate="showGoUpdate" @goUpdateHandler="goUpdateHandler"></UpdateDialog>-->
<!-- <van-popup
v-model="showGoUpdate"
position="bottom"
:style="{ height: '4.427rem' }"
>
<div class="update-dialog-content">
<p class="title">该项目仅对河北石家庄市的用户开放</p>
<p class="update-btn v-hairline-top confirm-btn" @click="goUpdateHandler">确定</p>
<p class="update-btn v-hairline-top" @click="showGoUpdate = false">取消</p>
</div>
</van-popup>-->
</section>
</template>
<script>
import NoMoreContent from "@/components/business/no-more-content";
import NoContent from "@/components/business/no-content";
import UpdateDialog from "@/components/business/update-dialog";
import { setEventByModuleCode, deepCopy, getWebPageUrl } from "@/utils/index";
import { getAppVersion } from "@/utils";
import { mapActions, mapGetters } from "vuex";
import { Popup } from "vant";
export default {
name: "coop-list-item",
data() {
return {
bgColor: "green",
statusText: "进行中",
showGoUpdate: false
};
},
props: {
paramData: {
type: Array,
default: () => []
},
coopType: {
type: Number,
default: 1
},
isShow: {
type: Boolean,
default: false
},
tabTo: {
type: Number,
default: 1
},
userMobile: {
type: String,
default: ""
},
provinceId: {
type: String | Number,
default: 0
},
organizationId: {
type: String | Number,
default: 0
},
},
computed: {
...mapGetters(["userInfo"])
// cBgColor() {
// }
},
components: {
NoMoreContent,
NoContent,
UpdateDialog
},
mounted() {},
filters: {
statusText(status) {
if (status === 1) {
return "参加中";
} else if (status === 5) {
return "进行中";
} else if (status === 10) {
return "已结束";
} else {
return "已结束";
}
}
},
methods: {
...mapActions(["setProjectTabIndex"]),
cBgColor(item) {
if (item.projectStatusValue === 1) {
return "#5890DD";
} else if (item.projectStatusValue === 5) {
return "#449284";
} else if (item.projectStatusValue === 10) {
return "#373839";
} else {
return "#5890DD";
}
},
coopDetails(item) {
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join('');
console.log('appVersionNum', appVersionNum);
if(appVersionNum < 341) {
Toast('请您下载新版本App');
return;
}
// 临时添加
if(window.__isWeb) {
this.$router.push({
path: "/coop",
query: {
id: item.id,
coopType: this.coopType,
courseRequire: item.courseRequire
}
});
return;
}
if (this.userMobile) {
let paramList = [
{
key: "pageUrl",
value: getWebPageUrl(`cme/#/coop?id=${item.id}&courseRequire=${item.courseRequire}`),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
} else {
rocNative.gotoLogin();
}
this.$sendBuriedData({
component_tag: `210#210002#${item.id}#${item.name}` //'210#210002#0#'+item.projectName
});
// if (item.courseRequire == 1) { //对课程完成度有控制,需判断版本号
// let appVersion = getAppVersion(this.userInfo.appVersion);
// // alert('版本'+appVersion)
// let flag = appVersion < 315;
// if (flag === true) {
// // 小于315版本,添加去更新弹层
// this.showGoUpdate = true;
// }else {
// // 跳转到老项目
// if(this.tabTo != 3) {
// this.setProjectTabIndex(this.tabTo)
// }
// if (item.pType == 1) {
// this.goToPage(item);
// // 跳转到新项目
// } else {
// this.showModule(item, this.coopType, this.tabTo, item.courseRequire)
// }
// }
// } else {
// // 跳转到老项目
// if(this.tabTo != 3) {
// this.setProjectTabIndex(this.tabTo)
// }
// if (item.pType == 1) {
// this.goToPage(item);
// // 跳转到新项目
// } else {
// this.showModule(item, this.coopType, this.tabTo, item.courseRequire)
// // this.$router.push({
// // path: "/coop",
// // query: {
// // id: item.id,
// // coopType: this.coopType
// // }
// // });
// }
// }
},
// 跳转到新项目
// showModule(item, coopType, tabTo, courseRequire) {
// if (window.__isWeb) {
// if(item.parent === false) {
// this.$router.push({
// path: "/coop",
// query: {
// id: item.id,
// coopType: coopType,
// tabTo: tabTo,
// courseRequire: courseRequire,
// }
// });
// } else {
// this.$router.push({
// path: "/parent",
// query: {
// entryId: item.entryId,
// }
// });
// }
// return;
// }
// let pageUrl = "";
// let paramList = [];
// if(item.parent === false) {
// pageUrl = getWebPageUrl('cme/#/coop');
// paramList = [
// {
// key: "pageUrl",
// value: pageUrl + `?id=${item.id}&coopType=${coopType}&tabTo=${tabTo}&courseRequire=${courseRequire}`,
// type: 4,
// seqNo: 1
// }
// ]
// } else {
// pageUrl = getWebPageUrl('cme/#/parent');
// paramList = [
// {
// key: "pageUrl",
// value: pageUrl + `?entryId=${item.entryId}`,
// type: 4,
// seqNo: 1
// }
// ]
// }
// rocNative.dispatchEventByModuleCode({
// modeCode: "M300",
// jsonString: paramList
// });
// },
goToPage(item) {
let _this = this;
// 如果是湖北考试项目,则做相应权限判断 湖北的projectId=3
if (item.id == "3") {
if (!_this.userInfo.userToken) {
rocNative.gotoLogin();
return;
}
let param = {
type: 1,
token: _this.userInfo.userToken || _this.token,
setEntry: true
};
this.GET("portal/portalApp/role/3", param).then(res => {
if (res.code == "000000") {
// {
// "data": 0, // 0就是无权限,1有权限
// "code": "000000",
// "message": "成功"
// }
if (res.data == 0) {
rocNative.showNativeToast({
message: "您不属于该项目,无法查看"
});
return;
}
} else {
rocNative.gotoLogin();
return;
}
_this.goToPage1(item.contentListModel);
});
} else {
_this.goToPage1(item.contentListModel);
}
},
// 跳转
goToPage1(itemData) {
let paramList = deepCopy(setEventByModuleCode(itemData));
let isStrokeUrl =
paramList[0] &&
paramList[0]["value"] &&
paramList[0]["value"].indexOf("stroke.js") !== -1;
let strokeUrl = "";
if (isStrokeUrl) {
strokeUrl =
paramList[0]["value"] + "&token=" + this.userInfo.userToken ||
_this.token;
paramList[0]["value"] = strokeUrl;
}
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
});
// this.appBuryingPointEntrust({
// ...activity_action,
// labelId: itemData.id,
// functionCode: this.id == 1 ? "c_project" : "f_activity",
// actionCode: this.id == 1 ? "c_project_tab" : "c_activity_tab",
// labelValue: itemData.title,
// createdTime: new Date().getTime()
// });
},
goUpdateHandler() {
//去更新
rocNative.upGradeVersion();
this.showGoUpdate = false;
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.coop-container {
position: relative;
margin: px2rem(0px) px2rem(15px);
&-status {
position: absolute;
top: px2rem(6px);
left: 0;
// display: block;
width: px2rem(44px);
height: px2rem(18px);
line-height: px2rem(18px);
padding: px2rem(0px) 0 0 px2rem(4px);
background: rgba(88, 144, 221, 1);
color: #fff;
font-size: px2rem(11px);
border-top-right-radius: px2rem(3px);
border-bottom-right-radius: px2rem(3px);
}
}
.coop-item {
display: flex;
width: 100%;
height: px2rem(128px);
border-bottom: 1px solid #f0f0f0;
background: #fff;
flex-direction: row;
justify-content: center;
align-items: center;
img {
width: px2rem(115px);
height: px2rem(86px);
margin-right: px2rem(15px);
border-radius: px2rem(3px);
}
&-left {
display: flex;
position: relative;
top: 0;
}
&-right {
display: flex;
width: px2rem(215px);
flex-direction: column;
padding-top: px2rem(4px);
&-title {
height: px2rem(50px);
line-height: px2rem(20px);
font-size: px2rem(16px);
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
&-other {
height: px2rem(21px);
line-height: px2rem(20px);
font-size: px2rem(13px);
font-weight: 400;
color: rgba(151, 152, 153, 1);
width: px2rem(210px);
overflow : hidden;
text-overflow: ellipsis;
white-space:nowrap;
}
}
}
.update-dialog-content {
padding: 0 px2rem(15px);
box-sizing: border-box;
.title {
text-align: center;
color: #373839;
font-size: px2rem(18px);
padding: px2rem(15px) 0;
line-height: px2rem(25px);
}
.update-btn {
text-align: center;
height: px2rem(55px);
line-height: px2rem(55px);
font-size: px2rem(16px);
color: #979899;
&.confirm-btn {
color: #449284;
}
&.v-hairline-top::after {
border-top-width: 1px;
}
}
}
</style>
<style>
.van-overlay {
background-color: rgba(0, 0, 0, 0.5);
}
</style>
<template>
<!-- 专项合作列表 -->
<section class="coop-container">
<div
v-show="paramData.length && isShow"
v-for="(item , index) in paramData"
:key="index"
class="coop-item"
@click="coopDetails(item)"
>
<div class="coop-item-left">
<img :src="item.imgUrl" />
<span
v-if="item.projectStatusValue"
class="coop-container-status"
:style="{'background': cBgColor(item)}"
>{{item.projectStatusValue | statusText}}</span>
</div>
<div class="coop-item-right">
<span class="coop-item-right-title">{{item.name}}</span>
<span class="coop-item-right-other">{{item.level}} | {{item.credit}} | {{item.scope}}</span>
<!-- <span v-if="item.pType == 1"
class="coop-item-right-other"
>起止日期 {{item.oldTime}}</span>-->
<!-- <span v-else
class="coop-item-right-other"
>起止日期 {{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}}</span>-->
<span class="coop-item-right-other">{{item.startDate | formatTime('{y}.{m}.{d}')}}{{item.endDate | formatTime('{y}.{m}.{d}')}}</span>
</div>
</div>
<NoMoreContent v-show="paramData.length > 9"></NoMoreContent>
<NoContent v-show="!paramData.length && isShow" :tabNum="tabTo"></NoContent>
<!--<UpdateDialog :showGoUpdate="showGoUpdate" @goUpdateHandler="goUpdateHandler"></UpdateDialog>-->
<!-- <van-popup
v-model="showGoUpdate"
position="bottom"
:style="{ height: '4.427rem' }"
>
<div class="update-dialog-content">
<p class="title">该项目仅对河北石家庄市的用户开放</p>
<p class="update-btn v-hairline-top confirm-btn" @click="goUpdateHandler">确定</p>
<p class="update-btn v-hairline-top" @click="showGoUpdate = false">取消</p>
</div>
</van-popup>-->
</section>
</template>
<script>
import NoMoreContent from "@/components/business/no-more-content";
import NoContent from "@/components/business/no-content";
import UpdateDialog from "@/components/business/update-dialog";
import { setEventByModuleCode, deepCopy, getWebPageUrl } from "@/utils/index";
import { getAppVersion } from "@/utils";
import { mapActions, mapGetters } from "vuex";
import { Popup } from "vant";
export default {
name: "coop-list-item",
data() {
return {
bgColor: "green",
statusText: "进行中",
showGoUpdate: false
};
},
props: {
paramData: {
type: Array,
default: () => []
},
coopType: {
type: Number,
default: 1
},
isShow: {
type: Boolean,
default: false
},
tabTo: {
type: Number,
default: 1
},
userMobile: {
type: String,
default: ""
}
},
computed: {
...mapGetters(["userInfo"])
// cBgColor() {
// }
},
components: {
NoMoreContent,
NoContent,
UpdateDialog
},
mounted() {},
filters: {
statusText(status) {
if (status === 1) {
return "参加中";
} else if (status === 5) {
return "进行中";
} else if (status === 10) {
return "已结束";
} else {
return "已结束";
}
}
},
methods: {
...mapActions(["setProjectTabIndex"]),
cBgColor(item) {
if (item.projectStatusValue === 1) {
return "#5890DD";
} else if (item.projectStatusValue === 5) {
return "#449284";
} else if (item.projectStatusValue === 10) {
return "#373839";
} else {
return "#5890DD";
}
},
coopDetails(item) {
if (this.userMobile) {
let paramList = [
{
key: "pageUrl",
value: getWebPageUrl(`cme/#/coop?id=${item.id}&courseRequire=${item.courseRequire}`),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
} else {
rocNative.gotoLogin();
}
this.$sendBuriedData({
component_tag: `210#210002#${item.id}#${item.name}` //'210#210002#0#'+item.projectName
});
// if (item.courseRequire == 1) { //对课程完成度有控制,需判断版本号
// let appVersion = getAppVersion(this.userInfo.appVersion);
// // alert('版本'+appVersion)
// let flag = appVersion < 315;
// if (flag === true) {
// // 小于315版本,添加去更新弹层
// this.showGoUpdate = true;
// }else {
// // 跳转到老项目
// if(this.tabTo != 3) {
// this.setProjectTabIndex(this.tabTo)
// }
// if (item.pType == 1) {
// this.goToPage(item);
// // 跳转到新项目
// } else {
// this.showModule(item, this.coopType, this.tabTo, item.courseRequire)
// }
// }
// } else {
// // 跳转到老项目
// if(this.tabTo != 3) {
// this.setProjectTabIndex(this.tabTo)
// }
// if (item.pType == 1) {
// this.goToPage(item);
// // 跳转到新项目
// } else {
// this.showModule(item, this.coopType, this.tabTo, item.courseRequire)
// // this.$router.push({
// // path: "/coop",
// // query: {
// // id: item.id,
// // coopType: this.coopType
// // }
// // });
// }
// }
},
// 跳转到新项目
// showModule(item, coopType, tabTo, courseRequire) {
// if (window.__isWeb) {
// if(item.parent === false) {
// this.$router.push({
// path: "/coop",
// query: {
// id: item.id,
// coopType: coopType,
// tabTo: tabTo,
// courseRequire: courseRequire,
// }
// });
// } else {
// this.$router.push({
// path: "/parent",
// query: {
// entryId: item.entryId,
// }
// });
// }
// return;
// }
// let pageUrl = "";
// let paramList = [];
// if(item.parent === false) {
// pageUrl = getWebPageUrl('cme/#/coop');
// paramList = [
// {
// key: "pageUrl",
// value: pageUrl + `?id=${item.id}&coopType=${coopType}&tabTo=${tabTo}&courseRequire=${courseRequire}`,
// type: 4,
// seqNo: 1
// }
// ]
// } else {
// pageUrl = getWebPageUrl('cme/#/parent');
// paramList = [
// {
// key: "pageUrl",
// value: pageUrl + `?entryId=${item.entryId}`,
// type: 4,
// seqNo: 1
// }
// ]
// }
// rocNative.dispatchEventByModuleCode({
// modeCode: "M300",
// jsonString: paramList
// });
// },
goToPage(item) {
let _this = this;
// 如果是湖北考试项目,则做相应权限判断 湖北的projectId=3
if (item.id == "3") {
if (!_this.userInfo.userToken) {
rocNative.gotoLogin();
return;
}
let param = {
type: 1,
token: _this.userInfo.userToken || _this.token,
setEntry: true
};
this.GET("portal/portalApp/role/3", param).then(res => {
if (res.code == "000000") {
// {
// "data": 0, // 0就是无权限,1有权限
// "code": "000000",
// "message": "成功"
// }
if (res.data == 0) {
rocNative.showNativeToast({
message: "您不属于该项目,无法查看"
});
return;
}
} else {
rocNative.gotoLogin();
return;
}
_this.goToPage1(item.contentListModel);
});
} else {
_this.goToPage1(item.contentListModel);
}
},
// 跳转
goToPage1(itemData) {
let paramList = deepCopy(setEventByModuleCode(itemData));
let isStrokeUrl =
paramList[0] &&
paramList[0]["value"] &&
paramList[0]["value"].indexOf("stroke.js") !== -1;
let strokeUrl = "";
if (isStrokeUrl) {
strokeUrl =
paramList[0]["value"] + "&token=" + this.userInfo.userToken ||
_this.token;
paramList[0]["value"] = strokeUrl;
}
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
});
// this.appBuryingPointEntrust({
// ...activity_action,
// labelId: itemData.id,
// functionCode: this.id == 1 ? "c_project" : "f_activity",
// actionCode: this.id == 1 ? "c_project_tab" : "c_activity_tab",
// labelValue: itemData.title,
// createdTime: new Date().getTime()
// });
},
goUpdateHandler() {
//去更新
rocNative.upGradeVersion();
this.showGoUpdate = false;
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.coop-container {
position: relative;
margin: px2rem(0px) px2rem(15px);
&-status {
position: absolute;
top: px2rem(6px);
left: 0;
// display: block;
width: px2rem(44px);
height: px2rem(18px);
line-height: px2rem(18px);
padding: px2rem(0px) 0 0 px2rem(4px);
background: rgba(88, 144, 221, 1);
color: #fff;
font-size: px2rem(11px);
border-top-right-radius: px2rem(3px);
border-bottom-right-radius: px2rem(3px);
}
}
.coop-item {
display: flex;
width: 100%;
height: px2rem(128px);
border-bottom: 1px solid #f0f0f0;
background: #fff;
flex-direction: row;
justify-content: center;
align-items: center;
img {
width: px2rem(115px);
height: px2rem(86px);
margin-right: px2rem(15px);
border-radius: px2rem(3px);
}
&-left {
display: flex;
position: relative;
top: 0;
}
&-right {
display: flex;
width: px2rem(215px);
flex-direction: column;
padding-top: px2rem(4px);
&-title {
height: px2rem(50px);
line-height: px2rem(20px);
font-size: px2rem(16px);
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
&-other {
height: px2rem(21px);
line-height: px2rem(20px);
font-size: px2rem(13px);
font-weight: 400;
color: rgba(151, 152, 153, 1);
width: px2rem(210px);
overflow : hidden;
text-overflow: ellipsis;
white-space:nowrap;
}
}
}
.update-dialog-content {
padding: 0 px2rem(15px);
box-sizing: border-box;
.title {
text-align: center;
color: #373839;
font-size: px2rem(18px);
padding: px2rem(15px) 0;
line-height: px2rem(25px);
}
.update-btn {
text-align: center;
height: px2rem(55px);
line-height: px2rem(55px);
font-size: px2rem(16px);
color: #979899;
&.confirm-btn {
color: #449284;
}
&.v-hairline-top::after {
border-top-width: 1px;
}
}
}
</style>
<style>
.van-overlay {
background-color: rgba(0, 0, 0, 0.5);
}
</style>
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<!-- <span>{{level}} | {{projectCredit}}</span> --> <!-- <span>{{level}} | {{projectCredit}}</span> -->
</div> </div>
<div class="content"> <div class="content">
<span>申请范围</span> <!-- <span>申请范围</span> -->
<span>学习范围</span>
<span>{{scope}}</span> <span>{{scope}}</span>
</div> </div>
<div class="remind" v-if="remind && cmeType != 2"> <div class="remind" v-if="remind && cmeType != 2">
...@@ -27,8 +28,8 @@ ...@@ -27,8 +28,8 @@
</div> </div>
<div class="content"> <div class="content">
<!-- <span>{{cmeType == 2 ? '主办单位' : '发起机构'}}</span> --> <!-- <span>{{cmeType == 2 ? '主办单位' : '发起机构'}}</span> -->
<span>主办单位</span> <!-- <span>主办单位</span> -->
<!-- <span>发起机构</span> --> <span>申办单位</span>
<span>{{organName}}</span> <span>{{organName}}</span>
</div> </div>
</div> </div>
......
<template>
<section class="bind-cart-wrapper">
<article class="left">
<div class="top">
<span class="discount">{{(cardInfo.preferentialPrice || cardInfo.costPrice) | formatMoney}}</span>
<span v-show="cardInfo.preferentialPrice" class="price">
<del>原价¥{{cardInfo.costPrice | formatMoney}}</del>
</span>
</div>
<div class="bottom">
<img src="../../images/cme/phrase2/info.png" />
<span>激活或购买后可学习课程</span>
</div>
</article>
<article class="right">
<span class="left" @click="changeClick">去激活</span>
<span @click="gotoBuy" class="right">去购买</span>
</article>
</section>
</template>
<script>
export default {
props: {
cardInfo: {
type: Object,
default: () => {}
}
},
data() {
return {};
},
methods: {
changeClick(){
this.$emit("changeClick")
},
gotoBuy() {
this.$emit("gotoBuy");
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.bind-cart-wrapper {
position: fixed;
left: 0;
bottom: 0;
z-index: 100;
width: 100%;
display: flex;
flex-direction: row;
height: px2rem(60px);
line-height: 1;
justify-content: space-between;
padding: px2rem(10px) px2rem(15px);
font-size: px2rem(14px);
background: rgba(255, 255, 255, 1);
box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.1);
.left {
display: flex;
flex-direction: column;
height: px2rem(40px);
line-height: 1;
font-size: 12px;
// align-items: ;
.top {
margin-top: px2rem(3px);
height: px2rem(24px);
.discount {
color: #fb5b52;
font-size: px2rem(18px);
font-weight: 700;
margin-right: px2rem(4px);
}
.price {
color: #979899;
}
}
.bottom {
display: flex;
flex-direction: row;
img {
width: px2rem(12px);
height: px2rem(12px);
margin-left: 1px;
margin-right: px2rem(4px);
}
color: #979899;
}
}
.right {
display: flex;
flex-direction: row;
span {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: px2rem(80px);
font-size: px2rem(14px);
font-weight: 700;
text-align: center;
&.left {
border-radius: px2rem(20px) 0px 0px px2rem(20px);
border: 1px solid rgba(255, 122, 75, 1);
color: #ff7a4b;
}
&.right {
background: linear-gradient(
137deg,
rgba(255, 166, 95, 1) 0%,
rgba(255, 122, 75, 1) 100%
);
border-radius: 0px px2rem(20px) px2rem(20px) 0px;
color: #fff;
}
}
}
}
</style>
\ No newline at end of file
<template>
<section class="card-popup-wrapper">
<van-popup
v-model="isShow"
position="center"
@click-overlay="clickOverlay"
>
<article class="content">
<p class="title">学分项目必须使用学习卡</p>
<p class="title">请先购买学习卡</p>
<section class="card-info">
<img v-if="cardInfo.cardType == 1" class="icon" src="../../images/cme/phrase2/I-card-icon.png" alt />
<img v-else class="icon" src="../../images/cme/phrase2/II-card-icon.png" alt />
<!-- <div class="info">
<span class="name">{{cardInfo.goodsName}}</span>
<p>
<span class="price">{{(cardInfo.preferentialPrice || cardInfo.costPrice) | formatMoney}}</span><span v-show="cardInfo.preferentialPrice" class="discount"><del> 原价¥{{cardInfo.costPrice | formatMoney}}</del></span>
</p>
</div> -->
<div class="info">
<span class="name">已购买去学习已购买去学习买去学习</span>
<p>
<span class="price">¥100</span><span class="discount"><del> 原价¥120</del></span>
</p>
</div>
</section>
<div class="line"></div>
<div class="btn">
<span class="left" @click="cancle">已购买去学习</span>
<span class="vert-line"></span>
<span class="right" @click="confirm">去购买</span>
</div>
</article>
</van-popup>
</section>
</template>
<script>
import { Popup } from "vant";
export default {
data() {
return {
}
},
props: {
isShow: {
type: Boolean,
default: false,
},
cardInfo: {
id: 10031,
goodsVersion: 1,
cardType: 1,
costPrice: 0,
preferentialPrice: 0,
goodsDesc: "",
goodsName: "学习卡",
goodsType: 2,
isSale: 1,
}
},
methods: {
clickOverlay() {
this.$emit('clickOverlay');
},
cancle() {
this.$emit('cancle');
},
confirm() {
this.$emit('confirm');
}
},
}
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.card-popup-wrapper {
.content {
font-size: px2rem(14px);
width: px2rem(300px);
// height: px2rem(245px);
padding-top: px2rem(30px);
.title {
text-align: center;
font-size: px2rem(18px);
font-weight: 700;
}
.card-info {
display: flex;
flex-direction: row;
align-items: center;
height: px2rem(76px);
margin: px2rem(15px);
padding: 0 px2rem(8px);
background: #F8F9FA;
border-radius: px2rem(6px);
font-size: px2rem(14px);
.icon {
width: px2rem(60px);
height: px2rem(60px);
margin-right: px2rem(8px);
}
.info {
width: 100%;
position: relative;
top: 0;
left: 0;
.name {
position: absolute;
top: px2rem(-30px);
left: px2rem(4px);
}
p {
position: absolute;
bottom: px2rem(-34px);
left: 0px;
display: flex;
align-items: center;
.price {
color: #FB5B52;
font-size: px2rem(18px);
font-weight: 700;
margin-right: px2rem(8px);
}
.discount {
color: #979899;
}
}
}
}
.line {
margin-top: px2rem(30px);
height: px2rem(1px);
background: #F0F1F2;
}
.btn {
width: 100%;
display: flex;
flex-direction: row;
// justify-content: space-between;
align-items: center;
height: px2rem(50px);
// margin-top: px2rem(15px);
font-size: px2rem(17px);
.left {
flex: 1;
text-align: center;
color: #979899;
// border-right: 1px solid #F0F1F2;
}
.vert-line {
border-right: 1px solid #F0F1F2;
// width: px2rem(1px);
height: 100%;
}
.right {
flex: 1;
text-align: center;
color: #449284;
}
}
}
.van-popup.van-popup--center {
border-radius: px2rem(4px);
}
}
</style>
<template>
<van-popup
v-model="isShow"
@click-overlay="cancle"
position="bottom"
>
<section class="bind-cart-wrapper">
<article class="title">
<span>激活详情</span>
<img @click="cancle" src="../../images/cme/close.png" />
</article>
<article class="tip">
<div class="left">
<img src="../../images/cme/phrase2/info.png" />
<span>激活码用于兑换课程,您可以从订单详情或已购买到实体卡查看激活码密码。激活码一旦兑换,不可退回。</span>
</div>
</article>
<section class="input-wrapper">
<article class="code">
<van-field
maxlength="26"
v-model="activationCode"
label="激活码"
placeholder="请输入激活码"
/>
</article>
<span class="error">{{errorMsg}}</span>
<img v-show="!!activationCode" @click="clear" src="../../images/cme/phrase2/close.png" />
</section>
<article class="bottom">
<van-button @click="confirm" size="large" round color="#449284">确认激活</van-button>
</article>
</section>
</van-popup>
</template>
<script>
export default {
props: {
isShow: {
type: Boolean,
default: true
},
changeErrorMsg: {
type: String,
default: ''
}
},
data() {
return {
activationCode: '',
errorMsg: ''
};
},
//
watch: {
activationCode(val) {
if(!val) {
this.errorMsg = '请输入激活码';
} else {
this.errorMsg = '';
}
this.$nextTick(() => {
this.activationCode = val.replace(/\s/g,'').replace(/.....(?!$)/g,'$& ');
});
},
changeErrorMsg(val) {
if(val) {
this.errorMsg = val;
}
},
isShow(val) {
this.activationCode = '';
this.errorMsg = '';
}
},
methods: {
cancle() {
this.$emit("cancle");
},
confirm() {
if(!this.activationCode) {
this.errorMsg = '请输入激活码';
return;
};
if(this.activationCode.length != 23) {
this.errorMsg = '请输入正确的激活码';
return;
}
let aCode = JSON.parse(JSON.stringify(this.activationCode));
aCode = aCode.replace(/\s/g,'');
this.$emit("confirm", aCode);
},
clear() {
this.activationCode = ''
}
}
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.bind-cart-wrapper {
width: 100%;
display: flex;
line-height: 1;
padding: px2rem(10px) px2rem(15px);
display: flex;
flex-direction: column;
background: rgba(255, 255, 255, 1);
box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.1);
.title {
display: flex;
flex-direction: row;
font-size: 18px;
font-weight: 700;
align-items: center;
justify-content: center;
width: 100%;
margin-top: px2rem(20px);
img {
position: relative;
top: 0;
right: px2rem(-120px);
width: 12px;
}
}
.tip {
display: flex;
margin-top: px2rem(40px);
.left {
display: flex;
line-height: 1.2;
font-size: px2rem(12px);
img {
width: px2rem(12px);
height: px2rem(12px);
margin-left: 1px;
margin-right: px2rem(4px);
}
color: #979899;
}
}
.input-wrapper {
position: relative;
.code {
display: flex;
flex-direction: column;
padding: px2rem(20px) 0;
padding-top: 0;
}
.error {
position: absolute;
top: px2rem(66px);
left: px2rem(56px);
display: inline-block;
color: red;
font-size: px2rem(12px);
}
img {
position: absolute;
top: px2rem(30px);
right: px2rem(12px);
width: px2rem(15px);
height: px2rem(15px);
}
}
.bottom {
display: flex;
margin-bottom: px2rem(40px);
}
}
</style>
\ No newline at end of file
...@@ -3,8 +3,13 @@ ...@@ -3,8 +3,13 @@
<div class="dialog-mask"></div> <div class="dialog-mask"></div>
<div class="dialog-container"> <div class="dialog-container">
<div class="title" v-html="title"></div> <div class="title" v-html="title"></div>
<div class="dialog-content">{{content}}</div> <!-- <div class="dialog-content">{{content}}</div> -->
<div v-show="needSubContent" class="dialog-sub-content" v-html="subContent"></div> <div class="sub-wrapper">
<div v-show="needSubContent" class="dialog-sub-content">1.跳转后点击“购买学习”,注册登录“中华医学教育在线”平台(首次登录需用手机号注册)</div>
<img class="dialog-img-1" src="https://file.yunqueyi.com/h5/images/tinified/II-tips-1.png" alt="">
<div v-show="needSubContent" class="dialog-sub-content">2.支付方式选择 “学习卡支付”,输入您的学习卡激活码,即可参加考试、申请学分。</div>
<img class="dialog-img-2" src="https://file.yunqueyi.com/h5/images/tinified/II-tips-2.png" alt="">
</div>
<div class="dialog-footer v-hairline-top"> <div class="dialog-footer v-hairline-top">
<span :class="{'single-btn': isSingle}" @click.stop.prevent="handlerAction(1)">{{cancleBtnText}}</span> <span :class="{'single-btn': isSingle}" @click.stop.prevent="handlerAction(1)">{{cancleBtnText}}</span>
<span v-show="!isSingle" class="confirm-btn v-hairline-left" @click.stop.prevent="handlerAction(2)">{{confirmBtnText}}</span> <span v-show="!isSingle" class="confirm-btn v-hairline-left" @click.stop.prevent="handlerAction(2)">{{confirmBtnText}}</span>
...@@ -95,7 +100,7 @@ export default { ...@@ -95,7 +100,7 @@ export default {
-webkit-backface-visibility: hidden; -webkit-backface-visibility: hidden;
backface-visibility: hidden; backface-visibility: hidden;
.title { .title {
margin-top: px2rem(30px); margin: px2rem(30px) 0 px2rem(20px);
text-align: center; text-align: center;
font-size: px2rem(18px); font-size: px2rem(18px);
font-weight: 700; font-weight: 700;
...@@ -103,21 +108,64 @@ export default { ...@@ -103,21 +108,64 @@ export default {
} }
.dialog-content { .dialog-content {
// margin: px2rem(30px) px2rem(22px); // margin: px2rem(30px) px2rem(22px);
margin: px2rem(20px) px2rem(30px) px2rem(30px); margin: px2rem(20px) px2rem(16px) px2rem(30px);
text-align: left; text-align: left;
font-size: px2rem(14px); font-size: px2rem(14px);
font-weight: 400; font-weight: 400;
color: #373839; color: #373839;
} }
.dialog-sub-content { .sub-wrapper {
margin: px2rem(-16px) px2rem(30px) px2rem(20px); margin-right: px2rem(5px);
// margin: px2rem(-16px) px2rem(22px) px2rem(30px); max-height: px2rem(300px);
text-align: left; overflow: auto;
font-size: px2rem(14px); .dialog-sub-content {
line-height: px2rem(24px); margin: 0 px2rem(8px) px2rem(20px) px2rem(16px);
font-weight: 400; text-align: left;
color: #979899; font-size: px2rem(14px);
line-height: px2rem(24px);
font-weight: 400;
color: #979899;
}
.dialog-img-1 {
width: px2rem(268px);
height: px2rem(165px);
margin-left: px2rem(16px);
margin-bottom: px2rem(20px);
}
.dialog-img-2 {
width: px2rem(268px);
height: px2rem(145px);
margin-left: px2rem(16px);
margin-bottom: px2rem(20px);
}
&::-webkit-scrollbar-track-piece {
background-color: rgba(0, 0, 0, 0);
border-left: 1px solid rgba(0, 0, 0, 0);
}
&::-webkit-scrollbar {
width: px2rem(5px);
height: px2rem(13px);
-webkit-border-radius: px2rem(3px);
-moz-border-radius: px2rem(3px);
border-radius: px2rem(3px);
}
&::-webkit-scrollbar-thumb {
background-color: #C7C8C9;
background-clip: padding-box;
-webkit-border-radius: px2rem(3px);
-moz-border-radius: px2rem(3px);
border-radius: px2rem(3px);
min-height: px2rem(28px);
}
&::-webkit-scrollbar-thumb:hover {
background-color: #C7C8C9;
-webkit-border-radius: px2rem(3px);
-moz-border-radius: px2rem(3px);
border-radius: px2rem(3px);
}
} }
.dialog-footer { .dialog-footer {
height: px2rem(50px); height: px2rem(50px);
display: flex; display: flex;
......
...@@ -12,7 +12,9 @@ import VConsole from 'vconsole/dist/vconsole.min.js' ...@@ -12,7 +12,9 @@ import VConsole from 'vconsole/dist/vconsole.min.js'
import BuriedPoint,{ sendBuriedData} from 'web-buried-point'; import BuriedPoint,{ sendBuriedData} from 'web-buried-point';
import Vant from 'vant'; import Vant from 'vant';
import 'vant/lib/index.css'; import 'vant/lib/index.css';
import clipboard from 'clipboard';
//注册到vue原型上
Vue.prototype.clipboard = clipboard;
if(!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) { if(!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) {
// if(!(process.env.BUILD_ENV === 'pro')) { // if(!(process.env.BUILD_ENV === 'pro')) {
......
...@@ -109,4 +109,25 @@ ...@@ -109,4 +109,25 @@
// } // }
.van-cell__title span { .van-cell__title span {
font-weight: 700 !important; font-weight: 700 !important;
}
.bind-cart-wrapper .van-field__control {
border-radius: px2rem(4px);
border: 1px solid #C7C8C9;
padding: px2rem(7px);
text-align: left !important;
}
.bind-cart-wrapper .van-cell__title .van-field__label {
span {
font-size: px2rem(15px) !important;
color: #373839 !important;
}
}
.bind-cart-wrapper .van-field__label {
width: px2rem(56px) !important;
padding-top: px2rem(8px);
}
.bind-cart-wrapper .van-cell {
padding: 0.54rem 0 !important;
} }
\ No newline at end of file
...@@ -19,7 +19,8 @@ service.interceptors.request.use(config => { ...@@ -19,7 +19,8 @@ service.interceptors.request.use(config => {
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境 if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
config.headers['token'] = config.data.token || '891F256CC48A4D57905F79C8F7628A74'; config.headers['token'] = config.data.token || '891F256CC48A4D57905F79C8F7628A74';
} }
// delete config.data.token; delete config.data.setEntry;
delete config.data.token;
} }
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' }) config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
......
...@@ -13,7 +13,7 @@ module.exports = { ...@@ -13,7 +13,7 @@ module.exports = {
query = this.$route.query query = this.$route.query
} }
// alert('this.token' + this.token) // alert('this.token' + this.token)
this.token = this.getUrlKey('token') || (query && query.token) || 'EEF69589911F4D3CAC8700AC11EE8096' this.token = this.getUrlKey('token') || (query && query.token) || '4510A4F7DF72471D82EA3626C43A8696'
}, },
mounted() { mounted() {
......
...@@ -3,18 +3,27 @@ ...@@ -3,18 +3,27 @@
<CommonNavbar <CommonNavbar
:bgColor="bgColor" :bgColor="bgColor"
v-show="showNavBar" v-show="showNavBar"
title="" title
:isFixNavbar="isFixNavbar" :isFixNavbar="isFixNavbar"
borderStyle="0px solid #fff" borderStyle="0px solid #fff"
></CommonNavbar> ></CommonNavbar>
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-1.png"><img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-2.png"><img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-3.png"><img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-4.png"><img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-5.png"><img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-6.png"><img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-7.png"> <img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-1.png" />
<ExjumperButton <img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-2.png" />
@btnClick="isBuy(1)" <img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-3.png" />
btnText="立即学习" <img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-4.png" />
type="primary"></ExjumperButton> <img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-5.png" />
<img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-6.png" />
<!-- <img class="img" src="https://file.yunqueyi.com/h5/images/tinified/I-detail-7.png" /> -->
<ExjumperButton @btnClick="isBuy(1)" btnText="立即学习" type="primary"></ExjumperButton>
<!-- <img @click="isBuy(1)" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png"> --> <!-- <img @click="isBuy(1)" class="img" src="https://file.yunqueyi.com/h5/images/tinified/i-detail-8.png"> -->
<CardPopup :cardInfo="cardInfo" :isShow="isShowPopup" @clickOverlay="clickOverlay" @cancle="jumpToCardList" @confirm="confirm"></CardPopup> <CardPopup
:cardInfo="cardInfo"
:isShow="isShowPopup"
@clickOverlay="clickOverlay"
@cancle="jumpToCardList"
@confirm="confirm"
></CardPopup>
<Loading v-if="showLoading" /> <Loading v-if="showLoading" />
</section> </section>
</template> </template>
...@@ -23,24 +32,24 @@ import ExjumperButton from "@/components/cme/exjumper-button"; ...@@ -23,24 +32,24 @@ import ExjumperButton from "@/components/cme/exjumper-button";
import CommonNavbar from "@/components/common/common-navbar"; import CommonNavbar from "@/components/common/common-navbar";
import CardPopup from "@/components/cme/card-popup"; import CardPopup from "@/components/cme/card-popup";
import Loading from "@/components/common/common-loading"; import Loading from "@/components/common/common-loading";
import { Toast } from 'vant'; import { Toast } from "vant";
export default { export default {
data() { data() {
return { return {
bgColor: "#fff", bgColor: "#fff",
bgColor: 'none', bgColor: "none",
showNavBar: true, showNavBar: true,
isShowPopup: false, isShowPopup: false,
isFixNavbar: true, isFixNavbar: true,
oneLevelUrl: '', oneLevelUrl: "",
provinceId: 0, provinceId: 0,
organizationId: 0, organizationId: 0,
cardInfo: { cardInfo: {
id: 0 id: 0
}, },
cmeToken: '', cmeToken: "",
showLoading: false, showLoading: false
} };
}, },
components: { components: {
CommonNavbar, CommonNavbar,
...@@ -55,18 +64,21 @@ export default { ...@@ -55,18 +64,21 @@ export default {
// _this.showLoading = false; // _this.showLoading = false;
param.setEntry = true; param.setEntry = true;
_this.getProvinceIdByPosition(param); _this.getProvinceIdByPosition(param);
} };
this.oneLevelUrl = decodeURIComponent(this.$route.query && this.$route.query.oneLevelUrl || ''); this.oneLevelUrl = decodeURIComponent(
this.provinceId = this.$route.query && this.$route.query.provinceId || 0; (this.$route.query && this.$route.query.oneLevelUrl) || ""
this.organizationId = this.$route.query && this.$route.query.organizationId || 0; );
this.cmeToken = this.$route.query && this.$route.query.cmeToken || ''; this.provinceId = (this.$route.query && this.$route.query.provinceId) || 0;
this.organizationId =
(this.$route.query && this.$route.query.organizationId) || 0;
this.cmeToken = (this.$route.query && this.$route.query.cmeToken) || "";
// this.getProvinceIdByPosition(); // this.getProvinceIdByPosition();
}, },
methods: { methods: {
// 点击弹层 // 点击弹层
clickOverlay() { clickOverlay() {
console.log('clickOverlay'); console.log("clickOverlay");
this.isShowPopup = false; this.isShowPopup = false;
}, },
...@@ -79,13 +91,13 @@ export default { ...@@ -79,13 +91,13 @@ export default {
let param = { let param = {
cardType: cardType, cardType: cardType,
token: this.cmeToken, token: this.cmeToken,
setEntry: true, setEntry: true
} };
this.GET("trade/storage/card/isBuy", param).then(res => { this.GET("trade/storage/card/isBuy", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
// 如果购买过,则直接跳转到中华医学会页面 // 如果购买过,则直接跳转到中华医学会页面
if(res.data) { if (res.data) {
this.jumpToCardList(); this.jumpToCardList();
} else { } else {
this.preJumper(); this.preJumper();
} }
...@@ -93,12 +105,12 @@ export default { ...@@ -93,12 +105,12 @@ export default {
// else { // else {
// Toast(res.message); // Toast(res.message);
// } // }
}); });
}, },
// 跳转前判断是否有机构,否则使用定位信息 // 跳转前判断是否有机构,否则使用定位信息
preJumper() { preJumper() {
if(this.organizationId != 0 && this.provinceId != 0) { if (this.organizationId != 0 && this.provinceId != 0) {
this.getCardInfoByProvinceId(this.provinceId); this.getCardInfoByProvinceId(this.provinceId);
} else { } else {
this.getPositionData(); this.getPositionData();
...@@ -107,7 +119,7 @@ export default { ...@@ -107,7 +119,7 @@ export default {
// 获取地理位置信息 // 获取地理位置信息
getPositionData() { getPositionData() {
console.log('getPositionData'); console.log("getPositionData");
rocNative.getPositionData({ rocNative.getPositionData({
__funcName: "__getPositionData" __funcName: "__getPositionData"
}); });
...@@ -116,30 +128,32 @@ export default { ...@@ -116,30 +128,32 @@ export default {
// 根据省ID,获取学习卡信息 // 根据省ID,获取学习卡信息
getCardInfoByProvinceId(provinceId) { getCardInfoByProvinceId(provinceId) {
let param = { let param = {
"area": provinceId + '', area: provinceId + "",
"cardType": 1, cardType: 1,
"pageNum": 1, pageNum: 1,
"pageSize": 1 pageSize: 1
} };
this.POST("trade/goods/cardList", param).then(res => { this.POST("trade/goods/cardList", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.showLoading = false; this.showLoading = false;
this.isShowPopup = true; this.isShowPopup = true;
this.cardInfo = res.data && res.data[0] || {id: 0} ; this.cardInfo = (res.data && res.data[0]) || { id: 0 };
} }
}); });
}, },
// 根据位置信息获取省ID // 根据位置信息获取省ID
getProvinceIdByPosition(param) { getProvinceIdByPosition(param) {
param.setEntry = true; param.setEntry = true;
this.POST("aggregate/cme/convertLocationToProvinceId", param).then(res => { this.POST("aggregate/cme/convertLocationToProvinceId", param).then(
if (res.code == "000000") { res => {
this.getCardInfoByProvinceId(res.data || 0); if (res.code == "000000") {
} else { this.getCardInfoByProvinceId(res.data || 0);
this.getCardInfoByProvinceId(0); } else {
this.getCardInfoByProvinceId(0);
}
} }
}); );
}, },
// 跳转到原生的购买页面 // 跳转到原生的购买页面
...@@ -148,7 +162,8 @@ export default { ...@@ -148,7 +162,8 @@ export default {
let paramList = [ let paramList = [
{ {
key: "className", key: "className",
value: "com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC", value:
"com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC",
type: 4, type: 4,
seqNo: 1 seqNo: 1
}, },
...@@ -189,24 +204,24 @@ export default { ...@@ -189,24 +204,24 @@ export default {
// 此字段不配置,则用原来的逻辑 // 此字段不配置,则用原来的逻辑
{ {
key: "needCache", key: "needCache",
value: '1', // 0不缓存,其它值都做缓存 value: "1", // 0不缓存,其它值都做缓存
type: 4, type: 4,
seqNo: 1 seqNo: 1
}, }
] ];
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: "M300", modeCode: "M300",
jsonString: paramList jsonString: paramList
}); });
} }
} }
}, }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../style/mixin"; @import "../style/mixin";
.cd-wrapper { .cd-wrapper {
background: #F8F9FA; background: #f8f9fa;
padding-bottom: 80px; padding-bottom: 80px;
.img { .img {
margin-top: -15px; margin-top: -15px;
......
<template>
<!-- 专项合作首页: 我参与的,其它项目 -->
<div class="page-container">
<CommonNavbar
:bgColor="bgColor"
v-show="isShowNavbar"
:title="navTitle"
:isFixNavbar="isFixNavbar"
:burialPoint="pointStyle"
borderStyle="1px solid #fff"
></CommonNavbar>
<section class="page-content">
<!-- <button @click="jumpToExamAction" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮1</button>
<button @click="jumpToExamAction2" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮2</button>-->
<!-- {{token}} -->
<table class="page-content-table">
<tr>
<td @click="changeTab(1)" :class="{'active': tabIndex === 1}">
<div class="tap-title">
<span :style="{'color': tabIndex === 1 ? '#333' : '#999'}">我的项目</span>
<span></span>
</div>
</td>
<td @click="changeTab(2)" :class="{'active': tabIndex === 2}">
<div class="tap-title">
<span :style="{'color': tabIndex === 2 ? '#333' : '#999'}">全部项目</span>
<span></span>
</div>
</td>
</tr>
</table>
<article class="cb-wrapper" :class="{'padding-top-111': !isWeb}">
<CardBanner></CardBanner>
</article>
<article class="page-content-list">
<CommonTitle v-show="tabIndex === 2" title="I类学分项目" :isShowCert="false"></CommonTitle>
<ICardItem v-show="tabIndex === 2"></ICardItem>
<CommonTitle title="II类学分项目" :isShowCert="false"></CommonTitle>
<section v-if="tabIndex === 1">
<CoopListItem
:paramData="joinProjectList"
:coopType="1"
:tabTo="1"
:isShow="isShow"
:userMobile="userMobile"
></CoopListItem>
</section>
<section v-if="tabIndex === 2">
<CoopListItem
:paramData="otherProjectList"
:coopType="1"
:tabTo="2"
:isShow="isShow"
:userMobile="userMobile"
></CoopListItem>
</section>
</article>
</section>
<Toast ref="toastTitle"></Toast>
<Loading v-if="showLoading" />
<!-- <div>
<iframe src="https://www.baidu.com" id="mobsf" frameborder="0" style="width:100%;height:500px;"></iframe>
</div>-->
<!-- <discuss-topic-stencil /> -->
<transition name="fade">
<article v-show="needShowBackup" @click="scrollTop" class="back-up-icon">
<img src="../images/cme/phrase2/back-top.png" alt />
</article>
</transition>
<!-- <CardPopup :showGoUpdate="showGoUpdate"></CardPopup> -->
</div>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CoopListItem from "@/components/business/coop-list-item";
import Loading from "@/components/common/common-loading";
import Toast from "@/components/common/common-toast";
import CardBanner from "@/components/cme/card-banner";
import ICardItem from "@/components/cme/I-card-item";
// import CardPopup from "@/components/cme/card-popup";
import CommonTitle from "@/components/common/common-title";
import { mapGetters, mapActions } from "vuex";
export default {
data() {
return {
showLoading: false,
isWeb: window.__isWeb,
bgColor: "#fff",
isShow: false,
navTitle: "继教项目",
compTitle: "组件名称",
isShowNavbar: true,
isFixNavbar: false,
pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
tabIndex: 1,
joinProjectList: [], // 我的项目
otherProjectList: [], // 全部项目
token: "",
toastTitle: "",
userMobile: "",
needShowBackup: false,
showGoUpdate: false,
};
},
computed: {
...mapGetters(["projectTabIndex"])
},
components: {
// DiscussTopicStencil,
CommonNavbar,
CoopListItem,
Loading,
Toast,
CardBanner,
CommonTitle,
ICardItem,
// CardPopup
},
created() {
var _this = this;
window.__getUserInfo = function(param) {
_this.setUserInfo(param);
_this.token = param.userToken;
_this.userMobile = param.userMobile;
_this.getCoopData();
};
_this.getUserInfo();
if (__isWeb) {
_this.getCoopData();
}
window.__refresh = function() {
//_this.tabIndex = _this.projectTabIndex;
_this.getUserInfo();
};
// 打开页面埋点
this.$sendBuriedData({
component_tag: "210#0#0#0"
});
window.__getPositionData = function(param) {
console.log(param)
}
this.getPositionData();
window.addEventListener("scroll", this.scrollFun);
},
mounted() {
var _this = this;
this.tabIndex = this.projectTabIndex;
// let param = {
// id: 12 };
// this.API_GET("app/certificate/downLoad", param).then(res => {
// });
},
methods: {
// 跳转到第三方考试页面
//
jumpToExamAction() {
let paramList = [
{
key: "pageUrl",
value:
"http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=a245b2060ac0495cae440de859321b91&openCourseId=2d9b152a85dc4833892aeaa713362b9f",
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: "1", // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
jumpToExamAction2() {
let paramList = [
{
key: "pageUrl",
value:
"http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=0aeee9f7712b4543ab8eadb0571a78a7&openCourseId=e9e124392d3f4e2494d46e8f990b085e",
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: "1", // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
...mapActions(["setUserInfo"]),
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfo"
});
},
//获取位置信息 测试代码
getPositionData() {
console.log('getPositionData');
rocNative.getPositionData({
__funcName: "__getPositionData"
});
},
changeTab(index) {
let tag = index == 1 ? "210#210001#0" : "210#210001#1";
this.tabIndex = index;
if (index == 1 && !this.userMobile) {
rocNative.gotoLogin();
this.tabIndex = 2;
}
this.$sendBuriedData({
component_tag: tag
});
},
// 获取所有项目:我的项目、其它项目
getCoopData() {
// debugger
let _this = this;
let param = {
token: _this.token,
setEntry: true
};
let cachedJoinProjectList = [];
let cachedOtherProjectList = [];
_this.otherProjectList = [];
_this.showLoading = true;
this.GET("cme/project/list", param).then(res => {
_this.showLoading = false;
if (res.code == "000000") {
// let oldProjects1 = [];
// let oldProjects2 = [];
// for(let i = 0; i < res.data.oldProjects.length; i++) {
// if(res.data.oldProjects[i].roleFlag == 1) {
// oldProjects1.push(res.data.oldProjects[i]);
// } else if (res.data.oldProjects[i].roleFlag == 0) {
// oldProjects2.push(res.data.oldProjects[i]);
// }
// }
// console.log('项目1',oldProjects1,'项目2',oldProjects2);
cachedJoinProjectList = res.data.myCMEProjectListDtoList;
cachedOtherProjectList = res.data.allCMEProjectListDtoList;
_this.joinProjectList = res.data.myCMEProjectListDtoList;
_this.otherProjectList = res.data.allCMEProjectListDtoList;
// cachedJoinProjectList = _this.handleOldProject(
// oldProjects1,
// res.data.myProjectList
// );
// cachedOtherProjectList = _this.handleOldProject(
// oldProjects2,
// res.data.otherProjectList
// );
// 如果用户已经登陆,则将"至今"的几个项目移到我的列表中
if (_this.userMobile) {
// cachedOtherProjectList.map(item => {
// if(item.projectName && item.projectName.indexOf('国家基本公共卫生服务项目基层高血压管理办公室') >= 0) {
// cachedJoinProjectList.unshift(item);
// } else {
// _this.otherProjectList.push(item);
// }
// })
_this.tabIndex = 1;
} else {
_this.tabIndex = 2;
// _this.otherProjectList = cachedOtherProjectList
}
// _this.joinProjectList = cachedJoinProjectList;
if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2;
}
_this.isShow = true;
// console.log('otherProjectList',_this.otherProjectList);
}
});
},
handleOldProject(oldProjects, otherProjectList) {
let oldList = oldProjects.map(item => {
item.pType = 1;
return item;
}),
otherList = otherProjectList.map(item => {
item.pType = 2;
return item;
});
return oldList.concat(otherList);
},
scrollFun() {
let scrollTop = window.scrollY;
if (scrollTop >= 500) {
this.needShowBackup = true;
} else {
this.needShowBackup = false;
}
},
scrollTop() {
window.scrollTo(0, 0);
}
}
};
</script>
<style lang="scss" scoped>
@import "../style/mixin";
.page-content {
&-table {
position: fixed;
z-index: 100;
width: 100%;
text-align: center;
border-bottom: 1px solid #e7e7e7;
background: #fff;
tr {
font-size: px2rem(15px);
font-weight: 700;
height: px2rem(44px);
td {
width: 50%;
padding-top: px2rem(6px);
.tap-title {
display: flex;
flex-direction: column;
align-items: center;
color: #999;
span:nth-child(2) {
position: relative;
left: 0;
bottom: px2rem(-9px);
z-index: 2;
width: px2rem(10px);
height: px2rem(3px);
background: rgba(255, 255, 255, 1);
border-radius: px2rem(3px);
}
}
&.active {
span:nth-child(2) {
background: rgba(68, 146, 132, 1);
}
}
}
}
}
.cb-wrapper {
width: 100%;
position: fixed;
top: px2rem(49px);
left: 0;
z-index: 90;
margin-bottom: 30px;
&.padding-top-111 {
top: px2rem(111px);
}
}
&-list {
padding-top: px2rem(80px);
}
}
.back-up-icon {
position: fixed;
bottom: px2rem(50px);
right: px2rem(15px);
img {
width: px2rem(35px);
height: px2rem(35px);
}
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
</style>
<template>
<!-- 专项合作首页: 我参与的,其它项目 -->
<div class="page-container">
<CommonNavbar
:bgColor="bgColor"
v-show="isShowNavbar"
:title="navTitle"
:isFixNavbar="isFixNavbar"
:burialPoint="pointStyle"
borderStyle="1px solid #fff"
></CommonNavbar>
<section class="page-content">
<!-- <button @click="jumpToExamAction" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮1</button>
<button @click="jumpToExamAction2" style="margin: 20px;font-size:20px;text-align:center;padding:10px;border-radius:10px;">测试按钮2</button> -->
<!-- {{token}} -->
<table class="page-content-table">
<tr>
<td @click="changeTab(1)" :class="{'active': tabIndex === 1}">
<div class="tap-title">
<span :style="{'color': tabIndex === 1 ? '#333' : '#999'}">我的项目</span>
<span></span>
</div>
</td>
<td @click="changeTab(2)" :class="{'active': tabIndex === 2}">
<div class="tap-title">
<!-- <span>其它项目</span> -->
<span :style="{'color': tabIndex === 2 ? '#333' : '#999'}">全部项目</span>
<span></span>
</div>
</td>
</tr>
</table>
<article class="page-content-list">
<section v-if="tabIndex === 1">
<CoopListItem
:paramData="joinProjectList"
:coopType="1"
:tabTo="1"
:isShow="isShow"
:userMobile="userMobile"></CoopListItem>
</section>
<section v-if="tabIndex === 2">
<CoopListItem
:paramData="otherProjectList"
:coopType="1"
:tabTo="2"
:isShow="isShow"
:userMobile="userMobile"></CoopListItem>
</section>
</article>
</section>
<Toast ref="toastTitle"></Toast>
<Loading v-if="showLoading"/>
<!-- <div>
<iframe src="https://www.baidu.com" id="mobsf" frameborder="0" style="width:100%;height:500px;"></iframe>
</div>-->
<!-- <discuss-topic-stencil /> -->
</div>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CoopListItem from "@/components/business/coop-list-item";
import Loading from "@/components/common/common-loading";
import Toast from "@/components/common/common-toast";
import { mapGetters, mapActions } from "vuex";
export default {
data() {
return {
showLoading: false,
bgColor: "#fff",
isShow: false,
navTitle: "继教项目",
compTitle: "组件名称",
isShowNavbar: true,
isFixNavbar: false,
pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
tabIndex: 1,
joinProjectList: [], // 我的项目
otherProjectList: [], // 全部项目
token: "",
toastTitle: "",
userMobile: ""
};
},
computed: {
...mapGetters(["projectTabIndex"])
},
components: {
// DiscussTopicStencil,
CommonNavbar,
CoopListItem,
Loading,
Toast,
},
created() {
var _this = this;
window.__getUserInfo = function(param) {
_this.setUserInfo(param);
_this.token = param.userToken;
_this.userMobile = param.userMobile;
_this.getCoopData();
};
_this.getUserInfo();
if (__isWeb) {
_this.getCoopData();
}
window.__refresh = function() {
//_this.tabIndex = _this.projectTabIndex;
_this.getUserInfo();
// document.documentElement.scrollTop = 0;
// document.body.scrollTop = 0;
};
// 打开页面埋点
this.$sendBuriedData({
component_tag: '210#0#0#0'
});
},
mounted() {
var _this = this;
this.tabIndex = this.projectTabIndex;
// let param = {
// id: 12 };
// this.API_GET("app/certificate/downLoad", param).then(res => {
// });
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
},
methods: {
// 跳转到第三方考试页面
//
jumpToExamAction() {
let paramList = [
{
key: "pageUrl",
value: 'http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=a245b2060ac0495cae440de859321b91&openCourseId=2d9b152a85dc4833892aeaa713362b9f',
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: '1', // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
jumpToExamAction2() {
let paramList = [
{
key: "pageUrl",
value: 'http://cmeonline.cma-cmc.com.cn/cms/weixinCourseDetail.htm?courseId=0aeee9f7712b4543ab8eadb0571a78a7&openCourseId=e9e124392d3f4e2494d46e8f990b085e',
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: '1', // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
...mapActions(["setUserInfo"]),
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfo"
});
},
changeTab(index) {
let tag = index == 1 ? '210#210001#0' : '210#210001#1';
this.tabIndex = index;
if(index == 1 && !this.userMobile) {
rocNative.gotoLogin();
this.tabIndex = 2;
}
this.$sendBuriedData({
component_tag: tag
});
},
// 获取所有项目:我的项目、其它项目
getCoopData() {
// debugger
let _this = this;
let param = {
token: _this.token,
setEntry: true
};
let cachedJoinProjectList = []
let cachedOtherProjectList = []
_this.otherProjectList = []
_this.showLoading = true;
this.GET("cme/project/list", param).then(
res => {
_this.showLoading = false;
if (res.code == "000000") {
// let oldProjects1 = [];
// let oldProjects2 = [];
// for(let i = 0; i < res.data.oldProjects.length; i++) {
// if(res.data.oldProjects[i].roleFlag == 1) {
// oldProjects1.push(res.data.oldProjects[i]);
// } else if (res.data.oldProjects[i].roleFlag == 0) {
// oldProjects2.push(res.data.oldProjects[i]);
// }
// }
// console.log('项目1',oldProjects1,'项目2',oldProjects2);
cachedJoinProjectList = res.data.myCMEProjectListDtoList;
cachedOtherProjectList = res.data.allCMEProjectListDtoList;
_this.joinProjectList = res.data.myCMEProjectListDtoList;
_this.otherProjectList = res.data.allCMEProjectListDtoList;
// cachedJoinProjectList = _this.handleOldProject(
// oldProjects1,
// res.data.myProjectList
// );
// cachedOtherProjectList = _this.handleOldProject(
// oldProjects2,
// res.data.otherProjectList
// );
// 如果用户已经登陆,则将"至今"的几个项目移到我的列表中
if(_this.userMobile) {
// cachedOtherProjectList.map(item => {
// if(item.projectName && item.projectName.indexOf('国家基本公共卫生服务项目基层高血压管理办公室') >= 0) {
// cachedJoinProjectList.unshift(item);
// } else {
// _this.otherProjectList.push(item);
// }
// })
_this.tabIndex = 1;
} else {
_this.tabIndex = 2;
// _this.otherProjectList = cachedOtherProjectList
}
// _this.joinProjectList = cachedJoinProjectList;
if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2;
}
_this.isShow = true
// console.log('otherProjectList',_this.otherProjectList);
}
}
);
},
handleOldProject(oldProjects, otherProjectList) {
let oldList = oldProjects.map(item => {
item.pType = 1;
return item;
}),
otherList = otherProjectList.map(item => {
item.pType = 2;
return item;
});
return oldList.concat(otherList);
},
}
};
</script>
<style lang="scss" scoped>
@import "../style/mixin";
.page-content {
&-table {
position: fixed;
z-index: 1;
width: 100%;
text-align: center;
border-bottom: 1px solid #e7e7e7;
background: #fff;
tr {
font-size: px2rem(15px);
font-weight: 700;
height: px2rem(44px);
td {
width: 50%;
padding-top: px2rem(6px);
.tap-title {
display: flex;
flex-direction: column;
align-items: center;
color: #999;
span:nth-child(2) {
position: relative;
left: 0;
bottom: px2rem(-9px);
z-index: 2;
width: px2rem(10px);
height: px2rem(3px);
background: rgba(255, 255, 255, 1);
border-radius: px2rem(3px);
}
}
&.active {
span:nth-child(2) {
background: rgba(68, 146, 132, 1);
}
}
}
}
}
&-list {
padding-top: px2rem(50px);
}
}
</style>
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
</td> </td>
</tr> </tr>
</table> </table>
<article v-show="isShow" class="cb-wrapper" :class="{'padding-top-111': !isWeb}"> <!-- <article v-show="isShow" class="cb-wrapper" :class="{'padding-top-111': !isWeb}">
<CardBanner :userMobile="userMobile"></CardBanner> <CardBanner :userMobile="userMobile"></CardBanner>
</article> </article> -->
<article class="page-content-list"> <article class="page-content-list">
<CommonTitle v-show="tabIndex === 2" title="I类学分继续医学教育项目" :isShowCert="false"></CommonTitle> <CommonTitle title="I类学分继续医学教育项目" :isShowCert="false"></CommonTitle>
<ICardItem v-show="tabIndex === 2" :oneLevelUrl="oneLevelUrl" :provinceId="provinceId" :organizationId="organizationId" :cmeToken="token"></ICardItem> <ICardItem :oneLevelUrl="oneLevelUrl" :provinceId="provinceId" :organizationId="organizationId" :cmeToken="token"></ICardItem>
<CommonTitle class="mt-10" v-show="isShow" title="II类学分继续医学教育项目" :isShowCert="false"></CommonTitle> <CommonTitle class="mt-10" v-show="isShow && tabIndex === 2" title="II类学分继续医学教育项目" :isShowCert="false"></CommonTitle>
<section v-if="tabIndex === 1"> <section v-if="tabIndex === 1">
<CoopListItem <CoopListItem
:paramData="joinProjectList" :paramData="joinProjectList"
...@@ -206,11 +206,9 @@ export default { ...@@ -206,11 +206,9 @@ export default {
_this.otherProjectList = res.data.allCMEProjectListDtoList; _this.otherProjectList = res.data.allCMEProjectListDtoList;
_this.provinceId = res.data.provinceId; _this.provinceId = res.data.provinceId;
_this.organizationId = res.data.organizationId; _this.organizationId = res.data.organizationId;
// _this.organizationInfo.provinceId = res.data.provinceId;
// _this.organizationInfo.organizationId = res.data.organizationId;
_this.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址 _this.oneLevelUrl = res.data.oneLevelUrl; // I类学习卡列表地址
// _this.setJumpURLForI(res.data.oneLevelUrl);
// _this.setOrganizationInfo(_this.organizationInfo); // 不做相应判断
if (_this.userMobile) { if (_this.userMobile) {
_this.tabIndex = 1; _this.tabIndex = 1;
} else { } else {
...@@ -219,6 +217,7 @@ export default { ...@@ -219,6 +217,7 @@ export default {
if (_this.joinProjectList && _this.joinProjectList.length === 0) { if (_this.joinProjectList && _this.joinProjectList.length === 0) {
_this.tabIndex = 2; _this.tabIndex = 2;
} }
_this.isShow = true; _this.isShow = true;
} }
}); });
...@@ -295,7 +294,7 @@ export default { ...@@ -295,7 +294,7 @@ export default {
} }
} }
&-list { &-list {
padding-top: px2rem(85px); padding-top: px2rem(50px);
.mt-10 { .mt-10 {
margin-bottom: px2rem(-10px); margin-bottom: px2rem(-10px);
} }
......
<template>
<!-- 组件详情页面:模块列表及其下面的元件列表 -->
<div class="page-container-merge">
<CommonNavbar
id="header"
:bgColor="bgColor"
v-show="isShowNavbar"
:isBlack="isBlack"
:isShowShare="isShowShare"
:title="navTitle"
:shareTitle="project.projectName"
:shareTitleInfo="project.projectIntro"
:isFixNavbar="isFixNavbar"
:burialPoint="pointStyle"
borderStyle="0px solid #fff"
:backMethod="from"
></CommonNavbar>
<div class="page-content list-container">
<!-- banner图片 -->
<div v-if="bannerType == 1" class="page-content-img-container">
<img class="banner-img" :src="attachmentUrl" />
<!-- <img v-show="project.status == 1" class="banner-img-1" src="../images/status-join.png" /> -->
<img v-show="project.status == 5" class="banner-img-5" src="../images/status-keep-on.png" />
<img v-show="project.status == 10" class="banner-img-10" src="../images/status-end-cme.png" />
</div>
<!-- banner视频 -->
<CommonTcPlayer v-if="bannerType == 2" style="flex" :options="videoOptions"></CommonTcPlayer>
<!-- 项目标题 -->
<CommonDescription
:projectName="project.projectName"
:studyNum="project.studyNum"
:subject="project.subject"
/>
<!-- 步骤条 -->
<div v-if="project.cmeType != 2">
<CmeStep
:currentProgress="project.currentProgress"
:studyProgress="project.studyProgress"
:credit="project.credit"
:creditId="project.creditId"
:certificateUrl="project.certificateUrl"
:inScope="project.inScope"
:projectId="projectId"
:certificateId="project.certificateId"
@applicationCredit="applicationCredit"
/>
</div>
<!-- 简介和目录 -->
<div class="intro-catalogue-container">
<div
id="content-title"
class="title"
:class="{'fixed-title-1': (fixedFlag && !isWeb), 'fixed-title-2': (fixedFlag && isWeb)}"
>
<span :class="{'focus': tabFlag}" @click="jumpIntro">简介</span>
<span :class="{'focus': !tabFlag}" @click="jumpCatalogue">目录</span>
</div>
<div v-show="fixedFlag" class="fixed-flag-height"></div>
<div id="intro-content" class="intro-content">
<BasicInfo
:projectNo="project.projectNo"
:credit="project.credit"
:level="project.level"
:scope="project.scope"
:startDate="project.startDate"
:endDate="project.endDate"
:organName="project.organName"
:remind="project.remind"
:projectCredit="project.projectCredit"
/>
<LearnKnow :mustKnow="project.mustKnow"></LearnKnow>
<CommonSpliteLine></CommonSpliteLine>
<ItemIntro :textContent="textContent" @itemIntroText="itemIntroText"></ItemIntro>
<ItemLeader v-if="projectLeader"
:projectLeader="projectLeader"
:leaderText="leaderText"
@changeLeaderText="changeLeaderText"
/>
<TeacterIntro v-if="doctorList.length" :doctorList="doctorList"></TeacterIntro>
</div>
<CommonSpliteLine></CommonSpliteLine>
<div id="catalogue-content" class="catalogue-content">
<div class="catalogue-title">目录</div>
<CellListDetail
:projectComponent="projectComponentDTOS"
:actionList="actionList"
:detailNum="detailNum"
:courseRequire="courseRequire"
/>
</div>
</div>
</div>
<Loading v-show="showLoading" />
<!-- 弹框 -->
<CommonDialog
:isShowDialog="isShowDialog"
:isSingle="isSingle"
:cancleBtnText="cancleBtnText"
:confirmBtnText="confirmBtnText"
:content="dialogContent"
@handlerAction="handlerAction"
/>
<!-- 弹框 -->
<ExjumperDialog
:isShowDialog="isShowEJDialog"
isSingle
needSubContent
content="确保您已经从云鹊平台购买优惠学习卡。跳转后请申请考试、激活学习卡,考试通过后申请证书。"
subContent="学分由中华医学电子音像出版社授予,如有问题可致电400-920-8899云鹊医客服咨询。"
cancleBtnText="我知道了"
@handlerAction="handlerEJAction"
/>
<ExjumperButton
@btnClick="beforeJumpToExam"
v-if="project.cmeType == 2 && project.inScope !== 0"
:btnText="project.currentProgress > 1 ? '参加考试' : '学完全部课程,可参加考试'"
:type="project.currentProgress > 1 ? 'primary' : 'disabled'"></ExjumperButton>
<div v-if="project.cmeType == 2 && project.inScope !== 0" style="padding-top: 30px"></div>
</div>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CommonDescription from "@/components/common/common-description";
import CommonSpliteLine from "@/components/common/common-splite-line";
import CellListDetail from "@/components/business/cell-list-detail";
// import NoPermContent from "@/components/business/no-perm-content";
// import CommonBannerVideo from "@/components/common/common-banner-video";
import CommonTcPlayer from "@/components/common/common-tcplayer";
import Loading from "@/components/common/common-loading";
import CmeStep from "@/components/cme/cme-step";
import BasicInfo from "@/components/cme/basic-info";
import LearnKnow from "@/components/cme/learn-know";
import ItemIntro from "@/components/cme/item-intro";
import ItemLeader from "@/components/cme/item-leader";
import TeacterIntro from "@/components/cme/teacter-intro";
import CommonDialog from "@/components/cme/common-dialog";
import ExjumperDialog from "@/components/cme/exjumper-dialog";
import ExjumperButton from "@/components/cme/exjumper-button";
import { getWebPageUrl, gotoPage } from "@/utils/index";
import { mapGetters, mapActions } from "vuex";
import vueFilters from "@/utils/filter";
import { Toast } from 'vant';
let cataOffsetTop = 0;
let intorOffsetTop = 0;
let titleOffsetHeight = 50;
export default {
data() {
return {
// token: "9B62E5874DA94979A54DB3E9DFC1443F",
isWeb: window.__isWeb,
textContent: "",
leaderText: "",
pageTitle: "",
isShowShare: true,
premissionFlag: false,
isSingle: false,
dialogContent: "", // 弹框内容
confirmBtnText: "", // 弹框按钮
cancleBtnText: "",
isShowDialog: false,
isShowEJDialog: false,
tabFlag: true, // 显示目录还是简介
fixedFlag: false, // 目录和简介是否固定
project: {
credit: "", // 学分
creditId: 0, // 学分Id
level: "", // 项目等级
scope: "", // 申请范围
remind: "", // 在不在范围提醒
startDate: 0, // 开始时间
endDate: 0, // 结束时间
organName: "", // 发起机构
projectName: "", // 项目名称
projectNo: "", // 项目编号
currentProgress: 0, // 项目进度
projectIntro: "", // 项目介绍
mustKnow: "", // 学习须知
studyNum: 0, // 学习人数
studyProgress: "0%", // 学习进度
subject: "", // 学科
status: 0, // 项目状态 5是进行中 10是已结束
certificateUrl: "", // 证书url
inScope: 0, // 是否在范围内判断
projectCredit: "", // 学分
certificateId: "0",
cmeType: 1, // 1: 自营项目; 2: 中华医学会二类
examBtnUrl: '', // 考试按钮跳转连接
firstIntoExam: false, // true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关
jumpToContents: false, // 是否跳转到目录
// cmeType=2时不显示进度,
// projectNo为空时不显示项目编号,
// projectLeader为空时不显示项目负责人,
// inScope=0时考试按钮不显示,
// currentProgress>1时考试按钮显示并可用
},
projectLeader: {},
doctorList: [],
from: "inner",
isBlack: false,
showLoading: false,
projectId: "1",
//componentId: 1,
//moduleId: 1,
contentList: [],
//moduleName: "",
bannerType: 1, // 1 图片 2视频
videoOptions: {
mp4: "",
autoplay: false, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的
coverpic: require("../images/video-cover.png"),
width: "415", //视频的显示宽度,请尽量使用视频分辨率宽度
height: "210" //视频的显示高度,请尽量使用视频分辨率高度
},
//projectStatus: 1, //1没有获得证书 2是获得全部证书
attachmentUrl: require("../images/banner-default.png"),
bgColor: "none",
navTitle: "项目详情",
// compTitle: "组件名称",
isShowNavbar: true,
isFixNavbar: true,
pointStyle: "activity",
projectComponentDTOS: [],
actionList: [],
detailNum: 0,
courseRequire: 0,
clientType: 0,
// currentProgress>1时考试按钮显示并可用
btnType: 'primary', // primary: 可跳转时(currentProgress = 1); disabled: 不可跳转时
btnText: '学完全部课程,可参加考试' // 参加考试(currentProgress = 1); 或者学完全部课程,可参加考试
};
},
components: {
CommonNavbar,
CommonDescription,
CommonSpliteLine,
CellListDetail,
Loading,
CommonTcPlayer,
CmeStep,
BasicInfo,
LearnKnow,
ItemIntro,
ItemLeader,
TeacterIntro,
CommonDialog,
ExjumperButton,
ExjumperDialog
},
computed: {
...mapGetters(["userInfo"]),
},
created() {
let _this = this;
this.from = this.$route.query.from || this.from || "native";
this.projectId = this.$route.query.id || 1;
this.courseRequire = this.$route.query.courseRequire;
window.__getUserInfo64Comp = function(param) {
// appVersion 安卓 3.2.2 iOS
console.log('__getUserInfo64Comp', param);
_this.token = param.userToken;
_this.setUserInfo(param);
_this.checkToken();
_this.getProjectParticularsV2();
};
_this.getUserInfo();
// if (__isWeb && process.env.BUILD_ENV == "development") {
// let param = {};
// __getUserInfo64Comp(param);
// }
if (__isWeb) {
_this.getProjectParticularsV2();
}
window.__refresh = function() {
_this.getUserInfo();
};
// 打开页面埋点
this.$sendBuriedData({
// action: "打开页面",
component_tag: `211#0#${this.projectId}#0`
});
},
mounted() {
window.addEventListener("scroll", this.scrollFun);
const _this = this;
},
beforeDestroyed() {
window.removeEventListener("scroll", this.scrollFun);
},
methods: {
...mapActions(["setUserInfo"]),
// 点击“参与考试”
beforeJumpToExam() {
// 如果是首次,则弹出弹框
if(this.project.firstIntoExam) {
this.isShowEJDialog = true;
} else {
this.jumpToExamAction();
}
},
// 第一次跳转弹框,点击时调用相应接口
handlerEJAction() {
this.isShowEJDialog = false;
this.jumpToExamAction();
this.firstIntoExamAction();
},
// 跳转到第三方考试页面
jumpToExamAction() {
// 判断版本号,如果小于3.4.0,则只做提示
let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join('');
if(appVersionNum < 340) {
Toast('请您下载新版本App');
return;
}
let paramList = [
{
key: "pageUrl",
value: this.project.examBtnUrl,
type: 4,
seqNo: 1
},
// 此字段不配置,则用原来的逻辑
{
key: "needCache",
value: '1', // 0不缓存,其它值都做缓存
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
},
// 首次进入考试时记录(点击‘我知道了’时调用)
firstIntoExamAction() {
let _this = this;
let param = {
token: _this.userInfo.userToken || this.token,
setEntry: true
};
this.NEW_POST(`cme/project/${_this.projectId}/firstIntoExam`, param).then(res => {
if (res.code == "000000") {
this.project.firstIntoExam = false;
}
});
},
//获取用户信息
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfo64Comp"
});
},
// token是否失效校验
checkToken() {
let _this = this;
let param = {
token: _this.userInfo.userToken || _this.token,
setEntry: true
};
this.GET("campaign/admin/task/checkToken", param).then(res => {
if (res.code !== "000000") {
//未登录 跳转登录页
console.log("跳登录");
rocNative.gotoLogin();
} else {
// if (!_this.premissionFlag) {
// _this.premissionFlag = true;
// _this.permission(); // 提示是否有机构和在申请范围内
// }
}
});
},
//(判断是否加入机构,是否为认证用户,是否在申请范围内)
permission() {
let _this = this;
let param = {
id: _this.projectId,
creditId: _this.project.creditId,
token: _this.userInfo.userToken || this.token,
setEntry: true
};
_this.NEW_POST("cme/credit/rangeCheck", param).then(res => {
if (res.code == "219004" || res.code == "219012") {
// 未加入机构 219004 不在申请范围 219012
this.dialogContent = `该项目仅对${_this.project.scope}的用户开放`;
this.cancleBtnText = "我知道了";
this.isShowDialog = true;
this.isSingle = true;
} else {
this.isShowDialog = false;
}
});
},
// 立即申请学分
applicationCredit() {
let _this = this;
let param = {
id: _this.projectId,
creditId: _this.project.creditId,
token: _this.userInfo.userToken || this.token,
setEntry: true
};
_this.NEW_POST("cme/credit/applyCheck", param).then(res => {
if (res.code == "000000") {
gotoPage(
_this,
`cme/#/credit-edit?creditId=${_this.project.creditId}`
);
} else if (res.code == "219004" || res.code == "219005") {
// 未加入机构 219004 未身份认证 219005 不在申请范围 219012
let params = {
__funcName: "__checkPermissions",
permCode: "009014"
};
rocNative.checkPermissions(params);
}
// else if (res.code == "219012") {
// this.dialogContent = res.message;
// this.cancleBtnText = "我知道了";
// this.isShowDialog = true;
// this.isSingle = true;
// }
else {
this.dialogContent = res.message;
this.cancleBtnText = "我知道了";
this.isShowDialog = true;
this.isSingle = true;
}
});
},
// 弹框按钮事件
handlerAction(data) {
this.isShowDialog = false;
},
scrollFun() {
let scrollTop =
document.body.scrollTop || document.documentElement.scrollTop;
let h = intorOffsetTop - 135
// 显示头部导航
if (scrollTop > 20) {
this.isBlack = true;
this.bgColor = "#fff";
} else {
this.isBlack = false;
this.bgColor = "none";
}
if(window.__isWeb) {
h = intorOffsetTop - 75;
} else if(window.__isIOS) {
h = intorOffsetTop - 140;
}
// 如果滚动高度大于简介头部(并减去tab高度),则进行固定
if(scrollTop > h) {
this.fixedFlag = true;
} else {
this.fixedFlag = false;
}
// 如果滚动高度大于
if(scrollTop > cataOffsetTop - 600) {
this.tabFlag = false;
} else {
this.tabFlag = true;
}
},
// 锚点到简介
jumpIntro() {
if(!this.tabFlag) {
this.tabFlag = true;
}
if(!this.fixedFlag) {
this.fixedFlag = true;
}
let h;
if (this.isWeb) {
h = intorOffsetTop - 30 - titleOffsetHeight;
} else {
h = intorOffsetTop - 85 - titleOffsetHeight;
}
window.scrollTo(0, h);
this.isBlack = true;
this.bgColor = "#fff";
this.$sendBuriedData({
component_tag: `211#211007#${this.projectId}`
});
},
// 锚点到目录
jumpCatalogue() {
if(this.tabFlag) {
this.tabFlag = false;
}
if(!this.fixedFlag) {
this.fixedFlag = true;
}
let h;
if (this.isWeb) {
h = cataOffsetTop - titleOffsetHeight;
} else {
h = cataOffsetTop - 100;
}
window.scrollTo(0, h);
this.isBlack = true;
this.bgColor = "#fff";
this.$sendBuriedData({
component_tag: `211#211008#${this.projectId}`
});
},
// 获取项目详情
getProjectParticularsV2() {
let _this = this;
let param = {
token: _this.userInfo.userToken || this.token,
setEntry: true
};
_this.showLoading = true;
this.NEW_GET(`cme/project/${_this.projectId}/info`, param).then(res => {
if (res.code == "000000") {
// 先设置视频URL再显示视频组件 ------------ BEGIN
if (res.data.attachmentType == 2) {
_this.videoOptions.mp4 = res.data.attachmentUrl;
} else {
_this.attachmentUrl = res.data.attachmentUrl;
}
_this.bannerType = res.data.attachmentType;
if (_this.bannerType == 2) {
_this.clientType = __isWeb ? 1 : __isAndroid ? 2 : 3;
}
// 先设置视频URL再显示视频组件 ------------ END
_this.project = res.data;
if (_this.project.projectIntro) {
_this.textContent =
_this.project.projectIntro.length > 70
? _this.project.projectIntro.slice(0, 70) + "..."
: this.project.projectIntro;
}
_this.project.mustKnow = _this.project.mustKnow.replace(
/(\r\n)|\r|\n/g,
"<br>"
);
_this.projectLeader = res.data.projectLeader;
if (_this.projectLeader && _this.projectLeader.info) {
_this.leaderText =
_this.projectLeader.info.length > 70
? _this.projectLeader.info.slice(0, 70) + "..."
: this.projectLeader.info;
}
_this.doctorList = res.data.doctorList;
//_this.projectStatus = res.data.projectStatus;
_this.projectComponentDTOS = _this.setListData(
res.data.projectComponentDTOS
);
if (!_this.isWeb && !_this.premissionFlag) {
_this.premissionFlag = true;
_this.permission(); // 提示是否有机构和在申请范围内
}
// TODO Add by Anndy Yang
if (_this.project.currentProgress == 2) {
this.$nextTick(() => {
window.scrollTo(0, 0);
});
}
setTimeout( () => {
cataOffsetTop = document.getElementById("catalogue-content").offsetTop;
intorOffsetTop = document.getElementById("intro-content").offsetTop;
console.log('getProjectParticularsV2', cataOffsetTop, intorOffsetTop);
// 直接跳转
if(_this.project.jumpToContents) {
setTimeout(() => {
this.jumpCatalogue();
}, 200);
}
}, 200);
setTimeout(() => {
_this.showLoading = false;
}, 800);
}
});
},
// 项目负责人--详情(收起)
changeLeaderText(data) {
let _this = this;
if (_this.projectLeader.info) {
if (!data.allTextFlag) {
_this.leaderText =
_this.projectLeader.info.length > 70
? _this.projectLeader.info.slice(0, 70) + "..."
: this.projectLeader.info;
} else {
_this.leaderText = _this.projectLeader.info;
}
}
},
// 项目介绍
itemIntroText(data) {
let _this = this;
if (_this.project.projectIntro) {
if (!data.allTextFlag) {
_this.textContent =
_this.project.projectIntro.length > 70
? _this.project.projectIntro.slice(0, 70) + "..."
: this.project.projectIntro;
} else {
_this.textContent = _this.project.projectIntro;
}
}
},
setListData(data) {
let _this = this;
let list = data;
let actionList = [];
let detailNum = 0;
for (let i = 0; i < list.length; i++) {
for (let j = 0; j < list[i].portalModuleDTOS.length; j++) {
detailNum++;
if (list[i].portalModuleDTOS[j].status === 2) {
list[i].portalModuleDTOS[j].value =
"共" + list[i].portalModuleDTOS[j].nodeCount + "节";
} else {
list[i].portalModuleDTOS[j].value = "尚未开始";
}
list[i].portalModuleDTOS[j].disabled =
list[i].portalModuleDTOS[j].status === 2 ? false : true;
//展开项记录
if (list[i].portalModuleDTOS[j].expandStatus == 1) {
actionList.push(list[i].portalModuleDTOS[j].expandKey);
}
for (
let z = 0;
z < list[i].portalModuleDTOS[j].contentList.length;
z++
) {
list[i].portalModuleDTOS[j].contentList[z].height = _this.getHight(
list[i].portalModuleDTOS[j].contentList[z]
);
}
}
}
_this.actionList = actionList;
_this.detailNum = detailNum;
console.log("list转为:", list, actionList, detailNum);
// list[0].portalModuleDTOS[3].contentList[0].certificateFlag = 2;
// list[0].portalModuleDTOS[3].contentList[1].certificateFlag = 2;
return list;
},
getHight(data) {
let len = vueFilters.strLength(data.name);
let certificate = data.certificateFlag;
if (len > 30 && certificate == 2) {
return "2";
} else if (len > 30 && certificate != 2) {
return 2;
} else if (len <= 30 && certificate == 2) {
return "1";
} else if (len <= 30 && certificate != 2) {
return 1;
}
}
}
};
</script>
<style lang="scss" scoped>
@import "../style/mixin";
.page-container-merge {
.nav-top .nav-title {
height: px2rem(0px);
// padding: px2rem(18px);
}
.banner-img {
display: inherit;
width: px2rem(375px);
height: px2rem(210px);
&-1 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(76px);
height: px2rem(30px);
}
&-5 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(76px);
height: px2rem(30px);
}
&-10 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(76px);
height: px2rem(30px);
}
}
.list-container {
// margin-bottom: px2rem(40px);
}
.intro-catalogue-container {
.title {
height: px2rem(50px);
line-height: px2rem(30px);
padding: 0 px2rem(15px);
border-bottom: 1px solid #f0f1f2;
span {
display: inline-block;
line-height: px2rem(15px);
font-size: px2rem(15px);
color: #979899;
padding-right: px2rem(35px);
}
span.focus {
position: relative;
color: #373839;
}
span.focus:after {
content: "";
position: absolute;
left: px2rem(7px);
bottom: px2rem(-14px);
background: #449284;
// border-bottom: px2rem(1px) solid #449284;
width: px2rem(10px);
height: px2rem(3px);
border-radius: px2rem(3px);
}
}
.title.fixed-title-1 {
position: fixed;
left: 0;
top: px2rem(60px);
background: #fff;
width: 100%;
z-index: 999;
}
.title.fixed-title-2 {
position: fixed;
left: 0;
top: px2rem(0px);
background: #fff;
width: 100%;
z-index: 999;
}
.catalogue-content {
padding: px2rem(30px) px2rem(15px) 0;
.catalogue-title {
font-size: px2rem(18px);
color: #373839;
font-weight: 700;
margin-bottom: px2rem(16px);
}
}
.fixed-flag-height {
height: px2rem(50px);
}
}
}
</style>
...@@ -31,10 +31,7 @@ ...@@ -31,10 +31,7 @@
:studyNum="project.studyNum" :studyNum="project.studyNum"
:subject="project.subject" :subject="project.subject"
/> />
<CommonAdertImg <CommonAdertImg :advertInfoList="advertInfoList" position="0" />
:advertInfoList="advertInfoList"
position="0"
/>
<!-- 步骤条 --> <!-- 步骤条 -->
<div v-if="project.cmeType != 2"> <div v-if="project.cmeType != 2">
<CmeStep <CmeStep
...@@ -76,7 +73,8 @@ ...@@ -76,7 +73,8 @@
<LearnKnow :mustKnow="project.mustKnow"></LearnKnow> <LearnKnow :mustKnow="project.mustKnow"></LearnKnow>
<CommonSpliteLine></CommonSpliteLine> <CommonSpliteLine></CommonSpliteLine>
<ItemIntro :textContent="textContent" @itemIntroText="itemIntroText"></ItemIntro> <ItemIntro :textContent="textContent" @itemIntroText="itemIntroText"></ItemIntro>
<ItemLeader v-if="projectLeader" <ItemLeader
v-if="projectLeader"
:projectLeader="projectLeader" :projectLeader="projectLeader"
:leaderText="leaderText" :leaderText="leaderText"
@changeLeaderText="changeLeaderText" @changeLeaderText="changeLeaderText"
...@@ -91,18 +89,14 @@ ...@@ -91,18 +89,14 @@
:actionList="actionList" :actionList="actionList"
:detailNum="detailNum" :detailNum="detailNum"
:courseRequire="courseRequire" :courseRequire="courseRequire"
:hasBindCard="hasBindCard"
/> />
</div> </div>
</div> </div>
<CommonAdertImg <CommonAdertImg needPadTop :advertInfoList="advertInfoList" position="1" />
needPadTop
:advertInfoList="advertInfoList"
position="1"
/>
<NoMoreContent /> <NoMoreContent />
<div v-if="detailNum <= 9" class="no-more-bottom"></div> <div v-if="detailNum <= 9" class="no-more-bottom"></div>
</div> </div>
<!-- 弹框 --> <!-- 弹框 -->
<CommonDialog <CommonDialog
...@@ -112,7 +106,7 @@ ...@@ -112,7 +106,7 @@
:confirmBtnText="confirmBtnText" :confirmBtnText="confirmBtnText"
:content="dialogContent" :content="dialogContent"
@handlerAction="handlerAction" @handlerAction="handlerAction"
/> />
<!-- 弹框 --> <!-- 弹框 -->
<ExjumperDialog <ExjumperDialog
:isShowDialog="isShowEJDialog" :isShowDialog="isShowEJDialog"
...@@ -125,12 +119,36 @@ ...@@ -125,12 +119,36 @@
/> />
<ExjumperButton <ExjumperButton
@btnClick="beforeJumpToExam" @btnClick="beforeJumpToExam"
v-if="project.cmeType == 2" v-if="project.cmeType == 2 && hasBindCard"
:btnText="project.currentProgress > 1 ? '参加考试' : '学完全部课程,可参加考试'" :btnText="project.currentProgress > 1 ? '参加考试' : '学完全部课程,可参加考试'"
:type="project.currentProgress > 1 ? 'primary' : 'disabled'"></ExjumperButton> :type="project.currentProgress > 1 ? 'primary' : 'disabled'"
></ExjumperButton>
<div v-if="project.cmeType == 2" style="padding-top: 30px"></div> <div v-if="project.cmeType == 2" style="padding-top: 30px"></div>
<CardPopup :cardInfo="cardInfo" :isShow="isShowPopup" @clickOverlay="clickOverlay" @cancle="jumpToCardList()" @confirm="confirm"></CardPopup>
<BindCardButton
v-if="project.cmeType == 2 && !hasBindCard"
:cardInfo="cardInfo"
@changeClick="changeClick"
@gotoBuy="confirm"
></BindCardButton>
<!--去激活-->
<ChangeCard
:changeErrorMsg="changeCardErrorMsg"
:isShow="showChangeCard"
@cancle="cancleChangeCard"
@confirm="changeCardAction">
</ChangeCard>
<!-- <CardPopup :cardInfo="cardInfo" :isShow="isShowPopup" @clickOverlay="clickOverlay" @cancle="jumpToCardList()" @confirm="confirm"></CardPopup> -->
<Loading v-show="showLoading" /> <Loading v-show="showLoading" />
<div>
<span ref="copyLinkBtn"
data-clipboard-action="copy"
class="cobyOrderSn"
:data-clipboard-text="this.project.cardKey"
@click="copyLink"
></span>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -159,9 +177,10 @@ import CommonAdertImg from "@/components/common/common-advert-img"; ...@@ -159,9 +177,10 @@ import CommonAdertImg from "@/components/common/common-advert-img";
import { getWebPageUrl, gotoPage } from "@/utils/index"; import { getWebPageUrl, gotoPage } from "@/utils/index";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
import vueFilters from "@/utils/filter"; import vueFilters from "@/utils/filter";
import { Toast } from 'vant'; import { Toast } from "vant";
import CardPopup from "@/components/cme/card-popup"; // import CardPopup from "@/components/cme/card-popup";
import BindCardButton from "@/components/cme/bind-card-button";
import ChangeCard from "@/components/cme/change-card";
let cataOffsetTop = 0; let cataOffsetTop = 0;
let intorOffsetTop = 0; let intorOffsetTop = 0;
let titleOffsetHeight = 50; let titleOffsetHeight = 50;
...@@ -206,16 +225,19 @@ export default { ...@@ -206,16 +225,19 @@ export default {
inScope: 0, // 是否在范围内判断 inScope: 0, // 是否在范围内判断
projectCredit: "", // 学分 projectCredit: "", // 学分
certificateId: "0", certificateId: "0",
cmeType: 1, // 1: 自营项目; 2: 中华医学会二类 cmeType: 1, // 1: 自营项目; 2: 中华医学会二类
examBtnUrl: '', // 考试按钮跳转连接 examBtnUrl: "", // 考试按钮跳转连接
firstIntoExam: false, // true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关 firstIntoExam: false, // true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关
jumpToContents: false, // 是否跳转到目录 jumpToContents: false, // 是否跳转到目录
cardStatus: 0,
cardKey: ''
// cmeType=2时不显示进度, // cmeType=2时不显示进度,
// projectNo为空时不显示项目编号, // projectNo为空时不显示项目编号,
// projectLeader为空时不显示项目负责人, // projectLeader为空时不显示项目负责人,
// inScope=0时考试按钮不显示, // inScope=0时考试按钮不显示,
// currentProgress>1时考试按钮显示并可用 // currentProgress>1时考试按钮显示并可用
}, },
hasBindCard: false, // 是否绑定过学习卡或激活过 没有绑定,则显示绑定按钮
projectLeader: {}, projectLeader: {},
doctorList: [], doctorList: [],
from: "inner", from: "inner",
...@@ -247,16 +269,18 @@ export default { ...@@ -247,16 +269,18 @@ export default {
detailNum: 0, detailNum: 0,
courseRequire: 0, courseRequire: 0,
clientType: 0, clientType: 0,
// currentProgress>1时考试按钮显示并可用 // currentProgress>1时考试按钮显示并可用
btnType: 'primary', // primary: 可跳转时(currentProgress = 1); disabled: 不可跳转时 btnType: "primary", // primary: 可跳转时(currentProgress = 1); disabled: 不可跳转时
btnText: '学完全部课程,可参加考试', // 参加考试(currentProgress = 1); 或者学完全部课程,可参加考试 btnText: "学完全部课程,可参加考试", // 参加考试(currentProgress = 1); 或者学完全部课程,可参加考试
provinceId: '', provinceId: "",
organizationId: '', organizationId: "",
isShowPopup: false, isShowPopup: false,
cardInfo: { cardInfo: {
id: 0 id: 0
}, },
advertInfoList: [], advertInfoList: [],
showChangeCard: false, //是否展示激活弹框,
changeCardErrorMsg: ""
}; };
}, },
components: { components: {
...@@ -275,13 +299,15 @@ export default { ...@@ -275,13 +299,15 @@ export default {
CommonDialog, CommonDialog,
ExjumperButton, ExjumperButton,
ExjumperDialog, ExjumperDialog,
CardPopup, // CardPopup,
CommonAdertImg, CommonAdertImg,
NoMoreContent NoMoreContent,
BindCardButton,
ChangeCard
}, },
computed: { computed: {
...mapGetters(["userInfo"]), ...mapGetters(["userInfo"])
}, },
created() { created() {
...@@ -296,7 +322,7 @@ export default { ...@@ -296,7 +322,7 @@ export default {
window.__getUserInfo64Comp = function(param) { window.__getUserInfo64Comp = function(param) {
// appVersion 安卓 3.2.2 iOS // appVersion 安卓 3.2.2 iOS
console.log('__getUserInfo64Comp', param); console.log("__getUserInfo64Comp", param);
_this.token = param.userToken; _this.token = param.userToken;
_this.setUserInfo(param); _this.setUserInfo(param);
_this.checkToken(); _this.checkToken();
...@@ -307,6 +333,7 @@ export default { ...@@ -307,6 +333,7 @@ export default {
// let param = {}; // let param = {};
// __getUserInfo64Comp(param); // __getUserInfo64Comp(param);
// } // }
if (__isWeb) { if (__isWeb) {
_this.getProjectParticularsV2(); _this.getProjectParticularsV2();
} }
...@@ -324,7 +351,7 @@ export default { ...@@ -324,7 +351,7 @@ export default {
// _this.showLoading = false; // _this.showLoading = false;
param.setEntry = true; param.setEntry = true;
_this.getProvinceIdByPosition(param); _this.getProvinceIdByPosition(param);
} };
// 调用广告位接口 // 调用广告位接口
this.getAdvertInfoList(); this.getAdvertInfoList();
...@@ -339,6 +366,48 @@ export default { ...@@ -339,6 +366,48 @@ export default {
methods: { methods: {
...mapActions(["setUserInfo"]), ...mapActions(["setUserInfo"]),
cancleChangeCard() {
this.showChangeCard = false;
},
// 激活 返回值:0绑定失败,1绑定成功
changeCardAction(cardKey) {
let _this = this;
let param = {
cardKey: cardKey,
cardType: 2,
portalProjectId: this.projectId,
setEntry: true
};
_this.changeCardErrorMsg = "";
this.POST("cme/projectCard/bind", param).then(res => {
if (res.code == "000000") {
if(res.data == 0) {
_this.changeCardErrorMsg = "请输入正确的激活码";
} else {
_this.showChangeCard = false;
Toast("激活成功,开始学习");
_this.getProjectParticularsV2();
}
} else {
}
}).catch( e => {
_this.changeCardErrorMsg = "请输入正确的激活码";
});
},
// 复制卡密
copyLink() {
let _this = this;
let clipboard = new this.clipboard(".cobyOrderSn");
clipboard.on("success", function() {
Toast("已成功复制激活码");
});
clipboard.on("error", function() {
Toast("复制激活码失败");
});
},
// 查询教培项目广告位配置信息 // 查询教培项目广告位配置信息
getAdvertInfoList() { getAdvertInfoList() {
let param = { let param = {
...@@ -346,29 +415,29 @@ export default { ...@@ -346,29 +415,29 @@ export default {
}; };
this.GET(`portal/jump/${this.projectId}/1`, param).then(res => { this.GET(`portal/jump/${this.projectId}/1`, param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.advertInfoList = res.data && res.data.list || []; this.advertInfoList = (res.data && res.data.list) || [];
console.log('advertInfoList', this.advertInfoList); console.log("advertInfoList", this.advertInfoList);
} }
}); });
}, },
// 点击弹层 // 点击弹层
clickOverlay() { clickOverlay() {
console.log('clickOverlay'); console.log("clickOverlay");
this.isShowPopup = false; // this.isShowPopup = false;
}, },
// 点击“参与考试” // 点击“参与考试”
beforeJumpToExam() { beforeJumpToExam() {
this.$sendBuriedData({ this.$sendBuriedData({
component_tag: `882#8824` component_tag: `882#8824`
}); });
// 如果是首次,则弹出弹框 // 如果是首次,则弹出弹框
if(this.project.firstIntoExam) { if (this.project.firstIntoExam) {
this.isShowEJDialog = true; this.isShowEJDialog = true;
} else { } else {
this.isBuy(2); // this.isBuy(2);
// this.jumpToExamAction(); this.jumpToCardList();
} }
}, },
...@@ -378,30 +447,30 @@ export default { ...@@ -378,30 +447,30 @@ export default {
component_tag: `883#8831` component_tag: `883#8831`
}); });
this.isShowEJDialog = false; this.isShowEJDialog = false;
this.isBuy(2); this.jumpToCardList();
// this.jumpToExamAction(); // this.isBuy(2);
this.firstIntoExamAction(); this.firstIntoExamAction();
}, },
// 判断用户是否购买过I类学习卡 // 判断用户是否购买过I类学习卡
isBuy(cardType) { // isBuy(cardType) {
this.showLoading = true; // this.showLoading = true;
// alert(this.showLoading) // // alert(this.showLoading)
let param = { // let param = {
cardType: cardType, // cardType: cardType,
setEntry: true, // setEntry: true,
} // }
this.GET("trade/storage/card/isBuy", param).then(res => { // this.GET("trade/storage/card/isBuy", param).then(res => {
if (res.code == "000000") { // if (res.code == "000000") {
// 如果购买过,则直接跳转到中华医学会页面 // // 如果购买过,则直接跳转到中华医学会页面
if(res.data) { // if(res.data) {
this.jumpToCardList(); // this.jumpToCardList();
} else { // } else {
this.preJumper(); // this.preJumper();
} // }
} // }
}); // });
}, // },
// 跳转II类学习详情页面(中华医学会项目详情页面) // 跳转II类学习详情页面(中华医学会项目详情页面)
jumpToCardList() { jumpToCardList() {
...@@ -410,80 +479,92 @@ export default { ...@@ -410,80 +479,92 @@ export default {
}); });
this.showLoading = false; this.showLoading = false;
this.isShowPopup = false; // this.isShowPopup = false;
// 判断版本号,如果小于3.4.0,则只做提示 // 判断版本号,如果小于3.4.0,则只做提示
let appVersion = this.userInfo.appVersion; let appVersion = this.userInfo.appVersion;
let appVersionNum = appVersion.split('.').join(''); let appVersionNum = appVersion.split(".").join("");
if(appVersionNum < 341) { if (appVersionNum < 341) {
Toast('请您下载新版本App'); Toast("请您下载新版本App");
return; return;
} }
if (window.__isWeb) { // 复制卡密
return; this.$refs.copyLinkBtn.click();
} else {
let pageUrl = this.project.examBtnUrl; setTimeout(() => {
let paramList = [ if (window.__isWeb) {
{ return;
key: "pageUrl", } else {
value: pageUrl, let pageUrl = this.project.examBtnUrl;
type: 4, let paramList = [
seqNo: 1 {
}, key: "pageUrl",
// 此字段不配置,则用原来的逻辑 value: pageUrl,
{ type: 4,
key: "needCache", seqNo: 1
value: '1', // 0不缓存,其它值都做缓存 },
type: 4, // 此字段不配置,则用原来的逻辑
seqNo: 1 {
} key: "needCache",
] value: "1", // 0不缓存,其它值都做缓存
rocNative.dispatchEventByModuleCode({ type: 4,
modeCode: "M300", seqNo: 1
jsonString: paramList }
}); ];
} rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}, 1000);
}, },
// 跳转前判断是否有机构,否则使用定位信息 // 跳转前判断是否有机构,否则使用定位信息
preJumper() { preJumper() {
if(this.organizationId != 0 && this.provinceId != 0) { // TODO 测试代码
this.getCardInfoByProvinceId(this.provinceId); if (window.__isWeb) {
this.getCardInfoByProvinceId(310);
} else { } else {
this.getPositionData(); if (this.organizationId != 0 && this.provinceId != 0) {
this.getCardInfoByProvinceId(this.provinceId);
} else {
this.getPositionData();
}
} }
}, },
// 根据位置信息获取省ID // 根据位置信息获取省ID
getProvinceIdByPosition(param) { getProvinceIdByPosition(param) {
param.setEntry = true; param.setEntry = true;
this.POST("aggregate/cme/convertLocationToProvinceId", param).then(res => { this.POST("aggregate/cme/convertLocationToProvinceId", param).then(
if (res.code == "000000") { res => {
this.getCardInfoByProvinceId(res.data); if (res.code == "000000") {
this.getCardInfoByProvinceId(res.data);
}
} }
}); );
}, },
// 根据省ID,获取学习卡信息 // 根据省ID,获取学习卡信息
getCardInfoByProvinceId(provinceId) { getCardInfoByProvinceId(provinceId) {
let param = { let param = {
"area": provinceId + '', area: provinceId + "",
"cardType": 2, cardType: 2,
"pageNum": 1, pageNum: 1,
"pageSize": 1 pageSize: 1
} };
this.POST("trade/goods/cardList", param).then(res => { this.POST("trade/goods/cardList", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.showLoading = false; this.showLoading = false;
this.isShowPopup = true; // this.isShowPopup = true;
this.cardInfo = res.data && res.data[0] || {id: 0} ; this.cardInfo = (res.data && res.data[0]) || { id: 0 };
} }
}); });
}, },
// 获取地理位置信息 // 获取地理位置信息
getPositionData() { getPositionData() {
// this.showLoading = true; // this.showLoading = true;
console.log('getPositionData'); console.log("getPositionData");
rocNative.getPositionData({ rocNative.getPositionData({
__funcName: "__getPositionData" __funcName: "__getPositionData"
}); });
...@@ -491,16 +572,28 @@ export default { ...@@ -491,16 +572,28 @@ export default {
// 跳转到原生的购买页面 // 跳转到原生的购买页面
confirm() { confirm() {
let appVersion = this.userInfo.appVersion || "";
let appVersionNum = appVersion.split(".").join("");
if (appVersionNum < 341) {
Toast("请您下载新版本App");
return;
}
this.$sendBuriedData({ this.$sendBuriedData({
component_tag: `885#8852` component_tag: `885#8852`
}); });
this.isShowPopup = false; // this.isShowPopup = false;
let pageUrl = this.project.examBtnUrl; // let pageUrl = this.project.examBtnUrl;
// 直接传入项目ID(projectId)
let projectId = this.project.projectId;
let pageUrl = getWebPageUrl(
`/cme/#/coop?id=${projectId}&cmeProjectId=${projectId}`
);
let paramList = [ let paramList = [
{ {
key: "className", key: "className",
value: "com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC", value:
"com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC",
type: 4, type: 4,
seqNo: 1 seqNo: 1
}, },
...@@ -513,6 +606,7 @@ export default { ...@@ -513,6 +606,7 @@ export default {
{ {
key: "courseUrl", key: "courseUrl",
value: encodeURIComponent(pageUrl), value: encodeURIComponent(pageUrl),
// value: projectId,
type: 4, type: 4,
seqNo: 1 seqNo: 1
} }
...@@ -522,33 +616,37 @@ export default { ...@@ -522,33 +616,37 @@ export default {
jsonString: paramList jsonString: paramList
}); });
}, },
// 跳转到原生的购买页面
// 跳转到第三方考试页面 confirmOld() {
jumpToExamAction() { this.$sendBuriedData({
// 判断版本号,如果小于3.4.0,则只做提示 component_tag: `885#8852`
let appVersion = this.userInfo.appVersion; });
let appVersionNum = appVersion.split('.').join('');
if(appVersionNum < 341) { // this.isShowPopup = false;
Toast('请您下载新版本App'); let pageUrl = this.project.examBtnUrl;
return;
}
let paramList = [ let paramList = [
{ {
key: "pageUrl", key: "className",
value: this.project.examBtnUrl, value:
"com.picahealth.yunque.activitys.studycard.StudyCardDetailActivity###PicaDo.LearningCardVC",
type: 4,
seqNo: 1
},
{
key: "goodId",
value: this.cardInfo.id,
type: 4, type: 4,
seqNo: 1 seqNo: 1
}, },
// 此字段不配置,则用原来的逻辑
{ {
key: "needCache", key: "courseUrl",
value: '1', // 0不缓存,其它值都做缓存 value: encodeURIComponent(pageUrl),
type: 4, type: 4,
seqNo: 1 seqNo: 1
} }
]; ];
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: "M300", modeCode: "M200",
jsonString: paramList jsonString: paramList
}); });
}, },
...@@ -560,11 +658,13 @@ export default { ...@@ -560,11 +658,13 @@ export default {
token: _this.userInfo.userToken || this.token, token: _this.userInfo.userToken || this.token,
setEntry: true setEntry: true
}; };
this.NEW_POST(`cme/project/${_this.projectId}/firstIntoExam`, param).then(res => { this.NEW_POST(`cme/project/${_this.projectId}/firstIntoExam`, param).then(
if (res.code == "000000") { res => {
this.project.firstIntoExam = false; if (res.code == "000000") {
this.project.firstIntoExam = false;
}
} }
}); );
}, },
//获取用户信息 //获取用户信息
...@@ -605,7 +705,10 @@ export default { ...@@ -605,7 +705,10 @@ export default {
setEntry: true setEntry: true
}; };
_this.NEW_POST("cme/credit/rangeCheck", param).then(res => { _this.NEW_POST("cme/credit/rangeCheck", param).then(res => {
if ( (_this.project.cmeType != 2) && (res.code == "219004" || res.code == "219012")) { if (
_this.project.cmeType != 2 &&
(res.code == "219004" || res.code == "219012")
) {
// 未加入机构 219004 不在申请范围 219012 // 未加入机构 219004 不在申请范围 219012
this.dialogContent = `该项目仅对${_this.project.scope}的用户开放`; this.dialogContent = `该项目仅对${_this.project.scope}的用户开放`;
this.cancleBtnText = "我知道了"; this.cancleBtnText = "我知道了";
...@@ -655,14 +758,21 @@ export default { ...@@ -655,14 +758,21 @@ export default {
}); });
}, },
//去激活
changeClick(msg) {
console.log("in changeClick");
this.showChangeCard = true;
},
// 弹框按钮事件 // 弹框按钮事件
handlerAction(data) { handlerAction(data) {
this.isShowDialog = false; this.isShowDialog = false;
}, },
scrollFun() { scrollFun() {
let scrollTop = let scrollTop =
document.body.scrollTop || document.documentElement.scrollTop; document.body.scrollTop || document.documentElement.scrollTop;
let h = intorOffsetTop - 135 let h = intorOffsetTop - 135;
// 显示头部导航 // 显示头部导航
if (scrollTop > 20) { if (scrollTop > 20) {
this.isBlack = true; this.isBlack = true;
...@@ -672,36 +782,35 @@ export default { ...@@ -672,36 +782,35 @@ export default {
this.bgColor = "none"; this.bgColor = "none";
} }
if(window.__isWeb) { if (window.__isWeb) {
h = intorOffsetTop - 75; h = intorOffsetTop - 75;
} else if(window.__isIOS) { } else if (window.__isIOS) {
h = intorOffsetTop - 140; h = intorOffsetTop - 140;
} }
// 如果滚动高度大于简介头部(并减去tab高度),则进行固定 // 如果滚动高度大于简介头部(并减去tab高度),则进行固定
if(scrollTop > h) { if (scrollTop > h) {
this.fixedFlag = true; this.fixedFlag = true;
} else { } else {
this.fixedFlag = false; this.fixedFlag = false;
} }
// 如果滚动高度大于 // 如果滚动高度大于
if(scrollTop > cataOffsetTop - 600) { if (scrollTop > cataOffsetTop - 600) {
this.tabFlag = false; this.tabFlag = false;
} else { } else {
this.tabFlag = true; this.tabFlag = true;
} }
}, },
// 锚点到简介 // 锚点到简介
jumpIntro() { jumpIntro() {
if(!this.tabFlag) { if (!this.tabFlag) {
this.tabFlag = true; this.tabFlag = true;
} }
if(!this.fixedFlag) { if (!this.fixedFlag) {
this.fixedFlag = true; this.fixedFlag = true;
} }
let h; let h;
if (this.isWeb) { if (this.isWeb) {
h = intorOffsetTop - 30 - titleOffsetHeight; h = intorOffsetTop - 30 - titleOffsetHeight;
...@@ -718,10 +827,10 @@ export default { ...@@ -718,10 +827,10 @@ export default {
// 锚点到目录 // 锚点到目录
jumpCatalogue() { jumpCatalogue() {
if(this.tabFlag) { if (this.tabFlag) {
this.tabFlag = false; this.tabFlag = false;
} }
if(!this.fixedFlag) { if (!this.fixedFlag) {
this.fixedFlag = true; this.fixedFlag = true;
} }
let h; let h;
...@@ -802,23 +911,36 @@ export default { ...@@ -802,23 +911,36 @@ export default {
_this.organizationId = res.data.positionModel.organizationId; _this.organizationId = res.data.positionModel.organizationId;
_this.courseRequire = res.data.courseRequire || 0; _this.courseRequire = res.data.courseRequire || 0;
setTimeout( () => { setTimeout(() => {
cataOffsetTop = document.getElementById("catalogue-content").offsetTop; cataOffsetTop = document.getElementById("catalogue-content")
.offsetTop;
intorOffsetTop = document.getElementById("intro-content").offsetTop; intorOffsetTop = document.getElementById("intro-content").offsetTop;
console.log('getProjectParticularsV2', cataOffsetTop, intorOffsetTop); console.log(
"getProjectParticularsV2",
cataOffsetTop,
intorOffsetTop
);
// 直接跳转 // 直接跳转
if(_this.project.jumpToContents) { if (_this.project.jumpToContents) {
setTimeout(() => { setTimeout(() => {
this.jumpCatalogue(); this.jumpCatalogue();
}, 200); }, 200);
} }
_this.copyLink();
}, 200); }, 200);
setTimeout(() => { setTimeout(() => {
_this.showLoading = false; _this.showLoading = false;
}, 800); }, 800);
// 如果 hasBindCard 为false,则获取卡信息 0:未绑卡 1:已绑卡
_this.hasBindCard = res.data.cardStatus == 0 ? false : true;
if (!_this.hasBindCard) {
_this.preJumper();
}
} }
}); });
}, },
// 项目负责人--详情(收起) // 项目负责人--详情(收起)
changeLeaderText(data) { changeLeaderText(data) {
let _this = this; let _this = this;
...@@ -833,6 +955,7 @@ export default { ...@@ -833,6 +955,7 @@ export default {
} }
} }
}, },
// 项目介绍 // 项目介绍
itemIntroText(data) { itemIntroText(data) {
let _this = this; let _this = this;
...@@ -938,7 +1061,6 @@ export default { ...@@ -938,7 +1061,6 @@ export default {
// margin-bottom: px2rem(40px); // margin-bottom: px2rem(40px);
} }
.intro-catalogue-container { .intro-catalogue-container {
.title { .title {
height: px2rem(50px); height: px2rem(50px);
line-height: px2rem(30px); line-height: px2rem(30px);
......
<template>
<!-- 组件详情页面:模块列表及其下面的元件列表 -->
<div class="page-container-parent">
<CommonNavbar
:bgColor="bgColor"
v-show="isShowNavbar"
:isBlack="isBlack"
:title="navTitle"
:isFixNavbar="isFixNavbar"
:burialPoint="pointStyle"
borderStyle="0px solid #fff"
:backMethod="from"
></CommonNavbar>
<div class="page-content list-container">
<!-- <img
v-if="bannerType == 1"
class="banner-img"
src="https://files.yunqueyi.com/image/jpeg/common/20190214153449966.jpg"
>-->
<!-- <div v-if="bannerType == 1" class="page-content-img-container"> -->
<div v-if="bannerType == 1" class="page-content-img-container">
<img class="banner-img" :src="attachmentUrl">
<img v-show="pStatus == 1" class="banner-img-1" src="../images/status-join.png">
<img v-show="pStatus == 5" class="banner-img-5" src="../images/status-keep-on.png">
<img v-show="pStatus == 10" class="banner-img-10" src="../images/status-end.png">
</div>
<!-- <CommonBannerVideo v-if="bannerType == 1" :videoOptions="videoOptions"></CommonBannerVideo> -->
<CommonTcPlayer v-if="bannerType == 2" style="flex" :options="videoOptions"></CommonTcPlayer>
<CommonDescription :descTitle="projectName" :value="projectIntro"></CommonDescription>
<CommonSpliteLine></CommonSpliteLine>
<!-- <CellListItem :paramData="contentList" :moduleName="moduleName"></CellListItem> -->
<div v-if="visibleFlag == 1" class="project-num">{{ childrenList.length }} 个项目</div>
<CoopListItem v-if="visibleFlag == 1" :paramData="childrenList" :coopType="1" :tabTo="3" :isShow="isShow"></CoopListItem>
<NoPermContent v-if="visibleFlag == 2"></NoPermContent>
</div>
<Loading v-show="showLoading"/>
</div>
</template>
<script>
import CommonNavbar from "@/components/common/common-navbar";
import CommonDescription from "@/components/common/common-description";
import CommonSpliteLine from "@/components/common/common-splite-line";
import CommonTitle from "@/components/common/common-title";
import CommonBannerVideo from "@/components/common/common-banner-video";
import CommonTcPlayer from "@/components/common/common-tcplayer";
import CoopListItem from "@/components/business/coop-list-item";
import NoPermContent from "@/components/business/no-perm-content";
import Loading from "@/components/common/common-loading";
import { mapGetters, mapActions } from "vuex";
import vueFilters from '@/utils/filter'
export default {
data() {
return {
from: "inner",
isBlack: false,
showLoading: false,
projectId: 1,
componentId: 1,
moduleId: 1,
contentList: [],
moduleName: "",
bannerType: 1,
videoOptions: {
mp4: "",
// mp4: "https://pica-pro.oss-cn-shanghai.aliyuncs.com/2019/03/05/movie.mp4",
// "mp4": "http://1258717429.vod2.myqcloud.com/24a74910vodcq1258717429/7c37c18f5285890786204547811/9BFIyaoXYAcA.mp4",
// "m3u8": "http://2157.liveplay.myqcloud.com/2157_358535a.m3u8",
// "flv": "http://2157.liveplay.myqcloud.com/live/2157_358535a.flv", //增加了一个flv的播放地址,用于PC平台的播放 请替换成实际可用的播放地址
autoplay: false, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的
coverpic: require("../images/video-cover.png"),
width: "415", //视频的显示宽度,请尽量使用视频分辨率宽度
height: "210" //视频的显示高度,请尽量使用视频分辨率高度
},
// projectStatus: 1, //1没有获得证书 2是获得全部证书
pStatus: 0, // 项目状态 1是参加中 5是进行中 10是已结束
projectIntro: "",
projectName: "",
attachmentUrl: require("../images/banner-default.png"),
bgColor: "none",
navTitle: "",
compTitle: "组件名称",
isShowNavbar: true,
isShow: true,
isFixNavbar: true,
pointStyle: "activity",
descTitle: "规定从何处开始选取。如果是负数",
description:
"必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。也就是说那么它规定从数组尾部开始算起的位置。" +
" 也就是说那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,必需。规定从何处开始选取。如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,-1 指最后一个元素,-2 指倒数第二个元素,以此类推第二个元素。",
childrenList: [],
visibleFlag: 0,
entryId: 0,
};
},
components: {
CommonNavbar,
CommonDescription,
CommonSpliteLine,
CommonTitle,
CommonBannerVideo,
Loading,
CommonTcPlayer,
CoopListItem,
NoPermContent,
},
computed: {
...mapGetters(["userInfo"])
},
created() {
let _this = this;
this.from = this.$route.query.from || this.from || "native";
this.projectId = this.$route.query.projectId;
this.componentId = this.$route.query.componentId;
this.moduleId = this.$route.query.moduleId;
this.moduleName = this.$route.query.moduleName;
this.entryId = this.$route.query.entryId;
window.__getUserInfo4Comp = function(param) {
_this.token = param.userToken;
_this.setUserInfo(param);
_this.checkToken();
// _this.getContentList(_this.moduleId);
// _this.getComponentInfoById(_this.componentId);
_this.getChildrenProject(_this.entryId);
};
// this.getCoopInfo(this.projectId);
window.__refresh = function() {
// _this.getContentList(_this.moduleId);
_this.getChildrenProject(_this.entryId);
};
_this.getUserInfo();
},
mounted() {
window.addEventListener("scroll", this.scrollFun);
},
beforeDestroyed() {
window.removeEventListener("scroll", this.scrollFun);
},
methods: {
...mapActions(["setUserInfo"]),
//获取用户信息
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfo4Comp"
});
if (window.__isWeb && process.env.BUILD_ENV == "development") {
console.log('projectId',this.projectId);
let param = {
userToken: 'ED9F3381362641858B2B1F90C92A8050',
};
__getUserInfo4Comp(param);
}
},
// 获取单个模块信息
getComponentInfoById(componentId) {
let _this = this;
let param = {
componentId: componentId,
token: _this.userInfo.userToken,
setEntry: true
};
this.GET("portal/portalApp/component", param).then(res => {
if (res.code == "000000") {
_this.attachmentUrl = res.data.imageUrl;
_this.projectIntro = res.data.introduce;
_this.projectName = res.data.name;
}
});
},
// 获取单个项目信息
getCoopInfo(projectId) {
let _this = this;
let param = {
portalProjectId: projectId,
token: _this.userInfo.userToken,
setEntry: true
};
this.GET("portal/portalApp/queryProjectParticulars", param).then(res => {
if (res.code == "000000") {
// 先设置视频URL再显示视频组件 ------------ BEGIN
if (res.data.attachmentType == 2) {
_this.videoOptions.mp4 = res.data.attachmentUrl;
} else {
_this.attachmentUrl = res.data.attachmentUrl;
}
_this.bannerType = res.data.attachmentType;
// 先设置视频URL再显示视频组件 ------------ END
_this.projectIntro = res.data.projectIntro;
_this.projectName = res.data.projectName;
_this.pStatus = res.data.status;
}
});
},
checkToken() {
let _this = this;
let param = {
token: _this.userInfo.userToken,
setEntry: true,
};
this.GET("campaign/admin/task/checkToken", param).then(res => {
if(res.code !== '000000') {
//未登录 跳转登录页
console.log('跳登录');
rocNative.gotoLogin();
}
});
},
getChildrenProject(entryId) {
let _this = this;
let param = {
entryId: entryId,
token: _this.userInfo.userToken,
setEntry: true
};
this.GET("portal/portalApp/getEntryInfo", param).then(res => {
if (res.code == "000000") {
_this.visibleFlag = res.data.learnableFlag;
if (res.data.attachmentType == 2) {
_this.videoOptions.mp4 = res.data.attachmentUrl;
} else {
_this.attachmentUrl = res.data.attachmentUrl;
}
_this.bannerType = res.data.attachmentType;
// 先设置视频URL再显示视频组件 ------------ END
_this.projectIntro = res.data.entryIntro;
_this.projectName = res.data.entryName;
_this.pStatus = res.data.status;
_this.childrenList = res.data.projectList;
}
});
},
scrollFun() {
let scrollTop =
document.body.scrollTop || document.documentElement.scrollTop;
if (scrollTop > 20) {
this.isBlack = true;
this.bgColor = "#fff";
} else {
this.isBlack = false;
this.bgColor = "none";
}
}
}
};
</script>
<style lang="scss" >
@import "../style/mixin";
.page-container-parent {
.nav-top .nav-title {
height: px2rem(0px);
padding: px2rem(18px);
}
.banner-img {
display: inherit;
width: px2rem(375px);
height: px2rem(210px);
&-1 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(76px);
height: px2rem(30px);
}
&-5 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(76px);
height: px2rem(30px);
}
&-10 {
position: absolute;
left: 0;
top: px2rem(180px);
width: px2rem(148px);
height: px2rem(30px);
}
}
.list-container {
// margin-bottom: px2rem(40px);
}
.project-num {
position: relative;
height: px2rem(18px);
margin: px2rem(20px) 0 px2rem(15px) px2rem(15px);
font-weight: 500;
font-size: px2rem(18px);
line-height: px2rem(18px);
}
}
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册