|
@@ -78,6 +78,7 @@
|
|
|
<script>
|
|
|
import Constant from "@/constant";
|
|
|
import workAttendanceApi from "@/api/business/workAttendance";
|
|
|
+import companyInfoApi from "@/api/base/companyInfo";
|
|
|
import userApi from "@/api/sys/user";
|
|
|
|
|
|
import "nprogress/nprogress.css"; // progress bar style
|
|
@@ -181,11 +182,33 @@ export default {
|
|
|
},
|
|
|
openView() {
|
|
|
var companyId = this.user.companyId;
|
|
|
+ //默认企业版
|
|
|
var qrtext =
|
|
|
- process.env.VUE_APP_COMPANY_HEALTH_QY_URL +
|
|
|
- "?companyId=" +
|
|
|
- companyId;
|
|
|
- window.open(qrtext);
|
|
|
+ process.env.VUE_APP_COMPANY_HEALTH_QY_URL + "?companyId=" + companyId;
|
|
|
+
|
|
|
+ companyInfoApi.edit(companyId).then(function(response) {
|
|
|
+ var jsonData = response.data;
|
|
|
+ self.loading = false;
|
|
|
+
|
|
|
+ if (jsonData.result) {
|
|
|
+ var dpUrl = jsonData.data.wallUrl;
|
|
|
+ if (dpUrl == "" || dpUrl == null) {
|
|
|
+ if ("2" == jsonData.data.type) {
|
|
|
+ qrtext =
|
|
|
+ process.env.VUE_APP_COMPANY_HEALTH_XY_URL +
|
|
|
+ "?companyId=" +
|
|
|
+ companyId;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //填写了固定地址wallUrl
|
|
|
+ qrtext = dpUrl + "?companyId=" + companyId;
|
|
|
+ }
|
|
|
+
|
|
|
+ window.open(qrtext);
|
|
|
+ } else {
|
|
|
+ self.$message.error(jsonData.message + "");
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
async mounted() {
|
|
@@ -223,7 +246,7 @@ export default {
|
|
|
//day
|
|
|
});
|
|
|
|
|
|
- userApi.userInfo().then(resp => {
|
|
|
+ await userApi.userInfo().then(resp => {
|
|
|
if (resp.data.result) {
|
|
|
this.user = resp.data.data;
|
|
|
}
|