修改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

@ -12,4 +12,14 @@ 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",

File diff suppressed because it is too large Load Diff

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,69 +666,74 @@
}, },
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 = {
cart_num: 1,
is_new: 0,
product_attr_unique: item.sku[''].unique,
product_id: item.product_id,
product_type: item.product_type,
spread_id: "",
}
let data = { let that = this
cart_num: 1, // return
is_new: 0,
product_attr_unique: item.sku[''].unique, uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => {
product_id: item.product_id, that.trnList[i].left = this.cartTagInfo.left - data1.left;
product_type: item.product_type, that.trnList[i].bottom = this.cartTagInfo.top - data1.top;
spread_id: "", console.log(that.trnList[i])
let timer = setTimeout(() => {
that.trnList[i].left = 0
that.trnList[i].bottom = 0
that.act_cart = true
setTimeout(() => {
that.act_cart = false
}, 500)
}, 1000)
}).exec();
let res = postCartAdd({
...data
}).then((res, err) => {
this.cartFn()
uni.showToast({
title: "加入成功",
duration: 1000,
})
}).catch(err => {
// this.act_cart = false
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
setTimeout(() => {
that.act_cart = false
}, 500)
} else {
this.skuform = item
this.showcartpop = true
const keys = Object.keys(item.sku);
const firstKey = keys[0];
// console.log(keys[0])
this.skusize = keys[0]
// console.log(this.skuform)
} }
return
let that = this
// return
uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => {
that.trnList[i].left = this.cartTagInfo.left - data1.left;
that.trnList[i].bottom = this.cartTagInfo.top - data1.top;
console.log(that.trnList[i])
let timer = setTimeout(() => {
that.trnList[i].left = 0
that.trnList[i].bottom = 0
that.act_cart = true
setTimeout(() => {
that.act_cart = false
}, 500)
}, 1000)
}).exec();
let res = postCartAdd({
...data
}).then((res, err) => {
this.cartFn()
uni.showToast({
title: "加入成功",
duration: 1000,
})
}).catch(err => {
// this.act_cart = false
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
setTimeout(() => {
that.act_cart = false
}, 500)
// let that = this
// uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => {
// that.trnList[i].left = this.cartTagInfo.left - data1.left + 'px';
// that.trnList[i].bottom = this.cartTagInfo.top - data1.top + 'px';
// console.log(that.trnList[i])
// }).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

@ -304,7 +304,7 @@
deleteAndroidHeight deleteAndroidHeight
这两个参数用于控制评论等的高度 这两个参数用于控制评论等的高度
--> -->
<douyin-scrollview ref="comments" :deleteIOSHeight="36" :deleteAndroidHeight="15" :userInfo="userInfo" <douyin-scrollview ref="comments" :deleteIOSHeight="36" :deleteAndroidHeight="15" :userInfo="userInfo"
@closeScrollview="closeScrollview" @successFul="pinlunFun"></douyin-scrollview> @closeScrollview="closeScrollview" @successFul="pinlunFun"></douyin-scrollview>
</view> </view>
</uni-popup> </uni-popup>
@ -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,38 +117,52 @@ 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 (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 && if (plus.os.name == "Android") {
compareVersions(res.data.appInfo.version, // 跳转安卓应用市场
wgt_v) == 1) { let appurl = res.data.appInfo.dow_url //这个是通用应用市场如果想指定某个应用商店需要单独查这个应用商店的包名或scheme及参数
try { plus.runtime.openURL(appurl)
let info = res.data.appInfo || {}; } else {
let version = { // 跳转AppStore
title: info.title || '发现新版本', plus.runtime.launchApplication({
content: info.content || '修复了部分BUG', action: res.data.appInfo.dow_url,
versionName: info.version || '1.0.1', })
downUrl: info.dow_url || '', }
force: info.force == 1 ? true : false, // 是否强制更新 } else {
quiet: info.quiet == 1 ? true : false // 是否静默更新
} // 版本更新
Updater.update(version); if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
} catch (e) { compareVersions(res.data.appInfo.version,
console.log(e); wgt_v) == 1) {
try {
let info = res.data.appInfo || {};
let version = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新
quiet: info.quiet == 1 ? true : false // 是否静默更新
}
Updater.update(version);
} catch (e) {
console.log(e);
}
// uni.hideLoading();
} }
// uni.hideLoading();
} }
} }