Compare commits
5 Commits
master
...
old_master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
623dee9859 | ||
![]() |
ace704210b | ||
![]() |
23e0d533d4 | ||
![]() |
232f7710bd | ||
bb6a3b207b |
33
App.vue
33
App.vue
@ -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小程序发送的事件以及其他操作
|
||||
@ -168,7 +161,7 @@
|
||||
jpushModule.initJPushService()
|
||||
jpushModule.addConnectEventListener(result => {
|
||||
let connectEnable = result.connectEnable
|
||||
// console.log("jpush连接", connectEnable)
|
||||
console.log("jpush连接", connectEnable)
|
||||
})
|
||||
|
||||
|
||||
@ -226,6 +219,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
onShow() {
|
||||
|
||||
@ -356,9 +350,9 @@
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 微信分享;
|
||||
setOpenShare: function(data) {
|
||||
// #ifdef H5
|
||||
let that = this;
|
||||
let href = location.href;
|
||||
href = href.indexOf("?") === -1 ? href + "?spid=" + this.globalData.uid : href + "&spid=" + this
|
||||
@ -374,7 +368,6 @@
|
||||
that.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
|
||||
configAppMessage);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
// 获取配置
|
||||
getConfigData() {
|
||||
@ -426,7 +419,7 @@
|
||||
this.setOpenShare(res.data);
|
||||
// #endif
|
||||
}).catch(err => {});
|
||||
},
|
||||
}
|
||||
},
|
||||
onHide: function() {
|
||||
//console.log('App Hide')
|
||||
@ -434,14 +427,12 @@
|
||||
watch: {
|
||||
// 记录H5和公众号
|
||||
$route(n) {
|
||||
// #ifdef H5
|
||||
if (this.$store.state.app.token) {
|
||||
// 浏览记录
|
||||
history({
|
||||
page: location.pathname + location.search,
|
||||
}).then(() => {});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
15
api/api.js
15
api/api.js
@ -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 });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取云仓分类
|
||||
*
|
||||
@ -302,20 +293,20 @@ export function brigade(data) {
|
||||
}
|
||||
|
||||
/*
|
||||
生产 -- 获取商户押金信息支付接口
|
||||
生产 -- 获取商户保证金信息支付接口
|
||||
*/
|
||||
export function paymerchant() {
|
||||
return request.post(`user/margin`,{});
|
||||
}
|
||||
|
||||
/*
|
||||
生产 -- 获取商户押金信息接口
|
||||
生产 -- 获取商户保证金信息接口
|
||||
*/
|
||||
export function merchant(data) {
|
||||
return request.get(`store/merchant/margin`, data);
|
||||
}
|
||||
|
||||
//获取押金缴纳列表
|
||||
//获取保证金缴纳列表
|
||||
export function marginlist(data) {
|
||||
return request.get(`user/margin/list`,data);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ export function getfocuslst(data) {
|
||||
|
||||
//关注我的人
|
||||
export function getfanslst(data) {
|
||||
return requesta.get('community/fans/lst',data);
|
||||
return requesta.post('community/fans/lst',data);
|
||||
}
|
||||
|
||||
//用户送礼
|
||||
@ -121,13 +121,6 @@ export function sendGift(data) {
|
||||
return request.post('zhibo/sendGift',data);
|
||||
}
|
||||
|
||||
|
||||
//获取主播关注人数
|
||||
export function fansNum(data) {
|
||||
return requesta.get('zhibo/fansNum',data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 充值金额选择
|
||||
*/
|
||||
|
@ -320,4 +320,4 @@ export function intention(data) {
|
||||
*/
|
||||
export function intentionbus(data) {
|
||||
return request.post(`intention/business`, data);
|
||||
}
|
||||
}
|
@ -141,12 +141,4 @@ export function getNavigation(data) {
|
||||
return request.get("navigation", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
小程序 -- 小程序列表
|
||||
*/
|
||||
export function applet(data) {
|
||||
return request.get(`applet`, data);
|
||||
}
|
@ -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 {*}
|
||||
|
26
api/store.js
26
api/store.js
@ -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
|
||||
});
|
||||
}
|
@ -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)
|
||||
}
|
@ -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>
|
@ -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>
|
||||
|
@ -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: [], // 下标0和1分别为左列和右列高度
|
||||
};
|
||||
},
|
||||
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>
|
@ -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'">
|
||||
|
@ -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;
|
||||
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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) {
|
||||
|
@ -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>
|
||||
|
@ -19,7 +19,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -1,183 +0,0 @@
|
||||
<template>
|
||||
<view class="msg-view">
|
||||
<scroll-view class="msg-view-p" scroll-y="true" :scroll-top="msgPanelScrollTop">
|
||||
<view id="chatArea">
|
||||
<view class="chat-area-line" v-for="(item,index) in msgList">
|
||||
|
||||
<view class="system-msg"
|
||||
:style="{'flex-direction':((item.userName.length + item.content.length)<15?'row':'')}"
|
||||
v-if="item.msg_type == 'system'">
|
||||
<view class="system-msg-detail ">
|
||||
<text class="system-msg-detail-username " v-for="i in item.userName">{{i}}</text>
|
||||
<text class="system-msg-detail-content " v-for="i in ':'">{{i}}</text>
|
||||
<text class="system-msg-detail-content " v-for="i in item.content">{{i}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="user-msg"
|
||||
:style="{'flex-direction':((item.userName.length + item.content.length)<15?'row':'')}" v-else>
|
||||
|
||||
<view class="user-msg-detail">
|
||||
<view class="user-msg-detail-tag">
|
||||
<!-- <text style="text-align: center;font-size: 20px;color: #DD524D;">★1</text> -->
|
||||
<!-- 这里可以根据用户等级显示图片 -->
|
||||
<image :src="item.avatar" class="user-msg-detail-tag"></image>
|
||||
</view>
|
||||
<text class="user-msg-detail-username" v-for="i in item.userName"
|
||||
@click="test(item.userName)">{{i}}</text>
|
||||
<text class="user-msg-detail-content" v-for="i in ':'">{{i}}</text>
|
||||
<text class="user-msg-detail-content" v-for="i in item.content">{{i}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'MhMsgList',
|
||||
props: {
|
||||
msgList: {
|
||||
type: [Object, Array],
|
||||
default: [{
|
||||
userName: "系统通知",
|
||||
content: "直播倡导绿色直播,严禁发布涉黄涉毒涉赌,严禁发布涉政、违法及低俗违规内容。健康直播,文明互动",
|
||||
cmd: "say",
|
||||
|
||||
msg_type: "system"
|
||||
}, ]
|
||||
},
|
||||
msgPanelScrollTop: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
test(e) {
|
||||
uni.showToast({
|
||||
title: e,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
|
||||
setMsgPanelScroll() {
|
||||
var that = this;
|
||||
setTimeout(function() {
|
||||
const query = uni.createSelectorQuery().in(that);
|
||||
query.select('#chatArea').boundingClientRect(data => {
|
||||
that.msgPanelScrollTop = data.height - 200;
|
||||
}).exec();
|
||||
}, 50)
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.msg-view-p {
|
||||
display: flex;
|
||||
width: 550rpx;
|
||||
height: 550rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.chat-area-line {
|
||||
width: 550upx;
|
||||
|
||||
flex-direction: row;
|
||||
margin-bottom: 5upx;
|
||||
}
|
||||
|
||||
.system-msg {
|
||||
width: 550upx;
|
||||
margin-bottom: 5upx;
|
||||
}
|
||||
|
||||
.system-msg-detail {
|
||||
// max-width: 550upx;
|
||||
|
||||
padding: 10upx;
|
||||
border-radius: 30upx;
|
||||
background-color: rgba($color: #000000, $alpha: 0.4);
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin-right: 14upx;
|
||||
|
||||
>.system-msg-detail-username {
|
||||
color: red;
|
||||
font-size: 32upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
|
||||
}
|
||||
|
||||
>.system-msg-detail-content {
|
||||
font-size: 32upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
color: #A0CFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.user-line {
|
||||
// max-width: 530upx;
|
||||
padding: 10upx;
|
||||
color: #FFFFFF;
|
||||
flex-direction: row;
|
||||
border-radius: 30upx;
|
||||
background-color: rgba($color: #000000, $alpha: 0.4);
|
||||
margin-right: 14upx;
|
||||
font-size: 28upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
}
|
||||
|
||||
.user-msg {
|
||||
width: 530upx;
|
||||
|
||||
|
||||
margin-bottom: 5upx;
|
||||
}
|
||||
|
||||
.user-msg-detail-tag {
|
||||
width: 40upx;
|
||||
height: 40upx;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
|
||||
.user-msg-detail {
|
||||
padding: 10upx;
|
||||
border-radius: 30upx;
|
||||
background-color: rgba($color: #000000, $alpha: 0.4);
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin-right: 14upx;
|
||||
|
||||
|
||||
|
||||
>.user-msg-detail-username {
|
||||
color: #A0CFFF;
|
||||
font-size: 32upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
}
|
||||
|
||||
>.user-msg-detail-content {
|
||||
font-size: 32upx;
|
||||
font-weight: 400;
|
||||
line-height: 40upx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="container" >
|
||||
<view class="top-do-box">
|
||||
<view class="room-info">
|
||||
<view class="room-logo-box">
|
||||
@ -14,7 +14,7 @@
|
||||
<text style="color: #fff;font-size: 25rpx;">4000</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="room-guanzhu" @click="interest">
|
||||
<!-- <view class="room-guanzhu" @click="interest">
|
||||
<text class="guanzhu" v-if="!follow">关注</text>
|
||||
<text class="guanzhu" v-else>已关注</text>
|
||||
</view> -->
|
||||
@ -41,7 +41,7 @@
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view class="top-left" v-if="isshow">
|
||||
<!-- <view class="top-left" v-if="isshow">
|
||||
<view class="top-left-a" @click="switchCamera">
|
||||
<image class="left-img" src="/static/img/qiehuan.png" mode=""></image>
|
||||
</view>
|
||||
@ -52,7 +52,7 @@
|
||||
<!-- 底部操作 -->
|
||||
|
||||
|
||||
<!-- <view class="inpit-box-bg" v-if="focus">
|
||||
<!-- <view class="inpit-box-bg" v-if="focus">
|
||||
<view class="inpit-box-body">
|
||||
<input class="uni-input" @input="onKeyInput" maxlength="20" cursor-spacing="10" hold-keyboard
|
||||
placeholder="说点什么吧..." :value="inputValue" :focus="focus" />
|
||||
@ -240,7 +240,7 @@
|
||||
{{join.message}}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
|
||||
<gb-popup :isShow="isShow1" rName="确定" :isBut="false" lName="取消" @lEvent="show1" @rEvent="copyData"
|
||||
title="请输入礼物数量">
|
||||
<view style="padding: 30rpx;">
|
||||
@ -264,15 +264,15 @@
|
||||
getuser,
|
||||
getRechargeApi,
|
||||
sendGift,
|
||||
getAjuser
|
||||
getAjuser
|
||||
} from '@/api/live.js'
|
||||
import {
|
||||
VUE_APP_WS_URL
|
||||
} from '@/config/app.js';
|
||||
} from '@/config/live.js';
|
||||
|
||||
import uniPopup from '@/components/unipopup/live-uni-popup.vue';
|
||||
import msgList from '@/components/mh-msgList/mh-msgList.vue';
|
||||
import gbpopup from '@/components/gb-popup/gb-popup.vue';
|
||||
import gbpopup from '@/components/gb-popup/gb-popup.vue';
|
||||
export default {
|
||||
name: "sd-float-page",
|
||||
props: {
|
||||
@ -340,7 +340,8 @@
|
||||
userinfo: null,
|
||||
hoveredIndex: -1,
|
||||
regIndex: -1,
|
||||
gifts: [],
|
||||
gifts: [
|
||||
],
|
||||
gifsobj: {},
|
||||
gift_num: '',
|
||||
isShow1: false,
|
||||
@ -392,7 +393,7 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
//关注
|
||||
//关注
|
||||
getjuser() {
|
||||
getAjuser(this.userinfo.app_user_id).then((res) => {
|
||||
console.log(res, 'AAAAAA')
|
||||
@ -439,7 +440,7 @@
|
||||
})
|
||||
},
|
||||
//送礼
|
||||
//送礼
|
||||
//送礼
|
||||
|
||||
bosendGift(gif) {
|
||||
// 执行关闭模态对话框的操作
|
||||
@ -940,7 +941,7 @@
|
||||
send_lick: function() {
|
||||
this.sendGift()
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
//礼物弹窗
|
||||
@ -959,23 +960,23 @@
|
||||
console.log(this.gift_num)
|
||||
let gift = {
|
||||
'gift_id': gt.id,
|
||||
|
||||
|
||||
}
|
||||
this.isShow1 = true
|
||||
this.gifsobj = gift
|
||||
|
||||
|
||||
},
|
||||
//对话监听
|
||||
set_focus: function() {
|
||||
this.focus = !this.focus
|
||||
},
|
||||
|
||||
//对话输入监听
|
||||
onKeyInput: function(event) {
|
||||
this.inputValue = event.detail.value
|
||||
|
||||
},
|
||||
|
||||
//对话监听
|
||||
set_focus: function() {
|
||||
this.focus = !this.focus
|
||||
},
|
||||
|
||||
//对话输入监听
|
||||
onKeyInput: function(event) {
|
||||
this.inputValue = event.detail.value
|
||||
|
||||
},
|
||||
|
||||
send_message: function() {
|
||||
const t = this;
|
||||
t.focus = false;
|
||||
@ -1620,8 +1621,7 @@
|
||||
.txtba-b {
|
||||
font-size: 33rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
font-weight: 500;color: #F84221;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
@ -1808,9 +1808,9 @@
|
||||
|
||||
.send-boj-txt {
|
||||
flex: 1;
|
||||
|
||||
|
||||
padding-right: 40rpx;
|
||||
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@ -2049,7 +2049,7 @@
|
||||
border-radius: 50%;
|
||||
margin-right: 10upx;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,48 +1,46 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="" :style="{'height':heightG+'px'}" @click="quanju">
|
||||
<view class="top-do-box">
|
||||
<view class="room-info">
|
||||
<view class="room-logo-box">
|
||||
<image :src="room.cover" class="room-logo-box"></image>
|
||||
<view class="container" >
|
||||
<view class="top-do-box">
|
||||
<view class="room-info">
|
||||
<view class="room-logo-box">
|
||||
<image :src="room.cover" class="room-logo-box"></image>
|
||||
</view>
|
||||
<view class="room-info-message">
|
||||
<view class="room-user-name">
|
||||
<text
|
||||
style="color: #fff;font-size: 25rpx;">{{room.live_name.length>6?room.live_name.substring(0, 6)+'...': room.live_name}}</text>
|
||||
</view>
|
||||
<view class="room-info-message">
|
||||
<view class="room-user-name">
|
||||
<text
|
||||
style="color: #fff;font-size: 25rpx;">{{room.live_name.length>6?room.live_name.substring(0, 6)+'...': room.live_name}}</text>
|
||||
</view>
|
||||
<view class="room-user-money">
|
||||
<text style="color: #fff;font-size: 25rpx;">{{count}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="room-guanzhu" @click="interest">
|
||||
<text class="guanzhu" v-if="!follow">关注</text>
|
||||
<text class="guanzhu" v-else>已关注</text>
|
||||
<view class="room-user-money">
|
||||
<text style="color: #fff;font-size: 25rpx;">4000</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="room-users-box">
|
||||
<scroll-view class="right_top_scroll" scroll-x="true" scroll-left="0">
|
||||
<view class="top-scroll-users-header" v-for="(bitem,bindex) in users" :key="bindex">
|
||||
<image :src="bitem.app_user_avatar" class="top-scroll-users-header"
|
||||
v-if="bitem.app_user_avatar"></image>
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/default_avtar.png"
|
||||
class="top-scroll-users-header" mode="aspectFill"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="users-count web-font">
|
||||
<view class="users-count web-font">
|
||||
<text class="users-count-text"> {{users.length}}</text>
|
||||
</view>
|
||||
<view class="users-count " @click="outroom">
|
||||
<image src="@/static/img/close.png" class="users-count-img" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="room-guanzhu" @click="interest">
|
||||
<text class="guanzhu" v-if="!follow">关注</text>
|
||||
<text class="guanzhu" v-else>已关注</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="room-users-box">
|
||||
<scroll-view class="right_top_scroll" scroll-x="true" scroll-left="0">
|
||||
<view class="top-scroll-users-header" v-for="(bitem,bindex) in users" :key="bindex">
|
||||
<image :src="bitem.app_user_avatar" class="top-scroll-users-header"
|
||||
v-if="bitem.app_user_avatar"></image>
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/default_avtar.png"
|
||||
class="top-scroll-users-header" mode="aspectFill"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="users-count web-font">
|
||||
<view class="users-count web-font">
|
||||
<text class="users-count-text"> {{users.length}}</text>
|
||||
</view>
|
||||
<view class="users-count " @click="outroom">
|
||||
<image src="@/static/img/close.png" class="users-count-img" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="top-left" v-if="isshow">
|
||||
<view class="top-left-a" @click="switchCamera">
|
||||
<image class="left-img" src="/static/img/qiehuan.png" mode=""></image>
|
||||
@ -78,7 +76,7 @@
|
||||
<image class="ico-box-img" src="@/static/img/shanpin.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="ico-box" @click="send_lick">
|
||||
<image class="ico-box-img" src="@/static/img/jl.png"></image>
|
||||
<image class="ico-box-img" src="@/static/img/gn.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -242,46 +240,7 @@
|
||||
{{join.message}}
|
||||
</text>
|
||||
</view>
|
||||
<uni-popup ref="giftrecord" :type="type" :custom="true" @change="change">
|
||||
<view class="uni-record" >
|
||||
<view class="uni-record-top">
|
||||
<view class="uni-record-top-img" @click="closezb">
|
||||
<image class="uni-record-top-img" src="@/static/img/you.png" mode=""></image>
|
||||
</view>
|
||||
<view class="uni-record-top-text">
|
||||
<text class="uni-record-top-text">礼物记录</text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y :style="{'height':380+'px','overflow':'hidden'}">
|
||||
<view class="uni-record-content" v-for="(item,m) in recordlist" :key="m">
|
||||
<view class="record-content-one">
|
||||
<view class="content-onea">
|
||||
<text class="content-onea">{{item.create_time}}</text>
|
||||
</view>
|
||||
|
||||
<view class="content-oneb">
|
||||
<image src="@/static/img/jb.png" class="content-oneb-img" mode="aspectFit">
|
||||
</image>
|
||||
<text class="content-oneb-txt" v-if='!isshow'>-{{item.amount}}</text>
|
||||
<text class="content-oneb-txt" v-else>+{{item.amount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-content-two">
|
||||
<view class="content-twoa">
|
||||
<image class="content-twoa-img" src="@/static/missing-face.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="content-twoa-txt">{{item.nickname}}</text>
|
||||
</view>
|
||||
<view class="content-twob">
|
||||
<text class="content-twob-txt"
|
||||
v-if='!isshow'>给主播赠送{{item.gift_id}}个{{item.gift_name}}</text>
|
||||
<text class="content-twob-txt" v-else>主播收到{{item.gift_id}}个{{item.gift_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<gb-popup :isShow="isShow1" rName="确定" :isBut="false" lName="取消" @lEvent="show1" @rEvent="copyData"
|
||||
title="请输入礼物数量">
|
||||
<view style="padding: 30rpx;">
|
||||
@ -305,17 +264,15 @@
|
||||
getuser,
|
||||
getRechargeApi,
|
||||
sendGift,
|
||||
getAjuser,
|
||||
getfanslst,
|
||||
fansNum
|
||||
getAjuser
|
||||
} from '@/api/live.js'
|
||||
import {
|
||||
VUE_APP_WS_URL_ONE
|
||||
} from '@/config/app.js';
|
||||
VUE_APP_WS_URL
|
||||
} from '@/config/live.js';
|
||||
|
||||
import uniPopup from '@/components/unipopup/live-uni-popup.vue';
|
||||
import msgList from '@/components/mh-msgList/mh-msgList.vue';
|
||||
import gbpopup from '@/components/gb-popup/gb-popup.vue';
|
||||
import gbpopup from '@/components/gb-popup/gb-popup.vue';
|
||||
export default {
|
||||
name: "sd-float-page",
|
||||
props: {
|
||||
@ -329,11 +286,7 @@
|
||||
},
|
||||
room: {
|
||||
type: Object,
|
||||
},
|
||||
heightG: {
|
||||
type: String,
|
||||
default: '750'
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
uniPopup,
|
||||
@ -365,7 +318,6 @@
|
||||
message_arr: [
|
||||
|
||||
],
|
||||
recordlist:[],
|
||||
msgList: [{
|
||||
userName: "系统通知",
|
||||
content: "倡导绿色直播,严禁发布涉黄涉毒涉赌,严禁发布涉政、违法及低俗违规内容。健康直播,文明互动",
|
||||
@ -388,11 +340,11 @@
|
||||
userinfo: null,
|
||||
hoveredIndex: -1,
|
||||
regIndex: -1,
|
||||
gifts: [],
|
||||
gifts: [
|
||||
],
|
||||
gifsobj: {},
|
||||
gift_num: '',
|
||||
isShow1: false,
|
||||
count:0
|
||||
}
|
||||
/*定义IM消息类型
|
||||
1:进群通知
|
||||
@ -406,6 +358,8 @@
|
||||
|
||||
this.userinfo = JSON.parse(uni.getStorageSync('USER_INFO'))
|
||||
this.getjuser()
|
||||
return
|
||||
// console.log(this.userinfo, '房间id 以及当前用户id')
|
||||
this.get_live_room(); //调用直播间信息
|
||||
this.rewardList()
|
||||
this.giftList()
|
||||
@ -413,9 +367,6 @@
|
||||
this.getuser()
|
||||
this.getRecharg()
|
||||
|
||||
|
||||
// console.log(this.room)
|
||||
|
||||
},
|
||||
onReady() {
|
||||
this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度
|
||||
@ -444,52 +395,22 @@
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
uni.closeSocket({
|
||||
success: function() {
|
||||
console.log('WebSocket连接已关闭')
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log('关闭WebSocket连接失败:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//全局
|
||||
quanju() {
|
||||
this.focus = false;
|
||||
},
|
||||
//关注我的人
|
||||
getfanslst() {
|
||||
getfanslst().then((res) => {
|
||||
if (res.status = 200) {
|
||||
// console.log(res,'aaaaaaaaaa')
|
||||
this.count = res.data.count
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取主播关注人数
|
||||
fansNum(id){
|
||||
fansNum({master_id:id}).then((res=>{
|
||||
// console.log(res,'SSSSSSS')
|
||||
this.count=res.data.fan_num
|
||||
}))
|
||||
},
|
||||
//关注
|
||||
//关注
|
||||
getjuser() {
|
||||
getAjuser(this.room.app_user_id).then((res) => {
|
||||
if (res.status == 200) {
|
||||
this.follow = res.data.is_start
|
||||
}
|
||||
}).catch((err) => {
|
||||
|
||||
}).catch((err)=>{
|
||||
|
||||
})
|
||||
},
|
||||
//获取充值数据
|
||||
getRecharg() {
|
||||
getRechargeApi().then((res) => {
|
||||
|
||||
console.log(res.data.recharge_quota, '11111111')
|
||||
this.Recharglist = res.data.recharge_quota
|
||||
this.Recharglist.push({
|
||||
data: {},
|
||||
@ -501,7 +422,7 @@
|
||||
//获取余额
|
||||
getuser() {
|
||||
getuser().then((res) => {
|
||||
console.log(res.data.now_money)
|
||||
|
||||
this.now_money = res.data.now_money
|
||||
})
|
||||
},
|
||||
@ -518,11 +439,11 @@ console.log(res.data.now_money)
|
||||
//礼物列表
|
||||
rewardList() {
|
||||
rewardList().then((res) => {
|
||||
this.recordlist = res.data.list
|
||||
console.log(res, '11111111')
|
||||
})
|
||||
},
|
||||
//送礼
|
||||
//送礼
|
||||
//送礼
|
||||
|
||||
bosendGift(gif) {
|
||||
// 执行关闭模态对话框的操作
|
||||
@ -532,15 +453,12 @@ console.log(res.data.now_money)
|
||||
live_stream_id: this.room.live_stream_id,
|
||||
gift_num: gif.gift_num,
|
||||
}
|
||||
|
||||
console.log(data)
|
||||
sendGift(data).then((res) => {
|
||||
|
||||
if (res.code == 1) {
|
||||
this.getuser()
|
||||
this.rewardList()
|
||||
this.$refs.share.close()
|
||||
uni.hideModal()
|
||||
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
@ -630,7 +548,7 @@ console.log(res.data.now_money)
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/room/index'
|
||||
url: '/pages/room/room_list'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
@ -644,10 +562,10 @@ console.log(res.data.now_money)
|
||||
//购买商品
|
||||
|
||||
shopp(item) {
|
||||
// console.log(item)
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods_details/index?id=' + item.app_goods_id
|
||||
})
|
||||
uni.sendHostEvent('live_shop', item, (ret) => {
|
||||
//发送消息成功回调
|
||||
console.log('购买商品' + JSON.stringify(item));
|
||||
});
|
||||
},
|
||||
//绑定用户id
|
||||
bindUser(client_id) {
|
||||
@ -669,11 +587,11 @@ console.log(res.data.now_money)
|
||||
|
||||
// 进入这个页面的时候创建websocket连接【整个页面随时使用】
|
||||
connectSocketInit() {
|
||||
console.log(VUE_APP_WS_URL_ONE)
|
||||
console.log(VUE_APP_WS_URL)
|
||||
// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
|
||||
this.socketTask = uni.connectSocket({
|
||||
// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
|
||||
url: VUE_APP_WS_URL_ONE,
|
||||
url: VUE_APP_WS_URL,
|
||||
success(data) {
|
||||
console.log("websocket连接成功", data);
|
||||
},
|
||||
@ -734,7 +652,7 @@ console.log(res.data.now_money)
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/room/index'
|
||||
url: '/pages/room/room_list'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
@ -744,26 +662,15 @@ console.log(res.data.now_money)
|
||||
|
||||
}
|
||||
} else if (obj.type == 'gift_message') {
|
||||
let data1 = {
|
||||
userName: '',
|
||||
content: obj.text + 'X' + obj.gift_num,
|
||||
avatar: obj.app_user_avatar,
|
||||
cmd: "say",
|
||||
msg_type: "user"
|
||||
}
|
||||
this.msgList.push(data1)
|
||||
this.$refs.msgList.setMsgPanelScroll()
|
||||
console.log(obj, '33333')
|
||||
this.sendGift(obj)
|
||||
|
||||
} else if (obj.type == 'audience') {
|
||||
this.liveAudience()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
// 这里仅是事件监听【如果socket关闭了会执行】
|
||||
this.socketTask.onClose(() => {
|
||||
@ -777,8 +684,6 @@ console.log(res.data.now_money)
|
||||
// userAvatar: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/1b716202302251108516996.png",
|
||||
// gift_ico: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/1b716202302251108516996.png",
|
||||
|
||||
gift.top = Math.random() * 200 // 随机生成礼物的位置
|
||||
gift.left = Math.random() * 200 // 随机生成礼物的位置
|
||||
this.giftobj.push(gift);
|
||||
setTimeout(() => {
|
||||
this.giftobj.splice(this.gifts.indexOf(gift), 1); // 礼物消失
|
||||
@ -972,25 +877,9 @@ console.log(res.data.now_money)
|
||||
},
|
||||
//关闭直播间
|
||||
outroom: function() {
|
||||
uni.showModal({
|
||||
title: '提示', // 对话框标题
|
||||
content: '是否确定退出直播间', // 对话框内容
|
||||
showCancel: true, // 是否显示取消按钮,默认为 true
|
||||
cancelText: '取消', // 取消按钮的文字,默认为 "取消"
|
||||
cancelColor: '#000000', // 取消按钮的文本颜色,默认为 "#000000"
|
||||
confirmText: '确定', // 确定按钮的文字,默认为 "确定"
|
||||
confirmColor: '#3CC51F', // 确定按钮的文本颜色,默认为 "#3CC51F"
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/room/index'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击了取消按钮')
|
||||
}
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: '/pages/room/index'
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
get_live_room() {
|
||||
@ -1006,8 +895,6 @@ console.log(res.data.now_money)
|
||||
// console.log(this.room.app_user_id, uni.getStorageSync('user_id'), '房间id 以及当前用户id')
|
||||
if (res.data.app_user_id == uni.getStorageSync('Uid')) {
|
||||
this.isshow = true
|
||||
}else{
|
||||
this.fansNum(res.data.app_user_id)
|
||||
}
|
||||
}
|
||||
this.connectSocketInit()
|
||||
@ -1054,14 +941,10 @@ console.log(res.data.now_money)
|
||||
this.type = 'bottom'
|
||||
t.togglePopup('bottom', 'share');
|
||||
},
|
||||
//关闭
|
||||
closezb() {
|
||||
this.$refs['giftrecord'].close()
|
||||
},
|
||||
send_lick: function() {
|
||||
// this.sendGift()
|
||||
this.sendGift()
|
||||
|
||||
this.$refs['giftrecord'].open()
|
||||
|
||||
},
|
||||
|
||||
//礼物弹窗
|
||||
@ -1080,23 +963,23 @@ console.log(res.data.now_money)
|
||||
console.log(this.gift_num)
|
||||
let gift = {
|
||||
'gift_id': gt.id,
|
||||
|
||||
|
||||
}
|
||||
this.isShow1 = true
|
||||
this.gifsobj = gift
|
||||
|
||||
|
||||
},
|
||||
//对话监听
|
||||
set_focus: function() {
|
||||
this.focus = !this.focus
|
||||
},
|
||||
|
||||
//对话输入监听
|
||||
onKeyInput: function(event) {
|
||||
this.inputValue = event.detail.value
|
||||
|
||||
},
|
||||
|
||||
//对话监听
|
||||
set_focus: function() {
|
||||
this.focus = !this.focus
|
||||
},
|
||||
|
||||
//对话输入监听
|
||||
onKeyInput: function(event) {
|
||||
this.inputValue = event.detail.value
|
||||
|
||||
},
|
||||
|
||||
send_message: function() {
|
||||
const t = this;
|
||||
t.focus = false;
|
||||
@ -1166,109 +1049,13 @@ console.log(res.data.now_money)
|
||||
width: 100%;
|
||||
/* 设置容器的宽度 */
|
||||
}
|
||||
.uni-record {
|
||||
border-radius: 0;
|
||||
flex: 1;
|
||||
background-color: #F4F4F4 !important;
|
||||
}
|
||||
|
||||
.uni-record-content {
|
||||
height: 177rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 0rpx 28rpx;
|
||||
border-radius: 21rpx 21rpx;
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
|
||||
.uni-record {
|
||||
|
||||
}
|
||||
|
||||
.uni-record-top {
|
||||
margin-top: 60rpx;
|
||||
flex-direction: row;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.uni-record-top-img {
|
||||
width: 59rpx;
|
||||
height: 58rpx;
|
||||
}
|
||||
|
||||
.uni-record-top-text {
|
||||
font-size: 33rpx;
|
||||
color: #000000;
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
|
||||
.record-content-one {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-top: 30rpx;
|
||||
padding-bottom: 14rpx;
|
||||
border-bottom: 1rpx solid #333333;
|
||||
}
|
||||
|
||||
.content-onea {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content-oneb {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.content-oneb-img {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.content-oneb-txt {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
}
|
||||
|
||||
.record-content-two {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding-top: 25rpx;
|
||||
}
|
||||
|
||||
.content-twoa {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.content-twob-txt {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.content-twoa-txt {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.content-twoa-img {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
}
|
||||
.dobox {
|
||||
position: absolute;
|
||||
|
||||
bottom: 0rpx;
|
||||
width: 750rpx;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.inpit-box {
|
||||
@ -1837,8 +1624,7 @@ console.log(res.data.now_money)
|
||||
.txtba-b {
|
||||
font-size: 33rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F84221;
|
||||
font-weight: 500;color: #F84221;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
@ -2025,9 +1811,9 @@ console.log(res.data.now_money)
|
||||
|
||||
.send-boj-txt {
|
||||
flex: 1;
|
||||
|
||||
|
||||
padding-right: 40rpx;
|
||||
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@ -2049,15 +1835,12 @@ console.log(res.data.now_money)
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.gift-alert {
|
||||
// width: 480rpx;
|
||||
width: 430rpx;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
justify-content: space-between;
|
||||
// background-color: green;
|
||||
animation: slideRight 1s linear forwards;
|
||||
z-index: 9999;
|
||||
position: absolute;
|
||||
// animation: slideRight 1s linear forwards;
|
||||
}
|
||||
|
||||
.gift-alerta {
|
||||
@ -2129,12 +1912,13 @@ console.log(res.data.now_money)
|
||||
height: 60upx;
|
||||
|
||||
}
|
||||
|
||||
.send-boj-user-header {
|
||||
width: 63upx;
|
||||
height: 63upx;
|
||||
border-radius: 50%;
|
||||
margin-top: 3rpx;
|
||||
|
||||
margin-top: 0rpx;
|
||||
margin-left: -7rpx;
|
||||
|
||||
}
|
||||
|
||||
@ -2244,10 +2028,9 @@ console.log(res.data.now_money)
|
||||
|
||||
.room-users-box {
|
||||
width: 200rpx;
|
||||
height: 70upx;
|
||||
height: 65upx;
|
||||
|
||||
display: flex;
|
||||
margin-top: 10rpx;
|
||||
|
||||
}
|
||||
|
||||
@ -2256,18 +2039,20 @@ console.log(res.data.now_money)
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
width: 200rpx;
|
||||
height: 75upx;
|
||||
height: 80upx;
|
||||
margin-top: 10rpx;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.top-scroll-users-header {
|
||||
width: 63upx;
|
||||
height: 63upx;
|
||||
width: 60upx;
|
||||
height: 60upx;
|
||||
border-radius: 50%;
|
||||
margin-right: 10upx;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -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>
|
@ -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>
|
@ -1,241 +0,0 @@
|
||||
<template>
|
||||
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
|
||||
<uni-transition :mode-class="['fade']" :styles="maskClass" :show="showTrans" @click="onTap" />
|
||||
<uni-transition :mode-class="ani" :styles="transClass" :show="showTrans" @click="onTap">
|
||||
<view class="uni-popup__wrapper-box" @click.stop="clear">
|
||||
<slot />
|
||||
</view>
|
||||
</uni-transition>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
|
||||
|
||||
props: {
|
||||
// 开启动画
|
||||
animation: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
|
||||
type: {
|
||||
type: String,
|
||||
default: 'center'
|
||||
},
|
||||
// maskClick
|
||||
maskClick: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ani: [],
|
||||
showPopup: false,
|
||||
showTrans: false,
|
||||
maskClass: {
|
||||
'position': 'fixed',
|
||||
'bottom': 0,
|
||||
'top': 0,
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'backgroundColor': 'rgba(0, 0, 0, 0)'
|
||||
},
|
||||
transClass: {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler: function(newVal) {
|
||||
switch (this.type) {
|
||||
case 'top':
|
||||
this.ani = ['slide-top']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
}
|
||||
break
|
||||
case 'bottom':
|
||||
this.ani = ['slide-bottom']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'bottom': 0
|
||||
}
|
||||
console.log('直播调用弹窗')
|
||||
break
|
||||
case 'center':
|
||||
this.ani = ['zoom-out', 'fade']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
/* #ifndef APP-NVUE */
|
||||
'display': 'flex',
|
||||
'flexDirection': 'column',
|
||||
/* #endif */
|
||||
'bottom': 0,
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'top': 0,
|
||||
'justifyContent': 'center',
|
||||
'alignItems': 'center'
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
clear(e) {
|
||||
// TODO nvue 取消冒泡
|
||||
e.stopPropagation()
|
||||
},
|
||||
open() {
|
||||
this.showPopup = true
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.showTrans = true
|
||||
}, 0);
|
||||
})
|
||||
this.$emit('change', {
|
||||
show: true
|
||||
})
|
||||
},
|
||||
close(type) {
|
||||
this.showTrans = false
|
||||
this.$nextTick(() => {
|
||||
clearTimeout(this.timer)
|
||||
this.timer = setTimeout(() => {
|
||||
this.$emit('change', {
|
||||
show: false
|
||||
})
|
||||
this.showPopup = false
|
||||
}, 0)
|
||||
})
|
||||
},
|
||||
onTap() {
|
||||
if (!this.maskClick) return
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.uni-popup {
|
||||
position: fixed;
|
||||
/* #ifdef H5 */
|
||||
top: var(--window-top);
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
top: 0;
|
||||
/* #endif */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
z-index: 99;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-popup__mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.mask-ani {
|
||||
transition-property: opacity;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.uni-top-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-bottom-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-center-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-popup__wrapper {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: translateY(-500px);
|
||||
}
|
||||
|
||||
.bottom {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: translateY(500px);
|
||||
}
|
||||
|
||||
.center {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* #endif */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: scale(1.2);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.uni-popup__wrapper-box {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content-ani {
|
||||
/* transition: transform 0.3s;
|
||||
*/
|
||||
transition-property: transform, opacity;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
|
||||
.uni-top-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.uni-bottom-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.uni-center-content {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
@ -1,241 +0,0 @@
|
||||
<template>
|
||||
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
|
||||
<uni-transition :mode-class="['fade']" :styles="maskClass" :show="showTrans" @click="onTap" />
|
||||
<uni-transition :mode-class="ani" :styles="transClass" :show="showTrans" @click="onTap">
|
||||
<view class="uni-popup__wrapper-box" @click.stop="clear">
|
||||
<slot />
|
||||
</view>
|
||||
</uni-transition>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
|
||||
props: {
|
||||
// 开启动画
|
||||
animation: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
|
||||
type: {
|
||||
type: String,
|
||||
default: 'center'
|
||||
},
|
||||
// maskClick
|
||||
maskClick: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ani: [],
|
||||
showPopup: false,
|
||||
showTrans: false,
|
||||
maskClass: {
|
||||
'position': 'fixed',
|
||||
'bottom': 0,
|
||||
'top': 0,
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'backgroundColor': 'rgba(0, 0, 0, 0.4)'
|
||||
},
|
||||
transClass: {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler: function(newVal) {
|
||||
switch (this.type) {
|
||||
case 'top':
|
||||
this.ani = ['slide-top']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
}
|
||||
break
|
||||
case 'bottom':
|
||||
this.ani = ['slide-bottom']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'bottom': 0
|
||||
}
|
||||
console.log('底部条用')
|
||||
console.log(this.type)
|
||||
break
|
||||
case 'center':
|
||||
this.ani = ['zoom-out', 'fade']
|
||||
this.transClass = {
|
||||
'position': 'fixed',
|
||||
/* #ifndef APP-NVUE */
|
||||
'display': 'flex',
|
||||
'flexDirection': 'column',
|
||||
/* #endif */
|
||||
'bottom': 0,
|
||||
'left': 0,
|
||||
'right': 0,
|
||||
'top': 0,
|
||||
'justifyContent': 'center',
|
||||
'alignItems': 'center'
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
clear(e) {
|
||||
// TODO nvue 取消冒泡
|
||||
e.stopPropagation()
|
||||
},
|
||||
open() {
|
||||
this.showPopup = true
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.showTrans = true
|
||||
}, 50);
|
||||
})
|
||||
this.$emit('change', {
|
||||
show: true
|
||||
})
|
||||
},
|
||||
close(type) {
|
||||
this.showTrans = false
|
||||
this.$nextTick(() => {
|
||||
clearTimeout(this.timer)
|
||||
this.timer = setTimeout(() => {
|
||||
this.$emit('change', {
|
||||
show: false
|
||||
})
|
||||
this.showPopup = false
|
||||
}, 300)
|
||||
})
|
||||
},
|
||||
onTap() {
|
||||
if (!this.maskClick) return
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.uni-popup {
|
||||
position: fixed;
|
||||
/* #ifdef H5 */
|
||||
top: var(--window-top);
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
top: 0;
|
||||
/* #endif */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
z-index: 99;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-popup__mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.mask-ani {
|
||||
transition-property: opacity;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.uni-top-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-bottom-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-center-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.uni-popup__wrapper {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: translateY(-500px);
|
||||
}
|
||||
|
||||
.bottom {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: translateY(500px);
|
||||
}
|
||||
|
||||
.center {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* #endif */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: scale(1.2);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.uni-popup__wrapper-box {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: block;
|
||||
/* #endif */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content-ani {
|
||||
/* transition: transform 0.3s;
|
||||
*/
|
||||
transition-property: transform, opacity;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
|
||||
.uni-top-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.uni-bottom-content {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.uni-center-content {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
@ -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 {
|
||||
@ -289,7 +294,7 @@
|
||||
.search_content {
|
||||
margin: 0 auto;
|
||||
width: 724rpx;
|
||||
height: 64rpx;
|
||||
height: 74rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border-radius: 175rpx;
|
||||
background: #fff;
|
||||
@ -307,8 +312,8 @@
|
||||
.search_btn {
|
||||
color: #fff;
|
||||
width: 105.26rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
height: 52.63rpx;
|
||||
line-height: 52.63rpx;
|
||||
background: #f84221;
|
||||
border-radius: 100px;
|
||||
font-size: 28.07rpx;
|
||||
|
@ -7,9 +7,6 @@ let httpApi
|
||||
let httpApiTwo
|
||||
let httpApiThree
|
||||
let httpApiFour
|
||||
let httpApiFive
|
||||
let httpApiSix
|
||||
let wsApi
|
||||
|
||||
// 在打包之前请检查当前环境是否正确
|
||||
const env = 'dev'; // 开发
|
||||
@ -22,33 +19,26 @@ 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" // 测试
|
||||
httpApiTwo = "https://nk.lihaink.cn"
|
||||
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_one = 'wss://ceshi-zhibo.lihaink.cn/chat_room'
|
||||
// let wsApi = 'ws://192.168.3.20:8324'
|
||||
let wsApi = 'wss://shop.lihaink.cn'
|
||||
|
||||
module.exports = {
|
||||
// 请求域名 格式: https://您的域名
|
||||
@ -58,27 +48,18 @@ module.exports = {
|
||||
HTTP_REQUEST_URL_TWO: httpApiTwo,
|
||||
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
|
||||
|
||||
|
||||
// #ifdef H5
|
||||
//H5接口是浏览器地址
|
||||
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',
|
||||
|
||||
HTTP_REQUEST_URL_FOUR: httpApiFour|| window.location.protocol + "//" + window.location.host,
|
||||
HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host,
|
||||
HTTP_REQUEST_URL_TWO: httpApiTwo || window.location.protocol + "//" + window.location.host,
|
||||
// 聊天长连接地址
|
||||
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',
|
||||
//#ifdef H5
|
||||
|
4
main.js
4
main.js
@ -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();
|
||||
|
@ -2,8 +2,10 @@
|
||||
"name" : "惠农生活",
|
||||
"appid" : "__UNI__3A527D1",
|
||||
"description" : "",
|
||||
"versionName" : "1.8.0",
|
||||
"versionCode" : 180,
|
||||
"versionName" : "1.4.7",
|
||||
"versionCode" : 147,
|
||||
"versionName" : "1.4.7",
|
||||
"versionCode" : 147,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@ -12,11 +14,8 @@
|
||||
"nvueCompiler" : "uni-app",
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||
},
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : false,
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
@ -35,9 +34,7 @@
|
||||
"description" : "uni小程序"
|
||||
},
|
||||
"Maps" : {},
|
||||
"Push" : {},
|
||||
"LivePusher" : {},
|
||||
"Record" : {}
|
||||
"Push" : {}
|
||||
},
|
||||
"safearea" : {
|
||||
"bottom" : {
|
||||
@ -50,8 +47,6 @@
|
||||
"android" : {
|
||||
"resizeableActivity" : true,
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
|
||||
@ -65,17 +60,17 @@
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
|
||||
],
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||
"permissionExternalStorage" : {
|
||||
@ -84,9 +79,7 @@
|
||||
},
|
||||
"permissionPhoneState" : {
|
||||
"request" : "none" //拨打电话权限关闭
|
||||
},
|
||||
"targetSdkVersion" : 30,
|
||||
"minSdkVersion" : 23
|
||||
}
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
@ -96,8 +89,7 @@
|
||||
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
|
||||
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
|
||||
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店",
|
||||
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
|
||||
"NSMicrophoneUsageDescription" : "根据用户录音进行语音识别转文字"
|
||||
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店"
|
||||
},
|
||||
"idfa" : false,
|
||||
"dSYMs" : false
|
||||
@ -107,8 +99,7 @@
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "82af93ec51139c712c4118d84ba684ee",
|
||||
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1",
|
||||
"name" : "amap_18982406440DFVLElaO"
|
||||
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
@ -128,8 +119,7 @@
|
||||
"amap" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appkey_ios" : "82af93ec51139c712c4118d84ba684ee",
|
||||
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1",
|
||||
"name" : "amap_18982406440DFVLElaO"
|
||||
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
|
||||
}
|
||||
},
|
||||
"oauth" : {},
|
||||
@ -169,17 +159,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 +330,8 @@
|
||||
"domain" : "",
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"key" : "275cd3601b1b2d6414f6c988e7911664",
|
||||
"securityJsCode" : "d2d7c56801819e8bdf71b8a71846f235",
|
||||
"serviceHost" : ""
|
||||
"qqmap" : {
|
||||
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
109
package-lock.json
generated
109
package-lock.json
generated
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,5 @@
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
]
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
}
|
367
pages.json
367
pages.json
@ -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
|
||||
//pages数组中第一项表示应用启动页,参考:https://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": {
|
||||
@ -75,27 +64,6 @@
|
||||
"navigationBarTitleText": "购物车"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/room/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "直播列表",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/room/spectator",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "直播间"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path": "pages/room/histroyroom",
|
||||
"style": {
|
||||
"navigationBarTitleText": "历史直播间",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/plant_grass/index",
|
||||
"style": {
|
||||
@ -145,8 +113,15 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付提示"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"path": "pages/supply_chains/supply_chains",
|
||||
"style": {
|
||||
"navigationBarTitleText": "供应",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "pages/moreProject/moreProject",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商户平台",
|
||||
@ -176,142 +151,10 @@
|
||||
"path" : "pages/margin/margin",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText":"缴纳押金",
|
||||
"navigationBarTitleText":"缴纳保证金",
|
||||
"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 +179,6 @@
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
},{
|
||||
"path": "index_v",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP || APP-PLUS
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
// #endif
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
@ -438,17 +272,6 @@
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "supply_chain/supplierB",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#e93323",
|
||||
"navigationStyle": "custom",
|
||||
"onReachBottomDistance": 300
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "supply_chain/suppliers",
|
||||
"style": {
|
||||
@ -503,22 +326,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 +342,6 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
},{
|
||||
"path": "specialty/short_index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "集体店铺",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "specialty/indexa",
|
||||
"style": {
|
||||
@ -668,14 +467,6 @@
|
||||
"navigationBarTitleText": "我的账户"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "user_money/money",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "我的余额",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user_bill/index",
|
||||
"style": {
|
||||
@ -1204,22 +995,8 @@
|
||||
|
||||
"navigationBarTitleText": "商家入驻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "settled/unit",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
|
||||
"navigationBarTitleText": "个人入驻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "applicationRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请记录"
|
||||
}
|
||||
}, {
|
||||
"path": "applicationRecord/unit",
|
||||
"path": "applicationRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请记录"
|
||||
}
|
||||
@ -1840,47 +1617,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": "我的"
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -6,11 +6,10 @@
|
||||
<view class="iconfont icon-xiangzuo"></view>
|
||||
</view>
|
||||
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
|
||||
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
|
||||
:value='sotreParam.keyword' @confirm="searchSubmit"></input>
|
||||
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='sotreParam.keyword'
|
||||
@confirm="searchSubmit"></input>
|
||||
</view>
|
||||
<view v-if="mer_location == 1" style="text-align: right;" class='iconfont search-right'
|
||||
@click='showMaoLocation(latitude,longitude)'>
|
||||
<view v-if="mer_location == 1" style="text-align: right;" class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
|
||||
<view class="iconfont icon-dingwei"></view>
|
||||
<view class="right-text" v-if="recommend_address">
|
||||
{{recommend_address}}
|
||||
@ -20,8 +19,7 @@
|
||||
</view>
|
||||
<view class="nav-wrapper">
|
||||
<view class='nav acea-row row-middle'>
|
||||
<view v-for="item in downMenus" :key="item.key" class='item'
|
||||
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
|
||||
<view v-for="item in downMenus" :key="item.key" class='item' :class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
|
||||
<view>
|
||||
{{item.title}}
|
||||
</view>
|
||||
@ -32,7 +30,7 @@
|
||||
</view>
|
||||
<!-- 店铺 -->
|
||||
<block>
|
||||
<view class="mer-box" v-if="storeList.length > 0">
|
||||
<view class="mer-box"v-if="storeList.length > 0">
|
||||
<view class="mer-item" v-for="(item,index) in storeList" :key='index'>
|
||||
<view class="mer-hd" @click="goStore(item.mer_id)">
|
||||
<image :src="item.mini_banner?item.mini_banner:item.mer_banner"></image>
|
||||
@ -49,8 +47,7 @@
|
||||
{{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="distance" v-if="item.distance" @click.stop="showStoreLocation(item)">
|
||||
<view class="">
|
||||
{{item.distance}}
|
||||
</view>
|
||||
@ -61,9 +58,8 @@
|
||||
</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'
|
||||
v-if="item.recommend.length<=3">
|
||||
<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' v-if="item.recommend.length<=3">
|
||||
<image :src="itemn.image" mode=""></image>
|
||||
<view class="price">
|
||||
<text>¥</text>{{itemn.price}}
|
||||
@ -107,8 +103,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() {
|
||||
@ -191,7 +186,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
downMenus: function() {
|
||||
@ -208,7 +203,7 @@
|
||||
onLoad: function(options) {
|
||||
this.mer_id = options.mer_id;
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
// 打开地图
|
||||
showMaoLocation(lat, long) {
|
||||
// console.log(lat, long)
|
||||
@ -220,11 +215,11 @@
|
||||
this.$wechat.seeLocation({
|
||||
latitude: Number(lat),
|
||||
longitude: Number(long)
|
||||
}).then(res => {
|
||||
}).then(res=>{
|
||||
// console.log('success');
|
||||
})
|
||||
} else {
|
||||
//#endif
|
||||
}else{
|
||||
//#endif
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(lat),
|
||||
longitude: parseFloat(long),
|
||||
@ -233,7 +228,7 @@
|
||||
// console.log(res)
|
||||
},
|
||||
});
|
||||
// #ifdef H5
|
||||
// #ifdef H5
|
||||
}
|
||||
//#endif
|
||||
},
|
||||
@ -248,33 +243,31 @@
|
||||
latitude: Number(item.lat),
|
||||
longitude: Number(item.long),
|
||||
name: item.mer_name,
|
||||
address: item.mer_address ? item.mer_address : '',
|
||||
}).then(res => {
|
||||
address: item.mer_address ? item.mer_address: '',
|
||||
}).then(res=>{
|
||||
// console.log('success');
|
||||
})
|
||||
} else {
|
||||
//#endif
|
||||
}else{
|
||||
//#endif
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(item.lat),
|
||||
longitude: parseFloat(item.long),
|
||||
scale: 8,
|
||||
name: item.mer_name,
|
||||
address: item.mer_address ? item.mer_address : '',
|
||||
address: item.mer_address ? item.mer_address: '',
|
||||
success: function(res) {
|
||||
// console.log(res)
|
||||
},
|
||||
});
|
||||
// #ifdef H5
|
||||
// #ifdef H5
|
||||
}
|
||||
//#endif
|
||||
},
|
||||
selfLocation() {
|
||||
let self = this
|
||||
if (uni.getStorageSync('RejectTarget')) return
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: (res) => {
|
||||
res = wgsToGcj(res);
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
@ -286,9 +279,8 @@
|
||||
}).then(res => {
|
||||
// console.log(res)
|
||||
this.detaile_address = res.data.address;
|
||||
this.recommend_address = res.data.address.length > 4 ? res.data.address
|
||||
.slice(0, 4) + '...' : res.data.address
|
||||
uni.setStorageSync('adress_location', res.data.address)
|
||||
this.recommend_address = res.data.address.length > 4 ? res.data.address.slice(0,4) + '...' : res.data.address
|
||||
uni.setStorageSync('adress_location',res.data.address)
|
||||
})
|
||||
},
|
||||
fail: (res) => {
|
||||
@ -387,7 +379,6 @@
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
background: var(--view-theme);
|
||||
|
||||
.search-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -396,7 +387,6 @@
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.right-text {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@ -407,14 +397,12 @@
|
||||
color: #fff;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.icon-xiangyou,
|
||||
.icon-dingwei {
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.productList .search .back {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -426,7 +414,6 @@
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.productList .search .input {
|
||||
flex: 1;
|
||||
// width: 540rpx;
|
||||
@ -436,23 +423,19 @@
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.productList .search .input input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
font-size: 26rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.productList .search .input .placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.productList .search .input .iconfont {
|
||||
font-size: 35rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.productList .search .icon-pailie,
|
||||
.productList .search .icon-tupianpailie {
|
||||
color: #fff;
|
||||
@ -461,7 +444,6 @@
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
}
|
||||
|
||||
.productList .nav-wrapper {
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
@ -470,11 +452,9 @@
|
||||
width: 100%;
|
||||
margin-top: 86rpx;
|
||||
background-color: $theme-color;
|
||||
|
||||
.tab-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tab-item {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
@ -485,7 +465,6 @@
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
|
||||
&::after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
@ -496,7 +475,6 @@
|
||||
background: transparent;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
&.on {
|
||||
&::after {
|
||||
background: #fff;
|
||||
@ -505,7 +483,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.productList .nav {
|
||||
height: 86rpx;
|
||||
color: #454545;
|
||||
@ -515,7 +492,6 @@
|
||||
justify-content: space-between;
|
||||
padding: 0 28rpx;
|
||||
}
|
||||
|
||||
.productList .nav .item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -524,12 +500,10 @@
|
||||
color: #FFFFFF;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.productList .nav .item.font-colors {
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.productList .nav .item .font-line {
|
||||
height: 4rpx;
|
||||
background-color: #fff;
|
||||
@ -543,32 +517,26 @@
|
||||
-o-animation: line 0.3s;
|
||||
/* Opera */
|
||||
}
|
||||
|
||||
@keyframes line {
|
||||
from {
|
||||
width: 0rpx;
|
||||
}
|
||||
|
||||
to {
|
||||
width: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.productList .nav .item image {
|
||||
width: 15rpx;
|
||||
height: 19rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.mer-box {
|
||||
padding: 20rpx 20rpx;
|
||||
margin-top: 168rpx;
|
||||
|
||||
.mer-item {
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.mer-hd {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@ -576,12 +544,10 @@
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mer-name {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
@ -589,7 +555,6 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10rpx;
|
||||
|
||||
image {
|
||||
width: 79rpx;
|
||||
height: 79rpx;
|
||||
@ -597,7 +562,6 @@
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.mer-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -605,7 +569,6 @@
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 6rpx;
|
||||
|
||||
.font-bg-red {
|
||||
margin-left: 20rpx;
|
||||
font-size: 18rpx;
|
||||
@ -616,72 +579,60 @@
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.mer-btn {
|
||||
color: rgba($color: #fff, $alpha: 0.7);
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 2rpx;
|
||||
height: 18rpx;
|
||||
color: rgba($color: #fff, $alpha: 0.7);
|
||||
margin: 0 12rpx;
|
||||
}
|
||||
|
||||
.distance {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: rgba($color: #fff, $alpha: 0.7);
|
||||
|
||||
.iconfont {
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.txt {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pro-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 20rpx 30rpx;
|
||||
|
||||
.pro-item {
|
||||
width: 218rpx;
|
||||
margin-right: 14rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 214rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
margin-top: 5rpx;
|
||||
font-size: 28rpx;
|
||||
color: var(--view-priceColor);
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.more-shop {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -702,7 +653,6 @@
|
||||
background-color: #fff;
|
||||
padding-bottom: calc(100% - 40rpx);
|
||||
padding-top: 200rpx;
|
||||
|
||||
.pictrue {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -715,4 +665,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -54,7 +54,7 @@
|
||||
</view>
|
||||
<view class="bottom" @click="navTo('/subpkg/orderDetail/orderDetail')">
|
||||
<view class="item">
|
||||
<view>履约押金额(元)</view>
|
||||
<view>履约保证金额(元)</view>
|
||||
<view class="num" v-show="eyeType">{{
|
||||
userInfo.deposit || 0.0
|
||||
}}</view>
|
||||
|
@ -264,22 +264,14 @@
|
||||
</view>
|
||||
<view class='product-intro' id="past3">
|
||||
<view class='title'>产品介绍</view>
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<jyf-parser v-if="description.type == 0 && typeof description.content == 'string'" :domain='domain'
|
||||
:html="description.content.replace(/<br\/>/ig, '')" ref="article"
|
||||
:tag-style="tagStyle"></jyf-parser>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view v-if="description.type == 0 && typeof description.content == 'string'" class="description"
|
||||
v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<!-- #endif -->
|
||||
<jyf-parser v-if="description.type == 0" :domain='domain' :html="description.content.replace(/<br\/>/ig, '')"
|
||||
ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
<view v-else class="product_content">
|
||||
<view v-if="description.content && description.content.title" class="product_content_title">{{description.content.title}}
|
||||
<view v-if="description.content && description.content.title" class="title">{{description.content.title}}
|
||||
</view>
|
||||
<view v-if="description.content && description.content.image" class="pictures">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item"></image>
|
||||
</view>
|
||||
<block v-if="description.content && description.content.image">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
</image>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
@ -566,23 +558,6 @@
|
||||
}
|
||||
that.$set(that, 'storeInfo', storeInfo);
|
||||
that.$set(that, 'description', storeInfo.content);
|
||||
if(typeof that.description.content == 'string'){
|
||||
try{
|
||||
that.description.content = JSON.parse(that.description.content);
|
||||
}catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
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" '
|
||||
);
|
||||
that.description.content = that.description.content.replace(
|
||||
/<video/gi,
|
||||
'<video style="width:100%;height:300px;display:block" '
|
||||
);
|
||||
}
|
||||
that.$set(that, 'reply', res.data.topReply ? [res.data.topReply] : []);
|
||||
that.$set(that.attr, 'productAttr', res.data.attr);
|
||||
that.$set(that, 'productValue', res.data.sku);
|
||||
@ -633,23 +608,6 @@
|
||||
}
|
||||
that.$set(that, 'storeInfo', storeInfo);
|
||||
that.$set(that, 'description', storeInfo.content);
|
||||
if(typeof that.description.content == 'string'){
|
||||
try{
|
||||
that.description.content = JSON.parse(that.description.content);
|
||||
}catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
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" '
|
||||
);
|
||||
that.description.content = that.description.content.replace(
|
||||
/<video/gi,
|
||||
'<video style="width:100%;height:300px;display:block" '
|
||||
);
|
||||
}
|
||||
that.$set(that.description, 'type', storeInfo.content.type || 0);
|
||||
that.$set(that, 'reply', res.data.topReply ? [res.data.topReply] : []);
|
||||
that.$set(that.attr, 'productAttr', res.data.attr);
|
||||
@ -1634,19 +1592,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.product_content{
|
||||
background-color: #fff;
|
||||
&_title{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
line-height: 50rpx;
|
||||
padding: 28rpx;
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
}
|
||||
image{
|
||||
width: 750rpx;
|
||||
// height: 750rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -135,7 +135,7 @@
|
||||
.then(res => {
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id
|
||||
url: '/pages/admin/orderList/index?types=2'+'&mer_id='+self.mer_id
|
||||
});
|
||||
|
||||
})
|
||||
@ -167,7 +167,7 @@
|
||||
this.verify_code = res.resultStr
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id
|
||||
url: '/pages/admin/orderList/index?types=2'+'&mer_id='+self.mer_id
|
||||
});
|
||||
|
||||
// this.codeChange();
|
||||
|
@ -24,8 +24,7 @@
|
||||
<view>积分</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="num">{{ info.level_info.discount ? parseFloat(info.level_info.discount)/10 : '0'}}
|
||||
</view>
|
||||
<view class="num">{{ info.level_info.discount ? parseFloat(info.level_info.discount)/10 : '0'}}</view>
|
||||
<view>折扣</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -33,11 +32,11 @@
|
||||
</view>
|
||||
<view class="qrCode">
|
||||
<view class="header acea-row row-between-wrapper">
|
||||
<view class="title" :class="{'on': codeIndex == index,'onLeft':codeIndex == 1}"
|
||||
v-for="(item, index) in codeList" :key="index" @click="tapCode(index)">{{item.name}}</view>
|
||||
<view class="title" :class="{'on': codeIndex == index,'onLeft':codeIndex == 1}"
|
||||
v-for="(item, index) in codeList" :key="index" @click="tapCode(index)">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="acea-row row-center-wrapper" style="margin-top: 35rpx;">
|
||||
<w-qrcode :options="config.qrc" @generate="hello"></w-qrcode>
|
||||
<w-qrcode :options="config.qrc" @generate="hello"></w-qrcode>
|
||||
</view>
|
||||
</view>
|
||||
<view class="store acea-row row-between-wrapper" v-if="storeList.length">
|
||||
@ -46,18 +45,16 @@
|
||||
附近门店
|
||||
</view>
|
||||
<view class="acea-row" @click="goMap">
|
||||
距 <view class="storeName line1">{{storeList[0].name}}</view> {{storeList[0].range}}km<text
|
||||
class="iconfont icon-gengduo3"></text></view>
|
||||
距 <view class="storeName line1">{{storeList[0].name}}</view> {{storeList[0].range}}km<text class="iconfont icon-gengduo3"></text></view>
|
||||
</view>
|
||||
<home v-if="navigation"></home>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import home from '@/components/home/index.vue'
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
|
||||
import {
|
||||
getlevelInfo,
|
||||
getlevelInfo,
|
||||
getRandCode
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
@ -69,25 +66,25 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
info:{},
|
||||
codeList: [{
|
||||
name: '付款码'
|
||||
name: '付款码'
|
||||
}, {
|
||||
name: '核销码'
|
||||
name: '核销码'
|
||||
}],
|
||||
codeIndex: 0,
|
||||
codeIndex:0,
|
||||
config: {
|
||||
qrc: {
|
||||
code: '',
|
||||
size: 380, // 二维码大小
|
||||
level: 3, //等级 0~4
|
||||
bgColor: '#FFFFFF', //二维码背景色 默认白色
|
||||
border: {
|
||||
color: ['#eee', '#eee'], //边框颜色支持渐变色
|
||||
lineWidth: 1, //边框宽度
|
||||
},
|
||||
color: ['#333', '#333'], //边框颜色支持渐变色
|
||||
}
|
||||
qrc: {
|
||||
code: '',
|
||||
size: 380, // 二维码大小
|
||||
level: 3, //等级 0~4
|
||||
bgColor: '#FFFFFF', //二维码背景色 默认白色
|
||||
border: {
|
||||
color: ['#eee', '#eee'], //边框颜色支持渐变色
|
||||
lineWidth: 1, //边框宽度
|
||||
},
|
||||
color: ['#333', '#333'], //边框颜色支持渐变色
|
||||
}
|
||||
},
|
||||
user_latitude: 0,
|
||||
user_longitude: 0,
|
||||
@ -114,7 +111,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goMap() {
|
||||
goMap(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/store/map/index'
|
||||
})
|
||||
@ -132,11 +129,9 @@
|
||||
})
|
||||
} else {
|
||||
// #endif
|
||||
if (uni.getStorageSync('RejectTarget')) return
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
res = wgsToGcj(res);
|
||||
try {
|
||||
this.user_latitude = res.latitude;
|
||||
this.user_longitude = res.longitude;
|
||||
@ -172,96 +167,90 @@
|
||||
});
|
||||
},
|
||||
getCode() {
|
||||
getRandCode().then(res => {
|
||||
let code = res.data.code;
|
||||
this.config.qrc.code = code;
|
||||
}).catch(err => {
|
||||
return this.$util.Tips(err);
|
||||
})
|
||||
getRandCode().then(res => {
|
||||
let code = res.data.code;
|
||||
this.config.qrc.code = code;
|
||||
}).catch(err => {
|
||||
return this.$util.Tips(err);
|
||||
})
|
||||
},
|
||||
levelInfo() {
|
||||
getlevelInfo().then(res => {
|
||||
levelInfo(){
|
||||
getlevelInfo().then(res=>{
|
||||
this.info = res.data;
|
||||
}).catch(err => {
|
||||
}).catch(err=>{
|
||||
return this.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
},
|
||||
tapCode(index) {
|
||||
this.codeIndex = index;
|
||||
if (index == 0) {
|
||||
this.getCode();
|
||||
} else {
|
||||
let code = this.info.user.bar_code;
|
||||
this.config.qrc.code = code;
|
||||
}
|
||||
this.codeIndex = index;
|
||||
if (index == 0) {
|
||||
this.getCode();
|
||||
} else {
|
||||
let code = this.info.user.bar_code;
|
||||
this.config.qrc.code = code;
|
||||
}
|
||||
},
|
||||
hello(res) {
|
||||
},
|
||||
hello(res) {},
|
||||
},
|
||||
onReachBottom() {}
|
||||
onReachBottom() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
page{
|
||||
background: linear-gradient(121deg, #F5EBE1 0%, #FFDFBE 100%);
|
||||
}
|
||||
|
||||
.vipGrade {
|
||||
.headerBg {
|
||||
.vipGrade{
|
||||
.headerBg{
|
||||
background: url('../static/big-bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 476rpx;
|
||||
padding-top: 1rpx;
|
||||
|
||||
.header {
|
||||
.header{
|
||||
background: url('../static/grade-bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 690rpx;
|
||||
height: 286rpx;
|
||||
margin: 26rpx auto;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
|
||||
.top {
|
||||
.pictrue {
|
||||
.top{
|
||||
.pictrue{
|
||||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
border: 1px solid #FFFFFF;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
image {
|
||||
image{
|
||||
border-radius: 50%;
|
||||
width: 100%;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
.text{
|
||||
width: 400rpx;
|
||||
|
||||
.name {
|
||||
.nameCon {
|
||||
.name{
|
||||
.nameCon{
|
||||
color: #EDCAAC;
|
||||
font-size: 28rpx;
|
||||
max-width: 332rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.num {
|
||||
.num{
|
||||
border-radius: 4px;
|
||||
border: 1px solid #EDCAAC;
|
||||
background: rgba(215, 177, 144, 0.2);
|
||||
background: rgba(215,177,144,0.2);
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
color: #EDCAAC;
|
||||
padding: 0 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.idNum {
|
||||
.idNum{
|
||||
font-weight: 400;
|
||||
color: #EDCAAC;
|
||||
font-size: 24rpx;
|
||||
@ -270,32 +259,27 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
.list{
|
||||
margin-top: 46rpx;
|
||||
|
||||
.item {
|
||||
.item{
|
||||
color: #EDCAAC;
|
||||
font-size: 22rpx;
|
||||
text-align: center;
|
||||
|
||||
.num {
|
||||
.num{
|
||||
font-size: 40rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.qrCode {
|
||||
.qrCode{
|
||||
width: 690rpx;
|
||||
height: 700rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
margin: -134rpx auto 0 auto;
|
||||
padding-top: 60rpx;
|
||||
|
||||
.header {
|
||||
.header{
|
||||
width: 330rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
@ -303,30 +287,28 @@
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
.title {
|
||||
width: 146rpx;
|
||||
height: 100%;
|
||||
line-height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
padding-right: 20rpx;
|
||||
|
||||
&.onLeft {
|
||||
padding-left: 34rpx;
|
||||
}
|
||||
|
||||
&.on {
|
||||
width: 170rpx;
|
||||
background-color: #333 !important;
|
||||
color: #fff;
|
||||
padding: 0 !important;
|
||||
}
|
||||
width: 146rpx;
|
||||
height: 100%;
|
||||
line-height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
padding-right: 20rpx;
|
||||
|
||||
&.onLeft {
|
||||
padding-left: 34rpx;
|
||||
}
|
||||
|
||||
&.on {
|
||||
width: 170rpx;
|
||||
background-color: #333 !important;
|
||||
color: #fff;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.store {
|
||||
.store{
|
||||
width: 690rpx;
|
||||
height: 100rpx;
|
||||
background: linear-gradient(90deg, #FFAE49 0%, #FCC887 100%);
|
||||
@ -336,20 +318,17 @@
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
||||
.iconfont {
|
||||
.iconfont{
|
||||
margin-right: 20rpx;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.icon-gengduo3 {
|
||||
.icon-gengduo3{
|
||||
font-size: 24rpx;
|
||||
margin-left: 5rpx;
|
||||
margin-right: 0;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.storeName {
|
||||
.storeName{
|
||||
display: inline-block;
|
||||
max-width: 284rpx;
|
||||
vertical-align: middle;
|
||||
|
@ -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 {
|
||||
|
@ -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>
|
||||
|
@ -6,9 +6,9 @@
|
||||
<view class="iconfont icon-xiangzuo"></view>
|
||||
</view>
|
||||
<view class='input acea-row row-between-wrapper'>
|
||||
<text class='iconfont icon-sousuo'></text>
|
||||
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
|
||||
:value='where.keyword' @confirm="searchSubmit" @input="inputChange">
|
||||
<text class='iconfont icon-sousuo'></text>
|
||||
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
|
||||
:value='where.keyword' @confirm="searchSubmit" @input="inputChange">
|
||||
</view>
|
||||
<view style="text-align: right;" v-if="tabIndex==1" class='iconfont'
|
||||
:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
|
||||
@ -21,7 +21,7 @@
|
||||
<view class="tab-item" :class="{on:tabIndex==2}" @click="tabIndex = 2">店铺</view>
|
||||
</view>
|
||||
<block v-if="tabIndex==1">
|
||||
<view class='nav acea-row row-middle'>
|
||||
<view class='nav acea-row row-middle' >
|
||||
<view class='item' @click="downStatus = !downStatus"
|
||||
:class="{'t-color':downKey>0 && firstKey == 0}">
|
||||
{{downMenu[downKey].title}}
|
||||
@ -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>
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
</view>
|
||||
<view class="zhezhao">
|
||||
</view>
|
||||
<view class="zhezhao1" @click="goStore(item.mer_id)">
|
||||
<view class="zhezhao1" @click="goStore(item.mer_id)">
|
||||
<view class="title">
|
||||
<view>{{item.mer_name}}
|
||||
</view>
|
||||
@ -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';
|
||||
@ -475,11 +470,9 @@
|
||||
//获取定位
|
||||
selfLocation() {
|
||||
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();
|
||||
@ -585,7 +578,7 @@
|
||||
this.storeList = this.storeList.concat(res.data.list)
|
||||
this.count = res.data.count
|
||||
this.loading = false
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
// 店铺排序
|
||||
@ -691,7 +684,7 @@
|
||||
},
|
||||
// 组件确定
|
||||
confirm2(data) {
|
||||
|
||||
|
||||
let arr1 = [],
|
||||
arr2 = []
|
||||
if (data.storeTypeArr.length == 0) {
|
||||
@ -783,11 +776,11 @@
|
||||
that.hotScroll = res.data.list.length < that.hotLimit
|
||||
that.hostProduct = that.hostProduct.concat(res.data.list)
|
||||
if (that.hostProduct.length == res.data.count) {
|
||||
|
||||
|
||||
uni.showToast({
|
||||
title: '推荐商品,加载完毕',
|
||||
duration: 2000, // 显示时长,单位为毫秒
|
||||
icon: 'none'
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -829,10 +822,10 @@
|
||||
//查找产品
|
||||
get_product_list: function(isPage) {
|
||||
let that = this;
|
||||
|
||||
|
||||
if (that.loadend) return;
|
||||
if (that.loading) return;
|
||||
|
||||
|
||||
if (isPage === true) that.$set(that, 'productList', []);
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
@ -907,14 +900,14 @@
|
||||
|
||||
.productList .search {
|
||||
width: 100%;
|
||||
height: 170rpx;
|
||||
padding: 0 20rpx;
|
||||
// box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0rpx;
|
||||
height: 170rpx;
|
||||
padding: 0 20rpx;
|
||||
// box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0rpx;
|
||||
padding-top: 60rpx;
|
||||
z-index: 9;
|
||||
z-index: 9;
|
||||
background-color: var(--view-theme);
|
||||
|
||||
.icon-dingwei {
|
||||
@ -970,7 +963,7 @@
|
||||
width: 62rpx;
|
||||
font-size: 40rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
line-height: 86rpx ;
|
||||
}
|
||||
|
||||
.productList .nav-wrapper {
|
||||
@ -1051,7 +1044,7 @@
|
||||
|
||||
.productList .list {
|
||||
padding: 0 20rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.productList .list.on {
|
||||
@ -1087,7 +1080,7 @@
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 345rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.productList .list .item .pictrue.on {
|
||||
@ -1210,12 +1203,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.text_flex{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.productList .list .item .text .money {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -1437,7 +1424,7 @@
|
||||
|
||||
.store-wrapper {
|
||||
margin-top: 310rpx;
|
||||
|
||||
|
||||
border-top: 1px solid #F6F6F6;
|
||||
|
||||
.star-box {
|
||||
@ -1533,12 +1520,11 @@
|
||||
margin-left: 20px;
|
||||
|
||||
.avater {
|
||||
width: 80px;
|
||||
width: 60px;
|
||||
height: 80px;
|
||||
flex-shrink: 0;
|
||||
|
||||
image {
|
||||
width: 80px;
|
||||
width: 60px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
@ -1554,13 +1540,10 @@
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.text_one_r {
|
||||
flex: 1;
|
||||
margin-left: 10px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1569,17 +1552,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 +1568,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;
|
||||
|
@ -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,14 +75,13 @@
|
||||
</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 {
|
||||
getArea,
|
||||
@ -117,12 +110,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
|
||||
@ -131,11 +118,11 @@
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
locationArr: ({}),
|
||||
isshow: false,
|
||||
emptyText: '暂无可用应用',
|
||||
jurisdiction: false, // 是否有权限
|
||||
mer_id: '',
|
||||
@ -151,11 +138,79 @@
|
||||
// 编辑中标记
|
||||
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,
|
||||
}
|
||||
],
|
||||
nowMenuList: [],
|
||||
street: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
|
||||
isFshow: false,
|
||||
backColor: 'rgba(252, 252, 252, 0)'
|
||||
};
|
||||
@ -165,18 +220,20 @@
|
||||
},
|
||||
created() {},
|
||||
onLoad() {
|
||||
this.Area();
|
||||
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 +246,7 @@
|
||||
},
|
||||
mounted() {
|
||||
if (this.street.length <= 0) {
|
||||
this.selfLocation()
|
||||
this.appLocation()
|
||||
}
|
||||
// #ifdef H5
|
||||
// 监听页面滚动事件
|
||||
@ -217,20 +274,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,53 +317,20 @@
|
||||
|
||||
|
||||
},
|
||||
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) {
|
||||
this.AllMenuList.push({
|
||||
name: '大屏控制',
|
||||
icon: '/static/applet/dp.png',
|
||||
data: {
|
||||
id: '__UNI__83ABA97',
|
||||
url: 'https://ceshi-worker-task.lihaink.cn/uploads/files/20231016/20231016112144fac6d9128.wgt',
|
||||
},
|
||||
type: 4,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 初始化菜单
|
||||
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 +349,37 @@
|
||||
// 编辑完成
|
||||
editComfirm() {
|
||||
this.editFlag = false;
|
||||
uni.setStorageSync('gatherMenuList', JSON.stringify(this.nowMenuList));
|
||||
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
|
||||
},
|
||||
getUniMp(data) {
|
||||
let that = this;
|
||||
|
||||
getUniMp(type, data) {
|
||||
// #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);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
uniMP.loadMPurl(data.data);
|
||||
break;
|
||||
case 4:
|
||||
uniMP.loadMPdns(data.data);
|
||||
uniMP.loadMPurl(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不支持打开小程序'
|
||||
})
|
||||
// }
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: 'H5不支持打开小程序'
|
||||
})
|
||||
// #endif
|
||||
|
||||
},
|
||||
@ -420,57 +427,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 +456,11 @@
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
this.street = '定位失败'
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
this.isshow = false
|
||||
uni.setStorageSync("RejectTarget", true)
|
||||
Toast('定位失败,请检查定位权限是否开启')
|
||||
this.street = '定位失败'
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -521,28 +491,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 +705,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>
|
@ -278,22 +278,22 @@
|
||||
<view class='title'>产品介绍</view>
|
||||
<view class='conter' v-if="description" style="min-height:50rpx;">
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<jyf-parser v-if="description.type == 0 && typeof description.content == 'string'" :domain='domain'
|
||||
<jyf-parser v-if="description.type == 0" :domain='domain'
|
||||
:html="description.content.replace(/<br\/>/ig, '')" ref="article"
|
||||
:tag-style="tagStyle"></jyf-parser>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view v-if="description.type == 0 && typeof description.content == 'string'" class="description"
|
||||
<view v-if="description.type == 0" class="description"
|
||||
v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<!-- #endif -->
|
||||
<view v-else class="product_content">
|
||||
<view v-if="description.content && description.content.title" class="product_content_title">
|
||||
{{description.content.title}}
|
||||
{{description.content.title}}
|
||||
</view>
|
||||
<block v-if="description.content && description.content.image">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
<view v-if="description.content && description.content.image" class="pictures" style="background-color: #fff;">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="aspectFit">
|
||||
</image>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 价格说明 -->
|
||||
@ -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,7 @@
|
||||
}
|
||||
that.$set(that, 'storeInfo', storeInfo);
|
||||
that.$set(that, 'description', storeInfo.content);
|
||||
if(that.description?.content && 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) {
|
||||
that.description.content = that.description.content.replace(
|
||||
/<img/gi,
|
||||
'<img style="max-width:100%;height:auto;float:left;display:block" '
|
||||
@ -1123,7 +1114,6 @@
|
||||
that.getCouponList();
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
//状态异常返回上级页面
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
@ -2543,8 +2533,7 @@
|
||||
}
|
||||
image{
|
||||
width: 750rpx;
|
||||
// height: auto;
|
||||
// height: 750rpx;
|
||||
height: 750rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
@ -35,8 +35,8 @@
|
||||
data() {
|
||||
return {
|
||||
//修改图片,文字描述
|
||||
imageList: [
|
||||
{
|
||||
imageList: [{
|
||||
|
||||
src: '/static/images/guide.png'
|
||||
}
|
||||
|
||||
|
@ -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
@ -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>
|
@ -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
@ -3,13 +3,13 @@
|
||||
<view class="info">
|
||||
<view class="bg"></view>
|
||||
<view class="card">
|
||||
<view class="title">店铺押金信息</view>
|
||||
<view class="title">店铺保证金信息</view>
|
||||
<view class="item">
|
||||
<text>已缴纳押金</text>
|
||||
<text>已缴纳保证金</text>
|
||||
<text>{{merchant_Data.paid_margin}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>剩余缴纳押金</text>
|
||||
<text>剩余缴纳保证金</text>
|
||||
<text>{{merchant_Data.unpaid_margin}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
@ -107,20 +107,21 @@
|
||||
});
|
||||
|
||||
},
|
||||
//获取押金信息
|
||||
//获取保证金信息
|
||||
decimal() {
|
||||
merchant({
|
||||
id: this.mer_id
|
||||
}).then((res) => {
|
||||
|
||||
this.merchant_Data = res.data
|
||||
});
|
||||
},
|
||||
//缴纳押金
|
||||
//缴纳保证金
|
||||
paydecimal() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳押金',
|
||||
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
paymerchant().then((res) => {
|
||||
|
@ -63,7 +63,7 @@
|
||||
</view>
|
||||
|
||||
<view class="examine"
|
||||
@click="buyserset">
|
||||
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}&product_type=98`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"></image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
@ -87,7 +87,7 @@
|
||||
<view class="examine" @click="margin(`/pages/margin/margin`)">
|
||||
<image class="icon_img" src="@/static/images/jy.png">
|
||||
</image>
|
||||
<text class="text">缴纳押金</text>
|
||||
<text class="text">缴纳保证金</text>
|
||||
</view>
|
||||
<!-- <view class="examine"
|
||||
@click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)">
|
||||
@ -195,7 +195,7 @@
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="buyserset">
|
||||
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
@ -203,13 +203,13 @@
|
||||
<view class="examine" @click="margin(`/pages/margin/margin`)">
|
||||
<image class="icon_img" src="@/static/images/jy.png">
|
||||
</image>
|
||||
<text class="text">缴纳押金</text>
|
||||
<text class="text">缴纳保证金</text>
|
||||
</view>
|
||||
<!-- <view class="examine"
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/admin/financial_management/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
|
||||
<text class="text">财务管理</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="examine"
|
||||
@click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/diaohuo.png" mode="aspectFill">
|
||||
@ -318,7 +318,7 @@
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="buyserset">
|
||||
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
@ -327,7 +327,7 @@
|
||||
<view class="examine" @click="margin(`/pages/margin/margin`)">
|
||||
<image class="icon_img" src="@/static/images/jy.png">
|
||||
</image>
|
||||
<text class="text">缴纳押金</text>
|
||||
<text class="text">缴纳保证金</text>
|
||||
</view>
|
||||
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
|
||||
@ -390,7 +390,7 @@
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="buyserset">
|
||||
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
@ -398,7 +398,7 @@
|
||||
<view class="examine" @click="margin(`/pages/margin/margin`)">
|
||||
<image class="icon_img" src="@/static/images/jy.png">
|
||||
</image>
|
||||
<text class="text">缴纳押金</text>
|
||||
<text class="text">缴纳保证金</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -848,7 +848,7 @@
|
||||
}
|
||||
|
||||
},
|
||||
//押金缴纳
|
||||
//保证金缴纳
|
||||
margin(url) {
|
||||
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) {
|
||||
|
||||
@ -880,7 +880,6 @@
|
||||
url: '/pages/gather/gather'
|
||||
})
|
||||
},
|
||||
|
||||
//商户设置
|
||||
buyserset() {
|
||||
uni.navigateTo({
|
||||
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -9,9 +9,10 @@
|
||||
<view class="head_tit">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<view class="back" @click='backjJump()' style="margin-right:17rpx ;">
|
||||
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
|
||||
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
|
||||
height="50.82rpx"></u--image> -->
|
||||
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i>
|
||||
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
|
||||
></i>
|
||||
</view>
|
||||
<view style="font-size: 40rpx;">
|
||||
<!-- {{titName}} -->
|
||||
@ -25,7 +26,7 @@
|
||||
: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>
|
||||
<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>
|
||||
@ -533,12 +534,10 @@
|
||||
//#endif
|
||||
},
|
||||
selfLocation() {
|
||||
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();
|
||||
@ -705,8 +704,7 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.serchbtn {
|
||||
.serchbtn {
|
||||
// position: absolute;
|
||||
// right: 5rpx;
|
||||
// top: 5rpx;
|
||||
@ -719,7 +717,6 @@
|
||||
color: #fff;
|
||||
background: linear-gradient(to right, #F84221, #FF6D20);
|
||||
}
|
||||
|
||||
.com_name {
|
||||
font-size: 32rpx;
|
||||
// background-color: red;
|
||||
|
@ -12,8 +12,7 @@
|
||||
<view class="list-box listA" :class="goods.length > 0 ? 'fadeIn on' : ''">
|
||||
<view class="item" v-for="(item, index) in goods" :key="index">
|
||||
<view class="pictrue">
|
||||
<!-- <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage> -->
|
||||
<image :src="item.image" :lazy-load="true"></image>
|
||||
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
|
||||
</view>
|
||||
<view class="text-info">
|
||||
<view class="title">{{ item.store_name }}</view>
|
||||
@ -25,7 +24,7 @@
|
||||
<u-popup :show="editGoodsShow" @close="editGoodsClose" :round="18" mode="center">
|
||||
<view class="edit_goods_box">
|
||||
<view class="edit_name flex_a_c edit_name_no">
|
||||
<text>商品条码:</text><input type="text" disabled placeholder="请输入商品条码" v-model="editGoodsCode">
|
||||
<text>商品编号:</text><input type="text" disabled placeholder="请输入商品名称" v-model="editGoodsCode">
|
||||
</view>
|
||||
<view class="edit_name flex_a_c edit_name_no">
|
||||
<text>商品名称:</text> <input type="text" disabled placeholder="请输入商品名称" v-model="editGoodsName">
|
||||
@ -44,25 +43,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- <u-modal :show="addGoodsShow" content='是否添加到你的仓库中?' @cancel="addGoodsclose()" @close="addGoodsclose()"
|
||||
@confirm="addGoodsopen()" :closeOnClickOverlay="true" :showCancelButton="true"></u-modal> -->
|
||||
<u-popup :show="addGoodsShow" @close="searchGoodsClose" :round="18" mode="center">
|
||||
<view class="search_goods_box">
|
||||
<view style="text-align: center;font-weight: bold;">是否添加到你的仓库中?</view>
|
||||
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||
<view style="margin-right: 20rpx;">价格:</view>
|
||||
<input style="flex: 1;" type="text" v-model="putGoods.price" class="putGoods" :placeholder="`请设置商品价格`">
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;margin-top: 16rpx;">
|
||||
<view style="margin-right: 20rpx;">库存:</view>
|
||||
<input style="flex: 1;" type="text" v-model="putGoods.stock" class="putGoods" placeholder="请输入商品库存">
|
||||
</view>
|
||||
<view class="search_goods_btn">
|
||||
<view class="cancel edit_btn" @click="addGoodsclose()">取消</view>
|
||||
<view class="search edit_btn" @click="addGoodsopen()">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-modal :show="addGoodsShow" content='是否添加到你的仓库中?' @cancel="addGoodsclose()" @close="addGoodsclose()"
|
||||
@confirm="addGoodsopen()" :closeOnClickOverlay="true" :showCancelButton="true"></u-modal>
|
||||
<u-popup :show="searchGoodsShow" @close="searchGoodsClose" :round="18" mode="center">
|
||||
<view class="search_goods_box">
|
||||
<input type="text" v-model="searchGoodsName" class="searchGoods" placeholder="请输入商品名称">
|
||||
@ -86,7 +68,7 @@
|
||||
} from '@/api/store.js'
|
||||
import {
|
||||
seachBarCodeAPI,
|
||||
micro_product_import
|
||||
post_product_import
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
Toast
|
||||
@ -95,7 +77,7 @@
|
||||
data() {
|
||||
return {
|
||||
goodsData: [{
|
||||
name: '商品名称添加',
|
||||
name: '',
|
||||
type: 1,
|
||||
src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/mingcheng.png'
|
||||
},
|
||||
@ -114,24 +96,7 @@
|
||||
mer_id: 0,
|
||||
searchGoodsShow: false,
|
||||
searchGoodsName: '',
|
||||
goods: [
|
||||
// {
|
||||
// "id": 5,
|
||||
// "store_name": "雨森电商纯木生活260张面巾纸 170X118X260张(5层)",
|
||||
// "bar_code": "6940074914381",
|
||||
// "unit_name": "",
|
||||
// "price": "0.00",
|
||||
// "cost": "0.00",
|
||||
// "ot_price": "0.00",
|
||||
// "stock": 9999999,
|
||||
// "image": "127.0.0.1:8324/uploads/img/2023-11-01/1698809432.jpg"
|
||||
// }
|
||||
],
|
||||
putGoods: {
|
||||
id: '',
|
||||
price: '',
|
||||
stock: '',
|
||||
},
|
||||
goods: [],
|
||||
item: [],
|
||||
addGoodsShow: false,
|
||||
stype: '',
|
||||
@ -139,32 +104,28 @@
|
||||
},
|
||||
onLoad(e) {
|
||||
this.mer_id = e.mer_id
|
||||
// this.stype = e.stype
|
||||
this.stype = 2
|
||||
// if (this.stype == 1) {
|
||||
// return this.goodsData[0].name = '商品添加'
|
||||
// }
|
||||
// if (this.stype == 2) {
|
||||
// return this.goodsData[0].name = '商品名称添加'
|
||||
// }
|
||||
this.stype = e.stype
|
||||
if (this.stype == 1) {
|
||||
return this.goodsData[0].name = '商品添加'
|
||||
}
|
||||
if (this.stype == 2) {
|
||||
return this.goodsData[0].name = '商品名称添加'
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
addGoods(item) {
|
||||
this.putGoods.id = item.id;
|
||||
this.addGoodsShow = true
|
||||
this.item = item
|
||||
},
|
||||
addGoodsopen() {
|
||||
if (this.putGoods.id) {
|
||||
console.log('开始');
|
||||
micro_product_import(this.putGoods).then(e => {
|
||||
if (this.item) {
|
||||
post_product_import(this.item.product_id).then(e => {
|
||||
if (e.status == 200) {
|
||||
Toast(e.data.msg)
|
||||
this.addGoodsShow = false
|
||||
this.putGoods = {};
|
||||
} else {
|
||||
// console.log(e);
|
||||
Toast(e.message)
|
||||
@ -188,8 +149,6 @@
|
||||
},
|
||||
openSearch() {},
|
||||
async searchGoodsClose() {
|
||||
console.log('搜索', this.searchGoodsName);
|
||||
if(this.searchGoodsName=='') return Toast('请输入商品名称');
|
||||
const rq = {
|
||||
mer_id: this.mer_id,
|
||||
name: this.searchGoodsName
|
||||
@ -262,7 +221,6 @@
|
||||
code: code,
|
||||
mer_id: this.mer_id
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (!res.data) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
@ -353,13 +311,6 @@
|
||||
padding: 12px;
|
||||
margin: 21.05rpx 0;
|
||||
}
|
||||
|
||||
.putGoods {
|
||||
height: 87.72rpx;
|
||||
border: 1px solid #f5f5f5;
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.search_goods_btn {
|
||||
margin-top: 28.07rpx;
|
||||
|
@ -4,15 +4,16 @@
|
||||
<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;">
|
||||
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
|
||||
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
|
||||
height="50.82rpx"></u--image> -->
|
||||
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i>
|
||||
|
||||
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
|
||||
></i>
|
||||
|
||||
</view>
|
||||
<view style="font-size: 40rpx;">
|
||||
<!-- {{titName}} -->
|
||||
@ -24,29 +25,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>
|
||||
<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 +277,10 @@
|
||||
<script>
|
||||
import {
|
||||
storeMerchantList,
|
||||
getProductslist,
|
||||
getGeocoder,
|
||||
supMenuApi,
|
||||
supAgoodsApi
|
||||
} from '@/api/store.js';
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
|
||||
import {
|
||||
merClassifly,
|
||||
@ -83,12 +296,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 +356,6 @@
|
||||
category_id: '',
|
||||
type_id: '',
|
||||
street_id: '',
|
||||
village_id: '',
|
||||
type_code: '',
|
||||
|
||||
},
|
||||
@ -161,7 +371,7 @@
|
||||
latitude: "",
|
||||
longitude: "",
|
||||
count: 0,
|
||||
storeTypeArr: [], //商品类型
|
||||
storeTypeArr: [], //店铺类型
|
||||
merList: [], //商户分类
|
||||
product_type: 0,
|
||||
show: false,
|
||||
@ -170,9 +380,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 +416,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 +456,7 @@
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取商品类型
|
||||
// 获取店铺类型
|
||||
getStoreType: function() {
|
||||
let temp = []
|
||||
getStoreTypeApi().then(res => {
|
||||
@ -339,11 +539,9 @@
|
||||
},
|
||||
selfLocation() {
|
||||
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
|
||||
@ -525,7 +717,6 @@
|
||||
color: #fff;
|
||||
background: linear-gradient(to right, #F84221, #FF6D20);
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -678,12 +869,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 +1326,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
@ -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">
|
||||
<!-- 顶部 -->
|
||||
@ -8,16 +8,15 @@
|
||||
|
||||
<view class="head_tit">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
|
||||
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
|
||||
height="50.82rpx" @click='backjJump'></u--image> -->
|
||||
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
|
||||
@click='backjJump'></i>
|
||||
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;" @click='backjJump'></i>
|
||||
<view class=""
|
||||
style="font-size: 36.8rpx;font-weight: 700;transform: skewX(-10deg);margin-left: 20rpx;color: #F84221;">
|
||||
供销综合云市场
|
||||
</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 +30,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 +48,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 +94,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">
|
||||
@ -125,32 +112,19 @@
|
||||
<view class="right">
|
||||
<view class="li head">
|
||||
<text class="com_name">{{item.mer_name}}</text>
|
||||
<text v-if="item.type_id==17"
|
||||
<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> -->
|
||||
<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 +142,7 @@
|
||||
|
||||
</view>
|
||||
|
||||
<u-loadmore :status="status" />
|
||||
</view>
|
||||
|
||||
<!-- 热搜 -->
|
||||
@ -331,7 +306,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 +332,6 @@
|
||||
storeMerchantList,
|
||||
getGeocoder,
|
||||
} from '@/api/store.js';
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
import {
|
||||
supMenuApi
|
||||
} from '@/api/requesta.js';
|
||||
@ -381,9 +360,7 @@
|
||||
getDiy
|
||||
} from '@/api/api.js'
|
||||
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
|
||||
|
||||
import Cache from '@/utils/cache';
|
||||
const app = getApp();
|
||||
@ -395,7 +372,6 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
domain: HTTP_REQUEST_URL,
|
||||
defaInd: [0, 0],
|
||||
columnData: [],
|
||||
showSerch: false,
|
||||
@ -466,15 +442,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 +476,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 +524,7 @@
|
||||
mer_location: 0,
|
||||
store_street_theme: 1,
|
||||
hide_mer_status: '',
|
||||
}, mapGetters(['viewColor', 'keyColor'])),
|
||||
}, mapGetters(['viewColor'])),
|
||||
},
|
||||
methods: {
|
||||
selectLocation() {
|
||||
@ -569,7 +540,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()
|
||||
},
|
||||
@ -603,7 +574,7 @@
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
@ -650,14 +621,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) {
|
||||
@ -672,7 +643,7 @@
|
||||
},
|
||||
navGo(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/nongKe/supply_chain/supplierA?type_id=10,17&merchant_category_id=${id}&street_id=${this.street_id}`
|
||||
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&merchant_category_id=${id}&street_id=${this.street_id}`
|
||||
})
|
||||
},
|
||||
go_details: function(product_type, product_id) {
|
||||
@ -698,8 +669,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 +691,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 +769,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) => {
|
||||
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 +808,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 +844,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 +858,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 +889,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 +922,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 +939,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 +959,6 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
page{
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.com_name {
|
||||
font-size: 33.29rpx;
|
||||
@ -1080,8 +992,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 +1013,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 +1042,6 @@
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
.head {
|
||||
font-weight: bold;
|
||||
// color: red;
|
||||
@ -1162,7 +1049,6 @@
|
||||
}
|
||||
|
||||
.li {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
font-size: 26.29rpx;
|
||||
margin-bottom: 10rpx;
|
||||
@ -1699,8 +1585,8 @@
|
||||
color: $uni-nothing-text;
|
||||
|
||||
image {
|
||||
width: 500rpx;
|
||||
height: 180rpx;
|
||||
width: 414rpx;
|
||||
height: 380rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1730,42 +1616,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>
|
@ -59,20 +59,14 @@
|
||||
<view class="right">
|
||||
<view class="li head" style="display: flex;">
|
||||
<text class="com_name">{{item.mer_name}}</text>
|
||||
<text v-if="item.type_id==17"
|
||||
<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">
|
||||
<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
@ -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();
|
||||
|
@ -11,7 +11,8 @@
|
||||
<view class="back" @click='backjJump()' style="margin-right: 17rpx;">
|
||||
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
|
||||
height="50.82rpx"></u--image> -->
|
||||
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i>
|
||||
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
|
||||
></i>
|
||||
</view>
|
||||
<view style="font-size: 40rpx;">
|
||||
<!-- {{titName}} -->
|
||||
@ -28,8 +29,8 @@
|
||||
: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"
|
||||
<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>
|
||||
|
||||
@ -279,7 +280,6 @@
|
||||
supMenuApi,
|
||||
supAgoodsApi
|
||||
} from '@/api/store.js';
|
||||
import { wgsToGcj } from "@/utils/wgs.js";
|
||||
|
||||
import {
|
||||
merClassifly,
|
||||
@ -536,11 +536,9 @@
|
||||
},
|
||||
selfLocation() {
|
||||
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();
|
||||
@ -707,8 +705,7 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.serchbtn {
|
||||
.serchbtn {
|
||||
// position: absolute;
|
||||
// right: 5rpx;
|
||||
// top: 5rpx;
|
||||
@ -721,7 +718,6 @@
|
||||
color: #fff;
|
||||
background: linear-gradient(to right, #F84221, #FF6D20);
|
||||
}
|
||||
|
||||
.com_name {
|
||||
font-size: 32rpx;
|
||||
// background-color: red;
|
||||
|
@ -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
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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,10 +221,10 @@
|
||||
*/
|
||||
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}`
|
||||
url: `/pages/users/order_list/indexCopy?status=1&product_type=${this.product_type}`
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
@ -233,10 +232,10 @@
|
||||
})
|
||||
}
|
||||
|
||||
} 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}`
|
||||
url: `/pages/users/order_list/relase?status=1&product_type=${this.product_type}`
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
@ -247,7 +246,7 @@
|
||||
} else {
|
||||
if(val==1){
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_list/index?status=2&product_type=0'
|
||||
url: '/pages/users/order_list/index?status=1&product_type=0'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
|
@ -4,6 +4,11 @@
|
||||
<view class="content_list">
|
||||
<view class="content_list_item">
|
||||
<view>商品详情</view>
|
||||
<!-- <view class="content_list_item_han">
|
||||
<span v-if="disModel" style="color: #000000">去修改</span>
|
||||
<span v-else>设置详情</span>
|
||||
<span class="iconfont"></span>
|
||||
</view> -->
|
||||
</view>
|
||||
<input-goods-detils class="input-goods-detils" @getProductContent="getProductContent" :title="store_name" :prodectContent="goodsDis" :maxLength="200"></input-goods-detils>
|
||||
<block v-if="!moreThanFlag">
|
||||
@ -223,7 +228,7 @@
|
||||
// editGoodsDetils = getStorage('editGoodsDetils');
|
||||
// console.log('初始化商品详情',editGoodsDetils);
|
||||
Object.keys(this.addGoodsSecoundData).forEach(item => {
|
||||
// console.log(item, editGoodsDetils[item]);
|
||||
console.log(item, editGoodsDetils[item]);
|
||||
this.addGoodsSecoundData[item] = editGoodsDetils[item];
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<view class="step_one" v-if="step == 1">
|
||||
<view class="input_content">
|
||||
<view class="bar-code" v-if="bar_code_dis">
|
||||
<view>商品条码</view>
|
||||
<view>商品编码</view>
|
||||
<!-- <view>{{ singleSpecification.bar_code }}</view> -->
|
||||
<input type="number" placeholder="请手动添加条码" v-model="code" :disabled="bar_code_dis"
|
||||
placeholder-class="inputPlaceHolder" />
|
||||
@ -11,16 +11,14 @@
|
||||
<view class="input_content_textarea">
|
||||
<textarea v-model="setFormData.store_name" placeholder="请输入商品名称" placeholder-class="placeholderStyle"
|
||||
maxlength="60" />
|
||||
<view class="flex" style="justify-content: space-between;color: #999999;">
|
||||
<view>(品牌,名称,规格,口味)</view>
|
||||
<view>
|
||||
<text v-if="setFormData.store_name">{{ setFormData.store_name.length }}</text>
|
||||
<text v-else>0</text>/60
|
||||
</view>
|
||||
<view>
|
||||
<text v-if="setFormData.store_name">{{ setFormData.store_name.length }}</text>
|
||||
<text v-else>0</text>
|
||||
/60
|
||||
</view>
|
||||
</view>
|
||||
<view class="photo_count">
|
||||
<text class="photo_size" style="color: #e93323;">建议:图片尺寸为750*750px, 上传2张以上</text>
|
||||
<text class="photo_size">建议:图片尺寸为750*750px</text>
|
||||
<view class="input_content_photo">
|
||||
<view class="input_content_photo_adPh" v-for="(item, index) in setFormData.imageList" :key="index">
|
||||
<image :src="item" class="myimg2 photos" @click="pop(item)"></image>
|
||||
@ -86,7 +84,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<priceComponent :product_id="product_id" :bar_code="code" @updateCode = "updateCode" v-if="showCommodity"></priceComponent>
|
||||
<priceComponent :product_id="product_id" v-if="showCommodity"></priceComponent>
|
||||
|
||||
<!-- <view class="popup_group">
|
||||
<view class="radio">
|
||||
@ -170,15 +168,15 @@
|
||||
</commodityComponent>
|
||||
|
||||
<view class="popup_group">
|
||||
<!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
|
||||
<view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
|
||||
<view class="popup_group_item_label">更多信息</view>
|
||||
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
|
||||
<view><span class="iconfont"></span></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<block >
|
||||
</view>
|
||||
<block v-if="showMoreInfo">
|
||||
<view class="input_content">
|
||||
<!-- <view class="input_content_describe" style="border-top: none">
|
||||
<view class="input_content_describe" style="border-top: none">
|
||||
<view class="input_content_describe_title">
|
||||
<view class="input_content_describe_title_msg">商品简介</view>
|
||||
<view class="input_content_describe_title_num">
|
||||
@ -191,7 +189,7 @@
|
||||
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
|
||||
placeholderClass="placeholderClass" maxlength="200" />
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="input_content_keyword">
|
||||
<view class="input_content_keyword_label">关键字</view>
|
||||
@ -588,7 +586,7 @@
|
||||
}
|
||||
productDetail(this.merId, this.product_id).then(res => {
|
||||
setStorage('editGoodsDetils', res.data);
|
||||
if(res.data.content_arr.length>0) res.data.content = res.data.content_arr;
|
||||
if(res.data.content_arr) res.data.content = res.data.content_arr;
|
||||
this.$store.commit('setStorage', res.data);
|
||||
let editGoodsDetils = res.data;
|
||||
Object.keys(this.setFormData).forEach(item => {
|
||||
@ -801,10 +799,6 @@
|
||||
return;
|
||||
}
|
||||
},
|
||||
// 更新商品条码
|
||||
updateCode(e){
|
||||
this.code = e + '';
|
||||
},
|
||||
// 选择规格部分(新)结束
|
||||
// switch切换
|
||||
switchChange(value, item) {
|
||||
|
@ -40,8 +40,8 @@
|
||||
|
||||
<view v-if="item.more_thanFlag">
|
||||
<view class="multiSpecifica_container_item">
|
||||
<view class="multiSpecifica_container_item_label flex-start">商品条码</view>
|
||||
<view class="multiSpecifica_container_item_value"><input v-model="item.bar_code" type="text" placeholder="请填写商品条码" /></view>
|
||||
<view class="multiSpecifica_container_item_label flex-start">商品编号</view>
|
||||
<view class="multiSpecifica_container_item_value"><input v-model="item.bar_code" type="text" placeholder="请填写商品编号" /></view>
|
||||
</view>
|
||||
|
||||
<view class="multiSpecifica_container_item">
|
||||
@ -114,7 +114,7 @@
|
||||
|
||||
<view v-if="popupOpenModel">
|
||||
<view class="changePopup_container_content_item">
|
||||
<view class="changePopup_container_content_item_label">商品条码</view>
|
||||
<view class="changePopup_container_content_item_label">商品编号</view>
|
||||
<view class="changePopup_container_content_item_value"><input v-model="batchData.bar_code" type="text" placeholder="0.00" /></view>
|
||||
</view>
|
||||
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
price: '', //售价
|
||||
cost: '', // 成本价
|
||||
ot_price: '', // 原价
|
||||
bar_code: '', // 商品条码
|
||||
bar_code: '', // 商品编号
|
||||
weight: '', // 重量
|
||||
volume: '', // 体积
|
||||
extension_one: '', // 一级佣金
|
||||
|
@ -22,15 +22,15 @@
|
||||
components: {
|
||||
selectForm
|
||||
},
|
||||
props: ['product_id', 'bar_code'],
|
||||
props: ['product_id'],
|
||||
data() {
|
||||
return {
|
||||
singleSpecification: {
|
||||
price: '', // 售价
|
||||
cost: '', // 成本价
|
||||
stock: '', // 库存
|
||||
ot_price: '', // 批发价
|
||||
bar_code: '', // 商品条码
|
||||
ot_price: '', // 原价
|
||||
bar_code: '', // 商品编号
|
||||
weight: '', // 重量
|
||||
volume: '', // 体积
|
||||
image: '',
|
||||
@ -39,60 +39,53 @@
|
||||
},
|
||||
moreThanFlag: true,
|
||||
formList: [{
|
||||
id: 1,
|
||||
label: '售价',
|
||||
type: 'digit',
|
||||
model: 'price',
|
||||
holder: '请填写售价',
|
||||
require: true,
|
||||
}, {
|
||||
id: 10,
|
||||
label: '库存',
|
||||
type: 'digit',
|
||||
model: 'stock',
|
||||
holder: '请填写库存',
|
||||
disable: true,
|
||||
require: true,
|
||||
}, {
|
||||
id: 1,
|
||||
label: '售价',
|
||||
type: 'digit',
|
||||
model: 'price',
|
||||
holder: '请填写售价'
|
||||
}, {
|
||||
id: 10,
|
||||
label: '库存',
|
||||
type: 'digit',
|
||||
model: 'stock',
|
||||
holder: '请填写库存',
|
||||
disable: true
|
||||
}],
|
||||
moreThanList: [{
|
||||
id: 2,
|
||||
label: '成本价',
|
||||
type: 'digit',
|
||||
holder: '请填写成本价',
|
||||
model: 'cost',
|
||||
require: true,
|
||||
model: 'cost'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: '批发价',
|
||||
label: '原价',
|
||||
type: 'digit',
|
||||
holder: '请填写批发价',
|
||||
model: 'ot_price',
|
||||
require: true,
|
||||
}
|
||||
],
|
||||
moreThanList: [{
|
||||
holder: '请填写原价',
|
||||
model: 'ot_price'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
label: '商品编号',
|
||||
type: 'input',
|
||||
holder: '请填写商品编号',
|
||||
model: 'bar_code'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
label: '重量',
|
||||
type: 'digit',
|
||||
holder: '请输入重量',
|
||||
model: 'weight',
|
||||
require: false,
|
||||
model: 'weight'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
label: '体积',
|
||||
type: 'digit',
|
||||
holder: '请输入体积',
|
||||
model: 'volume',
|
||||
require: false,
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
label: '商品条码',
|
||||
type: 'input',
|
||||
holder: '请填写商品条码',
|
||||
model: 'bar_code',
|
||||
require: false,
|
||||
model: 'volume'
|
||||
},
|
||||
// {
|
||||
// id: 8,
|
||||
@ -115,13 +108,12 @@
|
||||
|
||||
watch: {
|
||||
singleSpecification: {
|
||||
handler(val, old) {
|
||||
handler(val) {
|
||||
this.singleSpecification = val;
|
||||
this.saveSingleSpecification();
|
||||
this.$emit('updateCode', val.bar_code);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
}
|
||||
},
|
||||
// onLoad(option) {
|
||||
// console.log(option);
|
||||
@ -156,7 +148,6 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
this.singleSpecification.bar_code = this.$props.bar_code + '';
|
||||
// if (!this.$props.product_id) {
|
||||
// this.formList.push({
|
||||
// id: 10,
|
||||
@ -179,7 +170,7 @@
|
||||
spliceMoreThan() {
|
||||
this.moreThanFlag = true;
|
||||
// this.formList.splice(!this.$props.product_id ? 2 : 1, this.formList.length);
|
||||
this.formList.splice(4, this.formList.length);
|
||||
this.formList.splice(2, this.formList.length);
|
||||
},
|
||||
input(val) {
|
||||
this.singleSpecification = val
|
||||
|
@ -263,18 +263,16 @@
|
||||
Object.keys(info).forEach(key=>{
|
||||
postData[key]=info[key];
|
||||
})
|
||||
postData.stock = postData.attrValue[0]?.stock;
|
||||
postData.stock = postData.attrValue[0].stock;
|
||||
// console.log(postData);
|
||||
if(!postData.store_name||postData.store_name?.trim().length<=0)return Toast('请输入商品名称');
|
||||
if(!postData.imageList||postData.imageList?.length<2)return Toast('请上传2张以上商品图片');
|
||||
if(!postData.cate_name||postData.cate_name?.trim().length<=0)return Toast('请选择平台分类');
|
||||
if(!postData.unit_name||postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
|
||||
if(!postData.attrValue[0]?.price||postData.attrValue[0]?.price<0)return Toast('价格不能小于0');
|
||||
if(!postData.imageList||postData.imageList.length<=0)return Toast('请上传商品图片');
|
||||
if(postData.cate_name?.trim().length<=0)return Toast('请选择平台分类');
|
||||
if(postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
|
||||
if(!postData.attrValue[0].price||postData.attrValue[0].price<0)return Toast('价格不能小于0');
|
||||
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
|
||||
if(!postData.attrValue[0]?.cost||postData.attrValue[0]?.cost<0)return Toast('成本价不能小于0');
|
||||
if(!postData.attrValue[0]?.ot_price||postData.attrValue[0]?.ot_price<0)return Toast('批发价不能小于0');
|
||||
// if(!postData.content.title||postData.content.title?.trim().length<=0)return Toast('请输入商品详情');
|
||||
// if(!postData.content.image||postData.content.image?.length<=0)return Toast('请上传商品图片');
|
||||
if(!postData.content.title||postData.content.title?.trim().length<=0)return Toast('请输入商品详情');
|
||||
if(!postData.content.image||postData.content.image?.length<=0)return Toast('请上传商品图片');
|
||||
// return Toast('通过');
|
||||
if (getStorage('addGoodsFormData').spec_type == 0) {
|
||||
// postData.attr = [getStorage('singleSpecification')];
|
||||
|
@ -26,7 +26,7 @@
|
||||
price: '', // 售价
|
||||
cost: '', // 成本价
|
||||
ot_price: '', // 原价
|
||||
bar_code: '', // 商品条码
|
||||
bar_code: '', // 商品编号
|
||||
weight: '', // 重量
|
||||
volume: '', // 体积
|
||||
image: '',
|
||||
@ -60,9 +60,9 @@
|
||||
moreThanList: [
|
||||
{
|
||||
id: 5,
|
||||
label: '商品条码',
|
||||
label: '商品编号',
|
||||
type: 'input',
|
||||
holder: '请填写商品条码',
|
||||
holder: '请填写商品编号',
|
||||
model: 'bar_code'
|
||||
},
|
||||
{
|
||||
|
@ -9,8 +9,8 @@
|
||||
<block v-if="images[0].img">
|
||||
<!-- <u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px"
|
||||
@click="delImg(0)" mode="aspectFit"></u--image> -->
|
||||
<u--image :showLoading="true" :src="images[0].img" width="680rpx" height="210.53rpx" radius="4px"
|
||||
@click="delImg(0)"></u--image>
|
||||
<u--image :showLoading="true" :src="images[0].img" width="360px" height="210.53rpx" radius="4px"
|
||||
@click="delImg(2)"></u--image>
|
||||
</block>
|
||||
<view v-else class="upload" @click="seleckImage(0)">
|
||||
<view class="iconfont icon-tupian1"></view>
|
||||
@ -56,7 +56,7 @@
|
||||
<view class="street_bg">
|
||||
<view class="text flex_a_c"> <i class="iconfont icon-xinghao"></i> 店铺街背景图</view>
|
||||
<block v-if="images[2].img">
|
||||
<u--image :showLoading="true" :src="images[2].img" width="680rpx" height="210.53rpx" radius="4px"
|
||||
<u--image :showLoading="true" :src="images[2].img" width="360px" height="210.53rpx" radius="4px"
|
||||
@click="delImg(2)"></u--image>
|
||||
</block>
|
||||
<view v-else class="street_img flex_a_c" @click="seleckImage(2)">
|
||||
@ -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();
|
||||
|
@ -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>
|
@ -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();
|
||||
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
|
||||
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>
|
@ -1,104 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;z-inde:-1;'">
|
||||
<!--
|
||||
1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view
|
||||
2.为了 视频无限加载,已经把 21 行的 appear 去掉了,加上了 loadmore 方法(第10行)
|
||||
3.由于方法比较多,可以采取下面的方式查看代码:
|
||||
(1)Mac:按住 option 键,然后点击方法名,即可跳转到方法
|
||||
(2)windows:按住 Alt 键,然后鼠标左击,即可跳转到方法
|
||||
-->
|
||||
<view class="root">
|
||||
<video ref="videoPlayer" :src="currentSrc" controls @ended="playNext" :object-fit="object_fit" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;z-inde:-1;'"></video>
|
||||
</view>
|
||||
<sd-float-page :room='room' :msgList='msgList'
|
||||
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;position: absolute;' "></sd-float-page>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import sdFloatPage from '@/components/sd-live-page/histroy.nvue';
|
||||
|
||||
import {
|
||||
playbackDetail
|
||||
} from '@/api/live.js'
|
||||
export default {
|
||||
components: {
|
||||
sdFloatPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rtmpSources: [],
|
||||
currentIndex: 0,
|
||||
room: {},
|
||||
wHeight: 0, //获取的屏幕高度🌟💗
|
||||
boxStyle: { //视频,图片封面样式🌟💗
|
||||
'height': 0,
|
||||
'width': 0,
|
||||
},
|
||||
object_fit: 'cover', //视频样式默认包含🌟💗
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
currentSrc() {
|
||||
return this.rtmpSources[this.currentIndex];
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.room = JSON.parse(decodeURIComponent(options.data));
|
||||
this.platform = uni.getSystemInfoSync().platform
|
||||
this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度
|
||||
this.boxStyle.width = this.windowWidth + 'px' //给宽度加px
|
||||
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
|
||||
this.boxStyle.height = this.wHeight; //改变视频高度
|
||||
this.get()
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
// 初始化时播放第一个源
|
||||
this.playCurrent();
|
||||
},
|
||||
|
||||
methods: {
|
||||
playCurrent() {
|
||||
this.$refs.videoPlayer.load();
|
||||
this.$refs.videoPlayer.play();
|
||||
},
|
||||
playNext() {
|
||||
this.currentIndex++;
|
||||
if (this.currentIndex >= this.rtmpSources.length) {
|
||||
this.currentIndex = 0; // 回到第一个源
|
||||
}
|
||||
this.playCurrent();
|
||||
},
|
||||
|
||||
|
||||
get() {
|
||||
let that = this
|
||||
// console.log(this.room)
|
||||
playbackDetail({
|
||||
app_name: 'shop',
|
||||
live_stream_id: this.room.live_stream_id
|
||||
}).then((res) => {
|
||||
console.log(res.data, '1111')
|
||||
|
||||
this.rtmpSources = res.data.playback_url;
|
||||
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -1,508 +0,0 @@
|
||||
<template>
|
||||
<view class="view_body">
|
||||
<view>
|
||||
<view class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||
<input type="text" v-model="keyword" placeholder="搜索主播或关键字" placeholder-style="font-size: 30rpx;"
|
||||
@input="change">
|
||||
</view>
|
||||
<button class="search_btn" @click="search">搜索</button>
|
||||
</view>
|
||||
|
||||
<view class="banner">
|
||||
<view class="banner-detail" v-for="(item,i) in list" :key='i' @click="zhisort(i)">
|
||||
<view class="banner-name">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="banner-t" v-if="isindex==i">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-top="0" scroll-y="true" class="goods_body_scroll" v-if="isindex==0">
|
||||
<view class="roomsbox">
|
||||
<view class="roomblock" v-for="(room,index) in roomList" :key="index" @click="jump(room)"
|
||||
style="border: 1px solid #e1d9d4;">
|
||||
<image :src="room.cover" mode="aspectFill" v-if="room.cover"></image>
|
||||
<image src="/static/lw/6.gif" mode="aspectFill" v-else></image>
|
||||
<view class="livetitle">{{room.live_name}}</view>
|
||||
<view class="roomstatus-d" v-if="room.status==1" style="background-color: #09BB07;">
|
||||
</view>
|
||||
<view class="roomstatus-d" v-else style="background-color: #fa2306;">
|
||||
</view>
|
||||
|
||||
<view class="roomstatus" style="color: #00B26A;" v-if="room.status==1">直播中
|
||||
</view>
|
||||
<view class="roomstatus" style="color: #fa2306;" v-else>已停播
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
<scroll-view scroll-top="0" scroll-y="true" class="goods_body_scroll" v-if="isindex==1">
|
||||
<view v-for="(pp,index) in dataList" :key="index">
|
||||
<view class="roomsbox-a">
|
||||
<view class="roomsbox-title">
|
||||
{{pp.date}}
|
||||
</view>
|
||||
<view class="roomsbox">
|
||||
<view class="roomblock" style="border: 1px solid #e1d9d4;" v-for="(room,j) in pp.records"
|
||||
:key="j" @click="hsitroyjump(room)">
|
||||
<image :src="room.cover" mode="aspectFill" v-if="room.cover"></image>
|
||||
<image src="/static/lw/6.gif" mode="aspectFill" v-else></image>
|
||||
<view class="livetitle">{{room.live_name}}</view>
|
||||
<view class="roomstatus-d" v-if="room.status==1" style="background-color: #09BB07;">
|
||||
</view>
|
||||
<view class="roomstatus-d" v-else style="background-color: #fa2306;">
|
||||
</view>
|
||||
<view class="roomstatus-d" v-if="room.status==3" style="background-color: #e1d9d4;">
|
||||
</view>
|
||||
<view class="roomstatus" style="color: #00B26A;" v-if="room.status==1">直播中
|
||||
</view>
|
||||
<view class="roomstatus" style="color: #fa2306;" v-else>已停播
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
<view class="noshuju" v-if="roomList.length==0&&isindex==0">
|
||||
<emptyPage title="暂无房间信息"></emptyPage>
|
||||
</view>
|
||||
<view class="noshuju" v-if="dataList.length==0&&isindex==1">
|
||||
<emptyPage title="暂无房间信息"></emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import {
|
||||
live,
|
||||
playbackList
|
||||
} from '@/api/live.js'
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
emptyPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
device_height: 380,
|
||||
page: 1,
|
||||
dataindex: 1,
|
||||
page_data: true,
|
||||
list: [{
|
||||
name: '直播精选'
|
||||
},
|
||||
{
|
||||
name: '历史直播'
|
||||
},
|
||||
|
||||
],
|
||||
roomList: [],
|
||||
dataList:[],
|
||||
user: [],
|
||||
index: 0,
|
||||
isGetLoginInfo: true,
|
||||
isindex: 0,
|
||||
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getRoomList()
|
||||
this.getbackList()
|
||||
},
|
||||
onShow() {},
|
||||
onReachBottom() {
|
||||
this.getRoomList()
|
||||
},
|
||||
|
||||
onPullDownRefresh: function() {
|
||||
console.log('下拉刷新')
|
||||
this.getRoomList()
|
||||
this.getbackList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
//输入
|
||||
change(e) {
|
||||
// console.log(e)
|
||||
if (e.detail.value.length <= 0) {
|
||||
this.page = 1
|
||||
this.getRoomList()
|
||||
}
|
||||
},
|
||||
//查询
|
||||
search() {
|
||||
this.page = 1
|
||||
this.roomList=[]
|
||||
this.dataList=[]
|
||||
if (this.isindex == 0) {
|
||||
this.getRoomList()
|
||||
} else {
|
||||
this.getbackList()
|
||||
}
|
||||
},
|
||||
//分类
|
||||
zhisort(i) {
|
||||
this.isindex = i
|
||||
this.page = 1
|
||||
this.keyword=''
|
||||
this.roomList=[]
|
||||
this.dataList=[]
|
||||
if (i == 0) {
|
||||
this.getRoomList()
|
||||
} else {
|
||||
this.getbackList()
|
||||
}
|
||||
},
|
||||
getbackList: function() {
|
||||
playbackList({
|
||||
page_size: 100,
|
||||
page: this.page,
|
||||
app_name: 'shop',
|
||||
keyword: this.keyword
|
||||
}).then(res => {
|
||||
|
||||
if (res.data.lists.length > 0) {
|
||||
|
||||
// 初始化一个空数组来存储结果
|
||||
let result = [];
|
||||
|
||||
// 遍历每一条直播记录
|
||||
for (let i = 0; i < res.data.lists.length; i++) {
|
||||
let record = res.data.lists[i];
|
||||
let date = record.date;
|
||||
|
||||
// 检查结果数组中是否已存在该日期的分组
|
||||
let group = result.find((item) => item.date === date);
|
||||
|
||||
// 如果不存在,则创建一个新的分组
|
||||
if (!group) {
|
||||
group = {
|
||||
date: date,
|
||||
records: []
|
||||
};
|
||||
result.push(group);
|
||||
}
|
||||
|
||||
// 将当前记录添加到对应的分组中
|
||||
group.records.push(record);
|
||||
}
|
||||
|
||||
this.dataList = result
|
||||
|
||||
// 输出结果
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 拉取房间列表
|
||||
* @return {[type]}
|
||||
* [description]
|
||||
*/
|
||||
getRoomList() {
|
||||
live({
|
||||
page_size: 10,
|
||||
page: this.page,
|
||||
app_name: 'shop',
|
||||
keyword: this.keyword
|
||||
}).then(res => {
|
||||
|
||||
if (res.data.code = 1) {
|
||||
uni.hideLoading()
|
||||
if (res.data.lists.length > 0) {
|
||||
let list = res.data.lists;
|
||||
let productList = this.$util.SplitArray(list, this.roomList);
|
||||
setTimeout(() => {
|
||||
this.$set(this, 'roomList', productList);
|
||||
}, 500)
|
||||
this.page = this.page + 1
|
||||
}
|
||||
|
||||
}else{
|
||||
uni.showModal({
|
||||
title:res.msg
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//历史直播间
|
||||
hsitroyjump: function(e) {
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/room/histroyroom'+'?data=' + encodeURIComponent(JSON.stringify(e))
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
jump: function(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/room/spectator' + '?data=' + encodeURIComponent(JSON.stringify(e))
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.goods_body_scroll {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.search_content {
|
||||
margin: 0 auto;
|
||||
width: 724rpx;
|
||||
height: 64rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border-radius: 175rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 21rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #FCB9AD;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.icon-sousuo {
|
||||
font-size: 26.32rpx;
|
||||
font-weight: bold;
|
||||
color: #c8c7c6;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
|
||||
.search_btn {
|
||||
color: #fff;
|
||||
width: 105.26rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
background: #f84221;
|
||||
border-radius: 100px;
|
||||
font-size: 28.07rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.banner {
|
||||
display: flex;
|
||||
padding-left: 28rpx;
|
||||
|
||||
}
|
||||
|
||||
.banner-detail {
|
||||
width: 133rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.banner-name {
|
||||
font-size: 33rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.banner-t {
|
||||
width: 46px;
|
||||
height: 0rpx;
|
||||
opacity: 1;
|
||||
border: 2rpx solid #F84221;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.noshuju {
|
||||
height: 760upx;
|
||||
}
|
||||
|
||||
.mico-18 {
|
||||
margin-top: 10upx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.view_body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.roomsbox-title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
margin-bottom: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.roomstatus-d {
|
||||
width: 20upx;
|
||||
height: 20upx;
|
||||
border-radius: 20upx;
|
||||
position: absolute;
|
||||
left: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
|
||||
.roomstatus {
|
||||
position: absolute;
|
||||
left: 40upx;
|
||||
top: 10upx;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.livetitle {
|
||||
position: absolute;
|
||||
bottom: 20upx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 70upx;
|
||||
line-height: 70upx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
padding: 20upx;
|
||||
top: 0;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
width: 95%;
|
||||
background-color: #FFFFFF;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.top_li {
|
||||
font-size: 32upx;
|
||||
padding: 0 20upx;
|
||||
display: table-cell;
|
||||
/* vertical-align:bottom; */
|
||||
padding-top: 10upx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.top-lable-box {
|
||||
/* #ifdef APP-PLUS */
|
||||
/* flex: 1; */
|
||||
|
||||
/* #endif */
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.active {
|
||||
font-size: 40upx;
|
||||
font-weight: 800;
|
||||
color: #333333;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.roomsbox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.roomblock {
|
||||
width: 45%;
|
||||
height: 300upx;
|
||||
border-radius: 10upx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20upx;
|
||||
position: relative;
|
||||
margin-left: 2.5%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.right_top_scroll {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.scroll-view {
|
||||
display: inline-block;
|
||||
margin-right: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 10rpx;
|
||||
|
||||
}
|
||||
|
||||
.view_body {
|
||||
background: #FFFFFF;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mico-14 {
|
||||
margin-right: 4upx;
|
||||
}
|
||||
|
||||
.noshuju {
|
||||
height: 750upx;
|
||||
}
|
||||
|
||||
.noshuju_ico {
|
||||
width: 120upx;
|
||||
height: 80upx;
|
||||
margin: 0 auto;
|
||||
margin-top: 300rpx;
|
||||
|
||||
}
|
||||
|
||||
.noshuju_ico image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mico-18 {
|
||||
margin-top: 10upx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.create-but {
|
||||
background-color: #1ce0c5;
|
||||
width: 120upx;
|
||||
height: 60upx;
|
||||
line-height: 60upx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
border-radius: 10upx;
|
||||
/* #ifdef MP-WEIXIN */
|
||||
margin-left: 40upx;
|
||||
/* #endif */
|
||||
margin-top: 4upx;
|
||||
}
|
||||
</style>
|
@ -1,358 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;z-inde:-1;'">
|
||||
<!--
|
||||
1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view
|
||||
2.为了 视频无限加载,已经把 21 行的 appear 去掉了,加上了 loadmore 方法(第10行)
|
||||
3.由于方法比较多,可以采取下面的方式查看代码:
|
||||
(1)Mac:按住 option 键,然后点击方法名,即可跳转到方法
|
||||
(2)windows:按住 Alt 键,然后鼠标左击,即可跳转到方法
|
||||
-->
|
||||
<list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false"
|
||||
ref="listBox" :pagingEnabled="true" :scrollable="true">
|
||||
<!-- 循环数据 -->
|
||||
<cell v-for="(item,i) in dataList" :key="i">
|
||||
<!-- 用div把视频模组套起来 -->
|
||||
<div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
|
||||
<!-- <view v-if="Math.abs(k-i)<=1"> -->
|
||||
<view v-if="Math.abs(k-i)<=1">
|
||||
<view class="root">
|
||||
<video :ref="'item'+i" :id="item.id" :loop="true" :autoplay="i == k"
|
||||
:src="item.pull_url" :muted="item.isplay" :enable-progress-gesture="false"
|
||||
:page-gesture="false" :controls="false" :show-loading="true" :is-live='true'
|
||||
@error='vedioerr' :show-fullscreen-btn="false" :show-center-play-btn="false"
|
||||
:style="boxStyle" :object-fit="object_fit" @timeupdate="timeupdate($event,i)">
|
||||
|
||||
</video>
|
||||
<!-- {{item}} {{i}} -->
|
||||
|
||||
</view>
|
||||
<sd-float-page :room='room' :msgList='msgList' :heightG='boxStyle.height'
|
||||
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;position: absolute;' "></sd-float-page>
|
||||
</view>
|
||||
|
||||
</div>
|
||||
</cell>
|
||||
</list>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import list from '@/uni_modules/uview-ui/libs/config/props/list';
|
||||
import sdFloatPage from '@/components/sd-live-page/livepage.nvue';
|
||||
import {
|
||||
VUE_APP_WS_URL
|
||||
} from '@/config/app';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
sdFloatPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imgHost: '',
|
||||
//下面打🌟号的是必须要的基础字段
|
||||
//下面打💗号的是拥有滑动条的必须字段
|
||||
dataList: [
|
||||
'rtmp://live.lihaink.cn/ceshi/ceshi?auth_key=1697453509-0-0-c086ad0c4d8c581e26438a7a99a9f40f',
|
||||
'rtmp://live.lihaink.cn/ceshi/ceshi?auth_key=1697453509-0-0-c086ad0c4d8c581e26438a7a99a9f40f'
|
||||
], //用于数据循环的列表🌟💗
|
||||
wHeight: 0, //获取的屏幕高度🌟💗
|
||||
boxStyle: { //视频,图片封面样式🌟💗
|
||||
'height': 0,
|
||||
'width': 0,
|
||||
},
|
||||
k: 0, //默认为0🌟💗
|
||||
max: 2,
|
||||
playIngIds: [], //正在播放的视频id列队,列队用于处理滑动过快导致的跳频问题🌟💗
|
||||
ready: false, //可忽略
|
||||
isDragging: false, //false代表停止滑动🌟💗
|
||||
refreshing: true, //用于下拉刷新🌟💗
|
||||
windowWidth: 0, //获取屏幕宽度🌟💗
|
||||
windowHeight: 0,
|
||||
dex: [0, 0], //用于判断是上滑还是下滑,第一个存旧值,第二个存新值【目前在1.0.7已经废弃】
|
||||
currents: 0, //用于左右滑动,0代表视频界面,1代表右滑界面🌟💗
|
||||
platform: '', //用于获取操作系统:ios、android🌟💗
|
||||
playIng: false, //用于视频初始化时是否播放,默认不播放🌟💗
|
||||
videoTime: '', //视频总时长,这个主要用来截取时间数值💗
|
||||
videoTimes: '', //视频时长,用这个来获取时间值,例如:00:30这个时间值💗
|
||||
changeTime: '', //显示滑动进度条时变化的时间💗
|
||||
isShowimage: false, //是否显示封面【1.0.4已废弃,但是意思需要记住】
|
||||
currenttimes: 0, //当前时间💗
|
||||
isShowProgressBarTime: false, //是否拖动进度条,如果拖动(true)则显示进度条时间,否则不显示(false)【1.0.4已废弃,但是意思需要记住】
|
||||
ProgressBarOpacity: 0.7, //进度条不拖动时的默认值,就是透明的💗
|
||||
dotWidth: 0, //播放的小圆点,默认没有💗
|
||||
deleteHeight: 0, //测试高度🌟💗
|
||||
percent: 0, //百分小数💗
|
||||
currentPosition: 0, //滑块当前位置💗//2.0已弃用,现已用于后端参数
|
||||
currentPositions: 0, //滑块当前位置的副本💗//2.0已弃用,现已用于后端参数
|
||||
newTime: 0, //跟手滑动后的最新时间💗
|
||||
timeNumber: 0, //🌟💗
|
||||
ProgressBarBottom: 20, //进度条离底部的距离💗
|
||||
object_fit: 'cover', //视频样式默认包含🌟💗
|
||||
mode: 'aspectFit', //图片封面样式🌟💗
|
||||
timeout: "", //🌟用来阻止 setTimeout()方法
|
||||
voice: "", //🌟用来阻止 setTimeout()方法
|
||||
oldVideo: "",
|
||||
isAutoplay: false, //是否开启自动播放(默认不开启)
|
||||
autoplayText: "开启自动播放",
|
||||
msgList: [],
|
||||
room: {},
|
||||
socketTask: null,
|
||||
userName: '',
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
async k(new_k, old_k) { //监听 k 值的变化,可以控制视频的播放与暂停
|
||||
const max = new_k + 2;
|
||||
if (this.max < max) {
|
||||
this.max = max;
|
||||
}
|
||||
// if (this.oldCurrent != this.currentNav) {
|
||||
// this.oldCurrent = this.currentNav
|
||||
// return false
|
||||
// }
|
||||
this.dataList[old_k].playIng = false //如果视频暂停,就加载封面
|
||||
this.dataList[old_k].isplay = true
|
||||
this.dataList[old_k].state = 'pause'
|
||||
// console.log('预留第' + (old_k) + '个视频:' + this.dataList[old_k].community_id)
|
||||
// 2.0版本已经去掉了下面这一句,视频不用暂停,只需要把声音禁止就行
|
||||
uni.createVideoContext(this.dataList[old_k].community_id, this)
|
||||
.pause() //如果视频暂停,那么旧视频停止,这里的this.dataList[old_k].id + '' + old_k,后面加 old_k 是为了每一个视频的 id 值不同,这样就可以大程度的避免串音问题
|
||||
// console.log('已经暂停 --> 第' + (old_k) + '个视频~') //提示
|
||||
this.dataList[new_k].state = 'play'
|
||||
this.dataList[new_k].isplay = false
|
||||
this.dataList[new_k].playIng = true
|
||||
uni.createVideoContext(this.dataList[new_k].community_id, this).play()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
uni.hideLoading();
|
||||
// console.log('回到前台' + this.dataList.length);
|
||||
if (this.dataList.length !== 0) {
|
||||
this.dataList[this.k].state = 'play';
|
||||
setTimeout(() => {
|
||||
uni.createVideoContext(this.dataList[this.k].id, this).play()
|
||||
}, 250)
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
this.dataList[this.k].state = 'pause'; //界面隐藏也要停止播放视频
|
||||
setTimeout(() => {
|
||||
uni.createVideoContext(this.dataList[this.k].community_id, this).pause(); //暂停以后继续播放
|
||||
}, 250)
|
||||
// console.log('到后台');
|
||||
},
|
||||
onLoad(options) {
|
||||
this.platform = uni.getSystemInfoSync().platform
|
||||
this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度
|
||||
this.boxStyle.width = this.windowWidth + 'px' //给宽度加px
|
||||
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
|
||||
this.boxStyle.height = this.wHeight; //改变视频高度
|
||||
console.log(this.boxStyle.height)
|
||||
this.room = JSON.parse(decodeURIComponent(options.data));
|
||||
this.get()
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
Ready() {},
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
autoPlay() {
|
||||
this.isAutoplay = !this.isAutoplay;
|
||||
if (!this.isAutoplay) {
|
||||
this.autoplayText = "开启自动播放"
|
||||
uni.showToast({
|
||||
title: "关闭自动播放",
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
} else {
|
||||
this.autoplayText = "关闭自动播放"
|
||||
uni.showToast({
|
||||
title: "开启自动播放",
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
// 这里就是数据加载完以后再向后端发送数据的地方,
|
||||
|
||||
|
||||
},
|
||||
vedioerr(e) {
|
||||
let timer = null
|
||||
if (e.tye = 'error') {
|
||||
timer = setInterval((res) => {
|
||||
uni.createVideoContext('myVideo', this).play()
|
||||
console.log('重新连接', '1111111111')
|
||||
}, 600000)
|
||||
} else {
|
||||
timer = null
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
touchstart(event) {
|
||||
this.dataList[this.k].isShowimage = true //刚触摸的时候就要显示预览视频图片了
|
||||
this.dataList[this.k].isShowProgressBarTime = true //显示时间线
|
||||
this.ProgressBarOpacity = 1 //让滑块显示起来更明显一点
|
||||
this.dotWidth = 10 //让点显示起来更明显一点
|
||||
},
|
||||
touchend() { //当手松开后,跳到最新时间
|
||||
uni.createVideoContext(this.dataList[this.k].community_id, this).seek(this.newTime)
|
||||
if (this.dataList[this.k].state == 'pause') {
|
||||
this.dataList[this.k].state = 'play'
|
||||
uni.createVideoContext(this.dataList[this.k].community_id, this).play()
|
||||
}
|
||||
this.dataList[this.k].isShowProgressBarTime = false //触摸结束后,隐藏时间线
|
||||
this.dataList[this.k].isShowimage = false //触摸结束后,隐藏时间预览
|
||||
this.ProgressBarOpacity = 0.5 //隐藏起来进度条,不那么明显了
|
||||
this.dotWidth = 0 //隐藏起来进度条,不那么明显了
|
||||
},
|
||||
touchmove(event) { //当手移动滑块时,计算位置、百分小数、新的时间
|
||||
var msg = []
|
||||
if (this.videoTime !== '') {
|
||||
msg = this.videoTime.split(':')
|
||||
}
|
||||
var timeNumber = Number(msg[0]) * 60 + Number(msg[1])
|
||||
this.currentPositions = event.changedTouches[0].screenX
|
||||
this.percent = this.currentPositions / this.windowWidth
|
||||
this.newTime = this.percent * timeNumber
|
||||
this.currenttimes = parseInt(this.newTime)
|
||||
let theTime = this.newTime
|
||||
let middle = 0; // 分
|
||||
if (theTime > 60) {
|
||||
middle = parseInt(theTime / 60);
|
||||
theTime = parseInt(theTime % 60);
|
||||
}
|
||||
this.changeTime =
|
||||
`${Math.round(middle)>9?Math.round(middle):'0'+Math.round(middle)}:${Math.round(theTime)>9?Math.round(theTime):'0'+Math.round(theTime)}`
|
||||
},
|
||||
timeupdate(event, index) { //计算滑块当前位置,计算当前百分小数
|
||||
if (index == this.k) {
|
||||
var currenttime = event.detail.currentTime
|
||||
this.timeNumber = Math.round(event.detail.duration)
|
||||
this.getTime()
|
||||
this.percent = currenttime / this.timeNumber
|
||||
this.currentPosition = this.windowWidth * this.percent
|
||||
let theTime = currenttime
|
||||
let middle = 0; // 分
|
||||
if (theTime > 60) {
|
||||
middle = parseInt(theTime / 60);
|
||||
theTime = parseInt(theTime % 60);
|
||||
}
|
||||
this.changeTime =
|
||||
`${Math.round(middle)>9?Math.round(middle):'0'+Math.round(middle)}:${Math.round(theTime)>9?Math.round(theTime):'0'+Math.round(theTime)}`
|
||||
//自动切换视频
|
||||
if (this.isAutoplay) { //true,代表自动播放
|
||||
if (Math.round(currenttime) == this.timeNumber - 1) {
|
||||
const dom = uni.requireNativePlugin('dom')
|
||||
let doms = 'item' + (this.k + 1)
|
||||
setTimeout(() => {
|
||||
let el = this.$refs[doms][0]
|
||||
dom.scrollToElement(el, {
|
||||
offset: 0,
|
||||
animated: true
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
getTime() { //得到时间函数
|
||||
this.videoTime = this.formatSeconds(this.timeNumber);
|
||||
var msg = []
|
||||
if (this.videoTime !== '') {
|
||||
msg = this.videoTime.split(':')
|
||||
}
|
||||
this.videoTimes = `${msg[0]>9?msg[0]:'0'+msg[0]}:${msg[1]>9?msg[1]:'0'+msg[1]}`;
|
||||
},
|
||||
formatSeconds(value) { //获取时间函数
|
||||
let theTime = parseInt(value); // 秒
|
||||
let middle = 0; // 分
|
||||
if (theTime > 60) {
|
||||
middle = parseInt(theTime / 60);
|
||||
theTime = parseInt(theTime % 60);
|
||||
}
|
||||
return `${middle>9?middle:middle}:${theTime>9?theTime:theTime}`;
|
||||
},
|
||||
moreVideo(index) {
|
||||
|
||||
},
|
||||
toVideo(index) {
|
||||
|
||||
},
|
||||
scrolls(event) {
|
||||
|
||||
this.showManage = false;
|
||||
this.isDragging = event.isDragging;
|
||||
if (!event.isDragging) { //isDragging:判断用户是不是在滑动,滑动:true,停止滑动:false。我们要用户停止滑动时才给 k 赋值,这样就可以避免很多麻烦
|
||||
var i = Math.round(Math.abs(event.contentOffset.y) / (this.wHeight - this.deleteHeight +
|
||||
1)) //先用绝对值取出滑动的距离,然后除以屏幕高度,取一个整,就知道你现在滑动到哪一个视频了
|
||||
if (i !== this.k) { //这里加判断是因为这个方法会执行很多次,会造成重复请求,所以这里写一个限制
|
||||
if (uni.getSystemInfoSync().platform == 'ios') {
|
||||
this.k = i //判断了用户没有滑动,确认了用户的确是在看这个视频,然后就赋值啦
|
||||
this.dataList[this.k].state = 'play'
|
||||
// console.log('正在播放 --> 第' + (this.k + 1) + '个视频~')
|
||||
} else {
|
||||
clearTimeout(this.timers);
|
||||
this.timers = setTimeout(() => {
|
||||
this.k = i //判断了用户没有滑动,确认了用户的确是在看这个视频,然后就赋值啦
|
||||
this.dataList[this.k].state = 'play'
|
||||
// console.log('正在播放 --> 第' + (this.k + 1) + '个视频~')
|
||||
}, 80)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
get() {
|
||||
let that = this
|
||||
var msg = [this.room];
|
||||
// console.log(this.room)
|
||||
for (let i = 0; i < msg.length; i++) {
|
||||
msg[i]['isMore'] = false
|
||||
msg[i]['playIng'] = false
|
||||
msg[i]['state'] = false
|
||||
msg[i]['isplay'] = false
|
||||
msg[i]['loading'] = false
|
||||
msg[i]['id'] = msg[i]['live_stream_id'].toString()
|
||||
}
|
||||
this.dataList = msg;
|
||||
|
||||
if (this.dataList.length !== 0) {
|
||||
|
||||
this.dataList[this.k].state = 'play';
|
||||
uni.createVideoContext(this.dataList[this.k].id, this).play()
|
||||
this.page = that.page + 1
|
||||
}
|
||||
|
||||
},
|
||||
onpullingdown() {
|
||||
this.refreshing = true
|
||||
},
|
||||
onrefresh() {
|
||||
setTimeout(() => {
|
||||
this.refreshing = false
|
||||
}, 1000)
|
||||
},
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
uni.$emit('onReachBottom');
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -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>
|
@ -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>
|
@ -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 CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | 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>
|
@ -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
|
||||
// 小程序保存图片
|
||||
|
@ -39,14 +39,14 @@
|
||||
<view class="record flex">
|
||||
<view class="circle"></view>
|
||||
<view class="cont-box">
|
||||
<view class="title">签署里海云《履约押金协议》</view>
|
||||
<view class="title">签署里海云《履约保证金协议》</view>
|
||||
<view class="text-box">
|
||||
<view class="have-filled" v-if="false">
|
||||
<text>1.完成签署履约押金协议2023-05-08 13:15完成</text>
|
||||
<text>1.完成签署履约保证金协议2023-05-08 13:15完成</text>
|
||||
</view>
|
||||
<view class="get-through" v-else>
|
||||
<text class="through-title">1、签署里海云《履约押金协议》</text>
|
||||
<text>请详细阅读里海云履约押金协议,并充分理解内容后进行电子签名。</text>
|
||||
<text class="through-title">1、签署里海云《履约保证金协议》</text>
|
||||
<text>请详细阅读里海云履约保证金协议,并充分理解内容后进行电子签名。</text>
|
||||
<view class="flex_a_c" style="margin-top: auto;">
|
||||
<view class="through-btn">签署协议</view>
|
||||
<view class="tiaoguo">跳过</view>
|
||||
@ -58,16 +58,16 @@
|
||||
<view class="record flex">
|
||||
<view class="circle"></view>
|
||||
<view class="cont-box">
|
||||
<view class="title">缴纳履约押金</view>
|
||||
<view class="title">缴纳履约保证金</view>
|
||||
<view class="text-box">
|
||||
<view class="have-filled" v-if="!true">
|
||||
<text>1.完成履约押金缴纳 2023-05-08 13:15完成</text>
|
||||
<text>1.完成履约保证金缴纳 2023-05-08 13:15完成</text>
|
||||
</view>
|
||||
<view class="get-through" v-else>
|
||||
<text class="through-title">1、缴纳履约押金</text>
|
||||
<text>线上缴纳履约押金,完成押金审核后签约完成。</text>
|
||||
<text class="through-title">1、缴纳履约保证金</text>
|
||||
<text>线上缴纳履约保证金,完成保证金审核后签约完成。</text>
|
||||
<view class="flex_a_c" style="margin-top: auto;">
|
||||
<view class="through-btn">缴纳履约押金</view>
|
||||
<view class="through-btn">缴纳履约保证金</view>
|
||||
<view class="tiaoguo">跳过</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -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,15 +866,12 @@
|
||||
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 (this.loadend == false) {
|
||||
// this.getProductSpu()
|
||||
// } else {;
|
||||
// this.getGoods();
|
||||
// }
|
||||
if (data.bottom < 1500 && data.top < 0) {
|
||||
if (this.loadend == false) {
|
||||
this.getProductSpu()
|
||||
} else {
|
||||
this.getGoods();
|
||||
}
|
||||
}
|
||||
}).exec();
|
||||
// 模拟触底刷新
|
||||
@ -886,7 +882,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();
|
||||
@ -1012,7 +1008,6 @@
|
||||
|
||||
if (res.data.business_status == 2) {
|
||||
this.isLihaiYun === 'Lihai' ? this.tabs = this.tabs4 : this.tabs = this.tabs3
|
||||
this.type=7
|
||||
} else {
|
||||
this.tabs = this.tabs5
|
||||
this.type=7
|
||||
@ -1273,7 +1268,6 @@
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
console.log('触底');
|
||||
// 模拟触底刷新
|
||||
if (this.tabActive == 0) {
|
||||
setTimeout(() => {
|
||||
|
@ -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;
|
||||
|
@ -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">(图片格式支持JPG、PNG、JPEG)</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张,图片格式支持JPG、PNG、JPEG)</text>
|
||||
<view class="upload">
|
||||
<view class='pictrue' v-for="(item,index) in pics" :key="index" :data-index="index"
|
||||
@ -267,23 +218,19 @@
|
||||
<view style="margin: 20rpx 0;">甲方公司:{{company?company:"暂无公司信息"}}</view>
|
||||
<view style="margin: 20rpx 0;">机构代码:{{organization_code?organization_code:"暂无公司信息"}}</view>
|
||||
|
||||
<view class="contenta" v-if="detail.mer_services_agree">
|
||||
<view class="contenta">
|
||||
<jyf-parser :html="detail.mer_services_agree" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
|
||||
</view>
|
||||
<view class="contenta" v-else>
|
||||
<jyf-parser :html="detail.mer_supply_agree" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
|
||||
</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 +270,10 @@
|
||||
create,
|
||||
verify,
|
||||
merClassifly,
|
||||
getCategoryList,
|
||||
getGoodsDetails,
|
||||
updateGoodsRecord,
|
||||
getStoreTypeApi,
|
||||
agreeiness,
|
||||
merchantLicenseIdentify
|
||||
agreeiness
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
getCaptcha,
|
||||
@ -355,7 +300,6 @@
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
import { Toast } from '../../../libs/uniApi';
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
@ -388,10 +332,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 +344,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 +408,8 @@ import { Toast } from '../../../libs/uniApi';
|
||||
this.getGoodsDetails(options.mer_i_id)
|
||||
})
|
||||
}
|
||||
else this.getArea()
|
||||
this.getArea()
|
||||
this.shoplist()
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45;
|
||||
},
|
||||
onShow() {
|
||||
@ -531,10 +471,9 @@ import { Toast } from '../../../libs/uniApi';
|
||||
},
|
||||
|
||||
//获取商户入驻申请协议
|
||||
shoplist(val) {
|
||||
|
||||
shoplist() {
|
||||
agreeiness({
|
||||
type: val
|
||||
type: 'mer_services_agree'
|
||||
}).then(res => {
|
||||
this.detail = res.data
|
||||
})
|
||||
@ -551,34 +490,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 +548,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 +558,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 +588,30 @@ 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)
|
||||
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 +643,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 +705,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 +808,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 +846,7 @@ import { Toast } from '../../../libs/uniApi';
|
||||
that.validate = true;
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
}).catch(res => {
|
||||
this.isshow = false
|
||||
that.validate = true;
|
||||
@ -998,7 +858,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 +945,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 +986,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 +1002,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 +1043,6 @@ import { Toast } from '../../../libs/uniApi';
|
||||
background-color: var(--view-theme) !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.conten-top {
|
||||
width: 100%;
|
||||
@ -1230,8 +1083,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 +1393,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 +1463,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 +1500,7 @@ import { Toast } from '../../../libs/uniApi';
|
||||
|
||||
.setAgCountbtnc {
|
||||
margin-top: 40rpx;
|
||||
// width: 200rpx;
|
||||
width: 200rpx;
|
||||
height: 74rpx;
|
||||
text-align: center;
|
||||
line-height: 74rpx;
|
||||
@ -1660,22 +1513,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
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user