首页bug 商家入驻等界面修改

This commit is contained in:
jia 2023-08-30 21:11:53 +08:00
parent 97f957bde1
commit bd284d477f
21 changed files with 1462 additions and 1046 deletions

View File

@ -306,7 +306,7 @@
this.globalData.community_reply_auth = res.data.community_reply_auth this.globalData.community_reply_auth = res.data.community_reply_auth
this.globalData.margin_ico_switch = res.data.margin_ico_switch this.globalData.margin_ico_switch = res.data.margin_ico_switch
this.globalData.margin_ico = res.data.margin_ico this.globalData.margin_ico = res.data.margin_ico
console.log(res.data.global_theme.theme + "我是") // console.log(res.data.global_theme.theme + "")
this.$store.commit("VIEW_COLOR", res.data.global_theme.theme) this.$store.commit("VIEW_COLOR", res.data.global_theme.theme)
this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type) this.$store.commit("KEY_COLOR", '_' + res.data.global_theme.type)
try { try {

View File

@ -103,6 +103,10 @@ export function getUserCoupons(data) {
export function getArticleCategoryList() { export function getArticleCategoryList() {
return request.get('article/category/lst', {}, { noAuth: true }) return request.get('article/category/lst', {}, { noAuth: true })
} }
export function getArticleCategoryLists() {
return request.get('article/category/lst?is_home='+1, {}, { noAuth: true })
}
/** /**
* 文章列表 * 文章列表
* @param int cid * @param int cid

View File

@ -467,7 +467,7 @@ export function getGeocoder(data) {
* *
*/ */
export function getStoreTypeApi() { export function getStoreTypeApi() {
return request.get('intention/type', {sift_store:1}, { return request.get('intention/type', {sift_store:0}, {
noAuth: true noAuth: true
}); });
} }

View File

@ -7,6 +7,8 @@
</view> </view>
<view v-for="(item,index) in cartInfo" :key="index"> <view v-for="(item,index) in cartInfo" :key="index">
<view v-if="activityType === 2"> <view v-if="activityType === 2">
<view class='item presell_item'> <view class='item presell_item'>
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class='pictrue' @click="jumpCon(item)"> <view class='pictrue' @click="jumpCon(item)">
@ -110,11 +112,11 @@
</view> </view>
<view class="btn-item" <view class="btn-item"
v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2 ||activityType==98" v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate!=9 &&evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2"
@click.stop="refund(item)">申请退款</view> @click.stop="refund(item)">申请退款</view>
<view class='btn-item' <view class='btn-item'
v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3 && evaluate!=8&& item.refund_num > 0' v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3 && evaluate!=8&& evaluate!=9&& item.refund_num > 0'
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view> @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view> <view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>

View File

@ -30,7 +30,8 @@
indicator-active-color="#fff"> indicator-active-color="#fff">
<block v-for="(item,index) in swiper['url']" :key="index"> <block v-for="(item,index) in swiper['url']" :key="index">
<swiper-item class="swi_item" @click="swiperClick(item)"> <swiper-item class="swi_item" @click="swiperClick(item)">
<u--image :showLoading="true" :src="item.img" width="694.74rpx" height="242.11rpx" mode="aspectFill"> <u--image :showLoading="true" :src="item.img" width="694.74rpx" height="242.11rpx"
mode="aspectFill">
</u--image> </u--image>
</swiper-item> </swiper-item>
</block> </block>
@ -42,11 +43,23 @@
</template> </template>
<script> <script>
import { getArea, getStreet } from '@/api/article.js'; import {
import { getIndexData, getDiy } from '@/api/api.js' getArea,
import { getGeocoder } from '@/api/store.js'; getStreet
import { mapGetters } from 'vuex' } from '@/api/article.js';
import { Toast } from '../libs/uniApi'; import {
getIndexData,
getDiy
} from '@/api/api.js'
import {
getGeocoder
} from '@/api/store.js';
import {
mapGetters
} from 'vuex'
import {
Toast
} from '../libs/uniApi';
import Cache from '@/utils/cache'; import Cache from '@/utils/cache';
export default { export default {
props: { props: {
@ -81,24 +94,18 @@
}, },
} }
}, },
computed: mapGetters(['location']),
watch: {
location: {
handler(newVal, oldVal) {
// console.log(newVal, oldVal)
if (newVal.address_component?.street) this.street = newVal.address_component.street
},
immediate: true
}
},
created() { created() {
this.appLocation()
this.getBanner() this.getBanner()
this.Area() this.Area()
if (this.location.address_component?.street) this.street = this.location.address_component.street
// this.street = Cache.get('LOCATION_DATA',true)
// console.log( Cache.get('LOCATION_DATA'))
},
},
onShow() {
this.street = uni.getStorageSync('adress_location')
},
methods: { methods: {
swiperClick(item) { swiperClick(item) {
const url = item.info[1].value const url = item.info[1].value
@ -108,13 +115,51 @@
}, },
selectLocation() { selectLocation() {
this.isSelectPlace ? this.showPicker = true : '' this.isSelectPlace ? this.showPicker = true : ''
},
async appLocation() {
uni.getLocation({
type: 'wgs84',
timeout: '10',
success: (res) => {
// console.log(res)
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
this.street = res.data.address_component.street
uni.setStorageSync('adress_location', res.data.address_component
.street)
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
})
},
fail: (err) => {
uni.showToast({
title: "获取定位超时",
icon: 'none',
duration: 2000
});
}
});
}, },
confirm(e) { confirm(e) {
this.street = e.value[1].name this.street = uni.setStorageSync('adress_location', e.value[1].name) ? uni.setStorageSync(
'adress_location', e.value[1].name) : e.value[1].name
this.showPicker = false this.showPicker = false
this.$emit('selectPlce', e) this.$emit('selectPlce', e)
let adress = Cache.get('LOCATION_DATA',true) uni.setStorageSync('adress_location', e.value[1].name)
Cache.set('LOCATION_DATA',adress)
}, },
changeHandler(e) { changeHandler(e) {
const { const {
@ -125,25 +170,34 @@
picker = this.$refs.uPicker picker = this.$refs.uPicker
} = e; } = e;
if (columnIndex === 0) { if (columnIndex === 0) {
getStreet({ area_code: value[0]['code'] }).then(res => { getStreet({
area_code: value[0]['code']
}).then(res => {
picker.setColumnValues(1, res.data); picker.setColumnValues(1, res.data);
}); });
} }
}, },
Area() { Area() {
getArea({ city_code: 510500 }).then(res => { getArea({
city_code: 510500
}).then(res => {
this.$refs.uPicker.setColumnValues(0, res.data); this.$refs.uPicker.setColumnValues(0, res.data);
this.Street(res.data[0]['code']); this.Street(res.data[0]['code']);
}); });
}, },
Street(code) { Street(code) {
getStreet({ area_code: code }).then(res => { getStreet({
area_code: code
}).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data); this.$refs.uPicker.setColumnValues(1, res.data);
}); });
}, },
swiperChange(e) { swiperChange(e) {
let { current, source } = e.detail; let {
current,
source
} = e.detail;
if (source === 'autoplay' || source === 'touch') { if (source === 'autoplay' || source === 'touch') {
this.bgColor = this.swiper.url[e.detail.current]['img'] this.bgColor = this.swiper.url[e.detail.current]['img']
} }
@ -156,7 +210,11 @@
}, },
async getBanner(id) { async getBanner(id) {
let that = this; let that = this;
const { data } = await getDiy({ id: 0 }) const {
data
} = await getDiy({
id: 0
})
that.styleConfig = that.objToArr(data.value); that.styleConfig = that.objToArr(data.value);
/* 循环数组得到数据*/ /* 循环数组得到数据*/
that.styleConfig.forEach((item, index, arr) => { that.styleConfig.forEach((item, index, arr) => {

View File

@ -9,8 +9,8 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https // 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试 // let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
// httpApi = 'https://shop.lihaink.cn' // 生产 httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn" // httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222" // httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325" // httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325' // httpApi = 'http://192.168.0.108:8325'

View File

@ -2,8 +2,8 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "1.0.18", "versionName" : "1.0.0",
"versionCode" : 142, "versionCode" : 100,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -165,7 +165,7 @@
确认付款 确认付款
</view> </view>
<view class="bnt delivery" @click="toPostagequ(orderInfo)" v-if="orderInfo.status == 0&&orderInfo.activity_type==0"> <view class="bnt delivery" @click="toPostagequ(orderInfo)" v-if="orderInfo.status == 0&&orderInfo.activity_type==0&& orderInfo.order_type !=1 ">
收件码 收件码
</view> </view>
<navigator class="bnt delivery" v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0&&orderInfo.activity_type==98" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator> <navigator class="bnt delivery" v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0&&orderInfo.activity_type==98" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator>

View File

@ -172,7 +172,7 @@
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&item.activity_type==98" <view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&item.activity_type==98"
@click="toPostage(item)">去发货 @click="toPostage(item)">去发货
</view> </view>
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&item.activity_type==0" <view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&& item.order_type !=1 &&item.activity_type==0"
@click="toPostagequ(item)">收件码 @click="toPostagequ(item)">收件码
</view> </view>
<view class="bnt bnt_color" <view class="bnt bnt_color"

View File

@ -11,8 +11,8 @@
</view> </view>
<view style="text-align: right;" v-if="tabIndex==1" class='iconfont' <view style="text-align: right;" v-if="tabIndex==1" class='iconfont'
:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view> :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
<view v-else-if="mer_location == 1" style="text-align: right;" class='iconfont icon-dingwei' <!-- <view v-else-if="mer_location == 1" style="text-align: right;" class='iconfont icon-dingwei'
@click="showMaoLocation(latitude,longitude)"></view> @click="showMaoLocation(latitude,longitude)"></view> -->
</view> </view>
<view class="nav-wrapper"> <view class="nav-wrapper">
<view v-if="hide_mer_status == 0" class="tab-bar"> <view v-if="hide_mer_status == 0" class="tab-bar">

View File

@ -3,8 +3,59 @@
<view class="circle_friends_wrapper"> <view class="circle_friends_wrapper">
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr"></zbpSwiper> <zbpSwiper :isSelectPlace="true" :location_Arr="locationArr"></zbpSwiper>
<view class="tabs_wrapper flex_a_c_j_sb" style="margin-top: 30rpx;">
<view class="title flex_a_c">热点资讯</view>
<navigator class="flex_a_c" hover-class="none" url="/pages/news_list/index?type=1">
更多
<view class="iconfont icon-gengduo3"></view>
</navigator>
</view>
<view class="article_box">
<block v-for="(item, index) in recoList.slice(0,2)" :key="index">
<navigator :url='"/pages/news_details/index?id="+item.article_id' hover-class='none'
class='article-item'>
<view class='text'>
<view class='name'>{{item.title}}</view>
<view class="time">{{item.create_time}}</view>
</view>
<view class='pictrue'>
<image :src='item.image_input'></image>
</view>
</navigator>
</block>
</view>
<view class="empty_wrapper" v-if="recoList.length==0">
<u-empty></u-empty>
</view>
<view class="tabs_wrapper">
<u-tabs :list="tabsData1.list" @click="tabsChange1" keyName="title" lineColor="#F84221"></u-tabs>
</view>
<view class="tabs_wrapper" :isSelectPlace="true" @selectPlce="selectPlce" :location_Arr="locationArr"> <view class="goods">
<block v-for="(item,index) in articleList" :key="index">
<view class="goods_item" @click="article(item)">
<image class="goods_img" :src="item.image_input" mode="aspectFill"></image>
<view class="botm">
<view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c">
<view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image>
<view class="g_name">{{item.author}}</view>
</view>
<!-- <view class="nice_box" @click.stop="giveStart(item)">
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text>
</view> -->
</view>
</view>
</view>
</block>
</view>
<view class="empty_wrapper" v-if="articleList.length==0">
<u-empty></u-empty>
</view>
<view class="tabs_wrapper">
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs> <u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
</view> </view>
<view class=""> <view class="">
@ -57,6 +108,14 @@
</view> </view>
</template> </template>
</m-tabbar> --> </m-tabbar> -->
<view class="location" v-if='isshow'>
<view class="locationa">
位置权限使用说明
</view>
<view class="locationb">
用于向你推荐最近门店
</view>
</view>
</view> </view>
</template> </template>
@ -64,6 +123,7 @@
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import { import {
getSlideAPI getSlideAPI
} from '@/api/lihai.js' } from '@/api/lihai.js'
@ -74,7 +134,9 @@
} from '@/api/community.js' } from '@/api/community.js'
import { import {
getIndexData, getIndexData,
getDiy getDiy,
getArticleList,
getArticleCategoryLists
} from '@/api/api.js' } from '@/api/api.js'
import { import {
getGeocoder, getGeocoder,
@ -95,6 +157,8 @@
}, },
data() { data() {
return { return {
isshow: false,
locationArr: ({}), locationArr: ({}),
status: 'loadmore', status: 'loadmore',
bgColor: '', bgColor: '',
@ -105,6 +169,10 @@
list: [], list: [],
tabsActive: 0 tabsActive: 0
}, },
tabsData1: {
list: [],
tabsActive: 0
},
where: { where: {
category_id: 0, category_id: 0,
page: 1, page: 1,
@ -115,12 +183,15 @@
location: '', location: '',
emptyShow: false, emptyShow: false,
street: '', street: '',
cateGoods: [] cateGoods: [],
recoList: [],
articleList: [],
streeta_id: ''
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getCateList() this.getCateList()
this.cateGoods=[] this.cateGoods = []
this.getGoods() this.getGoods()
this.selfLocation() this.selfLocation()
this.Area() this.Area()
@ -129,10 +200,12 @@
onLoad() { onLoad() {
this.getCateList() this.getCateList()
this.getArticle()
this.getGoods() this.getGoods()
this.selfLocation()
this.Area()
this.setPermissions() this.setPermissions()
// this.openTongZhi() // this.openTongZhi()
uni.$on('connectstatusChange', (connectstatus) => { uni.$on('connectstatusChange', (connectstatus) => {
var connectstr = '' var connectstr = ''
@ -151,13 +224,48 @@
if (this.status == 'nomore') return; if (this.status == 'nomore') return;
this.status = 'loading'; this.status = 'loading';
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.
this.getGoods() this.getGoods()
}, },
methods: { methods: {
tabsChange1(item) {
this.getArticleList(item.article_category_id)
this.streeta_id = item.id
this.tabsData1.tabsActive = item.index
},
async getArticle() {
let list = []
const {
data
} = await getArticleCategoryLists()
data.map((item, index) => {
if (item.title !== '首页推荐') {
list.push(item)
} else {
getArticleList(item.article_category_id).then(res => {
this.recoList = res.data.list
})
}
})
this.tabsData1.list = list
this.getArticleList(list[0].article_category_id)
},
async getArticleList(id) {
let obj = {
is_home: 1
}
const {
data
} = await getArticleList(id)
this.articleList = data.list
},
article(item) {
uni.navigateTo({
url: '/pages/news_details/index?id=' + item.article_id
})
},
selectPlce(e) { selectPlce(e) {
this.selfLocation()
this.Area()
this.street_id = e.value[1].code this.street_id = e.value[1].code
this.town = e.value[1].name this.town = e.value[1].name
this.getCloudShopMerId(e.value[1].code) this.getCloudShopMerId(e.value[1].code)
@ -204,17 +312,20 @@
}, },
gogogo(item) { gogogo(item) {
if (this.tabsData.tabsActive == 1) { if (this.tabsData.tabsActive == 1) {
uni.navigateTo({ uni.navigateTo({
//#ifdef APP // #ifdef MP || H5
url: '/pages/short_video/appSwiper/index?id=' + item.community_id, url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}`
//#endif // #endif
//#ifndef MP || H5 // #ifdef APP
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id url: `/pages/short_video/appSwiper/index?id=${item.community_id}`
//#endif // #endif
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
}) })
} }
}, },
@ -241,9 +352,9 @@
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
if(item){ if (item) {
if (item.index == 1 &&this.cateGoods[0] ) { if (item.index == 1 && this.cateGoods[0]) {
uni.navigateTo({ uni.navigateTo({
// #ifdef MP || H5 // #ifdef MP || H5
url: `/pages/short_video/nvueSwiper/index?id=${this.cateGoods[0].community_id}` url: `/pages/short_video/nvueSwiper/index?id=${this.cateGoods[0].community_id}`
@ -282,11 +393,18 @@
}, },
selfLocation() { selfLocation() {
const that = this if (uni.getStorageSync('loction') == true) {
this.isshow = false
} else {
this.isshow = true
uni.setStorageSync('loction', true);
}
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
timeout: '10', timeout: '10',
success: (res) => { success: (res) => {
// console.log(res)
this.isshow = false
let latitude, longitude; let latitude, longitude;
latitude = res.latitude.toString(); latitude = res.latitude.toString();
longitude = res.longitude.toString(); longitude = res.longitude.toString();
@ -294,8 +412,10 @@
lat: latitude, lat: latitude,
long: longitude long: longitude
}).then(res => { }).then(res => {
that.$store.commit('setLocation', res.data) uni.setStorageSync('adress_location',res.data.address)
that.street = res.data.address_component.street // that.$store.dispatch('setLocation', res.data)
// that.street = res.data.address_component.street
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err, title: err,
@ -304,6 +424,7 @@
}) })
}, },
fail: (err) => { fail: (err) => {
this.isshow = false
uni.showToast({ uni.showToast({
title: "获取定位超时", title: "获取定位超时",
icon: 'none', icon: 'none',
@ -403,6 +524,33 @@
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); // background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
} }
.location {
background-color: #F6F6F6;
width: 680rpx;
height: 150rpx;
position: absolute;
top: 0;
z-index: 9999;
border-radius: 20rpx;
left: 50%;
margin-left: -340rpx;
margin-top: 80rpx;
padding-left: 20rpx;
.locationa {
font-size: 28rpx;
color: #000;
font-weight: 500;
margin-top: 30rpx;
margin-bottom: 15rpx;
}
.locationb {
font-size: 20rpx;
color: #5a5a5a;
}
}
.Circle_friends { .Circle_friends {
position: relative; position: relative;
padding: 0 0 87.72rpx 0; padding: 0 0 87.72rpx 0;
@ -432,6 +580,79 @@
justify-content: center; justify-content: center;
} }
.article_box {
height: 100%;
width: 694.74rpx;
margin: 0 auto;
background-color: #fff;
border-radius: 16rpx;
padding: 0 24.56rpx;
box-sizing: border-box;
.title-box {
height: 87.72rpx;
text {
font-size: 28.07rpx;
}
}
.article-item {
display: flex;
// height: 175.44rpx;
justify-content: space-between;
border-bottom: 1px solid #f0f0f0;
padding: 21.05rpx 0;
.text {
flex: 1;
height: 122.81rpx;
margin-right: 17.54rpx;
font-size: 24rpx;
color: #999;
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-size: 26.32rpx;
color: #282828;
}
}
.pictrue {
width: 175.44rpx;
height: 122.81rpx;
image {
width: 100%;
height: 100%;
border-radius: 8px;
}
}
}
}
.tabs_wrapper {
width: 694.74rpx;
margin: 38.6rpx auto;
margin-bottom: 21.05rpx;
.title {
font-size: 31.58rpx;
font-weight: bold;
&::before {
content: '';
display: inline-block;
width: 3px;
height: 31.58rpx;
background-color: #F84221;
margin-right: 7.02rpx;
}
}
}
.goods { .goods {
margin: 0 auto; margin: 0 auto;
width: 694.74rpx; width: 694.74rpx;

View File

@ -61,6 +61,7 @@
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { import {
getArticleCategoryLists,
getArticleCategoryList, getArticleCategoryList,
getArticleList, getArticleList,
getArticleHotList, getArticleHotList,
@ -85,7 +86,8 @@
page: 1, page: 1,
limit: 8, limit: 8,
status: false, status: false,
scrollLeft: 0 scrollLeft: 0,
type: 0
}; };
}, },
/** /**
@ -95,7 +97,9 @@
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onLoad: function() { onLoad: function(e) {
this.type = e.type
this.getArticleCate(); this.getArticleCate();
this.status = false; this.status = false;
this.page = 1; this.page = 1;
@ -142,11 +146,20 @@
}, },
getArticleCate: function() { getArticleCate: function() {
let that = this; let that = this;
if (this.type == 1) {
getArticleCategoryLists().then(res => {
this.active = res.data[0].article_category_id
that.$set(that, 'navList', res.data);
this.getCidArticle();
});
} else {
getArticleCategoryList().then(res => { getArticleCategoryList().then(res => {
this.active = res.data[0].article_category_id this.active = res.data[0].article_category_id
that.$set(that, 'navList', res.data); that.$set(that, 'navList', res.data);
this.getCidArticle(); this.getCidArticle();
}); });
}
}, },
tabSelect(active) { tabSelect(active) {
this.active = active; this.active = active;

View File

@ -12,7 +12,7 @@
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search" <input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='sotreParam.keyword' @confirm="searchSubmit"></input> :value='sotreParam.keyword' @confirm="searchSubmit"></input>
</view> </view>
<view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;" <!-- <view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;"
class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'> class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
<view class="iconfont icon-dingwei"></view> <view class="iconfont icon-dingwei"></view>
<view class="right-text" v-if="recommend_address"> <view class="right-text" v-if="recommend_address">
@ -20,7 +20,7 @@
</view> </view>
<view class="iconfont icon-xiangyou" v-if="recommend_address"></view> <view class="iconfont icon-xiangyou" v-if="recommend_address"></view>
</view> </view>
</view> --> </view>
<view class="nav-wrapper" :class="'styleType'+store_street_theme"> <view class="nav-wrapper" :class="'styleType'+store_street_theme">
<view class='nav acea-row row-middle' :class="'styleType'+store_street_theme"> <view class='nav acea-row row-middle' :class="'styleType'+store_street_theme">
<view v-for="item in downMenus" :key="item.key" class='item' <view v-for="item in downMenus" :key="item.key" class='item'
@ -629,7 +629,7 @@
flex-wrap: nowrap; flex-wrap: nowrap;
background-color: #fff; background-color: #fff;
padding-top: 80rpx; padding-top: 80rpx;
padding-bottom: 20rpx;
&.styleType1 { &.styleType1 {
background-color: var(--view-theme); background-color: var(--view-theme);
} }
@ -730,7 +730,7 @@
z-index: 9; z-index: 9;
position: fixed; position: fixed;
left: 0; left: 0;
top: 30px; top: 25px;
width: 100%; width: 100%;
margin-top: 86rpx; margin-top: 86rpx;
background-color: #fff; background-color: #fff;

View File

@ -21,8 +21,10 @@
<view v-else> <view v-else>
<view class='header acea-row row-middle' :class='isGoodsReturn ? "on":""'> <view class='header acea-row row-middle' :class='isGoodsReturn ? "on":""'>
<view class='pictrue' v-if="isGoodsReturn==false"> <view class='pictrue' v-if="isGoodsReturn==false">
<image v-if="orderInfo.status != 9" :src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'">
<image v-if="orderInfo.status != 9&&orderInfo.status !=12" :src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'">
</image> </image>
<image v-else :src="imgUrl+'/static/order_2.gif'"></image> <image v-else :src="imgUrl+'/static/order_2.gif'"></image>
</view> </view>
<view class='data' :class='isGoodsReturn ? "on":""'> <view class='data' :class='isGoodsReturn ? "on":""'>
@ -30,7 +32,8 @@
<block v-if="orderInfo.order_status == 2 ">待发货</block> <block v-if="orderInfo.order_status == 2 ">待发货</block>
<block v-if="orderInfo.status == 9">等待其他人参加拼团</block> <block v-if="orderInfo.status == 9">等待其他人参加拼团</block>
<block v-if="orderInfo.order_status == 7">待核销</block> <block v-if="orderInfo.order_status == 7">待核销</block>
<block v-if="orderInfo.order_status == 3">{{orderInfo.is_virtual == 1 ? '服务商品已虚拟发货' : '待收货'}} <block v-if="orderInfo.order_status == 3">
{{orderInfo.is_virtual == 1 ? '服务商品已虚拟发货' : '待收货'}}
</block> </block>
<block v-if="orderInfo.order_status == 4">待评价</block> <block v-if="orderInfo.order_status == 4">待评价</block>
<block v-if="orderInfo.order_status == 5">已完成</block> <block v-if="orderInfo.order_status == 5">已完成</block>
@ -42,7 +45,9 @@
<block v-if="isGoodsReturn==false"> <block v-if="isGoodsReturn==false">
<view class='nav'> <view class='nav'>
<view class='navCon acea-row row-between-wrapper'> <view class='navCon acea-row row-between-wrapper'>
<view :class="orderInfo.order_status == 8||orderInfo.order_status == 1 ? 'on':''">待付款</view> <view
:class="orderInfo.order_status == 8||orderInfo.order_status == 1||orderInfo.order_status == 9 ? 'on':''">
待付款</view>
<view <view
:class="(orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2) ? 'on':''" :class="(orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2) ? 'on':''"
v-if="orderInfo.order_type != 1">待发货</view> v-if="orderInfo.order_type != 1">待发货</view>
@ -55,8 +60,10 @@
<view :class="orderInfo.order_status == 5 ? 'on':''">已完成</view> <view :class="orderInfo.order_status == 5 ? 'on':''">已完成</view>
</view> </view>
<view class='progress acea-row row-between-wrapper'> <view class='progress acea-row row-between-wrapper'>
<view class='iconfont icon-webicon318 t-color' v-if=" orderInfo.order_status == 8||orderInfo.order_status == 1"></view> <view class='iconfont icon-webicon318 t-color'
<view class='iconfont icon-yuandianxiao t-color' else></view> v-if=" orderInfo.order_status == 8||orderInfo.order_status == 9||orderInfo.order_status == 1">
</view>
<view class='iconfont t-color' else></view>
<view class='line b-color'></view> <view class='line b-color'></view>
<view class='iconfont' <view class='iconfont'
:class='((orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2) ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "t-color":"")'> :class='((orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2) ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "t-color":"")'>
@ -291,6 +298,8 @@
<view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'> <view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'>
{{ orderInfo.presellOrder.final_start_time | filterDay }} 付尾款 {{ orderInfo.presellOrder.final_start_time | filterDay }} 付尾款
</view> </view>
<view v-if="orderInfo.presellOrder.activeStatus == 1" class='bnt b-color' @tap='pay_open()'>立即付款 <view v-if="orderInfo.presellOrder.activeStatus == 1" class='bnt b-color' @tap='pay_open()'>立即付款
</view> </view>
<view v-if="orderInfo.presellOrder.activeStatus == 2" class='bnt cancel' @click="cancelOrder">取消订单 <view v-if="orderInfo.presellOrder.activeStatus == 2" class='bnt cancel' @click="cancelOrder">取消订单
@ -303,6 +312,12 @@
<block v-if="orderInfo.status == 9"> <block v-if="orderInfo.status == 9">
<view class="bnt cancel" @click="getCombinationRemove">取消拼团</view> <view class="bnt cancel" @click="getCombinationRemove">取消拼团</view>
</block> </block>
<block v-if="orderInfo.order_status == 9">
<view class='bnt cancel' @click="cancelOrder">取消订单
</view>
<view class='bnt b-color' @tap='pay_opena()'>立即付款
</view>
</block>
<view class='bnt b-color' v-if="orderInfo.activity_type==4 && orderInfo.status==9" @tap='goJoinPink'> <view class='bnt b-color' v-if="orderInfo.activity_type==4 && orderInfo.status==9" @tap='goJoinPink'>
查看拼团</view> 查看拼团</view>
<block v-if="orderInfo.status == 1"> <block v-if="orderInfo.status == 1">
@ -787,7 +802,20 @@
* 打开支付组件 * 打开支付组件
* *
*/ */
pay_opena() {
uni.showModal({
title: '提示',
title: '该订单属于先货后款的订单,等商户确认后才能支付',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
pay_open: function(pay_price, order_id) { pay_open: function(pay_price, order_id) {
this.pay_close = true; this.pay_close = true;

View File

@ -365,7 +365,7 @@
onLoad: function(options) { onLoad: function(options) {
console.log('11111111') console.log('11111111')
this.credit_buy = options.credit_buy this.credit_buy = options.credit_buy
console.log(options.product_type) // console.log(options.product_type)
if (options.product_type) { if (options.product_type) {
this.product_type = options.product_type this.product_type = options.product_type
} }

View File

@ -20,7 +20,7 @@
--> -->
<!-- 头部导航 --> <!-- 头部导航 -->
<view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==3?'#FC4E09':''}" > <view v-if="!isUser" class="header" :style="{backgroundColor:'#FC4E09'}" >
<view class="items" @click.stop="navTap(2)"> <view class="items" @click.stop="navTap(2)">
<text class="tName" :class="currentNav==2?'on':''">关注</text> <text class="tName" :class="currentNav==2?'on':''">关注</text>
</view> </view>
@ -1182,7 +1182,7 @@
margin: 0 30rpx; margin: 0 30rpx;
.tName { .tName {
color: #ffffff; color: #000;
font-size: 32rpx; font-size: 32rpx;
&.on { &.on {

View File

@ -15,7 +15,7 @@
<!-- 头部导航 --> <!-- 头部导航 -->
<view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==3?'#FC4E09':''}"> <view v-if="!isUser" class="header" :style="{backgroundColor:'#FC4E09'}">
<view class="tool-bar"> <view class="tool-bar">
<view class='iconfont icon-xiangzuo' @tap='goBack'></view> <view class='iconfont icon-xiangzuo' @tap='goBack'></view>
@ -1258,6 +1258,8 @@
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
height: 120rpx; height: 120rpx;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -1279,7 +1281,7 @@
margin-right: 40rpx; margin-right: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 30rpx; font-size: 30rpx;
color: #fff; color: #000;
margin-top: 60rpx; margin-top: 60rpx;
} }
} }
@ -1288,7 +1290,7 @@
margin: 0 30rpx; margin: 0 30rpx;
.tName { .tName {
color: #ffffff; color: #000;
font-size: 32rpx; font-size: 32rpx;
&.on { &.on {

View File

@ -26,7 +26,8 @@
</view> </view>
<view class="article_box"> <view class="article_box">
<block v-for="(item, index) in recoList.slice(0,2)" :key="index"> <block v-for="(item, index) in recoList.slice(0,2)" :key="index">
<navigator :url='"/pages/news_details/index?id="+item.article_id' hover-class='none' class='article-item'> <navigator :url='"/pages/news_details/index?id="+item.article_id' hover-class='none'
class='article-item'>
<view class='text'> <view class='text'>
<view class='name'>{{item.title}}</view> <view class='name'>{{item.title}}</view>
<view class="time">{{item.create_time}}</view> <view class="time">{{item.create_time}}</view>
@ -50,8 +51,8 @@
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c"> <view class="goods_info flex_a_c">
<view class="l_info flex_a_c"> <view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill" <image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
class="g_img"></image> mode="aspectFill" class="g_img"></image>
<view class="g_name">{{item.author}}</view> <view class="g_name">{{item.author}}</view>
</view> </view>
<!-- <view class="nice_box" @click.stop="giveStart(item)"> <!-- <view class="nice_box" @click.stop="giveStart(item)">
@ -82,13 +83,27 @@
<script> <script>
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
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 { graphicStartApi } from '@/api/community.js' import {
import { getArticleList, getArticleCategoryList, get_cloud_shop } from '@/api/api.js' graphicStartApi
import { getHotBanner } from '@/api/store.js' } from '@/api/community.js'
import { Toast } from '@/libs/uniApi' import {
import { getGeocoder } from '@/api/store.js'; getArticleList,
getArticleCategoryList,
get_cloud_shop
} from '@/api/api.js'
import {
getHotBanner
} from '@/api/store.js'
import {
Toast
} from '@/libs/uniApi'
import {
getGeocoder
} from '@/api/store.js';
export default { export default {
components: { components: {
mTabbar, mTabbar,
@ -100,12 +115,17 @@
list: [], list: [],
tabsActive: 0 tabsActive: 0
}, },
town: '', street_id: '', town: '',
street_id: '',
emptyShow: false, emptyShow: false,
articleList: [], articleList: [],
recoList: [], recoList: [],
bgData: [{ pic: '' }, { pic: '' }], bgData: [{
pic: ''
}, {
pic: ''
}],
store_id: '', store_id: '',
locationArr: ({}), locationArr: ({}),
setrecommend_address: "", setrecommend_address: "",
@ -113,6 +133,7 @@
} }
}, },
onLoad() { onLoad() {
this.appLocation()
getHotBanner('good').then(res => { getHotBanner('good').then(res => {
// console.log(res); // console.log(res);
this.bgData = res.data this.bgData = res.data
@ -122,20 +143,47 @@
this.recoList = res.data.list this.recoList = res.data.list
}) })
this.getTownAndStoreId() this.getTownAndStoreId()
}, },
onShow() {}, onShow() {},
computed: mapGetters(['location']), computed: mapGetters(['location']),
watch: {
location: {
handler(newVal, oldVal) {
this.street_id = newVal.address_reference.town.id
this.getCloudShopMerId(this.street_id)
this.town = newVal.address_component.street ?? ''
},
immediate: true
}
},
methods: { methods: {
appLocation() {
uni.getLocation({
type: 'wgs84',
timeout: '10',
success: (res) => {
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
getGeocoder({
lat: latitude,
long: longitude
}).then(res => {
console.log(res.data.address_reference.town)
this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id
this.getCloudShopMerId(res.data.address_reference.town.id)
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
})
},
fail: (err) => {
uni.showToast({
title: "获取定位超时",
icon: 'none',
duration: 2000
});
}
});
},
getTownAndStoreId() { getTownAndStoreId() {
const LOCA = this.location const LOCA = this.location
this.street_id = LOCA.address_reference.town.id this.street_id = LOCA.address_reference.town.id
@ -146,6 +194,8 @@
this.street_id = e.value[1].code this.street_id = e.value[1].code
this.town = e.value[1].name this.town = e.value[1].name
this.getCloudShopMerId(e.value[1].code) this.getCloudShopMerId(e.value[1].code)
// console.log( e.value[1].name)
uni.setStorageSync('adress_location', e.value[1].name)
}, },
getCloudShopMerId(id) { getCloudShopMerId(id) {
get_cloud_shop(id).then(res => { get_cloud_shop(id).then(res => {
@ -175,7 +225,9 @@
}, },
async getArticle() { async getArticle() {
let list = [] let list = []
const { data } = await getArticleCategoryList() const {
data
} = await getArticleCategoryList()
data.map((item, index) => { data.map((item, index) => {
if (item.title !== '推荐') { if (item.title !== '推荐') {
list.push(item) list.push(item)
@ -185,19 +237,24 @@
this.getArticleList(list[0].article_category_id) this.getArticleList(list[0].article_category_id)
}, },
async getArticleList(id) { async getArticleList(id) {
const { data } = await getArticleList(id) const {
data
} = await getArticleList(id)
this.articleList = data.list this.articleList = data.list
}, },
// //
giveStart(item) { giveStart(item) {
let status = item.status ? 0 : 1 let status = item.status ? 0 : 1
// console.log('item', item); // console.log('item', item);
graphicStartApi(item.community_id, { status: status }).then(res => { graphicStartApi(item.community_id, {
status: status
}).then(res => {
Toast(res.message) Toast(res.message)
this.getArticleList() this.getArticleList()
}) })
}, },
tabsChange(item) { tabsChange(item) {
this.getArticleList(item.article_category_id) this.getArticleList(item.article_category_id)
this.street_id = item.id this.street_id = item.id
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index

View File

@ -148,7 +148,8 @@
<text class='money p-color'>{{item.pay_price}}</text> <text class='money p-color'>{{item.pay_price}}</text>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<view class='bnt b-color' @click.stop='goPay(item.pay_price,item.group_order_id,item.activity_type)'> <view class='bnt b-color'
@click.stop='goPay(item.pay_price,item.group_order_id,item.activity_type)'>
立即付款</view> 立即付款</view>
</view> </view>
</view> </view>
@ -181,6 +182,7 @@
<view v-if="item.order_status == 6" class='t-color'>已退款</view> <view v-if="item.order_status == 6" class='t-color'>已退款</view>
<view v-if="item.order_status == 8 && item.pay_type == 8" class='t-color'>待结算 <view v-if="item.order_status == 8 && item.pay_type == 8" class='t-color'>待结算
</view> </view>
<view v-if="item.order_status == 9" class='t-color'>待商家确认</view>
</view> </view>
<view v-if="item.activity_type === 2"> <view v-if="item.activity_type === 2">
<view class='item-info acea-row row-between row-top' <view class='item-info acea-row row-between row-top'
@ -275,13 +277,24 @@
<block v-if="item.order_status == 1 "> <block v-if="item.order_status == 1 ">
<view class='bnt b-color' <view class='bnt b-color' v-if="item.status==12" @click.stop='dePay'>
去付款
</view>
<view class='bnt b-color' v-else
@click.stop='goPay(item.pay_price,item.group_order_id,item.activity_type)'> @click.stop='goPay(item.pay_price,item.group_order_id,item.activity_type)'>
去付款 去付款
</view> </view>
</block> </block>
<block v-if="item.order_status == 9 ">
<view class='bnt b-color' v-if="item.status==12" @click.stop='dePay'>
去付款
</view>
<view class='bnt b-color' v-else
@click.stop='goPay(item.pay_price,item.group_order_id,item.activity_type)'>
去付款
</view>
</block>
<block v-if="item.status == 2 "> <block v-if="item.status == 2 ">
<!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none"> <!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
@ -320,8 +333,8 @@
</view> </view>
<home></home> <home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" :order_type='order_type' @onChangeFun='onChangeFun' :order_id="pay_order_id" <payment :payMode='payMode' :pay_close="pay_close" :order_type='order_type' @onChangeFun='onChangeFun'
:totalPrice='totalPrice'></payment> :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing> <addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
@ -407,7 +420,7 @@
limit: 20, limit: 20,
receivingshow: false, receivingshow: false,
domain: HTTP_REQUEST_URL, domain: HTTP_REQUEST_URL,
order_type:0, order_type: 0,
payMode: [{ payMode: [{
name: "微信支付", name: "微信支付",
icon: "icon-weixinzhifu", icon: "icon-weixinzhifu",
@ -593,12 +606,12 @@
* 打开支付组件 * 打开支付组件
* *
*/ */
goPay: function(pay_price, order_id,order_type) { goPay: function(pay_price, order_id, order_type) {
this.$set(this, 'pay_close', true); this.$set(this, 'pay_close', true);
this.order_id = order_id; this.order_id = order_id;
this.pay_order_id = order_id.toString() this.pay_order_id = order_id.toString()
this.$set(this, 'totalPrice', pay_price); this.$set(this, 'totalPrice', pay_price);
this.order_type=order_type this.order_type = order_type
}, },
/** /**
* 支付成功回调 * 支付成功回调
@ -663,6 +676,24 @@
} }
// #endif // #endif
}, },
/**
* 点击去评价
*/
dePay() {
uni.showModal({
title: '提示',
title: '该订单属于先货后款的订单,等商户确认后才能支付',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
/** /**
* 点击去评价 * 点击去评价
*/ */

View File

@ -204,6 +204,7 @@
}, 1000) }, 1000)
} }
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message title: err.message
}) })

View File

@ -27,7 +27,6 @@ const state = {
const mutations = { const mutations = {
setLocation(state, data) { setLocation(state, data) {
// console.log(data);
state.location = data state.location = data
Cache.set('LOCATION_DATA', data); Cache.set('LOCATION_DATA', data);
}, },