新增入驻流程,修改http请求,请求成功需要 res.data,等其他修改

This commit is contained in:
cc_zbp 2023-05-12 18:16:16 +08:00
parent acd17833e2
commit 34b34d9580
13 changed files with 2705 additions and 2362 deletions

View File

@ -1,5 +1,6 @@
// import request from "@/utils/request.js"; // import request from "@/utils/request.js";
import request from "@/utils/request.js"; import request from "@/utils/request.js";
import http from "@/utils/http.js";
// export const postShopInfo = (params, config = {}) => request.post('/edcapi/Shop_shopDeatil', params, config) // export const postShopInfo = (params, config = {}) => request.post('/edcapi/Shop_shopDeatil', params, config)
// // get请求获取菜单注意get请求的配置等都在第二个参数中详见前面解释 // // get请求获取菜单注意get请求的配置等都在第二个参数中详见前面解释
/** /**
@ -8,7 +9,7 @@ import request from "@/utils/request.js";
/** /**
* 文创文章 * 文创文章
*/ */
export const getCulturalArticleAPI = (data) => request.get('/cultural/article', data, { noAuth: true }) export const getCulturalArticleAPI = (data) => http.get('/cultural/article', data, { noAuth: true })
/** /**
* 全民打卡 * 全民打卡
*/ */
@ -28,7 +29,7 @@ export const getSlideAPI = (data) => request.get('/Slide/get_slide', data, { noA
/** /**
* 获取文章 * 获取文章
*/ */
export const getIndexArticleList = (data) => request.get('/article/indexs', data, { noAuth: true }) export const getIndexArticleList = (data) => http.get('/article/indexs', data, { noAuth: true })
export const getIndexArticleDetails = (data) => request.get('/article/details', data, { noAuth: true }) export const getIndexArticleDetails = (data) => request.get('/article/details', data, { noAuth: true })
export const postIndexArticleDetails = (data) => request.post('/article/post', data) export const postIndexArticleDetails = (data) => request.post('/article/post', data)
export const getIndexArticleEdit = (data) => request.get('/article/edit', data) export const getIndexArticleEdit = (data) => request.get('/article/edit', data)
@ -64,10 +65,10 @@ export const getWorkArticleCount = (data) => request.get('/getWorkArticleCount',
// } // }
//首页 //首页
export const getArticleList = (data) => request.get('/getArticleList', data) export const getArticleListAPI = (data) => http.get('/getArticleList', data)
// 首页文章 // 首页文章
export const getHomeListAPI = (data) => request.get('/article/hot_list', data) export const getHomeListAPI = (data) => http.get('/article/hot_list', data)
//获取朋友圈分类信息 //获取朋友圈分类信息
export const getFriendcirclelist = (data) => request.get('/Personal/getlist', data, { export const getFriendcirclelist = (data) => request.get('/Personal/getlist', data, {
noVerify: true noVerify: true

View File

@ -8,7 +8,8 @@
</view> </view>
<view class="search"> <view class="search">
<text class="iconfont icon-xiazai5"></text> <text class="iconfont icon-xiazai5"></text>
<input type="text" placeholder="请输入商品名称" v-model="searchVal" @input="setValue" confirm-type="search" @confirm="searchBut()" placeholder-class='placeholder'> <input type="text" placeholder="请输入商品名称" v-model="searchVal" @input="setValue" confirm-type="search"
@confirm="searchBut()" placeholder-class='placeholder'>
</view> </view>
<view class="sub_title">{{isActive == 0 ? '已购宝贝' : isActive == 1 ?'收藏宝贝' : '浏览记录'}}</view> <view class="sub_title">{{isActive == 0 ? '已购宝贝' : isActive == 1 ?'收藏宝贝' : '浏览记录'}}</view>
<text class="iconfont icon-guanbi5" @click="close"></text> <text class="iconfont icon-guanbi5" @click="close"></text>
@ -20,7 +21,8 @@
<view class="picTxt acea-row" v-for="(item, index) in bought" :key="index"> <view class="picTxt acea-row" v-for="(item, index) in bought" :key="index">
<view class="checkbox"> <view class="checkbox">
<text @click.stop="goodsCheck(item,index)" v-if="item.check" class="iconfont icon-xuanzhong1"></text> <text @click.stop="goodsCheck(item,index)" v-if="item.check" class="iconfont icon-xuanzhong1"></text>
<text @click.stop="goodsCheck(item,index)" v-else :class="checkedArr.length >=5 ? 'disabled': ''" class="iconfont icon-weixuanzhong"></text> <text @click.stop="goodsCheck(item,index)" v-else :class="checkedArr.length >=5 ? 'disabled': ''"
class="iconfont icon-weixuanzhong"></text>
</view> </view>
<view class='pictrue'> <view class='pictrue'>
<image :src='item.image'></image> <image :src='item.image'></image>
@ -41,7 +43,8 @@
<view class="picTxt acea-row" v-for="(item, index) in collect" :key="index"> <view class="picTxt acea-row" v-for="(item, index) in collect" :key="index">
<view class="checkbox"> <view class="checkbox">
<text @click.stop="goodsCheck(item,index)" v-if="item.check" class="iconfont icon-xuanzhong1"></text> <text @click.stop="goodsCheck(item,index)" v-if="item.check" class="iconfont icon-xuanzhong1"></text>
<text @click.stop="goodsCheck(item,index)" v-else :class="checkedArr.length >=5 ? 'disabled': ''" class="iconfont icon-weixuanzhong"></text> <text @click.stop="goodsCheck(item,index)" v-else :class="checkedArr.length >=5 ? 'disabled': ''"
class="iconfont icon-weixuanzhong"></text>
</view> </view>
<view class='pictrue'> <view class='pictrue'>
<image :src='item.image'></image> <image :src='item.image'></image>
@ -62,7 +65,8 @@
<view class="picTxt acea-row" v-for="(item, index) in browse" :key="index"> <view class="picTxt acea-row" v-for="(item, index) in browse" :key="index">
<view class="checkbox"> <view class="checkbox">
<text @click.stop="goodsCheck(item,index)" v-if="item.check" class="iconfont icon-xuanzhong1"></text> <text @click.stop="goodsCheck(item,index)" v-if="item.check" class="iconfont icon-xuanzhong1"></text>
<text @click.stop="goodsCheck(item,index)" v-else :class="checkedArr.length >=5 ? 'disabled': ''" class="iconfont icon-weixuanzhong"></text> <text @click.stop="goodsCheck(item,index)" v-else :class="checkedArr.length >=5 ? 'disabled': ''"
class="iconfont icon-weixuanzhong"></text>
</view> </view>
<view class='pictrue'> <view class='pictrue'>
<image :src='item.image'></image> <image :src='item.image'></image>
@ -91,7 +95,7 @@
import { boughtLstApi, collectLstApi, browseLstApi } from "@/api/community"; import { boughtLstApi, collectLstApi, browseLstApi } from "@/api/community";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
props:{ props: {
checkedObj: { checkedObj: {
type: Array, type: Array,
default: [] default: []
@ -108,17 +112,17 @@
loadingc: false, loadingc: false,
loadeds: false, loadeds: false,
loadings: false, loadings: false,
whereb:{ whereb: {
page: 1, page: 1,
limit: 10, limit: 10,
keyword: '', keyword: '',
}, },
wherec:{ wherec: {
page: 1, page: 1,
limit: 10, limit: 10,
keyword: '', keyword: '',
}, },
wheres:{ wheres: {
page: 1, page: 1,
limit: 10, limit: 10,
keyword: '', keyword: '',
@ -133,14 +137,14 @@
}; };
}, },
watch: { watch: {
checkedObj:{ checkedObj: {
handler(n){ handler(n) {
this.checkedArr = n this.checkedArr = n
}, },
deep: true deep: true
} }
}, },
mounted(){ mounted() {
this.checkedArr = this.checkedObj this.checkedArr = this.checkedObj
this.getBounht(); this.getBounht();
this.getCollect(); this.getCollect();
@ -151,7 +155,7 @@
close() { close() {
this.$emit('close'); this.$emit('close');
}, },
tabs(index){ tabs(index) {
this.isActive = index this.isActive = index
this.$set(this.whereb, 'keyword', ''); this.$set(this.whereb, 'keyword', '');
this.$set(this.wherec, 'keyword', ''); this.$set(this.wherec, 'keyword', '');
@ -159,34 +163,34 @@
this.searchVal = '' this.searchVal = ''
this.searchBut() this.searchBut()
}, },
onTouchmove(e){ onTouchmove(e) {
if (this.loadendb) return; if (this.loadendb) return;
if (this.loadingb) return; if (this.loadingb) return;
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query.select('#goods').boundingClientRect(data => { query.select('#goods').boundingClientRect(data => {
if(data.bottom < 1500 && data.top < 0) { if (data.bottom < 1500 && data.top < 0) {
this.getBounht(); this.getBounht();
} }
}).exec(); }).exec();
// //
}, },
onTouchmove1(e){ onTouchmove1(e) {
if (this.loadendc) return; if (this.loadendc) return;
if (this.loadingc) return; if (this.loadingc) return;
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query.select('#collect').boundingClientRect(data => { query.select('#collect').boundingClientRect(data => {
if(data.bottom < 1500 && data.top < 0) { if (data.bottom < 1500 && data.top < 0) {
this.getCollect(); this.getCollect();
} }
}).exec(); }).exec();
// //
}, },
onTouchmove2(e){ onTouchmove2(e) {
if (this.loadends) return; if (this.loadends) return;
if (this.loadings) return; if (this.loadings) return;
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query.select('#browse').boundingClientRect(data => { query.select('#browse').boundingClientRect(data => {
if(data.bottom < 1500 && data.top < 0) { if (data.bottom < 1500 && data.top < 0) {
this.getBrowse(); this.getBrowse();
} }
}).exec(); }).exec();
@ -197,15 +201,15 @@
this.$set(this.wherec, 'keyword', event.detail.value); this.$set(this.wherec, 'keyword', event.detail.value);
this.$set(this.wheres, 'keyword', event.detail.value); this.$set(this.wheres, 'keyword', event.detail.value);
}, },
searchBut(){ searchBut() {
this.loadingb=this.loadingc=this.loadings=this.loadedb=this.loadedc=this.loadeds = false this.loadingb = this.loadingc = this.loadings = this.loadedb = this.loadedc = this.loadeds = false
this.whereb.page = this.wherec.page = this.wheres.page = 1 this.whereb.page = this.wherec.page = this.wheres.page = 1
this.bought = this.collect = this.browse = [] this.bought = this.collect = this.browse = []
this.isActive == 0 ? this.getBounht() : this.isActive == 1 ? this.getCollect() : this.getBrowse() this.isActive == 0 ? this.getBounht() : this.isActive == 1 ? this.getCollect() : this.getBrowse()
}, },
getBounht(){ getBounht() {
var that = this; var that = this;
if(that.loadingb || that.loadedb) return; if (that.loadingb || that.loadedb) return;
that.loadingb = true; that.loadingb = true;
boughtLstApi(that.whereb).then( boughtLstApi(that.whereb).then(
res => { res => {
@ -222,9 +226,9 @@
} }
); );
}, },
getCollect(){ getCollect() {
var that = this; var that = this;
if(that.loadingc || that.loadedc) return; if (that.loadingc || that.loadedc) return;
that.loadingc = true; that.loadingc = true;
collectLstApi(that.wherec).then( collectLstApi(that.wherec).then(
res => { res => {
@ -241,9 +245,9 @@
} }
); );
}, },
getBrowse(){ getBrowse() {
var that = this; var that = this;
if(that.loadings || that.loadeds) return; if (that.loadings || that.loadeds) return;
that.loadings = true; that.loadings = true;
browseLstApi(that.wheres).then( browseLstApi(that.wheres).then(
res => { res => {
@ -261,65 +265,71 @@
); );
}, },
/*获取初始化选中的数据*/ /*获取初始化选中的数据*/
getInitchecked(arr){ getInitchecked(arr) {
let that = this; let that = this;
arr.forEach((item, index) => { arr.forEach((item, index) => {
that.$set(item, 'check', false); that.$set(item, 'check', false);
that.checkedArr.forEach((val, i) =>{ that.checkedArr.forEach((val, i) => {
if((item.spu_id == (val.spu&&val.spu.spu_id)) || (item.spu_id == val.spu_id)){ if ((item.spu_id == (val.spu && val.spu.spu_id)) || (item.spu_id == val.spu_id)) {
that.$set(item, 'check', true); that.$set(item, 'check', true);
} }
}) })
}) })
}, },
/*已选中的商品打钩*/ /*已选中的商品打钩*/
getCheckedGoods(){ getCheckedGoods() {
this.checked = [] this.checked = []
this.checkedArr.forEach((item, index) => { this.checkedArr.forEach((item, index) => {
this.check.push(item) this.check.push(item)
}) })
}, },
/*点击选中与否*/ /*点击选中与否*/
goodsCheck(item,index){ goodsCheck(item, index) {
this.$set(item, 'check', !item.check); this.$set(item, 'check', !item.check);
if(item.check){ if (item.check) {
this.checkedArr.push(item) this.checkedArr.push(item)
console.log(this.checkedArr) console.log(this.checkedArr)
}else{ } else {
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.spu_id == item.spu_id) || (item.spu_id == (itemn.spu&&itemn.spu.spu_id)))), 1) this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.spu_id == item.spu_id) || (item.spu_id == (
itemn.spu && itemn.spu.spu_id)))), 1)
} }
}, },
/*确定提交*/ /*确定提交*/
submit(){ submit() {
this.$emit('getProduct',this.checkedArr); this.$emit('getProduct', this.checkedArr);
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.containers{ .containers {
background: #ffffff; background: #ffffff;
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
padding: 40rpx 0; padding: 40rpx 0;
position: relative; position: relative;
.header{
.header {
position: relative; position: relative;
padding: 0 30rpx; padding: 0 30rpx;
.title{
.title {
width: 100%; width: 100%;
text-align: center; text-align: center;
text{
text {
position: relative; position: relative;
margin: 0 50rpx; margin: 0 50rpx;
color: #999999; color: #999999;
font-size: 30rpx; font-size: 30rpx;
&.on{
&.on {
color: #333333; color: #333333;
font-weight: bold; font-weight: bold;
font-size: 34rpx; font-size: 34rpx;
&::after{
&::after {
content: ""; content: "";
display: inline-block; display: inline-block;
width: 40rpx; width: 40rpx;
@ -332,30 +342,35 @@
} }
} }
} }
.search{
.search {
margin-top: 44rpx; margin-top: 44rpx;
background: #F5F5F5; background: #F5F5F5;
border-radius: 30rpx; border-radius: 30rpx;
padding: 12rpx 30rpx 12rpx 66rpx; padding: 12rpx 30rpx 12rpx 66rpx;
position: relative; position: relative;
.iconfont{
.iconfont {
font-size: 24rpx; font-size: 24rpx;
color: #939393; color: #939393;
position: absolute; position: absolute;
top: 20rpx; top: 20rpx;
left: 30rpx; left: 30rpx;
} }
.placeholder{
.placeholder {
color: #999999; color: #999999;
font-size: 26rpx; font-size: 26rpx;
} }
} }
.sub_title{
.sub_title {
color: #282828; color: #282828;
font-size: 26rpx; font-size: 26rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
.iconfont{
.iconfont {
color: #8A8A8A; color: #8A8A8A;
font-size: 28rpx; font-size: 28rpx;
position: absolute; position: absolute;
@ -363,46 +378,56 @@
right: 30rpx; right: 30rpx;
} }
} }
scroll-view{
scroll-view {
height: 650rpx; height: 650rpx;
} }
.main{
.main {
height: 650rpx; height: 650rpx;
margin: 40rpx 0 80rpx; margin: 40rpx 0 80rpx;
padding: 0 30rpx; padding: 0 30rpx;
} }
} }
.picTxt {
.picTxt {
width: 100%; width: 100%;
padding: 25rpx 0; padding: 25rpx 0;
position: relative; position: relative;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10rpx; margin-bottom: 10rpx;
.checkbox { .checkbox {
margin-right: 30rpx; margin-right: 30rpx;
.iconfont { .iconfont {
font-size: 38rpx; font-size: 38rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
.disabled{
.disabled {
pointer-events: none; pointer-events: none;
cursor: default; cursor: default;
opacity: 0.3; opacity: 0.3;
} }
} }
.pictrue { .pictrue {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 8rpx; border-radius: 8rpx;
} }
} }
.text { .text {
width: 430rpx; width: 430rpx;
margin-left: 30rpx; margin-left: 30rpx;
@ -410,32 +435,37 @@
color: #282828; color: #282828;
position: relative; position: relative;
height: 160rpx; height: 160rpx;
.name{
.name {
color: #282828; color: #282828;
font-size: 28rpx; font-size: 28rpx;
} }
.money{
.money {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
color: var(--view-priceColor); color: var(--view-priceColor);
font-size: 22rpx; font-size: 22rpx;
font-weight: bold; font-weight: bold;
text{
text {
font-size: 26rpx; font-size: 26rpx;
} }
} }
} }
} }
.foot_bar{
.foot_bar {
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 122.81rpx;
left: 0; left: 0;
background: #ffffff; background: #ffffff;
padding: 20rpx 0; padding: 20rpx 0;
z-index: 5; z-index: 5;
.confirm_btn{
.confirm_btn {
width: 710rpx; width: 710rpx;
height: 86rpx; height: 86rpx;
line-height: 86rpx; line-height: 86rpx;
@ -446,19 +476,23 @@
border-radius: 43rpx; border-radius: 43rpx;
margin: 0 auto; margin: 0 auto;
} }
} }
.empty{
.empty {
margin: 130rpx 0 150rpx; margin: 130rpx 0 150rpx;
text-align: center; text-align: center;
image,uni-image{
image,
uni-image {
display: inline-block; display: inline-block;
width: 414rpx; width: 414rpx;
height: 305rpx; height: 305rpx;
} }
text{
text {
display: block; display: block;
color: #999999; color: #999999;
font-size: 26rpx; font-size: 26rpx;
} }
} }
</style> </style>

View File

@ -19,8 +19,9 @@ if (process.env.NODE_ENV === "development") {
httpApiThree = 'http://ceshi-oa.lihaink.cn' httpApiThree = 'http://ceshi-oa.lihaink.cn'
// #endif // #endif
// #ifdef H5 // #ifdef H5
httpApiTwo = "baseUrl" // h5跨域配置 // httpApiTwo = "baseUrl" // h5跨域配置
httpApiThree = 'baseUrlTest' // h5跨域配置 httpApiTwo = "https://nk.lihaink.cn" // h5跨域配置
// httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif // #endif
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
httpApi = 'https://shop.lihaink.cn' // 生产 httpApi = 'https://shop.lihaink.cn' // 生产

View File

@ -158,7 +158,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx6e14cb98394e36bc", "appid" : "wxfb4695444ab8d0d0",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"minified" : true, "minified" : true,

View File

@ -710,6 +710,15 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}
,{
"path" : "entryProcess/entryProcess",
"style" :
{
"navigationBarTitleText": "入驻流程",
"enablePullDownRefresh": false
}
} }
] ]
}, },

View File

@ -1,8 +1,8 @@
<template> <template>
<view class="gather"> <view class="gather">
<u-swiper :list="swiperList" keyName="pic" :autoplay="true" height="491.23rpx"></u-swiper> <u-swiper :list="swiperList" keyName="img" :autoplay="true" height="491.23rpx"></u-swiper>
<!-- <view class="special_work com" v-if="userInfoData.mer_info.type_id === 12"> --> <view class="special_work com" v-if="userInfoData.mer_info.type_id === 12">
<view class="special_work com" v-if="true"> <!-- <view class="special_work com" v-if="true"> -->
<view class="title">市级供应链</view> <view class="title">市级供应链</view>
<view class="content"> <view class="content">
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)"> <view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)">
@ -35,8 +35,8 @@
</view> </view>
</view> </view>
<!-- <view class="business com" v-if="userInfoData.mer_info.type_id === 10"> --> <view class="business com" v-if="userInfoData.mer_info.type_id === 10">
<view class="business com" v-if="true"> <!-- <view class="business com" v-if="true"> -->
<view class="special_work com"> <view class="special_work com">
<view class="title">我的店铺</view> <view class="title">我的店铺</view>
<view class="content "> <view class="content ">
@ -173,7 +173,7 @@
import { getStoreList, getUserInfo } from '@/api/user.js' import { getStoreList, getUserInfo } from '@/api/user.js'
import { microSeachBarCode, microEadtProduct } from '@/api/store.js' import { microSeachBarCode, microEadtProduct } from '@/api/store.js'
import { Toast } from '@/libs/uniApi'; import { Toast } from '@/libs/uniApi';
import { getIndexData } from '@/api/api.js' import { getDiy } from '@/api/api.js'
export default { export default {
components: { components: {
mTabbar mTabbar
@ -231,21 +231,26 @@
// //
this.getUserInfo() this.getUserInfo()
this.group_id = this.userInfo.group_id this.group_id = this.userInfo.group_id
this.get_count() // this.get_count()
}, },
// //
onPullDownRefresh() { onPullDownRefresh() {
this.getBanner()
this.getUserInfo() this.getUserInfo()
this.get_count() // this.get_count()
// //
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
methods: { methods: {
// //
async getBanner() { async getBanner() {
const { data } = await getIndexData() const { data } = await getDiy({ id: 0 })
this.swiperList = data.banner if (data.value['1683638943100000']) {
this.swiperList = data.value['1683638943100000'].swiperConfig.list
} else {
this.swiperList = data.value['1683875164005000'].swiperConfig.list
}
}, },
async editGoodsClose() { async editGoodsClose() {
const data = { const data = {

View File

@ -6,7 +6,7 @@
:interval="swiper.interval" :duration="swiper.duration" indicator-active-color="#fff"> :interval="swiper.interval" :duration="swiper.duration" indicator-active-color="#fff">
<block v-for="(item,i) in swiper['url']" :key="i"> <block v-for="(item,i) in swiper['url']" :key="i">
<swiper-item class="swi_item"> <swiper-item class="swi_item">
<u--image :showLoading="true" :src="item.pic" width="750rpx" height="500rpx" mode="aspectFill"> <u--image :showLoading="true" :src="item.img" width="750rpx" height="500rpx" mode="aspectFill">
</u--image> </u--image>
</swiper-item> </swiper-item>
</block> </block>
@ -78,7 +78,7 @@
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import { getSlideAPI } from '@/api/lihai.js' import { getSlideAPI } from '@/api/lihai.js'
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js' import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js'
import { getIndexData } from '@/api/api.js' import { getIndexData, getDiy } from '@/api/api.js'
import { getGeocoder, merClassifly } from '@/api/store.js'; import { getGeocoder, merClassifly } from '@/api/store.js';
import { getArea, getStreet } from '@/api/article.js'; import { getArea, getStreet } from '@/api/article.js';
import { Toast } from '@/libs/uniApi' import { Toast } from '@/libs/uniApi'
@ -146,7 +146,7 @@
const { columnIndex, value, values, index, picker = this.$refs.uPicker } = e; const { columnIndex, value, values, index, picker = this.$refs.uPicker } = e;
if (columnIndex === 0) { if (columnIndex === 0) {
getStreet({ area_code: value[0]['code'] }).then(res => { getStreet({ area_code: value[0]['code'] }).then(res => {
this.$refs.uPicker.setColumnValues(1, res); this.$refs.uPicker.setColumnValues(1, res.data);
}); });
} }
}, },
@ -199,8 +199,12 @@
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index
}, },
async getBanner() { async getBanner() {
const { data } = await getIndexData() const { data } = await getDiy({ id: 0 })
this.swiper.url = data.banner if (data.value['1683638943100000']) {
this.swiper.url = data.value['1683638943100000'].swiperConfig.list
} else {
this.swiper.url = data.value['1683875164005000'].swiperConfig.list
}
}, },
selfLocation() { selfLocation() {
uni.getLocation({ uni.getLocation({
@ -227,6 +231,11 @@
}, },
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getBanner()
this.getCateList()
this.getGoods()
this.selfLocation()
this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
} }
} }

View File

@ -7,7 +7,7 @@
</view> </view>
</view> </view>
<view class="header_warpper"> <view class="header_warpper">
<u-swiper :list="swiperList" keyName="pic" :autoplay="true" height="491.23rpx"></u-swiper> <u-swiper :list="swiperList" keyName="img" :autoplay="true" height="491.23rpx"></u-swiper>
<!-- <view class="head_search flex_a_c"> <!-- <view class="head_search flex_a_c">
<view class="search_content flex_a_c_j_sb"> <view class="search_content flex_a_c_j_sb">
<view class="flex_a_c"> <view class="flex_a_c">
@ -63,7 +63,7 @@
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import storeCard from './component/shop_card.vue' import storeCard from './component/shop_card.vue'
import rightSlider from './component/rightSlider'; import rightSlider from './component/rightSlider';
import { getIndexData } from '@/api/api.js' import { getDiy } from '@/api/api.js'
import { storeMerchantList, merClassifly, getStoreTypeApi } from '@/api/store.js' import { storeMerchantList, merClassifly, getStoreTypeApi } from '@/api/store.js'
import { storeClassifyDel } from '@/api/product.js' import { storeClassifyDel } from '@/api/product.js'
export default { export default {
@ -154,8 +154,12 @@
}); });
}, },
async getBanner() { async getBanner() {
const { data } = await getIndexData() const { data } = await getDiy({ id: 0 })
this.swiperList = data.banner if (data.value['1683638943100000']) {
this.swiperList = data.value['1683638943100000'].swiperConfig.list
} else {
this.swiperList = data.value['1683875164005000'].swiperConfig.list
}
}, },
classifyClick(item, index) { classifyClick(item, index) {
this.activeTwo = index this.activeTwo = index
@ -282,8 +286,8 @@
}, },
tabsChange(i) { tabsChange(i) {
this.active = i this.active = i
this.sotreParam.category_id = '' // this.sotreParam.category_id = ''
this.sotreParam.type_id = '' // this.sotreParam.type_id = ''
this.sotreParam.page = 1 this.sotreParam.page = 1
this.storeMerchant = [] this.storeMerchant = []
if (this.active == 0) { if (this.active == 0) {

View File

@ -0,0 +1,95 @@
<template>
<view class="entryProcess">
<block v-for="(item,index) in 3" :key="index">
<view class="record flex">
<view class="circle"></view>
<view class="cont-box">
<view class="title">入驻申请</view>
<view class="text-box">
<view class=""></view>
</view>
</view>
</view>
</block>
</view>
</template>
<script>
export default {
data() {
return {
entryData: [{
}]
}
},
onLoad() {},
onShow() {},
methods: {},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.entryProcess {
height: 1624.56rpx;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
:last-child {
.circle {
&::before {
display: none;
}
}
}
}
.record {
position: relative;
margin-bottom: 14.04rpx;
.circle {
width: 31.58rpx;
height: 31.58rpx;
background-color: #fff;
border-radius: 50%;
margin: 5px;
display: flex;
flex-direction: column;
align-items: center;
&::before {
content: "";
display: block;
position: absolute;
clear: both;
width: 1px;
height: 100%;
background-color: #EDF7F3;
margin: 31.58rpx;
}
}
.cont-box {
flex: 1;
margin-left: 7.02rpx;
.title {
color: #fff;
font-size: 31.58rpx;
}
.text-box {
width: 631.58rpx;
height: 366.67rpx;
color: #fff;
border-radius: 10px;
padding: 29.82rpx 24.56rpx;
margin-top: 35.09rpx;
background-color: rgba(255, 255, 255, 0.3);
}
}
}
</style>

File diff suppressed because one or more lines are too long

View File

@ -4,12 +4,12 @@
<view class="settled-wrapper"> <view class="settled-wrapper">
<view class="set-item"> <view class="set-item">
<view class="title">商户名称</view> <view class="title">商户名称</view>
<input class="input-box" type="text" maxlength="30" placeholder="请输入商户名称" v-model="formData.enterprise_name" <input class="input-box" type="text" maxlength="30" placeholder="请输入商户名称" v-model="formData.mer_name"
placeholder-class='placeholder' /> placeholder-class='placeholder' />
</view> </view>
<view class="set-item"> <view class="set-item">
<view class="title">真实姓名</view> <view class="title">真实姓名</view>
<input class="input-box" type="text" maxlength="30" placeholder="请输入真实姓名" v-model="formData.user_name" <input class="input-box" type="text" maxlength="30" placeholder="请输入真实姓名" v-model="formData.name"
placeholder-class='placeholder' /> placeholder-class='placeholder' />
</view> </view>
<view class="set-item"> <view class="set-item">
@ -20,7 +20,7 @@
<view class="set-item"> <view class="set-item">
<view class="title">验证码</view> <view class="title">验证码</view>
<view class="input-box"> <view class="input-box">
<input type="text" maxlength="30" placeholder="请输入验证码" v-model="formData.yanzhengma" <input type="text" maxlength="30" placeholder="请输入验证码" v-model="formData.code"
placeholder-class='placeholder' /> placeholder-class='placeholder' />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="handleVerify"> <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="handleVerify">
{{ text }} {{ text }}
@ -30,7 +30,7 @@
<view class="set-item"> <view class="set-item">
<view class="title">店铺分类</view> <view class="title">店铺分类</view>
<view class="input-box flex_a_c_j_sb" @click="pickerIsShow('class')"> <view class="input-box flex_a_c_j_sb" @click="pickerIsShow('class')">
<input type="text" maxlength="30" placeholder="请选择店铺分类" disabled v-model="formData.classification" <input type="text" maxlength="30" placeholder="请选择店铺分类" disabled v-model="mer_classification"
placeholder-class='placeholder' /> placeholder-class='placeholder' />
<view class="iconfont icon-xialazhankai"></view> <view class="iconfont icon-xialazhankai"></view>
</view> </view>
@ -38,7 +38,7 @@
<view class="set-item"> <view class="set-item">
<view class="title">店铺类型</view> <view class="title">店铺类型</view>
<view class="input-box flex_a_c_j_sb" @click="pickerIsShow('type')"> <view class="input-box flex_a_c_j_sb" @click="pickerIsShow('type')">
<input type="text" maxlength="30" placeholder="请选择店铺类型" disabled v-model="formData.mer_type" <input type="text" maxlength="30" placeholder="请选择店铺类型" disabled v-model="mer_storeType"
placeholder-class='placeholder' /> placeholder-class='placeholder' />
<view class="iconfont icon-xialazhankai"></view> <view class="iconfont icon-xialazhankai"></view>
</view> </view>
@ -46,7 +46,7 @@
<view class="set-item"> <view class="set-item">
<view class="title">店铺所在地</view> <view class="title">店铺所在地</view>
<view class="input-box flex_a_c_j_sb" @click="pickerIsShow('site')"> <view class="input-box flex_a_c_j_sb" @click="pickerIsShow('site')">
<input type="text" maxlength="30" placeholder="请选择商圈" disabled v-model="formData.site" <input type="text" maxlength="30" placeholder="请选择商圈" disabled v-model="site_name"
placeholder-class='placeholder' /> placeholder-class='placeholder' />
<view class="iconfont icon-xialazhankai"></view> <view class="iconfont icon-xialazhankai"></view>
</view> </view>
@ -78,7 +78,7 @@
</checkbox-group> </checkbox-group>
<button class="settleAgree" @click="getConfig">入驻协议</button> <button class="settleAgree" @click="getConfig">入驻协议</button>
</view> </view>
<button class='submitBtn' :class="validate === true ? 'on-submit':''" @click="formSubmit">提交申请</button> <button class='submitBtn on-submit' @click="formSubmit">提交申请</button>
</view> </view>
</form> </form>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify"> <Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify">
@ -107,13 +107,14 @@
data() { data() {
return { return {
formData: { formData: {
enterprise_name: '', mer_name: '',
user_name: '', name: '',
phone: '', phone: '',
yanzhengma: '', code: '',
classification: '', merchant_category_id: '',
mer_type: '', mer_type_id: '',
site: '' site: '',
images: []
}, },
disabled: false, disabled: false,
timer: "", timer: "",
@ -123,6 +124,7 @@
columns: [], columns: [],
mer_classification: '', // mer_classification: '', //
mer_storeType: '', // mer_storeType: '', //
site_name: '', //
isOpenFair: false, // isOpenFair: false, //
pics: [], pics: [],
isAgree: false, isAgree: false,
@ -135,8 +137,11 @@
onLoad() {}, onLoad() {},
onShow() {}, onShow() {},
methods: { methods: {
formSubmit() { async formSubmit() {
this.formData.images = this.pics
if (this.validateForm()) {
const res = await create(this.formData).catch(err => Toast(err))
}
}, },
ChangeIsAgree: function(e) { ChangeIsAgree: function(e) {
this.isAgree = !this.isAgree; this.isAgree = !this.isAgree;
@ -189,13 +194,16 @@
console.log('e', e); console.log('e', e);
switch (this.keyName) { switch (this.keyName) {
case 'category_name': case 'category_name':
this.formData.classification = e.value[0].category_name this.mer_classification = e.value[0].category_name
this.formData.merchant_category_id = e.value[0].merchant_category_id
break; break;
case 'type_name': case 'type_name':
this.formData.mer_type = e.value[0].type_name this.formData.mer_type_id = e.value[0].mer_type_id
this.mer_storeType = e.value[0].type_name
break; break;
case 'name': case 'name':
this.formData.site = e.value[1].name this.formData.site = e.value[1].code
this.site_name = e.value[1].name
break; break;
} }
this.pickerShow = false this.pickerShow = false
@ -312,6 +320,36 @@
that.pics.splice(index, 1); that.pics.splice(index, 1);
that.$set(that, 'pics', that.pics); that.$set(that, 'pics', that.pics);
}, },
validateForm: function() {
let that = this,
value = that.formData;
if (!value.mer_name) return that.$util.Tips({
title: '请输入企业名称'
});
if (!value.name) return that.$util.Tips({
title: '请输入姓名'
});
if (!value.phone) return that.$util.Tips({
title: '请输入手机号'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(value.phone)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
if (!value.code) return that.$util.Tips({
title: '请填写验证码'
});
if (!value.merchant_category_id) return that.$util.Tips({
title: '请选择商户分类'
});
if (!that.isAgree) return that.$util.Tips({
title: '请勾选并同意入驻协议'
});
// if (that.isShowCode && !that.codeVal) return that.$util.Tips({
// title: ''
// });
// that.validate = true;
return true;
},
}, },
onPullDownRefresh() { onPullDownRefresh() {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()

View File

@ -6,7 +6,7 @@
:interval="swiper.interval" :duration="swiper.duration" indicator-active-color="#fff"> :interval="swiper.interval" :duration="swiper.duration" indicator-active-color="#fff">
<block v-for="(item,i) in swiper['url']" :key="i"> <block v-for="(item,i) in swiper['url']" :key="i">
<swiper-item class="swi_item"> <swiper-item class="swi_item">
<u--image :showLoading="true" :src="item.pic" width="750rpx" height="500rpx" mode="aspectFill"> <u--image :showLoading="true" :src="item.img" width="750rpx" height="500rpx" mode="aspectFill">
</u--image> </u--image>
</swiper-item> </swiper-item>
</block> </block>
@ -142,9 +142,9 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import WaterfallsFlow from '@/components/plantWaterfallsFlow/WaterfallsFlow.vue' import WaterfallsFlow from '@/components/plantWaterfallsFlow/WaterfallsFlow.vue'
import { getSlideAPI, getArea, getStreet } from '@/api/article.js' import { getSlideAPI, getArea, getStreet, getArticleListAPI } from '@/api/article.js'
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js' import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js'
import { getIndexData, getArticleCategoryList, getArticleList } from '@/api/api.js' import { getDiy, getArticleCategoryList, getArticleList } from '@/api/api.js'
import { Toast } from '@/libs/uniApi' import { Toast } from '@/libs/uniApi'
export default { export default {
components: { components: {
@ -221,6 +221,7 @@
}, },
async articleHotList() { async articleHotList() {
const res = await getArticleList(19) const res = await getArticleList(19)
// console.log('res', res);
this.ArticleHotList = res.data.list this.ArticleHotList = res.data.list
}, },
gogogo(item) { gogogo(item) {
@ -265,15 +266,19 @@
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index
}, },
async getBanner() { async getBanner() {
const { data } = await getIndexData() const { data } = await getDiy({ id: 0 })
this.swiper.url = data.banner if (data.value['1683638943100000']) {
this.swiper.url = data.value['1683638943100000'].swiperConfig.list
} else {
this.swiper.url = data.value['1683875164005000'].swiperConfig.list
}
}, },
// //
changeHandler(e) { changeHandler(e) {
const { columnIndex, value, values, index, picker = this.$refs.uPicker } = e; const { columnIndex, value, values, index, picker = this.$refs.uPicker } = e;
if (columnIndex === 0) { if (columnIndex === 0) {
getStreet({ area_code: value[0]['code'] }).then(res => { getStreet({ area_code: value[0]['code'] }).then(res => {
this.$refs.uPicker.setColumnValues(1, res); this.$refs.uPicker.setColumnValues(1, res.data);
}); });
} }
}, },
@ -297,6 +302,11 @@
}, },
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getBanner()
this.getCateList()
this.getGoods()
this.articleHotList()
this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
} }
} }

View File

@ -55,7 +55,7 @@ function baseRequestTwo(url, method, data, {
else if (res.data.status == 200) else if (res.data.status == 200)
reslove(res.data, res); reslove(res.data, res);
else if (res.data.code == 1) { else if (res.data.code == 1) {
reslove(res.data.data); reslove(res.data);
} else if (res.data.code == 0) { } else if (res.data.code == 0) {
reslove(res.data, res); reslove(res.data, res);
} else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) { } else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {