cxz-lastest-commit
This commit is contained in:
parent
1067eb8c72
commit
80923c3d66
|
@ -16,13 +16,9 @@ Page({
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// console.log('---->',options);
|
// console.log('---->',options);
|
||||||
const id = options.id;
|
const id = options.id;
|
||||||
const promotionCode = options.promotionCode;
|
const isPromo = options.isPromo;
|
||||||
this.setData({ id,promotionCode });
|
console.log(isPromo)
|
||||||
if (promotionCode) { // 切换到‘我的推广码状态’
|
this.setData({ id ,activeTab: Number(isPromo) });
|
||||||
this.setData({
|
|
||||||
activeTab: 1
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 每次页面展示都刷新(含navigateBack返回时)
|
// 每次页面展示都刷新(含navigateBack返回时)
|
||||||
|
|
|
@ -59,7 +59,7 @@ Page({
|
||||||
const projectId = e.currentTarget.dataset.id;
|
const projectId = e.currentTarget.dataset.id;
|
||||||
// 带上 id 跳转到详情页(路径按你的项目结构调整)
|
// 带上 id 跳转到详情页(路径按你的项目结构调整)
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}`
|
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&isPromo=0`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
/* 结算周期背景 */
|
/* 结算周期背景 */
|
||||||
.text-wrapper {
|
.text-wrapper {
|
||||||
padding: 7.5rpx 0;
|
padding: 10.5rpx 0;
|
||||||
background-color: #ffebeb;
|
background-color: #ffebeb;
|
||||||
border-radius: 9.38rpx;
|
border-radius: 9.38rpx;
|
||||||
width: 112.5rpx;
|
width: 112.5rpx;
|
||||||
|
|
|
@ -9,7 +9,6 @@ Page({
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
userProjectList: [],
|
userProjectList: [],
|
||||||
promotionCode: true,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,7 +31,7 @@ Page({
|
||||||
// 获取项目列表
|
// 获取项目列表
|
||||||
getProgram() {
|
getProgram() {
|
||||||
wx.request({
|
wx.request({
|
||||||
url: baseUrl + '/project/query/card',
|
url: baseUrl + '/project/get/running',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
header: {
|
header: {
|
||||||
Authorization: wx.getStorageSync('token')
|
Authorization: wx.getStorageSync('token')
|
||||||
|
@ -52,10 +51,15 @@ Page({
|
||||||
gotoProjectDetail(e){
|
gotoProjectDetail(e){
|
||||||
// 获取data-id中的值
|
// 获取data-id中的值
|
||||||
const projectId = e.currentTarget.dataset.id;
|
const projectId = e.currentTarget.dataset.id;
|
||||||
const promotionCode = this.data.promotionCode;
|
|
||||||
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&promotionCode=${promotionCode}`,
|
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&isPromo=0`,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 子元素点击事件,阻止冒泡
|
||||||
|
stopEventPropagation(e) {
|
||||||
|
const projectId = e.currentTarget.dataset.id;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&isPromo=1`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<view class="flex-col justify-start page">
|
<view class="flex-col justify-start page">
|
||||||
<view class="flex-col list">
|
<view class="flex-col list">
|
||||||
<view class="flex-col list-item mt-15" wx:for="{{ userProjectList }}" wx:for-item="item" wx:for-index="index" wx:key="index" >
|
<view class="flex-col list-item mt-15" wx:for="{{ userProjectList }}" wx:for-item="item" wx:for-index="index" wx:key="index" bind:tap="gotoProjectDetail" data-id="{{ item.projectId }}">
|
||||||
<view class="flex-row justify-between items-center self-stretch">
|
<view class="flex-row justify-between items-center self-stretch">
|
||||||
<view class="flex-row items-center">
|
<view class="flex-row items-center">
|
||||||
<image
|
<image
|
||||||
|
@ -15,19 +15,17 @@
|
||||||
<image
|
<image
|
||||||
class="image_2"
|
class="image_2"
|
||||||
src="./images/yjt.png"
|
src="./images/yjt.png"
|
||||||
bind:tap="gotoProjectDetail"
|
|
||||||
data-id="{{ item.id }}"
|
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-14 flex-row group_2 equal-division">
|
<view class="mt-14 flex-row group_2 equal-division">
|
||||||
<view class="flex-row justify-center items-center section equal-division-item" bind:tap="gotoProjectDetail" data-id="{{ item.id }}">
|
<view class="flex-row justify-center items-center section equal-division-item" data-id="{{ item.projectId }}"catch:tap="stopEventPropagation">
|
||||||
<image
|
<image
|
||||||
class="image_3"
|
class="image_3"
|
||||||
src="./images/tgm.png"
|
src="./images/tgm.png"
|
||||||
/>
|
/>
|
||||||
<text class="ml-4 font_3">推广码</text>
|
<text class="ml-4 font_3">推广码</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="ml-14 flex-row items-center section equal-division-item_2" bind:tap="gotoSubSettlement" data-id="{{ item.id }}">
|
<view class="ml-14 flex-row items-center section equal-division-item_2" bind:tap="gotoSubSettlement" data-id="{{ item.projectId }}">
|
||||||
<image
|
<image
|
||||||
class="shrink-0 image_4"
|
class="shrink-0 image_4"
|
||||||
src="./images/jsmx.png"
|
src="./images/jsmx.png"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user