Browse Source

我的推广功能完善,等待接口

master
chenkun 10 months ago
parent
commit
81c77b44b4
11 changed files with 155 additions and 64 deletions
  1. +0
    -0
      centerSvgIcon/addBankCard.svg
  2. +0
    -0
      centerSvgIcon/bangZhu.svg
  3. +0
    -0
      centerSvgIcon/certifiedIndividual.svg
  4. +0
    -0
      centerSvgIcon/outLogin.svg
  5. +0
    -0
      centerSvgIcon/promotionRecord.svg
  6. +0
    -0
      centerSvgIcon/purse.svg
  7. +0
    -0
      centerSvgIcon/releaseRecord.svg
  8. +0
    -1
      pages/index/center.vue
  9. +2
    -2
      pages_mine/mine/promotionRecord.vue
  10. +149
    -60
      pages_mine/mine/sonPage/promotion/promotionDetail.vue
  11. +4
    -1
      pages_mine/mine/sonPage/promotion/promotionRecordList.vue

centerSvgIcon/银行卡.svg → centerSvgIcon/addBankCard.svg View File


centerSvgIcon/帮助反馈.svg → centerSvgIcon/bangZhu.svg View File


centerSvgIcon/实名信息审核.svg → centerSvgIcon/certifiedIndividual.svg View File


centerSvgIcon/退出登录.svg → centerSvgIcon/outLogin.svg View File


centerSvgIcon/推广.svg → centerSvgIcon/promotionRecord.svg View File


centerSvgIcon/钱包.svg → centerSvgIcon/purse.svg View File


centerSvgIcon/发布.svg → centerSvgIcon/releaseRecord.svg View File


+ 0
- 1
pages/index/center.vue View File

@ -153,7 +153,6 @@
name: 'outLogin',
imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/4ae3829e-7b07-4d6d-843b-2b7fd21ba346.svg',
title: '退出登录',
gotoPageUrl: '/mine/promotionRecord'
},
],
}


+ 2
- 2
pages_mine/mine/promotionRecord.vue View File

@ -13,7 +13,7 @@
<!--搜索条件-->
<view class="search">
<!--搜索框-->
<view style="width:40%;height:100%">
<view style="width:30%;height:100%">
<uv-input v-model="queryParams.keyWord" placeholder="请输入内容" border="surround" clearable
@change="keyWordChange"></uv-input>
</view>
@ -161,7 +161,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
width: 25%;
width: 30%;
height: 80%;
border: 1px solid #b0b2b3;
padding: 5rpx;


+ 149
- 60
pages_mine/mine/sonPage/promotion/promotionDetail.vue View File

