This commit is contained in:
weipengfei 2024-01-13 18:14:22 +08:00
parent 2b3fc277f7
commit 40c21cef29
17 changed files with 2672 additions and 43 deletions

View File

@ -599,4 +599,13 @@ export function merchantLicenseIdentify(data) {
return request.post(`merchant_license_identify`, data, { return request.post(`merchant_license_identify`, data, {
noAuth: true noAuth: true
}); });
}
/*
从供销平台获取村店铺负责人,联系电话
*/
export function getVillageInfo(data) {
return requestb.get(`shop_call/getVillageCompany`, data, {
noAuth: true
});
} }

View File

@ -730,3 +730,8 @@ export function getBillDetil() {
export function merstreet(data) { export function merstreet(data) {
return request1.get(`company/street_company`, data); return request1.get(`company/street_company`, data);
} }
//填写邀请码
export function bindPromotionCode(data) {
return request.post(`user/change/bind_promotion_code`, data)
}

View File

@ -0,0 +1,195 @@
<template>
<view :class="'wf-page wf-page'+type">
<!-- left -->
<view>
<view id="left" v-if="leftList.length">
<view v-for="(item,index) in leftList" :key="index"
class="wf-item" @tap="itemTap(item)">
<WaterfallsFlowItemp :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
<!-- right -->
<view>
<view id="right" v-if="rightList.length">
<view v-for="(item,index) in rightList" :key="index"
class="wf-item" @tap="itemTap(item)">
<WaterfallsFlowItemp :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
</view>
</template>
<script>
import WaterfallsFlowItemp from '../WaterfallsFlowItem/WaterfallsFlowItemp.vue'
export default {
components: {
WaterfallsFlowItemp
},
props: {
//
wfList: {
type: Array,
require: true
},
updateNum: {
type: Number,
default: 10
},
type: {
type: Number,
default: 0
},
isStore: {
type: [String, Number],
default: '1'
},
},
data() {
return {
allList: [], //
leftList: [], //
rightList: [], //
mark: 0, //
boxHeight: [], // 01
};
},
watch: {
//
wfList: {
handler(nVal,oVal){
// 使
if (!this.wfList.length ||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
this.allList = [];
this.leftList = [];
this.rightList = [];
this.boxHeight = [];
this.mark = 0;
}
// waterfall
if (this.wfList.length) {
this.allList = this.wfList;
this.leftList = [];
this.rightList = [];
this.boxHeight = [];
this.allList.forEach((v, i) => {
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
if(i % 2){
this.rightList.push(v);
}else{
this.leftList.push(v);
}
}
});
if(this.allList.length < 3){
this.mark = this.allList.length+1;
}else if(this.allList.length <= 7){
this.mark = this.allList.length - 1;
}else{
this.mark = this.allList.length - 2;
}
if(this.mark < this.allList.length){
this.waterFall()
}
}
},
immediate: true,
deep:true
},
mounted(){
},
// item
mark() {
const len = this.allList.length;
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
this.waterFall();
}
}
},
methods: {
//
waterFall() {
const i = this.mark;
if (i == 0) {
//
this.leftList.push(this.allList[i]);
//
this.getViewHeight(0);
} else if (i == 1) {
// item
this.rightList.push(this.allList[i]);
//
this.getViewHeight(1);
} else {
// item
if(!this.boxHeight.length){
this.rightList.length < this.leftList.length
? this.rightList.push(this.allList[i])
: this.leftList.push(this.allList[i]);
} else {
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
if (leftOrRight) {
this.rightList.push(this.allList[i])
} else {
this.leftList.push(this.allList[i])
}
}
//
this.getViewHeight();
}
},
//
getViewHeight() {
// 使nextTick
this.$nextTick(() => {
setTimeout(()=>{
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
res ? this.boxHeight[1] = res.height : '';
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
res ? this.boxHeight[0] = res.height : '';
this.mark = this.mark + 1;
}).exec();
}).exec();
},100)
})
},
// item
itemTap(item) {
this.$emit('itemTap', item)
},
// item
goShop(item) {
this.$emit('goShop', item)
}
}
}
</script>
<style lang="scss" scoped>
$page-padding: 10px;
$grid-gap: 10px;
.wf-page {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: $grid-gap;
}
.wf-item {
width: calc((100vw - 2 * #{$page-padding} - #{$grid-gap}) / 2);
padding-bottom: $grid-gap;
}
.wf-page1 .wf-item{
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding-bottom: 0;
}
.wf-item-page{
padding-bottom: 20rpx;
}
</style>

View File

@ -0,0 +1,347 @@
<template>
<view v-if="type == 0" class="wf-item-page wf-page0" :style="viewColor">
<view class='pictrue'>
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
<view v-if="item.stock == 0" class="sell_out">已售罄</view>
<view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
</view>
<view class="text">
<view class='name line2'>{{item.store_name}}</view>
<view class="acea-row row-middle">
<view class='money'><text class='num'>{{item.price}}</text></view>
</view>
<view v-if="item.show_svip_info && item.show_svip_info.show_svip_price && item.svip_price" class="acea-row row-middle svip">
<text class='vip-money'>{{item.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
</view>
<view class="item_tags">
<!-- <text v-if="item.product_type == 0 && item.merchant.type_name" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
<text v-else-if="item.product_type == 0 && item.merchant.is_trader" class="font-bg-red b-color">自营</text> -->
<text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<!-- <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text> -->
</view>
</view>
</view>
<view v-else-if="type == 1" class="wf-page1" :style="viewColor">
<view class='pictrue'>
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
<view v-if="item.stock == 0" class="sell_out">已售罄</view>
<view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
</view>
<view class='text'>
<view class='name line2'>{{item.store_name}}</view>
<view class='money'>
<text class='num'>{{item.price}}</text>
</view>
<view v-if="item.show_svip_info.show_svip && item.show_svip_info.show_svip_price" class="acea-row row-middle svip">
<text class='vip-money'>{{item.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
</view>
<view class="item_tags acea-row">
<!-- <text v-if="item.merchant.type_name && item.product_type == 0" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
<text v-else-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red b-color">自营</text> -->
<text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<!-- <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text> -->
</view>
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论<text v-if="item.merchant" style="margin-left: 10rpx;">{{item.merchant.street_name}}</text></view>
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
<text class="line1">{{item.merchant.village_name}}</text>
<!-- <view class="flex" v-if="isStore != '1'">
进店
<text class="iconfont icon-xiangyou"></text>
</view> -->
</view>
</view>
<!-- 返佣 -->
<block v-if="item.max_extension>0 && (item.product_type == 0 || item.product_type == 2)">
<view class="foot-bar">
<text class="iconfont icon-fenxiang"></text>
最高赚 ¥{{item.max_extension}}
</view>
</block>
</view>
</template>
<script>
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
import {mapGetters} from "vuex";
export default {
components:{easyLoadimage},
computed: mapGetters(['viewColor']),
props: {
item: {
type: Object,
require: true
},
type: {
type: Number|String,
default: 0
},
isStore: {
type: [String, Number],
default: '1'
},
isLogin: {
type: Boolean,
require: false
}
},
data(){
return {
}
},
methods: {
goShop(id) {
this.$emit('goShop', id);
},
authOpen(){
this.$emit('authOpen');
},
followToggle(item){
this.$emit('followToggle', item);
}
}
}
</script>
<style lang="scss" scoped>
.wf-item-page {
background: #fff;
overflow: hidden;
border-radius: 16rpx;
padding-bottom: 20rpx;
}
.wf-page0 .coupon{
background:rgba(255,248,247,1);
border:1px solid rgba(233,51,35,1);
border-radius:4rpx;
font-size:20rpx;
margin-left: 18rpx;
padding: 1rpx 4rpx;
}
.wf-page0 .pictrue{
width: 100%!important;
height: 345rpx;
position: relative;
/deep/image,/deep/.easy-loadimage,uni-image{
height: 345rpx;
border-radius: 16rpx 16rpx 0 0;
}
.border-picture {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 16rpx 16rpx 0 0;
background: center/cover no-repeat;
}
}
.loadfail-img{
width: 100%;
height: 360rpx;
}
.svip{
margin: 5rpx 0 15rpx;
}
.vip-money {
color: #282828;
font-size: 22rpx;
margin-left: 6rpx;
font-weight: bold;
}
.vipImg {
width: 65rpx;
height: 28rpx;
margin-left: 4rpx;
image {
width: 100%;
height: 100%;
display: block;
}
}
.wf-page0 .name {
color: #282828;
margin: 20rpx 0 10rpx 0;
font-size: 13px;
overflow:hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-align: left;
}
.wf-page0 .text{
padding: 0 20rpx;
}
.wf-page0 .money {
font-size: 20rpx;
font-weight: bold;
color: var(--view-priceColor);
}
.b-color {
background-color: var(--view-theme);
border: 1px solid var(--view-theme);
}
.wf-page0 .money .num {
font-size: 34rpx;
}
.wf-page1 .wf-item{
.name{
font-size: 13px;
overflow:hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-align: left;
}
}
.wf-page1 .pictrue {
position: relative;
height: 345rpx;
width: 100%!important;
/deep/image,/deep/.easy-loadimage,uni-image{
height: 345rpx;
border-radius: 20rpx 20rpx 0 0;
}
.border-picture {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 20rpx 20rpx 0 0;
background: center/cover no-repeat;
}
}
.sell_out {
display: flex;
width: 150rpx;
height: 150rpx;
align-items: center;
justify-content: center;
border-radius: 100%;
background: rgba(0,0,0,.6);
color: #fff;
font-size: 30rpx;
position: absolute;
top: 50%;
left: 50%;
margin: -75rpx 0 0 -75rpx;
&::before{
content: "";
display: block;
width: 140rpx;
height: 140rpx;
border-radius: 100%;
border: 1px dashed #fff;
position: absolute;
top: 5rpx;
left: 5rpx;
}
}
.loading-img{
height: 345rpx;
max-height: 360rpx;
}
.wf-page1 .text {
padding: 20rpx 17rpx 26rpx 17rpx;
font-size: 30rpx;
color: #222;
}
.wf-page1 .text .money {
display: flex;
align-items: center;
font-size: 26rpx;
font-weight: bold;
margin-top: 8rpx;
color: var(--view-priceColor);
}
.wf-page1 .text .money .num {
font-size: 34rpx;
}
.item_tags{
margin-top: 8rpx;
display: flex;
}
.item_tags .tags_item {
display: flex;
font-size: 20rpx;
text-align: center;
border-radius: 5rpx;
padding: 0 4rpx;
height: 28rpx;
align-items: center;
justify-content: center;
margin-right: 8rpx;
}
.item_tags .tags_item.ticket{
color: var(--view-theme);
border: 1px solid var(--view-theme);
}
.item_tags .tags_item.delivery{
color: #FF9000;
border: 1px solid #FF9000;
}
.wf-page1 .text .money .ticket-big {
display: flex;
align-items: center;
justify-content: center;
max-width: 163rpx;
padding: 0 6rpx;
height: 28rpx;
margin-left: 10rpx;
background-image: url(~static/images/yh.png);
background-size: 100% 100%;
font-size: 20rpx;
font-weight: normal;
}
.wf-page1 .text .score {
margin-top: 10rpx;
color: #737373;
font-size: 20rpx;
}
.wf-page1 .text .company {
display: flex;
align-items: center;
color: #737373;
font-size: 20rpx;
margin-top: 10rpx;
.line1{
// max-width: 200rpx;
}
.flex {
display: flex;
align-items: center;
margin-left: 10rpx;
color: #282828;
.iconfont {
font-size: 16rpx;
margin-top: 4rpx;
}
}
}
.foot-bar {
width: 100%;
height: 52rpx;
display: flex;
align-items: center;
justify-content: center;
background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
border-radius: 0px 0px 16rpx 16rpx;
color: #fff;
font-size: 24rpx;
.icon-fenxiang {
font-size: 24rpx;
margin-right: 10rpx;
}
}
</style>

View File

@ -58,10 +58,10 @@
<view class="button"> <view class="button">
<view class="b_icon" @click="navgo('/pages/order_addcart/order_addcart')"> <view class="b_icon" @click="navgo('/pages/order_addcart/order_addcart')">
<image src="@/static/images/icon/car.png"></image> <image src="@/static/images/icon/car.png"></image>
<view>购车</view> <view></view>
<view class="badge" v-if="goodsNum">{{goodsNum}}</view> <view class="badge" v-if="goodsNum">{{goodsNum}}</view>
</view> </view>
<view class="btn" @click.stop="$u.throttle(addcart, 1500)">加入采购清单</view> <view class="btn" @click.stop="$u.throttle(addcart, 1500)">加入购物车</view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>

View File

@ -417,6 +417,14 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{
"path": "specialty/short_index",
"style": {
"navigationBarTitleText": "集体店铺",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, { }, {
"path": "specialty/indexa", "path": "specialty/indexa",
"style": { "style": {

View File

@ -227,10 +227,6 @@
<image <image
v-if="margin_ico_switch==1 && margin_ico && storeInfo.merchant.is_margin == 10" v-if="margin_ico_switch==1 && margin_ico && storeInfo.merchant.is_margin == 10"
:src="margin_ico" class="store-margin"></image> :src="margin_ico" class="store-margin"></image>
<text v-if="storeInfo.merchant.type_name"
class="font-bg-red ml8 bt-color">{{storeInfo.merchant.type_name}}</text>
<text v-else-if="storeInfo.merchant.is_trader"
class="font-bg-red ml8 bt-color">自营</text>
</view> </view>
<view v-if="storeInfo.merchant.care_count" class="txt"> <view v-if="storeInfo.merchant.care_count" class="txt">
{{storeInfo.merchant.care_count < 10000 ? storeInfo.merchant.care_count : (storeInfo.merchant.care_count/10000).toFixed(2)+'万'}}人关注 {{storeInfo.merchant.care_count < 10000 ? storeInfo.merchant.care_count : (storeInfo.merchant.care_count/10000).toFixed(2)+'万'}}人关注
@ -240,8 +236,8 @@
<!-- <navigator v-if="hide_mer_status != 1" <!-- <navigator v-if="hide_mer_status != 1"
:url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link" :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link"
hover-class="none">进店</navigator> --> hover-class="none">进店</navigator> -->
<navigator v-if="hide_mer_status != 1 && storeInfo.merchant.village_id" <navigator v-if="hide_mer_status != 1 && storeInfo.merchant.village_id && !this.village_id"
:url="'/pages/nongKe/specialty/index?type_code=PersonalStore&village_id='+storeInfo.merchant.village_id" class="link" :url="`/pages/nongKe/specialty/short_index?type_code=PersonalStore&village_id=${storeInfo.merchant.village_id}&name=${storeInfo.merchant.village_name.replace('集体经营合作店铺','')}`" class="link"
hover-class="none">进店</navigator> hover-class="none">进店</navigator>
</view> </view>
<view class="score-wrapper"> <view class="score-wrapper">
@ -620,7 +616,8 @@
params: [] params: []
}, },
product_type: 0, product_type: 0,
referer: '' referer: '',
village_id: ''
}; };
}, },
computed: { computed: {
@ -636,6 +633,7 @@
onLoad(options) { onLoad(options) {
// console.log(options) // console.log(options)
this.referer = options.referer this.referer = options.referer
this.village_id = options.village_id
if (options.product_type) { if (options.product_type) {
this.product_type = options.product_type this.product_type = options.product_type
} }

View File

@ -39,7 +39,7 @@
</view> </view>
<view class="goodslist"> <view class="goodslist">
<WaterfallsFlow :wfList="storeList" @itemTap="itemTap" :type="1" /> <WaterfallsFlowp :wfList="storeList" @itemTap="itemTap" :type="1" />
</view> </view>
</view> </view>
@ -83,11 +83,12 @@
configMap configMap
} from '@/utils'; } from '@/utils';
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue' import WaterfallsFlowp from '@/components/WaterfallsFlow/WaterfallsFlowp.vue'
const app = getApp(); const app = getApp();
export default { export default {
components: { components: {
easyLoadimage easyLoadimage,
WaterfallsFlowp
}, },
data() { data() {
return { return {

File diff suppressed because it is too large Load Diff

View File

@ -539,10 +539,10 @@
that.$set(that, 'orderInfo', res.data); that.$set(that, 'orderInfo', res.data);
this.pay_type = this.orderInfo.pay_type this.pay_type = this.orderInfo.pay_type
if (this.orderInfo.interest !== null) { if (this.orderInfo.interest !== null) {
this.moerTime(this.orderInfo.interest.start_time) this.moerTime(this.orderInfo.interest.start_time, this.orderInfo.cancel_unix)
} else { } else {
this.isSelfOrder = true this.isSelfOrder = true
this.moerTime(this.orderInfo.create_time) this.moerTime(this.orderInfo.create_time, this.orderInfo.cancel_unix)
// console.log(this.orderInfo.create_time) // console.log(this.orderInfo.create_time)
} }
@ -593,16 +593,16 @@
}); });
}, },
// //
moerTime(autoTime) { moerTime(autoTime, c_time) {
if (this.isSelfOrder) { if (this.isSelfOrder) {
let limitPayTime = 60 // let limitPayTime = 60 //
let curData = new Date(autoTime); let curData = new Date(autoTime);
// curData.setSeconds(curData.getSeconds() + (60 * limitPayTime));
curData.setSeconds(curData.getSeconds() + (60 * limitPayTime)); curData.setSeconds(curData.getSeconds() + (60 * limitPayTime));
this.be_overdue = curData.getFullYear() + '-' + (curData.getMonth() + 1) + '-' + curData.getDate() + this.be_overdue = curData.getFullYear() + '-' + (curData.getMonth() + 1) + '-' + curData.getDate() +
' ' + ' ' +
curData.getHours() + ':' + curData.getHours() + ':' +
(curData.getMinutes() > 10 ? curData.getMinutes() : "0" + curData.getMinutes()) (curData.getMinutes() > 9 ? curData.getMinutes() : "0" + curData.getMinutes())
return return
} }

View File

@ -139,7 +139,7 @@
text: '展开更多', text: '展开更多',
timer: null, timer: null,
product_type: '', product_type: '',
source: null
}; };
}, },
computed: mapGetters(['isLogin', 'viewColor', 'keyColor']), computed: mapGetters(['isLogin', 'viewColor', 'keyColor']),
@ -152,6 +152,7 @@
}); });
this.orderId = options.order_id; this.orderId = options.order_id;
this.order_type = options.order_type; this.order_type = options.order_type;
this.source = options.source || null;
this.status = options.status || 0; this.status = options.status || 0;
this.msg = options.msg || ''; this.msg = options.msg || '';
this.product_type = options.product_type this.product_type = options.product_type
@ -221,7 +222,7 @@
*/ */
goOrderDetails: function(val) { goOrderDetails: function(val) {
let that = this; let that = this;
if (this.product_type == 98) { if (this.product_type == 98 && this.source!=103) {
if(val==1){ if(val==1){
uni.navigateTo({ uni.navigateTo({
url: `/pages/users/order_list/indexCopy?status=2&product_type=${this.product_type}` url: `/pages/users/order_list/indexCopy?status=2&product_type=${this.product_type}`
@ -232,7 +233,7 @@
}) })
} }
} else if (this.product_type == 99) { } else if (this.product_type == 99 && this.source!=103) {
if(val==1){ if(val==1){
uni.navigateTo({ uni.navigateTo({
url: `/pages/users/order_list/relase?status=2&product_type=${this.product_type}` url: `/pages/users/order_list/relase?status=2&product_type=${this.product_type}`

View File

@ -117,7 +117,6 @@
this.locationInfo.formatted_addresses.recommend = '定位中' this.locationInfo.formatted_addresses.recommend = '定位中'
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
timeout: '4',
success: (res) => { success: (res) => {
res = wgsToGcj(res); res = wgsToGcj(res);
let latitude, longitude; let latitude, longitude;

View File

@ -99,7 +99,7 @@
<image src="@/static/images/f5.png" mode="aspectFit"></image> <image src="@/static/images/f5.png" mode="aspectFit"></image>
</view> </view>
<view class="list-con-right"> <view class="list-con-right">
<view class="con-right" style="margin-bottom: 20rpx" <view class="con-right"
@click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')"> @click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')">
<!-- <view class="list-con-title"> <!-- <view class="list-con-title">
<view class="con-titlea"> <view class="con-titlea">
@ -124,9 +124,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="list-bon"> <!-- <view class="list-bon" info="中秋团圆节">
<image src="@/static/images/f4.png" mode="aspectFit"></image> <image src="@/static/images/f4.png" mode="aspectFit"></image>
</view> </view> -->
<view class="goodslist"> <view class="goodslist">
<WaterfallsFlow v-if="productList.length>0" :wfList="productList" :type="1" /> <WaterfallsFlow v-if="productList.length>0" :wfList="productList" :type="1" />
<block v-else> <block v-else>
@ -1140,6 +1140,10 @@ import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin';
.list-con-right { .list-con-right {
width: 356rpx; width: 356rpx;
height: 482rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.con-right { .con-right {
width: 356rpx; width: 356rpx;

View File

@ -601,7 +601,7 @@
}, },
// //
orderNum() { orderNum() {
orderData().then(({ orderData({source: 103}).then(({
data data
}) => { }) => {
// console.log(data); // console.log(data);

View File

@ -1229,7 +1229,7 @@
jsConfig = res.data.result.config, jsConfig = res.data.result.config,
// //
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message + goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message +
'&product_type=' + that.product_type, '&product_type=' + that.product_type + '&source=' + that.source,
goPagesOrder = '/pages/order_details/stay?order_id=' + orderId + goPagesOrder = '/pages/order_details/stay?order_id=' + orderId +
'&credit_buy=1&product_type=' + that.product_type; '&credit_buy=1&product_type=' + that.product_type;
@ -1300,7 +1300,7 @@
success: (e) => { success: (e) => {
// //
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=支付成功' + '&product_type=' + that.product_type; '&msg=支付成功' + '&product_type=' + that.product_type + '&source=' + that.source;
return that.$util.Tips({ return that.$util.Tips({
title: '支付成功', title: '支付成功',
@ -1314,7 +1314,7 @@
console.log(e,'111111111') console.log(e,'111111111')
// //
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付' + '&product_type=' + that.product_type; '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source;
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付', title: '取消支付',
}, { }, {
@ -1326,7 +1326,7 @@
uni.hideLoading(); uni.hideLoading();
// //
// let url = '/pages/order_pay_status/index?order_id=' + orderId + // let url = '/pages/order_pay_status/index?order_id=' + orderId +
// '&msg=' + '&product_type=' + that.product_type; // '&msg=' + '&product_type=' + that.product_type + '&source=' + that.source;
// return that.$util.Tips({ // return that.$util.Tips({
// title: '', // title: '',
// }, { // }, {
@ -1363,8 +1363,7 @@
fail: function(e) { fail: function(e) {
// //
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' + '&product_type=' + that orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source;
.product_type
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'
}, { }, {
@ -1388,7 +1387,7 @@
case 'h5': case 'h5':
let host = window.location.protocol + "//" + window.location.host; let host = window.location.protocol + "//" + window.location.host;
let url = let url =
`${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&product_type=${that.product_type}` `${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&product_type=${that.product_type}&source${that.source}`
let eUrl = encodeURIComponent(url) let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}` let locations = `${jsurl}&redirect_url=${eUrl}`
@ -1416,7 +1415,7 @@
// //
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=支付失败' + '&product_type=' + that orderId + '&msg=支付失败' + '&product_type=' + that
.product_type .product_type + '&source=' + that.source
return that.$util.Tips({ return that.$util.Tips({
title: '支付失败' title: '支付失败'
}, { }, {
@ -1429,7 +1428,7 @@
// // // //
// let pages = '/pages/order_pay_status/index?order_id=' + // let pages = '/pages/order_pay_status/index?order_id=' +
// orderId + '&msg=' + '&product_type=' + that // orderId + '&msg=' + '&product_type=' + that
// .product_type // .product_type + '&source=' + that.source
// return that.$util.Tips({ // return that.$util.Tips({
// title: '' // title: ''
@ -1444,7 +1443,7 @@
default: default:
// //
let pages = '/pages/order_pay_status/index?order_id=' + let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' + '&product_type=' + that.product_type orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付' title: '取消支付'

View File

@ -253,7 +253,7 @@
<view v-if="!item.receipt && item.status != -1 && (item.status != 0)" class='bnt cancelBnt' <view v-if="!item.receipt && item.status != -1 && (item.status != 0)" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> @click.stop='applyInvoice(item.order_id)'>申请开票</view>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id, item )'>查看详情</view>
</block> </block>
<block v-if="item.status == 1"> <block v-if="item.status == 1">
<view class='bnt cancelBnt' <view class='bnt cancelBnt'
@ -501,7 +501,8 @@ import { Toast } from '../../../libs/uniApi';
getOrderData: function() { getOrderData: function() {
let that = this; let that = this;
orderData({ orderData({
product_type: 0 product_type: 0,
source: 103
}).then(res => { }).then(res => {
that.$set(that, 'orderData', res.data); that.$set(that, 'orderData', res.data);
}) })
@ -674,7 +675,8 @@ import { Toast } from '../../../libs/uniApi';
groupOrderList({ groupOrderList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 0 product_type: 0,
source: 103
}).then(res => { }).then(res => {
that.isReady = true; that.isReady = true;
let list = res.data.list || []; let list = res.data.list || [];
@ -701,7 +703,8 @@ import { Toast } from '../../../libs/uniApi';
status: arr, status: arr,
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 0 product_type: 0,
source: 103
}).then(res => { }).then(res => {
let list = res.data.list || []; let list = res.data.list || [];
let loadend = list.length < that.limit; let loadend = list.length < that.limit;
@ -730,6 +733,7 @@ import { Toast } from '../../../libs/uniApi';
status: 10, status: 10,
page: 1, page: 1,
limit: 1, limit: 1,
source: 103
}).then(res => { }).then(res => {
let list = res.data.list || []; let list = res.data.list || [];
that.presellOrderCount = res.data.count; that.presellOrderCount = res.data.count;

View File

@ -90,14 +90,14 @@
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view>填写邀请码</view> <view>填写邀请码</view>
<view class='input acea-row row-between-wrapper' @click="showPopup"> <view class='input acea-row row-between-wrapper' @click="showPopup">
<input type='text' placeholder="填写他人邀请码" disabled='true' class='id'></input> <input type='text' placeholder="填写他人邀请码" v-model="promotion_code" disabled='true' class='id'></input>
<text class='iconfont icon-you'></text> <text class='iconfont icon-you'></text>
</view> </view>
<uni-popup ref="popup"> <uni-popup ref="popup">
<view class="code-popup"> <view class="code-popup">
<text class="title">填写邀请码</text> <text class="title">填写邀请码</text>
<u-input type='text' placeholder="填写他人邀请码" class='id'></u-input> <u-input type='text' placeholder="填写他人邀请码" v-model="promotion_code" :border="'surround'" class='id'></u-input>
<u-button class="code-btn">确认</u-button> <u-button class="code-btn" @click="submitCode">确认</u-button>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
@ -162,7 +162,8 @@
getLogout, getLogout,
userAcc, userAcc,
editAvatar, editAvatar,
updateInfo updateInfo,
bindPromotionCode
} from '@/api/user.js'; } from '@/api/user.js';
import { switchH5Login, getAppVersion } from '@/api/api.js'; import { switchH5Login, getAppVersion } from '@/api/api.js';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
@ -171,6 +172,7 @@
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import Cache from '@/utils/cache'; import Cache from '@/utils/cache';
import { HTTP_REQUEST_URL } from '@/config/app'; import { HTTP_REQUEST_URL } from '@/config/app';
import { Toast } from '../../../libs/uniApi';
export default { export default {
components: { components: {
authorize authorize
@ -180,6 +182,7 @@
domain: HTTP_REQUEST_URL, domain: HTTP_REQUEST_URL,
userInfo: {}, userInfo: {},
loginType: 'h5', loginType: 'h5',
promotion_code: '', //
userIndex: 0, userIndex: 0,
switchUserInfo: [], switchUserInfo: [],
isAuto: false, // isAuto: false, //
@ -368,6 +371,7 @@
} }
}, },
showPopup(){ showPopup(){
if(this.promotion_code) return Toast('已经填写过了');
this.$refs.popup.open(); this.$refs.popup.open();
}, },
// //
@ -383,6 +387,7 @@
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
that.$set(that, 'userInfo', res.data); that.$set(that, 'userInfo', res.data);
this.promotion_code = this.userInfo.promotion_code;
if (res.data.phone) { if (res.data.phone) {
that.userAcc(); that.userAcc();
} }
@ -393,6 +398,20 @@
*/ */
getVerion(){ getVerion(){
this.$store.dispatch('INIT_CONFIG', true); this.$store.dispatch('INIT_CONFIG', true);
},
//
submitCode(){
if(!this.promotion_code) return ;
bindPromotionCode({
promotion_code: this.promotion_code
}).then(res=>{
this.$refs.popup.close();
this.$nextTick(()=>{
Toast('修改成功');
})
}).catch(err=>{
console.log(err);
})
} }
} }
} }