新增入驻流程,修改http请求,请求成功需要 res.data,等其他修改
This commit is contained in:
parent
acd17833e2
commit
34b34d9580
@ -1,5 +1,6 @@
|
||||
// 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)
|
||||
// // 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 postIndexArticleDetails = (data) => request.post('/article/post', 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, {
|
||||
noVerify: true
|
||||
|
@ -1,464 +1,498 @@
|
||||
<template>
|
||||
<view class="containers" :style="viewColor">
|
||||
<view class="header">
|
||||
<view class="title">
|
||||
<text :class="isActive == 0 ? 'on' : ''" @click="tabs(0)">已购</text>
|
||||
<text :class="isActive == 1 ? 'on' : ''" @click="tabs(1)">收藏</text>
|
||||
<text :class="isActive == 2 ? 'on' : ''" @click="tabs(2)">浏览</text>
|
||||
</view>
|
||||
<view class="search">
|
||||
<text class="iconfont icon-xiazai5"></text>
|
||||
<input type="text" placeholder="请输入商品名称" v-model="searchVal" @input="setValue" confirm-type="search" @confirm="searchBut()" placeholder-class='placeholder'>
|
||||
</view>
|
||||
<view class="sub_title">{{isActive == 0 ? '已购宝贝' : isActive == 1 ?'收藏宝贝' : '浏览记录'}}</view>
|
||||
<text class="iconfont icon-guanbi5" @click="close"></text>
|
||||
</view>
|
||||
<view class="main">
|
||||
<scroll-view scroll-y="true">
|
||||
<block v-if="isActive == 0">
|
||||
<view v-if="bought.length" @touchmove="onTouchmove" id="goods">
|
||||
<view class="picTxt acea-row" v-for="(item, index) in bought" :key="index">
|
||||
<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-else :class="checkedArr.length >=5 ? 'disabled': ''" class="iconfont icon-weixuanzhong"></text>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='line2 name'>{{item.store_name}}</view>
|
||||
<view class='money'>¥<text>{{item.price}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty">
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text>暂无内容哦~</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="isActive == 1">
|
||||
<view v-if="collect.length" id="collect" @touchmove="onTouchmove1">
|
||||
<view class="picTxt acea-row" v-for="(item, index) in collect" :key="index">
|
||||
<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-else :class="checkedArr.length >=5 ? 'disabled': ''" class="iconfont icon-weixuanzhong"></text>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='line2 name'>{{item.store_name}}</view>
|
||||
<view class='money'>¥<text>{{item.price}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty">
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text>暂无内容哦~</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="isActive == 2">
|
||||
<view v-if="browse.length" id="browse" @touchmove="onTouchmove2">
|
||||
<view class="picTxt acea-row" v-for="(item, index) in browse" :key="index">
|
||||
<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-else :class="checkedArr.length >=5 ? 'disabled': ''" class="iconfont icon-weixuanzhong"></text>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='line2 name'>{{item.store_name}}</view>
|
||||
<view class='money'>¥<text>{{item.price}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty">
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text>暂无内容哦~</text>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
<view class="foot_bar">
|
||||
<button class="confirm_btn" @click="submit">确定({{checkedArr.length}})</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="containers" :style="viewColor">
|
||||
<view class="header">
|
||||
<view class="title">
|
||||
<text :class="isActive == 0 ? 'on' : ''" @click="tabs(0)">已购</text>
|
||||
<text :class="isActive == 1 ? 'on' : ''" @click="tabs(1)">收藏</text>
|
||||
<text :class="isActive == 2 ? 'on' : ''" @click="tabs(2)">浏览</text>
|
||||
</view>
|
||||
<view class="search">
|
||||
<text class="iconfont icon-xiazai5"></text>
|
||||
<input type="text" placeholder="请输入商品名称" v-model="searchVal" @input="setValue" confirm-type="search"
|
||||
@confirm="searchBut()" placeholder-class='placeholder'>
|
||||
</view>
|
||||
<view class="sub_title">{{isActive == 0 ? '已购宝贝' : isActive == 1 ?'收藏宝贝' : '浏览记录'}}</view>
|
||||
<text class="iconfont icon-guanbi5" @click="close"></text>
|
||||
</view>
|
||||
<view class="main">
|
||||
<scroll-view scroll-y="true">
|
||||
<block v-if="isActive == 0">
|
||||
<view v-if="bought.length" @touchmove="onTouchmove" id="goods">
|
||||
<view class="picTxt acea-row" v-for="(item, index) in bought" :key="index">
|
||||
<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-else :class="checkedArr.length >=5 ? 'disabled': ''"
|
||||
class="iconfont icon-weixuanzhong"></text>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='line2 name'>{{item.store_name}}</view>
|
||||
<view class='money'>¥<text>{{item.price}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty">
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text>暂无内容哦~</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="isActive == 1">
|
||||
<view v-if="collect.length" id="collect" @touchmove="onTouchmove1">
|
||||
<view class="picTxt acea-row" v-for="(item, index) in collect" :key="index">
|
||||
<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-else :class="checkedArr.length >=5 ? 'disabled': ''"
|
||||
class="iconfont icon-weixuanzhong"></text>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='line2 name'>{{item.store_name}}</view>
|
||||
<view class='money'>¥<text>{{item.price}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty">
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text>暂无内容哦~</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="isActive == 2">
|
||||
<view v-if="browse.length" id="browse" @touchmove="onTouchmove2">
|
||||
<view class="picTxt acea-row" v-for="(item, index) in browse" :key="index">
|
||||
<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-else :class="checkedArr.length >=5 ? 'disabled': ''"
|
||||
class="iconfont icon-weixuanzhong"></text>
|
||||
</view>
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='line2 name'>{{item.store_name}}</view>
|
||||
<view class='money'>¥<text>{{item.price}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty">
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text>暂无内容哦~</text>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
<view class="foot_bar">
|
||||
<button class="confirm_btn" @click="submit">确定({{checkedArr.length}})</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Loading from '@/components/Loading/index.vue';
|
||||
import { boughtLstApi, collectLstApi, browseLstApi } from "@/api/community";
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
props:{
|
||||
checkedObj: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
computed: mapGetters(['viewColor']),
|
||||
components: { Loading },
|
||||
data() {
|
||||
return {
|
||||
isActive: 0,
|
||||
loadedb: false,
|
||||
loadingb: false,
|
||||
loadedc: false,
|
||||
loadingc: false,
|
||||
loadeds: false,
|
||||
loadings: false,
|
||||
whereb:{
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keyword: '',
|
||||
},
|
||||
wherec:{
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keyword: '',
|
||||
},
|
||||
wheres:{
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keyword: '',
|
||||
},
|
||||
searchVal: "",
|
||||
checked: [],
|
||||
list: [],
|
||||
collect: [],
|
||||
bought: [],
|
||||
browse: [],
|
||||
checkedArr: this.checkedObj,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
checkedObj:{
|
||||
handler(n){
|
||||
this.checkedArr = n
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.checkedArr = this.checkedObj
|
||||
this.getBounht();
|
||||
this.getCollect();
|
||||
this.getBrowse();
|
||||
},
|
||||
methods: {
|
||||
// 点击关闭按钮
|
||||
close() {
|
||||
this.$emit('close');
|
||||
},
|
||||
tabs(index){
|
||||
this.isActive = index
|
||||
this.$set(this.whereb, 'keyword', '');
|
||||
this.$set(this.wherec, 'keyword', '');
|
||||
this.$set(this.wheres, 'keyword', '');
|
||||
this.searchVal = ''
|
||||
this.searchBut()
|
||||
},
|
||||
onTouchmove(e){
|
||||
if (this.loadendb) return;
|
||||
if (this.loadingb) return;
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#goods').boundingClientRect(data => {
|
||||
if(data.bottom < 1500 && data.top < 0) {
|
||||
this.getBounht();
|
||||
}
|
||||
}).exec();
|
||||
// 模拟触底刷新
|
||||
},
|
||||
onTouchmove1(e){
|
||||
if (this.loadendc) return;
|
||||
if (this.loadingc) return;
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#collect').boundingClientRect(data => {
|
||||
if(data.bottom < 1500 && data.top < 0) {
|
||||
this.getCollect();
|
||||
}
|
||||
}).exec();
|
||||
// 模拟触底刷新
|
||||
},
|
||||
onTouchmove2(e){
|
||||
if (this.loadends) return;
|
||||
if (this.loadings) return;
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#browse').boundingClientRect(data => {
|
||||
if(data.bottom < 1500 && data.top < 0) {
|
||||
this.getBrowse();
|
||||
}
|
||||
}).exec();
|
||||
// 模拟触底刷新
|
||||
},
|
||||
setValue: function(event) {
|
||||
this.$set(this.whereb, 'keyword', event.detail.value);
|
||||
this.$set(this.wherec, 'keyword', event.detail.value);
|
||||
this.$set(this.wheres, 'keyword', event.detail.value);
|
||||
},
|
||||
searchBut(){
|
||||
this.loadingb=this.loadingc=this.loadings=this.loadedb=this.loadedc=this.loadeds = false
|
||||
this.whereb.page = this.wherec.page = this.wheres.page = 1
|
||||
this.bought = this.collect = this.browse = []
|
||||
this.isActive == 0 ? this.getBounht() : this.isActive == 1 ? this.getCollect() : this.getBrowse()
|
||||
},
|
||||
getBounht(){
|
||||
var that = this;
|
||||
if(that.loadingb || that.loadedb) return;
|
||||
that.loadingb = true;
|
||||
boughtLstApi(that.whereb).then(
|
||||
res => {
|
||||
that.loadingb = false;
|
||||
that.loadedb = res.data.list.length < that.whereb.limit;
|
||||
that.bought.push.apply(that.bought, res.data.list);
|
||||
that.whereb.page = that.whereb.page + 1;
|
||||
that.getInitchecked(that.bought);
|
||||
},
|
||||
error => {
|
||||
that.$util.Tips({
|
||||
title: error.msg
|
||||
})
|
||||
}
|
||||
);
|
||||
},
|
||||
getCollect(){
|
||||
var that = this;
|
||||
if(that.loadingc || that.loadedc) return;
|
||||
that.loadingc = true;
|
||||
collectLstApi(that.wherec).then(
|
||||
res => {
|
||||
that.loadingc = false;
|
||||
that.loadedc = res.data.list.length < that.wherec.limit;
|
||||
that.collect.push.apply(that.collect, res.data.list);
|
||||
that.wherec.page = that.wherec.page + 1;
|
||||
that.getInitchecked(that.collect);
|
||||
},
|
||||
error => {
|
||||
that.$util.Tips({
|
||||
title: error.msg
|
||||
})
|
||||
}
|
||||
);
|
||||
},
|
||||
getBrowse(){
|
||||
var that = this;
|
||||
if(that.loadings || that.loadeds) return;
|
||||
that.loadings = true;
|
||||
browseLstApi(that.wheres).then(
|
||||
res => {
|
||||
that.loadings = false;
|
||||
that.loadeds = res.data.list.length < that.wheres.limit;
|
||||
that.browse.push.apply(that.browse, res.data.list);
|
||||
that.wheres.page = that.wheres.page + 1;
|
||||
that.getInitchecked(that.browse);
|
||||
},
|
||||
error => {
|
||||
that.$util.Tips({
|
||||
title: error.msg
|
||||
})
|
||||
}
|
||||
);
|
||||
},
|
||||
/*获取初始化选中的数据*/
|
||||
getInitchecked(arr){
|
||||
let that = this;
|
||||
arr.forEach((item, index) => {
|
||||
that.$set(item, 'check', false);
|
||||
that.checkedArr.forEach((val, i) =>{
|
||||
if((item.spu_id == (val.spu&&val.spu.spu_id)) || (item.spu_id == val.spu_id)){
|
||||
that.$set(item, 'check', true);
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
/*已选中的商品打钩*/
|
||||
getCheckedGoods(){
|
||||
this.checked = []
|
||||
this.checkedArr.forEach((item, index) => {
|
||||
this.check.push(item)
|
||||
})
|
||||
},
|
||||
/*点击选中与否*/
|
||||
goodsCheck(item,index){
|
||||
this.$set(item, 'check', !item.check);
|
||||
if(item.check){
|
||||
this.checkedArr.push(item)
|
||||
console.log(this.checkedArr)
|
||||
}else{
|
||||
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.spu_id == item.spu_id) || (item.spu_id == (itemn.spu&&itemn.spu.spu_id)))), 1)
|
||||
|
||||
}
|
||||
},
|
||||
/*确定提交*/
|
||||
submit(){
|
||||
this.$emit('getProduct',this.checkedArr);
|
||||
},
|
||||
}
|
||||
}
|
||||
import Loading from '@/components/Loading/index.vue';
|
||||
import { boughtLstApi, collectLstApi, browseLstApi } from "@/api/community";
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
props: {
|
||||
checkedObj: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
computed: mapGetters(['viewColor']),
|
||||
components: { Loading },
|
||||
data() {
|
||||
return {
|
||||
isActive: 0,
|
||||
loadedb: false,
|
||||
loadingb: false,
|
||||
loadedc: false,
|
||||
loadingc: false,
|
||||
loadeds: false,
|
||||
loadings: false,
|
||||
whereb: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keyword: '',
|
||||
},
|
||||
wherec: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keyword: '',
|
||||
},
|
||||
wheres: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keyword: '',
|
||||
},
|
||||
searchVal: "",
|
||||
checked: [],
|
||||
list: [],
|
||||
collect: [],
|
||||
bought: [],
|
||||
browse: [],
|
||||
checkedArr: this.checkedObj,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
checkedObj: {
|
||||
handler(n) {
|
||||
this.checkedArr = n
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.checkedArr = this.checkedObj
|
||||
this.getBounht();
|
||||
this.getCollect();
|
||||
this.getBrowse();
|
||||
},
|
||||
methods: {
|
||||
// 点击关闭按钮
|
||||
close() {
|
||||
this.$emit('close');
|
||||
},
|
||||
tabs(index) {
|
||||
this.isActive = index
|
||||
this.$set(this.whereb, 'keyword', '');
|
||||
this.$set(this.wherec, 'keyword', '');
|
||||
this.$set(this.wheres, 'keyword', '');
|
||||
this.searchVal = ''
|
||||
this.searchBut()
|
||||
},
|
||||
onTouchmove(e) {
|
||||
if (this.loadendb) return;
|
||||
if (this.loadingb) return;
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#goods').boundingClientRect(data => {
|
||||
if (data.bottom < 1500 && data.top < 0) {
|
||||
this.getBounht();
|
||||
}
|
||||
}).exec();
|
||||
// 模拟触底刷新
|
||||
},
|
||||
onTouchmove1(e) {
|
||||
if (this.loadendc) return;
|
||||
if (this.loadingc) return;
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#collect').boundingClientRect(data => {
|
||||
if (data.bottom < 1500 && data.top < 0) {
|
||||
this.getCollect();
|
||||
}
|
||||
}).exec();
|
||||
// 模拟触底刷新
|
||||
},
|
||||
onTouchmove2(e) {
|
||||
if (this.loadends) return;
|
||||
if (this.loadings) return;
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#browse').boundingClientRect(data => {
|
||||
if (data.bottom < 1500 && data.top < 0) {
|
||||
this.getBrowse();
|
||||
}
|
||||
}).exec();
|
||||
// 模拟触底刷新
|
||||
},
|
||||
setValue: function(event) {
|
||||
this.$set(this.whereb, 'keyword', event.detail.value);
|
||||
this.$set(this.wherec, 'keyword', event.detail.value);
|
||||
this.$set(this.wheres, 'keyword', event.detail.value);
|
||||
},
|
||||
searchBut() {
|
||||
this.loadingb = this.loadingc = this.loadings = this.loadedb = this.loadedc = this.loadeds = false
|
||||
this.whereb.page = this.wherec.page = this.wheres.page = 1
|
||||
this.bought = this.collect = this.browse = []
|
||||
this.isActive == 0 ? this.getBounht() : this.isActive == 1 ? this.getCollect() : this.getBrowse()
|
||||
},
|
||||
getBounht() {
|
||||
var that = this;
|
||||
if (that.loadingb || that.loadedb) return;
|
||||
that.loadingb = true;
|
||||
boughtLstApi(that.whereb).then(
|
||||
res => {
|
||||
that.loadingb = false;
|
||||
that.loadedb = res.data.list.length < that.whereb.limit;
|
||||
that.bought.push.apply(that.bought, res.data.list);
|
||||
that.whereb.page = that.whereb.page + 1;
|
||||
that.getInitchecked(that.bought);
|
||||
},
|
||||
error => {
|
||||
that.$util.Tips({
|
||||
title: error.msg
|
||||
})
|
||||
}
|
||||
);
|
||||
},
|
||||
getCollect() {
|
||||
var that = this;
|
||||
if (that.loadingc || that.loadedc) return;
|
||||
that.loadingc = true;
|
||||
collectLstApi(that.wherec).then(
|
||||
res => {
|
||||
that.loadingc = false;
|
||||
that.loadedc = res.data.list.length < that.wherec.limit;
|
||||
that.collect.push.apply(that.collect, res.data.list);
|
||||
that.wherec.page = that.wherec.page + 1;
|
||||
that.getInitchecked(that.collect);
|
||||
},
|
||||
error => {
|
||||
that.$util.Tips({
|
||||
title: error.msg
|
||||
})
|
||||
}
|
||||
);
|
||||
},
|
||||
getBrowse() {
|
||||
var that = this;
|
||||
if (that.loadings || that.loadeds) return;
|
||||
that.loadings = true;
|
||||
browseLstApi(that.wheres).then(
|
||||
res => {
|
||||
that.loadings = false;
|
||||
that.loadeds = res.data.list.length < that.wheres.limit;
|
||||
that.browse.push.apply(that.browse, res.data.list);
|
||||
that.wheres.page = that.wheres.page + 1;
|
||||
that.getInitchecked(that.browse);
|
||||
},
|
||||
error => {
|
||||
that.$util.Tips({
|
||||
title: error.msg
|
||||
})
|
||||
}
|
||||
);
|
||||
},
|
||||
/*获取初始化选中的数据*/
|
||||
getInitchecked(arr) {
|
||||
let that = this;
|
||||
arr.forEach((item, index) => {
|
||||
that.$set(item, 'check', false);
|
||||
that.checkedArr.forEach((val, i) => {
|
||||
if ((item.spu_id == (val.spu && val.spu.spu_id)) || (item.spu_id == val.spu_id)) {
|
||||
that.$set(item, 'check', true);
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
/*已选中的商品打钩*/
|
||||
getCheckedGoods() {
|
||||
this.checked = []
|
||||
this.checkedArr.forEach((item, index) => {
|
||||
this.check.push(item)
|
||||
})
|
||||
},
|
||||
/*点击选中与否*/
|
||||
goodsCheck(item, index) {
|
||||
this.$set(item, 'check', !item.check);
|
||||
if (item.check) {
|
||||
this.checkedArr.push(item)
|
||||
console.log(this.checkedArr)
|
||||
} else {
|
||||
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.spu_id == item.spu_id) || (item.spu_id == (
|
||||
itemn.spu && itemn.spu.spu_id)))), 1)
|
||||
|
||||
}
|
||||
},
|
||||
/*确定提交*/
|
||||
submit() {
|
||||
this.$emit('getProduct', this.checkedArr);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.containers{
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
padding: 40rpx 0;
|
||||
position: relative;
|
||||
.header{
|
||||
position: relative;
|
||||
padding: 0 30rpx;
|
||||
.title{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
text{
|
||||
position: relative;
|
||||
margin: 0 50rpx;
|
||||
color: #999999;
|
||||
font-size: 30rpx;
|
||||
&.on{
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
&::after{
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 40rpx;
|
||||
height: 5rpx;
|
||||
background: var(--view-theme);
|
||||
position: absolute;
|
||||
bottom: -10rpx;
|
||||
left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.search{
|
||||
margin-top: 44rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 30rpx;
|
||||
padding: 12rpx 30rpx 12rpx 66rpx;
|
||||
position: relative;
|
||||
.iconfont{
|
||||
font-size: 24rpx;
|
||||
color: #939393;
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 30rpx;
|
||||
}
|
||||
.placeholder{
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
.sub_title{
|
||||
color: #282828;
|
||||
font-size: 26rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.iconfont{
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 30rpx;
|
||||
}
|
||||
}
|
||||
scroll-view{
|
||||
height: 650rpx;
|
||||
}
|
||||
.main{
|
||||
height: 650rpx;
|
||||
margin: 40rpx 0 80rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
}
|
||||
.picTxt {
|
||||
width: 100%;
|
||||
padding: 25rpx 0;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
.checkbox {
|
||||
margin-right: 30rpx;
|
||||
.iconfont {
|
||||
font-size: 38rpx;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
.icon-xuanzhong1 {
|
||||
color: var(--view-theme);
|
||||
}
|
||||
.disabled{
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
.pictrue {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
width: 430rpx;
|
||||
margin-left: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
position: relative;
|
||||
height: 160rpx;
|
||||
.name{
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.money{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
color: var(--view-priceColor);
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
text{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.foot_bar{
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 0;
|
||||
z-index: 5;
|
||||
.confirm_btn{
|
||||
width: 710rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
background: var(--view-theme);
|
||||
border-radius: 43rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
.empty{
|
||||
margin: 130rpx 0 150rpx;
|
||||
text-align: center;
|
||||
image,uni-image{
|
||||
display: inline-block;
|
||||
width: 414rpx;
|
||||
height: 305rpx;
|
||||
}
|
||||
text{
|
||||
display: block;
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.containers {
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
padding: 40rpx 0;
|
||||
position: relative;
|
||||
|
||||
.header {
|
||||
position: relative;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
||||
text {
|
||||
position: relative;
|
||||
margin: 0 50rpx;
|
||||
color: #999999;
|
||||
font-size: 30rpx;
|
||||
|
||||
&.on {
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 40rpx;
|
||||
height: 5rpx;
|
||||
background: var(--view-theme);
|
||||
position: absolute;
|
||||
bottom: -10rpx;
|
||||
left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
margin-top: 44rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 30rpx;
|
||||
padding: 12rpx 30rpx 12rpx 66rpx;
|
||||
position: relative;
|
||||
|
||||
.iconfont {
|
||||
font-size: 24rpx;
|
||||
color: #939393;
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 30rpx;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sub_title {
|
||||
color: #282828;
|
||||
font-size: 26rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
scroll-view {
|
||||
height: 650rpx;
|
||||
}
|
||||
|
||||
.main {
|
||||
height: 650rpx;
|
||||
margin: 40rpx 0 80rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.picTxt {
|
||||
width: 100%;
|
||||
padding: 25rpx 0;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
.checkbox {
|
||||
margin-right: 30rpx;
|
||||
|
||||
.iconfont {
|
||||
font-size: 38rpx;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.icon-xuanzhong1 {
|
||||
color: var(--view-theme);
|
||||
}
|
||||
|
||||
.disabled {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
.pictrue {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 430rpx;
|
||||
margin-left: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
position: relative;
|
||||
height: 160rpx;
|
||||
|
||||
.name {
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.money {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
color: var(--view-priceColor);
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.foot_bar {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 122.81rpx;
|
||||
left: 0;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 0;
|
||||
z-index: 5;
|
||||
|
||||
.confirm_btn {
|
||||
width: 710rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
background: var(--view-theme);
|
||||
border-radius: 43rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin: 130rpx 0 150rpx;
|
||||
text-align: center;
|
||||
|
||||
image,
|
||||
uni-image {
|
||||
display: inline-block;
|
||||
width: 414rpx;
|
||||
height: 305rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
display: block;
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -19,8 +19,9 @@ if (process.env.NODE_ENV === "development") {
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
httpApiTwo = "baseUrl" // h5跨域配置
|
||||
httpApiThree = 'baseUrlTest' // h5跨域配置
|
||||
// httpApiTwo = "baseUrl" // h5跨域配置
|
||||
httpApiTwo = "https://nk.lihaink.cn" // h5跨域配置
|
||||
// httpApiThree = 'baseUrlTest' // h5跨域配置
|
||||
// #endif
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
|
@ -158,7 +158,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx6e14cb98394e36bc",
|
||||
"appid" : "wxfb4695444ab8d0d0",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true,
|
||||
|
@ -710,6 +710,15 @@
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "entryProcess/entryProcess",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "入驻流程",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="gather">
|
||||
<u-swiper :list="swiperList" keyName="pic" :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="true">
|
||||
<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="true"> -->
|
||||
<view class="title">市级供应链</view>
|
||||
<view class="content">
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)">
|
||||
@ -35,8 +35,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <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="userInfoData.mer_info.type_id === 10">
|
||||
<!-- <view class="business com" v-if="true"> -->
|
||||
<view class="special_work com">
|
||||
<view class="title">我的店铺</view>
|
||||
<view class="content ">
|
||||
@ -173,7 +173,7 @@
|
||||
import { getStoreList, getUserInfo } from '@/api/user.js'
|
||||
import { microSeachBarCode, microEadtProduct } from '@/api/store.js'
|
||||
import { Toast } from '@/libs/uniApi';
|
||||
import { getIndexData } from '@/api/api.js'
|
||||
import { getDiy } from '@/api/api.js'
|
||||
export default {
|
||||
components: {
|
||||
mTabbar
|
||||
@ -231,21 +231,26 @@
|
||||
//获取商家
|
||||
this.getUserInfo()
|
||||
this.group_id = this.userInfo.group_id
|
||||
this.get_count()
|
||||
// this.get_count()
|
||||
|
||||
},
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.getBanner()
|
||||
this.getUserInfo()
|
||||
this.get_count()
|
||||
// this.get_count()
|
||||
// 停止刷新
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
methods: {
|
||||
// 轮播图请求
|
||||
async getBanner() {
|
||||
const { data } = await getIndexData()
|
||||
this.swiperList = data.banner
|
||||
const { data } = await getDiy({ id: 0 })
|
||||
if (data.value['1683638943100000']) {
|
||||
this.swiperList = data.value['1683638943100000'].swiperConfig.list
|
||||
} else {
|
||||
this.swiperList = data.value['1683875164005000'].swiperConfig.list
|
||||
}
|
||||
},
|
||||
async editGoodsClose() {
|
||||
const data = {
|
||||
|
@ -6,7 +6,7 @@
|
||||
:interval="swiper.interval" :duration="swiper.duration" indicator-active-color="#fff">
|
||||
<block v-for="(item,i) in swiper['url']" :key="i">
|
||||
<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>
|
||||
</swiper-item>
|
||||
</block>
|
||||
@ -78,7 +78,7 @@
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import { getSlideAPI } from '@/api/lihai.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 { getArea, getStreet } from '@/api/article.js';
|
||||
import { Toast } from '@/libs/uniApi'
|
||||
@ -146,7 +146,7 @@
|
||||
const { columnIndex, value, values, index, picker = this.$refs.uPicker } = e;
|
||||
if (columnIndex === 0) {
|
||||
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
|
||||
},
|
||||
async getBanner() {
|
||||
const { data } = await getIndexData()
|
||||
this.swiper.url = data.banner
|
||||
const { data } = await getDiy({ id: 0 })
|
||||
if (data.value['1683638943100000']) {
|
||||
this.swiper.url = data.value['1683638943100000'].swiperConfig.list
|
||||
} else {
|
||||
this.swiper.url = data.value['1683875164005000'].swiperConfig.list
|
||||
}
|
||||
},
|
||||
selfLocation() {
|
||||
uni.getLocation({
|
||||
@ -227,6 +231,11 @@
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getBanner()
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<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="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
@ -63,7 +63,7 @@
|
||||
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
import storeCard from './component/shop_card.vue'
|
||||
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 { storeClassifyDel } from '@/api/product.js'
|
||||
export default {
|
||||
@ -154,8 +154,12 @@
|
||||
});
|
||||
},
|
||||
async getBanner() {
|
||||
const { data } = await getIndexData()
|
||||
this.swiperList = data.banner
|
||||
const { data } = await getDiy({ id: 0 })
|
||||
if (data.value['1683638943100000']) {
|
||||
this.swiperList = data.value['1683638943100000'].swiperConfig.list
|
||||
} else {
|
||||
this.swiperList = data.value['1683875164005000'].swiperConfig.list
|
||||
}
|
||||
},
|
||||
classifyClick(item, index) {
|
||||
this.activeTwo = index
|
||||
@ -282,8 +286,8 @@
|
||||
},
|
||||
tabsChange(i) {
|
||||
this.active = i
|
||||
this.sotreParam.category_id = ''
|
||||
this.sotreParam.type_id = ''
|
||||
// this.sotreParam.category_id = ''
|
||||
// this.sotreParam.type_id = ''
|
||||
this.sotreParam.page = 1
|
||||
this.storeMerchant = []
|
||||
if (this.active == 0) {
|
||||
|
95
pages/store/entryProcess/entryProcess.vue
Normal file
95
pages/store/entryProcess/entryProcess.vue
Normal 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
@ -4,12 +4,12 @@
|
||||
<view class="settled-wrapper">
|
||||
<view class="set-item">
|
||||
<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' />
|
||||
</view>
|
||||
<view class="set-item">
|
||||
<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' />
|
||||
</view>
|
||||
<view class="set-item">
|
||||
@ -20,7 +20,7 @@
|
||||
<view class="set-item">
|
||||
<view class="title">验证码</view>
|
||||
<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' />
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="handleVerify">
|
||||
{{ text }}
|
||||
@ -30,7 +30,7 @@
|
||||
<view class="set-item">
|
||||
<view class="title">店铺分类</view>
|
||||
<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' />
|
||||
<view class="iconfont icon-xialazhankai"></view>
|
||||
</view>
|
||||
@ -38,7 +38,7 @@
|
||||
<view class="set-item">
|
||||
<view class="title">店铺类型</view>
|
||||
<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' />
|
||||
<view class="iconfont icon-xialazhankai"></view>
|
||||
</view>
|
||||
@ -46,7 +46,7 @@
|
||||
<view class="set-item">
|
||||
<view class="title">店铺所在地</view>
|
||||
<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' />
|
||||
<view class="iconfont icon-xialazhankai"></view>
|
||||
</view>
|
||||
@ -78,7 +78,7 @@
|
||||
</checkbox-group>
|
||||
<button class="settleAgree" @click="getConfig">《入驻协议》</button>
|
||||
</view>
|
||||
<button class='submitBtn' :class="validate === true ? 'on-submit':''" @click="formSubmit">提交申请</button>
|
||||
<button class='submitBtn on-submit' @click="formSubmit">提交申请</button>
|
||||
</view>
|
||||
</form>
|
||||
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify">
|
||||
@ -107,13 +107,14 @@
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
enterprise_name: '',
|
||||
user_name: '',
|
||||
mer_name: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
yanzhengma: '',
|
||||
classification: '',
|
||||
mer_type: '',
|
||||
site: ''
|
||||
code: '',
|
||||
merchant_category_id: '',
|
||||
mer_type_id: '',
|
||||
site: '',
|
||||
images: []
|
||||
},
|
||||
disabled: false,
|
||||
timer: "",
|
||||
@ -123,6 +124,7 @@
|
||||
columns: [],
|
||||
mer_classification: '', // 商户分类
|
||||
mer_storeType: '', // 店铺类型
|
||||
site_name: '', // 店铺所在地
|
||||
isOpenFair: false, // 是否农贸市场
|
||||
pics: [],
|
||||
isAgree: false,
|
||||
@ -135,8 +137,11 @@
|
||||
onLoad() {},
|
||||
onShow() {},
|
||||
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) {
|
||||
this.isAgree = !this.isAgree;
|
||||
@ -189,13 +194,16 @@
|
||||
console.log('e', e);
|
||||
switch (this.keyName) {
|
||||
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;
|
||||
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;
|
||||
case 'name':
|
||||
this.formData.site = e.value[1].name
|
||||
this.formData.site = e.value[1].code
|
||||
this.site_name = e.value[1].name
|
||||
break;
|
||||
}
|
||||
this.pickerShow = false
|
||||
@ -312,6 +320,36 @@
|
||||
that.pics.splice(index, 1);
|
||||
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() {
|
||||
uni.stopPullDownRefresh()
|
||||
|
@ -6,7 +6,7 @@
|
||||
:interval="swiper.interval" :duration="swiper.duration" indicator-active-color="#fff">
|
||||
<block v-for="(item,i) in swiper['url']" :key="i">
|
||||
<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>
|
||||
</swiper-item>
|
||||
</block>
|
||||
@ -142,9 +142,9 @@
|
||||
import { mapGetters } from 'vuex'
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.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 { getIndexData, getArticleCategoryList, getArticleList } from '@/api/api.js'
|
||||
import { getDiy, getArticleCategoryList, getArticleList } from '@/api/api.js'
|
||||
import { Toast } from '@/libs/uniApi'
|
||||
export default {
|
||||
components: {
|
||||
@ -221,6 +221,7 @@
|
||||
},
|
||||
async articleHotList() {
|
||||
const res = await getArticleList(19)
|
||||
// console.log('res', res);
|
||||
this.ArticleHotList = res.data.list
|
||||
},
|
||||
gogogo(item) {
|
||||
@ -265,15 +266,19 @@
|
||||
this.tabsData.tabsActive = item.index
|
||||
},
|
||||
async getBanner() {
|
||||
const { data } = await getIndexData()
|
||||
this.swiper.url = data.banner
|
||||
const { data } = await getDiy({ id: 0 })
|
||||
if (data.value['1683638943100000']) {
|
||||
this.swiper.url = data.value['1683638943100000'].swiperConfig.list
|
||||
} else {
|
||||
this.swiper.url = data.value['1683875164005000'].swiperConfig.list
|
||||
}
|
||||
},
|
||||
// 二级联动
|
||||
changeHandler(e) {
|
||||
const { columnIndex, value, values, index, picker = this.$refs.uPicker } = e;
|
||||
if (columnIndex === 0) {
|
||||
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() {
|
||||
this.getBanner()
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.articleHotList()
|
||||
this.Area()
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ function baseRequestTwo(url, method, data, {
|
||||
else if (res.data.status == 200)
|
||||
reslove(res.data, res);
|
||||
else if (res.data.code == 1) {
|
||||
reslove(res.data.data);
|
||||
reslove(res.data);
|
||||
} else if (res.data.code == 0) {
|
||||
reslove(res.data, res);
|
||||
} else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
|
||||
@ -86,4 +86,4 @@ const http = {};
|
||||
http[method] = (api, data, opt) => baseRequestTwo(api, method, data, opt || {})
|
||||
});
|
||||
|
||||
export default http;
|
||||
export default http;
|
Loading…
x
Reference in New Issue
Block a user