Commit bb98d689 by chenwq

系统订阅,跳产品详情

1 parent eae5f4a7
......@@ -42,7 +42,7 @@
</button>
</block>
</image>
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}" webp class="img-item {{item.className?item.className:''}} img-item{{index}} img-item{{actNum}}{{index}}" src="{{item.url?item.url:item}}?v={{img_version}}" />
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}" mode="widthFix" webp class="img-item {{item.className?item.className:''}}" src="{{item.url?item.url:item}}?v={{img_version}}" />
</block>
<view class="occupancy" wx:if="{{!isShare}}">
<!-- padding底部 占位元素 -->
......
......@@ -2,6 +2,7 @@
import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
import { IMG_URL } from "~/utils/constantData.js";
import { scenceList } from '~/pages/tab/index/constant/data'
import { senceData, productData } from '~/pages/tab/index/constant/senceData'
import USERAPI from '~/api/usersApi/index'
import utils from '~/utils/util.js'
import {getActiveApi} from "~/api/viewprod"
......@@ -59,12 +60,17 @@ Page({
this.isgetAuthphone()
if (!options || utils.isEmptyObj(options)) return
let { actNum, activeNavIdx, isShare,sharephone } = options
let { actNum, activeNavIdx, isShare,sharephone, sceneCode } = options
if(isShare){
wx.hideHomeButton()
}
let sceneObj = scenceList.find(item => item.sceneid == actNum)
let sceneObj = {}
if(actNum != 99) {
sceneObj = scenceList.find(item => item.sceneid == actNum)
} else {
sceneObj = productData[99].find(item => item.sceneCode == sceneCode)
}
let proInfo = sceneObj?.productList[activeNavIdx]
this.setData({
......@@ -99,9 +105,11 @@ Page({
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
let { actNum = 0, activeNavIdx = 0,phone=123 } = options;
let sceneObj = scenceList.find(item => item.sceneid == actNum)
let { actNum = 0, activeNavIdx = 0,phone=123, sceneid99=0 } = options;
let data = actNum != 99 ? scenceList : productData[actNum]
let value = actNum != 99 ? actNum : sceneid99
let sceneObj = data.find(item => item.sceneid == value)
let proInfo = sceneObj?.productList[activeNavIdx]
this.setData({
......
......@@ -21,7 +21,6 @@ const videoList0 = [
name: '数字无忧卡服务30秒',
manufacturer:'嘀加智慧',
view:1004,
},
{
videoUrl: `${videoBaseUrl}video/digital_card_money3.mp4`,
......
......@@ -54,9 +54,11 @@ const subscriptionSystemData = [
// 产品详情图片
productImgs: productImgs0,
"sceneCode":"SC008",
sceneid: 0,
productList: [
{
id: 0,
sceneid: 0,
currentIndex: 0,
img: 'product-img1',
proName: '客户活跃代运营',
......@@ -90,6 +92,7 @@ const subscriptionSystemData = [
},
{
id: 1,
sceneid: 0,
currentIndex: 1,
img: 'product-img1',
proName: '定保数字化招揽',
......@@ -130,11 +133,13 @@ const subscriptionSystemData = [
//场景详情图片
sceneImgs: sceneImgs5,
"sceneCode":"SC006",
sceneid: 1,
// 产品详情图片
productImgs: productImgs0,
productList: [
{
id: 2,
sceneid: 1,
currentIndex: 0,
img: 'product-img1',
proName: '事故车救援服务',
......@@ -173,6 +178,7 @@ const subscriptionSystemData = [
{
name: '膨胀金活动',
"sceneCode":"SC005",
sceneid: 2,
//场景详情图片
sceneImgs: sceneImgs4,
// 产品详情图片
......@@ -180,6 +186,7 @@ const subscriptionSystemData = [
productList: [
{
id: 3,
sceneid: 2,
currentIndex: 0,
proName: '膨胀金',
price: '100',
......@@ -204,6 +211,7 @@ const subscriptionSystemData = [
{
name: '数字化转型案例',
"sceneCode":"SC007",
sceneid: 3,
productList: [],
videoList: videoList0.concat(videoList1).concat(videoList4)
}
......
......@@ -91,8 +91,8 @@ Page({
//登录的用户手机号
let userInfo = wx.$storage.get("userInfo");
let obj = {
// || 99
actNum: isNaN(detail.scenIndex) ? 99 : detail.scenIndex, //选中的场景 没有就是订阅系统的
sceneid99: detail.sceneid,
activeNavIdx: detail.id, //选中的产品,
phone: userInfo.phone
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!