界面优化
This commit is contained in:
parent
f040461730
commit
3b71a23fbc
10
App.vue
10
App.vue
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -580,3 +580,6 @@ export function vicinityStoreApi(data) {
|
|||
export function agreeiness(data) {
|
||||
return request.get(`business/agree`, data, { noAuth: true });
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
// 在打包之前请检查当前环境是否正确
|
||||
const env = 'dev'; // 开发
|
||||
|
||||
// const env = 'prod'; // 生产
|
||||
// const env = 'prew'; // 预上线
|
||||
|
||||
switch (env) {
|
||||
|
||||
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'
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
// httpApiTwo = "baseUrl" // h5跨域配置
|
||||
httpApiTwo = "https://nk.lihaink.cn" // h5跨域配置
|
||||
// httpApiThree = 'baseUrlTest' // h5跨域配置
|
||||
httpApiFour = 'https://preview-worker-task.lihaink.cn'
|
||||
break;
|
||||
|
||||
// #endif
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
// httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
|
||||
httpApi ='https://test.shop.lihaink.cn' //预发布环境
|
||||
|
||||
// httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
httpApiTwo = 'https://nk.lihaink.cn' // 生产
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
|
||||
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,
|
||||
// 聊天长连接地址
|
||||
|
|
|
@ -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" : {
|
||||
|
|
|
@ -99,6 +99,14 @@
|
|||
"navigationBarTitleText": "商品管理",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path" : "pages/margin/margin",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "保证金缴纳",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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>
|
|
@ -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,7 +197,7 @@
|
|||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
<view class="examine" @click="paydecimal">
|
||||
<view class="examine" @click="paydecimal">
|
||||
<image class="icon_img" src="@/static/images/index20.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">保证缴纳金</text>
|
||||
|
@ -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,7 +384,7 @@
|
|||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
<view class="examine" @click="paydecimal">
|
||||
<view class="examine" @click="paydecimal">
|
||||
<image class="icon_img" src="@/static/images/index20.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">保证缴纳金</text>
|
||||
|
@ -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) {
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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}`"
|
||||
<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>
|
||||
<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
|
||||
|
@ -272,19 +267,10 @@
|
|||
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
|
||||
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;
|
||||
|
|
|
@ -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>
|
||||
<image src="@/static/images/LHYC/J.png" mode="aspectFit"
|
||||
style='width: 44rpx;height: 44rpx;'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
|
@ -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
|
||||
// }
|
||||
|
||||
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;
|
||||
|
|
|
@ -260,7 +260,7 @@
|
|||
},
|
||||
data: function() {
|
||||
return {
|
||||
navList: ["账号登录", "快速登录"],
|
||||
navList: ["快速登录","账号登录"],
|
||||
current: 0,
|
||||
account: "",
|
||||
password: "",
|
||||
|
|
|
@ -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;
|
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
|
@ -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)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue