修改返利状态,视频样式
parent
f18fe8a08f
commit
15ba1ce3c6
|
|
@ -1,17 +1,19 @@
|
|||
<template>
|
||||
<view class="px-30rpx pt-20rpx">
|
||||
<view class="sticky top-0 z-1500 bg-hex-F5F5F5 rounded-full grid grid-cols-3 text-28rpx text-hex-333 leading-40rpx py-10rpx">
|
||||
<view
|
||||
class="sticky top-0 z-1500 bg-hex-F5F5F5 rounded-full grid grid-cols-3 text-28rpx text-hex-333 leading-40rpx py-10rpx">
|
||||
<view class="text-center">时间</view>
|
||||
<view class="text-center">返利</view>
|
||||
<view class="text-center">状态</view>
|
||||
</view>
|
||||
<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
|
||||
:up="upOption">
|
||||
<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
|
||||
:down="downOption" :up="upOption">
|
||||
<block v-for="(item,index) in dataList" :key="index">
|
||||
<view class="grid grid-cols-3 text-28rpx text-h666 py-18rpx mt-16rpx ">
|
||||
<view class="text-center line-1 ">{{item.created_at*1000 | date('yyyy-mm-dd')}}</view>
|
||||
<view class="text-center price-text">{{item.money}}</view>
|
||||
<view class="text-center ">{{item.status |StatusText}}</view>
|
||||
<!-- <view class="text-center ">{{item.status |StatusText}}</view> -->
|
||||
<view class="text-center ">{{item.status_text}}</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
</block>
|
||||
|
|
|
|||
|
|
@ -29,43 +29,24 @@
|
|||
</cu-swiper> -->
|
||||
<!-- -->
|
||||
<block v-if="!playShow">
|
||||
<swiper
|
||||
class="swipers h-750rpx"
|
||||
circular="true"
|
||||
autoplay="true"
|
||||
indicator-dots="true"
|
||||
indicator-color="#ffffff"
|
||||
indicator-active-color="#82848a"
|
||||
>
|
||||
<swiper class="swipers h-750rpx" circular="true" autoplay="true" indicator-dots="true"
|
||||
indicator-color="#ffffff" indicator-active-color="#82848a">
|
||||
<swiper-item class="flex justify-center w-full h-full" v-for="(item, index) in bannerList" :key="index">
|
||||
<view class="w-full h-full relative">
|
||||
<image
|
||||
v-if="item.type == 'video'"
|
||||
class="w-90rpx h-90rpx translate-center z-40"
|
||||
src="/static/images/icon_play.png"
|
||||
@tap="playVideo"
|
||||
/>
|
||||
<image class="w-full h-full" :src="`${item.image}?x-oss-process=image/resize,w_750/quality,q_90`" mode="aspectFill" />
|
||||
<image v-if="item.type == 'video'" class="w-90rpx h-90rpx translate-center z-40"
|
||||
src="/static/images/icon_play.png" @tap="playVideo" />
|
||||
<image class="w-full h-full" :src="`${item.image}?x-oss-process=image/resize,w_750/quality,q_90`"
|
||||
mode="aspectFill" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</block>
|
||||
<!-- -->
|
||||
<view class="relative" v-else>
|
||||
<video
|
||||
object-fit="object-fit"
|
||||
class="w-750rpx h-750rpx"
|
||||
:enable-progress-gesture="false"
|
||||
id="myVideo"
|
||||
v-if="media.length"
|
||||
:src="`${media[0]}`"
|
||||
controls
|
||||
>
|
||||
<cover-image
|
||||
@click="pauseVideo"
|
||||
class="absolute right-30rpx top-30rpx w-60rpx h-60rpx"
|
||||
src="/static/images/app/app_update_close.png"
|
||||
></cover-image>
|
||||
<video class="w-750rpx h-750rpx" :enable-progress-gesture="false" id="myVideo" v-if="media.length"
|
||||
:src="`${media[0]}`" controls>
|
||||
<cover-image @click="pauseVideo" class="absolute right-30rpx top-30rpx w-60rpx h-60rpx"
|
||||
src="/static/images/app/app_update_close.png"></cover-image>
|
||||
</video>
|
||||
</view>
|
||||
|
||||
|
|
@ -74,9 +55,8 @@
|
|||
<view class="text-txBase text-lg pt-base">{{ detail.name }}</view>
|
||||
<view class="flex items-center mt-10rpx" v-if="!isPoints">
|
||||
<!-- <view class="text-md text-txGray">{{ detail.subtitle }}</view> -->
|
||||
<view class="px-13rpx bg-primary bg-opacity-20 text-md rounded-10rpx text-primary" v-if="detail.sales_value"
|
||||
>成长值:{{ detail.sales_value }}</view
|
||||
>
|
||||
<view class="px-13rpx bg-primary bg-opacity-20 text-md rounded-10rpx text-primary"
|
||||
v-if="detail.sales_value">成长值:{{ detail.sales_value }}</view>
|
||||
</view>
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="text-txBase text-md flex items-center">
|
||||
|
|
@ -88,12 +68,8 @@
|
|||
</view>
|
||||
<view class="flex items-center mt-base">
|
||||
<!-- <image class="w-36rpx h-36rpx" src="/static/images/user/collection.png" mode=""></image> -->
|
||||
<u-icon
|
||||
:color="products.is_collected ? '#FC8720' : ''"
|
||||
size="36"
|
||||
:name="products.is_collected ? 'star-fill' : 'star'"
|
||||
@tap="onCollection"
|
||||
></u-icon>
|
||||
<u-icon :color="products.is_collected ? '#FC8720' : ''" size="36"
|
||||
:name="products.is_collected ? 'star-fill' : 'star'" @tap="onCollection"></u-icon>
|
||||
<view class="text-txBase text-md ml-10rpx leading-0">收藏</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -103,7 +79,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="flex items-center justify-between bg-white px-41rpx py-32rpx" @tap="showSpecFun(0)" v-if="specs.length && !isPoints">
|
||||
<view class="flex items-center justify-between bg-white px-41rpx py-32rpx" @tap="showSpecFun(0)"
|
||||
v-if="specs.length && !isPoints">
|
||||
<view class="flex items-center text-txBase text-md">
|
||||
<view class="font-extrabold">选择</view>
|
||||
<view class="ml-base">{{ activeSkuText }}</view>
|
||||
|
|
@ -179,26 +156,19 @@
|
|||
<view class="flex pb-20rpx items-center">
|
||||
<view class="flex rtl">
|
||||
<view
|
||||
class="rounded-full w-90rpx h-90rpx bg-hex-cacaca border border-4rpx border-hex-fff box-content flex items-center justify-center"
|
||||
>
|
||||
class="rounded-full w-90rpx h-90rpx bg-hex-cacaca border border-4rpx border-hex-fff box-content flex items-center justify-center">
|
||||
<u-icon name="plus" color="#ffffff" size="40"></u-icon>
|
||||
</view>
|
||||
<view
|
||||
class="rounded-full w-90rpx h-90rpx bg-rose-100 border border-4rpx border-hex-fff box-content"
|
||||
v-for="(item, index) in bargainLogs"
|
||||
:key="index"
|
||||
:class="{ '-ml-30rpx': index != bargainLogs.length - 1 }"
|
||||
>
|
||||
<view class="rounded-full w-90rpx h-90rpx bg-rose-100 border border-4rpx border-hex-fff box-content"
|
||||
v-for="(item, index) in bargainLogs" :key="index"
|
||||
:class="{ '-ml-30rpx': index != bargainLogs.length - 1 }">
|
||||
<u-avatar :size="90" :src="item.avatar"></u-avatar>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-1"></view>
|
||||
<view class="">
|
||||
<view
|
||||
class="bg-hex-e81300 rounded-8rpx px-40rpx h-60rpx leading-60rpx text-white text-30rpx"
|
||||
@click="$u.routeAuth('/pages/bargain/invite', { skuId: skuId })"
|
||||
>邀请好友</view
|
||||
>
|
||||
<view class="bg-hex-e81300 rounded-8rpx px-40rpx h-60rpx leading-60rpx text-white text-30rpx"
|
||||
@click="$u.routeAuth('/pages/bargain/invite', { skuId: skuId })">邀请好友</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -280,25 +250,26 @@
|
|||
<!-- 底部导航栏 -->
|
||||
<view class="flex items-center fixed right-0 left-0 bottom-0 bottom w-full bg-white shadow cu-bar tabbar">
|
||||
<block v-if="isPoints">
|
||||
<view class="mx-base bg-bgSubtitle rounded-lg w-full h-66rpx text-center leading-66rpx text-md text-white" @click="onDHClick">兑换</view>
|
||||
<view class="mx-base bg-bgSubtitle rounded-lg w-full h-66rpx text-center leading-66rpx text-md text-white"
|
||||
@click="onDHClick">兑换</view>
|
||||
</block>
|
||||
|
||||
<block v-else>
|
||||
<view class="w-300rpx flex justify-around ml-20rpx">
|
||||
<view class="flex items-center justify-center h-full flex-col flex-1" @tap="$u.routeAuth('/pages/auxiliary_cart/index')">
|
||||
<view class="flex items-center justify-center h-full flex-col flex-1"
|
||||
@tap="$u.routeAuth('/pages/auxiliary_cart/index')">
|
||||
<view class="relative w-48rpx h-48rpx flex justify-center items-center">
|
||||
<image class="w-full h-full" src="/static/images/cart/short-cart.png" mode="scaleToFill" />
|
||||
<view
|
||||
v-if="cartList.length"
|
||||
class="absolute -right-24rpx -top-10rpx leading-36rpx text-sm text-bgSubtitle bg-white text-center w-36rpx h-36rpx border border-b border-txBorder border-txbordergSubtitle rounded-full"
|
||||
>
|
||||
<view v-if="cartList.length"
|
||||
class="absolute -right-24rpx -top-10rpx leading-36rpx text-sm text-bgSubtitle bg-white text-center w-36rpx h-36rpx border border-b border-txBorder border-txbordergSubtitle rounded-full">
|
||||
{{ cartList.length }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-26rpx mt-10rpx">购物车</view>
|
||||
</view>
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view class="flex items-center justify-center flex-col h-full flex-1" @tap="$u.route(`/pages/web_view/index?url=${service}`)">
|
||||
<view class="flex items-center justify-center flex-col h-full flex-1"
|
||||
@tap="$u.route(`/pages/web_view/index?url=${service}`)">
|
||||
<view class="w-48rpx h-48rpx flex justify-center items-center">
|
||||
<u-icon name="kefu-ermai" color="#000" size="48"></u-icon>
|
||||
</view>
|
||||
|
|
@ -306,7 +277,8 @@
|
|||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button open-type="contact" hover-class="none" class="cu-btn flex items-center justify-center flex-col h-full flex-1">
|
||||
<button open-type="contact" hover-class="none"
|
||||
class="cu-btn flex items-center justify-center flex-col h-full flex-1">
|
||||
<view class="w-48rpx h-48rpx flex justify-center items-center">
|
||||
<u-icon name="kefu-ermai" color="#000" size="48"></u-icon>
|
||||
</view>
|
||||
|
|
@ -325,12 +297,11 @@
|
|||
</view>
|
||||
|
||||
<view class="flex items-center justify-center flex-1">
|
||||
<view class="bg-primary rounded-lg w-180rpx h-66rpx text-center leading-66rpx text-md text-white" @tap="showSpecFun(1)"
|
||||
>加入购物车</view
|
||||
>
|
||||
<view class="ml-base bg-bgSubtitle rounded-lg w-180rpx h-66rpx text-center leading-66rpx text-md text-white" @tap="showSpecFun(2)"
|
||||
>立即购买</view
|
||||
>
|
||||
<view class="bg-primary rounded-lg w-180rpx h-66rpx text-center leading-66rpx text-md text-white"
|
||||
@tap="showSpecFun(1)">加入购物车</view>
|
||||
<view
|
||||
class="ml-base bg-bgSubtitle rounded-lg w-180rpx h-66rpx text-center leading-66rpx text-md text-white"
|
||||
@tap="showSpecFun(2)">立即购买</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
|
@ -345,20 +316,10 @@
|
|||
|
||||
<u-skeleton :loading="isFirstLoading" :animation="true" bgColor="#FFF"></u-skeleton>
|
||||
|
||||
<spec-popup
|
||||
:loading="loading"
|
||||
:specs="specs"
|
||||
:sku="detail"
|
||||
v-model="show"
|
||||
:quota-used="number"
|
||||
:show-cart="popupType == 1 || popupType == 0"
|
||||
:show-buy="popupType == 2 || popupType == 0"
|
||||
:show-confirm="popupType == 3"
|
||||
@stepper-change="onChangeNumber"
|
||||
@sku-selected="onChangeSku"
|
||||
@buy-clicked="onBuy"
|
||||
@add-cart="onAddCart"
|
||||
>
|
||||
<spec-popup :loading="loading" :specs="specs" :sku="detail" v-model="show" :quota-used="number"
|
||||
:show-cart="popupType == 1 || popupType == 0" :show-buy="popupType == 2 || popupType == 0"
|
||||
:show-confirm="popupType == 3" @stepper-change="onChangeNumber" @sku-selected="onChangeSku" @buy-clicked="onBuy"
|
||||
@add-cart="onAddCart">
|
||||
</spec-popup>
|
||||
<!-- 分享弹窗 -->
|
||||
<sharePopup v-model="shareShow" :goods="detail" :goodsImage="goodsImage"></sharePopup>
|
||||
|
|
@ -368,7 +329,10 @@
|
|||
<script>
|
||||
import comment from '@/components/comment/comment';
|
||||
import sharePopup from './components/share-popup.vue';
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
import {
|
||||
mapGetters,
|
||||
mapActions
|
||||
} from 'vuex';
|
||||
export default {
|
||||
components: {
|
||||
comment,
|
||||
|
|
@ -486,7 +450,10 @@ export default {
|
|||
return price
|
||||
}
|
||||
},
|
||||
onLoad({ skuId, showShrough }) {
|
||||
onLoad({
|
||||
skuId,
|
||||
showShrough
|
||||
}) {
|
||||
if (showShrough) {
|
||||
this.showShrough = showShrough;
|
||||
}
|
||||
|
|
@ -511,12 +478,10 @@ export default {
|
|||
methods: {
|
||||
onDHClick() {
|
||||
const params = {
|
||||
goods: [
|
||||
{
|
||||
goods: [{
|
||||
sku_id: this.skuId,
|
||||
num: 1,
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
type: 'points'
|
||||
};
|
||||
this.$u.routeAuth('/pages/confirm_order/confirm_order?data=' + encodeURIComponent(JSON.stringify(params)));
|
||||
|
|
@ -576,27 +541,26 @@ export default {
|
|||
//购买
|
||||
onBuy() {
|
||||
const params = {
|
||||
goods: [
|
||||
{
|
||||
goods: [{
|
||||
sku_id: this.skuId,
|
||||
num: this.number,
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
};
|
||||
this.show = false;
|
||||
this.$u.routeAuth('/pages/confirm_order/confirm_order?data=' + encodeURIComponent(JSON.stringify(params)));
|
||||
},
|
||||
//添加购物车
|
||||
async onAddCart(e) {
|
||||
const { skuId, number } = this;
|
||||
const {
|
||||
skuId,
|
||||
number
|
||||
} = this;
|
||||
try {
|
||||
await this.$store.dispatch(
|
||||
'goods/addCart',
|
||||
{
|
||||
'goods/addCart', {
|
||||
skuId,
|
||||
number,
|
||||
},
|
||||
{
|
||||
}, {
|
||||
custom: {
|
||||
loading: true,
|
||||
},
|
||||
|
|
@ -709,6 +673,7 @@ export default {
|
|||
.border-hex-fff {
|
||||
border: 1px solid #fff !important;
|
||||
}
|
||||
|
||||
.share-btn::after {
|
||||
border: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ const ALLACCOUNTS = "app_accounts"
|
|||
const getDefaultState = () => {
|
||||
return {
|
||||
token: uni.getStorageSync(TOKEN),
|
||||
// token: '1104|nAMfPQH3HTnb4Y6p06mgIbPjPNC9Hqb24sbglwfQ',
|
||||
user: null, //用户信息
|
||||
news_num: 0, //消息数
|
||||
order_count: null, //订单数量
|
||||
|
|
@ -52,7 +53,9 @@ const mutations = {
|
|||
if (state.history.length == 0) {
|
||||
state.history.unshift(value)
|
||||
} else {
|
||||
let Index = state.history.findIndex(item => { return item == value })
|
||||
let Index = state.history.findIndex(item => {
|
||||
return item == value
|
||||
})
|
||||
if (Index == -1) {
|
||||
state.history.unshift(value)
|
||||
}
|
||||
|
|
@ -71,7 +74,9 @@ const mutations = {
|
|||
},
|
||||
//修改资料后改变用户信息
|
||||
SET_REFRESH(state, value) {
|
||||
let Index = state.allaccounts.findIndex(item => { return item.phone == value.phone })
|
||||
let Index = state.allaccounts.findIndex(item => {
|
||||
return item.phone == value.phone
|
||||
})
|
||||
if (Index != -1) {
|
||||
state.allaccounts[Index].phone = value.phone
|
||||
state.allaccounts[Index].avatar = value.avatar
|
||||
|
|
@ -97,7 +102,10 @@ const actions = {
|
|||
commit,
|
||||
state,
|
||||
dispatch
|
||||
}, { form, switchAllaccounts }) {
|
||||
}, {
|
||||
form,
|
||||
switchAllaccounts
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
http.post('/v1/login', form, {
|
||||
|
|
@ -112,7 +120,10 @@ const actions = {
|
|||
...Object.assign({}, state.user),
|
||||
token: state.token,
|
||||
}
|
||||
dispatch('getAccounts', { info:tempUserInfo, switchAllaccounts })
|
||||
dispatch('getAccounts', {
|
||||
info: tempUserInfo,
|
||||
switchAllaccounts
|
||||
})
|
||||
}
|
||||
resolve(token)
|
||||
commit('SET_TOKEN', token)
|
||||
|
|
@ -150,7 +161,11 @@ const actions = {
|
|||
},
|
||||
|
||||
//获取用户信息
|
||||
getUserInfo({ commit, state, dispatch }, switchAllaccounts) {
|
||||
getUserInfo({
|
||||
commit,
|
||||
state,
|
||||
dispatch
|
||||
}, switchAllaccounts) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!state.token) return
|
||||
|
|
@ -158,7 +173,14 @@ const actions = {
|
|||
custom: {
|
||||
silence: true
|
||||
}
|
||||
}).then(({ phone, user_info, is_vip, wallet, balance,vip_expired }) => {
|
||||
}).then(({
|
||||
phone,
|
||||
user_info,
|
||||
is_vip,
|
||||
wallet,
|
||||
balance,
|
||||
vip_expired
|
||||
}) => {
|
||||
let user = user_info
|
||||
user.phone = phone
|
||||
user.is_vip = is_vip
|
||||
|
|
@ -167,7 +189,13 @@ const actions = {
|
|||
user.vip_expired = vip_expired
|
||||
commit('SET_USERINFO', user)
|
||||
dispatch('bindCid')
|
||||
dispatch('getAccounts', { info: { ...user, token: state.token }, switchAllaccounts })
|
||||
dispatch('getAccounts', {
|
||||
info: {
|
||||
...user,
|
||||
token: state.token
|
||||
},
|
||||
switchAllaccounts
|
||||
})
|
||||
resolve(user)
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
|
|
@ -175,7 +203,13 @@ const actions = {
|
|||
})
|
||||
},
|
||||
|
||||
getAccounts({ commit, state }, { info, switchAllaccounts = false }) {
|
||||
getAccounts({
|
||||
commit,
|
||||
state
|
||||
}, {
|
||||
info,
|
||||
switchAllaccounts = false
|
||||
}) {
|
||||
|
||||
const obj = {
|
||||
avatar: info.avatar,
|
||||
|
|
@ -194,7 +228,9 @@ const actions = {
|
|||
}
|
||||
commit('SET_ACCOUNTS', all)
|
||||
},
|
||||
resetToken({ commit }) {
|
||||
resetToken({
|
||||
commit
|
||||
}) {
|
||||
return new Promise(resolve => {
|
||||
uni.removeStorageSync(TOKEN);
|
||||
commit('RESET_STATE')
|
||||
|
|
@ -204,19 +240,30 @@ const actions = {
|
|||
bindCid() {
|
||||
// #ifdef APP-PLUS
|
||||
const cid = plus.push.getClientInfo()?.clientid
|
||||
http.post('/v1/push-bind-uni', { cid }, { custom: { toast: false } })
|
||||
http.post('/v1/push-bind-uni', {
|
||||
cid
|
||||
}, {
|
||||
custom: {
|
||||
toast: false
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
|
||||
//异步获取消息未读数
|
||||
getNewsNum({ commit, state }) {
|
||||
getNewsNum({
|
||||
commit,
|
||||
state
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!state.token) return
|
||||
http.get('/v1/messages/wait-read-num', {}, {
|
||||
custom: {
|
||||
silence: true
|
||||
}
|
||||
}).then(({ num }) => {
|
||||
}).then(({
|
||||
num
|
||||
}) => {
|
||||
commit('SET_NEWS', num)
|
||||
resolve(num)
|
||||
}).catch(err => {
|
||||
|
|
@ -225,7 +272,10 @@ const actions = {
|
|||
})
|
||||
},
|
||||
//获取订单数量
|
||||
getOrderNum({ commit, state }) {
|
||||
getOrderNum({
|
||||
commit,
|
||||
state
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!state.token) return
|
||||
http.get('/v1/order/statistics').then(res => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue