Compare commits

..

No commits in common. "master" and "zmj" have entirely different histories.
master ... zmj

156 changed files with 3315 additions and 26877 deletions

26
App.vue
View File

@ -74,23 +74,16 @@
...uni.getStorageSync('GLOBAL_DATA') || {}
},
onLaunch: function(option) {
// #ifdef H5
uni.setTabBarItem({
index: 1,
visible: false
})
// #endif
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
this.globalData.uid = this.$store.state.app.uid;
// let appkey = uni.getStorage({
// key: 'launchFlag'
// })
// if (appkey) {
// setTimeout(() => {
// this.$store.dispatch('INIT_CONFIG');
// }, 6000)
// }
this.$store.dispatch('INIT_CONFIG');
let appkey = uni.getStorage({
key: 'launchFlag'
})
if (appkey) {
setTimeout(() => {
this.$store.dispatch('INIT_CONFIG');
}, 6000)
}
// #ifdef APP-PLUS
//uniMP
@ -226,6 +219,7 @@
},
onShow() {
@ -426,7 +420,7 @@
this.setOpenShare(res.data);
// #endif
}).catch(err => {});
},
}
},
onHide: function() {
//console.log('App Hide')

View File

@ -261,53 +261,4 @@ export function spuTopList(data) {
return request.get(`product/spu/get_hot_ranking`, data, {
noAuth: true
});
}
// 活动列表
export function consumption(data) {
return request.get(`storeActivity/consumption`, data, {
noAuth: true
});
}
// 参加活动
export function chooseConsumption(data) {
return request.post(`storeActivity/choose`, data);
}
// 拉新红包活动完成状态
export function storeActivityStatus(data) {
return request.get(`storeActivity/status`, data);
}
// 领取红包
export function storeActivityReceive(data) {
return request.post(`storeActivity/receive`, data);
}
// 拉新红包活动完成状态
export function storeActivityRecord(data) {
return request.get(`storeActivity/record`, data);
}
// 红包余额统计
export function storeActivityTotal(data) {
return request.get(`storeActivity/total`, data);
}
// 生成二维码
export function storeActivityQrcode(data) {
return request.get(`qrcode`, data);
}
// 活动商品专区
export function storeActivityProduct(data) {
return request.get(`storeActivity/product`, data, {
noAuth: true
});
}
// 活动区域列表
export function storeActivityDistrict(data) {
return request.get(`storeActivity/district`, data);
}
}

View File

@ -7,15 +7,6 @@ import request from "@/utils/request.js";
export function cloudWarehouse(data) {
return request.get("store/product/cloudWarehouse", data, { noAuth: true });
}
/**
* 为你推荐
*
*/
export function spuRecommend(data) {
return request.get("product/spu/recommend", data, { noAuth: true });
}
/**
* 获取云仓分类
*

View File

@ -320,4 +320,4 @@ export function intention(data) {
*/
export function intentionbus(data) {
return request.post(`intention/business`, data);
}
}

View File

@ -141,12 +141,4 @@ export function getNavigation(data) {
return request.get("navigation", data, {
noAuth: true
});
}
/*
小程序 -- 小程序列表
*/
export function applet(data) {
return request.get(`applet`, data);
}

View File

@ -3,16 +3,9 @@ import request from "@/utils/requesta.js";
export function getCityCloundShop(data) {
return request.get("city/get_cloud_shop", data);
}
export function getCategoryListLevel(data) {
return request.get("category/list_level", data);
}
export function cloudWarehouse(data) {
return request.get("store/product/cloudWarehouse", data);
}
export function townCloud(data) {
return request.get("store/product/town_cloud", data);
}
/**
* 供销市场标签
* @returns {*}

View File

@ -373,14 +373,6 @@ export function getHotBanner(type) {
export function create(data) {
return request.post("intention/create", data);
}
/**
* 个人入驻表单
* @returns {*}
*/
export function personalStore(data) {
return request.post("intention/personal_store", data);
}
/**
* 商户入驻短信验证码
* @returns {*}
@ -590,22 +582,4 @@ export function agreeiness(data) {
return request.get(`business/agree`, data, {
noAuth: true
});
}
/*
上传图片识别文字
*/
export function merchantLicenseIdentify(data) {
return request.post(`merchant_license_identify`, data, {
noAuth: true
});
}
/*
从供销平台获取村店铺负责人,联系电话
*/
export function getVillageInfo(data) {
return requestb.get(`shop_call/getVillageCompany`, data, {
noAuth: true
});
}

View File

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

View File

@ -1,95 +0,0 @@
<template>
<div class="popup" v-if="isShow">
<div class="box">
<div class="loading"></div>
<p>{{str}}</p>
</div>
</div>
</template>
<script>
export default {
name: 'Loading',
data() {
return {
isShow: false,
str: '初始化中',
timer: null
};
},
mounted() {
uni.$on('showLoading', (type, str) => {
if (type == true) {
this.isShow = true;
this.str = str;
} else {
this.isShow = false;
}
})
},
methods: {
clickTow(){
}
},
};
</script>
<style scoped lang="scss">
.popup-enter-active,
.popup-leave-active {
transition: opacity 0.3s ease-in-out;
}
.popup-enter,
.popup-leave-to {
opacity: 0;
}
.popup {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 99999999;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: rgba(0, 0, 0, 0.2);
.box{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: rgba(0, 0, 0, 0.5);
color: #eee;
height: 300rpx;
width: 300rpx;
border-radius: 20rpx;
box-sizing: border-box;
overflow: hidden;
}
}
.loading {
width: 80rpx;
height: 80rpx;
border: 6rpx solid #eee;
border-top-color: transparent;
border-radius: 100%;
margin-bottom: 30rpx;
animation: circle infinite 0.75s linear;
}
@keyframes circle {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
</style>

View File

@ -162,10 +162,10 @@ export default {
itemTap(item) {
this.$emit('itemTap', item)
},
// item
goShop(item) {
this.$emit('goShop', item)
}
// item
goShop(item) {
this.$emit('goShop', item)
}
}
}
</script>

View File

@ -1,195 +0,0 @@
<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

@ -49,7 +49,7 @@
<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="score">{{item.rate}}评分 {{item.reply_count}}条评论</view>
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
<text class="line1">{{item.merchant.mer_name}}</text>
<view class="flex" v-if="isStore != '1'">

View File

@ -25,24 +25,18 @@
<view class="relase-two">
{{item.reply_count}}评论
</view>
<view class="relase-two">
{{item.merchant&&item.merchant.distance}}
</view>
<view class="relase-two">
{{item.merchant&&item.merchant.street_name}}
</view>
</view>
<view class="price">
<span></span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
</view>
<!-- <view class="item-info">
<view class="item-info">
<view class="info-title" style="margin-right: 10rpx;">
{{item.merchant.mer_name}}
</view>
<view class="info-img">
<image src="@/static/images/you.png" mode="aspectFit"></image>
</view>
</view> -->
</view>
</view>
</template>
@ -93,8 +87,7 @@
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin: 14rpx 0;
margin-bottom: 0;
margin: 12px 0;
padding-right: 12rpx;
width: 100%;
overflow: hidden;
@ -151,10 +144,9 @@
.relase {
display: flex;
flex-wrap: wrap;
margin-left: 21rpx;
margin-top: 12rpx;
min-height: 26rpx;
height: 26rpx;
line-height: 26rpx;
.relase-one {
@ -164,6 +156,7 @@
font-family: SF Pro Display-Regular Italic, SF Pro Display;
font-weight: 600;
color: #FF6D20;
}
.relase-two {
@ -177,7 +170,7 @@
.price {
margin-left: 21rpx;
// margin-bottom: 10rpx;
margin-bottom: 10rpx;
color: #F84221;
font-size: 44rpx;
font-weight: 600;

View File

@ -1,347 +0,0 @@
<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

@ -1,102 +0,0 @@
<template>
<view class="a_c_home">
<view class="c_card">
<view class="c_content">
<scroll-view style="height: 100%;" scroll-y>
<view v-if="info.content" v-html="info.content.content"></view>
</scroll-view>
</view>
<view class="btn_box">
<image class="btn_img" @click="open()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_btn1.webp"></image>
<image class="btn_img" @click="open()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_btn2.webp"></image>
</view>
</view>
<image class="head_img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/card_head.webp" info="活动标题"></image>
<image class="close_img" @click="close" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png" info="关闭按钮"></image>
</view>
</template>
<script>
import { getArticleList } from "@/api/api.js"
export default {
data(){
return {
info: ''
}
},
created() {
this.getArticleList();
},
methods:{
close(){
this.$emit('close');
},
open(){
uni.navigateTo({
url: '/pages/newActivity/activityDetail/activityDetail'
})
},
getArticleList(){
getArticleList(25).then(res=>{
this.info = res.data.list[0]
})
}
}
}
</script>
<style lang="scss">
.a_c_home{
width: 600rpx;
height: 90vh;
// border: 1px solid red;
position: relative;
.head_img{
width: 568rpx;
height: 207rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%);
}
.c_card{
height: calc(100% - 300rpx);
width: 100%;
background-color: #fff;
position: absolute;
border-radius: 50rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 30rpx;
padding-top: 70rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.c_content{
height: calc(100% - 220rpx);
width: 100%;
// background-color: #eee;
}
.btn_box{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.btn_img{
width: 461rpx;
height: 100rpx;
}
}
}
.close_img{
position: absolute;
bottom: 60rpx;
left: 50%;
transform: translate(-50%);
width: 60rpx;
height: 60rpx;
}
}
</style>

View File

@ -1,62 +0,0 @@
<template>
<view class="a_h_home">
<view class="a_h_body" v-if="show">
<image @click.stop="open()" class="a_h_bg" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/tow_price_card.webp"></image>
<image v-if="showClose" @click.stop="close()" class="a_h_close" src="../static/images/wt_close.png"></image>
</view>
</view>
</template>
<script>
export default {
props:{
showClose: {
type: Boolean,
default: true
}
},
data(){
return {
show: true
}
},
methods:{
open(){
this.$emit('click');
},
close(){
this.show = false;
}
}
}
</script>
<style lang="scss">
.a_h_home{
position: fixed;
bottom: 25vh;
right: 30rpx;
z-index: 10;
width: 180rpx;
// height: 150rpx;
.a_h_bg{
height: 100%;
width: 100%;
}
.a_h_body{
width: 100%;
height: 100%;
// background-color: #eee;
position: relative;
.a_h_close{
position: absolute;
right: 5rpx;
top: 5rpx;
width: 30rpx;
height: 30rpx;
background-color: rgba(#000, 0.4);
border-radius: 50%;
}
}
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<view :style="viewColor" @touchmove.stop.prevent="()=>{}">
<view :style="viewColor">
<view class="add_invoicing" :class="invoice.invoice==true?'on':''">
<view class='title'>选择发票<text class='iconfont icon-guanbi' @tap='close'></text></view>
<form @submit="formSubmit" report-submit="true">
@ -302,15 +302,11 @@
this.popupTitle = false;
},
changeHeader(e) {
console.log(e);
this.receipt_title_type = e.detail.value;
if(e.detail.value == 1){
this.receipt_type = 1;
this.typeName = '增值税电子普通发票'
}else {
this.receipt_type = 2;
this.typeName = '增值税专用发票'
}
}
this.receipt_type
},
changeDefault(e) {

View File

@ -18,7 +18,7 @@
<image src='../../static/images/noAddress.png'></image>
<view>暂无地址</view>
</view>
<view class='addressBnt' @tap='goAddressPages'>添加/编辑地址</view>
<view class='addressBnt' @tap='goAddressPages'>添加地址</view>
</view>
<view class='mask' catchtouchmove="true" :hidden='address.address==false' @tap='close'></view>
</view>

View File

@ -1,518 +0,0 @@
<template>
<view>
<uni-popup ref="popupRef" type="bottom" @change="changeShow">
<view class="pop">
<scroll-view scroll-y class="scroll">
<view class="image">
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;" @change="changeCurrent">
<block v-if="product.slider_image && product.slider_image.length>0">
<swiper-item v-for="(item,index) in product.slider_image" :key="index">
<image class="img" :src="item"></image>
</swiper-item>
</block>
<swiper-item v-else>
<image class="img" :src="datas.image||defualtImg"></image>
</swiper-item>
</swiper>
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}</view>
<image class="close" src="@/static/images/icon/close.png" @click="close()"></image>
<view class="border"></view>
</view>
<view class="white_card">
<view class="flex flex_end">
<view class="price"><text class="pro">{{leftPrice}}.</text>{{rightPrice}}
</view>
<!-- <view>订货价</view> -->
</view>
<view class="short_name">{{datas.store_name}}</view>
<view class="flex">
<view class="shop_name">
<image class="icon" src="@/static/images/icon/short.png"></image>
<view>{{datas.merchant.mer_name}}</view>
</view>
</view>
<u-line></u-line>
<block name="规格选中" v-for="(att, indexw) in attr" :key="indexw">
<view class="m_title">{{att.attr_name}}</view>
<view class="flex" style="flex-wrap: wrap;">
<view class="attr" :class="{'attr_active': item.check}"
v-for="(item, indexn) in att.attr_value" :key="indexn"
@click="changeAttr(indexw, indexn)">
{{item.attr}}
</view>
</view>
</block>
<view class="m_title num">
<view>购买数量</view>
<view class="input">
<view class="input_item sub" @click="subCartNum">-</view>
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" />
<view class="input_item plus" @click="plusCartNum">+</view>
</view>
</view>
<view>
商品库存 <text style="margin-left: 20rpx;">{{(sku[changeSkuKey] && sku[changeSkuKey].stock)||change.stock}}</text>
</view>
</view>
</scroll-view>
<view class="button">
<view class="b_icon" @click="navgoCart()">
<image src="@/static/images/icon/car.png"></image>
<view>购物车</view>
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
</view>
<view class="btn" @click.stop="$u.throttle(addcart, 1500)"> {{isBuy?'立即购买':'加入购物车'}} </view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
postCartAdd,
getProductDetail
} from '@/api/store.js';
export default {
name: "shortPopup",
props: {
source:{
type: Number,
default: null
},
isBuy: {
type: Boolean,
default: false
}
},
data() {
return {
isShow: false, //
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
datas: {
image: '',
store_name: '',
merchant: {
mer_name: ''
},
price: '',
},
product: {},
attrValue: [],
attr: [], //
changeSkuKey: '', //key
sku: {}, //
sku_key_list: [], //
changeSkuKey: '', //
change: {
stock: ''
},
cart_num: 1, //
goodsNum: 0, //
current: 0, //
};
},
mounted() {},
computed:{
leftPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[0]||'0';
},
rightPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[1]||'00';
}
},
methods: {
// ,
setDatas(datas, goodsNum) {
getProductDetail(datas.product_id).then((res)=>{
this.attr = res.data.attr;
if(this.attr.length>0) this.attr.forEach((item, index)=>{
this.changeAttr(index, 0);
})
else this.changeSkuKey = '';
})
this.goodsNum = goodsNum;
this.datas = datas;
this.product = datas.product;
this.attrValue = datas.product?.attrValue;
this.change = this.attrValue[0];
this.cart_num = 1;
this.sku = datas.sku||{};
this.sku_key_list = Object.keys(this.sku);
},
//
inputCartNum(e) {
if(this.sku){
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.sku[this.changeSkuKey].stock;
})
}
}else if (this.change.stock <= this.cart_num) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.change.stock;
})
}
},
//
subCartNum() {
if (this.cart_num <= 1) {
return uni.showToast({
icon: 'none',
title: '最少要买一件哦'
})
}
this.cart_num--;
},
//
plusCartNum() {
if(this.sku){
if (this.sku[this.changeSkuKey].stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
}else if (this.change.stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
this.cart_num++;
},
changeAttr: function(indexw, indexn) {
let that = this;
this.$set(this.attr[indexw], 'index', this.attr[indexw].attr_values[indexn]);
this.attr[indexw].attr_value.forEach((item, index)=>{
if(index==indexn)item.check = true;
else item.check = false;
})
let value = that.getCheckedValue().join(",");
this.changeSkuKey = value;
},
//
getCheckedValue: function() {
let productAttr = this.attr;
let value = [];
for (let i = 0; i < productAttr.length; i++) {
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
if (productAttr[i].index === productAttr[i].attr_values[j]) {
value.push(productAttr[i].attr_values[j]);
}
}
}
return value;
},
//
addcart() {
if (this.sku[this.changeSkuKey]) {
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
let data = {
cart_num: this.cart_num,
is_new: 0,
product_attr_unique: this.sku[this.changeSkuKey].unique,
product_id: this.datas.product_id,
product_type: this.datas.product_type,
source: this.source,
spread_id: "",
}
let that = this
let res = postCartAdd({
...data
}).then((res, err) => {
uni.showToast({
title: "加入成功",
duration: 1000,
})
this.$emit('addCart');
this.close();
if(this.isBuy){
this.navgoCart();
}
}).catch(err => {
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
} else {
uni.showToast({
icon: 'none',
title: '商品规格不存在'
})
}
},
//
changeCurrent(e){
this.current = e.detail.current;
},
navgoCart(url=null) {
if(!url) {
if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
else url = '/pages/order_addcart/order_addcart';
}
uni.navigateTo({
url
})
},
open() {
this.$refs.popupRef.open();
},
close() {
this.$refs.popupRef.close();
},
changeShow(e) {
this.isShow = e.show;
}
}
}
</script>
<style lang="scss">
.pop {
background-color: #fff;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
position: relative;
.scroll{
height: calc(90vh - 150rpx);
}
.flex_end {
align-items: flex-end;
}
.image {
height: 750rpx;
width: 750rpx;
position: relative;
.current{
position: absolute;
bottom: 70rpx;
left: 30rpx;
width: 67rpx;
height: 37rpx;
background: rgba(#333, 0.2);
border-radius: 11rpx 11rpx 11rpx 11rpx;
text-align: center;
color: #fff;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
.img {
width: 100%;
height: 100%;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
}
.close {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 50.82rpx;
height: 50.82rpx;
}
.border {
position: absolute;
bottom: -1rpx;
left: 0;
background-color: #fff;
height: 40rpx;
width: 100%;
border-radius: 40rpx 40rpx 0 0;
}
}
.white_card {
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
background-color: #fff;
margin: 0 28rpx;
padding-bottom: 30rpx;
color: #737373;
font-size: 26.29rpx;
.price {
font-size: 35rpx;
font-family: SF Pro Display-Semibold, SF Pro Display;
font-weight: 600;
color: #F84221;
padding-right: 30rpx;
.pro {
font-size: 49.07rpx;
}
}
.short_name {
font-size: 33rpx;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
}
.shop_name {
display: flex;
background: #FEF5F3;
padding: 0 16rpx;
border-radius: 26rpx 26rpx 26rpx 26rpx;
margin-top: 30rpx;
margin-bottom: 20rpx;
align-items: center;
.icon {
width: 31.54rpx;
height: 31.54rpx;
margin-right: 10rpx;
}
}
.m_title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 31rpx;
margin-bottom: 21rpx;
}
.attr {
opacity: 1;
border: 1rpx solid #F84221;
color: #333333;
padding: 15rpx 30rpx;
margin-right: 20rpx;
height: 63rpx;
line-height: 60rpx;
border-radius: 63rpx;
display: flex;
align-items: center;
justify-content: center;
}
.attr_active{
// background-color: #FEF5F3;
// color: #F84221;
background-color: #F84221;
color: #fff;
}
.num {
display: flex;
justify-content: space-between;
align-items: center;
.input {
display: flex;
align-items: center;
height: 48rpx;
.input_item {
width: 44rpx;
height: 44rpx;
text-align: center;
line-height: 40rpx;
border: 2rpx solid #fff;
font-size: 26rpx;
color: #333;
}
.input_view {
width: 60rpx;
}
.sub {
border: 2rpx solid #FCB9AD;
border-radius: 7rpx 0rpx 0rpx 7rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
.plus {
border: 2rpx solid #FCB9AD;
border-radius: 0rpx 7rpx 7rpx 0rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
}
}
}
.button {
padding: 28rpx;
margin-bottom: 28rpx;
background-color: #fff;
display: flex;
justify-content: space-around;
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
.b_icon {
display: flex;
flex-direction: column;
align-items: center;
font-size: 19rpx;
font-weight: 400;
color: #333333;
position: relative;
image {
width: 50.82rpx;
height: 50.82rpx;
}
.badge {
position: absolute;
top: -5rpx;
right: -10rpx;
color: #fff;
min-width: 28rpx;
height: 28rpx;
text-align: center;
line-height: 24rpx;
background: #F84221;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #FFFFFF;
}
}
.btn {
width: 575rpx;
height: 84rpx;
background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%);
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
}
}
</style>

View File

@ -1,534 +0,0 @@
<template>
<view>
<uni-popup ref="popupRef" type="bottom" @change="changeShow">
<view class="pop">
<scroll-view scroll-y class="scroll">
<view class="image">
<swiper class="swiper" :current="current" autoplay style="width: 100%;height: 100%;" @change="changeCurrent">
<block v-if="product.slider_image && product.slider_image.length>0">
<swiper-item v-for="(item,index) in product.slider_image" :key="index">
<image class="img" :src="item"></image>
</swiper-item>
</block>
<swiper-item v-else>
<image class="img" :src="datas.image||defualtImg"></image>
</swiper-item>
</swiper>
<view class="current">{{current+1}}/{{product.slider_image && product.slider_image.length||1}}</view>
<image class="close" src="@/static/images/icon/close.png" @click="close()"></image>
<view class="border"></view>
</view>
<view class="white_card">
<view class="flex flex_end">
<block v-if="datas.limited_price">
<view class="price"><text class="pro">{{leftPrice2}}.</text>{{rightPrice2}}
</view>
<view class="price" style="text-decoration: line-through;color: #999;font-weight: 400;font-size: 28rpx;">原价: <text>{{leftPrice}}.</text>{{rightPrice}}</view>
</block>
<view v-else class="price"><text>{{leftPrice}}.</text>{{rightPrice}}</view>
<!-- <view>订货价</view> -->
</view>
<view class="short_name">{{datas.store_name}}</view>
<view class="flex">
<view class="shop_name">
<image class="icon" src="@/static/images/icon/short.png"></image>
<view>{{datas.merchant.mer_name}}</view>
</view>
</view>
<u-line></u-line>
<block name="规格选中" v-for="(att, indexw) in attr" :key="indexw">
<view class="m_title">{{att.attr_name}}</view>
<view class="flex" style="flex-wrap: wrap;">
<view class="attr" :class="{'attr_active': item.check}"
v-for="(item, indexn) in att.attr_value" :key="indexn"
@click="changeAttr(indexw, indexn)">
{{item.attr}}
</view>
</view>
</block>
<view class="m_title num">
<view>购买数量</view>
<view class="input">
<view class="input_item sub" @click="subCartNum">-</view>
<input class="input_item input_view" v-model="cart_num" type="number" @input="inputCartNum" />
<view class="input_item plus" @click="plusCartNum">+</view>
</view>
</view>
<view>
商品库存 <text style="margin-left: 20rpx;">{{(sku[changeSkuKey] && sku[changeSkuKey].stock)||change.stock}}</text>
</view>
</view>
</scroll-view>
<view class="button">
<!-- <view class="b_icon" @click="navgoCart()">
<image src="@/static/images/icon/car.png"></image>
<view>购物车</view>
<view class="badge" v-if="goodsNum">{{goodsNum}}</view>
</view> -->
<view class="btn" @click.stop="$u.throttle(addcart, 1500)"> {{isBuy?'立即购买':'加入购物车'}} </view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
postCartAdd,
getProductDetail
} from '@/api/store.js';
import { Toast } from '../libs/uniApi';
import { data } from '../uni_modules/uview-ui/libs/mixin/mixin';
export default {
name: "shortPopup",
props: {
source:{
type: Number,
default: null
},
isBuy: {
type: Boolean,
default: false
}
},
data() {
return {
isShow: false, //
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
datas: {
image: '',
store_name: '',
merchant: {
mer_name: ''
},
price: '',
},
product: {},
attrValue: [],
attr: [], //
changeSkuKey: '', //key
sku: {}, //
sku_key_list: [], //
changeSkuKey: '', //
change: {
stock: ''
},
cart_num: 1, //
goodsNum: 0, //
current: 0, //
};
},
mounted() {},
computed:{
leftPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[0]||'0';
},
rightPrice(){
return this.sku[this.changeSkuKey]?.price?.split('.')[1]||'00';
},
leftPrice2(){
return this.datas.limited_price.split('.')[0]||'0';
},
rightPrice2(){
return this.datas.limited_price.split('.')[1]||'00';
}
},
methods: {
// ,
setDatas(datas, goodsNum) {
getProductDetail(datas.product_id).then((res)=>{
this.attr = res.data.attr;
if(this.attr.length>0) this.attr.forEach((item, index)=>{
this.changeAttr(index, 0);
})
else this.changeSkuKey = '';
})
this.goodsNum = goodsNum;
this.datas = datas;
this.product = datas.product;
this.attrValue = datas.product?.attrValue;
this.change = this.attrValue[0];
this.cart_num = 1;
this.sku = datas.sku||{};
this.sku_key_list = Object.keys(this.sku);
},
//
inputCartNum(e) {
if(this.sku){
if (+e.detail.value > this.sku[this.changeSkuKey].stock) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.sku[this.changeSkuKey].stock;
})
}
}else if (this.change.stock <= this.cart_num) {
uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
this.$nextTick(() => {
this.cart_num = this.change.stock;
})
}
},
//
subCartNum() {
if (this.cart_num <= 1) {
return uni.showToast({
icon: 'none',
title: '最少要买一件哦'
})
}
this.cart_num--;
},
//
plusCartNum() {
return Toast('最多购买一件哦');
if(this.sku){
if (this.sku[this.changeSkuKey].stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
}else if (this.change.stock <= this.cart_num) {
return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
}
this.cart_num++;
},
changeAttr: function(indexw, indexn) {
let that = this;
this.$set(this.attr[indexw], 'index', this.attr[indexw].attr_values[indexn]);
this.attr[indexw].attr_value.forEach((item, index)=>{
if(index==indexn)item.check = true;
else item.check = false;
})
let value = that.getCheckedValue().join(",");
this.changeSkuKey = value;
},
//
getCheckedValue: function() {
let productAttr = this.attr;
let value = [];
for (let i = 0; i < productAttr.length; i++) {
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
if (productAttr[i].index === productAttr[i].attr_values[j]) {
value.push(productAttr[i].attr_values[j]);
}
}
}
return value;
},
//
addcart() {
if (this.sku[this.changeSkuKey]) {
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
icon: 'none',
title: '不能超出库存哦'
})
let data = {
cart_num: this.cart_num,
is_new: 0,
product_attr_unique: this.sku[this.changeSkuKey].unique,
product_id: this.datas.product_id,
product_type: this.datas.product_type,
source: this.source,
spread_id: "",
}
let that = this
let res = postCartAdd({
...data
}).then((res, err) => {
if(this.isBuy) return uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&type_id=${this.datas.merchant.type_id}&source=${this.source}`
});
uni.showToast({
title: "加入成功",
duration: 1000,
})
this.$emit('addCart');
this.close();
if(this.isBuy){
this.navgoCart();
}
}).catch(err => {
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
} else {
uni.showToast({
icon: 'none',
title: '商品规格不存在'
})
}
},
//
changeCurrent(e){
this.current = e.detail.current;
},
navgoCart(url=null) {
if(!url) {
if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
else url = '/pages/order_addcart/order_addcart';
}
uni.navigateTo({
url
})
},
open() {
this.$refs.popupRef.open();
},
close() {
this.$refs.popupRef.close();
},
changeShow(e) {
this.isShow = e.show;
}
}
}
</script>
<style lang="scss">
.pop {
background-color: #fff;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
position: relative;
.scroll{
height: calc(90vh - 150rpx);
}
.flex_end {
align-items: flex-end;
}
.image {
height: 750rpx;
width: 750rpx;
position: relative;
.current{
position: absolute;
bottom: 70rpx;
left: 30rpx;
width: 67rpx;
height: 37rpx;
background: rgba(#333, 0.2);
border-radius: 11rpx 11rpx 11rpx 11rpx;
text-align: center;
color: #fff;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
.img {
width: 100%;
height: 100%;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
}
.close {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 50.82rpx;
height: 50.82rpx;
}
.border {
position: absolute;
bottom: -1rpx;
left: 0;
background-color: #fff;
height: 40rpx;
width: 100%;
border-radius: 40rpx 40rpx 0 0;
}
}
.white_card {
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
background-color: #fff;
margin: 0 28rpx;
padding-bottom: 30rpx;
color: #737373;
font-size: 26.29rpx;
.price {
font-size: 35rpx;
font-family: SF Pro Display-Semibold, SF Pro Display;
font-weight: 600;
color: #F84221;
padding-right: 30rpx;
.pro {
font-size: 49.07rpx;
}
}
.short_name {
font-size: 33rpx;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
}
.shop_name {
display: flex;
background: #FEF5F3;
padding: 0 16rpx;
border-radius: 26rpx 26rpx 26rpx 26rpx;
margin-top: 30rpx;
margin-bottom: 20rpx;
align-items: center;
.icon {
width: 31.54rpx;
height: 31.54rpx;
margin-right: 10rpx;
}
}
.m_title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 31rpx;
margin-bottom: 21rpx;
}
.attr {
opacity: 1;
border: 1rpx solid #F84221;
color: #333333;
padding: 15rpx 30rpx;
margin-right: 20rpx;
height: 63rpx;
line-height: 60rpx;
border-radius: 63rpx;
display: flex;
align-items: center;
justify-content: center;
}
.attr_active{
// background-color: #FEF5F3;
// color: #F84221;
background-color: #F84221;
color: #fff;
}
.num {
display: flex;
justify-content: space-between;
align-items: center;
.input {
display: flex;
align-items: center;
height: 48rpx;
.input_item {
width: 44rpx;
height: 44rpx;
text-align: center;
line-height: 40rpx;
border: 2rpx solid #fff;
font-size: 26rpx;
color: #333;
}
.input_view {
width: 60rpx;
}
.sub {
border: 2rpx solid #FCB9AD;
border-radius: 7rpx 0rpx 0rpx 7rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
.plus {
border: 2rpx solid #FCB9AD;
border-radius: 0rpx 7rpx 7rpx 0rpx;
background: #FFFFFF;
font-size: 26rpx;
color: #B3B3B3;
}
}
}
}
.button {
padding: 28rpx;
margin-bottom: 28rpx;
background-color: #fff;
display: flex;
justify-content: space-around;
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
.b_icon {
display: flex;
flex-direction: column;
align-items: center;
font-size: 19rpx;
font-weight: 400;
color: #333333;
position: relative;
image {
width: 50.82rpx;
height: 50.82rpx;
}
.badge {
position: absolute;
top: -5rpx;
right: -10rpx;
color: #fff;
min-width: 28rpx;
height: 28rpx;
text-align: center;
line-height: 24rpx;
background: #F84221;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #FFFFFF;
}
}
.btn {
width: 575rpx;
height: 84rpx;
background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%);
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
}
}
</style>

View File

@ -37,8 +37,8 @@
</block>
</swiper>
</view>
<!-- <u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker> -->
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
</view>
</template>
@ -108,7 +108,7 @@
created() {
this.getBanner()
// this.Area()
this.Area()
},
@ -120,6 +120,11 @@
});
},
onShow() {
this.getBanner()
this.Area()
},
methods: {
swiperClick(item) {
const url = item.info[1].value
@ -231,7 +236,7 @@
width: 102%;
height: 133px;
border-radius: 30px 30px 0 0;
background-color: #f8f8f8;
background-color: #fff;
}
.bg-img {

View File

@ -8,8 +8,6 @@ let httpApiTwo
let httpApiThree
let httpApiFour
let httpApiFive
let httpApiSix
let wsApi
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
@ -22,16 +20,12 @@ switch (env) {
httpApiTwo = 'https://nk.lihaink.cn'
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://worker-task.lihaink.cn'
httpApiSix = 'https://new-worker.lihaink.cn'
wsApi = 'wss://shop.lihaink.cn'
break;
case 'prew':
httpApi = 'https://test.shop.lihaink.cn' //预发布环境
httpApiTwo = "https://nk.lihaink.cn"
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://preview-worker-task.lihaink.cn'
httpApiSix = 'https://ceshi-new-wokr.lihaink.cn'
wsApi = 'wss://test.shop.lihaink.cn'
break;
default:
httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试
@ -39,17 +33,15 @@ switch (env) {
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://ceshi-worker-task.lihaink.cn'
httpApiFive = 'https://ceshi-zhibo.lihaink.cn'
httpApiSix = 'https://ceshi-new-wokr.lihaink.cn'
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
}
const ossUrl = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public'
// httpApi=''
// 聊天接口修改此字符 小程序聊天要求wss 例如wss://mer.crmeb.net
// wsApi = 'ws://192.168.1.17:8324'
// let wsApi = 'ws://192.168.3.20:8324'
let wsApi = 'wss://shop.lihaink.cn'
let wsApi_one = 'wss://ceshi-zhibo.lihaink.cn/chat_room'
module.exports = {
// 请求域名 格式: https://您的域名
// #ifdef MP || APP-PLUS
@ -59,7 +51,6 @@ module.exports = {
HTTP_REQUEST_URL_THREE: httpApiThree,
HTTP_REQUEST_URL_FOUR: httpApiFour,
HTTP_REQUEST_URL_FIVE: httpApiFive,
HTTP_REQUEST_URL_SIX: httpApiSix,
VUE_APP_WS_URL: `${wsApi}?type=user`,
VUE_APP_WS_URL_ONE:wsApi_one,
// #endif
@ -69,15 +60,12 @@ module.exports = {
HTTP_REQUEST_URL: process.env.NODE_ENV == 'development'? httpApi : window.location.protocol + "//" + window.location.host,
HTTP_REQUEST_URL_TWO: httpApiTwo,
HTTP_REQUEST_URL_FIVE: httpApiFive,
HTTP_REQUEST_URL_SIX: httpApiSix,
HTTP_REQUEST_URL_FOUR: window.location.host == 'shop.lihaink.cn' ?'https://worker-task.lihaink.cn':window.location.host == 'test.shop.lihaink.cn'?'https://preview-worker-task.lihaink.cn':'https://ceshi-worker-task.lihaink.cn',
// 聊天长连接地址
VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
// #endif
openPlantGrass: openPlantGrass,
ENV: env,
OSS_URL: ossUrl,
HEADER: {
'content-type': 'application/json',

View File

@ -17,14 +17,10 @@ import {
} from '@/config/app';
import skeleton from './components/skeleton/index.vue'
import BaseMoney from './components/BaseMoney.vue';
import Loading from './components/Loading.vue';
import activityHome from './components/activityHome.vue';
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.component('skeleton', skeleton)
Vue.component('BaseMoney', BaseMoney)
Vue.component('Loading', Loading)
Vue.component('activityHome', activityHome)
Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "1.8.0",
"versionCode" : 180,
"versionName" : "1.5.3",
"versionCode" : 153,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -12,11 +12,8 @@
"nvueCompiler" : "uni-app",
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
@ -36,8 +33,8 @@
},
"Maps" : {},
"Push" : {},
"LivePusher" : {},
"Record" : {}
"Record" : {},
"LivePusher" : {}
},
"safearea" : {
"bottom" : {
@ -84,9 +81,7 @@
},
"permissionPhoneState" : {
"request" : "none" //
},
"targetSdkVersion" : 30,
"minSdkVersion" : 23
}
},
/* ios */
"ios" : {
@ -96,8 +91,7 @@
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
"NSMicrophoneUsageDescription" : "根据用户录音进行语音识别转文字"
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店"
},
"idfa" : false,
"dSYMs" : false
@ -107,8 +101,7 @@
"maps" : {
"amap" : {
"appkey_ios" : "82af93ec51139c712c4118d84ba684ee",
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1",
"name" : "amap_18982406440DFVLElaO"
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
}
},
"payment" : {
@ -128,8 +121,7 @@
"amap" : {
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "82af93ec51139c712c4118d84ba684ee",
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1",
"name" : "amap_18982406440DFVLElaO"
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
}
},
"oauth" : {},
@ -169,17 +161,7 @@
}
},
"splashscreen" : {
"useOriginalMsgbox" : true,
"androidStyle" : "default",
"iosStyle" : "common",
"ios" : {
"storyboard" : "C:/Users/ghf/Downloads/CustomStoryboard.zip"
},
"android" : {
"hdpi" : "",
"xhdpi" : "",
"xxhdpi" : "static/images/guide.png"
}
"useOriginalMsgbox" : true
}
},
"nativePlugins" : {
@ -350,10 +332,8 @@
"domain" : "",
"sdkConfigs" : {
"maps" : {
"amap" : {
"key" : "275cd3601b1b2d6414f6c988e7911664",
"securityJsCode" : "d2d7c56801819e8bdf71b8a71846f235",
"serviceHost" : ""
"qqmap" : {
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
}
}
},

109
package-lock.json generated
View File

@ -1,23 +1,24 @@
{
"name": "e-select下拉选择器",
"version": "1.0.7",
"lockfileVersion": 1,
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
"dev": true
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"dev": true,
"requires": {
"chalk": "^1.1.3",
"esutils": "^2.0.2",
@ -28,6 +29,7 @@
"version": "6.26.3",
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
"integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.26.0",
"babel-generator": "^6.26.0",
@ -54,6 +56,7 @@
"version": "6.26.1",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
"integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
"dev": true,
"requires": {
"babel-messages": "^6.23.0",
"babel-runtime": "^6.26.0",
@ -69,6 +72,7 @@
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
"integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1"
@ -78,6 +82,7 @@
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
@ -86,6 +91,7 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
"integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
"dev": true,
"requires": {
"babel-core": "^6.26.0",
"babel-runtime": "^6.26.0",
@ -100,6 +106,7 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
@ -109,6 +116,7 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
"dev": true,
"requires": {
"babel-runtime": "^6.26.0",
"babel-traverse": "^6.26.0",
@ -121,6 +129,7 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"dev": true,
"requires": {
"babel-code-frame": "^6.26.0",
"babel-messages": "^6.23.0",
@ -137,6 +146,7 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"dev": true,
"requires": {
"babel-runtime": "^6.26.0",
"esutils": "^2.0.2",
@ -147,17 +157,20 @@
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
"dev": true
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -167,6 +180,7 @@
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
@ -178,12 +192,14 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"convert-source-map": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
"integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.1"
}
@ -191,12 +207,14 @@
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
"dev": true
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@ -205,6 +223,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
"dev": true,
"requires": {
"repeating": "^2.0.0"
}
@ -212,22 +231,26 @@
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
"globals": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ=="
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
"dev": true
},
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -236,6 +259,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
"integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
"dev": true,
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.1"
@ -245,6 +269,7 @@
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"dev": true,
"requires": {
"loose-envify": "^1.0.0"
}
@ -252,32 +277,38 @@
"is-finite": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
"integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w=="
"integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
"dev": true
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
"dev": true
},
"jsesc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
"dev": true
},
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
},
"loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
@ -286,6 +317,7 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -293,12 +325,14 @@
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
},
"mkdirp": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dev": true,
"requires": {
"minimist": "^1.2.5"
}
@ -306,37 +340,44 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
"dev": true
},
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg=="
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
"dev": true
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"dev": true
},
"repeating": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
"integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
"dev": true,
"requires": {
"is-finite": "^1.0.0"
}
@ -344,22 +385,26 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU="
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
"dev": true
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
},
"source-map-support": {
"version": "0.4.18",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
"dev": true,
"requires": {
"source-map": "^0.5.6"
}
@ -368,6 +413,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -375,17 +421,20 @@
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"dev": true
},
"to-fast-properties": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
"dev": true
},
"trim-right": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
"dev": true
}
}
}

View File

@ -12,6 +12,5 @@
"前端组件",
"通用组件"
]
},
"dependencies": {}
}
}
}

View File

@ -1,58 +1,47 @@
{
"pages": [
//#ifdef APP-PLUS
//
{
"path": "pages/guide/judge",
"style": {
"enablePullDownRefresh": false,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"app-plus": {
"contentAdjust": false,
"bounce": "none"
}
}
},
{
"path": "pages/guide/guide",
"style": {
"enablePullDownRefresh": false,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"app-plus": {
"contentAdjust": false,
"bounce": "none"
}
}
},
// #endif
//pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"onReachBottomDistance": 300,
// #ifdef APP-PLUS
"enablePullDownRefresh": true,
// #endif
"app-plus": {
"scrollIndicator": false //
}
}
},
{
"path": "pages/supply_chains/supply_chains",
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "供应",
"enablePullDownRefresh": true,
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"onReachBottomDistance": 300
"enablePullDownRefresh": true,
// #ifdef APP-PLUS
"enablePullDownRefresh": true,
// #endif
"app-plus": {
"scrollIndicator": false //
}
}
},
//#ifdef APP-PLUS
//
{
"path": "pages/guide/judge",
"style": {
"enablePullDownRefresh": false,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"app-plus": {
"contentAdjust": false,
"bounce": "none"
}
}
},
{
"path": "pages/guide/guide",
"style": {
"enablePullDownRefresh": false,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"app-plus": {
"contentAdjust": false,
"bounce": "none"
}
}
},
// #endif
{
"path": "pages/gather/gather",
"style": {
@ -145,8 +134,15 @@
"style": {
"navigationBarTitleText": "支付提示"
}
},
{
}, {
"path": "pages/supply_chains/supply_chains",
"style": {
"navigationBarTitleText": "供应",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
}, {
"path": "pages/moreProject/moreProject",
"style": {
"navigationBarTitleText": "商户平台",
@ -180,138 +176,6 @@
"enablePullDownRefresh": false
}
},
{
"path" : "pages/select_address/select_address",
"style" :
{
"navigationBarTitleText" : "选择位置",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/select_address/select_address_n",
"style" :
{
"navigationBarTitleText" : "选择位置",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/newActivity/activityDetail/activityDetail",
"style" :
{
"navigationBarTitleText": "活动",
"enablePullDownRefresh": true,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/subsidy/subsidy",
"style" :
{
"navigationBarTitleText": "补贴记录",
"enablePullDownRefresh": true,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/invitation/invitation",
"style" :
{
"navigationBarTitleText": "拉新活动",
"enablePullDownRefresh": true,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/redpacket/redpacket",
"style" :
{
"navigationBarTitleText" : "红包",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/redpacket/redpack_type",
"style" :
{
"navigationBarTitleText" : "红包余额",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/subsidy/subsidy2",
"style" :
{
"navigationBarTitleText" : "实物通用红包",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/subsidy/subsidy3",
"style" :
{
"navigationBarTitleText" : "现金抵扣红包",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/newActivity/towPrice/towPrice",
"style" :
{
"navigationBarTitleText" : "两元专区",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/order_addcart/order_addcart_t",
"style" :
{
"navigationBarTitleText" : "购物车",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/newActivity/giftBag/giftBag",
"style" :
{
"navigationBarTitleText" : "新人礼包",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/helpPeople/helpPeople",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path" : "pages/helpPeople/formTable",
"style" :
{
"navigationBarTitleText" : "信息收集",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
}
],
"subPackages": [{
@ -336,15 +200,6 @@
"navigationBarTextStyle": "#fff"
// #endif
}
},{
"path": "index_v",
"style": {
"navigationStyle": "custom"
// #ifdef MP || APP-PLUS
,
"navigationBarTextStyle": "#fff"
// #endif
}
}]
},
{
@ -438,17 +293,6 @@
}
},
{
"path": "supply_chain/supplierB",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#e93323",
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
},
{
"path": "supply_chain/suppliers",
"style": {
@ -503,22 +347,6 @@
"enablePullDownRefresh": true
}
}, {
"path": "cloud_entrepot/indexb",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "里海云仓",
"enablePullDownRefresh": true
}
},{
"path": "cloud_entrepot/indexh",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "里海云仓",
"enablePullDownRefresh": true
}
}, {
"path": "teach_video/teach_video",
"style": {
@ -535,14 +363,6 @@
"navigationStyle": "custom"
}
},{
"path": "specialty/short_index",
"style": {
"navigationBarTitleText": "集体店铺",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "specialty/indexa",
"style": {
@ -668,14 +488,6 @@
"navigationBarTitleText": "我的账户"
}
},
{
"path" : "user_money/money",
"style" :
{
"navigationBarTitleText" : "我的余额",
"enablePullDownRefresh" : false
}
},
{
"path": "user_bill/index",
"style": {
@ -1204,22 +1016,8 @@
"navigationBarTitleText": "商家入驻"
}
},
{
"path": "settled/unit",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "个人入驻"
}
},
{
"path": "applicationRecord/index",
"style": {
"navigationBarTitleText": "申请记录"
}
}, {
"path": "applicationRecord/unit",
"path": "applicationRecord/index",
"style": {
"navigationBarTitleText": "申请记录"
}
@ -1840,47 +1638,39 @@
"selectedColor": "#E93323",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"iconWidth": "36",
"list": [
// {
// "pagePath": "pages/supply_chains/supply_chains",
// "iconPath": "static/tabbar_icon/d.png",
// "selectedIconPath": "static/tabbar_icon/d-a.png",
// "text": "供销"
// },
{
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tabbar_icon/a.png",
"selectedIconPath": "static/tabbar_icon/a-a.png"
// "text": "泸州"
// "text": "供销"
"selectedIconPath": "static/tabbar_icon/a-a.png",
"text": "泸州"
},
{
"pagePath": "pages/gather/gather",
"iconPath": "static/tabbar_icon/b.png",
"selectedIconPath": "static/tabbar_icon/b-a.png"
// "text": "生产"
"selectedIconPath": "static/tabbar_icon/b-a.png",
"text": "生产"
},
// {
// "pagePath": "pages/plant_release/index",
// "iconPath": "static/tabbar_icon/c.png",
// "selectedIconPath": "static/tabbar_icon/c-a.png",
// "text": "发布"
{
"pagePath": "pages/plant_release/index",
"iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/c-a.png",
"text": "发布"
// },
{
"pagePath": "pages/order_addcart/order_addcart_t",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png"
// "text": "购物车"
},
},
{
"pagePath": "pages/supply_chains/supply_chains",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "供销"
},
{
"pagePath": "pages/user/index",
"iconPath": "static/tabbar_icon/e.png",
"selectedIconPath": "static/tabbar_icon/e-a.png"
// "text": "我的"
"selectedIconPath": "static/tabbar_icon/e-a.png",
"text": "我的"
}
]

View File

@ -107,8 +107,7 @@
} from "vuex";
import {
goShopDetail
} from '@/libs/order.js';
import { wgsToGcj } from "@/utils/wgs.js";
} from '@/libs/order.js'
const app = getApp();
export default {
data() {
@ -274,7 +273,6 @@
uni.getLocation({
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();

View File

@ -54,7 +54,6 @@
</template>
<script>
import home from '@/components/home/index.vue'
import { wgsToGcj } from "@/utils/wgs.js";
import {
getlevelInfo,
@ -136,7 +135,6 @@
uni.getLocation({
type: 'wgs84',
success: (res) => {
res = wgsToGcj(res);
try {
this.user_latitude = res.latitude;
this.user_longitude = res.longitude;

View File

@ -780,7 +780,6 @@
</div>
</div>
<div :style=" active === true ? 'height:' + footerConH + 'rem;' : 'height:' + footerH + 'rem;'"></div>
<div :style=" active === true ? 'height: 0;' : 'height: 2rem;'"></div>
</scroll-view>
</view>
<view style="height: 100rpx;"></view>
@ -794,9 +793,9 @@
{{ speak }}
</div>
<view class="input_count">
<input type="text" placeholder-class='placeholder' :disabled="active" placeholder="输入内容" class="input" ref="input"
<input type="text" placeholder-class='placeholder' placeholder="输入内容" class="input" ref="input"
v-show="!voice" @input="bindInput" @keyup="keyup" @focus="focus" cursor-spacing="20"
v-model="textCon" @click="handleClick">
v-model="textCon">
<div class="send iconfont icon-fasong" :style="'color:'+iconColor" @click="sendTest"></div>
</view>
</div>
@ -809,6 +808,7 @@
<i class="em" :class="emoji" :style="'background-image:url('+ httpUrl +')'"
v-for="emoji in emojiList" :key="emoji" @click="addEmoji(emoji)"></i>
</swiper-item>
</block>
</swiper>
@ -1402,14 +1402,9 @@
});
});
},
focus: async function() {
this.active = false;
focus: function() {
this.active = false;
},
handleClick(){
if(this.active){
this.active = false;
}
},
keyup: function() {
if (this.$refs.input.value.length > 0) {
this.sendColor = true;
@ -1565,7 +1560,7 @@
self.scrollTop = parseInt(scrollTop) + 100
}
}).exec()
}, 200)
}, 1000)
},
//
bindScroll() {
@ -1631,8 +1626,7 @@
margin-top: 20rpx;
width: 710rpx;
position: fixed;
bottom: 180rpx;
bottom: calc(160rpx + env(safe-area-inset-bottom)); /* 适应底部安全距离 */
bottom: 160rpx;
left: 20rpx;
.broadcast-details_box,
@ -1973,10 +1967,11 @@
transition: all 0.005s cubic-bezier(0.25, 0.5, 0.5, 0.9);
background-color: #fff;
position: fixed;
// bottom:var(--status-bar-height);
bottom: 20rpx;
bottom: calc(20rpx + env(safe-area-inset-bottom) );
bottom:var(--status-bar-height);
left: 0;
}
.broadcast-details .footerCon.on {

View File

@ -97,12 +97,10 @@
hotSearchBox: false,
isAuto: false, //
isShowAuth: false, //
back: false
};
},
onLoad(options) {
this.searchValue = options.searchVal || '';
if(options.back)this.back = true;
this.searchValue = options.searchVal || ''
},
onShow: function() {
try {
@ -169,7 +167,6 @@
this.$set(this, 'searchValue', event.detail.value);
},
searchBut: function() {
if(this.back) return this.navigatorBack();
if(/^(\/@[1-9]{1}).*\*\//.test(this.searchValue)){
uni.showLoading({
title: '加载中',
@ -212,6 +209,7 @@
this.searchValue = ""
});
}else{
let status = false
this.tempStorage.forEach((el, index) => {
if (el == this.searchValue) {
@ -228,17 +226,10 @@
uni.navigateTo({
url: '/pages/columnGoods/goods_search_con/index?searchValue=' + this.searchValue
})
}
},
navigatorBack(){
if(this.searchValue!==undefined&&this.searchValue!==null){
uni.navigateBack({
success:()=> {
uni.$emit('searchValue', this.searchValue);
}
});
}
}
}
}
}
</script>

View File

@ -98,7 +98,7 @@
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
<!-- <view class="ticket-big" v-if="!is_switch && item.issetCoupon">领券满{{item.issetCoupon.use_min_price}}{{item.issetCoupon.coupon_price}}</view> -->
</view>
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论 <text v-if="item.merchant">{{item.merchant.street_name}}</text></view>
<view class="score">{{item.rate}}评分 {{item.reply_count}}条评论</view>
<view class="company" v-if="item.merchant && hide_mer_status==0">
<text class='name line1'>{{item.merchant.mer_name}}</text>
@ -157,28 +157,24 @@
<view class="avater">
<image :src="item.mer_avatar" mode=""></image>
</view>
<view class="text">
<view class="text_one text_flex">
<view class="text_flex">
<view class=" text">
<view class="text_one">
<view class="">
<image src="@/static/images/phone.png" mode=""></image>
{{item.service_phone}}
</view>
<view class="text_one_r text_flex">
<view class="text_one_r">
<image src="@/static/images/clock.png" mode=""></image>
{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}
</view>
</view>
<view class="text_two text_flex">
<view class="text_two">
<image src="@/static/images/shangpu.png" mode=""></image>
<view class="text_tip">
{{item.mer_info}}
</view>
{{item.mer_info}}
</view>
<view class="text_three text_flex">
<view class="text_three">
<image src="@/static/images/dingwei.png" mode=""></image>
<view class="text_tip">
{{item.mer_address}}
</view>
{{item.mer_address}}
</view>
</view>
</view>
@ -239,7 +235,6 @@
storeMerchantList,
getGeocoder
} from '@/api/store.js';
import { wgsToGcj } from "@/utils/wgs.js";
import {
initiateAssistApi
} from '@/api/activity.js';
@ -477,9 +472,8 @@
let self = this
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'wgs84',
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
// console.log(res)
let latitude, longitude;
latitude = res.latitude.toString();
@ -1210,12 +1204,6 @@
}
}
.text_flex{
display: flex;
align-items: center;
}
.productList .list .item .text .money {
display: flex;
align-items: center;
@ -1533,12 +1521,11 @@
margin-left: 20px;
.avater {
width: 80px;
width: 60px;
height: 80px;
flex-shrink: 0;
image {
width: 80px;
width: 60px;
height: 80px;
}
}
@ -1554,13 +1541,10 @@
width: 20px;
height: 20px;
margin-right: 10px;
flex-shrink: 0;
}
.text_one_r {
flex: 1;
margin-left: 10px;
}
}
@ -1569,17 +1553,14 @@
height: 30px;
line-height: 30px;
padding-left: 10px;
.text_tip{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
image {
width: 20px;
height: 20px;
margin-right: 10px;
flex-shrink: 0;
}
}
@ -1588,11 +1569,9 @@
height: 30px;
line-height: 30px;
padding-left: 10px;
.text_tip{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
image {
width: 20px;

View File

@ -14,11 +14,9 @@
</view>
<view class="" v-if="!isFshow">
<view class="site-box1 flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="changeMap">
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street||'定位中' }}</view>
<!-- <view class="town_name rotate-box" @click.stop="getPositionFn()"><uni-icons type="loop"
color="#fff"></uni-icons></view> -->
<view class="town_name">{{ street }}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color: #fff"> </view>
@ -39,9 +37,9 @@
<block v-if="nowMenuList.length > 0">
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
<view class="examine" @click="
editFlag ? removeMenu(item) : clickMenu(item)
editFlag ? removeMenu(item) : clickMenu(item.type, item.data)
">
<image class="icon_img" :src="item.pic" mode="aspectFit">
<image class="icon_img" :src="item.icon" mode="aspectFit">
</image>
<u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
<text class="text">{{ item.name }}</text>
@ -60,18 +58,14 @@
<view class="content">
<u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
<view class="examine" @click="pushMenu(item)">
<image class="icon_img" :src="item.pic" mode="aspectFit"> </image>
<image class="icon_img" :src="item.icon" mode="aspectFit"> </image>
<u-icon class="icon" name="plus-circle-fill"></u-icon>
<text class="text">{{ item.name }}</text>
</view>
</u-transition>
</view>
</view>
<view class="location" v-if="isshow">
<view class="locationa"> 位置权限使用说明 </view>
<view class="locationb"> 用于向你推荐最近门店 </view>
<view class="locationx" @click.stop="isshow=false">x</view>
</view>
<u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<!-- <m-tabbar native>
@ -81,13 +75,11 @@
</view>
</template>
</m-tabbar> -->
<Loading></Loading>
</view>
</template>
<script>
import Cache from '@/utils/cache';
import { wgsToGcj } from "@/utils/wgs.js";
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper'
import {
@ -117,12 +109,6 @@
import {
getDiy
} from '@/api/api.js';
import {
applet
} from '@/api/public.js';
import {
ENV
} from "@/config/app.js"
// #ifdef APP-PLUS
import uniMP from '@/utils/uniMP.js';
// #endif
@ -135,7 +121,6 @@
data() {
return {
locationArr: ({}),
isshow: false,
emptyText: '暂无可用应用',
jurisdiction: false, //
mer_id: '',
@ -151,11 +136,108 @@
//
editFlag: false,
//
AllMenuList: [],
AllMenuList: [{
name: '商户平台',
icon: '/static/applet/shop_app.png',
data: "__UNI__1EE148C",
type: 2,
},
{
name: '供销平台',
icon: '/static/applet/gx_app.png',
data: '__UNI__B5B1EDD',
type: 1,
},
{
name: '农业咨询',
icon: '/static/applet/ny.png',
data: {
id: '__UNI__9620511',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=nongye',
},
type: 3,
},
{
name: '教育咨询',
icon: '/static/applet/jy.png',
data: {
id: '__UNI__7AA205C',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=jiaoyu',
},
type: 3,
},
{
name: '法律咨询',
icon: '/static/applet/fl.png',
data: {
id: '__UNI__358D505',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=falv',
},
type: 3,
},
{
name: '情感咨询',
icon: '/static/applet/qg.png',
data: {
id: '__UNI__8080F14',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=qinggan',
},
type: 3,
},
{
name: '种植分析',
icon: '/static/applet/zz.png',
data: {
id: '__UNI__9EDFE40',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=zhongzhi',
},
type: 3,
},
{
name: '养殖分析',
icon: '/static/applet/yz.png',
data: {
id: '__UNI__EEA7DC9',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=yangzhi',
},
type: 3,
},
{
name: '农业智能感知平台',
icon: '/static/applet/icons.png',
data: {
id: '__UNI__3A527D1',
url: 'https://ceshi-worker-task.lihaink.cn/uploads/files/20231019/20231019151519e8f484737.wgt',
},
type: 4,
},
{
name: '里海直播',
icon: '/static/applet/live.png',
data: {
id: "__UNI__0E46DAD",
url:'https://lihai001.oss-cn-chengdu.aliyuncs.com/app/__UNI__0E46DAD.wgt',
},
type: 4,
}
// {
// name: '',
// icon: '/static/applet/dp.png',
// data: {
// id: '__UNI__83ABA97',
// url: 'https://ceshi-worker-task.lihaink.cn/uploads/files/20231016/20231016112144fac6d9128.wgt',
// },
// type: 4,
// }
],
nowMenuList: [],
street: '',
showPicker: false,
columnData: [],
isFshow: false,
backColor: 'rgba(252, 252, 252, 0)'
};
@ -165,18 +247,20 @@
},
created() {},
onLoad() {
this.showControllerAllLet();
this.Area();
this.initMenu();
},
onShow() {
if (this.isLogin) {
this.emptyText = '暂无可用应用'
this.jurisdiction = false
this.initAllAppLet();
} else {
this.emptyText = '请登录'
this.jurisdiction = true
}
this.getUserInfo();
this.getUserInfo()
},
onPullDownRefresh() {
@ -189,7 +273,7 @@
},
mounted() {
if (this.street.length <= 0) {
this.selfLocation()
this.appLocation()
}
// #ifdef H5
//
@ -217,20 +301,8 @@
}
},
// #endif
onHide() {
uni.$emit('showLoading', false);
},
methods: {
getPositionFn() {
this.street = '定位中'
this.$store.commit('setLocation', {
lat: null,
long: null
})
uni.removeStorageSync('RejectTarget')
this.selfLocation()
},
methods: {
scrolling() {
//
let scrollTop =
@ -272,22 +344,13 @@
},
initAllAppLet(){
applet().then(res=>{
this.AllMenuList = res.data;
this.initMenu();
// this.showControllerAllLet();
}).catch(e=>{
console.log(e);
})
},
//
showControllerAllLet() {
let user;
if (typeof this.$store.state.app.userInfo == 'string') {
user = JSON.parse(this.$store.state.app.userInfo)
} else user = JSON.parse(JSON.stringify(this.$store.state.app.userInfo))
if (user?.show_controller_applet) {
if (user.show_controller_applet) {
this.AllMenuList.push({
name: '大屏控制',
icon: '/static/applet/dp.png',
@ -301,24 +364,18 @@
},
//
initMenu() {
let nowMenu = uni.getStorageSync('gatherMenuList');
let now = uni.getStorageSync('gatherNowMenuList');
try {
let list = JSON.parse(nowMenu||'[]');
let now = [];
let all = [];
this.AllMenuList.forEach((item) => {
if(list.find(t => t.name == item.name)?.name != item.name) all.push(item);
else now.push(item)
this.nowMenuList = JSON.parse(now);
this.AllMenuList = this.AllMenuList.filter((item) => {
return this.nowMenuList.find(t => t.name == item.name)?.name != item.name;
})
this.AllMenuList = all;
this.nowMenuList = now;
} catch (e) {
this.nowMenuList = [];
console.log(e);
}
},
clickMenu(data) {
this.getUniMp(data);
clickMenu(e, data) {
this.getUniMp(e, data);
},
//
pushMenu(data) {
@ -337,42 +394,40 @@
//
editComfirm() {
this.editFlag = false;
uni.setStorageSync('gatherMenuList', JSON.stringify(this.nowMenuList));
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
},
getUniMp(data) {
getUniMp(type, data) {
let that = this;
// #ifdef APP-PLUS
if(data.version) return uniMP.loadAppletMP(data);
else switch (data.type) {
switch (type) {
case 1:
uniMP.loadMP(data.data);
uniMP.loadMP(data);
break;
// case 2: uniMP.loadMPx(data); break;
case 2:
uniMP.loadMPx(data.data);
// this.navigator(data);
// uniMP.loadMPx(data);
that.navigator(`/pages/moreProject/moreProject`);
break;
case 3:
uniMP.loadMPurl(data.data);
uniMP.loadMPurl(data);
break;
case 4:
uniMP.loadMPdns(data.data);
uniMP.loadMPdns(data);
break;
}
return;
// #endif
// #ifdef H5
// if (type == 2) {
// this.navigator(`/pages/moreProject/moreProject`);
// } else {
// uni.showToast({
// icon: 'none',
// title: 'H5'
// })
// }
uni.showToast({
icon: 'none',
title: 'H5不支持打开小程序'
})
if (type == 2) {
this.navigator(`/pages/moreProject/moreProject`);
} else {
uni.showToast({
icon: 'none',
title: 'H5不支持打开小程序'
})
}
// #endif
},
@ -420,57 +475,23 @@
})
this.showPicker = false
},
selfLocation() {
if (uni.getStorageSync('RejectTarget')) return;
if (uni.getStorageSync('loction') == true) {
this.isshow = false
} else {
this.isshow = true
uni.setStorageSync('loction', true);
}
if (this.$store?.state?.storage?.location?.lat) {
this.isshow = false
getGeocoder({
lat: this.$store.state.storage.location.lat,
long: this.$store.state.storage.location.long
}).then(res => {
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_reference.town.title;
this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' +
street_id);
})
}).catch(err => {
this.isshow = false
uni.showToast({
title: err,
icon: 'none'
})
})
} else uni.getLocation({
appLocation() {
uni.getLocation({
type: 'wgs84',
timeout: '10',
success: (res) => {
res = wgsToGcj(res);
// console.log(res)
this.isshow = false
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
this.$store.commit('setLocation', {
lat: res.latitude.toFixed(6),
long: res.longitude.toFixed(6),
});
getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_reference.town.title;
this.street = res.data.address_component.street
this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' +
street_id);
@ -483,14 +504,11 @@
title: err,
icon: 'none'
})
this.street = '定位失败'
})
},
fail: (err) => {
this.isshow = false
uni.setStorageSync("RejectTarget", true)
Toast('定位失败,请检查定位权限是否开启')
this.street = '定位失败'
}
});
},
@ -521,28 +539,7 @@
}
// console.log(that.userInfoData);
});
},
//
changeMap(){
uni.navigateTo({
url: `/pages/select_address/select_address_n`,
success:()=> {
uni.$once('changeAddress', (e)=>{
// this.street_id = e.street.code;
// this.street = e.street.name;
if (e.longitude) {
this.longitude = e.longitude;
this.latitude = e.latitude;
this.$store.commit('setLocation', {
lat: e.latitude,
long: e.longitude,
});
}
this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code);
})
}
})
}
}
}
};
</script>
@ -756,47 +753,4 @@
background-color: #fff;
padding-top: 28rpx;
}
.rotate-box {
transform: rotate(0deg);
transition: transform .5s ease-out;
}
.rotate-box:active {
transform: rotate(360deg);
}
.location {
background-color: #f6f6f6;
width: 680rpx;
height: 150rpx;
position: absolute;
top: 0;
z-index: 9999;
border-radius: 20rpx;
left: 50%;
margin-left: -340rpx;
margin-top: 80rpx;
padding-left: 20rpx;
.locationa {
font-size: 28rpx;
color: #000;
font-weight: 500;
margin-top: 30rpx;
margin-bottom: 15rpx;
}
.locationb {
font-size: 20rpx;
color: #5a5a5a;
}
.locationx {
color: #000;
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
</style>

View File

@ -787,7 +787,6 @@
title: res.message
})
}).catch(err => {
console.log(err);
//
return that.$util.Tips({
title: err
@ -995,7 +994,6 @@
ChangeAttr: function(res) {
let productSelect = this.productValue[res];
if (productSelect) this.$set(this, "uniqueValue", productSelect.unique);
// console.log(productSelect, this.storeInfo);
if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
.storeInfo
@ -1061,14 +1059,14 @@
}
that.$set(that, 'storeInfo', storeInfo);
that.$set(that, 'description', storeInfo.content);
if(that.description?.content && typeof that.description.content == 'string'){
if(typeof that.description.content == 'string'){
try{
that.description.content = JSON.parse(that.description.content);
}catch(e){
console.log(e);
}
}
if (that.description?.content && that.description?.type == 0 && typeof that.description?.content == 'string') {
if (that.description.type == 0 && typeof that.description.content == 'string') {
that.description.content = that.description.content.replace(
/<img/gi,
'<img style="max-width:100%;height:auto;float:left;display:block" '
@ -1123,7 +1121,6 @@
that.getCouponList();
})
}).catch(err => {
console.log(err);
//
return that.$util.Tips({
title: err

File diff suppressed because it is too large Load Diff

View File

@ -35,8 +35,8 @@
data() {
return {
//,
imageList: [
{
imageList: [{
src: '/static/images/guide.png'
}

View File

@ -15,6 +15,7 @@
var launchFlag = uni.getStorageSync('launchFlag');
// console.log("launchFlag:" + launchFlag);
if (launchFlag) { //
uni.switchTab({
url:'/pages/index/index'
})

File diff suppressed because it is too large Load Diff

View File

@ -1,84 +0,0 @@
<template>
<view class="box" style="position: relative;">
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="li" @click="navSw('/pages/index/index')">
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/edf53202401271436507555.png" width="690rpx"
height="200rpx" style="position: absolute;" />
<view class="btn">
我是居民用户
</view>
</view>
<view class="li" style="margin-top: 50rpx;" @click="navgo('/pages/helpPeople/formTable')">
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/8489c202401271437055619.png" width="690rpx"
height="200rpx" style="position: absolute;" />
<view class="btn">
我是农民用户
</view>
</view>
</view>
</template>
<script>
export default {
methods: {
back(){
uni.navigateBack();
},
navgo(url) {
uni.navigateTo({
url
})
},
navSw(url){
uni.switchTab({
url:url
})
}
}
}
</script>
<style lang='scss' scoped>
.box {
width: 750rpx;
height: 1624rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9c4b4202401271437449183.png');
background-size: 100% 100%;
padding-top: 500rpx;
}
.li {
margin: 0rpx auto;
width: 690rpx;
height: 200rpx;
background-size: 100% 100%;
position: relative;
.btn {
z-index: 999;
position: absolute;
width: 287rpx;
height: 76rpx;
border-radius: 40rpx 40rpx 40rpx 40rpx;
opacity: 1;
border: 2rpx solid #FF5E0C;
text-align: center;
line-height: 76rpx;
color: #FF5E0C;
font-size: 34rpx;
right: 50rpx;
bottom: 50rpx;
}
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
</style>

View File

@ -52,7 +52,6 @@
<script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import { wgsToGcj } from "@/utils/wgs.js";
import zbpSwiper from '@/components/zbpSwiper'
import {
getSlideAPI
@ -225,9 +224,8 @@
},
selfLocation() {
uni.getLocation({
type: 'wgs84',
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,195 +0,0 @@
<template>
<view>
<view class="bg">
<image class="bg_img" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail.webp"></image>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="b_body">
<view class="b_content">
<view v-if="info.content" v-html="info.content.content"></view>
</view>
</view>
</view>
<view class="btn_box">
<image v-if="show_a1" @click="changeA(show_a1)" class="btn_image" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail_btn1.webp"></image>
<image v-if="show_a2" @click="changeA(show_a2)" class="btn_image" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/detail_btn2.webp"></image>
</view>
<u-modal :show="show" :closeOnClickOverlay="true" :title="`[${activity.title}]`"
content="选择活动后只有完成活动任务后才可参加另一个活动, 确定要参与这个活动吗" cancelText="我再想想" confirmText="参加活动" confirmColor="#e54841"
@cancel="show = false" @confirm="joinA()" showCancelButton></u-modal>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
:isGoIndex="false"></authorize>
</view>
</template>
<script>
import { consumption, chooseConsumption } from "@/api/activity.js"
import { getArticleList } from "@/api/api.js"
import { Toast } from "../../../libs/uniApi";
import authorize from "@/components/Authorize.vue";
import { getUserInfo } from '@/api/user.js';
export default {
components: {
authorize
},
data() {
return {
info: {},
userInfo: {},
Alist: [],
activity: {
title: ''
},
show: false,
isAuto: false, //
isShowAuth: false, //
is_join_activity: 0, //
}
},
onLoad() {
this.getArticleList();
this.is_join_activity = uni.getStorageSync('is_join_activity');
},
onShow() {
this.getUserInfo();
this.consumption();
},
computed: {
show_a1() { //
return this.Alist.find(item => item.title == '用户消费补贴活动')
},
show_a2() { //
return this.Alist.find(item => item.title == '用户推荐拉新活动')
}
},
methods: {
consumption() {
consumption().then(res => {
this.Alist = res.data;
})
},
back() {
uni.navigateBack()
},
changeA(item) {
if (!this.userInfo.account) return this.openAuto();
this.activity = item;
if (this.is_join_activity) return this.joinA();
this.show = true;
},
getArticleList() {
getArticleList(25).then(res => {
this.info = res.data.list[0]
})
},
//
joinA() {
chooseConsumption({
coupon_id: this.activity.coupon_id,
activity_id: 1, //1
}).then(res => {
this.show = false;
let url = '';
if (this.activity.title == '用户消费补贴活动') url = "/pages/redpacket/redpack_type?type=1";
if (this.activity.title == '用户推荐拉新活动') url = "/pages/newActivity/invitation/invitation";
if (url) uni.navigateTo({
url: url
})
}).catch(err => {
this.show = false;
this.$nextTick(() => {
Toast('您正在参与活动,暂时不支持切换');
})
})
uni.setStorageSync('is_join_activity', 1);
this.is_join_activity = 1;
},
getUserInfo() {
getUserInfo().then(res => {
this.userInfo = res.data;
}).catch(err => {
console.log(err);
})
},
//
onLoadFun(data) {
this.getUserInfo();
this.isShowAuth = false;
},
//
openAuto() {
// console.log('hajhcdsohjcosvjco')
this.isAuto = true;
this.isShowAuth = true
},
//
authColse: function(e) {
this.isShowAuth = e
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page {
background-color: #fff5dd;
}
.bg {
position: relative;
padding-bottom: 300rpx;
.bg_img {
width: 750rpx;
height: 652rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.b_body {
width: 710rpx;
margin-left: 21rpx;
margin-right: 19rpx;
height: auto;
background-color: #fff;
border-radius: 0 0 60rpx 60rpx;
padding: 28rpx;
padding-top: 680rpx;
margin-bottom: 30rpx;
.b_content {
width: 100%;
// height: 800rpx;
// background-color: #eee;
}
}
}
.btn_box {
position: fixed;
bottom: 30rpx;
left: 50%;
transform: translate(-50%);
width: 710rpx;
.btn_image {
width: 100%;
}
}
</style>

View File

@ -1,909 +0,0 @@
<template>
<view class="m_body">
<view class="bg">
<view class="bg_box">
<image class="bg_img" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/recharge.webp"></image>
<view class="bg_border"></view>
</view>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="body_card">
<view class="card1">
<view class="change_list">
<view class="change_item" @click="changeItem(item, index)"
v-for="(item, index) in changeList" :key="index">
<image class="item_pic" :src="item.pic"></image>
<view class="item_content">
<view class="top">
<view class="top_left"><text class="c_icon">¥</text> <text class="c_content">{{item.count}}</text> <text class="tips">现在购买礼包即送</text></view>
<view class="top_right">
<text>数量: </text>
<view @click="reduce(item)">- </view>
<view>{{item.num}} </view>
<view @click="append(item)">+ </view>
</view>
</view>
<view class="bottom">
<view class="bottom_item">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
<view class="text">{{tipType[red_type].red1}}</view>
</view>
<view class="bottom_item">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
<view class="text">{{tipType[red_type].red2}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="footer">
<view class="f_tip">
总计购买礼包金额:
<view class="price">
<text>{{total}}</text>
</view>
</view>
<view class="primary_btn" @click="$u.throttle(submitSub, 1500)">立即购买</view>
</view>
<uni-popup ref="redTipsRef">
<view class="ref_ref">
<view class="ref_top">
购买礼包金额达到
<text v-if="red_type==0">100-2000</text>
<text v-if="red_type==1">2001-4000</text>
<text v-if="red_type==2">4001-20000</text>
!
</view>
<view class="ref_center">
赠送红包变为
</view>
<view class="ref_bottom">
<view class="bottom_item">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
<view class="text">{{tipType[red_type].red1}}</view>
</view>
<view class="bottom_item">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/re_redpacket.webp"></image>
<view class="text">{{tipType[red_type].red2}}</view>
</view>
</view>
</view>
</uni-popup>
<payment :payMode="payMode" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
:totalPrice="totalPrice"></payment>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
<script>
import { getCommissionInfo } from "@/api/user.js"
import { Toast } from "../../../libs/uniApi";
import {
mapGetters
} from "vuex";
import {
getUserInfo,
spreadInfo,
rechargeWechat
} from '@/api/user.js';
import authorize from '@/components/Authorize';
import payment from '@/components/payment';
export default {
components: {
authorize,
payment
},
data() {
return {
userInfo: {},
curNow: 0,
list1: [{
name: '余额购买'
}, {
name: '购买记录'
}],
changeList: [
{
count: 100, //
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item1.webp',
num: 0, //
},
{
count: 200,
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item2.webp',
num: 0, //
},
{
count: 500,
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item3.webp',
num: 0, //
},
{
count: 1000,
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/a_re_item4.webp',
num: 0, //
}
],
nowChange: 0,
nowPrice: 0,
priceCount: 1,
isAuto: false, //
isShowAuth: false, //
recordList: [],
tipType: [
{
red1: '8%无门槛红包',
red2: '42%现金抵扣红包'
},
{
red1: '12%无门槛红包',
red2: '68%现金抵扣红包'
},
{
red1: '15%无门槛红包',
red2: '85%现金抵扣红包'
},
],
red_type: 0,
where: {
page: 1,
limit: 15,
type: 2
},
otherValue: '其他',
now_money: 0,
navRecharge: ['账户购买', '佣金转入'],
active: 0,
number: '',
from: '',
placeholder: "0.00",
picList: [],
activePic: 0,
money: "",
numberPic: '',
rechar_id: '0',
rechargeAttention: [],
pay_close: false,
totalPrice: '0',
payMode: [{
name: '微信支付',
icon: 'icon-weixinzhifu',
// #ifdef H5
value: 'h5',
// #endif
// #ifdef MP
value: 'routine',
// #endif
// #ifdef APP-PLUS
value: 'weixin',
// #endif
title: '微信快捷支付',
payStatus: true
}],
}
},
onLoad() {
if (this.isLogin) {
this.getUserInfo()
} else {
this.isAuto = true;
this.isShowAuth = true
}
},
onShow() {
},
computed: {
...mapGetters(['isLogin', 'viewColor', 'keyColor']),
total() {
return this.changeList.reduce((t, obj)=>{
return t + (obj.count * obj.num);
}, 0);
}
},
onReachBottom() {
this.getCommissionInfo();
},
methods: {
back(){
uni.navigateBack();
},
clickTab1(e) {
this.curNow = e.index;
if (e.index == 1) {
this.recordList = [];
this.where.page = 1;
this.getCommissionInfo();
}
},
changeItem(e, index) {
this.nowPrice = e;
this.nowChange = index;
if (this.priceCount * this.nowPrice > 20000) {
this.priceCount = Math.floor(20000 / this.nowPrice);
return Toast('不可超过2万元');
}
},
append(item) {
if(this.total + item.count >=2001 && this.total + item.count <=4000 && this.red_type != 1){
this.red_type = 1;
this.$refs.redTipsRef.open();
}else if(this.total + item.count >=4001 && this.total + item.count <=20000 && this.red_type != 2){
this.red_type = 2;
this.$refs.redTipsRef.open();
}
if (this.total + item.count > 20000 || this.total>=20000) {
return Toast('不可超过2万元');
} else item.num++;
},
reduce(item) {
if(this.total - item.count >=100 && this.total - item.count <=2000 && this.red_type != 0){
this.red_type = 0;
this.$refs.redTipsRef.open();
}else if(this.total - item.count >=2001 && this.total - item.count <=4000 && this.red_type != 1){
this.red_type = 1;
this.$refs.redTipsRef.open();
}
if (this.total==0||item.num==0) return Toast('不能再少啦');
else item.num--;
},
getCommissionInfo() {
getCommissionInfo(this.where).then((res) => {
if (res.data.list.length > 0) {
this.recordList = [...this.recordList, ...res.data.list];
if (res.data.list.length >= 15) this.where.page++;
}
})
},
/**
* 选择金额
*/
picCharge(idx, item) {
this.activePic = idx;
if (item === undefined) {
this.rechar_id = '0';
this.numberPic = "";
this.otherValue = ''
} else {
this.otherValue = '其他'
this.total = "";
this.rechar_id = item.id.toString();
this.numberPic = item.data.price;
}
},
/**
* 购买额度选择
*/
getRecharge() {
getRechargeApi()
.then(res => {
this.picList = res.data.recharge_quota;
if (this.picList[0]) {
this.rechar_id = this.picList[0].id.toString();
this.numberPic = this.picList[0].data.price;
}
this.rechargeAttention = res.data.recharge_attention || [];
})
.catch(res => {
this.$dialog.toast({
mes: res
});
});
},
onLoadFun: function() {
this.isShowAuth = false;
this.getUserInfo();
this.getRecharge();
},
//
authColse: function(e) {
this.isShowAuth = e
},
navRecharges: function(index) {
this.active = index;
},
/**
* 获取用户信息
*/
getUserInfo: function() {
let that = this;
spreadInfo().then(res => {
that.$set(that, 'userInfo', res.data);
})
},
payClose: function() {
this.pay_close = false;
},
payCheck: function(type) {
this.createOrder(type);
},
/*
* 用户购买
*/
submitSub: function(e) {
let that = this
let value = this.total;
//
if (that.active) {
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
return that.$util.Tips({
title: '请输入金额'
});
}
uni.showModal({
title: '转入余额',
content: '转入余额后无法再次转出,确认是否转入余额',
success(res) {
if (res.confirm) {
rechargeBrokerage({
brokerage: parseFloat(value),
}).then(res => {
// that.$set(that, 'userInfo.now_money', that.$util.$h.Add(value, that.userInfo.now_money))
uni.showToast({
icon: 'success',
title: '转入成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: '/pages/users/user_money/index'
// });
}).catch(err => {
return that.$util.Tips({
title: err
})
});
} else if (res.cancel) {
return that.$util.Tips({
title: '已取消'
});
}
},
})
} else {
if (this.rechar_id == 0) {
if (parseFloat(that.total) === 0) {
return that.$util.Tips({
title: '购买金额金额不能为0'
});
}
if (!that.total) {
return that.$util.Tips({
title: '请填写购买金额!'
});
}
if (!Number(that.total)) {
return that.$util.Tips({
title: '请填写正确的金额!'
});
}
}
this.pay_close = true
}
},
createOrder(type) {
let that = this;
let query = {
price: that.rechar_id == 0 ? that.total : that.numberPic,
recharge_id: that.rechar_id,
type: type,
// #ifdef H5
return_url: location.port ? location.protocol + '//' + location.hostname + ':' + location.port +
'/pages/users/user_money/money' : location.protocol + '//' + location.hostname +
'/pages/users/user_money/money'
// #endif
};
// #ifdef MP
// openPaySubscribe().then(() => {
rechargeWechat(query).then(res => {
that.callPay(res);
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
});
});
// });
// #endif
// #ifndef MP
rechargeWechat(query).then(res => {
console.log('res', res);
that.callPay(res);
}).catch(err => {
console.log('err', err);
uni.showToast({
title: err,
icon: 'none'
});
});
// #endif
},
//
callPay(res) {
let that = this,
status = res.data.type,
orderId = res.data.recharge_id,
callback_key = res.data.pay_key,
jsConfig = res.data.config,
goPages = '/pages/users/user_money/money';
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
case 'PAY_ERROR':
case 'error':
uni.hideLoading();
Toast(res.message)
// return that.$util.Tips({
// title: res.message
// }, {
// tab: 5,
// url: goPages
// });
break;
case 'success':
uni.hideLoading();
uni.showToast({
icon: 'success',
title: res.message
})
// if (that.seckillId)
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 4,
// url: goPages
// });
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
break;
case 'alipay':
case "alipayQr":
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' + jsConfig + '&type=10'
})
return;
break;
// #ifndef MP
case "wechat":
case "weixin":
case "weixinApp":
jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => {
uni.showToast({
icon: 'success',
title: res.message
})
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 4,
// url: goPages
// });
}).catch(res => {
uni.showToast({
icon: 'success',
title: '取消支付'
})
// if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: goPages
// });
})
// #endif
// #ifdef APP-PLUS
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
}
uni[mp_pay_name]({
provider: 'wxpay',
orderInfo: jsConfig,
success: (e) => {
this.getUserInfo()
uni.showToast({
icon: 'success',
title: '支付成功'
})
// let url = '/pages/users/user_money/money';
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 4,
// url: url
// });
},
fail: (e) => {
console.log(e);
uni.showModal({
content: "支付失败",
showCancel: false,
success: function(res) {
}
})
},
complete: () => {
uni.hideLoading();
},
});
// #endif
break;
// #endif
// #ifdef MP
case "routine":
jsConfig.timeStamp = jsConfig.timestamp;
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
}
uni[mp_pay_name]({
...jsConfig,
success: function(res) {
uni.hideLoading();
that.getUserInfo();
that.getRecharge();
// console.log('12323424')
uni.showToast({
icon: 'success',
title: '支付成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
},
fail: function(e) {
uni.hideLoading();
Toast('取消支付')
// return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: goPages
// });
},
})
break;
// #endif
case "balance":
uni.hideLoading();
//
Toast(res.msg)
// return that.$util.Tips({
// title: res.msg
// }, {
// tab: 5,
// url: goPages
// });
break;
// #ifdef H5
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let url = `${host}/pages/users/user_money/money`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}`
setTimeout(() => {
location.href = locations;
}, 100);
break;
// #endif
// #ifdef APP-PLUS
case 'alipayApp':
uni.requestPayment({
provider: 'alipay',
orderInfo: jsConfig,
success: (e) => {
this.getUserInfo()
uni.showToast({
icon: 'success',
title: '支付成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
},
fail: (e) => {
uni.showModal({
content: "支付失败",
showCancel: false,
success: function(res) {
uni.redirectTo({
url: goPages
})
}
})
},
complete: () => {
uni.hideLoading();
},
});
break;
// #endif
}
},
onChangeFun: function(e) {
let opt = e;
let action = opt.action || null;
let value = opt.value != undefined ? opt.value : null;
action && this[action] && this[action](value);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.bg {
position: relative;
padding-bottom: 300rpx;
.bg_box{
height: 486rpx;
position: relative;
overflow: hidden;
.bg_img {
width: 750rpx;
height: 652rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_border{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 30rpx;
border-radius: 60rpx 60rpx 0 0;
background-color: #fff;
}
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.body_card {
color: #333;
.card1 {
background-color: #fff;
.change_list {
width: 700rpx;
margin: 0 auto;
display: flex;
flex-direction: column;
.change_item {
width: 700rpx;
height: 172rpx;
text-align: center;
background-color: #f7f7f7;
border-radius: 20rpx 20rpx 20rpx 20rpx;
font-size: 40rpx;
position: relative;
margin-bottom: 30rpx;
.item_pic{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.item_content{
padding: 26rpx;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.top{
display: flex;
justify-content: space-between;
align-items: center;
height: 70rpx;
.top_left{
font-size: 58rpx;
color: #ffc53d;
display: flex;
align-content: center;
.tips{
font-size: 24rpx;
border: 5rpx solid #ffc53d;
margin-left: 20rpx;
padding: 5rpx 15rpx;
border-radius: 60rpx;
color: #7C5906;
}
.c_content{
padding-top: 10rpx;
}
.c_icon {
padding-top: 15rpx;
font-size: 36rpx;
}
}
.top_right{
display: flex;
align-items: center;
color: #FF3A32;
text{
font-size: 28rpx;
}
view{
height: 60rpx;
width: 40rpx;
text-align: center;
line-height: 60rpx;
}
}
}
.bottom{
font-size: 28rpx;
display: flex;
align-items: center;
color: #FF3A32;
.bottom_item{
flex: 1;
display: flex;
align-items: center;
image{
width: 32rpx;
height: 40rpx;
}
.text{
padding-left: 15rpx;
}
}
}
}
}
.change_item_active {
background: rgba(#FF8056, 0.2);
border: 5rpx solid #FF8056;
color: #FF8056;
}
}
}
}
}
.m_body {
.footer {
position: fixed;
left: 0;
bottom: 0;
height: 120rpx;
width: 100vw;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20rpx;
.f_tip {
display: flex;
align-items: flex-end;
font-style: 26rpx;
.price {
color: #FF8056;
text {
font-size: 44rpx;
margin-left: 20rpx;
margin-right: 5rpx;
}
}
}
.primary_btn {
background-color: #fa8147;
height: 80rpx;
border-radius: 80rpx;
width: 180rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
}
}
.ref_ref{
width: 630rpx;
height: 200rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 20rpx 10rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.ref_top{
color: #ffc53d;
}
.ref_center{
font-size: 24rpx;
border: 5rpx solid #ffc53d;
margin-left: 20rpx;
padding: 5rpx 15rpx;
border-radius: 60rpx;
color: #7C5906;
}
.ref_bottom{
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
color: #FF3A32;
.bottom_item{
width: 280rpx;
display: flex;
align-items: center;
image{
width: 32rpx;
height: 40rpx;
}
.text{
padding-left: 15rpx;
}
}
}
}
</style>

View File

@ -1,384 +0,0 @@
<template>
<view>
<view class="bg">
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/invitation.webp"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_body">
<view class="b_qr">
<view class="qr_body">
<view class="qr_code">
<image :src="qr_img"></image>
</view>
<view class="qr_text">扫一扫红包正在路上</view>
<view class="qr_tips">温馨提示邀请新用户才有机会获得红包哦</view>
</view>
</view>
<view class="b_user">
<view class="users">
<image v-for="(item, index) in info.user_info" :key="item.uid" class="avatar" :src="item.avatar||'/static/images/f.png'"></image>
<block v-if="info.user_info.length<4">
<view v-for="item in 4-info.user_info.length" :key="item+'n'" class="avatar_no">
<u-icon name="plus" color="#fff" size="40rpx"></u-icon>
</view>
</block>
</view>
<view class="u_tips">邀请新用户消费达目标金额有机会领取红包哦~</view>
<view class="u_btn">
<image v-if="status==0" class="btn_image" @click="open" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/ibtn1.webp"></image>
<image v-if="status==1" class="btn_image" @click="open" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/ibtn2.webp"></image>
<image v-if="status==2" class="btn_image" @click="opened" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/ibtn3.webp"></image>
</view>
<uni-popup ref="redPacket">
<view class="red_packet">
<block v-if="status==0">
<view class="packet_img">
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/red_packet1.webp"></image>
<view class="p_text">
<view class="big">抱歉</view>
<view class="smoll">有好友消费未达目标金额</view>
<view class="smoll">无法领红包哦~</view>
</view>
</view>
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png"></image>
</block>
<block v-if="status==1">
<view class="packet_img" @click="openRedPacket()">
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/red_packet2.webp"></image>
<view class="p_text">
<view class="big">恭喜</view>
<view class="smoll">成功获得实物通用红包</view>
<view class="smoll">赶快打开吧~</view>
</view>
</view>
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png"></image>
</block>
<block v-if="status==2">
<view class="packet_img">
<image class="img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/red_packet3.webp"></image>
<view class="p_text" style="bottom: 60rpx;">
<view class="smoll">恭喜你成功获得</view>
<view class="smoll red_count"><text class="count">{{red_packet.amount}}</text></view>
<view class="big2">购买指定商品可直接抵扣使用</view>
<view class="smoll">{{red_packet.end_time}}过期</view>
<image @click="close()" class="btn_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/put.webp"></image>
</view>
</view>
<image @click="close()" class="close_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/close.png"></image>
</block>
</view>
</uni-popup>
</view>
<view class="b_in_list">
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/irecoed.webp"></image>
<view class="b_head">
<view style="width: 120rpx;"></view>
<view class="head_title" style="width: 200rpx;">名称</view>
<view class="head_title" style="width: 130rpx;">ID</view>
<view class="head_title" style="width: 120rpx;">目标金额</view>
<view class="head_title" style="width: 120rpx;">状态</view>
</view>
<view class="b_content">
<view class="content_list" v-for="(item, index) in info.user_info" :key="item.uid">
<image class="avatar" :src="item.avatar||'/static/images/f.png'"></image>
<view class="content_item" style="width: 180rpx;margin: 0 10rpx;">{{item.nickname}}</view>
<view class="content_item" style="width: 130rpx;">{{item.uid}}</view>
<view class="content_item" style="width: 120rpx;">{{item.target_amount}}<text class="mall"></text></view>
<view class="content_item" style="width: 120rpx;">
<text v-if="item.is_finish" style="color: #18CE61;">已完成</text>
<text v-else style="color: #FA5A29;">未完成</text>
</view>
</view>
<!-- <view class="mall none">暂无记录</view> -->
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { storeActivityStatus, storeActivityReceive, storeActivityQrcode } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
data() {
return {
info: {
user_info: []
},
red_packet: {
amount: '0.00',
end_time: ''
},
status: 0, //0 1 2
qr_img: ''
}
},
onLoad() {},
onShow() {
this.storeActivityQrcode();
this.loadInfo();
},
methods: {
back(){
uni.navigateBack()
},
loadInfo(){
storeActivityStatus().then(res=>{
this.info = res.data;
if(res.data.allow_receive) this.status = 1;
})
},
opened(){
Toast('已经领取过啦!');
},
open(){
this.$refs.redPacket.open();
},
close(){
this.$refs.redPacket.close();
},
storeActivityQrcode(){
storeActivityQrcode().then(res=>{
this.qr_img = res.data.url;
})
},
//
async openRedPacket(){
this.$refs.redPacket.close();
try{
let {data} = await storeActivityReceive();
this.$nextTick(()=>{
this.red_packet = data;
this.$u.sleep(800).then(()=>{
this.status = 2;
this.$u.sleep(100).then(()=>{
this.open();
})
})
})
}catch(e){
Toast(e)
}
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page{
background-color: #ff864d;
}
.bg{
position: relative;
height: auto;
.bg_img{
width: 750rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_back{
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg_body{
position: absolute;
top: 414rpx;
left: 0;
.b_qr{
width: 710rpx;
height: 750rpx;
margin: 0 20rpx;
// background: linear-gradient(to top, #FFE3AE 0%, #FFF6EB 100%);
background: #FFF6EB;
border-radius: 50rpx;
padding: 20rpx;
.qr_body{
width: 100%;
height: 100%;
border: 5rpx solid #ffd588;
border-radius: 50rpx;
text-align: center;
display: flex;
justify-content: space-evenly;
flex-direction: column;
.qr_code{
width: 510rpx;
height: 510rpx;
// background-color: #f8962e;
margin: 0 auto;
image{
width: 100%;
height: 100%;
}
}
.qr_text{
font-size: 36rpx;
color: #C44100;
font-weight: 500;
}
.qr_tips{
font-size: 26rpx;
color: #C44100;
}
}
}
.b_user{
margin-top: 30rpx;
.users{
display: flex;
justify-content: center;
.avatar{
height: 100rpx;
width: 100rpx;
border-radius: 50%;
margin: 15rpx;
}
.avatar_no{
height: 100rpx;
width: 100rpx;
font-weight: 200;
border-radius: 50%;
border: 2rpx dashed #fff;
margin: 15rpx;
background-color: rgba(#fff, 0.3);
display: flex;
justify-content: center;
align-items: center;
}
}
.u_tips{
color: #FFE5B3;
font-size: 26rpx;
text-align: center;
}
.u_btn{
margin-top: 30rpx;
margin-bottom: 20rpx;
display: flex;
justify-content: center;
.btn_image{
width: 403rpx;
height: 113rpx;
}
}
.red_packet{
display: flex;
flex-direction: column;
align-items: center;
.packet_img{
width: 750rpx;
position: relative;
.img{
width: 100%;
}
.p_text{
position: absolute;
bottom: 120rpx;
width: 100%;
text-align: center;
color: #fff;
.big{
font-size: 38rpx;
font-weight: 500;
margin-bottom: 30rpx;
}
.smoll{
font-size: 28rpx;
margin-bottom: 20rpx;
}
.big2{
font-size: 32rpx;
font-weight: 500;
margin-bottom: 30rpx;
}
.btn_img{
width: 310rpx;
}
.red_count{
margin-top: 80rpx;
margin-bottom: 40rpx;
.count{
font-size: 80rpx;
}
}
}
}
.close_img{
width: 60rpx;
height: 60rpx;
}
}
}
.b_in_list{
width: 710rpx;
margin: 0 20rpx;
height: auto;
background-color: #fff;
border-radius: 50rpx;
padding: 20rpx;
margin-bottom: 30rpx;
display: flex;
flex-direction: column;
align-content: center;
.body_head_img{
width: 253rpx;
margin: 0 auto;
}
.b_head{
background-color: #fff2ed;
border-radius: 20rpx;
color: #854116;
display: flex;
margin-top: 28rpx;
text-align: center;
.head_title{
width: 150rpx;
padding: 20rpx 0;
font-size: 28rpx;
}
}
.b_content{
.mall{
font-size: 26rpx;
}
.content_list{
background-color: #FFF6E9;
border-radius: 20rpx;
color: #C44100;
padding-top: 20rpx;
margin-top: 20rpx;
font-size: 28rpx;
display: flex;
align-items: center;
padding-bottom: 20rpx;
text-align: center;
.content_item{
overflow: hidden;
}
.avatar{
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-left: 16rpx;
}
}
.none{
text-align: center;
padding: 20rpx;
}
}
}
}
}
</style>

View File

@ -1,182 +0,0 @@
<template>
<view>
<view style="height: var(--status-bar-height);background-color: #e54841;"></view>
<view class="bg">
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/subsidy.webp"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">补贴记录</view>
<view class="b_title">
<view>总计获得</view> <view class="count">{{total_amount}}</view> <view>元补贴红包</view>
</view>
<view class="b_body">
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/srecord.webp"></image>
<view class="b_head">
<view class="head_title">消费金额</view>
<view class="head_title">补贴金额</view>
<view class="head_title2">红包获得时间</view>
</view>
<view class="b_content">
<view class="content_list" v-for="(item, index) in list" :key="index">
<view class="content_item">{{item.order_amount}}<text class="mall"></text></view>
<view class="content_item">{{item.coupon_price}}<text class="mall"></text></view>
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
</view>
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { storeActivityRecord } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
data() {
return {
total_amount: '0.00',
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityRecord();
},
methods: {
back(){
uni.navigateBack()
},
storeActivityRecord(){
storeActivityRecord().then(res=>{
this.list = res.data.record;
this.total_amount = res.data.total_amount || "0.00"
})
},
navTo(){
uni.switchTab({
url:'/pages/index/index'
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page{
background-color: #ffe3bd;
}
.bg{
position: relative;
height: auto;
.bg_img{
width: 750rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_back{
height: 34rpx;
width: 20rpx;
position: absolute;
top: 30rpx;
left: 30rpx;
}
.bg_title{
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: 30rpx;
left: 50%;
transform: translate(-50%);
}
.b_title{
position: absolute;
width: 100%;
height: 70rpx;
top: 225rpx;
left: 0;
text-align: center;
font-size: 36rpx;
color: #F1503F;
display: flex;
justify-content: center;
align-items: flex-end;
.count{
// height: 100%;
font-size: 66rpx;
font-weight: bold;
margin: 10rpx 20rpx;
}
}
.b_body{
position: absolute;
width: 710rpx;
margin-left: 21rpx;
margin-right: 19rpx;
height: auto;
background-color: #fff;
top: 534rpx;
left: 0;
border-radius: 50rpx;
padding: 28rpx;
margin-bottom: 30rpx;
display: flex;
flex-direction: column;
align-content: center;
.body_head_img{
width: 253rpx;
margin: 0 auto;
}
.b_head{
background-color: #FFF2E0;
border-radius: 20rpx;
color: #C44100;
display: flex;
margin-top: 28rpx;
font-size: 28rpx;
padding: 20rpx 0;
.head_title{
padding-left: 20rpx;
width: 190rpx;
}
.head_title2{
padding-left: 20rpx;
width: 280rpx;
}
}
.b_content{
background-color: #fff2ed;
border-radius: 20rpx;
color: #FF5A3A;
padding-top: 20rpx;
margin-top: 28rpx;
font-size: 32rpx;
.mall{
font-size: 26rpx;
}
.content_list{
display: flex;
padding-bottom: 20rpx;
.content_item{
padding-left: 20rpx;
width: 190rpx;
}
.content_item2{
padding-left: 20rpx;
width: 280rpx;
}
}
.none{
text-align: center;
padding: 20rpx;
}
}
}
}
</style>

View File

@ -1,183 +0,0 @@
<template>
<view>
<view class="bg">
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/subsidy.webp"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">无门槛实物通用红包</view>
<view class="b_title">
<view>总计剩余</view> <view class="count">{{total_amount}}</view> <view>元通用红包</view>
</view>
<view class="b_body">
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/srecord.webp"></image>
<view class="b_head">
<view class="head_title">消费金额</view>
<view class="head_title">补贴金额</view>
<view class="head_title2">红包获得时间</view>
</view>
<view class="b_content">
<view class="content_list" v-for="(item, index) in list" :key="index">
<view class="content_item">{{item.order_amount}}<text class="mall"></text></view>
<view class="content_item">{{item.coupon_price}}<text class="mall"></text></view>
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
</view>
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { storeActivityRecord } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
data() {
return {
total_amount: '0.00',
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityRecord();
},
methods: {
back(){
uni.navigateBack()
},
storeActivityRecord(){
storeActivityRecord({
type: 1
}).then(res=>{
this.list = res.data.record;
this.total_amount = res.data.total_amount || "0.00"
})
},
navTo(){
uni.switchTab({
url:'/pages/index/index'
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page{
background-color: #ffe3bd;
}
.bg{
position: relative;
height: auto;
.bg_img{
width: 750rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_back{
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg_title{
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 50%;
transform: translate(-50%);
}
.b_title{
position: absolute;
width: 100%;
height: 70rpx;
top: 225rpx;
left: 0;
text-align: center;
font-size: 36rpx;
color: #F1503F;
display: flex;
justify-content: center;
align-items: flex-end;
.count{
// height: 100%;
font-size: 66rpx;
font-weight: bold;
margin: 10rpx 20rpx;
}
}
.b_body{
position: absolute;
width: 710rpx;
margin-left: 21rpx;
margin-right: 19rpx;
height: auto;
background-color: #fff;
top: 534rpx;
left: 0;
border-radius: 50rpx;
padding: 28rpx;
margin-bottom: 30rpx;
display: flex;
flex-direction: column;
align-content: center;
.body_head_img{
width: 253rpx;
margin: 0 auto;
}
.b_head{
background-color: #FFF2E0;
border-radius: 20rpx;
color: #C44100;
display: flex;
margin-top: 28rpx;
font-size: 28rpx;
padding: 20rpx 0;
.head_title{
padding-left: 20rpx;
width: 190rpx;
}
.head_title2{
padding-left: 20rpx;
width: 280rpx;
}
}
.b_content{
background-color: #fff2ed;
border-radius: 20rpx;
color: #FF5A3A;
padding-top: 20rpx;
margin-top: 28rpx;
font-size: 32rpx;
.mall{
font-size: 26rpx;
}
.content_list{
display: flex;
padding-bottom: 20rpx;
.content_item{
padding-left: 20rpx;
width: 190rpx;
}
.content_item2{
padding-left: 20rpx;
width: 280rpx;
}
}
.none{
text-align: center;
padding: 20rpx;
}
}
}
}
</style>

View File

@ -1,183 +0,0 @@
<template>
<view>
<view class="bg">
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/subsidy.webp"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">现金抵扣红包</view>
<view class="b_title">
<view>总计剩余</view> <view class="count">{{total_amount}}</view> <view>元抵扣红包</view>
</view>
<view class="b_body">
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/srecord.webp"></image>
<view class="b_head">
<view class="head_title">消费金额</view>
<view class="head_title">补贴金额</view>
<view class="head_title2">红包获得时间</view>
</view>
<view class="b_content">
<view class="content_list" v-for="(item, index) in list" :key="index">
<view class="content_item">{{item.order_amount}}<text class="mall"></text></view>
<view class="content_item">{{item.coupon_price}}<text class="mall"></text></view>
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
</view>
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { storeActivityRecord } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
data() {
return {
total_amount: '0.00',
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityRecord();
},
methods: {
back(){
uni.navigateBack()
},
storeActivityRecord(){
storeActivityRecord({
type: 2
}).then(res=>{
this.list = res.data.record;
this.total_amount = res.data.total_amount || "0.00"
})
},
navTo(){
uni.switchTab({
url:'/pages/index/index'
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page{
background-color: #ffe3bd;
}
.bg{
position: relative;
height: auto;
.bg_img{
width: 750rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_back{
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg_title{
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 50%;
transform: translate(-50%);
}
.b_title{
position: absolute;
width: 100%;
height: 70rpx;
top: 225rpx;
left: 0;
text-align: center;
font-size: 36rpx;
color: #F1503F;
display: flex;
justify-content: center;
align-items: flex-end;
.count{
// height: 100%;
font-size: 66rpx;
font-weight: bold;
margin: 10rpx 20rpx;
}
}
.b_body{
position: absolute;
width: 710rpx;
margin-left: 21rpx;
margin-right: 19rpx;
height: auto;
background-color: #fff;
top: 534rpx;
left: 0;
border-radius: 50rpx;
padding: 28rpx;
margin-bottom: 30rpx;
display: flex;
flex-direction: column;
align-content: center;
.body_head_img{
width: 253rpx;
margin: 0 auto;
}
.b_head{
background-color: #FFF2E0;
border-radius: 20rpx;
color: #C44100;
display: flex;
margin-top: 28rpx;
font-size: 28rpx;
padding: 20rpx 0;
.head_title{
padding-left: 20rpx;
width: 190rpx;
}
.head_title2{
padding-left: 20rpx;
width: 280rpx;
}
}
.b_content{
background-color: #fff2ed;
border-radius: 20rpx;
color: #FF5A3A;
padding-top: 20rpx;
margin-top: 28rpx;
font-size: 32rpx;
.mall{
font-size: 26rpx;
}
.content_list{
display: flex;
padding-bottom: 20rpx;
.content_item{
padding-left: 20rpx;
width: 190rpx;
}
.content_item2{
padding-left: 20rpx;
width: 280rpx;
}
}
.none{
text-align: center;
padding: 20rpx;
}
}
}
}
</style>

View File

@ -1,336 +0,0 @@
<template>
<view>
<view class="bg">
<image class="bg_img" mode="widthFix"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/tow_price_bg.webp"></image>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="b_body">
<view class="b_content">
<view style="padding-bottom: 16rpx;">
<picker :range="addressList" range-key="street_name" @change="changeAddress">
<block v-if="address.street_id">
当前活动区域为 <text style="color: #f84221;margin-left: 5rpx;">[ {{address.townName}} ] , 点击切换</text>
</block>
<block v-else>
<text style="color: #f84221;margin-left: 5rpx;">当前区域 [ {{address.townName}} ] 没有活动 , 点击切换</text>
</block>
</picker>
</view>
<block v-if="goodsList.length>0">
<view v-if="item.product" v-for="(item, index) in goodsList" class="short_item" @click="clickProduct(item)">
<image class="image" :src="item.product.image"></image>
<view class="short_item_right">
<view class="r_name">
<text v-if="item.mer_labels_name" class="mer-labels">{{item.mer_labels_name}}</text>{{item.product.store_name}}
</view>
<view style="display: flex;justify-content: flex-start;margin-top: 5rpx;">
<view class="r_street" v-if="item.merchant">{{item.merchant.street_name}}</view>
<view class="r_type" v-if="item.product.store_info||getSkuName(item)||item.unit_name">
<view v-if="getSkuName(item)">{{getSkuName(item)}}</view>
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
</view>
</view>
<view class="r_btn" v-if="item.product && item.product.price">
<view style="color: #7f7f7f;"><text style="font-size: 33rpx;">{{ item.product.price.split('.')[0] }}.</text>{{item.product.price.split('.')[1]}} 限时特惠</view>
<view class="qiang" :class="{'no_qiang': !can_buy}">{{item.limited_price}} </view>
<!-- <image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image> -->
</view>
</view>
</view>
</block>
<block v-else>
<image style="width: 100%;" mode="widthFix" src="/static/img/no_short.f2ffcd1c.png"></image>
<view style="text-align: center;color: #999;">此区域没有找到活动商品切换其他地方试试呢</view>
</block>
</view>
</view>
</view>
<shortPopupActive ref="shortPopupRef" @addCart="loadCart" :source="105" isBuy></shortPopupActive>
<u-modal :show="show" :closeOnClickOverlay="true" :title="`[${activity.title}]`"
content="选择活动后只有完成活动任务后才可参加另一个活动, 确定要参与这个活动吗" cancelText="我再想想" confirmText="参加活动" confirmColor="#e54841"
@cancel="show = false" @confirm="joinA()" showCancelButton></u-modal>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
:isGoIndex="false"></authorize>
</view>
</template>
<script>
import { getArticleList } from "@/api/api.js"
import { Toast } from "../../../libs/uniApi";
import authorize from "@/components/Authorize.vue";
import { getUserInfo } from '@/api/user.js';
import shortPopupActive from "@/components/shortPopupActive.vue"
import { storeActivityProduct, storeActivityDistrict } from "@/api/activity.js"
import {
cloudWarehouse
} from '@/api/requesta.js'
import {
getCartCounts,
getCartList,
} from '@/api/requesta.js';
export default {
components: {
authorize,
shortPopupActive
},
data() {
return {
info: {},
userInfo: {},
Alist: [],
activity: {
title: ''
},
address: {
townName: '',
street_id: ''
},
show: false,
isAuto: false, //
isShowAuth: false, //
addressList: [],
goodsList: [],
goodsNum: 0,
can_buy: 0, // , 0, 1
}
},
onLoad(options) {
this.address = {
street_id: options.street_id,
townName: options.townName
}
},
onShow() {
this.getUserInfo();
this.loadList();
this.cartFn();
this.loadAddressList();
},
methods: {
changeAddress(e){
this.address = {
street_id: this.addressList[e.detail.value].street_code,
townName: this.addressList[e.detail.value].street_name
}
this.loadList();
},
back() {
uni.navigateBack()
},
getUserInfo() {
getUserInfo().then(res => {
this.userInfo = res.data;
}).catch(err => {
console.log(err);
})
},
loadList(){
let location = '';
if(this.$store.state.storage.location.lat) location = this.$store.state.storage.location.lat + ',' + this.$store.state.storage.location.long;
storeActivityProduct({
street_code: this.address.street_id,
activity_id: 2, //2
location: location,
source: 105
}).then(res => {
this.can_buy = res.data.can_buy;
this.goodsList = res.data.list;
}).catch(e=>{
Toast(e.msg||e.message||e)
})
},
loadAddressList(){
storeActivityDistrict().then(res=>{
this.addressList = res.data;
if(!this.addressList.find(item=>item.street_code==this.address.street_id)){
this.address.street_id = ''
}
})
},
//
getSkuName(item){
return Object.keys(item.sku).join('/')||null;
},
//
clickProduct(data){
if(!this.address.townName) return Toast('请先选择活动区域')
if(!this.can_buy){
return Toast('活动限购一件, 您已经买过了哦~')
}
this.$refs.shortPopupRef.setDatas(data, this.goodsNum);
this.$refs.shortPopupRef.open();
},
//
loadCart(){
this.cartFn();
},
//
cartFn() {
getCartCounts({
source: 105,
// product_type: 98
}).then(res => {
this.goodsNum = res.data[0].count
})
},
//
onLoadFun(data) {
this.getUserInfo();
this.isShowAuth = false;
},
//
openAuto() {
// console.log('hajhcdsohjcosvjco')
this.isAuto = true;
this.isShowAuth = true
},
//
authColse: function(e) {
this.isShowAuth = e
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page {
background-color: #fff5dd;
}
.bg {
position: relative;
padding-bottom: 30rpx;
.bg_img {
width: 750rpx;
height: 652rpx;
position: absolute;
top: 0;
left: 0;
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.b_body {
width: 710rpx;
margin-left: 21rpx;
margin-right: 19rpx;
height: auto;
background-color: #fff;
border-radius: 0 0 60rpx 60rpx;
padding: 28rpx;
padding-top: 680rpx;
margin-bottom: 30rpx;
.b_content {
width: 100%;
// height: 800rpx;
// background-color: #eee;
.short_item {
// padding: 20rpx;
padding-bottom: 30rpx;
display: flex;
justify-content: space-between;
.image {
height: 200rpx;
width: 200rpx;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.short_item_right {
width: 430rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.r_name {
width: 100%;
height: 80rpx;
font-size: 28rpx;
line-height: 40rpx;
text-overflow: ellipsis;
display: -webkit-box; /* 使用弹性盒子布局 */
-webkit-box-orient: vertical; /* 设置为垂直方向布局 */
overflow: hidden; /* 隐藏超出部分 */
-webkit-line-clamp: 2; /* 限制显示两行文本 */
.mer-labels{
background-color: #f84221;
color: #fff;
font-size: 18rpx;
padding: 4rpx 8rpx;
border-radius: 5rpx;
margin-right: 8rpx;
}
}
.r_type {
font-size: 22.78rpx;
color: #737373;
flex: 1;
overflow: hidden;
display: flex;
view {
height: 39rpx;
line-height: 39rpx;
background: #FEF5F3;
padding: 0 16rpx;
border-radius: 39rpx;
text-overflow: ellipsis;
}
}
.r_btn {
display: flex;
justify-content: space-between;
font-size: 22.78rpx;
color: #F84221;
align-items: center;
background-color: rgba(#F84221, 0.1);
padding-left: 15rpx;
border-radius: 0 60rpx 60rpx 0;
.qiang{
width: 160rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #F84221;
color: #fff;
border-radius: 60rpx;
font-weight: bold;
font-size: 28rpx;
}
.no_qiang{
background-color: #7f7f7f;
}
}
.r_street{
font-size: 24rpx;
height: 39rpx;
line-height: 39rpx;
color: #7f7f7f;
padding-right: 10rpx;
}
}
}
}
}
}
</style>

View File

@ -136,8 +136,6 @@
item.rate
}}</text>
<text>{{ item.reply_count }}评论</text>
<text v-if="item.merchant.distance" style="margin-left: 10rpx;">{{item.merchant.distance}}</text>
</view>
<view class="good_price">
<view class="good_price_l">
@ -150,7 +148,7 @@
item.price
}}</text>
</view>
<!-- <view class="old_price"> 30.00 </view> -->
<view class="old_price"> 30.00 </view>
</view>
<view class="good_price_r">
<view :class="{ x_tra: trnList[index]?trnList[index].bottom:0 }" :style="`transform:translateY(${
@ -185,8 +183,8 @@
</view>
</view>
<!-- 购物车 -->
<view class="card" :style="`bottom:${appInfo.bottom+10}px`"
@click="navgo('/pages/order_addcart/order_addcart?product_type=98&source='+source)">
<view class="card" :style="`bottom:${appInfo.bottom}px`"
@click="navgo('/pages/order_addcart/order_addcart')">
<view class="left">
<view class="cart" :class="{ act_cart: act_cart }" style="position: relative; z-index: 9999999">
<u--image :showLoading="true" src="/static/images/LHYC/GWC.png" width="63.09rpx"
@ -263,7 +261,7 @@
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize>
<view class="" :style="`height:${appInfo.bottom+10}px;`"> </view>
<view class="" :style="`height:${appInfo.bottom}px;`"> </view>
</view>
<view class="">
@ -357,8 +355,6 @@
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
return {
skuform: {},
location: null,
source: null,
defaInd: [0, 0],
showPicker: false,
columnData: [],
@ -421,8 +417,6 @@
// ...mapGetters(['isLogin', 'viewColor', 'uid']),
onLoad(e) {
// this.cartFn()
this.location = e.location;
this.source = e.source;
this.appInfo = this.$appInfo.safeAreaInsets
this.winHeight = this.$appInfo.windowHeight
this.street_code = e.street
@ -468,8 +462,8 @@
category_id: this.cloudList[this.current]?.category_id || "",
order: this.type,
keyword: this.keyword,
page: this.page_num,
location: this.location
page_num: this.page_num
}).then(res => {
if (res.data.list.length == 0) {
this.status = "nomore"
@ -636,7 +630,6 @@
product_id: this.skuform.product_id,
product_type: this.skuform.product_type,
spread_id: "",
source: this.source
}).then((res, err) => {
this.cartFn()
uni.showToast({
@ -690,35 +683,31 @@
})
this.totalMoney = this.totalMoney.toFixed(2)
})
getCartCounts({product_type: 98}).then(res => {
getCartCounts().then(res => {
this.goodsNum = res.data[0].count
})
},
goodDetail(item) {
uni.navigateTo({
url: `/pages/goods_details/index?id=${item.product_id}`
})
// goShopDetail(item, this.uid).then(res => {
// if (this.isLogin) {
// console.log(res);
// initiateAssistApi(item.activity_id).then(res => {
// let id = res.data.product_assist_set_id;
// uni.hideLoading();
// uni.navigateTo({
// url: '/pages/activity/assist_detail/index?id=' + id
// });
// }).catch((err) => {
// uni.showToast({
// title: err,
// icon: 'none'
// })
// });
// } else {
// this.isAuto = true;
// this.isShowAuth = true
// }
goShopDetail(item, this.uid).then(res => {
if (this.isLogin) {
initiateAssistApi(item.activity_id).then(res => {
let id = res.data.product_assist_set_id;
uni.hideLoading();
uni.navigateTo({
url: '/pages/activity/assist_detail/index?id=' + id
});
}).catch((err) => {
uni.showToast({
title: err,
icon: 'none'
})
});
} else {
this.isAuto = true;
this.isShowAuth = true
}
// })
})
},
serch() {
this.getList()
@ -755,8 +744,7 @@
category_id: this.cloudList[this.current]?.category_id || "",
order: this.type,
keyword: this.keyword,
page: this.page_num,
location: this.location
page_num: this.page_num
}).then(res => {
this.goodsList = res.data.list;
this.showLoading = false;
@ -786,7 +774,6 @@
product_id: item.product_id,
product_type: item.product_type,
spread_id: "",
source: this.source
}
let that = this
@ -855,8 +842,7 @@
this.cloudList = data
cloudWarehouse({
street_code: this.street_code,
category_id: this.cloudList[this.current].category_id,
location: this.location
category_id: this.cloudList[this.current].category_id
}).then(res => {
this.trnList = []
this.goodsList = res.data.list
@ -1469,7 +1455,7 @@
.info {
position: absolute;
top: 20%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

View File

@ -200,16 +200,15 @@
<view class="good_score">
<text style="margin-right: 10rpx;color: #F84221;">{{item.rate}}</text>
<text>{{item.reply_count}}评论</text>
<text v-if="item.merchant.distance">{{item.merchant.distance}}</text>
</view>
<view class="good_price">
<view class="good_price_l">
<view class="" style="color: #F84221;font-size: 22.78rpx;font-weight: bold;">
<text style="font-size: 30rpx;">{{item.price}}</text>
</view>
<!-- <view class="old_price">
<view class="old_price">
30.00
</view> -->
</view>
</view>
<view class="good_price_r">
<view :class="{x_tra:trnList[index]?trnList[index].bottom:0 }"
@ -243,7 +242,7 @@
</view>
</view>
<!-- 购物车 -->
<view class="card" :style="`bottom:${appInfo.bottom+10}px`"
<view class="card" :style="`bottom:${appInfo.bottom}px`"
@click="navgo('/pages/order_addcart/order_addcart')">
<view class="left">
<view class="cart" :class="{act_cart:act_cart}" style="position: relative;z-index: 9999999;">
@ -402,7 +401,7 @@
<script>
import {
townCloud,
cloudWarehouse,
getCityCloundShop
} from '@/api/requesta.js'
import {
@ -448,7 +447,6 @@
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
return {
skuform: {},
location: null,
defaInd: [0, 0],
showPicker: false,
columnData: [],
@ -513,7 +511,6 @@
// ...mapGetters(['isLogin', 'viewColor', 'uid']),
onLoad(e) {
// this.cartFn()
this.location = e.location
this.appInfo = this.$appInfo.safeAreaInsets
this.winHeight = this.$appInfo.windowHeight
this.street_code = e.street
@ -550,13 +547,13 @@
this.status = "loading"
this.page_num += 1
// this.flag = true
townCloud({
cloudWarehouse({
street_code: this.street_code,
category_id: this.cloudList[this.current]?.category_id || "",
order: this.type,
keyword: this.keyword,
page: this.page_num,
location: this.location
page_num: this.page_num
}).then(res => {
if (res.data.list.length == 0) {
this.status = "nomore"
@ -832,13 +829,13 @@
this.showLoading = true
this.status = "loading"
this.page_num = 1;
townCloud({
cloudWarehouse({
street_code: this.street_code,
category_id: this.cloudList[this.current]?.category_id || "",
order: this.type,
keyword: this.keyword,
page: this.page_num,
location: this.location,
page_num: this.page_num
}).then(res => {
this.goodsList = res.data.list
this.showLoading = false
@ -933,10 +930,9 @@
street_code: this.street_code
})
this.cloudList = data
townCloud({
cloudWarehouse({
street_code: this.street_code,
category_id: this.cloudList[this.current].category_id,
location: this.location
category_id: this.cloudList[this.current].category_id
}).then(res => {
this.trnList = []
this.goodsList = res.data.list
@ -1575,7 +1571,7 @@
.info {
position: absolute;
top: 20%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -536,9 +536,8 @@
if (uni.getStorageSync('RejectTarget')) return
let self = this
uni.getLocation({
type: 'wgs84',
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();

View File

@ -4,8 +4,8 @@
<view class='productList' :style="viewColor">
<!-- 顶部 -->
<view class="top">
<!-- <view style="height: 10px;">
</view> -->
<view style="height: 10px;">
</view>
<view class="head_tit">
<view class="" style="display: flex;align-items: center;">
<view class="back" @click='backjJump()' style="margin-right: 17rpx;">
@ -24,29 +24,243 @@
</view>
<view style="position: relative;">
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索商品名称"
<!-- <text class='iconfont icon-sousuo'></text>
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='sotreParam.keyword' @confirm="searchSubmit"></input> -->
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索店铺名称"
v-model="sotreParam.keyword" class="serch_cls"></u-search>
<view class="serchbtn img_cls" @tap="searchSubmit">搜索</view>
<!-- <u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image> -->
</view>
</view>
</view>
<view class="content">
<view class="hot_serch">
<!-- <text>热搜:</text> <text>热a搜商品</text> <text>热搜商品</text>
<text>热搜sasas商品</text> -->
</view>
<!-- <view class="menu_cls">
<u-scroll-list>
<view class="menu_li" @click="navGo(item.merchant_category_id)" v-for="item,index in menuList"
:key="index">
<u--image :showLoading="true" :src="imgList[index]" width="94.63rpx" height="99.63rpx"
style="margin-bottom: 20rpx;"></u--image>
<text style="display: block; width: 15vw;">{{item.category_name}}</text>
</view>
</u-scroll-list>
</view> -->
<view class="goods_list">
<view class="goods_card" @click="goStore(item.mer_id)" v-for="(item,index) in storeList"
:key="index">
<view class="left">
<u--image :showLoading="true" :src="item.mer_avatar" width="157.71rpx"
height="157.71rpx"></u--image>
</view>
<view class="right">
<view class="li head" style="display: flex;">
<text class="com_name">{{item.mer_name}}</text>
<text
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
</view>
<view class="li">
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
<text style="margin-left: 20rpx;color: #FF6D20; ">5.0</text>
<text>月销2000+</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text> {{item.service_phone}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/SJ.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text>{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text class="address">{{item.mer_address}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="goodslist">
<WaterfallsFlowp :wfList="storeList" @itemTap="itemTap" :type="1" />
</view>
<!-- 热搜 -->
<!-- <view class="nav-wrapper" :class="'styleType'+store_street_theme">
<view class='nav acea-row row-middle' :class="'styleType'+store_street_theme">
<view v-for="item in downMenus" :key="item.key" class='item'
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
<view class="">
{{item.title}}
</view>
<view class="line" :class="{'font-line':firstKey == item.key}">
</view>
</view>
</view>
</view>
-->
<!-- 店铺 -->
<!--
<block>
<view class="store-wrapper">
<view class="store-item" v-for="(item,index) in storeList" :key="index">
<view class="head">
<view class="bgc_img" :style="{ backgroundImage: `url(${item.mini_banner})`}">
</view>
<view class="zhezhao">
</view>
<view class="zhezhao1" @click="goStore(item.mer_id)">
<view class="title">
<view>{{item.mer_name}}
</view>
<span>
{{item.type_name}}
</span>
</view>
<view class="coent">
<view class="avater">
<image :src="item.mer_avatar" mode=""></image>
</view>
<view class=" text">
<view class="text_one">
<view class="">
<image src="@/static/images/phone.png" mode=""></image>
{{item.service_phone}}
</view>
<view class="text_one_r">
<image src="@/static/images/clock.png" mode=""></image>
{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}
</view>
</view>
<view class="text_two">
<image src="@/static/images/shangpu.png" mode=""></image>
{{item.mer_info}}
</view>
<view class="text_three">
<image src="@/static/images/dingwei.png" mode=""></image>
{{item.mer_address}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</block>
<block v-if="store_street_theme == 2">
<view class="mer-item2" v-for="(item,index) in storeList" :key='index'>
<view class="mer-hd mer-shop-count" @click="goStore(item.mer_id)">
<image class="mer-avatar" :src="item.mer_avatar"></image>
<view class="mer-shop-right">
<view class="mer-count">
<view class="mer-top">
<view class="txt line1">{{item.mer_name}}</view>
<text v-if="item.type_name" class="font-bg-red ml8">{{item.type_name}}</text>
<text v-else-if="item.is_trader" class="font-bg-red ml8">自营</text>
</view>
<view class="mer-btn">
<view class="">
{{item.care_count<10000 ? item.care_count : (item.care_count/10000).toFixed(2)+''}}人关注
</view>
<view class="line" v-if="item.distance"></view>
<view class="distance" v-if="item.distance" @click.stop="showStoreLocation(item)">
<view class="">
{{item.distance}}
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
</view>
</view>
<view class="pro-box">
<navigator :url="`/pages/goods_details/index?id=${itemn.product_id}`" hover-class="none"
class="pro-item" v-for="(itemn,indexn) in item.recommend" :key='indexn'>
<view class="picture">
<easy-loadimage mode="widthFix" :image-src="itemn.image"></easy-loadimage>
<view v-if="itemn.border_pic"
:style="{ backgroundImage: `url(${itemn.border_pic})` }"
class="border-picture"></view>
</view>
<view class="price">
<text></text>{{itemn.price}}
</view>
</navigator>
</view>
</view>
</view>
</view>
</block>
<block v-if="store_street_theme == 3">
<view class="mer-item mer-item3" v-for="(item,index) in storeList" :key='index'
:style="'background-image:url('+item.mini_banner+')'">
<view class="mer-hd" @click="goStore(item.mer_id)">
<view class="mer-name">
<image :src="item.mer_avatar"></image>
<view class="">
<view class="mer-top">
<view class="txt line1">{{item.mer_name}}</view>
<text v-if="item.type_name" class="font-bg-red ml8">{{item.type_name}}</text>
<text v-else-if="item.is_trader" class="font-bg-red ml8">自营</text>
</view>
<view class="mer-btn">
<view class="">
{{item.care_count<10000 ? item.care_count : (item.care_count/10000).toFixed(2)+''}}人关注
</view>
<view class="line" v-if="item.distance"></view>
<view class="distance" v-if="item.distance" @click.stop="showStoreLocation(item)">
<view class="">
{{item.distance}}
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
</view>
</view>
</view>
</view>
<view class="pro-box" :class="'styleType'+store_street_theme">
<view class="pro-item" v-for="(itemn,indexn) in item.recommend" :key='indexn' v-if="indexn<=2">
<view @click="go_details(itemn.product_type,itemn.product_id)">
<view class="picture">
<image :src="itemn.image"></image>
<view v-if="itemn.border_pic"
:style="{ backgroundImage: `url(${itemn.border_pic})` }" class="border-picture">
</view>
</view>
<view class="price">
<text></text>{{itemn.price}}
</view>
</view>
</view>
</view>
</view>
</block>
<view class='loadingicon acea-row row-center-wrapper' v-if="loading">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
-->
</view>
<view class='no-shop' v-if="!storeList.length && !loading && !loadingIcon" v-cloak>
<view class='pictrue' style="margin: 0 auto;background-color: #F0F2F5;">
<image src='../../../static/images/noCart.png'></image>
<text>暂无商品快去搜索其他商品吧</text>
<text>暂无店铺快去搜索其他店铺</text>
</view>
</view>
</block>
@ -62,12 +276,10 @@
<script>
import {
storeMerchantList,
getProductslist,
getGeocoder,
supMenuApi,
supAgoodsApi
} from '@/api/store.js';
import { wgsToGcj } from "@/utils/wgs.js";
import {
merClassifly,
@ -83,12 +295,10 @@
configMap
} from '@/utils';
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import WaterfallsFlowp from '@/components/WaterfallsFlow/WaterfallsFlowp.vue'
const app = getApp();
export default {
components: {
easyLoadimage,
WaterfallsFlowp
easyLoadimage
},
data() {
return {
@ -145,7 +355,6 @@
category_id: '',
type_id: '',
street_id: '',
village_id: '',
type_code: '',
},
@ -161,7 +370,7 @@
latitude: "",
longitude: "",
count: 0,
storeTypeArr: [], //
storeTypeArr: [], //
merList: [], //
product_type: 0,
show: false,
@ -170,9 +379,7 @@
};
},
onLoad(options) {
this.sotreParam.type_code = options.type_code;
this.sotreParam.street_id = options.street_id || null;
this.sotreParam.village_id = options.village_id || null;
this.sotreParam.type_code = options.type_code
this.storeList = [];
if (this.mer_location == 1) {
this.selfLocation()
@ -208,14 +415,6 @@
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&?merchant_category_id=${id}`
})
},
itemTap(item){
uni.navigateTo({
url: '/pages/goods_details/index_v?id=' + item.product_id,
fail: (err) => {
console.log(err);
}
})
},
go_details: function(product_type, product_id) {
if (product_type == 98) {
uni.navigateTo({
@ -256,7 +455,7 @@
});
});
},
//
//
getStoreType: function() {
let temp = []
getStoreTypeApi().then(res => {
@ -341,9 +540,8 @@
let self = this
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'wgs84',
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
@ -375,7 +573,7 @@
},
});
},
//
//
storeMerchantList() {
if (this.loading) return
this.loading = true
@ -388,16 +586,10 @@
if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude
}
if(this.sotreParam.street_id){
rqData.street_id = this.sotreParam.street_id;
}
if(this.sotreParam.village_id){
rqData.village_id = this.sotreParam.village_id;
}
// console.log(rqData)
getProductslist(rqData).then(res => {
storeMerchantList(rqData).then(res => {
this.count = res.data.count
this.storeList = this.storeList.concat(res.data.list);
this.storeList = this.storeList.concat(res.data.list)
this.loading = false
this.loadingIcon = false
// this.titName = this.storeList[0].mer_info
@ -678,12 +870,12 @@
color: #B3B3B3;
display: flex;
justify-content: space-around;
margin: 0;
margin: 20rpx 0;
flex-wrap: wrap;
// margin-top: 50rpx;
padding-top: 50rpx;
/* #ifdef H5 */
padding-top: 80rpx;
padding-top: 100rpx;
/* #endif */
text {
@ -1135,35 +1327,4 @@
transform: translateY(-50%);
}
.goodslist {
margin: 0 auto;
width: 725rpx;
.no-more {
text-align: center;
padding-top: 18rpx;
}
.pictrue_tips {
color: $uni-nothing-text;
}
.common-hd {
display: flex;
align-items: center;
justify-content: center;
height: 118rpx;
.title {
padding: 0 80rpx;
font-size: 34rpx;
color: $theme-color;
font-weight: bold;
background-image: url("~@/static/images/index-title.png");
background-repeat: no-repeat;
background-size: 100% auto;
background-position: left center;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<template>
<view style="background-color: #f5f5f5;">
<view style="background-color: #F0F2F5;">
<!-- <view style="height: var(--status-bar-height);background-color: red;height: 10vh;">dsfdsfsdfds</view> -->
<view class='productList' :style="viewColor">
<!-- 顶部 -->
@ -17,7 +17,7 @@
供销综合云市场
</view>
<view class=""
@click="navGoto(`/pages/nongKe/cloud_entrepot/indexa?street=${street_id}&town=${street}&location=${latitude},${longitude}`)"
@click="navGoto(`/pages/nongKe/cloud_entrepot/indexa?street=${street_id}&town=${street}`)"
style="font-size: 36.8rpx;font-weight: 700;transform: skewX(-10deg);margin-left: 60rpx;">
供销综合云商品
</view>
@ -31,7 +31,7 @@
<!-- 搜索框 -->
<!-- <view style="position: relative;width: 289.14rpx;" v-if="showSerch">
<u-search borderColor="#FF6D20" bgColor="white" @change="test" :showAction="false"
placeholder="请输入..." v-model="storeParam.keyword" @search="onInputConfirm"
placeholder="请输入..." v-model="sotreParam.keyword" @search="onInputConfirm"
class="serch_cls"></u-search>
<u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image>
@ -49,7 +49,7 @@
<view class="sswz">
<view style="position: relative;width: 501.17rpx;">
<u-search borderColor="#FF6D20" bgColor="white" @change="test" :showAction="false"
placeholder="搜索店铺或者名称" v-model="storeParam.keyword" @search="onInputConfirm"
placeholder="搜索店铺或者名称" v-model="sotreParam.keyword" @search="onInputConfirm"
class="serch_cls"></u-search>
<u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image>
@ -95,26 +95,14 @@
<view class="menu_li" @click="navGo(item.merchant_category_id)" v-for="item,index in menuList"
:key="index">
<!-- {{item.merchant_category_id}} -->
<u--image :showLoading="true" :src="item.background" width="94.63rpx" height="99.63rpx"
></u--image>
<u--image :showLoading="true" :src="imgList[index]" width="94.63rpx" height="99.63rpx"
style="margin-bottom: 20rpx;"></u--image>
<text
style="display: block;font-size: 26.29rpx;">{{item.category_name}}</text>
style="display: block;font-size: 26.29rpx; width: 15vw;">{{item.category_name}}</text>
</view>
</u-scroll-list>
</view>
<view class='no-shop' v-if="storeParam.is_recommend && !loading && !loadingIcon" v-cloak>
<view class='pictrue' style="margin: 0 auto;background-color: #F5F5F5;">
<!-- <image src='../../../static/images/noCart.png'></image> -->
<image src='@/static/images/no_short.png'></image>
<text>暂无店铺切换其他位置试试</text>
</view>
</view>
<block v-if="storeParam.is_recommend">
<view class="common-hd">
<view class="title">为你推荐</view>
</view>
</block>
<view class="goods_list">
<view class="goods_card" @click="goStore(item.mer_id)" v-for="(item,index) in storeList"
:key="index">
@ -129,28 +117,15 @@
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
</view>
<view class="li">
<!-- <u--image v-for="item,index in [1,1,1,1,1]" :key="index" :showLoading="true"
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image> -->
<view class="score">
<view class="star">
<view
:style="{width: `${(item.service_score / 5 * 100).toFixed(0)}%`, backgroundImage: `url(${domain}/static/diy/score1${keyColor}.png)`}">
</view>
</view>
</view>
<text style="margin-left: 20rpx;color: #FF6D20; ">{{item.service_score}}</text>
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
<text style="margin-left: 20rpx;color: #FF6D20; ">5.0</text>
<text>月销{{item.sales}}</text>
<text v-if="item.distance" style="font-size: 24rpx;color: #aaa;">{{item.distance}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
height="33.85rpx"></u--image>
<text> {{item.service_phone}}</text>
<!-- <image src="../../../static/images/MYTC/SJicon.png"></image> -->
<u--image :showLoading="true" src="/static/images/address.png" width="33.85rpx"
height="33.85rpx"></u--image>
<view >{{item.street_name}}</view>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/SJ.png" width="33.85rpx"
@ -168,6 +143,7 @@
</view>
<u-loadmore :status="status" />
</view>
<!-- 热搜 -->
@ -331,7 +307,12 @@
</view>
<u-loadmore v-if="storeParam.is_recommend==false && storeList.length != 0 || (storeParam.is_recommend==true)" :status="status" />
<view class='no-shop' v-if="!storeList.length && !loading && !loadingIcon" v-cloak>
<view class='pictrue' style="margin: 0 auto;background-color: #F5F5F5;">
<image src='../../../static/images/noCart.png'></image>
<text>暂无店铺快去搜索其他店铺吧</text>
</view>
</view>
</block>
<u-popup class="pop" :show="show" @close="close" mode="center" bgColor='transparent'>
<image :src="image"></image>
@ -352,7 +333,6 @@
storeMerchantList,
getGeocoder,
} from '@/api/store.js';
import { wgsToGcj } from "@/utils/wgs.js";
import {
supMenuApi
} from '@/api/requesta.js';
@ -381,9 +361,7 @@
getDiy
} from '@/api/api.js'
import {
HTTP_REQUEST_URL
} from '@/config/app';
import Cache from '@/utils/cache';
const app = getApp();
@ -395,7 +373,6 @@
},
data() {
return {
domain: HTTP_REQUEST_URL,
defaInd: [0, 0],
columnData: [],
showSerch: false,
@ -466,15 +443,14 @@
firstKey: 0,
//
storeList: [],
storeParam: {
sotreParam: {
keyword: '',
page: 1,
limit: 10,
order: 'location',
order: '',
category_id: '',
type_id: '',
street_id: '',
is_recommend: false, //
street_id: ''
},
storeKey: 0,
storeScroll: true,
@ -501,17 +477,13 @@
this.street_id = options.street_id
this.street = options.townName
this.product_type = options.product_type ?? 0
if(this.$store.state.storage?.location?.lat){
this.latitude = this.$store.state.storage.location.lat;
this.longitude = this.$store.state.storage.location.long;
}
if (options.street_id != undefined) {
this.storeParam.street_id = options.street_id
this.sotreParam.street_id = options.street_id
}
this.credit_buy = options.credit_buy
this.storeParam.type_id = options.type_id
this.storeParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
this.storeParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
this.sotreParam.type_id = options.type_id
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
this.storeList = [];
if (this.mer_location == 1) {
this.selfLocation()
@ -553,7 +525,7 @@
mer_location: 0,
store_street_theme: 1,
hide_mer_status: '',
}, mapGetters(['viewColor', 'keyColor'])),
}, mapGetters(['viewColor'])),
},
methods: {
selectLocation() {
@ -569,7 +541,7 @@
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
})
this.storeParam.street_id = e.value[1].code
this.sotreParam.street_id = e.value[1].code
this.street_id = e.value[1].code
this.storeMerchantList()
},
@ -650,14 +622,14 @@
},
test() {
// if (this.storeParam.keyword.length > 3) {
// this.storeParam.keyword.slice(0, 3)
// this.storeParam.keyword = this.storeParam.keyword.slice(0, 3) + "..."
// if (this.sotreParam.keyword.length > 3) {
// this.sotreParam.keyword.slice(0, 3)
// this.sotreParam.keyword = this.sotreParam.keyword.slice(0, 3) + "..."
// }
// console.log(this.storeParam.keyword.length)
// console.log(this.sotreParam.keyword.length)
},
hotSerchFn(keywords) {
this.storeParam.keyword = keywords
this.sotreParam.keyword = keywords
this.searchSubmit()
},
goMap(url) {
@ -698,8 +670,8 @@
check: false
}
})
if (this.storeParam.category_id.length > 0) {
this.storeParam.category_id.forEach((ids, index) => {
if (this.sotreParam.category_id.length > 0) {
this.sotreParam.category_id.forEach((ids, index) => {
temp.forEach(el => {
if (ids == el.merchant_category_id) {
el.check = true
@ -720,7 +692,7 @@
let temp = []
getStoreTypeApi().then(res => {
res.data.forEach(item => {
if (item.mer_type_id == this.storeParam.type_id) {
if (item.mer_type_id == this.sotreParam.type_id) {
temp.push({
...item,
check: true
@ -798,41 +770,15 @@
},
selfLocation() {
let self = this
if (uni.getStorageSync('RejectTarget')) return;
if(this.$store?.state?.storage?.location?.lat){
this.latitude = this.$store?.state?.storage?.location?.lat;
this.longitude = this.$store?.state?.storage?.location?.long;
getGeocoder({
lat: this.latitude,
long: this.longitude
}).then(res => {
// console.log(res)
this.detaile_address = res.data.address;
this.location_address = res.data.address;
this.recommend_address = res.data.address.length > 4 ? res.data.address
.slice(0, 4) + '...' :
res.data.address
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
})
}
else uni.getLocation({
type: 'wgs84',
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'gcj02',
success: (res) => {
console.log('定位');
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
this.latitude = res.latitude.toFixed(6);
this.longitude = res.longitude.toFixed(6);
this.$store.commit('setLocation', {
lat: res.latitude.toFixed(6),
long: res.longitude.toFixed(6),
});
this.latitude = res.latitude
this.longitude = res.longitude
getGeocoder({
lat: latitude,
long: longitude
@ -864,60 +810,29 @@
if (this.loading) return
this.loading = true
let rqData = {
keyword: this.storeParam.keyword,
page: this.storeParam.page,
keyword: this.sotreParam.keyword,
page: this.sotreParam.page,
limit: 10,
order: this.storeParam.order,
category_id: this.storeParam.category_id,
type_id: this.storeParam.type_id,
credit_buy: this.credit_buy,
order: this.sotreParam.order,
category_id: this.sotreParam.category_id,
type_id: this.sotreParam.type_id,
street_id: this.sotreParam.street_id,
credit_buy: this.credit_buy
}
rqData.street_id = this.storeParam.street_id
if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude
}
// console.log(rqData)
storeMerchantList(rqData).then(res => {
if (res.data.list.length < rqData.limit) {
this.status = "nomore"
}
this.count = res.data.count
this.storeList = (res.data.list)
this.loading = false
this.loadingIcon = false
//
if(rqData.page==1 && res.data.count==0){
this.storeMerchantList2();
}else this.storeParam.is_recommend = false;
})
},
//
storeMerchantList2() {
if (this.loading) return
this.loading = true
let rqData = {
keyword: this.storeParam.keyword,
page: this.storeParam.page,
limit: 10,
order: this.storeParam.order,
category_id: this.storeParam.category_id,
type_id: this.storeParam.type_id,
credit_buy: this.credit_buy,
}
if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude
}
storeMerchantList(rqData).then(res => {
this.storeParam.is_recommend = true;
this.count = res.data.count
this.storeList = (res.data.list)
this.loading = false
this.loadingIcon = false
})
},
//
goStore(id) {
if (this.storeParam.type_id == 12) {
if (this.sotreParam.type_id == 12) {
uni.navigateTo({
url: `/pages/nongKe/supply_chain/merchant?id=${id}`
})
@ -931,13 +846,13 @@
},
searchSubmit: function() {
let that = this;
that.$set(that.storeParam, 'keyword', this.storeParam.keyword);
that.$set(that.sotreParam, 'keyword', this.sotreParam.keyword);
this.set_where(this.firstKey)
this.showSerch = false
},
//
bindRight() {
this.storeParam.page = 1
this.sotreParam.page = 1
this.rightBox = true
},
//
@ -945,24 +860,24 @@
let arr1 = [],
arr2 = []
if (data.storeTypeArr.length == 0) {
// this.storeParam.type_id = ''
// this.sotreParam.type_id = ''
} else {
data.storeTypeArr.forEach(item => {
arr1.push(item.mer_type_id)
})
this.storeParam.type_id = arr1.toString();
this.sotreParam.type_id = arr1.toString();
}
if (data.merList.length == 0) {
this.storeParam.category_id = ''
this.sotreParam.category_id = ''
} else {
data.merList.forEach(item => {
arr2.push(item.merchant_category_id)
})
this.storeParam.category_id = arr2.toString();
this.sotreParam.category_id = arr2.toString();
}
this.rightBox = data.status
this.loadend = false;
this.$set(this.storeParam, 'page', 1)
this.$set(this.sotreParam, 'page', 1)
this.storeList = [];
this.storeMerchantList();
},
@ -976,9 +891,8 @@
if (this.loading) return
this.storeList = []
this.firstKey = e
this.storeParam.page = 1
// this.storeParam.order = this.downMenu[e].order
this.storeParam.order = 'location' //使
this.sotreParam.page = 1
this.sotreParam.order = this.downMenu[e].order
this.storeMerchantList();
},
backjJump() {
@ -1010,16 +924,16 @@
},
//
onReachBottom() {
this.storeParam.page += 1
this.sotreParam.page += 1
let rqData = {
keyword: this.storeParam.keyword,
page: this.storeParam.page,
keyword: this.sotreParam.keyword,
page: this.sotreParam.page,
limit: 10,
order: this.storeParam.order,
category_id: this.storeParam.category_id,
type_id: this.storeParam.type_id,
street_id: this.storeParam.street_id,
order: this.sotreParam.order,
category_id: this.sotreParam.category_id,
type_id: this.sotreParam.type_id,
street_id: this.sotreParam.street_id,
credit_buy: this.credit_buy
}
if (this.latitude) {
@ -1027,13 +941,16 @@
}
// console.log(rqData)
storeMerchantList(rqData).then(res => {
console.log(res.data.list.length);
if (res.data.list.length < rqData.limit) {
if (res.data.list == 0) {
this.status = "nomore"
return
}
this.count = res.data.count
this.storeList.push(...res.data.list)
})
}
}
@ -1044,9 +961,6 @@
margin: 0;
padding: 0;
}
page{
background-color: #f5f5f5;
}
.com_name {
font-size: 33.29rpx;
@ -1080,8 +994,7 @@
padding-top: var(--status-bar-height);
// padding-top: 80rpx;
background-color: #f5f5f5;
// background-color: #F0F2F5;
background-color: #F0F2F5;
position: fixed;
z-index: 999;
width: 100%;
@ -1102,36 +1015,13 @@
.menu_li {
margin-right: 50rpx;
// background-color: red;
// width: 50vw;
display: flex;
flex-direction: column;
align-items: center;
min-width: 15vw;
width: 50vw;
// width: 120rpx;
// display: inline-block;
}
}
.common-hd {
display: flex;
align-items: center;
justify-content: center;
height: 60rpx;
margin-top: 30rpx;
.title {
padding: 0 80rpx;
font-size: 34rpx;
color: $theme-color;
font-weight: bold;
background-image: url("~@/static/images/index-title.png");
background-repeat: no-repeat;
background-size: 100% auto;
background-position: left center;
}
}
.goods_list {
margin-top: 20rpx;
@ -1154,7 +1044,6 @@
}
.right {
flex: 1;
.head {
font-weight: bold;
// color: red;
@ -1162,7 +1051,6 @@
}
.li {
width: 100%;
display: flex;
font-size: 26.29rpx;
margin-bottom: 10rpx;
@ -1699,8 +1587,8 @@
color: $uni-nothing-text;
image {
width: 500rpx;
height: 180rpx;
width: 414rpx;
height: 380rpx;
}
}
}
@ -1730,42 +1618,4 @@
box-sizing: border-box;
padding: 0 20rpx;
}
.score {
display: flex;
align-items: center;
font-weight: 500;
font-size: 24rpx;
line-height: 1;
color: #000;
.score-title {
margin-right: 15rpx;
}
.score_text{
color: #fd5d2e;
}
.star {
position: relative;
width: 111rpx;
height: 19rpx;
margin-right: 10rpx;
background: url(../../columnGoods/images/star.png) left top/100% 100% no-repeat;
overflow: hidden;
view {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(../../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
&.star_purple {
background: url(../../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
}
}
}
}
</style>

View File

@ -63,16 +63,10 @@
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
</view>
<view class="li">
<view class="score">
<view class="star">
<view
:style="{width: `${(item.service_score / 5 * 100).toFixed(0)}%`, backgroundImage: `url(${domain}/static/diy/score1${keyColor}.png)`}">
</view>
</view>
</view>
<text style="margin-left: 20rpx;color: #FF6D20; ">{{item.service_score}}</text>
<text>月销{{item.sales}}</text>
<text v-if="item.distance" style="font-size: 24rpx;color: #aaa;">{{item.distance}}</text>
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
<text style="margin-left: 20rpx;color: #FF6D20; ">5.0</text>
<text>月销2000+</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
@ -284,7 +278,6 @@
supAgoodsApi
} from '@/api/store.js';
import { wgsToGcj } from "@/utils/wgs.js";s
import {
supMenuApi,
} from '@/api/requesta.js';
@ -297,9 +290,6 @@
import {
mapGetters
} from "vuex";
import {
HTTP_REQUEST_URL
} from '@/config/app';
import {
goShopDetail
} from '@/libs/order.js'
@ -316,8 +306,8 @@
},
data() {
return {
domain: HTTP_REQUEST_URL,
titName: "",
titName: "坝坝宴",
price: 0,
stock: 0,
nows: false,
@ -395,10 +385,7 @@
if (options.street_id != undefined) {
this.sotreParam.street_id = options.street_id
}
if(this.$store.state.storage?.location?.lat){
this.latitude = this.$store.state.storage.location.lat;
this.longitude = this.$store.state.storage.location.long;
}
this.credit_buy = options.credit_buy
this.sotreParam.type_id = options.type_id
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
@ -445,7 +432,7 @@
mer_location: 0,
store_street_theme: 1,
hide_mer_status: '',
}, mapGetters(['viewColor', 'keyColor'])),
}, mapGetters(['viewColor'])),
},
methods: {
navGo(id) {
@ -576,40 +563,14 @@
},
selfLocation() {
let self = this
if (uni.getStorageSync('RejectTarget')) return;
if(this.$store?.state?.storage?.location?.lat){
this.latitude = this.$store?.state?.storage?.location?.lat;
this.longitude = this.$store?.state?.storage?.location?.long;
getGeocoder({
lat: this.latitude,
long: this.longitude
}).then(res => {
// console.log(res)
this.detaile_address = res.data.address;
this.location_address = res.data.address;
this.recommend_address = res.data.address.length > 4 ? res.data.address
.slice(0, 4) + '...' :
res.data.address
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
})
}
else uni.getLocation({
type: 'wgs84',
uni.getLocation({
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
this.latitude = res.latitude;
this.longitude = res.longitude;
this.$store.commit('setLocation', {
lat: res.latitude.toFixed(6),
long: res.longitude.toFixed(6),
});
this.latitude = res.latitude
this.longitude = res.longitude
getGeocoder({
lat: latitude,
long: longitude
@ -1380,42 +1341,4 @@
transform: translateY(-50%);
}
.score {
display: flex;
align-items: center;
font-weight: 500;
font-size: 24rpx;
line-height: 1;
color: #000;
.score-title {
margin-right: 15rpx;
}
.score_text{
color: #fd5d2e;
}
.star {
position: relative;
width: 111rpx;
height: 19rpx;
margin-right: 10rpx;
background: url(../../columnGoods/images/star.png) left top/100% 100% no-repeat;
overflow: hidden;
view {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(../../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
&.star_purple {
background: url(../../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -197,7 +197,6 @@
storeMerchantList,
getGeocoder
} from '@/api/store.js';
import { wgsToGcj } from "@/utils/wgs.js";
import recommend from './component/recommend';
import rightSlider from './component/rightSlider';
import {
@ -461,9 +460,8 @@
selfLocation() {
let self = this
uni.getLocation({
type: 'wgs84',
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();

View File

@ -279,7 +279,6 @@
supMenuApi,
supAgoodsApi
} from '@/api/store.js';
import { wgsToGcj } from "@/utils/wgs.js";
import {
merClassifly,
@ -538,9 +537,8 @@
let self = this
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'wgs84',
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();

View File

@ -219,8 +219,6 @@
loading: false, //
loadend: false, //
loadTitle: '加载更多', //
product_type: 0,
source: null, //(103)
isFooter: false,
cartCount: 0,
goodsHidden: true,
@ -253,6 +251,7 @@
productSelect: {}
},
isOpen: false, //
source: '',
attrImage: '',
isCart: true,
cart_id: '',
@ -273,8 +272,7 @@
onReady() {},
mounted: function() {},
onLoad: function(options) {
this.product_type = options.product_type || 0;
this.source = options.source || null;
},
onShow: function() {
this.appInfo = this.$appInfo.safeAreaInsets
@ -579,10 +577,8 @@
})
})
if (selectValue.length > 0) {
let url = '/pages/users/order_confirm/index?cartId=' + selectValue.join(',') + '&product_type=' + this.product_type;
if(this.source) url = url + '&source=' + this.source;
uni.navigateTo({
url: url
url: '/pages/users/order_confirm/index?cartId=' + selectValue.join(',')
});
} else {
return this.$util.Tips({
@ -676,21 +672,14 @@
},
getCartNum: function() {
let that = this;
let params = {};
if(this.product_type) params.product_type = this.product_type;
if(this.source) params.source = this.source;
getCartCounts(params).then(res => {
getCartCounts().then(res => {
that.cartTotalCount = res.data[0].count || 0;
});
},
//
getCartList: function(isChange) {
let that = this;
let query = {
product_type: this.product_type,
}
if(this.source) query.source = this.source;
getCartList(query).then(res => {
getCartList().then(res => {
res.data.list.forEach((item, index) => {
item.allCheck = true
item.list.forEach((goods, j) => {

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,7 @@
</view>
<view class='iconfont'
:class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >=1 && orderInfo.status != 9 ? "t-color":"")'
:class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status > 3 && orderInfo.status != 9 ? "t-color":"")'
v-if="orderInfo.order_type == 0"></view>
@ -306,7 +306,7 @@
<view class="content-clip"></view>
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">
<!-- <view class='bnt cancel' @click="cancelSales">取消售后</view> -->
<view v-if="!orderInfo.receipt && !isGoodsReturn && orderInfo.status!=0" class='bnt cancel' @click="applyInvoice">申请开票</view>
<view v-if="!orderInfo.receipt && !isGoodsReturn" class='bnt cancel' @click="applyInvoice">申请开票</view>
<view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)"
class=" acea-row row-right row-middle">
<view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'>
@ -397,11 +397,10 @@
</view>
<view class="grayBg">
<view class="pictrue">
<image class="image" :class="{'used-white': orderInfo.order_status!=7}" :src="codeUrl"></image>
<image v-if="orderInfo.order_status!=7" class="used-img" src="@/static/images/used.png"></image>
<image :src="codeUrl"></image>
</view>
</view>
<view class="num" :class="{'used-white': orderInfo.order_status!=7}">{{orderInfo.verify_code}}</view>
<view class="num">{{orderInfo.verify_code}}</view>
</view>
</uni-popup>
<u-popup :show="show" bgColor='transparent' mode='center'>
@ -779,7 +778,7 @@
showMaoLocation: function() {
if (!this.orderInfo.take.mer_take_location[0] || !this.orderInfo.take.mer_take_location[1]) return this
.$util.Tips({
title: '商家未设置具体位置!请联系商家'
title: '请设置允许商城访问您的位置'
});
let that = this,
lat = parseFloat(that.orderInfo.take.mer_take_location[0]),
@ -1523,21 +1522,9 @@
width: 290rpx;
height: 290rpx;
margin: 0 auto;
position: relative;
.used-img{
width: 175.23rpx;
height: 175.23rpx;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
.used-white{
opacity: 0.2;
}
.grayBg .pictrue .image {
.grayBg .pictrue image {
width: 100%;
height: 100%;
display: block;
@ -1678,22 +1665,6 @@
background: #ffffff;
border-radius: 16rpx 16rpx 0 0;
position: relative;
.used{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 450rpx;
background-color: rgba(255, 255, 255, 0.8);
display: flex;
justify-content: center;
align-items: center;
image{
width: 175.23rpx;
height: 175.23rpx;
}
}
.iconfont {
font-size: 24rpx;

View File

@ -157,7 +157,7 @@
<view>商品总额</view>
<view class='conter'>{{orderInfo.total_price}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.orderList && orderInfo.orderList[0].merchant.settle_cycle">
<view class='item acea-row row-between' v-if="orderInfo.orderList[0].merchant.settle_cycle">
<view>支付方式</view>
<view class='conter' v-if="orderInfo.pay_type==0">余额支付</view>
<view class='conter' v-if="orderInfo.pay_type==4 || orderInfo.pay_type==5">支付宝支付</view>
@ -273,7 +273,7 @@
openOrderRefundSubscribe
} from '@/utils/SubscribeMessage.js';
import {
getUserInfo as getUserInfos
getUserInfo
} from '@/api/user.js';
import payment from '@/components/payment';
import orderGoods from "@/components/orderGoods";
@ -519,7 +519,7 @@
*/
getUserInfo: function() {
let that = this;
getUserInfos().then(res => {
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
that.$set(that, 'payMode', that.payMode);
})
@ -539,10 +539,10 @@
that.$set(that, 'orderInfo', res.data);
this.pay_type = this.orderInfo.pay_type
if (this.orderInfo.interest !== null) {
this.moerTime(this.orderInfo.interest.start_time, this.orderInfo.cancel_unix)
this.moerTime(this.orderInfo.interest.start_time)
} else {
this.isSelfOrder = true
this.moerTime(this.orderInfo.create_time, this.orderInfo.cancel_unix)
this.moerTime(this.orderInfo.create_time)
// console.log(this.orderInfo.create_time)
}
@ -593,17 +593,16 @@
});
},
//
moerTime(autoTime, c_time) {
moerTime(autoTime) {
if (this.isSelfOrder) {
// console.log(new Date(autoTime), new Date(c_time*1000));
// let limitPayTime = 60 //
// let curData = new Date(autoTime);
let curData = new Date(c_time*1000 || new Date(autoTime).getSeconds() + (60*30)); // 使, 30
// curData.setSeconds(curData.getSeconds() + (60 * limitPayTime));
let limitPayTime = 60 //
let curData = new Date(autoTime);
curData.setSeconds(curData.getSeconds() + (60 * limitPayTime));
this.be_overdue = curData.getFullYear() + '-' + (curData.getMonth() + 1) + '-' + curData.getDate() +
' ' +
curData.getHours() + ':' +
(curData.getMinutes() > 9 ? curData.getMinutes() : "0" + curData.getMinutes())
(curData.getMinutes() > 10 ? curData.getMinutes() : "0" + curData.getMinutes())
return
}

View File

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

View File

@ -182,7 +182,6 @@
Toast
} from '@/libs/uniApi.js'
import { wgsToGcj } from "@/utils/wgs.js";
import {
merchantUpdateAPI,
merchantInfoAPI
@ -426,7 +425,6 @@
uni.getLocation({
type: 'wgs84',
success: (res) => {
res = wgsToGcj(res);
// console.log(res);
this.latitude = res.latitude.toString();
this.longitude = res.longitude.toString();

View File

@ -1,220 +0,0 @@
<template>
<view class="red_body">
<view class="bg">
<image mode="widthFix" src="/static/active/redpack_type_img.webp"></image>
<view class="border"></view>
</view>
<view class="bg_back">
<image @click="back" class="bc_image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="title">红包余额</view>
</view>
<view class="r_list" v-for="(item, index) in list" :key="index">
<view class="r_item" @click="navgo(item)">
<image class="r_bg" src="/static/active/red_packet.webp"></image>
<view class="r_body">
<view class="r_count">
<view class="rc_count">
<text class="rc_icon"></text>{{item.total_amount}}
</view>
</view>
<view class="r_content">
<view class="r_name">{{item.type_cn}}</view>
</view>
<view class="r_btn">
查看
</view>
</view>
</view>
</view>
<view style="width: 100%;height: 260rpx;"></view>
<view class="activity">
<image mode="widthFix" @click="navTo()" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/activity1.webp"></image>
</view>
</view>
</template>
<script>
import { storeActivityTotal } from "@/api/activity.js"
export default {
data() {
return {
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityTotal();
},
methods: {
storeActivityTotal(){
storeActivityTotal().then(res=>{
this.list = res.data;
})
},
back(){
uni.navigateBack();
},
navgo(item){
if(item.type==1) uni.navigateTo({
url: '/pages/newActivity/subsidy/subsidy2'
})
else if(item.type==2) uni.navigateTo({
url: '/pages/newActivity/subsidy/subsidy3'
})
},
navTo(){
let address = this.$store.state.storage.address;
let location = this.$store.state.storage.location;
if(address.street_id){
uni.navigateTo({
url: `/pages/nongKe/cloud_entrepot/indexh?street_id=${address.street_id}&townName=${address.townName}&source=103&location=${location.lat},${location.long}`
})
}else uni.navigateTo({
url: `/pages/nongKe/cloud_entrepot/indexh`
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.red_body{
position: relative;
background: linear-gradient(to top, rgb(255,231,185), rgb(255,249,231) 480rpx);
min-height: calc(100vh);
.bg{
width: 750rpx;
height: 480rpx;
overflow: hidden;
position: relative;
image{
width: 100%;
height: 100%;
}
.border{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 30rpx;
border-radius: 30rpx 30rpx 0 0;
background-color: rgb(255,249,231);
}
}
.bg_back{
position: absolute;
top: var(--status-bar-height);
left: 0;
width: 100%;
padding: 30rpx;
color: #fff;
display: flex;
text-align: center;
.bc_image{
height: 34rpx;
width: 20rpx;
}
.title{
position: absolute;
top: 30rpx;
left: 50%;
transform: translate(-50%);
}
}
}
.r_list {
padding: 0 20rpx 20rpx 20rpx;
.r_item {
height: 156rpx;
width: 710rpx;
position: relative;
.r_bg {
width: 100%;
height: 100%;
}
.r_body {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
display: flex;
align-items: center;
.r_count {
flex: 2;
display: flex;
justify-content: center;
align-items: center;
color: #A46F32;
font-size: 44rpx;
font-weight: bold;
.rc_count {
display: flex;
align-items: flex-end;
}
.rc_icon {
font-size: 28rpx;
font-weight: 500;
margin-bottom: 8rpx;
}
}
.r_content {
flex: 4;
color: #FFF3CC;
font-size: 24rpx;
padding: 18rpx 10rpx 18rpx 40rpx;
display: flex;
flex-direction: column;
justify-content: center;
.r_name {
font-size: 32rpx;
font-weight: 500;
margin-bottom: 10rpx;
}
view {
width: 100%;
overflow: hidden;
/* 隐藏超出宽度的文本 */
white-space: nowrap;
/* 不换行 */
text-overflow: ellipsis;
/* 文本末尾显示省略号 */
}
}
.r_btn {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: #FFF3CC;
height: 59rpx;
border-radius: 28rpx 28rpx 28rpx 28rpx;
opacity: 1;
border: 1rpx solid #FFF3CC;
margin-right: 20rpx;
}
}
}
}
.activity{
position: fixed;
bottom: 100rpx;
padding: 20rpx;
image{
width: 710rpx;
}
}
</style>

View File

@ -1,313 +0,0 @@
<template>
<view class="">
<!-- <block v-for="(item, index) in info">
<block v-if="item.type==1">
<view class="type_name">无门槛实物通用红包<text class="n_count">(2)</text></view>
<view class="r_list" v-for="(e, i) in item.list">
<view class="r_item" @click="change(index, i)">
<image class="r_bg" src="/static/active/red_packet.webp"></image>
<view class="r_body">
<view class="r_count">
<view class="rc_count">
<text class="rc_icon"></text>240
</view>
</view>
<view class="r_content">
<view class="r_name">现金抵扣红包</view>
<view>仅限平台指定商家商品可使用</view>
<view>有效期至 2026.01.15 24:00:00</view>
</view>
<view class="r_icon">
<u-icon v-if="changeRed.type == index && changeRed.id == i" name="checkmark-circle-fill" color="#FFF3CC" size="56rpx"></u-icon>
<u-icon v-else name="checkmark-circle" color="#FFF3CC" size="56rpx"></u-icon>
</view>
</view>
</view>
</view>
</block>
<block v-if="item.type==2">
<view class="type_name">不可使用红包<text class="n_count">(2)</text></view>
<view class="none_list" v-for="(e, i) in item.list">
<view class="r_body">
<view class="r_count">
<view class="rc_count">
<text class="rc_icon"></text>200
</view>
</view>
<view class="r_content">
<view class="r_name">现金抵扣红包</view>
<view>仅限平台指定商家商品可使用</view>
<view>有效期至 2026.01.15 24:00:00</view>
</view>
</view>
<u-line dashed color="#999999"></u-line>
<view class="n_tips">本单不可用原因未在平台指定店铺使用</view>
</view>
</block>
</block> -->
<view style="height: 30rpx;"></view>
<view class="r_list" v-for="(item, i) in list" :key="i">
<view class="r_item" @click="change(item)">
<image class="r_bg" src="/static/active/red_packet.webp"></image>
<view class="r_body">
<view class="r_count">
<view class="rc_count">
<text class="rc_icon"></text>{{item.balance}}
</view>
</view>
<view class="r_content">
<view class="r_name">{{item.coupon_title}}</view>
<view>{{item.describe}}</view>
<view>有效期至 {{item.end_time}}</view>
</view>
<view class="r_icon">
<u-icon v-if="changeRed&&changeRed.coupon_user_id==item.coupon_user_id" name="checkmark-circle-fill" color="#FFF3CC" size="56rpx"></u-icon>
<!-- <u-icon v-else name="checkmark-circle" color="#FFF3CC" size="56rpx"></u-icon> -->
<view v-else style="height: 50rpx;width: 50rpx;border-radius: 50%;border: 5rpx solid #FFF3CC;"></view>
</view>
</view>
</view>
</view>
<view class="footer">
<view>
<text>已选 {{ changeRed?1:0 }} </text>
<view v-if="changeRed&&changeRed.coupon_title.includes('抵扣红包')" style="font-size: 24rpx;margin-left: 10rpx;color: #ed4c3a;">(使用红包后此订单将不参与任何补贴活动)</view>
<view v-if="changeRed&&changeRed.coupon_title.includes('通用红包')" style="font-size: 24rpx;margin-left: 10rpx;color: #ed4c3a;">(使用红包后此订单将不参与用户消费补贴活动)</view>
<!-- , 可减 <text class="red_i">¥</text> <text class="red_c">0</text> -->
</view>
<view class="btn" @click="comfirm">确定</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: [
{
type: 1, // 使
name: '无门槛实物通用红包',
list: [1, 2]
},
{
type: 1, // 使
name: '现金抵扣红包',
list: [1,2,3]
},
{
type: 2, // 使, 2使
name: '不可使用红包',
list: [1]
}
],
list: [],
changeRed: null,
}
},
onLoad(option) {
const eventChannel = this.getOpenerEventChannel();
// acceptDataFromOpenerPageeventChannel
eventChannel.on('changeRedPacketInfo', (data) => {
console.log(data);
this.list = data;
})
},
onShow() {},
methods: {
change(e, i) {
console.log(e, i);
if(this.changeRed&&this.changeRed.coupon_user_id==e.coupon_user_id)this.changeRed = null;
else this.changeRed = e;
},
comfirm(){
uni.$emit('changeRedPacket', this.changeRed?.coupon_user_id||'');
uni.navigateBack()
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page{
background-color: #fff;
}
.type_name{
padding: 20rpx;
font-size: 28rpx;
.n_count{
color: #7A7A7A;
font-size: 24rpx;
margin-left: 10rpx;
}
}
.r_list {
padding: 0 20rpx 20rpx 20rpx;
.r_item {
height: 156rpx;
width: 710rpx;
position: relative;
.r_bg {
width: 100%;
height: 100%;
}
.r_body {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
display: flex;
.r_count {
flex: 2;
display: flex;
justify-content: center;
align-items: center;
color: #A46F32;
font-size: 44rpx;
font-weight: bold;
.rc_count {
display: flex;
align-items: flex-end;
}
.rc_icon {
font-size: 28rpx;
font-weight: 500;
margin-bottom: 8rpx;
}
}
.r_content {
flex: 4;
color: #FFF3CC;
font-size: 24rpx;
padding: 18rpx 10rpx 18rpx 40rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.r_name {
font-size: 32rpx;
font-weight: 500;
margin-bottom: 10rpx;
}
view{
width: 100%;
overflow: hidden; /* 隐藏超出宽度的文本 */
white-space: nowrap; /* 不换行 */
text-overflow: ellipsis; /* 文本末尾显示省略号 */
}
}
.r_icon {
flex: 1;
display: flex;
align-items: center;
}
}
}
}
.none_list{
margin: 0 20rpx 20rpx 20rpx;
background-color: #E2E2E2;
border-radius: 20rpx;
.r_body {
height: 156rpx;
width: 710rpx;
display: flex;
.r_count {
flex: 2;
display: flex;
justify-content: center;
align-items: center;
color: #333;
font-size: 44rpx;
font-weight: bold;
.rc_count {
display: flex;
align-items: flex-end;
}
.rc_icon {
font-size: 28rpx;
font-weight: 500;
margin-bottom: 8rpx;
}
}
.r_content {
flex: 5;
color: #333;
font-size: 24rpx;
padding: 18rpx 10rpx 18rpx 40rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.r_name {
font-size: 32rpx;
font-weight: 500;
margin-bottom: 10rpx;
}
view{
width: 100%;
overflow: hidden; /* 隐藏超出宽度的文本 */
white-space: nowrap; /* 不换行 */
text-overflow: ellipsis; /* 文本末尾显示省略号 */
}
}
}
.n_tips{
padding: 10rpx 30rpx 20rpx 30rpx;
color: #333;
font-size: 24rpx;
}
}
.footer{
height: 130rpx;
padding: 30rpx;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
background-color: #F6F6F6;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
.red_i{
color: #FF421D;
margin-left: 20rpx;
}
.red_c{
color: #FF421D;
font-size: 44rpx;
}
.btn{
width: 128rpx;
height: 68rpx;
background-color: #EC693F;
border-radius: 34rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
}
</style>

View File

@ -1,346 +0,0 @@
<template>
<view class="">
<u-sticky customNavHeight="0">
<view class="head_top">
<u-search placeholder="搜索小区、办公楼等" :showAction="false"></u-search>
<view style="height: 20rpx;"></view>
<u-tabs :list="tabsList" itemStyle="font-size: 32rpx;height: 74rpx;" :current="current" @change="changeCurrent"
lineColor="#FF6D20" lineWidth="105rpx" height="7rpx"></u-tabs>
</u-tabs>
</view>
</u-sticky>
<view style="background-color: #f4f4f4;height: 30rpx;"></view>
<view class="address-box" v-if="current==0" style="padding: 0;">
<map
style="width: 750rpx;height: 750rpx;"
:longitude="longitude"
:latitude="latitude"
show-location
@controltap="handleMapTap"
></map>
<!-- <Amap></Amap> -->
<view class="head_item" style="padding: 20rpx;">
<view class="re-location">
<view class="re-title">当前位置: </view>
<view>{{street}}</view>
</view>
<view class="re-btn" @click="reGetLocation">
<image class="re-address-img" src="@/static/images/re_address.png"></image>重新定位
</view>
</view>
</view>
<view class="address-box" v-if="current==1">
<view class="head_item_tips">
<view>泸州区县</view>
</view>
<view class="area">
<view class="area-item" :class="{'area-item-on': item.code==area_change}" v-for="(item, index) in areaList"
:key="index" @click="changeArea(item)">
{{item.name}}
</view>
</view>
<view class="head_item_tips">
<view>选择街道/</view>
</view>
<view class="street">
<view class="letter-item" v-for="key in mapKey" :key="key">
<view class="letter">{{key}}</view>
<view class="item-box">
<view class="street-item" v-for="item in mapList[key]" :key="item.code" @click="changeStreet(item)">
{{item.name}}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getGeocoder,
merClassifly,
getProductslist
} from '@/api/store.js';
import { wgsToGcj } from "@/utils/wgs.js";
import {
getArea,
getStreet
} from "@/api/article.js";
import { Toast } from '@/libs/uniApi';
// import Amap from "./map.nvue";
export default {
// components:{
// Amap
// },
data() {
return {
tabsList: [{
name: '地图定位',
}, {
name: '泸州区县',
}, ],
current: 0,
latitude: '28.87',
longitude: '105.44',
town: '',
street_id: '',
street: '',
areaList: [],
streetList: [],
mapList: {},
area_change: '',
street_change: '',
}
},
onLoad() {
this.getLoaction();
this.loadArea();
},
onShow() {},
computed: {
mapKey() {
return Object.keys(this.mapList).sort()
}
},
methods: {
changeCurrent(e) {
this.current = e.index;
},
getLoaction() {
this.street = '定位中'
uni.getLocation({
type: 'wgs84',
timeout: '10',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
this.latitude = res.latitude.toFixed(6);
this.longitude = res.longitude.toFixed(6);
this.$store.commit('setLocation', {
lat: res.latitude.toFixed(6),
long: res.longitude.toFixed(6),
});
getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id
this.street = res.data.address_reference.town.title;
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
this.street = '定位失败'
})
},
fail: (err) => {
console.log('定位失败');
this.isshow = false
uni.setStorageSync("RejectTarget", true)
Toast('定位失败,请检查定位权限是否开启')
this.street = '定位失败'
// uni.showToast({
// title: "",
// icon: 'none',
// duration: 2000
// });
}
});
},
reGetLocation() {
this.getLoaction()
},
loadArea() {
getArea({
city_code: 510500
}).then((res) => {
this.areaList = res.data;
this.changeArea(this.areaList[0]);
})
},
loadStreet(area_code) {
this.street_change = '';
getStreet({
area_code
}).then((res) => {
this.streetList = res.data;
this.initPinyin();
})
},
initPinyin() {
this.mapList = {};
this.streetList.forEach((item) => {
let str = item.pinyin?.toUpperCase();
str = str ? str : '#';
if (this.mapList[str]) {
this.mapList[str].push(item);
} else {
this.mapList[str] = [];
this.mapList[str].push(item)
}
})
},
changeArea(item) {
this.area_change = item.code;
this.loadStreet(this.area_change);
},
//
changeStreet(item){
uni.navigateBack({
success: () => {
uni.$emit('changeAddress', {
area: this.area_change,
street: item
})
}
})
},
//
handleMapTap(e){
console.log('点击', e);
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.head_top {
background-color: #fff;
padding: 28rpx;
}
.address-box {
// background-color: red;
border-radius: 21rpx 21rpx 0rpx 0rpx;
padding: 30rpx 28rpx;
.head_item {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 28rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
.re-location {
display: flex;
.re-title {
flex-shrink: 0;
padding-right: 14rpx;
}
}
.re-address-img {
width: 38.55rpx;
height: 38.55rpx;
margin-right: 14rpx;
}
.re-btn {
display: flex;
align-items: center;
flex-shrink: 0;
padding-left: 14rpx;
}
}
.head_item_tips {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #737373;
}
.address-list {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
height: 80rpx;
line-height: 75rpx;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
}
.area {
display: flex;
flex-wrap: wrap;
padding-top: 30rpx;
.area-item {
// width: 158rpx;
height: 64rpx;
// background: #F4F4F4;
background-color: #fff;
border-radius: 11rpx 11rpx 11rpx 11rpx;
border: 2rpx solid #B3B3B3;
display: flex;
align-items: center;
justify-content: center;
padding: 0 20rpx;
font-size: 28rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #737373;
margin-bottom: 22rpx;
margin-right: 22rpx;
}
.area-item-on {
// background-color: #F4F4F4;
color: #ff6d20;
// font-weight: bold;
border: 2rpx solid #ff6d20;
}
}
.street {
padding-top: 28rpx;
.letter-item {
display: flex;
.letter {
flex-shrink: 0;
margin-right: 28rpx;
font-size: 25rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
width: 40rpx;
text-align: center;
color: #737373;
}
.item-box {
flex: 1;
.street-item {
width: 100%;
padding-bottom: 28rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #333333;
}
}
}
}
}
</style>

View File

@ -1,413 +0,0 @@
<template>
<view class="" style="background-color: #fff;">
<u-sticky customNavHeight="0">
<view class="head_top">
<!-- <u-search placeholder="搜索小区、办公楼等" @custom="searchMap"></u-search>
<view style="height: 20rpx;"></view> -->
<u-tabs :list="tabsList" itemStyle="font-size: 32rpx;height: 74rpx;" :current="current" @change="changeCurrent"
lineColor="#FF6D20" lineWidth="105rpx" height="7rpx"></u-tabs>
</u-tabs>
</view>
</u-sticky>
<view style="background-color: #f4f4f4;height: 30rpx;"></view>
<view class="address-box" v-if="current==0" style="padding: 0;">
<map style="width: 750rpx;height: 750rpx;" :longitude="longitude" :latitude="latitude" :markers="[markers]"
show-location @tap="handleMapTap"></map>
<view class="head_item" style="padding: 10rpx 20rpx;">
<view class="re-location">
<view style="width: 120rpx;"><text class="text">当前位置: </text></view>
<view style="flex: 1;">
<text
class="text">{{locationInfo.formatted_addresses?locationInfo.formatted_addresses.recommend:locationInfo.address}}</text>
</view>
</view>
<view class="re-btn" @click="reGetLocation">
<image class="re-address-img" src="@/static/images/re_address.png"></image><text class="text">重新定位</text>
</view>
</view>
<u-button text="确认" @click="submitAddress"></u-button>
</view>
<view class="address-box" v-if="current==1">
<view class="head_item_tips">
<view><text class="text">泸州区县</text></view>
</view>
<view class="area">
<view class="area-item" :class="{'area-item-on': item.code==area_change}" v-for="(item, index) in areaList"
:key="index" @click="changeArea(item)">
<text class="text">{{item.name}}</text>
</view>
</view>
<view class="head_item_tips">
<view><text class="text">选择街道/镇</text></view>
</view>
<view class="street">
<view class="letter-item" v-for="key in mapKey" :key="key">
<view class="letter"><text class="text">{{key}}</text></view>
<view class="item-box">
<view class="street-item" v-for="item in mapList[key]" :key="item.code" @click="changeStreet(item)">
<text class="text">{{item.name}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getGeocoder,
merClassifly,
getProductslist
} from '@/api/store.js';
import {
getArea,
getStreet
} from "@/api/article.js";
import { Toast } from '@/libs/uniApi';
import { wgsToGcj } from "@/utils/wgs.js";
export default {
data() {
return {
tabsList: [{
name: '地图定位',
}, {
name: '泸州区县',
}],
current: 0,
latitude: '28.87',
longitude: '105.44',
markers: {
id: 1,
longitude: '28.87',
latitude: '105.44',
iconPath: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/cbbd5202311241523412538.png',
width: 28,
height: 28
},
locationInfo: {},
town: '',
street_id: '',
street: '',
areaList: [],
streetList: [],
mapList: {},
area_change: '',
street_change: '',
}
},
onLoad(options) {
this.getLoaction();
this.loadArea();
},
onShow() {},
computed: {
mapKey() {
return Object.keys(this.mapList).sort()
}
},
methods: {
changeCurrent(e) {
this.current = e.index;
},
getLoaction() {
this.street = '定位中'
this.locationInfo = {};
this.locationInfo.formatted_addresses = {};
this.locationInfo.formatted_addresses.recommend = '定位中'
uni.getLocation({
type: 'wgs84',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
this.latitude = res.latitude.toFixed(6);
this.longitude = res.longitude.toFixed(6);
this.$store.commit('setLocation', {
lat: res.latitude.toFixed(6),
long: res.longitude.toFixed(6),
});
getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
this.locationInfo = res.data;
this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id
this.street = res.data.address_reference.town.title;
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
this.street = '定位失败'
})
},
fail: (err) => {
console.log('定位失败');
this.isshow = false
Toast('定位失败,请检查定位权限是否开启')
this.street = '定位失败'
this.locationInfo.formatted_addresses.recommend = '定位失败'
// uni.showToast({
// title: "获取定位超时",
// icon: 'none',
// duration: 2000
// });
}
});
},
reGetLocation() {
this.getLoaction()
},
loadArea() {
getArea({
city_code: 510500
}).then((res) => {
this.areaList = res.data;
this.changeArea(this.areaList[0]);
})
},
loadStreet(area_code) {
this.street_change = '';
getStreet({
area_code
}).then((res) => {
this.streetList = res.data;
this.initPinyin();
})
},
initPinyin() {
this.mapList = {};
this.streetList.forEach((item) => {
let str = item.pinyin?.toUpperCase();
str = str ? str : '#';
if (this.mapList[str]) {
this.mapList[str].push(item);
} else {
this.mapList[str] = [];
this.mapList[str].push(item)
}
})
},
changeArea(item) {
this.area_change = item.code;
this.loadStreet(this.area_change);
},
// 选择位置
changeStreet(item) {
uni.navigateBack({
success: () => {
uni.$emit('changeAddress', {
area: this.area_change,
street: item
})
}
})
},
// 点击地图
handleMapTap(e) {
// console.log('点击地图', e);
// #ifdef H5
return Toast('H5暂不支持选择坐标');
// #endif
let longitude = e.detail.longitude;
let latitude = e.detail.latitude;
this.markers.longitude = longitude;
this.markers.latitude = latitude;
// console.log('修改成功', this.markers);
getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
// console.log(res);
this.locationInfo = res.data;
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
this.locationInfo = {};
this.locationInfo.formatted_addresses = {};
this.locationInfo.formatted_addresses.recommend = '定位失败'
})
},
submitAddress() {
console.log(this.locationInfo);
try {
this.town = this.locationInfo.address_reference.town.title;
this.street_id = this.locationInfo.address_reference.town.id;
this.street = this.locationInfo.address_reference.town.title;
let obj = {
area: this.locationInfo.ad_info.adcode,
street: {
name: this.street,
code: this.street_id
},
latitude: this.latitude,
longitude: this.longitude
}
console.log({...obj});
uni.navigateBack({
success: () => {
uni.$emit('changeAddress', obj)
}
})
} catch (e) {
return Toast('地址有误,请重新选择')
}
},
searchMap(){
uni.request({
url: 'https://restapi.amap.com/v3/place/text?keywords=北京大学&city=beijing&offset=20&page=1&key=0799f37420c0784f1e6cba230a68bdb1&extensions=all',
success: (res) => {
console.log(res);
},
fail: (e) => {
console.log(e);
}
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style>
/* page {
background-color: #fff;
} */
.text {
font-size: 28rpx;
white-space: normal;
}
.head_top {
background-color: #fff;
padding: 28rpx;
}
.address-box {
border-radius: 21rpx 21rpx 0rpx 0rpx;
padding: 30rpx 28rpx;
width: 750rpx;
}
.head_item {
width: 750rpx;
flex-direction: row;
justify-content: space-between;
padding-bottom: 28rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.re-location {
flex-direction: row;
flex-wrap: nowrap;
width: 480rpx;
align-items: center;
}
.re-address-img {
width: 38.55rpx;
height: 38.55rpx;
margin-right: 10rpx;
}
.re-btn {
flex-direction: row;
padding-left: 10rpx;
width: 200rpx;
height: 100rpx;
align-items: center;
}
.head_item_tips {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #737373;
}
.address-list {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
height: 80rpx;
line-height: 75rpx;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
}
.area {
flex-direction: row;
flex-wrap: wrap;
padding-top: 30rpx;
justify-content: flex-start;
}
.area-item {
height: 64rpx;
/* width: 100px; */
background-color: #fff;
border-radius: 11rpx 11rpx 11rpx 11rpx;
border: 2rpx solid #B3B3B3;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 0 20rpx;
font-size: 28rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #737373;
margin-bottom: 22rpx;
margin-right: 22rpx;
}
.area-item-on {
color: #ff6d20;
border: 2rpx solid #ff6d20;
}
.street {
padding-top: 28rpx;
}
.letter-item {
flex-direction: row;
}
.letter {
margin-right: 28rpx;
font-size: 25rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
width: 40rpx;
text-align: center;
color: #737373;
}
.item-box {
flex: 1;
}
.street-item {
width: 100%;
padding-bottom: 28rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #333333;
}
</style>

View File

@ -1,200 +0,0 @@
<template>
<view>
<view class="application-record" v-if="listData.length">
<view class="card-list" v-for="item in listData" :key="item.mer_intention_id">
<view class="card-top">
<view class="title">{{item.mer_name}}</view>
<view class="time">提交时间{{item.create_time}}</view>
<view v-if="item.fail_msg" class="reason">原因{{item.fail_msg}}</view>
</view>
<view class="line"></view>
<view class="card-bottom">
<view class="card-status">
<image class="status-icon" v-if="item.status === 0" src="../static/images/pending.png" mode=""></image>
<image class="status-icon" v-else-if="item.status === 1" src="../static/images/passed.png" mode=""></image>
<image class="status-icon" v-else-if="item.status === 2" src="../static/images/not-pass.png" mode=""></image>
<text class="status-text">{{statusText(item.status)}}</text>
</view>
<view class="status-btn" @click="jump(item)">{{statusBtn(item.status)}}</view>
</view>
</view>
</view>
<view class='no-shop' v-if="!listData.length && !loading">
<view class='pictrue' style="margin: 0 auto;">
<image src='/static/images/noCart.png'></image>
<text>暂无申请记录快去申请入驻吧!</text>
</view>
</view>
</view>
</template>
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
getApplicationRecordList
} from '@/api/store.js'
export default {
data() {
return {
loading: false,
listData: [],
pageData: {
page: 1,
limit: 10,
}
}
},
onLoad() {
this.getListData()
},
//
onReachBottom() {
if (this.count == this.listData.length) {
uni.showToast({
title: '没有更多啦',
icon: 'none',
duration: 1000
});
} else {
this.pageData.page += 1
this.getListData()
}
},
methods: {
getListData() {
this.loading = true
uni.showLoading({
title: '数据加载中',
});
getApplicationRecordList(this.pageData).then(res => {
this.count = res.data.count
this.listData = this.listData.concat(res.data.list)
uni.hideLoading();
this.loading = false
})
},
//
jump(item) {
console.log(item)
if ([0, 2].includes(item.status)) {
uni.navigateTo({
url: `/pages/store/settled/unit?mer_i_id=${item.mer_intention_id}`
})
} else if (item.status === 1) {
uni.navigateTo({
url: `/pages/store/merchantDetails/index?mer_i_id=${item.mer_intention_id}&mer_id=${item.mer_id}`
})
}
},
//
statusText(number) {
// 使
let statusData = {
0: "待审核",
1: "审核通过",
2: "审核未通过",
};
return statusData[number]
},
// button
statusBtn(number) {
// 使
let statusData = {
0: "编辑",
1: "查看",
2: "重新提交",
};
return statusData[number]
},
}
}
</script>
<style lang="scss" scoped>
.application-record {
display: flex;
flex-direction: column;
align-items: center;
background-color: #F5F5F5;
padding: 20rpx 30rpx;
.card-list {
width: 100%;
background-color: #fff;
padding: 20rpx 24rpx;
margin: 10rpx 20rpx;
border-radius: 12rpx;
.card-top {
height: 140rpx;
.title {
font-size: 28rpx;
font-weight: bold;
color: #333333;
}
.time {
color: #999999;
font-size: 24rpx;
padding: 5rpx 0;
}
.reason {
color: #E93323;
font-weight: bold;
font-size: 24rpx;
}
}
.line {
height: 2rpx;
margin: 20rpx 0 20rpx 0;
background-color: #EEEEEE;
}
.card-bottom {
display: flex;
justify-content: space-between;
align-items: center;
color: #333;
.card-status {
display: flex;
align-items: center;
.status-icon {
width: 30rpx;
height: 30rpx;
margin: 10rpx;
}
.status-text {
font-size: 28rpx;
font-weight: 500;
}
}
.status-btn {
font-size: 26rpx;
color: #555;
border: 1px solid #999999;
padding: 8rpx 32rpx;
border-radius: 40rpx;
}
}
}
}
.no-shop {
width: 100%;
background-color: #fff;
height: 100vh;
.pictrue {
display: flex;
flex-direction: column;
align-items: center;
color: $uni-nothing-text;
image {
width: 414rpx;
height: 380rpx;
}
}
}
</style>

View File

@ -210,19 +210,11 @@ export default {
type: 'routine'
};
//#endif
// #ifndef MP
params = {
type: 'app'
};
//#endif
merchantQrcode(this.id, params)
.then(res => {
console.log('二维码', res);
this.storeCode = res.data.url;
})
.catch(err => {
console.log('二维码错误', err);
});
.catch(err => {});
},
// #ifdef MP
//

View File

@ -670,7 +670,7 @@
type: 3,
statusBarHeight: 0,
isLihaiYun: '',
screenHeight: 0,
}
},
computed: {
@ -744,7 +744,6 @@
this.isCoupon = options.coupon || 0;
this.diyActive = options.order || 0;
this.order = options.order;
this.screenHeight = uni.getSystemInfoSync().screenHeight;
if (options.spid) {
this.currSpid = options.spid
app.globalData.spid = options.spid;
@ -867,10 +866,8 @@
if (this.goodsLoading) return;
const query = uni.createSelectorQuery().in(this);
query.select('#goods').boundingClientRect(data => {
console.log(data.bottom,data.top);
if (data.bottom < 1500+this.screenHeight && data.top < 0) {
if(this.type==7) this.getProductSpu();
else this.getGoods();
if (data.bottom < 1500 && data.top < 0) {
this.getGoods();
// if (this.loadend == false) {
// this.getProductSpu()
// } else {;
@ -886,7 +883,7 @@
if (this.goodsLoading) return;
const query = uni.createSelectorQuery().in(this);
query.select('#product').boundingClientRect(data => {
if (data.bottom < 1500+this.screenHeight && data.top < 0) {
if (data.bottom < 1500 && data.top < 0) {
this.get_service_list();
}
}).exec();
@ -1273,7 +1270,6 @@
},
onReachBottom() {
console.log('触底');
//
if (this.tabActive == 0) {
setTimeout(() => {

View File

@ -6,18 +6,19 @@
恭喜您的申请已通过
</view>
</view>
<view class="msg" v-if="mer_id > 0 && resData.login_url">
<view class="url" @click="copyTBL(resData.login_url, '登录地址')">
<!-- <view class="msg" v-if="mer_id > 0 && resData.login_url">
<view class="url">
<text class="head">登录地址</text>
<text class="content">{{resData.login_url}}</text>
</view>
<view class="phone" @click="copyTBL(resData.phone, '商户账号')">
<view class="phone">
<view class="">
<text class="head">商户账号</text>
<text class="content">{{resData.phone}}</text>
</view>
<text class="cope" @click="copyTBL()">复制</text>
</view>
</view>
</view> -->
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
@ -58,20 +59,21 @@
this.resData = res.data
})
},
copyTBL(url, str="") {
copyTBL(url) {
let copeData = `登录地址:${this.resData.login_url} 商户账号:${this.resData.phone}`
// #ifdef MP || APP-PLUS
uni.setClipboardData({
data: url,
data: copeData,
success: function() {
uni.showToast({
title: str+'复制成功',
title: '复制成功',
duration: 1000
});
}
});
// #endif
// #ifdef H5
this.copyText(url, str)
this.copyText(copeData)
// #endif
},
//H5
@ -92,7 +94,7 @@
document.body.removeChild(transfer);
},
//
copyText(text, str="") {
copyText(text) {
//
const textString = text.toString();
let input = document.querySelector('#copy-input');
@ -111,7 +113,7 @@
if (document.execCommand('copy')) {
document.execCommand('copy');
this.$util.Tips({
title: str + '复制成功'
title: '复制成功'
});
}
input.blur();
@ -160,10 +162,10 @@
.msg {
width: 85%;
padding: 30rpx;
height: 190rpx;
height: 150rpx;
margin: 70rpx 70rpx;
background-color: #F6F6F6;
border-radius: 10rpx;
border-radius: 8rpx;
.url {
display: flex;
flex-wrap: nowrap;

View File

@ -1,5 +1,5 @@
<template>
<view class="page">
<view class="">
<!-- #ifdef MP || APP-PLUS -->
<view class="conten-top" :style="'height:'+statusBarHeight+'px'">
@ -20,7 +20,7 @@
<image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'"
alt="">
</view>
<view class="application-record" @click="jumpToList" v-if="!mer_i_id">
<view class="application-record" @click="jumpToList">
申请记录
<text class="iconfont icon-xiangyou"></text>
</view>
@ -68,16 +68,12 @@
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name">商户分类</text>
<picker @change="bindPickerChange" @columnchange="columnchange" mode="selector" :value="index" :range="array" range-key="category_name">
<input placeholder="请选择商户分类" type="text" readonly disabled
v-model="mer_classification">
<view class='iconfont icon-jiantou'></view>
</picker>
<!-- <picker @change="bindPickerChange" @columnchange="columnchange" mode="multiSelector" :value="index" :range="[array, bindPickerChangeidx]" range-key="cate_name">
<picker @change="bindPickerChange" :value="index" :range="array"
range-key="category_name">
<input placeholder="请选择商户分类" type="text" readonly disabled
v-model="mer_classification">
<view class='iconfont icon-jiantou'></view>
</picker> -->
</picker>
</view>
</view>
</view>
@ -115,51 +111,6 @@
</view>
</view>
</view>
<!-- <view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name businessBox">邀请码(选填)</text>
<input type="text" maxlength="30" placeholder="请输入邀请码"
v-model="merchantData.invitation_code" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
</view>
</view> -->
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name">公司性质</text>
<picker @change="natureBusinessChange" mode="selector" :value="index" :range="companyTypeList">
<input v-if="nature_business==1" placeholder="请选择公司性质" type="text" readonly disabled
value="对公户">
<input v-else-if="nature_business==2" placeholder="请选择公司性质" type="text" readonly disabled
value="个体户">
<input v-else placeholder="请选择公司性质" type="text" readonly disabled
value="">
<view class='iconfont icon-jiantou'></view>
</picker>
</view>
</view>
</view>
</view>
<view class="item no-border">
<view class='acea-row row-middle'>
<text class="item-title" style="margin-right: 20rpx;">请上传营业执照</text>
<text class="item-desc">(图片格式支持JPGPNGJPEG)</text>
<view class="upload">
<view v-if="business_license" class='pictrue' @click='uploadpicText'>
<image :src='business_license'></image>
</view>
<view v-else class='pictrue acea-row row-center-wrapper row-column' @click='uploadpicText'>
<text class='iconfont icon-icon25201'></text>
<view>上传图片</view>
</view>
</view>
</view>
</view>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
@ -215,7 +166,7 @@
</view> -->
<view class="item no-border">
<view class='acea-row row-middle'>
<text class="item-title">请上传行业相关其他资质证明图片</text>
<text class="item-title">请上传营业执照及行业相关资质证明图片</text>
<text class="item-desc">(图片最多可上传10张,图片格式支持JPGPNGJPEG)</text>
<view class="upload">
<view class='pictrue' v-for="(item,index) in pics" :key="index" :data-index="index"
@ -277,13 +228,14 @@
</view>
<view class="setAgCountbtn">
<view class="border"></view>
<!-- <button class="setAgCountbtna" @click="refuse">
<button class="setAgCountbtna" @click="refuse">
拒绝
</button> -->
<button :class="num>0?'setAgCountbtnb':'setAgCountbtnc'" class="btn" :disabled="num!=0" @click="agree">
<text v-if="num>0">请仔细阅读协议 {{num}}秒后可提交</text>
<text v-else>同意本协议</text>
</button>
<button :class="num>0?'setAgCountbtnb':'setAgCountbtnc'" :disabled="num!=0" @click="agree">
<text v-if="num>0">请仔细阅读协议{{num}}S</text>
<text v-else>同意</text>
</button>
</view>
</view>
@ -323,12 +275,10 @@
create,
verify,
merClassifly,
getCategoryList,
getGoodsDetails,
updateGoodsRecord,
getStoreTypeApi,
agreeiness,
merchantLicenseIdentify
agreeiness
} from '@/api/store.js';
import {
getCaptcha,
@ -355,7 +305,6 @@
import {
HTTP_REQUEST_URL
} from '@/config/app';
import { Toast } from '../../../libs/uniApi';
const app = getApp();
export default {
components: {
@ -388,10 +337,8 @@ import { Toast } from '../../../libs/uniApi';
classification: '',
social_credit_code: '',
company_name: '',
address: '',
invitation_code: '',
address: ''
},
business_license: '',//
validate: false,
successful: false,
keyCode: "",
@ -402,13 +349,10 @@ import { Toast } from '../../../libs/uniApi';
index1: 0,
index2: [0, 0, 0],
mer_classification: "",
nature_business: 0,
array: [{
category_name: '',
merchant_category_id: ''
}],
companyTypeList: ['对公户', '个体户'],
bindPickerChangeidx: [],
storeTypeArr: [{
type_name: '',
mer_type_id: ''
@ -469,7 +413,8 @@ import { Toast } from '../../../libs/uniApi';
this.getGoodsDetails(options.mer_i_id)
})
}
else this.getArea()
this.getArea()
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45;
},
onShow() {
@ -551,34 +496,27 @@ import { Toast } from '../../../libs/uniApi';
getVillage({
street_code: e
}).then(res => {
self.$set(self.business, 2, res.data);
if(self.mer_i_id&&!this.business_name){
let area = self.business[0].find(item=>item.code==self.area_id)?.name;
let street = self.business[1].find(item=>item.code==self.street_id)?.name;
let village = self.business[2].find(item=>item.id==self.village_id)?.name;
this.business_name = `${area} ${street} ${village}`;
this.getArea();
}
self.$set(self.business, 2, res.data)
})
},
//
getStreet(e, street) {
getStreet(e) {
const self = this;
getStreet({
area_code: e
}).then(res => {
self.$set(self.business, 1, res.data)
self.getVillage(street?street:self.business[1][0].code)
self.getVillage(self.business[1][0].code)
})
},
//
getArea(code=null, street=null) {
getArea() {
getArea({
city_code: 510500
}).then(res => {
this.business[0] = res.data;
this.code1 = code ? code : this.business[0][0].code;
this.getStreet(this.code1, street)
this.code1 = this.business[0][0].code;
this.getStreet(this.code1)
})
},
//
@ -616,6 +554,7 @@ import { Toast } from '../../../libs/uniApi';
//
getGoodsDetails(id) {
getGoodsDetails(id).then(res => {
console.log(res);
let arr = Object.keys(this.merchantData)
let resData = res.data
arr.map(item => {
@ -625,26 +564,17 @@ import { Toast } from '../../../libs/uniApi';
this.merchantData.social_credit_code = resData.social_credit_code
this.merchantData.company_name = resData.company_name
this.merchantData.address = resData.address
this.merchantData.invitation_code = resData.invitation_code
this.merchantData.classification = resData.merchant_category_id
this.merchantData.mer_type = resData.mer_type_id
this.area_id = resData.area_id
this.street_id = resData.street_id
this.mer_storeType = resData.mer_storeType
this.village_id = resData.village_id
})
this.business_license = resData.images[0];
resData.images.shift();
this.pics = resData.images;
this.pics = resData.images
this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array)
this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr)
this.business_name = '';
this.getArea(this.area_id, this.street_id);
if(resData.mer_type_id!=12){
this.shoplist('mer_services_agree')
}else{
this.shoplist('mer_supply_agree')
}
uni.hideLoading();
})
},
@ -664,51 +594,37 @@ import { Toast } from '../../../libs/uniApi';
}
}
},
//
natureBusinessChange(e){
this.nature_business = this.companyTypeList[e.detail.value]=='个体户'?2:1;
},
bindPickerChange: function(e) {
// console.log(e.detail);
// this.index = e.target.value[1];
let idx = e.target.value;
// let idx = e.target.value[1];
this.merchantData.classification = this.array[idx]['merchant_category_id']
this.mer_classification = this.array[idx]['category_name']
// this.merchantData.classification = this.bindPickerChangeidx[idx]['store_category_id']
// this.mer_classification = this.bindPickerChangeidx[idx]['cate_name']
this.index = e.target.value
let idx = e.target.value
this.merchantData.classification = this.array[idx]['merchant_category_id']
this.mer_classification = this.array[idx]['category_name']
this.validateBtn()
},
columnchange(e){
// console.log(e.detail);
if(e.detail.column==0){
this.bindPickerChangeidx = this.array[e.detail.value].children;
}
},
bindPickerChange1: function(e) {
this.index1 = e.target.value
let idx = e.target.value
this.merchantData.mer_type = this.storeTypeArr[idx]['mer_type_id']
this.mer_storeType = this.storeTypeArr[idx]['type_name']
// console.log(this.merchantData.mer_type)
console.log(this.storeTypeArr[idx]['type_code'] == "TypeStore")
if(this.storeTypeArr[idx]['type_code']== 'TypeStore'&&this.merchantData.mer_type){
this.shoplist('mer_services_agree')
}else{
this.shoplist('mer_supply_agree')
}
this.validateBtn()
},
bindPickerChange2: function(e) {
// console.log(e.detail.value)
// console.log(e.detail)
this.index2 = e.detail.value
this.business_name =
`${this.business[0][this.index2[0]].name} ${this.business[1][this.index2[1]].name} ${this.business[2][this.index2[2]].name}`
this.area_id = this.business[0][this.index2[0]].code
this.street_id = this.business[1][this.index2[1]].code
this.village_id = this.business[2][this.index2[2]].id
if(this.merchantData.mer_type==12) return ; //
merstreet({
street_code: this.street_id
}).then((res) => {
@ -740,21 +656,6 @@ import { Toast } from '../../../libs/uniApi';
title: res
});
});
// getCategoryList()
// .then(res => {
// // console.log(res);
// res.data.list.forEach(item=>{
// item.category_name = item.cate_name;
// item.merchant_category_id = item.store_category_id;
// })
// this.array = res.data.list;
// this.bindPickerChangeidx = this.array[0].children;
// })
// .catch(res => {
// this.$util.Tips({
// title: res
// });
// });
},
//
getStoreType: function() {
@ -817,32 +718,6 @@ import { Toast } from '../../../libs/uniApi';
that.$set(that, 'pics', that.pics);
});
},
/**
* 上传图片识别文字
*
*/
uploadpicText: function() {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
that.business_license = res.data.path;
uni.showLoading({
title: '识别中'
})
merchantLicenseIdentify({
image: res.data.path
}).then(res=>{
that.merchantData.address = res.data.address;
that.merchantData.user_name = res.data.legal_person;
that.merchantData.social_credit_code = res.data.register_number;
that.merchantData.company_name = res.data.name;
// that.$set('merchantData', that.merchantData);
uni.hideLoading();
}).catch((e)=>{
uni.hideLoading();
Toast(e)
})
});
},
/**
* 删除图片
*
@ -946,18 +821,15 @@ import { Toast } from '../../../libs/uniApi';
code: that.merchantData.yanzhengma,
company_name: that.merchantData.company_name,
address: that.merchantData.address,
invitation_code: that.merchantData.invitation_code,
social_credit_code: that.merchantData.social_credit_code,
merchant_category_id: that.merchantData.classification,
merchant_category_name: that.mer_classification,
is_company: that.nature_business==1?1:0, // , 1, 0
mer_type_id: that.merchantData.mer_type,
mer_storeType: this.mer_storeType,
area_id: this.area_id,
street_id: this.street_id,
village_id: this.village_id,
is_nmsc: this.isnum,
images: [this.business_license, ...that.pics]
images: that.pics
}
that.validate = false;
if (that.mer_i_id) {
@ -987,6 +859,7 @@ import { Toast } from '../../../libs/uniApi';
that.validate = true;
}, 1000)
}
}).catch(res => {
this.isshow = false
that.validate = true;
@ -998,7 +871,6 @@ import { Toast } from '../../../libs/uniApi';
},
formSubmit() {
if (this.validateForm() && this.validate) {
if (this.merchantData.mer_type == '12') return this.agree();
if (this.codenote.length == 0) {
this.isshow = true
this.countDown()
@ -1086,7 +958,7 @@ import { Toast } from '../../../libs/uniApi';
if (value.enterprise_name && value.user_name && value.phone && /^1(3|4|5|7|8|9|6)\d{9}$/i.test(
value
.phone) &&
value.yanzhengma && that.isAgree && this.mer_classification) {
value.yanzhengma && that.isAgree && value.classification) {
if (!that.isShowCode) {
that.validate = true;
} else {
@ -1127,14 +999,12 @@ import { Toast } from '../../../libs/uniApi';
if (!value.yanzhengma) return that.$util.Tips({
title: '请填写验证码'
});
if (!this.mer_classification) return that.$util.Tips({
if (!value.classification) return that.$util.Tips({
title: '请选择商户分类'
});
if (!this.nature_business) return that.$util.Tips({
title: '请选择公司性质'
})
if (!this.mer_storeType) return that.$util.Tips({
title: '请选择店铺类型'
title: '请选择商户类型'
})
if (!this.business_name) return that.$util.Tips({
title: '请选择店铺所在地'
@ -1145,12 +1015,9 @@ import { Toast } from '../../../libs/uniApi';
if (that.isShowCode && !that.codeVal) return that.$util.Tips({
title: '请填写图片验证码'
});
if (!that.business_license) return that.$util.Tips({
title: '请上传营业执照'
});
// if (that.pics.length == 0) return that.$util.Tips({
// title: ''
// });
if (that.pics.length == 0) return that.$util.Tips({
title: '请上传一张或者多张图片'
});
that.validate = true;
@ -1189,7 +1056,6 @@ import { Toast } from '../../../libs/uniApi';
background-color: var(--view-theme) !important;
color: #fff !important;
}
.conten-top {
width: 100%;
@ -1230,8 +1096,9 @@ import { Toast } from '../../../libs/uniApi';
}
.merchantsSettled {
background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
min-height: 2600rpx;
background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
height: 140vh;
position: relative;
}
@ -1539,13 +1406,13 @@ import { Toast } from '../../../libs/uniApi';
.settlementAgreement .setAgCount {
background: #fff;
width: 694rpx;
width: 656rpx;
// height: 458px;
position: absolute;
top: 50%;
left: 50%;
padding: 28rpx;
padding: 52rpx;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
@ -1609,11 +1476,10 @@ import { Toast } from '../../../libs/uniApi';
.setAgCountbtn {
display: flex;
justify-content: space-around;
position: relative;
.setAgCountbtna {
margin-top: 40rpx;
// width: 200rpx;
width: 200rpx;
height: 74rpx;
text-align: center;
line-height: 74rpx;
@ -1647,7 +1513,7 @@ import { Toast } from '../../../libs/uniApi';
.setAgCountbtnc {
margin-top: 40rpx;
// width: 200rpx;
width: 200rpx;
height: 74rpx;
text-align: center;
line-height: 74rpx;
@ -1660,22 +1526,6 @@ import { Toast } from '../../../libs/uniApi';
color: #fff;
}
.border{
position: absolute;
top: 0;
left: -28rpx;
width: 100vw;
height: 100%;
border-radius: 40rpx 40rpx 0 0;
box-shadow: 0px -5px 5px -2px rgba(0, 0, 0, 0.2); /* 在上边框添加阴影 */
}
.btn{
width: 694rpx;
font-weight: bold;
font-size: 34rpx;
}
}
.settledSuccessMain {

File diff suppressed because it is too large Load Diff

View File

@ -186,7 +186,6 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { storeMerchantList, getGeocoder } from '@/api/store.js';
import { wgsToGcj } from "@/utils/wgs.js";
import recommend from '@/components/recommend';
import rightSlider from '@/components/rightSlider/index';
import { merClassifly, getStoreTypeApi } from '@/api/store.js';
@ -419,9 +418,8 @@
selfLocation() {
let self = this
uni.getLocation({
type: 'wgs84',
success: (res) => {
res = wgsToGcj(res);
type: 'gcj02',
success: (res) => {
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@
<!-- 自定义顶部背景颜色 -->
<view class="new-users skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
<view class="head">
<view class="user-card" style="padding-bottom: 0;" :class="userInfo.svip_open && svip_switch_status == 1 ? 'svip-card' : ''">
<view class="user-card" :class="userInfo.svip_open && svip_switch_status == 1 ? 'svip-card' : ''">
<view class="bg"></view>
<view class="user-info">
<view class="avatar-box" :class="{on:userInfo.is_svip > 0 && svip_switch_status == 1}">
@ -61,7 +61,7 @@
<view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">绑定手机号</view>
</view>
</view>
<!-- <view class="num-wrapper skeleton-rect">
<view class="num-wrapper skeleton-rect">
<view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')">
<text class="num">{{userInfo.total_collect_product || 0}}</text>
<view class="txt">我的收藏</view>
@ -79,27 +79,7 @@
<text class="num">{{userInfo.total_coupon || 0}}</text>
<view class="txt">优惠券</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<text class="num">{{userInfo.total_coupon || 0}}</text>
<view class="txt">购物券</view>
</view>
</view> -->
<view class="packet_card">
<view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
<view class="p_d_count">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png"></image>
<view>{{userInfo.now_money||"0.00"}}</view>
</view>
<view>我的余额 ()</view>
</view>
<view class="p_d_item" @click="authTo('/pages/redpacket/redpack_type')" >
<view class="p_d_count">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d2868202401201750014779.png"></image>
<view>{{userInfo.red_pack_balance||"0.00"}}</view>
</view>
<view>红包余额 ()</view>
</view>
</view>
</view>
<navigator hover-class="none"
:url="userInfo.is_svip > 0 ? '/pages/annex/vip_center/index' : '/pages/annex/vip_paid/index'"
class="cardVipA acea-row row-between-wrapper"
@ -269,8 +249,7 @@
setVisit
} from '@/api/user.js';
import {
getVersion,
getconfig
getVersion
} from "@/api/public";
import {
orderData
@ -458,7 +437,6 @@
let curRoute = routes[routes.length - 1].route
this.activeRouter = '/' + curRoute
this.getNav();
this.getConfigData();
if (that.isLogin) {
this.getUserInfo();
this.orderNum();
@ -621,12 +599,11 @@
},
//
orderNum() {
orderData({source: 103}).then(({
orderData().then(({
data
}) => {
// console.log(data);
this.orderMenu.forEach((item, index) => {
// console.log(item)
// console.log('item')
switch (item.title) {
case '待付款':
item.num = data.noPay
@ -641,8 +618,7 @@
item.num = data.noComment
break
case '售后/退款':
// item.num = data.refund
item.num = 0
item.num = data.refund
break
}
})
@ -661,6 +637,7 @@
that.filterMenus(item)
that.personalMenu.push(item)
})
that.imgUrls = res.data.banner
});
},
@ -699,13 +676,6 @@
this.openAuto()
}
},
//
getConfigData() {
getconfig().then(res => {
uni.$emit('update', res.data)
this.$store.commit('GLOBAL_DATA', res.data);
}).catch(err => {});
},
}
}
</script>
@ -1335,44 +1305,4 @@
font-size: 24rpx;
}
}
.packet_card{
height: 140rpx;
width: 710rpx;
background-color: rgba(#fff, 0.3);
margin: 0 auto;
border-radius: 20rpx 20rpx 0 0;
margin-top: 20rpx;
position: relative;
color: #fff;
display: flex;
justify-content: space-between;
.p_d_item{
position: absolute;
font-size: 26rpx;
font-weight: bold;
width: 300rpx;
height: 100rpx;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
&:nth-child(1){
top: 20rpx;
left: 30rpx;
}
&:nth-child(2){
top: 20rpx;
right: 30rpx;
}
.p_d_count{
display: flex;
align-items: center;
font-size: 38rpx;
image{
width: 53rpx;
height: 53rpx;
}
}
}
}
</style>

View File

@ -59,7 +59,6 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import Loading from "@/components/Loading";
import { wgsToGcj } from "@/utils/wgs.js";
import {
storeListApi
} from "@/api/store";
@ -166,7 +165,6 @@
uni.getLocation({
type: 'wgs84',
success: function(res) {
res = wgsToGcj(res);
try {
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);

View File

@ -32,8 +32,7 @@
</div>
</form>
<div class="tip">
<!-- <span @click="formItem = 2" class="font-color-red">立即注册</span> -->
<span> </span>
<span @click="formItem = 2" class="font-color-red">立即注册</span>
<navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
忘记密码
</navigator>
@ -656,13 +655,7 @@
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
if(data.is_new_user){
return uni.navigateTo({
url: '/pages/helpPeople/helpPeople'
})
}
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
@ -825,12 +818,6 @@
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
if(data.is_new_user){
return uni.navigateTo({
url: '/pages/helpPeople/helpPeople'
})
}
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
@ -841,7 +828,6 @@
} else {
method = 'navigateTo'
}
if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({
url: '/pages/index/index'

View File

@ -150,7 +150,7 @@
</view>
<view class='discount' v-else>免运费</view>
</view>
<!-- <view class='item acea-row row-between-wrapper'
<!-- <view class='item acea-row row-between-wrapper'
v-if="!seckillId && order_type != 3 && order_type != 4 && item.order.enabledCoupon">
<view>店铺优惠券</view>
<block v-if="item.coupon.length>0">
@ -363,7 +363,7 @@
</checkbox-group>
</view>
</view>
<!-- <view class='item acea-row row-between-wrapper'
<view class='item acea-row row-between-wrapper'
v-if="!seckillId && order_type != 3 && order_type != 4 && enabledPlatformCoupon">
<view>平台优惠券<text @tap="showCoupon" class="iconfont icon-wenhao1"></text></view>
<block v-if="platformCoupon.length > 0">
@ -376,20 +376,7 @@
<block v-else>
<view class='discount'>暂无优惠券</view>
</block>
</view> -->
<view class='item acea-row row-between-wrapper'>
<view>红包抵扣<!-- <text @tap="showCoupon" class="iconfont icon-wenhao1"></text> --></view>
<block v-if="platformConsumption.length > 0">
<view class='discount money red_packet' @tap='couponTap3()'>
<text v-if="consumption_id">-{{consumption_money||'0.00'}}</text>
<text v-else>有补贴红包未选</text>
<text class='iconfont icon-jiantou'></text>
</view>
</block>
<block v-else>
<view class='discount'>暂无可用红包</view>
</block>
</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
<view>运费</view>
<view class='money'>+{{priceGroup.storePostage}}</view>
@ -516,7 +503,6 @@
//
msgObj: {},
textareaStatus: true,
platformConsumption: [],
deliveryName: '快递配送',
//
cartArr: [{
@ -672,20 +658,14 @@
is_take: '',
domain: HTTP_REQUEST_URL,
product_type: '',
source: null,
interest_rate: '', //
settle_cycle: '', //
type_id: '', //
consumption_id: '', //id
consumption_money: '', //
};
},
computed: {
...mapGetters(['isLogin', 'viewColor']),
...configMap(['hide_mer_status', 'alipay_open', 'yue_pay_status']),
red_price(){ //
return (this.proPrice - this.totalPrice).toFixed(2);
}
},
watch: {
alipay_open(n) {
@ -700,7 +680,6 @@
onLoad: function(options) {
this.type_id = options.type_id
this.product_type = options.product_type
this.source = options.source
this.seckillId = options.seckillId
// #ifdef H5
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
@ -1049,16 +1028,12 @@
cart_id: that.cartId.split(","),
address_id: address_id,
takes: that.take,
consumption_id: this.consumption_id,
use_coupon: that.subCoupon,
use_integral: that.use_integral,
product_type: that.product_type,
source: that.source
use_integral: that.use_integral
}).then(res => {
//
that.product_type=res.data.order_type
that.is_take = false;
that.platformConsumption = res.data.platformConsumption;
that.is_take = false
res.data.order.forEach(el => {
if (el.order.isTake == 1) that.is_take = true
el.isTake = 0
@ -1070,15 +1045,14 @@
})
})
that.subCoupon['0'] = []
if (res.data.platformCoupon?.length > 0) {
if (res.data.platformCoupon.length > 0) {
res.data.platformCoupon.forEach(el => {
if (el.checked) {
that.subCoupon[el.mer_id] = []
that.subCoupon[el.mer_id].push(el.coupon_user_id)
}
})
}else res.data.platformCoupon = [];
that.consumption_money = res.data.consumption_money;
}
that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data
.order[that.couponIndex].coupon);
that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds
@ -1205,17 +1179,6 @@
this.$set(this, "coupon_number", this.subCoupon['0'].length);
this.$set(this, "coupon_amount", this.plant_coupon_amount);
},
couponTap3: function(item, index) {
uni.navigateTo({
url: '/pages/redpacket/redpacket',
success:(res)=> {
res.eventChannel.emit('changeRedPacketInfo', this.platformConsumption)
uni.$once('changeRedPacket', (data)=>{
this.consumption_id = data;
})
}
})
},
car: function() {
let that = this;
that.animated = false;
@ -1262,7 +1225,7 @@
jsConfig = res.data.result.config,
//
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message +
'&product_type=' + that.product_type + '&source=' + that.source,
'&product_type=' + that.product_type,
goPagesOrder = '/pages/order_details/stay?order_id=' + orderId +
'&credit_buy=1&product_type=' + that.product_type;
@ -1333,7 +1296,7 @@
success: (e) => {
//
let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=支付成功' + '&product_type=' + that.product_type + '&source=' + that.source;
'&msg=支付成功' + '&product_type=' + that.product_type;
return that.$util.Tips({
title: '支付成功',
@ -1347,7 +1310,7 @@
console.log(e,'111111111')
//
let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source;
'&msg=取消支付' + '&product_type=' + that.product_type;
return that.$util.Tips({
title: '取消支付',
}, {
@ -1359,7 +1322,7 @@
uni.hideLoading();
//
// let url = '/pages/order_pay_status/index?order_id=' + orderId +
// '&msg=' + '&product_type=' + that.product_type + '&source=' + that.source;
// '&msg=' + '&product_type=' + that.product_type;
// return that.$util.Tips({
// title: '',
// }, {
@ -1396,7 +1359,8 @@
fail: function(e) {
//
let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source;
orderId + '&msg=取消支付' + '&product_type=' + that
.product_type
return that.$util.Tips({
title: '取消支付'
}, {
@ -1420,7 +1384,7 @@
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let url =
`${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&product_type=${that.product_type}&source${that.source}`
`${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&product_type=${that.product_type}`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}`
@ -1448,7 +1412,7 @@
//
let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=支付失败' + '&product_type=' + that
.product_type + '&source=' + that.source
.product_type
return that.$util.Tips({
title: '支付失败'
}, {
@ -1461,7 +1425,7 @@
// //
// let pages = '/pages/order_pay_status/index?order_id=' +
// orderId + '&msg=' + '&product_type=' + that
// .product_type + '&source=' + that.source
// .product_type
// return that.$util.Tips({
// title: ''
@ -1476,7 +1440,7 @@
default:
//
let pages = '/pages/order_pay_status/index?order_id=' +
orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source
orderId + '&msg=取消支付' + '&product_type=' + that.product_type
return that.$util.Tips({
title: '取消支付'
@ -1660,7 +1624,6 @@
.Tips({
title: '余额不足!'
});
data.consumption_id = this.consumption_id;
//
// if (this.payType == 'creditBuy') {
@ -1709,8 +1672,7 @@
title: this.deliveryName,
check: true
}]
}
else if (!item.allow_delivery && item.allow_take) {
} else if (!item.allow_delivery && item.allow_take) {
this.radioList = [{
title: '到店核销',
check: false
@ -2618,12 +2580,4 @@
height: 756rpx;
overflow-y: scroll;
}
.red_packet{
color: #ff5c2d !important;
background-color: rgba(#ff5c2d, 0.3);
border-radius: 60rpx;
padding: 5rpx 10rpx;
padding-left: 20rpx;
font-size: 25rpx;
}
</style>

View File

@ -63,7 +63,7 @@
<view v-if="orderList.length > 0">
<block v-if="orderStatus == 0">
<view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.group_order_id, item)'>
<view @click='goOrderDetails(item.group_order_id)'>
<view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle left-wrapper">
{{item.group_order_sn}}
@ -153,7 +153,7 @@
<!-- 待发货 待收货 待评价 已完成 -->
<block v-else>
<view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.order_id, item)'>
<view @click='goOrderDetails(item.order_id)'>
<view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle left-wrapper" @click.stop="goMall(item)">
<text class="iconfont icon-shangjiadingdan"></text>
@ -250,10 +250,10 @@
</view>
</view>
<view class='bottom acea-row row-right row-middle'>
<view v-if="!item.receipt && item.status != -1 && (item.status != 0)" class='bnt cancelBnt'
<view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id, item)'>查看详情</view>
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>
</block>
<block v-if="item.status == 1">
<view class='bnt cancelBnt'
@ -269,7 +269,7 @@
<text class="iconfont icon-fabu"></text>
发布种草
</navigator> -->
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item)'>去评价
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价
</view>
</block>
<block v-if="item.status == 3">
@ -294,7 +294,7 @@
<emptyPage title="暂无订单~"></emptyPage>
</view>
</view>
<!-- <home></home> -->
<home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
:totalPrice='totalPrice'></payment>
@ -343,7 +343,6 @@
import {
HTTP_REQUEST_URL
} from '@/config/app';
import { Toast } from '../../../libs/uniApi';
export default {
components: {
payment,
@ -501,8 +500,7 @@ import { Toast } from '../../../libs/uniApi';
getOrderData: function() {
let that = this;
orderData({
product_type: 0,
source: 103
product_type: 0
}).then(res => {
that.$set(that, 'orderData', res.data);
})
@ -566,10 +564,10 @@ import { Toast } from '../../../libs/uniApi';
/**
* 去订单详情
*/
goOrderDetails: function(order_id, item) {
goOrderDetails: function(order_id) {
let self = this
if (!order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情'
});
@ -577,13 +575,16 @@ import { Toast } from '../../../libs/uniApi';
uni.showLoading({
title: '正在加载',
})
openOrderSubscribe().then(() => {
uni.hideLoading();
if (self.orderStatus == 0 || (item&&item.order_status==1)) {
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id
})
} else if (self.orderStatus == 1) {
uni.navigateTo({
url: `/pages/order_details/stay?order_id=${order_id}&orderStatus=${self.orderStatus}`
})
@ -597,9 +598,9 @@ import { Toast } from '../../../libs/uniApi';
})
// #endif
// #ifndef MP
if (self.orderStatus == 0||(item&&item.order_status==1)) {
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + item.group_order_id
url: '/pages/order_details/stay?order_id=' + order_id
})
} else if (self.orderStatus == 1) {
// uni.navigateTo({
@ -618,32 +619,30 @@ import { Toast } from '../../../libs/uniApi';
/**
* 点击去评价
*/
goOrderDetails_Evaluation: function(item) {
goOrderDetails_Evaluation: function(order_id) {
let self = this
if (!item.order_id) return that.$util.Tips({
if (!order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情和评价'
});
// #ifdef MP
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + item.order_id
url: '/pages/order_details/stay?order_id=' + order_id
})
} else {
if(!item.orderProduct[0]?.order_product_id) return Toast('无法评价该商品')
uni.navigateTo({
url: `/pages/users/goods_comment_con/index?uni=${item.orderProduct[0].order_product_id}&order_id=${item.order_id}`
url: '/pages/order_details/index?order_id=' + order_id
})
}
// #endif
// #ifndef MP
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + item.order_id
url: '/pages/order_details/stay?order_id=' + order_id
})
} else {
if(!item.orderProduct[0]?.order_product_id) return Toast('无法评价该商品')
uni.navigateTo({
url: `/pages/users/goods_comment_con/index?uni=${item.orderProduct[0].order_product_id}&order_id=${item.order_id}`
url: '/pages/order_details/index?order_id=' + order_id
})
}
// #endif
@ -653,6 +652,7 @@ import { Toast } from '../../../libs/uniApi';
*/
statusClick: function(status) {
if (status == this.orderStatus) return;
this.orderStatus = status;
this.loadend = false;
this.loading = false;
@ -675,8 +675,7 @@ import { Toast } from '../../../libs/uniApi';
groupOrderList({
page: that.page,
limit: that.limit,
product_type: 0,
source: 103
product_type: 0
}).then(res => {
that.isReady = true;
let list = res.data.list || [];
@ -703,8 +702,7 @@ import { Toast } from '../../../libs/uniApi';
status: arr,
page: that.page,
limit: that.limit,
product_type: 0,
source: 103
product_type: 0
}).then(res => {
let list = res.data.list || [];
let loadend = list.length < that.limit;
@ -733,7 +731,6 @@ import { Toast } from '../../../libs/uniApi';
status: 10,
page: 1,
limit: 1,
source: 103
}).then(res => {
let list = res.data.list || [];
that.presellOrderCount = res.data.count;

View File

@ -331,7 +331,7 @@
<emptyPage title="暂无订单~"></emptyPage>
</view>
</view>
<!-- <home></home> -->
<home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" :order_type='order_type' @onChangeFun='onChangeFun'
:order_id="pay_order_id" :totalPrice='totalPrice'></payment>

View File

@ -293,7 +293,7 @@
<emptyPage title="暂无订单~"></emptyPage>
</view>
</view>
<!-- <home></home> -->
<home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
:totalPrice='totalPrice'></payment>

View File

@ -335,7 +335,7 @@
<emptyPage title="暂无订单~"></emptyPage>
</view>
</view>
<!-- <home></home> -->
<home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" :order_type='order_type' @onChangeFun='onChangeFun'
:order_id="pay_order_id" :totalPrice='totalPrice'></payment>

View File

@ -224,7 +224,7 @@
<emptyPage title="暂无订单~"></emptyPage>
</view>
</view>
<!-- <home></home> -->
<home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view>

View File

@ -86,7 +86,6 @@
editAddress,
getAddressDetail
} from '@/api/user.js';
import { wgsToGcj } from "@/utils/wgs.js";
import {
getCityV2,
getCityList
@ -285,9 +284,8 @@
});
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'wgs84',
type: 'gcj02',
success: (res) => {
res = wgsToGcj(res);
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();

View File

@ -4,7 +4,7 @@
<view class='nav acea-row'>
<view class='item' :class='type==0 ? "on":""' @click='changeType(0)'>全部</view>
<view class='item' :class='type==1 ? "on":""' @click='changeType(1)'>消费</view>
<!-- <view class='item' :class='type==2 ? "on":""' @click='changeType(2)'>充值</view> -->
<view class='item' :class='type==2 ? "on":""' @click='changeType(2)'>充值</view>
</view>
<view class='sign-record'>
<view class='list' v-for="(item,index) in userBillList" :key="index">

View File

@ -1,5 +1,5 @@
<template>
<view :style="viewColor" style="padding-bottom: 30rpx;">
<view :style="viewColor">
<form>
<view class='personal-data'>
<view class="wrapper" v-if="switchUserInfo.length>0">
@ -87,20 +87,6 @@
<text class='iconfont icon-you'></text>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view>填写邀请码</view>
<view class='input acea-row row-between-wrapper' @click="showPopup">
<input type='text' placeholder="填写他人邀请码" v-model="promotion_code" disabled='true' class='id'></input>
<text class='iconfont icon-you'></text>
</view>
<uni-popup ref="popup">
<view class="code-popup">
<text class="title">填写邀请码</text>
<u-input type='text' placeholder="填写他人邀请码" v-model="promotion_code" :border="'surround'" class='id'></u-input>
<u-button class="code-btn" @click="submitCode">确认</u-button>
</view>
</uni-popup>
</view>
<view class='item acea-row row-between-wrapper'>
<view>地址管理</view>
<navigator url="/pages/users/user_address_list/index" hover-class="none"
@ -125,11 +111,10 @@
</view>
</view>
<!--#ifdef APP-PLUS-->
<view class='item acea-row row-between-wrapper' @click="$u.throttle(getVerion, 1500)">
<view class='item acea-row row-between-wrapper'>
<view>当前版本</view>
<view class='input acea-row row-between-wrapper'>
<input type='text' :value='version' disabled='true' class='id'></input>
<text class='iconfont icon-you'></text>
</view>
</view>
<!--#endif-->
@ -162,8 +147,7 @@
getLogout,
userAcc,
editAvatar,
updateInfo,
bindPromotionCode
updateInfo
} from '@/api/user.js';
import { switchH5Login, getAppVersion } from '@/api/api.js';
import { mapGetters } from "vuex";
@ -172,7 +156,6 @@
import authorize from '@/components/Authorize';
import Cache from '@/utils/cache';
import { HTTP_REQUEST_URL } from '@/config/app';
import { Toast } from '../../../libs/uniApi';
export default {
components: {
authorize
@ -182,15 +165,13 @@ import { Toast } from '../../../libs/uniApi';
domain: HTTP_REQUEST_URL,
userInfo: {},
loginType: 'h5',
promotion_code: '', //
userIndex: 0,
switchUserInfo: [],
isAuto: false, //
isShowAuth: false, //
headBg: '../static/images/currentAcc',
mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
version: '',
code_show: false
version: ''
};
},
computed: configMap({ open_update_info: 0 }, mapGetters(['isLogin', 'viewColor', 'keyColor'])),
@ -370,10 +351,6 @@ import { Toast } from '../../../libs/uniApi';
});
}
},
showPopup(){
if(this.promotion_code) return Toast('已经填写过了');
this.$refs.popup.open();
},
//
changeCancel() {
uni.navigateTo({
@ -387,31 +364,10 @@ import { Toast } from '../../../libs/uniApi';
let that = this;
getUserInfo().then(res => {
that.$set(that, 'userInfo', res.data);
this.promotion_code = this.userInfo.promotion_code;
if (res.data.phone) {
that.userAcc();
}
});
},
/**
* 获取版本信息
*/
getVerion(){
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);
})
}
}
}
@ -640,22 +596,4 @@ import { Toast } from '../../../libs/uniApi';
border-radius: 50%;
}
}
.code-popup{
width: 600rpx;
height: 300rpx;
background-color: #fff;
border-radius: 28rpx;
padding: 28rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title{
text-align: center;
}
.code-btn{
background-color: $theme-color;
border-radius: 40rpx;
color: #fff;
}
}
</style>

View File

@ -99,7 +99,7 @@
</scroll-view>
<button>添加新的抬头</button>
</view>
<!-- <home></home> -->
<home></home>
</view>
</template>

View File

@ -60,7 +60,7 @@
<button class="add-btn" @click="addInvoice"><text class="iconfont icon-fapiao"></text>添加新发票抬头</button>
</block>
<!-- <home></home> -->
<home></home>
</view>
</template>

View File

@ -104,7 +104,7 @@
</scroll-view>
<button @tap="addTitle">添加新的抬头</button>
</view>
<!-- <home></home> -->
<home></home>
</view>
</template>

View File

@ -10,18 +10,18 @@
<view class='money'>{{userInfo.now_money || 0}}</view>
</view>
<!-- #ifdef APP-PLUS || H5 -->
<!-- <navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator> -->
<navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
<!-- #endif -->
<!-- #ifdef MP -->
<!-- <view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view> -->
<view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
<!-- #endif -->
</view>
<view class='cumulative acea-row row-top'>
<!-- v-if="balance_func_status == 1" -->
<!-- <view class='item' >
<view class='item' >
<view>累计充值()</view>
<view class='money'>{{userInfo.total_recharge || 0}}</view>
</view> -->
</view>
<view class='item'>
@ -44,12 +44,12 @@
</view>
<view>消费记录</view>
</navigator>
<!-- <navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2'>
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2'>
<view class='pictrue'>
<image :src="domain+'/static/diy/record3'+keyColor+'.png'"></image>
</view>
<view>充值记录</view>
</navigator> -->
</navigator>
</view>
</view>
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>

View File

@ -1,816 +0,0 @@
<template>
<view class="m_body">
<view class="head_card">
<view class="card_img">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/22c6320240125134855740.png"></image>
<view class="c_content">
<view class="c_title">当前余额</view>
<view class="c_count"> <text class="c_icon">¥</text> {{userInfo.now_money||'0.00'}}</view>
</view>
</view>
<view class="c_tab">
<u-tabs :list="list1" :current="curNow" @click="clickTab1" lineWidth="60rpx" lineColor="#FF8056"
:itemStyle="{width: '200rpx', height: '80rpx'}"></u-tabs>
</view>
</view>
<view class="body_card">
<view class="card1" v-if="curNow==0">
<view class="change_list">
<view class="change_item" :class="{'change_item_active': nowChange==index}" @click="changeItem(item, index)"
v-for="(item, index) in changeList" :key="index">
<text class="c_icon">¥</text> {{item}}
</view>
</view>
<view class="c_tab">
<u-tabs :list="[{name: '充值数量'}]" lineWidth="60rpx" lineColor="#FF8056"
:itemStyle="{width: '200rpx', height: '80rpx'}"></u-tabs>
</view>
<view class="change_count">
<view>当前选择面额 ¥{{nowPrice}}</view>
<view class="c_btn">
<view @click="reduce">-</view>
<view>{{priceCount}}</view>
<view @click="append">+</view>
</view>
</view>
<view class="c_tips">
<view class="tips_title">注意事项:</view>
<view>充值后金额不能提现仅可用于商城商品消费</view>
</view>
</view>
<view class="card2" v-if="curNow==1">
<view class="record" v-for="(item, index) in recordList" :key="index">
<view class="left">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e807a202401251520462666.png"></image>
<view>
<view>{{item.title}}</view>
<view class="tips">{{item.create_time}}</view>
</view>
</view>
<view class="right">{{item.number}}</view>
</view>
<view class="no_data" v-if="recordList.length==0">暂无充值记录</view>
</view>
</view>
<view class="footer" v-if="curNow==0">
<view class="f_tip">
总计充值金额:
<view class="price">
<text>{{total}}</text>
</view>
</view>
<view class="primary_btn" @click="$u.throttle(submitSub, 1500)">确认充值</view>
</view>
<payment :payMode="payMode" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
:totalPrice="totalPrice"></payment>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
<script>
import { getCommissionInfo } from "@/api/user.js"
import { Toast } from "../../../libs/uniApi";
import {
mapGetters
} from "vuex";
import {
getUserInfo,
spreadInfo,
rechargeWechat
} from '@/api/user.js';
import authorize from '@/components/Authorize';
import payment from '@/components/payment';
export default {
components:{
authorize,
payment
},
data() {
return {
userInfo: {},
curNow: 0,
list1: [{
name: '余额充值'
}, {
name: '充值记录'
}],
changeList: [0.01, 15, 20, 50, 100],
nowChange: 0,
nowPrice: 0,
priceCount: 1,
isAuto: false, //
isShowAuth: false, //
recordList: [],
where: {
page: 1,
limit: 15,
type: 2
},
otherValue: '其他',
now_money: 0,
navRecharge: ['账户充值', '佣金转入'],
active: 0,
number: '',
from: '',
placeholder: "0.00",
picList: [],
activePic: 0,
money: "",
numberPic: '',
rechar_id: '0',
rechargeAttention: [],
pay_close: false,
totalPrice: '0',
payMode: [{
name: '微信支付',
icon: 'icon-weixinzhifu',
// #ifdef H5
value: 'h5',
// #endif
// #ifdef MP
value: 'routine',
// #endif
// #ifdef APP-PLUS
value: 'weixin',
// #endif
title: '微信快捷支付',
payStatus: true
}
],
}
},
onLoad() {
this.nowPrice = this.changeList[0];
if (this.isLogin) {
this.getUserInfo()
} else {
this.isAuto = true;
this.isShowAuth = true
}
},
onShow() {},
computed: {
...mapGetters(['isLogin', 'viewColor', 'keyColor']),
total() {
return this.nowPrice * this.priceCount;
}
},
onReachBottom() {
this.getCommissionInfo();
},
methods: {
clickTab1(e) {
this.curNow = e.index;
if (e.index == 1) {
this.recordList = [];
this.where.page = 1;
this.getCommissionInfo();
}
},
changeItem(e, index) {
this.nowPrice = e;
this.nowChange = index;
if (this.priceCount * this.nowPrice > 20000) {
this.priceCount = Math.floor(20000 / this.nowPrice);
return Toast('不可充值超过2万元');
}
},
append() {
if (this.priceCount * this.nowPrice > 20000) {
this.priceCount = Math.floor(20000 / this.nowPrice);
return Toast('不可充值超过2万元');
} else this.priceCount++;
},
reduce() {
if (this.priceCount <= 1) return Toast('最少充值一份');
else this.priceCount--;
},
getCommissionInfo() {
getCommissionInfo(this.where).then((res) => {
if(res.data.list.length>0) {
this.recordList = [...this.recordList, ...res.data.list];
if(res.data.list.length>=15) this.where.page++;
}
})
},
/**
* 选择金额
*/
picCharge(idx, item) {
this.activePic = idx;
if (item === undefined) {
this.rechar_id = '0';
this.numberPic = "";
this.otherValue = ''
} else {
this.otherValue = '其他'
this.total = "";
this.rechar_id = item.id.toString();
this.numberPic = item.data.price;
}
},
/**
* 充值额度选择
*/
getRecharge() {
getRechargeApi()
.then(res => {
this.picList = res.data.recharge_quota;
if (this.picList[0]) {
this.rechar_id = this.picList[0].id.toString();
this.numberPic = this.picList[0].data.price;
}
this.rechargeAttention = res.data.recharge_attention || [];
})
.catch(res => {
this.$dialog.toast({
mes: res
});
});
},
onLoadFun: function() {
this.isShowAuth = false;
this.getUserInfo();
this.getRecharge();
},
//
authColse: function(e) {
this.isShowAuth = e
},
navRecharges: function(index) {
this.active = index;
},
/**
* 获取用户信息
*/
getUserInfo: function() {
let that = this;
spreadInfo().then(res => {
that.$set(that, 'userInfo', res.data);
})
},
payClose: function() {
this.pay_close = false;
},
payCheck: function(type) {
this.createOrder(type);
},
/*
* 用户充值
*/
submitSub: function(e) {
let that = this
let value = this.total;
//
if (that.active) {
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
return that.$util.Tips({
title: '请输入金额'
});
}
uni.showModal({
title: '转入余额',
content: '转入余额后无法再次转出,确认是否转入余额',
success(res) {
if (res.confirm) {
rechargeBrokerage({
brokerage: parseFloat(value),
}).then(res => {
// that.$set(that, 'userInfo.now_money', that.$util.$h.Add(value, that.userInfo.now_money))
uni.showToast({
icon:'success',
title:'转入成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: '/pages/users/user_money/index'
// });
}).catch(err => {
return that.$util.Tips({
title: err
})
});
} else if (res.cancel) {
return that.$util.Tips({
title: '已取消'
});
}
},
})
} else {
if (this.rechar_id == 0) {
if (parseFloat(that.total)=== 0) {
return that.$util.Tips({
title: '充值金额金额不能为0'
});
}
if (!that.total) {
return that.$util.Tips({
title: '请填写充值金额!'
});
}
if (!Number(that.total)) {
return that.$util.Tips({
title: '请填写正确的金额!'
});
}
}
this.pay_close = true
}
},
createOrder(type) {
let that = this;
let query = {
price: that.rechar_id == 0 ? that.total : that.numberPic,
recharge_id: that.rechar_id,
type: type,
// #ifdef H5
return_url: location.port ? location.protocol + '//' + location.hostname + ':' + location.port +
'/pages/users/user_money/money' : location.protocol + '//' + location.hostname +
'/pages/users/user_money/money'
// #endif
};
// #ifdef MP
// openPaySubscribe().then(() => {
rechargeWechat(query).then(res => {
that.callPay(res);
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
});
});
// });
// #endif
// #ifndef MP
rechargeWechat(query).then(res => {
console.log('res', res);
that.callPay(res);
}).catch(err => {
console.log('err', err);
uni.showToast({
title: err,
icon: 'none'
});
});
// #endif
},
//
callPay(res) {
let that = this, status = res.data.type,
orderId = res.data.recharge_id,
callback_key = res.data.pay_key,
jsConfig = res.data.config,
goPages = '/pages/users/user_money/money';
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
case 'PAY_ERROR':
case 'error':
uni.hideLoading();
Toast(res.message)
// return that.$util.Tips({
// title: res.message
// }, {
// tab: 5,
// url: goPages
// });
break;
case 'success':
uni.hideLoading();
uni.showToast({
icon:'success',
title:res.message
})
// if (that.seckillId)
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 4,
// url: goPages
// });
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
break;
case 'alipay':
case "alipayQr":
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig+'&type=10'
})
return;
break;
// #ifndef MP
case "wechat":
case "weixin":
case "weixinApp":
jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => {
uni.showToast({
icon:'success',
title:res.message
})
// return that.$util.Tips({
// title: res.message,
// icon: 'success'
// }, {
// tab: 4,
// url: goPages
// });
}).catch(res => {
uni.showToast({
icon:'success',
title: '取消支付'
})
// if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: goPages
// });
})
// #endif
// #ifdef APP-PLUS
let mp_pay_name=''
if(uni.requestOrderPayment){
mp_pay_name='requestOrderPayment'
}else{
mp_pay_name='requestPayment'
}
uni[mp_pay_name]({
provider: 'wxpay',
orderInfo: jsConfig,
success: (e) => {
this.getUserInfo()
uni.showToast({
icon: 'success',
title: '支付成功'
})
// let url = '/pages/users/user_money/money';
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 4,
// url: url
// });
},
fail: (e) => {
console.log(e);
uni.showModal({
content: "支付失败",
showCancel: false,
success: function(res) {
}
})
},
complete: () => {
uni.hideLoading();
},
});
// #endif
break;
// #endif
// #ifdef MP
case "routine":
jsConfig.timeStamp = jsConfig.timestamp;
let mp_pay_name=''
if(uni.requestOrderPayment){
mp_pay_name='requestOrderPayment'
}else{
mp_pay_name='requestPayment'
}
uni[mp_pay_name]({
...jsConfig,
success: function(res) {
uni.hideLoading();
that.getUserInfo();
that.getRecharge();
// console.log('12323424')
uni.showToast({
icon:'success',
title:'支付成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
},
fail: function(e) {
uni.hideLoading();
Toast('取消支付')
// return that.$util.Tips({
// title: ''
// }, {
// tab: 5,
// url: goPages
// });
},
})
break;
// #endif
case "balance":
uni.hideLoading();
//
Toast(res.msg)
// return that.$util.Tips({
// title: res.msg
// }, {
// tab: 5,
// url: goPages
// });
break;
// #ifdef H5
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let url = `${host}/pages/users/user_money/money`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}`
setTimeout(() => {
location.href = locations;
}, 100);
break;
// #endif
// #ifdef APP-PLUS
case 'alipayApp':
uni.requestPayment({
provider: 'alipay',
orderInfo: jsConfig,
success: (e) => {
this.getUserInfo()
uni.showToast({
icon:'success',
title:'支付成功'
})
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: goPages
// });
},
fail: (e) => {
uni.showModal({
content: "支付失败",
showCancel: false,
success: function(res) {
uni.redirectTo({
url: goPages
})
}
})
},
complete: () => {
uni.hideLoading();
},
});
break;
// #endif
}
},
onChangeFun: function(e) {
let opt = e;
let action = opt.action || null;
let value = opt.value != undefined ? opt.value : null;
action && this[action] && this[action](value);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.m_body {
.head_card {
position: relative;
height: 430rpx;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: #fff;
.card_img {
width: 724rpx;
height: 362rpx;
position: relative;
.image {
width: 100%;
height: 100%;
}
.c_content {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 110rpx 60rpx;
color: #fff;
display: flex;
flex-direction: column;
justify-content: space-around;
.c_title {
font-size: 32rpx;
}
.c_count {
font-size: 50rpx;
font-weight: bold;
.c_icon {
font-size: 32rpx;
}
}
}
}
.c_tab {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 130rpx;
padding: 20rpx 0;
background-color: #fff;
border-radius: 60rpx 60rpx 0 0;
}
}
.body_card {
color: #333;
.card1 {
background-color: #fff;
.change_list {
width: 720rpx;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
.change_item {
width: 220rpx;
margin: 10rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background-color: #f7f7f7;
border-radius: 20rpx 20rpx 20rpx 20rpx;
font-size: 40rpx;
.c_icon {
font-size: 28rpx;
}
}
.change_item_active {
background: rgba(#FF8056, 0.2);
border: 5rpx solid #FF8056;
color: #FF8056;
}
}
.change_count {
width: 700rpx;
margin: 0 auto;
border-radius: 20rpx;
border: 5rpx solid #FF8056;
color: #FF8056;
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 30rpx;
margin-top: 30rpx;
margin-bottom: 50rpx;
.c_btn {
display: flex;
view {
height: 80rpx;
width: 60rpx;
text-align: center;
line-height: 80rpx;
}
}
}
.c_tips {
width: 700rpx;
margin: 0 auto;
font-size: 26rpx;
color: #616161;
padding-bottom: 30rpx;
.tips_title {
font-size: 30rpx;
}
}
}
.card2 {
background-color: #fff;
.record {
display: flex;
justify-content: space-between;
align-items: center;
padding: 26rpx 20rpx;
border-bottom: 1rpx solid #f7f7f7;
.left {
display: flex;
image {
height: 76rpx;
width: 76rpx;
margin-right: 20rpx;
}
.tips {
font-size: 26rpx;
color: #616161;
}
}
.right {
font-size: 36rpx;
}
}
.no_data{
padding: 60rpx 0;
text-align: center;
border-top: 1rpx solid #f7f7f7;
color: #999;
font-size: 26rpx;
}
}
}
.footer {
position: fixed;
left: 0;
bottom: 0;
height: 120rpx;
width: 100vw;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20rpx;
.f_tip {
display: flex;
align-items: flex-end;
font-style: 26rpx;
.price {
color: #FF8056;
text {
font-size: 44rpx;
margin-left: 20rpx;
margin-right: 5rpx;
}
}
}
.primary_btn {
background-color: #fa8147;
height: 80rpx;
border-radius: 80rpx;
width: 180rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
}
}
</style>

View File

@ -26,7 +26,7 @@
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <home></home> -->
<home></home>
</view>
</template>

View File

@ -33,7 +33,7 @@
<!-- #ifdef MP -->
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<!-- <home></home> -->
<home></home>
<view class="qrimg">
<zb-code ref="qrcode" :show="codeShow" :cid="cid" :val="val" :size="size" :unit="unit" :background="background"
:foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconsize" :onval="onval" :loadMake="loadMake"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Some files were not shown because too many files have changed in this diff Show More