@ -12,13 +12,16 @@
<!--基本信息-->
<view style="" class="basicInfo">
<view class="item">
<view class="label">春天的气息丫丫</view>
<view class="value">???</view>
</view>
<!-- <view class="item">
<view class="label">推广名称</view>
<view class="value">
<uv-input v-model="form.promotionName" placeholder="请输入推广名称" border="bottom" type='number'
clearable></uv-input>
</view>
</view> -->
<view class="item">
<view class="label">价格</view>
<view class="value">{{item.price}}</view>
<view class="value">{{item.goTiime}}</view>
</view>
<view class="item">
<view class="label">时长</view>
@ -27,13 +30,13 @@
<view class="item">
<view class="label">联系方式</view>
<view class="value">
<uv-input v-model="form.phone" placeholder="请输入联系方式" border="bottom" type='number'
<uv-input v-model="item.phone" placeholder="请输入联系方式" border="bottom" type='number'
clearable></uv-input>
</view>
</view>
<view class="item">
<view class="label">剩余推广时长</view>
<view class="value">{{item.price}}</view>
<view class="value">{{item.remainingPromotionTime}}</view>
</view>
<view>推广作品</view>
<view style="width: 30%;height: 300rpx;border-radius: 20rpx;overflow: hidden;">
@ -42,8 +45,15 @@
</view>
<!-- ActionSheet 操作菜单 -->
<uv-action-sheet ref="actionSheet" :actions="upTopList" title="选择推广时长" @select="select" @close="close"
:closeOnClickAction="false">
</uv-action-sheet>
<!--确认发布弹框-->
<uv-popup ref="popup" mode="center" custom-style="height: 400rpx;" :closeOnClickOverlay="false">
<uv-popup ref="popup" mode="center" custom-style="height: 400rpx;">
<view class="content">
<view class="title">
推广选项
@ -51,22 +61,13 @@
<!--付费周期-->
<view style="" class="payCycle">
<view>付费周期</view>
<view style="width: 200rpx;height:50rpx">
<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
<view style="display: flex;justify-content: flex-start" @click="openPicker">
<span style="margin-right: 10rpx;">{{ form.cycle }}</span>
<uv-icon name="arrow-down" color="#2979ff" size="28"></uv-icon>
</view>
</view>
<view>{{item.day}}</view>
</view>
<!--金额-->
<view style="width:100%;display: flex;justify-content: space-between;align-items: center;">
<view>金额</view>
<view style="width: 200rpx;height:50rpx">
<uv-input type="number" placeholder="请输入内容" border="surround" v-model="form.moneyValue"
@change="moneyValueChange"></uv-input>
</view>
<view>{{item.money}}</view>
</view>
<!--确认推广按钮-->
@ -77,9 +78,26 @@
</view>
</view>
</uv-popup>
<uv-toast ref="toast"></uv-toast>
<!--支付弹框-->
<confirmationPopup ref="confirmationPopup" title="提示" @confirm="pay" confirmText="确认支付">
<view class="confirmationPopup">
<image src="/static/image/publish/pay.png" style="width: 150rpx;height: 150rpx;" mode=""></image>
<view class="info">
确认支付{{ item.money }}可置顶{{ item.day }}
</view>
</view>
</confirmationPopup>
<!-- 平台审核弹框 -->
<confirmationPopup ref="confirmationPopupUpload" title="提示" confirmText="确认" @confirm="confirm()">
<view class="confirmationPopup">
<image src="/static/image/publish/upload.png" style="width: 150rpx;height: 150rpx;" mode=""></image>
<view class="info">
已由平台进行审核时间周期为24小时
</view>
</view>
</confirmationPopup>
</view>
<!--继续推广按钮-->
@ -90,22 +108,26 @@
</template>
<script>
import dayjs from 'dayjs';
import '../../../../common.css'; // CSS
import confirmationPopup from '@/components/toast/confirmationPopup.vue'
export default {
onLoad: function(options) {
const id = options.id;
onLoad(options) {
// if (options.item) {
// let item = JSON.parse(decodeURIComponent(options.item));
// }
this.item.id = options.item.id
},
components: {
confirmationPopup
},
data() {
return {
columns: [
['一天', '两天', '三天']
],
form: {
moneyValue: 0,
cycle: '一天',
phone: '',
upTopList: [],
item: {
day: 0,
money: 0,
},
item: {},
param: {
type: 'default',
title: '结束后跳转标签页',
@ -115,54 +137,112 @@
};
},
mounted() {
this.getData()
// this.getData()
this.indexTopPayList()
},
methods: {
// 广
getData() {
this.$api('infoGetPromotionDetail', {}, res => {
this.$api('infoGetPromotionDetail', item.id, res => {
if (res.code == 200) {
this.item = res.result.records
// 广
const futureTime = dayjs(this.item.createTime).add(this.item.goTiime, "day")
//
const now = dayjs();
//
const diff = futureTime.diff(now);
//
const hours = Math.floor(diff / 3600000);
const days = Math.floor(hours / 24);
//
if (days > 0) {
// 24
const remainingHours = hours % 24;
console.log(`${days}${remainingHours}小时`);
this.item.remainingPromotionTime = `${days}${remainingHours}小时`
} else {
// 24
console.log(`${hours}小时`);
this.item.remainingPromotionTime = `${hours}小时`
}
}
})
},
openPicker() {
this.$refs.picker.open();
//
indexTopPayList() {
this.$api('indexTopPayList', res => {
if (res.code == 200) {
for (var i = 0; i < res.result.length; i++) {
this.upTopList.push({
name: '置顶' + res.result[i].day + '天' + res.result[i].money + '元'
})
}
}
})
},
select(e) {
console.log('选中该项:', e);
// 使
const matches = e.name.match(/\d+/g).map(Number);
//
if (matches) {
console.log(matches, "matches");
this.item.day = matches[0]
this.item.money = matches[1]
}
console.log(this.item.day, "this.item.day");
this.$refs.actionSheet.close() //
this.$refs.popup.open() //
},
// ActionSheet
close() {
this.$refs.actionSheet.close() //
// this.$refs.popup.open() //
},
//
confirm(e) {
console.log('confirm', e);
this.form.cycle = e.value[0]
uni.navigateTo({
url: "/pages/index/index"
})
},
// 广
continueToPromotion() {
this.$refs.popup.open();
},
//
moneyValueChange(e) {
console.log('moneyValue', e);
this.form.moneyValue = e
if(this.item.phone=='' || this.item.phone==null){
return uni.showToast({
title: '请输入联系电话',
icon : 'none'
})
}
this.$refs.actionSheet.open();
},
// 广
//
confirmPromotion() {
console.log('确认推广', this.form);
this.$refs.toast.show({
...this.param,
complete() {
this.param.url && uni.navigateTo({
url: this.param.url
})
this.$refs.confirmationPopup.open()
this.$refs.popup.close()
},
pay() {
this.$refs.confirmationPopupUpload.open()
return
//
this.$api('ConfirmPromotion', {}, res => {
if (res.code == 200) {
//
this.$refs.confirmationPopupUpload.open()
}
})
// this.$refs.toast.show()
// this.$api('ConfirmPromotion', {}, res => {
// if (res.code == 200) {
// //
// }
// })
}
},
}
}
</script>
@ -198,6 +278,14 @@
.item {
display: flex;
justify-content: space-between;
.label {
width: 60%;
}
.value {
width: 40%;
}
}
}
@ -238,7 +326,8 @@
justify-content: space-between;
align-items: center;
}
.confirmBtn{
.confirmBtn {
width: 50%;
height: 80rpx;
text-align: center;


+ 4
- 1
pages_mine/mine/sonPage/promotion/promotionRecordList.vue View File

@ -11,7 +11,7 @@
</view>
<view class="createBy">
<view class="">
推广时效{{ item.goTiime }}小时
推广时效{{ item.goTiime }}
</view>
</view>
</view>
@ -43,6 +43,9 @@ export default {
uni.navigateTo({
url: '/pages_mine' + `/mine/sonPage/promotion/promotionDetail?id=${item.id}`
})
// uni.navigateTo({
// url: `/pages_mine/mine/sonPage/promotion/promotionDetail?item=${encodeURIComponent(JSON.stringify(item))}`
// })
},
},


Loading…
Cancel
Save