Compare commits

...

2 Commits

Author SHA1 Message Date
jia 3b71a23fbc 界面优化 2023-09-26 20:41:49 +08:00
jia f040461730 界面以及功能更改 2023-09-25 09:28:22 +08:00
56 changed files with 2739 additions and 357 deletions

10
App.vue
View File

@ -86,15 +86,7 @@
}
// #ifdef APP-PLUS
//uni
mp.onUniMPEventReceive(ret => {
console.log('小程序事件: ', ret);
if (ret.event == 'closeApp') {
mp.closeUniMP(ret.fromAppid, (ret) => {
console.log('closeUniMP: ' + JSON.stringify(ret));
});
}
});
// #endif
let that = this;

View File

@ -305,3 +305,8 @@ export function paymerchant() {
export function merchant(data) {
return request.get(`store/merchant/margin`, data);
}
//获取保证金缴纳列表
export function marginlist(data) {
return request.get(`user/margin/list`,data);
}

View File

@ -580,3 +580,6 @@ export function vicinityStoreApi(data) {
export function agreeiness(data) {
return request.get(`business/agree`, data, { noAuth: true });
}

View File

@ -8,6 +8,8 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
import request1 from "@/utils/requestb.js";
import Cache from '@/utils/cache'
/**
* 获取版本信息
@ -721,3 +723,10 @@ export function getBillDetil() {
return request.get(`mer/financial_record`)
}
//获取商户入驻所签署公司
export function merstreet(data) {
return request1.get(`company/street_company`, data);
}

View File

@ -0,0 +1,64 @@
<template>
<view class="returnbom">
<view class="z-bootm">
<view class="z-bootm-img">
<image src="@/static/tabbar_icon/a-a.png" mode="aspectFit"></image>
</view>
<view class="" @click="returnbom">返回首页</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
returnbom() {
uni.reLaunch({
url:'/pages/index/index'
})
}
}
}
</script>
<style lang="scss">
.returnbom {
height: 130rpx;
background: #FFFFFF;
border-radius: 32rpx 32rpx 0px 0px;
padding-top: 50rpx;
}
.z-bootm {
width: 180rpx;
margin: 0 auto;
display: flex;
.z-bootm-img {
width: 46rpx;
height: 46rpx;
image {
width: 100%;
height: 100%;
}
}
font-size: 30rpx;
font-family: PingFang SC-Regular,
PingFang SC;
font-weight: 400;
color: #333333;
}
</style>

View File

@ -0,0 +1,90 @@
<template>
<view class="contentgb">
<view class="return_top">
<view class="z-bootm-img1" @click="returnbom()">
<image src="@/static/images/fb1.png" mode="aspectFit"></image>
</view>
<view class="z-bootm-l"></view>
<view class="z-bootm-img2" @click="returnbom()">
<image src="@/static/images/fb2.png" mode="aspectFit"></image>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
returnbom() {
uni.sendHostEvent('closeApp', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
}
}
}
</script>
<style lang="scss" scoped>
.contentgb {
width: 166rpx;
height: 56rpx;
.return_top {
width: 166rpx;
height: 56rpx;
background: rgba(255, 255, 255, 0.6);
border-radius: 44rpx 44rpx;
position: relative;
.z-bootm-img1 {
width: 41rpx;
height: 13rpx;
position: absolute;
top: 5rpx;
left: 25rpx;
image {
width: 100%;
height: 100%;
}
}
.z-bootm-l {
width: 1px;
height: 32rpx;
background: rgba(0, 0, 0, 0.2);
margin: auto 0;
position: absolute;
top: 10rpx;
left: 85rpx;
}
.z-bootm-img2 {
width: 38rpx;
height: 34rpx;
margin-top: -15rpx;
margin-left: -15rpx;
position: absolute;
right: 25rpx;
top: 25rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
</style>

View File

@ -6,37 +6,37 @@ let openPlantGrass = '-openPlantGrass-'
let httpApi
let httpApiTwo
let httpApiThree
// 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") {
// httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = 'https://test.shop.lihaink.cn' //预发布环境
httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325'
// #ifdef MP-WEIXIN
httpApiTwo = "https://nk.lihaink.cn"
httpApiThree = 'http://ceshi-oa.lihaink.cn'
// #endif
// #ifdef H5
// httpApiTwo = "baseUrl" // h5跨域配置
httpApiTwo = "https://nk.lihaink.cn" // h5跨域配置
// httpApiThree = 'baseUrlTest' // h5跨域配置
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
// #endif
} else if (process.env.NODE_ENV === 'production') {
// httpApi = 'https://shop.lihaink.cn' // 生产
// const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
httpApi ='https://test.shop.lihaink.cn' //预发布环境
switch (env) {
// httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
case 'prod':
httpApi = 'https://shop.lihaink.cn' // 生产
httpApiTwo = 'https://nk.lihaink.cn'
httpApiThree = 'http://ceshi-oa.lihaink.cn'
httpApiFour = 'https://worker-task.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'
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'
}
// httpApi = 'https://shop.lihaink.cn' // 生产
// httpApiTwo = 'https://nk.lihaink.cn' // 生产
// 聊天接口修改此字符 小程序聊天要求wss 例如wss://mer.crmeb.net
// let wsApi = 'ws://192.168.3.20:8324'
@ -49,11 +49,13 @@ module.exports = {
HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL_TWO: httpApiTwo,
HTTP_REQUEST_URL_THREE: httpApiThree,
HTTP_REQUEST_URL_FOUR: httpApiFour,
VUE_APP_WS_URL: `${wsApi}?type=user`,
// #endif
// #ifdef H5
//H5接口是浏览器地址
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,
// 聊天长连接地址

View File

@ -1,9 +1,9 @@
{
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"name" : "惠农商户平台",
"appid" : "__UNI__1EE148C",
"description" : "",
"versionName" : "1.3.9",
"versionCode" : 139,
"versionName" : "1.0.1",
"versionCode" : 101,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -99,7 +99,15 @@
"navigationBarTitleText": "商品管理",
"navigationStyle": "custom"
}
}
},{
"path" : "pages/margin/margin",
"style" :
{
"navigationBarTitleText": "保证金缴纳",
"enablePullDownRefresh": false
}
}
// {
// "path": "pages/gather/gather",

View File

@ -0,0 +1,793 @@
<template>
<view class="statistical-page" ref="container">
<view v-show="isShowBox">
<view class="navs">
<view class="list">
<view class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">
今天
</view>
<view class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">
昨天
</view>
<view class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">
最近7天
</view>
<view class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">
本月
</view>
<view class="item" :class="time == 'date' ? 'on' : ''" @click="dateTitle">
<!-- <span class="iconfont icon-xiangxia"></span>
<span v-for="(value, index) in renderValues" :key="index">
{{ value }}</span
> -->
自定义
</view>
</view>
</view>
<view class="wrapper">
<view v-if="where.type == 1" class="money">{{ time_price }}</view>
<view v-else class="money">{{ time_price }}</view>
<view class="title">
{{ title }}{{ where.type == 1 ? "营业额(元)" : "订单量(份)" }}
</view>
<view class="increase acea-row row-between-wrapper">
<view class="orderno">
<view class="orderno-one">
<image src="@/static/images/tj1.png" mode='aspectFit'>
</view>
<view class="orderno-two">
<view class="orderno-two-title">{{ title }}增长率</view>
<span
:class="increase_time_status === 1 ? 'red' : 'green'">{{ increase_time_status === 1 ? "" : "-" }}{{ growth_rate }}%
</span>
</view>
</view>
<view class="orderno">
<view class="orderno-one">
<image src="@/static/images/tj1.png" mode='aspectFit'>
</view>
<view class="orderno-two">
<view class="orderno-two-title">{{ title }}增长</view>
<span
:class="increase_time_status === 1 ? 'red' : 'green'">{{ increase_time_status === 1 ? "" : "-" }}{{ increase_time }}
</span>
</view>
</view>
</view>
</view>
<view class="chart" v-if="showChart">
<view class="chart-title">
单位{{where.type == 1?'元':'份'}}
</view>
<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" disable-scroll=true
@touchstart="touchLineA" @touchmove="moveLineA" @touchend="touchEndLineA"></canvas>
</view>
<view class="public-wrapper">
<view class="title">
<span class="iconfont icon-xiangxishuju"></span>详细数据
</view>
<view class="nav acea-row row-between-wrapper">
<view class="data">日期</view>
<view class="browse">订单量</view>
<view class="turnover">成交额</view>
</view>
<view class="conter" v-if=" list.length>0">
<view class="item acea-row row-between-wrapper" v-for="(item, index) in list" :key="index">
<view class="data">{{ item.day }}</view>
<view class="browse">{{ item.total }}</view>
<view class="turnover">{{ item.pay_price }}</view>
</view>
</view>
<view class="conter-img" v-else>
<image src="@/static/images/noCart.png" mode="aspectFit"></image>
</view>
</view>
</view>
<conBotm/>
<uni-calendar ref="calendar" :date="info.date" :insert="info.insert" :lunar="info.lunar"
:startDate="info.startDate" :endDate="info.endDate" :range="info.range" @confirm="confirm"
:showMonth="info.showMonth" @close="close" />
<view class="mask" @touchmove.prevent v-show="current === true" @click="close"></view>
<!-- <Loading :loaded="loaded" :loading="loading"></Loading> -->
</view>
</template>
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import uCharts from '@/components/ucharts/ucharts'
import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
import conBotm from '@/components/content-bootom/index.vue'
var canvaLineA = null;
// import Calendar from 'mpvue-calendar'
// #ifdef MP-WEIXIN
// import 'mpvue-calendar/src/style.css
// #endif
// #ifdef H5
// import 'mpvue-calendar/src/browser-style.css'
// #endif
import {
orderPrice,
orderNumberStatistics,
turnoverStatistics
} from "@/api/admin";
// import Loading from "@components/Loading";
const year = new Date().getFullYear();
const month = new Date().getMonth() + 1;
const day = new Date().getDate();
export default {
name: "Statistics",
components: {
// Calendar,
// uCharts
uniCalendar,
conBotm
},
props: {
merid: {
type: String | Number
},
type: {
type: String
},
timetype: {
type: String
},
},
data: function() {
return {
isShowBox: true,
showChart: false,
value: [
[year, month, day - 1],
[year, month, day]
],
isrange: true,
weekSwitch: false,
ismulti: false,
monFirst: true,
clean: false, //
lunar: false, //
renderValues: [],
monthRange: [],
current: false,
where: {
start: "",
stop: "",
type: ""
},
types: "", //|order=|price=
time: "", //|today=|yesterday=|month=
title: "", //|today=|yesterday=|month=
growth_rate: "", //
increase_time: "", //
increase_time_status: "", //
time_price: "", //
order_num: "", //
loaded: false,
loading: false,
filter: {
page: 1,
limit: 10,
start: "",
stop: ""
},
list: [],
// charts
cWidth: '',
cHeight: '',
pixelRatio: 1,
textarea: '',
"LineA": {
"categories": ["2012", "2013", "2014", "2015", "2016", "2017"],
"series": [{
"data": [35, 8, 25, 37, 4, 20]
}]
},
info: {
startDate: '',
endDate: '',
lunar: false,
range: true,
insert: false,
selected: [],
showMonth: false
},
merId: ''
};
},
watch: {
"$route.params": function(newVal) {
var that = this;
if (newVal != undefined) {
that.setType(newVal.type);
that.setTime(newVal.time);
that.getIndex();
}
}
},
onLoad: function(options) {
this.merId = options.merId;
this.setType(options.type);
this.setTime(options.time);
this.cWidth = uni.upx2px(690);
this.cHeight = uni.upx2px(500);
// this.handelRenderValues();
// this.getIndex();
this.getInfo();
// this.$scroll(this.$refs.container, () => {
// !this.loading && this.getInfo();
// });
},
mounted() {
// console.log(this.merid,'1111111111111')
},
computed: {
monthRangeText() {
return this.monthRange.length ? "固定" : "指定范围";
}
},
methods: {
timelist() {
this.merId = this.merid;
this.setType(this.type);
this.setTime(this.timetype);
this.cWidth = uni.upx2px(690);
this.cHeight = uni.upx2px(500);
},
getIndex: function() {
let tempDay = []
let tempNum = []
var that = this;
that.where.type == 1 ?
turnoverStatistics(that.where, that.merId).then(
res => {
var _info = res.data.chart,
day = [],
num = [];
_info.forEach(function(item) {
day.push(item.time);
num.push(item.num);
});
that.growth_rate = res.data.growth_rate;
that.increase_time = res.data.increase_time;
that.increase_time_status = res.data.increase_time_status;
that.time_price = res.data.time;
res.data.chart.forEach((item, index) => {
tempDay.push(item.time)
tempNum.push(item.num)
})
that.LineA.categories = tempDay
that.LineA.series[0].data = tempNum
that.showLineA("canvasLineA", that.LineA);
},
error => {
that.$dialog.error(error.msg);
}
) : orderNumberStatistics(that.where, this.merId).then(
res => {
var _info = res.data.chart,
day = [],
num = [];
_info.forEach(function(item) {
day.push(item.time);
num.push(item.num);
});
that.growth_rate = res.data.growth_rate;
that.increase_time = res.data.increase_time;
that.increase_time_status = res.data.increase_time_status;
that.time_price = res.data.time;
res.data.chart.forEach((item, index) => {
tempDay.push(item.time)
tempNum.push(item.num)
})
that.LineA.categories = tempDay
that.LineA.series[0].data = tempNum
that.showLineA("canvasLineA", that.LineA);
},
error => {
that.$dialog.error(error.msg);
}
)
},
setTime: function(time) {
let self = this
this.time = time;
this.showChart = true;
var year = new Date().getFullYear(),
month = new Date().getMonth() + 1,
day = new Date().getDate();
this.list = [];
this.filter.page = 1;
this.loaded = false;
this.loading = false;
switch (time) {
case "today":
this.showChart = false;
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
1;
this.where.month = 0
this.title = "今日";
this.getIndex();
this.getInfo();
break;
case "yesterday":
this.showChart = false;
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 -
24 * 60 * 60;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 -
1;
this.where.month = 0
this.title = "昨日";
this.getIndex();
this.getInfo();
break;
case "month":
this.where.start =
new Date(year, new Date().getMonth(), 1).getTime() / 1000;
this.where.stop = new Date(year, month, 1).getTime() / 1000 - 1;
this.title = "本月";
this.where.month = 1
this.getIndex();
this.getInfo();
break;
case "seven":
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
7 * 3600 * 24;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
1;
this.title = "七日";
this.where.month = 0
this.getIndex();
this.getInfo();
break;
}
},
setType: function(type) {
switch (type) {
case "price":
this.where.type = 1;
break;
case "order":
this.where.type = 2;
break;
}
},
dateTitle: function() {
this.isShowBox = false
this.$refs.calendar.open()
this.time = 'date'
this.title = "自定义";
this.where.month = 0;
// this.current = true;
},
close: function() {
this.current = false;
this.isShowBox = true
},
getInfo: function() {
var that = this;
if (that.loading || that.loaded) return;
that.loading = true;
that.filter.start = that.where.start;
that.filter.stop = that.where.stop;
orderPrice(that.filter, this.merId).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.filter.limit;
that.list.push.apply(that.list, res.data);
that.filter.page = that.filter.page + 1;
},
error => {
that.$dialog.message(error.msg);
}
)
},
// charts
showLineA(canvasId, chartData) {
let _self = this
canvaLineA = new uCharts({
$this: _self,
canvasId: canvasId,
type: 'line',
fontSize: 11,
padding: [15, 15, 0, 15],
legend: {
show: false,
padding: 5,
lineHeight: 11,
margin: 5,
},
dataLabel: true,
dataPointShape: true,
dataPointShapeType: 'hollow',
background: '#FFFFFF',
pixelRatio: _self.pixelRatio,
categories: chartData.categories,
series: chartData.series,
animation: true,
enableScroll: true, //
xAxis: {
disableGrid: false,
type: 'grid',
gridType: 'dash',
itemCount: 4,
scrollShow: true,
scrollAlign: 'left'
},
yAxis: {
//disabled:true
gridType: 'dash',
splitNumber: 8,
min: 0,
max: 30,
format: (val) => {
return val.toFixed(0)
} //Y
},
width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio,
extra: {
line: {
type: 'straight'
}
},
});
},
// charts
touchLineA(e) {
canvaLineA.scrollStart(e);
},
moveLineA(e) {
canvaLineA.scroll(e);
},
touchEndLineA(e) {
canvaLineA.scrollEnd(e);
},
//
confirm(e) {
let self = this
if (e.range.after && e.range.before) {
// let star = e.range.after ? new Date(e.range.after).getTime()/1000 : new Date(e.fulldate).getTime()/1000
// let stop = e.range.before ? new Date(e.range.before).getTime()/1000 : new Date(e.fulldate).getTime()/1000
let star = new Date(e.range.after + ' 00:00:00').getTime() / 1000
let stop = new Date(e.range.before + ' 00:00:00').getTime() / 1000
self.where.start = star < stop ? star : stop
self.where.stop = (stop > star ? stop : star) - 1 + 86400
self.where.month = 0
self.list = [];
self.filter.page = 1;
self.loaded = false;
self.loading = false;
self.isShowBox = true
Promise.all([self.getIndex(), self.getInfo()]);
}
},
},
onReachBottom() {
this.getInfo();
}
};
</script>
<style>
/*交易额统计*/
.statistical-page .navs {
width: 100%;
overflow: hidden;
line-height: 60upx;
margin-bottom: 49rpx;
}
.orderno {
display: flex;
}
.orderno-one {
width: 58upx;
height: 58upx;
margin-top: 30rpx;
margin-right: 30rpx;
}
.orderno-one image {
width: 58rpx;
height: 58rpx;
}
.orderno-two {
font-size: 37rpx;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 29px;
}
.orderno-two-title {
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.statistical-page .navs .list {
overflow-y: hidden;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
width: 100%;
}
.statistical-page .navs .item {
font-size: 32upx;
color: #282828;
margin-left: 60upx;
display: inline-block;
}
.statistical-page .navs .item.on {
/* color: #2291f8; */
border-bottom: 5rpx solid #F84221;
}
.statistical-page .navs .item .iconfont {
font-size: 25upx;
margin-left: 13upx;
}
.statistical-page .wrapper {
width: 725upx;
background-color: #fff;
border-radius: 10upx;
/* margin: 119upx auto 0 auto; */
margin: 0 auto;
padding: 50upx 60upx;
}
.statistical-page .wrapper .title {
font-size: 30upx;
color: #999;
text-align: center;
}
.statistical-page .wrapper .money {
font-size: 72upx;
/* color: #fba02a; */
color: #F84221;
font-weight: 600;
text-align: center;
margin-top: 10upx;
}
.statistical-page .wrapper .increase {
font-size: 28upx;
color: #999;
margin-top: 20upx;
}
.statistical-page .wrapper .increase .red {
color: #ff6969;
}
.statistical-page .wrapper .increase .green {
color: #1abb1d;
}
.statistical-page .wrapper .increase .iconfont {
font-size: 23upx;
margin-left: 15upx;
}
.statistical-page .chart {
width: 725upx;
background-color: #fff;
border-radius: 10upx;
margin: 23upx auto 0 auto;
/* padding: 25upx 22upx 0 22upx; */
}
.statistical-page .chart .chart-title {
padding: 20upx 20upx 10upx;
font-size: 26upx;
color: #999;
}
.statistical-page .chart canvas {
width: 100%;
height: 530rpx;
}
.statistical-page .chart .company {
font-size: 26upx;
color: #999;
}
.yd-confirm {
background-color: #fff;
font-size: unset;
width: 540upx;
height: 250upx;
border-radius: 40upx;
}
.yd-confirm-hd {
text-align: center;
}
.yd-confirm-title {
color: #030303;
font-weight: bold;
font-size: 36upx;
}
.yd-confirm-bd {
text-align: center;
font-size: 28upx;
color: #333333;
}
.yd-confirm-ft {
line-height: 90upx;
margin-top: 14px;
border-top: 1upx solid #eee;
}
.yd-confirm-ft>a {
color: #e93323;
}
.yd-confirm-ft>a.primary {
border-left: 1upx solid #eee;
color: #e93323;
}
.echarts {
width: 100%;
height: 550upx;
}
.calendar-wrapper {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 777;
transform: translate3d(0, 100%, 0);
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
.calendar-wrapper.on {
transform: translate3d(0, 0, 0);
}
.statistical-page .wrapper .increase {
font-size: 26upx;
}
.statistical-page .wrapper .increase .iconfont {
margin-left: 0;
}
.public-wrapper .title {
font-size: 30upx;
color: #282828;
padding: 0 30upx;
margin-bottom: 20upx;
}
.public-wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
vertical-align: middle;
}
.public-wrapper {
margin: 18upx auto 18upx auto;
width: 725upx;
background-color: #fff;
border-radius: 10upx;
padding-top: 25upx;
}
.public-wrapper .nav {
padding: 0 30upx;
height: 70upx;
line-height: 70upx;
font-size: 24upx;
color: #999;
}
.public-wrapper .data {
width: 210upx;
text-align: left;
}
.public-wrapper .browse {
width: 192upx;
text-align: center;
}
.public-wrapper .turnover {
width: 227upx;
text-align: right;
}
.public-wrapper .conter {
padding: 0 30upx;
}
.public-wrapper .conter .item {
border-bottom: 1px solid #f7f7f7;
height: 70upx;
font-size: 24upx;
}
.conter-img {
width: 650rpx;
height: 400rpx;
margin: 0 auto;
margin-top: 30rpx;
}
.conter-img image {
width: 100%;
height: 100%;
}
.public-wrapper .conter .item .turnover {
color: #d84242;
}
</style>

File diff suppressed because it is too large Load Diff

328
pages/margin/margin.vue Normal file
View File

@ -0,0 +1,328 @@
<template>
<view class="">
<view class="info">
<view class="bg"></view>
<view class="card">
<view class="title">店铺保证金信息</view>
<view class="item">
<text>已缴纳保证金</text>
<text>{{merchant_Data.paid_margin}}</text>
</view>
<view class="item">
<text>缴纳店铺账户</text>
<text>{{merchant_Data.mer_name}}</text>
</view>
</view>
</view>
<view class="price">
<view class="title">缴纳金额</view>
<view class="tab">
<view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view>
</view>
<button class="btn" @click="paydecimal">缴纳</button>
</view>
<!-- <view class="tip">
<view class="title">注意事项</view>
<view class="text">充值后帐户的金额不能提现可用于商城消费使用佣金导入账户之后不能再次导出不可提现账户充值出现问题可联系商城客服也可拨打商城客服热线<text @click="copyPhone('4008888888')">4008888888</text>
</view>
</view> -->
<view class="content-order" v-for="(item,i ) in productList">
<view class="">订单编号{{item.order_sn}}</view>
<view class="">支付金额{{item.total_price}}</view>
<view class="">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view>
<view class="">支付时间{{item.pay_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
</template>
<script>
import {
merchant,
paymerchant,
marginlist
} from '@/api/api.js'
export default {
data() {
return {
mer_id:0,
merchant_Data: {},
where:{
page:1,
limit:10
},
productList:[],
loadend: false,
loading: false,
loadTitle: '加载更多',
}
},
onLoad(e) {
this.mer_id = e.mer_id
this.decimal()
this.list(false)
},
onReachBottom() {
if (this.productList.length > 0) {
setTimeout(() => {
this.list(false);
}, 1000)
}
},
methods: {
list(isPage){
let that = this;
if (that.loadend) return;
if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []);
that.loading = true;
that.loadTitle = '';
marginlist(that.where).then(res => {
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'productList', productList);
}, 500)
// console.log(that.productList)
that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
//
decimal() {
merchant({
id: this.mer_id
}).then((res) => {
this.merchant_Data = res.data
});
},
//
paydecimal() {
if (this.merchant_Data.is_margin != 1) {
this.$util.Tips({
title: '暂时无需缴纳保证金'
});
} else {
uni.showModal({
title: '提示',
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金',
success: function(res) {
if (res.confirm) {
// console.log('');
paymerchant().then((res) => {
console.log(res.data)
uni.requestPayment({
provider: 'wxpay',
orderInfo: res.data
.config, //
success: function(res) {
console.log('success:' + JSON.stringify(res));
},
fail: function(err) {
console.log('fail:' + JSON.stringify(err));
}
});
}).catch((err) => {
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
},
}
}
</script>
<style>
</style>
<style lang="scss">
page {
background-color: #fff;
}
.content-order{
background: #F4F4F4;
border-radius: 21rpx 21rpx ;
margin-top: 30rpx;
padding: 10rpx;
margin-left: 10rpx;
margin-right: 10rpx;
view{
font-size: 30rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin: 20rpx;
}
}
.info {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
height: 250rpx;
.bg {
background-color: #FF5C2D;
height: 170rpx;
width: 100vw;
border-radius: 0rpx 0rpx 28rpx 28rpx;
position: absolute;
top: 0;
left: 0;
}
.card {
width: 694rpx;
min-height: 180rpx;
background: #FFFFFF;
margin-top: 38.55rpx;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 31.5rpx 28rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
position: absolute;
top: 0;
.title {
font-size: 32rpx;
font-weight: 600;
color: #333333;
padding-bottom: 10rpx;
}
.item {
display: flex;
justify-content: space-between;
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-bottom: 10rpx;
text:nth-child(1){
flex-shrink: 0;
margin-right: 18rpx;
}
}
}
}
.price {
display: flex;
flex-direction: column;
padding: 0 28rpx;
margin-top: 50rpx;
.title {
font-size: 32rpx;
font-weight: 600;
color: #333333;
line-height: 39rpx;
margin-bottom: 42rpx;
}
.tab {
display: flex;
flex-wrap: wrap;
justify-content: left;
width: 694rpx;
.item {
width: 217rpx;
height: 131rpx;
margin: 0 auto;
margin-bottom: 20rpx;
border-radius: 7rpx 7rpx 7rpx 7rpx;
border: 2rpx solid #F5F5F5;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 500;
line-height: 32rpx;
}
.active {
border: 2rpx solid #FF5C2D;
color: #FF5C2D;
}
}
.input {
width: 100%;
height: 112rpx;
background: #F5F5F5;
border-radius: 56rpx 56rpx 56rpx 56rpx;
opacity: 1;
padding: 0 45.56rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
color: #333;
line-height: 35rpx;
}
.btn {
width: 694rpx;
height: 84rpx;
margin-top: 73.6rpx;
background: #FF5C2D;
box-shadow: 0rpx 14rpx 44rpx 2rpx #E9EFF5;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #FFFFFF;
}
}
.tip {
display: flex;
flex-direction: column;
padding: 0 28rpx;
margin-top: 84rpx;
.title {
font-size: 32rpx;
font-weight: 500;
color: #FF5C2D;
line-height: 32rpx;
margin-bottom: 21rpx;
}
.text {
font-size: 28rpx;
font-weight: 400;
color: rgba(0, 0, 0, 0.6);
line-height: 42rpx;
-webkit-background-clip: text;
}
}
</style>

View File

@ -1,6 +1,16 @@
<template>
<view class="gather">
<!-- #ifdef MP || APP-PLUS -->
<view class="conten-top">
<view class="" style="position: absolute;left: 30rpx;" @click="logout"><i class="iconfont icon-xiangzuo"
style="font-size: 40rpx;text-align: left;"></i></view>
<view class="" style="font-size: 30rpx;">
商家平台
</view>
</view>
<view style="padding-top:var(--status-bar-height);padding-bottom: 30rpx; margin-bottom: 30rpx;"></view>
<!-- #endif -->
<block v-if="isShow&&userInfoData.mer_info.mer_name">
<view class="" v-if="userInfoData.mer_info.setting_status==1">
<view class="special_work com" v-if="userInfoData.mer_info.type_code === 'TypeSupplyChain'">
@ -187,11 +197,11 @@
</image>
<text class="text">商户设置</text>
</view>
<view class="examine" @click="paydecimal">
<image class="icon_img" src="@/static/images/index20.png" mode="aspectFill">
</image>
<text class="text">保证缴纳金</text>
</view>
<view class="examine" @click="paydecimal">
<image class="icon_img" src="@/static/images/index20.png" mode="aspectFill">
</image>
<text class="text">保证缴纳金</text>
</view>
<!-- <view class="examine"
@click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)">
@ -305,11 +315,7 @@
</image>
<text class="text">商户设置</text>
</view>
<view class="examine" @click="paydecimal">
<image class="icon_img" src="@/static/images/index20.png" mode="aspectFill">
</image>
<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="aspectFit">
@ -378,11 +384,11 @@
</image>
<text class="text">商户设置</text>
</view>
<view class="examine" @click="paydecimal">
<image class="icon_img" src="@/static/images/index20.png" mode="aspectFill">
</image>
<text class="text">保证缴纳金</text>
</view>
<view class="examine" @click="paydecimal">
<image class="icon_img" src="@/static/images/index20.png" mode="aspectFill">
</image>
<text class="text">保证缴纳金</text>
</view>
</view>
</view>
@ -406,11 +412,7 @@
<text class="text">商户设置</text>
</view>
<view class="examine" @click="paydecimal">
<image class="icon_img" src="@/static/images/index20.png" mode="aspectFill">
</image>
<text class="text">保证缴纳金</text>
</view>
</view>
</view>
@ -424,9 +426,14 @@
</view>
<view class="settlementAgreement" v-if="isFshow">
<view class="setAgCount" style="width: 100%;height: 100%;">
<i class="icon iconfont icon-cha" @click="recuo"></i>
<!-- <i class="icon iconfont icon-cha" @click="recuo"></i> -->
<view class="" style="width: 60rpx;height: 60rpx; position: absolute;right: 30rpx; top:20rpx"
@click="recuo">
<image src="@/static/images/close.png" mode="aspectFit" style="width: 60rpx;height: 60rpx;"></image>
</view>
<div class="title">{{detail.title}}</div>
<view style="margin: 20rpx 0;">甲方公司:{{company?company:"暂无公司信息"}}</view>
<view style="margin: 20rpx 0;">机构代码:{{organization_code?organization_code:"暂无公司信息"}}</view>
<view class="contenta">
<jyf-parser :html="detail.mer_settlement_agree" ref="article" :tag-style="tagStyle"></jyf-parser>
@ -435,6 +442,7 @@
<button class="setAgCountbtna" @click="refuse">
拒绝
</button>
<button :class="num>0?'setAgCountbtnb':'setAgCountbtnc'" :disabled="num!=0" @click="agree">
<text v-if="num>0">请仔细阅读协议{{num}}S</text>
<text v-else>同意</text>
@ -444,15 +452,15 @@
</view>
</view>
<uni-popup ref="popup" type="bottom">
<view class="userpage">
<view class="userpage-icon" @click="close">
<image src="@/static/images/close.png" mode=""></image>
</view>
<form report-submit='true'>
<view class='merchantsSettled'>
<form report-submit='true' style="height: 90%;">
<view class='merchantsSettled' :style="{'height':Fheight}">
<view class="title">填写信息</view>
<view class='list'>
<view class="item">
@ -552,7 +560,7 @@
intentionbus
} from "@/api/product"
import {
merstreet,
getUserInfo
} from '@/api/user.js'
import {
@ -577,6 +585,8 @@
},
data() {
return {
company: '',
organization_code: '',
locationArr: ({}),
emptyText: '暂无可用应用',
jurisdiction: false, //
@ -611,6 +621,7 @@
cardno_front: '',
cardno_back: ''
},
Fheight: 0,
};
},
@ -618,7 +629,10 @@
...mapGetters(['userInfo', 'isLogin'])
},
created() {},
onLoad() {},
onLoad() {
this.Fheight = uni.getSystemInfoSync().windowHeight + 'px';
console.log(this.Fheight )
},
onShow() {
if (this.isLogin) {
this.emptyText = '暂无可用应用'
@ -628,8 +642,9 @@
this.jurisdiction = true
}
this.getUserInfo()
this.list()
this.codelist()
this.list()
},
@ -649,53 +664,7 @@
})
},
decimal() {
merchant({
id: this.mer_id
}).then((res) => {
this.merchant_Data = res.data
});
},
//
paydecimal() {
if (this.merchant_Data.is_margin != 1) {
this.$util.Tips({
title: '暂时无需缴纳保证金'
});
} else {
uni.showModal({
title: '提示',
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金',
success: function(res) {
if (res.confirm) {
// console.log('');
paymerchant().then((res) => {
console.log(res.data)
uni.requestPayment({
provider: 'wxpay',
orderInfo: res.data
.config, //
success: function(res) {
console.log('success:' + JSON.stringify(res));
},
fail: function(err) {
console.log('fail:' + JSON.stringify(err));
}
});
}).catch((err) => {
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
},
//
formSubmit: function(e) {
let that = this;
@ -734,29 +703,11 @@
this.$refs.popup.open()
this.isFshow = false
// intentionbus({
// "status": 1
// }).then((res) => {
// if (res.status == 200) {
// this.$util.Tips({
// title: res.message,
// icon: 'success',
// })
// this.getUserInfo()
// this.isFshow = false
// }
// }).catch((err) => {
// this.isFshow = false
// this.$util.Tips({
// title: err,
// icon: 'error',
// })
// })
},
//
refuse() {
uni.switchTab({
url: '/pages/gather/gather'
url: '/pages/index/index'
})
},
//
@ -894,26 +845,59 @@
}
},
//
paydecimal() {
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) {
if (this.codenote.length == 0) {
this.isFshow = true
this.countDown()
} else {
if (this.codenote[0].status == 0) {
uni.showModal({
title: '申请正在审核中,请勿重复提交'
})
} else {
this.isFshow = true
this.countDown()
}
}
} else {
uni.navigateTo({
url: '/pages/margin/margin' + `?mer_id=` + this.mer_id
})
}
},
//
buyserset() {
uni.navigateTo({
url: `/pages/product/basicSet?mer_id=` + this.mer_id
})
},
//
list() {
business({
type: 'mer_settlement_agree'
}).then(res => {
this.detail = res.data
})
},
navigator(url, t) {
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) {
this.isFshow = true
this.countDown()
if (this.codenote.length == 0) {
this.isFshow = true
this.countDown()
} else {
if (this.codenote[0].status == 0) {
uni.showModal({
title: '申请正在审核中,请勿重复提交'
})
} else {
this.isFshow = true
this.countDown()
}
}
} else {
uni.navigateTo({
url: url
})
@ -922,16 +906,28 @@
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.userInfoData = res.data;
this.userInfoData = res.data;
this.merchantData.phone = res.data.phone
merstreet({
street_code: res.data.mer_info.street_id
}).then((res) => {
if (res.code == 0) {
// this.$util.Tips({
// title: res.msg
// });
return false;
}
this.company = res.data.title
this.organization_code = res.data.organization_code
}).catch(res => {
console.log(res)
})
if (res.data.service == null) {
// console.log('123');
this.isShow = false
} else {
this.isShow = true
this.mer_id = res.data.service.mer_id
this.decimal()
}
if (!res.data.mer_info) {
@ -939,7 +935,16 @@
}
// console.log(that.userInfoData);
});
}
},
//
list() {
business({
type: 'mer_settlement_agree'
}).then(res => {
this.detail = res.data
})
},
}
};
</script>
@ -949,10 +954,21 @@
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}
.conten-top {
width: 100%;
padding-top: var(--status-bar-height);
padding-bottom: 30rpx;
text-align: center;
background-color: #fff;
position: absolute;
top: 0;
position: fixed;
z-index: 10;
}
.userpage {
width: 100%;
height: 1368rpx;
padding-top: 150rpx;
background-color: #fff;
position: relative;
}
@ -961,7 +977,7 @@
width: 60rpx;
height: 60rpx;
position: absolute;
top: 60rpx;
top: 65rpx;
right: 60rpx;
image {
@ -975,7 +991,8 @@
}
.merchantsSettled {
height: 1368rpx;
height: 100%;
padding-top: 80rpx;
}
.merchantsSettled .title {
@ -988,12 +1005,8 @@
.merchantsSettled .list {
background-color: #fff;
border-radius: 12px;
margin: 0 15px;
position: absolute;
width: calc(100% - 30px);
}
.application-record {
@ -1168,6 +1181,7 @@
width: 588rpx;
margin: 0 auto;
height: 86rpx;
border-radius: 25px;
text-align: center;
line-height: 86rpx;
@ -1202,7 +1216,6 @@
top: 50%;
left: 50%;
-webkit-border-radius: 12rpx;
padding: 52rpx;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
@ -1239,27 +1252,15 @@
font-weight: bold;
}
.settlementAgreement .setAgCount .content {
margin-top: 32rpx;
color: #333;
font-size: 26rpx;
line-height: 22px;
text-align: justify;
text-justify: distribute-all-lines;
height: 1050rpx;
overflow-y: scroll;
}
.settlementAgreement .setAgCount .contenta {
margin-top: 32rpx;
color: #333;
font-size: 26rpx;
line-height: 22px;
text-align: justify;
text-justify: distribute-all-lines;
height: 1050rpx;
height: 75%;
overflow-y: scroll;

View File

@ -837,9 +837,9 @@
mer_cate_id: '请选择店铺分类', //
unit_name: '请输入商品单位', //
};
console.log({
...this.setFormData
})
// console.log({
// ...this.setFormData
// })
Object.keys(requireData).some(item => {
if (!this.setFormData[item]) {
Toast(requireData[item]);
@ -858,6 +858,10 @@
Toast('请选择送货方式');
return;
}
if (!this.setFormData.mer_cate_id.length) {
Toast('请选择店铺分类');
return;
}
if (this.setFormData.imageList.length < 2) {
Toast('请添加最少两张图片用于展示');
return;

View File

@ -7,8 +7,10 @@
<view class="store_bg">
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view>
<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="388px" height="210.53rpx" radius="4px"
@click="delImg(0)" mode="aspectFit"></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>
@ -133,12 +135,12 @@
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
</view>
<!-- <view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" >
<view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" >
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view>
<u-switch v-model="credit_buy" @change="change"></u-switch>
</view> -->
</view>
<!-- <view class="item_cell flex_a_c" v-if="credit_buy">
<view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算周期</view>
<input type="number" v-model="settle_cycle" placeholder="请输入 /周期单位为:天">
</view>
@ -146,8 +148,8 @@
<view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view>
<input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %">
</view> -->
<!-- <view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> -->
</view>
<view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view>
<!-- <view class="item_cell">
<view class="if_btn flex_a_c_j_sb">
<text class="sub_title">是否开启商户</text>

View File

@ -47,12 +47,13 @@
<swiper-item :class="{ active: 1 == swiperCur }">
<view class="slide-navigator">
<!-- 隐藏暂时不需要 -->
<!-- <navigator class="item" :url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_freight.png">
</image>
<text class="text">运费模板</text>
</navigator> -->
<navigator class="item"
:url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_freight.png">
</image>
<text class="text">运费模板</text>
</navigator>
<navigator class="item"
:url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`"
hover-class='none'>
@ -60,12 +61,12 @@
src="../static/images/product_specification.png"></image>
<text class="text">规格模板</text>
</navigator>
<!-- <navigator class="item"
<navigator class="item"
:url="`/pages/users/online_warehousing/index?mer_id=${mer_id}&product_id=${data.product_id}&unique=${data.unique}`"
hover-class='none'>
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
<text class="text">商品导入</text>
</navigator> -->
</navigator>
</view>
</swiper-item>
</block>
@ -124,9 +125,9 @@
</view>
<view class="operation acea-row row-between-wrapper">
<view class="acea-row row-middle">
<!-- <view class="" class="bnt" @click="Fonline(item)" style="width:150rpx">
<view class="" class="bnt" @click="Fonline(item)" style="width:150rpx">
线上入库
</view> -->
</view>
<view class="" class="bnt" @click="Fline(item)" style="width:150rpx">
线下入库
</view>
@ -149,10 +150,6 @@
</view>
</view>
</view>
<view class="conter-img" v-if='productList.length == 0'>
<image src="@/static/images/noCart.png" mode="aspectFit"></image>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
@ -203,9 +200,6 @@
productRecommendApi,
postImport
} from "@/api/product";
import {
getUserInfo
} from '@/api/user.js';
import Loading from '@/components/Loading/index.vue';
import {
navigateTo,
@ -252,12 +246,13 @@
on_line: '',
isshow: false,
num: -1,
ll: 0
ll: 0,
}
},
onLoad() {
this.getindex()
onLoad(options) {
this.mer_id = options.mer_id;
this.getList(this.mer_id, true);
},
onPullDownRefresh() {
this.where.page = 1
@ -269,22 +264,13 @@
},
onReachBottom() {
// console.log(this.status, '222222222')
if (this.status == 'nomore') return;
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.getList(this.mer_id, true);
this.getList(this.mer_id, false);
},
methods: {
//
getindex(){
getUserInfo().then(res => {
this.mer_id = res.data.service.mer_id;
this.getList(res.data.service.mer_id, true);
});
},
menuActiona(item, index) {
if (item.is_good) {
this.options = [{
@ -358,7 +344,17 @@
this.checkboxList1 = item.attrValue
this.data.product_id = item.attrValue[0].product_id
this.data.unique = item.attrValue[0].unique
this.show = true
if (item.spec_type == 1) {
this.show = true
} else {
navigateTo(1, '/pages/users/online_warehousing/index', {
mer_id: this.mer_id,
product_id: this.data.product_id,
unique: this.data.unique,
});
}
},
//线
@ -397,8 +393,8 @@
} else {
postImport(this.mer_id, this.data).then(res => {
this.data.unique = ''
this.data.product_id=''
this.data.number=1
this.data.product_id = ''
this.data.number = 1
this.loading = false
this.loaded = false
this.getList(this.mer_id, true);
@ -407,15 +403,15 @@
title: res.message
})
this.data.unique = ''
this.data.product_id=''
this.data.number=1
this.data.product_id = ''
this.data.number = 1
}).catch(err => {
this.show = false
this.data.unique = ''
this.data.product_id=''
this.data.number=1
this.data.product_id = ''
this.data.number = 1
this.$util.Tips({
title: '请选择规格后再次进行入库'
})
@ -430,12 +426,15 @@
title: '请选择规格'
})
} else {
navigateTo(1, '/pages/users/online_warehousing/index', {
mer_id: this.mer_id,
product_id: this.data.product_id,
unique: this.data.unique,
});
}
}
@ -490,8 +489,8 @@
res => {
that.loading = false;
that.loaded = res.data.list.length < that.where.limit;
// that.productList.push.apply(that.productList, res.data.list);
that.productList.push(...res.data.list);
that.productList.push.apply(that.productList, res.data.list);
that.where.page = that.where.page + 1;
},
@ -713,19 +712,6 @@
swiper {
height: 200rpx;
}
.conter-img {
width: 650rpx;
height: 400rpx;
margin: 0 auto;
margin-top: 360rpx;
image {
width: 100%;
height: 100%;
}
}
.header {
padding-top: 40rpx;

View File

@ -11,13 +11,13 @@
<!-- #ifdef MP || APP-PLUS -->
<view :style="{ height: statusBarHeight }"></view>
<view class="header">
<view class="head-menu" style="width: 30rpx;">
<view class="head-menu" style="width: 30rpx;background-color: transparent;" >
<view class="iconfont icon-xiangzuo" @click="goback" style="color: #fff;"></view>
</view>
<navigator style="width:403rpx ;margin-right: 56rpx;" :url="'/pages/store/list/index?mer_id='+id" hover-class="none" class="search"><text
class="iconfont icon-xiazai5"></text>搜索商品</navigator>
<retuntop/>
<navigator style="width:403rpx ;margin-right: 56rpx;" :url="'/pages/store/list/index?mer_id='+id"
hover-class="none" class="search"><text class="iconfont icon-xiazai5"></text>搜索商品</navigator>
<retuntop />
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
@ -300,13 +300,15 @@
<view class="score">{{ item.rate }}评分 {{ item.reply_count }}条评论</view>
<view class="item_bot">
<view class="money-wrap">
<view class="" style="width: 500rpx;display: flex;justify-content: space-between;">
<view class=""
style="width: 500rpx;display: flex;justify-content: space-between;">
<view class="money">
¥<text>{{ item.price }}</text>
</view>
<view class="items-img" style='width: 58rpx;height: 58rpx;'>
<image src="@/static/images/LHYC/J.png" mode="aspectFit" style='width: 44rpx;height: 44rpx;'></image>
<view class="items-img" style='width: 58rpx;height: 58rpx;'>
<image src="@/static/images/LHYC/J.png" mode="aspectFit"
style='width: 44rpx;height: 44rpx;'></image>
</view>
</view>
<view
@ -501,7 +503,7 @@
import request from "@/utils/request.js";
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
import retuntop from '@/components/content-top/index.vue';
import retuntop from '@/components/content-top/index.vue';
import {
getStoreDetail,
getStoreGoods,
@ -885,7 +887,7 @@
userinfo() {
getUserInfo().then(res => {
this.business_status = res.data.mer_info.business_status
this.business_status = res.data.mer_info.setting_status
})
},
getProductSpu() {
@ -1076,8 +1078,11 @@
// this.service_open = false
// }
this.isLihaiYun === 'Lihai' ? this.tabs = this.tabs4 : this.tabs = this.tabs3
if (this.business_status == 1) {
this.isLihaiYun === 'Lihai' ? this.tabs = this.tabs4 : this.tabs = this.tabs3
} else {
this.tabs = this.tabs5
}
this.tab(this.type)
// #ifdef H5
this.ShareInfo();
@ -1357,8 +1362,6 @@
<style lang="scss" scoped>
.tab-cont {
background: #f5f5f5;
min-height: 500rpx;

View File

@ -260,7 +260,7 @@
},
data: function() {
return {
navList: ["账号登录", "快速登录"],
navList: ["快速登录","账号登录"],
current: 0,
account: "",
password: "",

BIN
static/images/SFFF.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/images/SFZZ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/images/YHKF.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/images/YHKZ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/images/de1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

BIN
static/images/de2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

BIN
static/images/de3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

BIN
static/images/dp1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/images/dp2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

BIN
static/images/dz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

BIN
static/images/fb1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

BIN
static/images/fb2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/gz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
static/images/gz1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/images/index1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
static/images/index10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
static/images/index11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
static/images/index12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
static/images/index13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
static/images/index14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
static/images/index15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
static/images/index16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
static/images/index18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
static/images/index2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
static/images/index20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
static/images/index3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
static/images/index4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
static/images/index5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
static/images/index6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
static/images/index7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
static/images/index8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
static/images/index9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
static/images/tj1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/images/zb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

82
utils/requestb.js Normal file
View File

@ -0,0 +1,82 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
HTTP_REQUEST_URL,
HTTP_REQUEST_URL_FOUR,
HEADER,
TOKENNAME
} from '@/config/app';
import {
checkLogin
} from '../libs/login';
import store from '../store';
// console.log(HTTP_REQUEST_URL_FOUR)
/**
* 发送请求
*/
function baseRequest(url, method, data, {
noAuth = false,
noVerify = false
}) {
let Url = HTTP_REQUEST_URL_FOUR,
header = HEADER;
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
return new Promise((reslove, reject) => {
uni.request({
url: Url + '/api/' + url,
method: method || 'GET',
// header: header,
data: data || {},
success: (res) => {
// #ifdef APP-PLUS
// console.log('app', Url + '/api/' + url, res.data);
// #endif
// console.log(res.data.code)
if (noVerify)
reslove(res.data, res);
else if (res.data.status == 200)
reslove(res.data, res);
else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
reject(res.data);
} else if (res.data.status == 501) {
uni.reLaunch({
url: '/pages/error/index'
})
reject(res.data);
} else if (res.statusCode==200) {
reslove(res.data,res.data);
} else
reject(res.data.message || '系统错误');
},
fail: (message) => {
reject('请求失败');
}
})
});
}
const request = {};
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
});
export default request;

View File

@ -5,6 +5,7 @@ import {
HTTP_REQUEST_URL
} from '@/config/app';
const mp = uni.requireNativePlugin('uniMP');
import store from "@/store/modules/app.js"
let appid = ''; // 应用id
let wgtFile = ''; // 应用文件地址
@ -84,6 +85,23 @@ const loadMP = async (id) => {
}
});
};
// 按URL加载小程序
const loadMPurl = async (e) => {
appid = e.id;
mp.getUniMPVersion(appid, (ret) => {
console.log('当前版本', ret);
wgtFile = e.url;
doInstallMP();
// if (0 != ret.code) {
// wgtFile = e.url;
// installMP();
// } else {
// open()
// }
});
};
// 小程序版本信息
const getVersion = (id) => {
appid = id;
@ -117,7 +135,7 @@ const doInstallMP = () => {
showCancel: false
});
}
console.log('初始化供销: ' + JSON.stringify(r));
console.log('初始化: ' + JSON.stringify(r));
});
};
@ -127,11 +145,13 @@ const open = (id = null) => {
icon: 'none',
title: '请先登录'
})
let avatar = store?.state?.userInfo?.avatar;
mp.openUniMP({
appid: id || appid,
extraData: {
uniMP: true,
token: token,
avatar: avatar,
}
}, (ret) => {
uni.hideLoading();
@ -148,6 +168,7 @@ const open = (id = null) => {
export default {
loadMP,
loadMPurl,
installMP,
doInstallMP,
getVersion,

54
utils/uniMPevent.js Normal file
View File

@ -0,0 +1,54 @@
const mp = uni.requireNativePlugin('uniMP');
import {
uniMPgetLocation,
test
} from "@/utils/uniMPfunction.js"
export const initEvent = () => {
mp.onUniMPEventReceive(async (ret) => {
console.log('小程序事件: ', ret);
if (ret.event == 'closeApp') {
mp.closeUniMP(ret.fromAppid, (ret) => {
console.log('closeUniMP: ' + JSON.stringify(ret));
});
}
if (ret.event == 'getLocation') {
try {
console.log('获取定位');
let res = await uniMPgetLocation();
console.log(res);
// plus.geolocation.getCurrentPosition(function(position) {
// console.log('经度:' + position.coords.longitude);
// console.log('纬度:' + position.coords.latitude);
// // that.markers[1].latitude = position.coords.longitude;
// // that.markers[1].longitude = position.coords.longitude;
// mp.sendUniMPEvent(
// ret.fromAppid,
// 'getLocation', {...position.coords},
// (ret) => {
// console.log('Host sendEvent: ' + JSON.stringify(ret));
// });
// }, function(error) {
// console.error('获取位置失败:', error.message);
// }, {provider:'gps'});
mp.sendUniMPEvent(
ret.fromAppid,
'getLocation', {...res},
(ret) => {
console.log('Host sendEvent: ' + JSON.stringify(ret));
});
} catch (e) {
console.log(e);
}
}
if (ret.event == 'test') {
console.log('测试');
mp.sendUniMPEvent(
ret.fromAppid,
'test', { 'key': 'value', 'name': 'data' },
(ret) => {
console.log('Host sendEvent: ' + JSON.stringify(ret));
});
}
});
}

21
utils/uniMPfunction.js Normal file
View File

@ -0,0 +1,21 @@
export const test = () => {
return '测试'
}
export const uniMPgetLocation = () => {
return new Promise((resolve, reject) => {
uni.getLocation({
type: 'gcj02',
geocode: true,
isHighAccuracy: true,
// altitude: true,
// accuracy: 'best',
success: (res) => {
resolve(res)
},
fail(e) {
resolve(e)
}
});
})
}