浏览代码

Merge branch 'fix' into debug

Karsa 2 年之前
父节点
当前提交
b1e83002f5
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/views/priceDriven/detail.vue

+ 4 - 4
src/views/priceDriven/detail.vue

@@ -42,7 +42,7 @@ const getClassify = async () => {
     // 分享进入的默认品种
     if (route.query.default_classify_first) {
       let index = varietiesList.value.findIndex(
-        (_) => _.id === route.query.default_classify_first
+        (_) => _.id === Number(route.query.default_classify_first)
       );
       index === -1 ? errorLinkHandle() : changeClassify(varietiesList.value[index],'share');
     } else {
@@ -63,7 +63,7 @@ const changeClassify = (item,type='') => {
   //分享进入的默认品种
   if (type === 'share') {
     let index = classifyList.value.findIndex(
-      (_) => _.chart_permission_id === route.query.default_classify_sub
+      (_) => _.chart_permission_id === Number(route.query.default_classify_sub)
     );
     index === -1 ? errorLinkHandle() : changeSubClassify(classifyList.value[index]);
   } else {
@@ -76,6 +76,7 @@ const changeSubClassify = ({ chart_permission_id, chart_permission_name }) => {
   select_classify_subtitle.value = chart_permission_name;
   document.body.scrollTop = document.documentElement.scrollTop = 0;
   getDetail();
+  getQrCodeHandle();
 };
 /* 过期link处理 */
 const errorLinkHandle = () => {
@@ -110,7 +111,7 @@ const getDetail = async () => {
   //向小程序发送分享数据
   wx.miniProgram.postMessage({
     data: {
-      title: `${select_classify_subtitle}价格驱动`,
+      title: `${select_classify_subtitle.value}价格驱动`,
       path:'/pages/pricedriven/pricedriven',
       params:{
         default_classify_first: select_classify_first.value,
@@ -205,7 +206,6 @@ const getQrCodeHandle = async () => {
     qrCode.value = res.data;
   }
 };
-getQrCodeHandle();
 
 
 /* 重绘固定头宽度 */