Explorar o código

Merge branch 'fix' into debug

Karsa %!s(int64=2) %!d(string=hai) anos
pai
achega
b1e83002f5
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  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) {
     if (route.query.default_classify_first) {
       let index = varietiesList.value.findIndex(
       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');
       index === -1 ? errorLinkHandle() : changeClassify(varietiesList.value[index],'share');
     } else {
     } else {
@@ -63,7 +63,7 @@ const changeClassify = (item,type='') => {
   //分享进入的默认品种
   //分享进入的默认品种
   if (type === 'share') {
   if (type === 'share') {
     let index = classifyList.value.findIndex(
     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]);
     index === -1 ? errorLinkHandle() : changeSubClassify(classifyList.value[index]);
   } else {
   } else {
@@ -76,6 +76,7 @@ const changeSubClassify = ({ chart_permission_id, chart_permission_name }) => {
   select_classify_subtitle.value = chart_permission_name;
   select_classify_subtitle.value = chart_permission_name;
   document.body.scrollTop = document.documentElement.scrollTop = 0;
   document.body.scrollTop = document.documentElement.scrollTop = 0;
   getDetail();
   getDetail();
+  getQrCodeHandle();
 };
 };
 /* 过期link处理 */
 /* 过期link处理 */
 const errorLinkHandle = () => {
 const errorLinkHandle = () => {
@@ -110,7 +111,7 @@ const getDetail = async () => {
   //向小程序发送分享数据
   //向小程序发送分享数据
   wx.miniProgram.postMessage({
   wx.miniProgram.postMessage({
     data: {
     data: {
-      title: `${select_classify_subtitle}价格驱动`,
+      title: `${select_classify_subtitle.value}价格驱动`,
       path:'/pages/pricedriven/pricedriven',
       path:'/pages/pricedriven/pricedriven',
       params:{
       params:{
         default_classify_first: select_classify_first.value,
         default_classify_first: select_classify_first.value,
@@ -205,7 +206,6 @@ const getQrCodeHandle = async () => {
     qrCode.value = res.data;
     qrCode.value = res.data;
   }
   }
 };
 };
-getQrCodeHandle();
 
 
 
 
 /* 重绘固定头宽度 */
 /* 重绘固定头宽度 */