!128 【缺陷修复】

Merge pull request !128 from puhui999/dev
pull/129/MERGE
芋道源码 2024-12-07 02:16:23 +00:00 committed by Gitee
commit dcd63dd54e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 49 additions and 48 deletions

View File

@ -72,10 +72,9 @@
<script setup> <script setup>
import sheep from '@/sheep'; import sheep from '@/sheep';
import { onLoad, onReachBottom } from '@dcloudio/uni-app'; import { onLoad, onPageScroll, onReachBottom } from '@dcloudio/uni-app';
import { reactive } from 'vue'; import { reactive } from 'vue';
import _ from 'lodash-es'; import _ from 'lodash-es';
import { onPageScroll } from '@dcloudio/uni-app';
import { resetPagination } from '@/sheep/util'; import { resetPagination } from '@/sheep/util';
import BrokerageApi from '@/sheep/api/trade/brokerage'; import BrokerageApi from '@/sheep/api/trade/brokerage';
import { fen2yuan } from '../../sheep/hooks/useGoods'; import { fen2yuan } from '../../sheep/hooks/useGoods';
@ -104,15 +103,15 @@
const tabMaps = [ const tabMaps = [
{ {
name: '全部', name: '全部',
value: 'all', value: -1,
}, },
{ {
name: '待结算', name: '待结算',
value: '0', // value: 0, //
}, },
{ {
name: '已结算', name: '已结算',
value: '1', // value: 1, //
}, },
]; ];
@ -126,12 +125,17 @@
// //
async function getOrderList() { async function getOrderList() {
state.loadStatus = 'loading'; state.loadStatus = 'loading';
let { code, data } = await BrokerageApi.getBrokerageRecordPage({ const tab = tabMaps[state.currentTab];
const queryParams = {
pageSize: state.pagination.pageSize, pageSize: state.pagination.pageSize,
pageNo: state.pagination.pageNo, pageNo: state.pagination.pageNo,
bizType: 1, // 广 bizType: 1, // 广
status: state.currentTab > 0 ? state.currentTab : undefined, status: tab.value,
}); }
if (tab.value < 0) {
delete queryParams.status;
}
const { code, data } = await BrokerageApi.getBrokerageRecordPage(queryParams);
if (code !== 0) { if (code !== 0) {
return; return;
} }

View File

@ -6,6 +6,7 @@
v-if="data.type === 'text'" v-if="data.type === 'text'"
class="nav-title inline" class="nav-title inline"
:style="[{ color: data.textColor, width: width }]" :style="[{ color: data.textColor, width: width }]"
@tap="sheep.$router.go(data.url)"
> >
{{ data.text }} {{ data.text }}
</view> </view>

View File

@ -7,11 +7,31 @@
> >
<view class="title-content"> <view class="title-content">
<!-- 主标题 --> <!-- 主标题 -->
<view v-if="data.title" class="title-text" :style="[titleStyles]">{{ data.title }}</view> <view
v-if="data.title"
:style="{
fontSize: `${data.titleSize}px`,
fontWeight: data.titleWeight,
color: data.titleColor,
textAlign: data.textAlign
}"
class="title-text"
>
{{ data.title }}
</view>
<!-- 副标题 --> <!-- 副标题 -->
<view v-if="data.description" :style="[descStyles]" class="sub-title-text">{{ <view
data.description v-if="data.description"
}}</view> :style="{
fontSize: `${data.descriptionSize}px`,
fontWeight: data.descriptionWeight,
color: data.descriptionColor,
textAlign: data.textAlign
}"
class="sub-title-text"
>
{{ data.description }}
</view>
</view> </view>
<!-- 查看更多 --> <!-- 查看更多 -->
<view <view
@ -20,7 +40,7 @@
@tap="sheep.$router.go(data.more.url)" @tap="sheep.$router.go(data.more.url)"
:style="{ color: data.descriptionColor }" :style="{ color: data.descriptionColor }"
> >
<view class="more-text" v-if="data.more.type !== 'icon'">{{ data.more.text }} </view> <view v-if="data.more.type !== 'icon'" class="more-text">{{ data.more.text }}</view>
<text class="_icon-forward" v-if="data.more.type !== 'text'"></text> <text class="_icon-forward" v-if="data.more.type !== 'text'"></text>
</view> </view>
</view> </view>
@ -30,7 +50,7 @@
/** /**
* 标题栏 * 标题栏
*/ */
import { reactive, computed } from 'vue'; import { computed, reactive } from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
// //
@ -64,40 +84,13 @@
background: bgType === 'img' ? `url(${bgImg}) no-repeat top center / 100% 100%` : bgColor, background: bgType === 'img' ? `url(${bgImg}) no-repeat top center / 100% 100%` : bgColor,
}; };
}); });
//
const titleStyles = {
color: props.data.titleColor,
fontSize: `${props.data.titleSize}px`,
textAlign: props.data.textAlign,
};
//
const descStyles = {
color: props.data.descriptionColor,
textAlign: props.data.textAlign,
fontSize: `${props.data.descriptionSize}px`,
fontWeight: `${props.data.descriptionWeight}`,
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ss-title-wrap { .ss-title-wrap {
height: 80rpx; min-height: 80rpx;
position: relative; position: relative;
.title-content {
.title-text {
font-size: 30rpx;
color: #333;
}
.sub-title-text {
font-size: 22rpx;
color: #999;
}
}
.more-box { .more-box {
white-space: nowrap; white-space: nowrap;
font-size: 22rpx; font-size: 22rpx;

View File

@ -168,12 +168,11 @@ const decryptSpm = (spm) => {
shareParams.platform = platformMap[shareParamsArray[3] - 1]; shareParams.platform = platformMap[shareParamsArray[3] - 1];
shareParams.from = fromMap[shareParamsArray[4] - 1]; shareParams.from = fromMap[shareParamsArray[4] - 1];
if (shareParams.shareId !== 0) { if (shareParams.shareId !== 0) {
// 记录分享者编号
uni.setStorageSync('shareId', shareParams.shareId);
// 已登录 绑定推广员 // 已登录 绑定推广员
if (user.isLogin) { if (!!user.isLogin) {
bindBrokerageUser(shareParams.shareId); bindBrokerageUser(shareParams.shareId);
} else {
// 记录分享者编号
uni.setStorageSync('shareId', shareParams.shareId);
} }
} }
@ -190,8 +189,12 @@ const bindBrokerageUser = async (val = undefined) => {
if (!shareId) { if (!shareId) {
return; return;
} }
await BrokerageApi.bindBrokerageUser({ bindUserId: shareId }); const { data, msg } = await BrokerageApi.bindBrokerageUser({ bindUserId: shareId });
uni.removeStorageSync('shareId'); // 绑定成功后清除缓存
if (!!data || msg.includes('不能绑定自己')) {
uni.removeStorageSync('shareId');
}
} catch (e) { } catch (e) {
console.error(e); console.error(e);
} }