修改tabbar名称 更新视频搜索 边距 多规格商品加入购物车

This commit is contained in:
jia 2023-09-13 22:29:46 +08:00
parent 178c2ad401
commit d2d6849a3f
10 changed files with 2734 additions and 2555 deletions

View File

@ -13,3 +13,13 @@ export function cloudWarehouse(data) {
export function supMenuApi(data) { export function supMenuApi(data) {
return request.get('intention/v2/cate', data); return request.get('intention/v2/cate', data);
} }
/**
* 获取购物车列表
*
*/
export function getCartList(data) {
return request.get("user/cart/lst", data);
}
export function getCartCounts(data) {
return request.get("user/cart/count", data);
}

View File

@ -25,6 +25,7 @@ if (process.env.NODE_ENV === "development") {
// #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' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn" // httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产 httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产

View File

@ -2,8 +2,8 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "1.3.6", "versionName" : "1.3.8",
"versionCode" : 136, "versionCode" : 138,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -1618,7 +1618,7 @@
"pagePath": "pages/gather/gather", "pagePath": "pages/gather/gather",
"iconPath": "static/tabbar_icon/b.png", "iconPath": "static/tabbar_icon/b.png",
"selectedIconPath": "static/tabbar_icon/b-a.png", "selectedIconPath": "static/tabbar_icon/b-a.png",
"text": "工作台" "text": "生产"
}, },
{ {
"pagePath": "pages/plant_release/index", "pagePath": "pages/plant_release/index",
@ -1632,7 +1632,7 @@
"iconPath": "static/tabbar_icon/d.png", "iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png", "selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "供" "text": "供"
}, },
{ {
"pagePath": "pages/user/index", "pagePath": "pages/user/index",

View File

@ -14,11 +14,13 @@
<productConSwiper :imgUrls="storeInfo.slider_image" :videoCoverImg="videoCoverImg" <productConSwiper :imgUrls="storeInfo.slider_image" :videoCoverImg="videoCoverImg"
:videoline="storeInfo.video_link"></productConSwiper> :videoline="storeInfo.video_link"></productConSwiper>
<!--有氛围图--> <!--有氛围图-->
<view v-if="storeInfo.atmosphere_pic" :style="{ backgroundImage: `url(${storeInfo.atmosphere_pic})` }" <view v-if="storeInfo.atmosphere_pic"
:style="{ backgroundImage: `url(${storeInfo.atmosphere_pic})` }"
class='nav acea-row row-between-wrapper'> class='nav acea-row row-between-wrapper'>
<view class='money skeleton-rect'><text class='num'>{{storeInfo.price}}</text> <view class='money skeleton-rect'><text class='num'>{{storeInfo.price}}</text>
<text v-if="!svipData" class='y-money'>{{storeInfo.ot_price}}</text> <text v-if="!svipData" class='y-money'>{{storeInfo.ot_price}}</text>
<view class="atmosphere" v-if="svipData && svipData.show_svip_price && svipData.show_svip" <view class="atmosphere"
v-if="svipData && svipData.show_svip_price && svipData.show_svip"
style="display: inline-block;"> style="display: inline-block;">
<text class="vip-money">{{storeInfo.svip_price}}</text> <text class="vip-money">{{storeInfo.svip_price}}</text>
<image class="vip-image" src="/static/images/svip.png"></image> <image class="vip-image" src="/static/images/svip.png"></image>
@ -41,7 +43,8 @@
</view> </view>
</view> </view>
<view v-if="storeInfo.atmosphere_pic" class='integral_count skeleton-rect'> <view v-if="storeInfo.atmosphere_pic" class='integral_count skeleton-rect'>
<text v-if="storeInfo.max_integral > 0" class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text> <text v-if="storeInfo.max_integral > 0"
class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text>
<text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text> <text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text>
</view> </view>
<!--无氛围图--> <!--无氛围图-->
@ -72,7 +75,8 @@
</navigator> </navigator>
</view> </view>
<view v-if="!storeInfo.atmosphere_pic" class='integral_count skeleton-rect'> <view v-if="!storeInfo.atmosphere_pic" class='integral_count skeleton-rect'>
<text v-if="storeInfo.max_integral > 0" class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text> <text v-if="storeInfo.max_integral > 0"
class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text>
<text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text> <text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text>
</view> </view>
<view v-if="!storeInfo.atmosphere_pic" class='introduce skeleton-rect'> <view v-if="!storeInfo.atmosphere_pic" class='introduce skeleton-rect'>
@ -85,9 +89,11 @@
:style="{'padding-bottom':coupon.list.length || storeInfo.top_pid?0 :10+'px;'}"> :style="{'padding-bottom':coupon.list.length || storeInfo.top_pid?0 :10+'px;'}">
<view class="skeleton-rect">市场价:{{storeInfo.ot_price ? storeInfo.ot_price : ''}}</view> <view class="skeleton-rect">市场价:{{storeInfo.ot_price ? storeInfo.ot_price : ''}}</view>
<view class="skeleton-rect"> <view class="skeleton-rect">
库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view> 库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
</view>
<view class="skeleton-rect"> <view class="skeleton-rect">
销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view> 销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
</view>
</view> </view>
<navigator v-if="storeInfo.top_pid" hover-class='none' <navigator v-if="storeInfo.top_pid" hover-class='none'
:url="`/pages/activity/rank/index?cate_id=${storeInfo.top_pid}`" class='label' :url="`/pages/activity/rank/index?cate_id=${storeInfo.top_pid}`" class='label'
@ -116,8 +122,8 @@
</view> </view>
<view class='iconfont icon-jiantou'></view> <view class='iconfont icon-jiantou'></view>
</view> </view>
<view v-if="specsInfo.params && specsInfo.params.length>0" class="attribute acea-row row-between-wrapper" <view v-if="specsInfo.params && specsInfo.params.length>0"
@click="seeSpecs"> class="attribute acea-row row-between-wrapper" @click="seeSpecs">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
参数 参数
<view class="list line1"> <view class="list line1">
@ -129,7 +135,8 @@
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>
<!--运费--> <!--运费-->
<view v-if="shipping || shippingValue" class='attribute acea-row row-between-wrapper' @click="showShip"> <view v-if="shipping || shippingValue" class='attribute acea-row row-between-wrapper'
@click="showShip">
<view class="acea-row row-between-wrapper">运费 <view class="acea-row row-between-wrapper">运费
<text class='atterTxt'>{{shippingValue}}</text> <text class='atterTxt'>{{shippingValue}}</text>
</view> </view>
@ -162,7 +169,8 @@
show-scrollbar="false"> show-scrollbar="false">
<view class="img-box"> <view class="img-box">
<view class="combo_item" v-for="(item,index) in comboList" :key="index"> <view class="combo_item" v-for="(item,index) in comboList" :key="index">
<view class="img-item" v-for="(itemn,indexn) in item.discountsProduct" :key="indexn"> <view class="img-item" v-for="(itemn,indexn) in item.discountsProduct"
:key="indexn">
<image :src="itemn.image" mode="" @click="openCombo"></image> <image :src="itemn.image" mode="" @click="openCombo"></image>
<text v-if="indexn != item.count-1" class="iconfont icon-jiahao2"></text> <text v-if="indexn != item.count-1" class="iconfont icon-jiahao2"></text>
</view> </view>
@ -198,10 +206,11 @@
</navigator> </navigator>
</view> </view>
<view class="imgList acea-row"> <view class="imgList acea-row">
<view class="pictrue" v-for="(item, index) in storeInfo.community" :key="index" v-if="index<=2" <view class="pictrue" v-for="(item, index) in storeInfo.community" :key="index"
@click="goPlant(item)"> v-if="index<=2" @click="goPlant(item)">
<image :src="item.image[0]" class="image"></image> <image :src="item.image[0]" class="image"></image>
<image v-if="item.is_type == 2" class="video_img" src="@/static/images/stop.png" mode=""></image> <image v-if="item.is_type == 2" class="video_img" src="@/static/images/stop.png"
mode=""></image>
</view> </view>
</view> </view>
</view> </view>
@ -215,19 +224,22 @@
<view class="info"> <view class="info">
<view class="name line1"> <view class="name line1">
<text>{{storeInfo.merchant.mer_name ? storeInfo.merchant.mer_name : ''}}</text> <text>{{storeInfo.merchant.mer_name ? storeInfo.merchant.mer_name : ''}}</text>
<image v-if="margin_ico_switch==1 && margin_ico && storeInfo.merchant.is_margin == 10" <image
v-if="margin_ico_switch==1 && margin_ico && storeInfo.merchant.is_margin == 10"
:src="margin_ico" class="store-margin"></image> :src="margin_ico" class="store-margin"></image>
<text v-if="storeInfo.merchant.type_name" <text v-if="storeInfo.merchant.type_name"
class="font-bg-red ml8 bt-color">{{storeInfo.merchant.type_name}}</text> class="font-bg-red ml8 bt-color">{{storeInfo.merchant.type_name}}</text>
<text v-else-if="storeInfo.merchant.is_trader" class="font-bg-red ml8 bt-color">自营</text> <text v-else-if="storeInfo.merchant.is_trader"
class="font-bg-red ml8 bt-color">自营</text>
</view> </view>
<view v-if="storeInfo.merchant.care_count" class="txt"> <view v-if="storeInfo.merchant.care_count" class="txt">
{{storeInfo.merchant.care_count < 10000 ? storeInfo.merchant.care_count : (storeInfo.merchant.care_count/10000).toFixed(2)+'万'}}人关注 {{storeInfo.merchant.care_count < 10000 ? storeInfo.merchant.care_count : (storeInfo.merchant.care_count/10000).toFixed(2)+'万'}}人关注
</view> </view>
<view v-else class="txt">0人关注</view> <view v-else class="txt">0人关注</view>
</view> </view>
<navigator v-if="hide_mer_status != 1" :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" <navigator v-if="hide_mer_status != 1"
class="link" hover-class="none">进店</navigator> :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link"
hover-class="none">进店</navigator>
</view> </view>
<view class="score-wrapper"> <view class="score-wrapper">
<view class="item"> <view class="item">
@ -241,12 +253,14 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="storeInfo.merchant.recommend && storeInfo.merchant.recommend.length > 0" class="con-box"> <view v-if="storeInfo.merchant.recommend && storeInfo.merchant.recommend.length > 0"
class="con-box">
<view class="title">店铺推荐</view> <view class="title">店铺推荐</view>
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false"> <scroll-view scroll-x="true" style="white-space: nowrap; display: flex"
show-scrollbar="false">
<view class="img-box"> <view class="img-box">
<view class="img-item" v-for="(item,index) in storeInfo.merchant.recommend" :key="index" <view class="img-item" v-for="(item,index) in storeInfo.merchant.recommend"
@click="goProDetail(item)"> :key="index" @click="goProDetail(item)">
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage> <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
<!-- <image :src="item.image"></image> --> <!-- <image :src="item.image"></image> -->
<view class="txt"> <view class="txt">
@ -265,7 +279,8 @@
<view class='conter' v-if="description" style="min-height:50rpx;"> <view class='conter' v-if="description" style="min-height:50rpx;">
<!-- #ifndef APP-PLUS --> <!-- #ifndef APP-PLUS -->
<jyf-parser v-if="description.type == 0" :domain='domain' <jyf-parser v-if="description.type == 0" :domain='domain'
:html="description.content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser> :html="description.content.replace(/<br\/>/ig, '')" ref="article"
:tag-style="tagStyle"></jyf-parser>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view v-if="description.type == 0" class="description" <view v-if="description.type == 0" class="description"
@ -276,7 +291,8 @@
{{description.content.title}} {{description.content.title}}
</view> </view>
<view v-if="description.content && description.content.image" class="pictures"> <view v-if="description.content && description.content.image" class="pictures">
<image v-for="(item,index) in description.content.image" :key="index" :src="item"></image> <image v-for="(item,index) in description.content.image" :key="index" :src="item">
</image>
</view> </view>
</view> </view>
</view> </view>
@ -311,12 +327,13 @@
<view>收藏</view> <view>收藏</view>
</view> </view>
<navigator v-if="product_type == 98" open-type='navigate' class="animated item skeleton-rect" <navigator v-if="product_type == 98" open-type='navigate' class="animated item skeleton-rect"
:class="animated==true?'bounceIn':''" url='/pages/nongKe/supply_chain/shopping_trolley' hover-class="none"> :class="animated==true?'bounceIn':''" url='/pages/nongKe/supply_chain/shopping_trolley'
hover-class="none">
<view class='iconfont icon-gouwuche1'></view> <view class='iconfont icon-gouwuche1'></view>
<view>购物车</view> <view>购物车</view>
</navigator> </navigator>
<navigator v-else open-type='navigate' class="animated item skeleton-rect" :class="animated==true?'bounceIn':''" <navigator v-else open-type='navigate' class="animated item skeleton-rect"
url='/pages/order_addcart/order_addcart' hover-class="none"> :class="animated==true?'bounceIn':''" url='/pages/order_addcart/order_addcart' hover-class="none">
<view class='iconfont icon-gouwuche1'> <view class='iconfont icon-gouwuche1'>
<text v-if="CartCount>0" class='num'>{{CartCount || 0}}</text> <text v-if="CartCount>0" class='num'>{{CartCount || 0}}</text>
</view> </view>
@ -346,7 +363,8 @@
<!-- 组件 --> <!-- 组件 -->
<productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" <productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window' @ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window'
:maxCount="max_count" :minCount="min_count" :svipPrice="svipPrice" :image="storeInfo.image"></productWindow> :maxCount="max_count" :minCount="min_count" :svipPrice="svipPrice" :image="storeInfo.image">
</productWindow>
<block v-if="coupon.coupon"> <block v-if="coupon.coupon">
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" @ChangCoupons="ChangCoupons" <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" @ChangCoupons="ChangCoupons"
@ChangCouponsUseState="ChangCouponsUseState"></couponListWindow> @ChangCouponsUseState="ChangCouponsUseState"></couponListWindow>
@ -355,8 +373,8 @@
<!-- 分享按钮 --> <!-- 分享按钮 -->
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''"> <view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
<!-- #ifndef MP --> <!-- #ifndef MP -->
<button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' v-if="weixinStatus === true" <button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none'
@click="H5ShareBox = true"> v-if="weixinStatus === true" @click="H5ShareBox = true">
<view class="iconfont icon-weixin3"></view> <view class="iconfont icon-weixin3"></view>
<view class="">发送给朋友</view> <view class="">发送给朋友</view>
</button> </button>
@ -386,7 +404,8 @@
<view class="mask" v-if="posters" @click="listenerActionClose"></view> <view class="mask" v-if="posters" @click="listenerActionClose"></view>
<!--口令复制结果--> <!--口令复制结果-->
<copyPassword :isCopy='isCopy' :copyUrl='copyUrl' @close="closeCopy"></copyPassword> <copyPassword :isCopy='isCopy' :copyUrl='copyUrl' @close="closeCopy"></copyPassword>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize>
<!-- 海报展示 --> <!-- 海报展示 -->
<view class='poster-pop' v-if="posterImageStatus"> <view class='poster-pop' v-if="posterImageStatus">
<image src='../../static/images/poster-close.png' class='close' @click="posterImageClose"></image> <image src='../../static/images/poster-close.png' class='close' @click="posterImageClose"></image>
@ -416,8 +435,12 @@
<script> <script>
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import { getconfig } from '@/api/public.js'; import {
import { arrivalSubscribe } from '@/utils/SubscribeMessage.js'; getconfig
} from '@/api/public.js';
import {
arrivalSubscribe
} from '@/utils/SubscribeMessage.js';
import { import {
getProductDetail, getProductDetail,
getProductCode, getProductCode,
@ -429,12 +452,26 @@
getDiscountsLst, getDiscountsLst,
priceRuleApi priceRuleApi
} from '@/api/store.js'; } from '@/api/store.js';
import { getUserInfo, imgToBase } from '@/api/user.js'; import {
import { getCoupons, getShopCoupons } from '@/api/api.js'; getUserInfo,
import { getCartCounts } from '@/api/order.js'; imgToBase
import { mapGetters } from "vuex"; } from '@/api/user.js';
import { configMap } from "@/utils"; import {
import { imageBase64 } from "@/api/public"; getCoupons,
getShopCoupons
} from '@/api/api.js';
import {
getCartCounts
} from '@/api/order.js';
import {
mapGetters
} from "vuex";
import {
configMap
} from "@/utils";
import {
imageBase64
} from "@/api/public";
import productConSwiper from '@/components/productConSwiper'; import productConSwiper from '@/components/productConSwiper';
import couponListWindow from '@/components/couponListWindow'; import couponListWindow from '@/components/couponListWindow';
import copyPassword from '@/components/copyPassword'; import copyPassword from '@/components/copyPassword';
@ -445,9 +482,13 @@
// #ifndef H5 // #ifndef H5
import passwordPopup from '@/components/passwordPopup'; import passwordPopup from '@/components/passwordPopup';
// #endif // #endif
import { HTTP_REQUEST_URL } from '@/config/app'; import {
HTTP_REQUEST_URL
} from '@/config/app';
import home from '@/components/home'; import home from '@/components/home';
import { silenceBindingSpread } from "@/utils"; import {
silenceBindingSpread
} from "@/utils";
import parser from "@/components/jyf-parser/jyf-parser"; import parser from "@/components/jyf-parser/jyf-parser";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import history from "@/mixins/history"; import history from "@/mixins/history";
@ -580,7 +621,12 @@
}; };
}, },
computed: { computed: {
...configMap({ margin_ico_switch: 0, margin_ico: '', site_name: '', share_pic: '' }, mapGetters(['isLogin', 'uid', ...configMap({
margin_ico_switch: 0,
margin_ico: '',
site_name: '',
share_pic: ''
}, mapGetters(['isLogin', 'uid',
'viewColor' 'viewColor'
])), ])),
}, },
@ -737,7 +783,11 @@
typeValue = 1 typeValue = 1
} }
// #endif // #endif
arrivalNoticeApi({ unique: uniqueValue, type: typeValue, product_id: that.id }).then(res => { arrivalNoticeApi({
unique: uniqueValue,
type: typeValue,
product_id: that.id
}).then(res => {
return that.$util.Tips({ return that.$util.Tips({
title: res.message title: res.message
}) })
@ -779,12 +829,15 @@
}, },
/*获取套餐列表数据*/ /*获取套餐列表数据*/
getDiscountsData() { getDiscountsData() {
getDiscountsLst({ product_id: this.id }).then(res => { getDiscountsLst({
product_id: this.id
}).then(res => {
this.comboTotal = res.data.count; this.comboTotal = res.data.count;
res.data.list.forEach((item, index) => { res.data.list.forEach((item, index) => {
item.save_price = 0; item.save_price = 0;
item.discountsProduct.forEach((v, i) => { item.discountsProduct.forEach((v, i) => {
item.save_price += parseFloat(v.product.ot_price) - parseFloat(v.product.price) item.save_price += parseFloat(v.product.ot_price) - parseFloat(v
.product.price)
}) })
}) })
this.comboList = res.data.list; this.comboList = res.data.list;
@ -865,7 +918,8 @@
this.$set(this, 'toView', id); this.$set(this, 'toView', id);
this.$set(this, 'navActive', index); this.$set(this, 'navActive', index);
this.$set(this, 'lock', true); this.$set(this, 'lock', true);
this.$set(this, 'scrollTop', index > 0 ? that.topArr[index] - (app.globalData.navHeight / 2) : that.topArr[ this.$set(this, 'scrollTop', index > 0 ? that.topArr[index] - (app.globalData.navHeight / 2) : that
.topArr[
index]); index]);
}, },
scroll: function(e) { scroll: function(e) {
@ -946,7 +1000,8 @@
let productSelect = this.productValue[res]; let productSelect = this.productValue[res];
if (productSelect) this.$set(this, "uniqueValue", productSelect.unique); if (productSelect) this.$set(this, "uniqueValue", productSelect.unique);
if (productSelect && productSelect.stock > 0) { if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.storeInfo this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
.storeInfo
.image); .image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price); this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
@ -995,7 +1050,9 @@
mask: true mask: true
}); });
let that = this; let that = this;
const data = { product_type: this.product_type } const data = {
product_type: this.product_type
}
getProductDetail(that.id, data).then(res => { getProductDetail(that.id, data).then(res => {
uni.hideLoading(); uni.hideLoading();
let storeInfo = res.data; let storeInfo = res.data;
@ -1030,13 +1087,15 @@
that.$set(that, 'PromotionCode', storeInfo.code_base); that.$set(that, 'PromotionCode', storeInfo.code_base);
that.$set(that, 'activity', res.data.activity ? res.data.activity : []); that.$set(that, 'activity', res.data.activity ? res.data.activity : []);
that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : ''); that.$set(that, 'shippingValue', res.data.temp ? res.data.temp.name : '');
that.$set(that, 'guaranteeValue', res.data.guarantee ? res.data.guarantee.template_name : ''); that.$set(that, 'guaranteeValue', res.data.guarantee ? res.data.guarantee.template_name :
'');
that.$set(that, 'guarantee', res.data.guaranteeTemplate ? res.data.guaranteeTemplate : []); that.$set(that, 'guarantee', res.data.guaranteeTemplate ? res.data.guaranteeTemplate : []);
that.$set(that, 'shipping', res.data.temp ? res.data.temp.info : ''); that.$set(that, 'shipping', res.data.temp ? res.data.temp.info : '');
that.$set(that, 'max_count', res.data.once_max_count); that.$set(that, 'max_count', res.data.once_max_count);
that.$set(that, 'min_count', res.data.once_min_count); that.$set(that, 'min_count', res.data.once_min_count);
that.$set(that, 'svipData', res.data.show_svip_info || null); that.$set(that, 'svipData', res.data.show_svip_info || null);
that.$set(that, 'svipPrice', res.data.show_svip_info && res.data.show_svip_info.show_svip_price || that.$set(that, 'svipPrice', res.data.show_svip_info && res.data.show_svip_info
.show_svip_price ||
false); false);
that.$set(that.specsInfo, 'params', res.data.params); that.$set(that.specsInfo, 'params', res.data.params);
@ -1122,7 +1181,8 @@
"store_name", "store_name",
this.storeInfo.store_name this.storeInfo.store_name
); );
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.storeInfo this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
.storeInfo
.image); .image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price); this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
@ -1346,7 +1406,8 @@
// that.attr.productSelect.unique : "" // that.attr.productSelect.unique : ""
product_id: that.id, product_id: that.id,
cart_num: that.attr.productSelect.cart_num, cart_num: that.attr.productSelect.cart_num,
product_attr_unique: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : "", product_attr_unique: that.attr.productSelect !== undefined ? that.attr.productSelect.unique :
"",
source: this.source, source: this.source,
product_type: this.product_type, product_type: this.product_type,
spread_id: this.currSpid, spread_id: this.currSpid,
@ -1498,7 +1559,8 @@
]; ];
// #endif // #endif
//广 //广
that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name,
that
.storeInfo.ot_price, .storeInfo.ot_price,
function(tempFilePath) { function(tempFilePath) {
that.$set(that, 'posterImage', tempFilePath); that.$set(that, 'posterImage', tempFilePath);

View File

@ -220,13 +220,11 @@
}, },
onTabItemTap(e) { onTabItemTap(e) {
uni.pageScrollTo({ uni.pageScrollTo({
selector: ".Circle_friends", selector: ".Circle_friends",
scrollTop: 0 scrollTop: 0
}) })
}, },
onHide() { onHide() {

View File

@ -265,19 +265,19 @@
<view class="sku"> <view class="sku">
<view class="sku_head"> <view class="sku_head">
<view class="sku_head_l"> <view class="sku_head_l">
<u--image :showLoading="true" src="/static/images/BG.png" width="200.09rpx" <u--image :showLoading="true" :src="skuform.image" width="200.09rpx"
height="200.09rpx"></u--image> height="200.09rpx"></u--image>
</view> </view>
<view class="sku_head_r"> <view class="sku_head_r">
<view class="sku_goods_tit"> <view class="sku_goods_tit">
fsdfsdfsdfffffffff {{skuform.store_info}}
</view> </view>
<view class=""> <view class="">
<view class="sku_goods_price"> <view class="sku_goods_price">
79.00 {{skuform.price}}
</view> </view>
<view class="sku_goods_num"> <view class="sku_goods_num" v-if="this.skusize">
库存:999 库存:{{skuform.sku[this.skusize].stock}}
</view> </view>
</view> </view>
</view> </view>
@ -285,11 +285,14 @@
<view class="sku_size"> <view class="sku_size">
<view class=""> <view class="" style="margin-bottom: 10rpx;">
尺码 尺码
</view> </view>
<view class=""> <view class="">
<text>大号</text> <text class="size_li" :class="{act_size_li:item.sku==skusize}"
v-for="(item,index) in skuform.sku" @click="skusizechange(item.sku)">{{item.sku}}</text>
<!-- <text class="size_li">{item.sku}</text> -->
</view> </view>
</view> </view>
<view class="sku_num"> <view class="sku_num">
@ -300,9 +303,9 @@
<u-number-box v-model="skuNumber" @change="valChange"></u-number-box> <u-number-box v-model="skuNumber" @change="valChange"></u-number-box>
</view> </view>
</view> </view>
<view class="skuaddcart"> <view class="skuaddcart" @click="skuaddcart">
加入购物车 确定
</view> </view>
@ -343,7 +346,7 @@
getCartCounts, getCartCounts,
getCartList, getCartList,
} from '@/api/order.js'; } from '@/api/requesta.js';
import { import {
goShopDetail goShopDetail
} from '@/libs/order.js' } from '@/libs/order.js'
@ -361,7 +364,12 @@
data() { data() {
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13'; let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
return { return {
skuNumber: 0, skuform: {
},
skusize: 0,
skuNumber: 1,
showcartpop: false, showcartpop: false,
trnList: [], trnList: [],
act_cart: false, act_cart: false,
@ -427,7 +435,6 @@
onShow() { onShow() {
this.cartFn() this.cartFn()
}, },
// //
onReachBottom() { onReachBottom() {
if (this.flag || !this.goodsList.length) return if (this.flag || !this.goodsList.length) return
@ -515,8 +522,41 @@
// }, // },
methods: { methods: {
skusizechange(i) {
this.skusize = i
},
skuaddcart() {
this.showcartpop = false
// this.skuform = {}
let res = postCartAdd({
cart_num: this.skuNumber,
is_new: 0,
product_attr_unique: this.skuform.sku[this.skusize].unique,
product_id: this.skuform.product_id,
product_type: this.skuform.product_type,
spread_id: "",
}).then((res, err) => {
this.cartFn()
uni.showToast({
title: "加入成功",
duration: 1000,
})
}).catch(err => {
// this.act_cart = false
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
},
valChange(e) { valChange(e) {
this.valChange = e console.log(e.value)
this.skuNumber = e.value
// this.valChange = e.value
}, },
closecartpop() { closecartpop() {
this.showcartpop = false this.showcartpop = false
@ -626,15 +666,15 @@
}, },
addcart(item, i) { addcart(item, i) {
// this.showcartpop = true
// return
// console.log(this.isLogin) // console.log(this.isLogin)
if (!this.isLogin) { if (!this.isLogin) {
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
return return
} }
// console.log(item.sku[''] ? "1" : "2")
if (item.sku['']) {
let data = { let data = {
cart_num: 1, cart_num: 1,
is_new: 0, is_new: 0,
@ -680,15 +720,20 @@
setTimeout(() => { setTimeout(() => {
that.act_cart = false that.act_cart = false
}, 500) }, 500)
// let that = this } else {
// uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => { this.skuform = item
// that.trnList[i].left = this.cartTagInfo.left - data1.left + 'px'; this.showcartpop = true
// that.trnList[i].bottom = this.cartTagInfo.top - data1.top + 'px'; const keys = Object.keys(item.sku);
// console.log(that.trnList[i]) const firstKey = keys[0];
// console.log(keys[0])
this.skusize = keys[0]
// console.log(this.skuform)
}
return
// }).exec();
// this.tot_price += Number(price)
}, },
all(index) { all(index) {
this.showPop = false this.showPop = false
@ -752,11 +797,49 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: column; flex-direction: column;
.sku_goods_tit {
font-size: 30rpx;
width: 60vw;
/* 容器的宽度 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sku_goods_price {
color: red;
font-size: 30rpx;
font-weight: bold;
}
} }
// justify-content; // justify-content;
} }
.sku_size {
margin: 40rpx 0;
.size_li {
display: inline-block;
// width: 100rpx;
padding: 5rpx 20rpx;
margin-right: 20rpx;
text-align: center;
color: black;
border: 1px solid #EBECEE;
// height: 2;
}
.act_size_li {
background-color: #FF5C2D;
color: white;
border: #FF5C2D 1px solid;
}
}
.sku_num { .sku_num {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -765,12 +848,13 @@
.skuaddcart { .skuaddcart {
width: 50vw; width: 50vw;
background-color: #FEAB00; background-color: #FEAB00;
margin: 0 auto; margin: 20rpx auto;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
color: white; color: white;
border-radius: 80rpx; border-radius: 80rpx;
// margin-top: 20rpx;
} }
} }

View File

@ -653,6 +653,15 @@
that.$util.Tips({ that.$util.Tips({
title: res.message title: res.message
}); });
// setTimeout(function() {
// uni.redirectTo({
// url: '/pages/plantGrass/plant_user/index?id=' +
// item.uid
// })
// }, 1000);
uni.navigateBack({
delta: 1,
})
} }
}) })

View File

@ -451,9 +451,10 @@
left: 0; left: 0;
background: #ffffff; background: #ffffff;
display: flex; display: flex;
align-items: center; // align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 15rpx 30rpx; padding: 30rpx 60rpx;
padding-bottom: 100rpx;
border-top: 1rpx solid #F5F5F5; border-top: 1rpx solid #F5F5F5;
flex-direction: row; flex-direction: row;
width:750rpx; width:750rpx;
@ -466,7 +467,7 @@
width: 480rpx; width: 480rpx;
background: #F7F7F7; background: #F7F7F7;
border-radius: 31rpx; border-radius: 31rpx;
padding: 12rpx 30rpx; padding: 15rpx 30rpx;
} }
.send{ .send{
font-size: 26rpx; font-size: 26rpx;

View File

@ -117,19 +117,32 @@ const actions = {
} else { } else {
apptype = 1 apptype = 1
} }
console.log(os)
Appversion({ Appversion({
version: os.appWgtVersion, version: os.appWgtVersion,
type: apptype type: apptype,
phone_brand: os.brand
}).then((res) => { }).then((res) => {
if (Object.keys(res.data.appInfo).length > 0) { if (Object.keys(res.data.appInfo).length > 0) {
// if(res.data.appInfo.version) uni.showLoading({ // if(res.data.appInfo.version) uni.showLoading({
// title: '检查更新中' // title: '检查更新中'
// }) // })
if (res.data.appInfo.phone_brand.length > 0) {
if (plus.os.name == "Android") {
// 跳转安卓应用市场
let appurl = res.data.appInfo.dow_url //这个是通用应用市场如果想指定某个应用商店需要单独查这个应用商店的包名或scheme及参数
plus.runtime.openURL(appurl)
} else {
// 跳转AppStore
plus.runtime.launchApplication({
action: res.data.appInfo.dow_url,
})
}
} else {
// 版本更新 // 版本更新
if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 && if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
compareVersions(res.data.appInfo.version, compareVersions(res.data.appInfo.version,
@ -150,6 +163,7 @@ console.log(os)
} }
// uni.hideLoading(); // uni.hideLoading();
} }
}
} }
}).catch((err) => { }).catch((err) => {