1.修改金额显示4位数,可以输入数字
2.添加联系我们页面
3.添加分享页面
4.删除打包文件
main
huyuanxiang 2 years ago
parent 543d9a5ef6
commit c60246de6c

@ -115,6 +115,15 @@ export default {
config: myconfig.themeList,//
themeObj: myconfig.themeList[5]
},
mounted() {
// #ifdef H5
const script = document.createElement('script')
script.src = ''
script.onload = function () {
}
// #endif
},
methods: {}
};
</script>

@ -286,7 +286,14 @@
{
"path": "pages/views/user/extension",
"style": {
"navigationBarTitleText": "推广海报",
"navigationBarTitleText": "分享商城",
"navigationBarBackgroundColor": "#F8F8F8"
}
},
{
"path": "pages/views/user/contactUs",
"style": {
"navigationBarTitleText": "联系我们",
"navigationBarBackgroundColor": "#F8F8F8"
}
},

@ -10,11 +10,11 @@
</view>
<view class="moneys">
<!-- 这里的价格是选择完规格后计算的价格 -->
{{(Number(goods.price) * number).toFixed(2)}}
{{(Number(goods.price) * number).toFixed(4)}}
</view>
<view class="kucun">
<!-- 这里的价格是选择完规格后计算的库存 -->
库存: {{goods.stock || stock }}
<!-- 库存: {{goods.stock || stock }} -->
</view>
</view>
<block v-if="goods._skus.length > 0">
@ -41,7 +41,11 @@
<view class="n_left">购买数量</view>
<view class="n_right">
<text class="jian" @tap="onChangeNum('reduce')"></text>
<input :value="number" disabled type="number" maxlength="2" class="inputs"></input>
<input v-model="number"
type="number" max="99999"
@input="handlerChangeNum"
min="1"
class="inputs"></input>
<text class="jia" @tap="onChangeNum('add')"></text>
</view>
</view>
@ -54,7 +58,7 @@
</template>
<script>
import { setTabBarBadge } from'@/utils/util.js'
import { setTabBarBadge, debounce } from'@/utils/util.js'
import {getCart, setCart ,resetCart, setGoodsData,getCartNumber, getToken} from '@/utils/auth.js'
import { addCart } from '@/api';
export default {
@ -69,7 +73,7 @@ export default {
update: true,
nowList:{},
stock: 500
stock: 99999
};
},
components: {},
@ -103,6 +107,18 @@ export default {
}
},
methods: {
handlerChangeNum() {
debounce(() => {
const num = Number(this.number)
if (num < 1 || !num) {
this.number = 1
}
if (num > this.stock) {
this.number = this.stock
}
}, 500)
},
moveHandle(){
return
},
@ -225,17 +241,20 @@ export default {
},
onChangeNum(type = 'reduce') {
let num = Number(this.number)
if (type === 'add') {
if (this.number >= this.stock) {
if (num >= this.stock) {
return
}
this.number += 1
num += 1
} else {
if (this.number <= 1) {
if (num <= 1) {
this.number = 1
return;
}
this.number -= 1
num -= 1
}
this.number = num
},
onsubmit(value) {
@ -286,6 +305,9 @@ export default {
const item = colCart[y]
if (data.id === item.id) {
item.number += this.number
if (item.number > this.stock) {
item.number = this.stock
}
item._selectedSku = selectedSku
break
}
@ -460,7 +482,7 @@ export default {
.number .n_right{
float: right;
height: 60upx;
width: 200upx;
// width: 200upx;
background-color: #F5F5F5;
margin-top: 10upx;
border-radius: 5upx;
@ -485,7 +507,7 @@ export default {
background-color: #eee;
}
.n_right .inputs{
width: 76upx;
width: 100upx;
float: left;
text-align: center;
margin-top: 6upx;

@ -42,7 +42,13 @@ export default {
},
methods: {
jumpLink(row) {
const whiteUrls = ['pages/views/user/myaddress', 'setting/index']
console.log(row)
const whiteUrls = [
'pages/views/user/myaddress',
'pages/views/setting/index',
'pages/views/user/extension',
'pages/views/user/contactUs'
]
if (!whiteUrls.some(v => row.url.includes(v))) {
uni.showToast({
icon:'none',

@ -47,15 +47,19 @@
{{ item.selectSku.money }}
</text>
<text class="price" v-else>
{{(Number(item.price) * item.number).toFixed(2)}}
{{(Number(item.price) * item.number).toFixed(4)}}
</text>
<view class="right_btn">
<view class="sub" @tap="onsub(item,index)" :style="'color:' + (item.num == 1?'#ccc':'')">-</view>
<view class="sub" @tap="onChangeNum(item,index, 'sub')" :style="'color:' + (item.num == 1?'#ccc':'')">-</view>
<view class="input">
<input :value="item.number"
maxlength="2" disabled></input>
<input
v-model="item.number"
type="number"
@blur="handlerChangeNum(item, 'blur')"
@input="handlerChangeNum(item, 'input')"
max="99999"></input>
</view>
<view class="add" @tap="onadd(item,index)">+</view>
<view class="add" @tap="onChangeNum(item,index, 'add')">+</view>
</view>
</view>
</view>
@ -107,7 +111,8 @@
removeCart,
getToken
} from '@/utils/auth.js'
import {resetNum, setTabBarBadge} from '@/utils/util.js'
import {resetNum, setTabBarBadge, debounce} from '@/utils/util.js'
export default {
data() {
return {
@ -121,6 +126,7 @@
lock: false,
bottomShow: '',
showHeader: false,
stock: 99999,
themeObj: app.globalData.themeObj
};
},
@ -260,25 +266,45 @@
current: '99999'
});
},
onsub(item, index) {
// //
if (item.number <= 1) {
handlerChangeNum(item, type = 'input') {
if (type === 'blur') {
if (!item.number) {
item.number = 1
}
resetCart(this.cartList)
this.getSumprice()
return
}
let number = item.number - 1
this.$set(item, 'number', number)
resetCart(this.cartList)
this.getSumprice() //
debounce(() => {
if (item.number >= this.stock) {
item.number = this.stock
}
if (item.number != '' && item.number < 1) {
item.number = 1
}
}, 1)
},
onadd(item, index) {
onChangeNum(item, index, type = 'add') {
if (item.status == 1) { //
return
}
//
let num = item.number + 1;
this.$set(item, 'number', num)
const num = Number(item.number)
if (type === 'add') {
//
if (num >= this.stock) {
item.number = this.stock
return
}
item.number = num + 1
} else {
if (num <= 1) {
return
}
item.number = num - 1
}
resetCart(this.cartList)
this.getSumprice() //
},
@ -574,20 +600,21 @@
}
.right_btn .input {
width: 50rpx;
width: 100upx;
height: 50rpx;
margin: 0 8rpx;
background-color: #f3f3f3;
}
.right_btn .input input {
width: 50rpx;
width: 100%;
height: 50rpx;
display: flex;
font-size: 22rpx;
text-align: center;
align-items: center;
justify-content: center;
// display: flex;
// font-size: 22rpx;
// text-align: center;
// align-items: center;
// justify-content: center;
color: $mycolor;
}

@ -7,7 +7,7 @@
<view class="user" @click="onLogin">
<image :src="userdata.avatar" v-if="userdata.avatar"></image>
<image src="../../../static/images/face.jpg" v-else></image>
<text>{{userdata.username || '登录'}}</text>
<text>{{userdata.username || '-'}}</text>
</view>
</view>
<view class="vip">
@ -108,13 +108,13 @@ export default {
}, {
name: '联系我们',
icon: 'icon-kefu1',
url: '',
url: '/pages/views/user/contactUs',
id: 8,
elseUrl: ''
}, {
name: '设置',
icon: 'icon-shezhi2',
url: '../setting/index',
url: 'pages/views/setting/index',
id: 9,
elseUrl: ''
}],

@ -0,0 +1,19 @@
<template>
<view class="contact">
<image src="../../../static/images/user/contact_us.png" mode="widthFix"></image>
<text>长按识别联系我们</text>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.contact {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>

@ -9,7 +9,7 @@
</block>
<!-- #endif -->
<!-- #ifndef H5 -->
<view class="saveImg" @tap="saveImg" :style="'background:' + colors">保存海报</view>
<view class="saveImg" @longtap="saveImg" :style="'background:' + colors">保存海报</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<p class="tips">长按图片进行保存</p>
@ -101,19 +101,20 @@
});
},
createPoster() { //
// 0.76
var ctx = uni.createCanvasContext('mycanvas', this)
ctx.fillStyle = '#FFFFFF'
ctx.fillRect(0, 0, this.windowWidth - 30, 560)
//
ctx.drawImage('/static/images/user/poster.jpg', 0, 0, this.windowWidth - 30, 560)
ctx.drawImage('/static/images/user/shop.png', 0, 0, this.windowWidth - 30, 560)
ctx.save()
//
let avatar_width = 60; //
let avatar_height = 60; //
let avatar_x = 15; //x
let avatar_y = 15; //y
let radius = 8 //
this.setRadius(ctx, avatar_width, avatar_height, avatar_x, avatar_y, radius)
// let avatar_width = 60; //
// let avatar_height = 60; //
// let avatar_x = 15; //x
// let avatar_y = 15; //y
// let radius = 8 //
// this.setRadius(ctx, avatar_width, avatar_height, avatar_x, avatar_y, radius)
// #ifndef H5
setTimeout(() => { // h5
ctx.save();
@ -155,6 +156,7 @@
ctx.restore();
},
saveImg() {
console.log(123)
//
uni.showLoading({
title: '保存中...'

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

@ -1,2 +0,0 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>jiahui-yang商城模板</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.58d5e7ce.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.c52cb3d7.js></script><script src=./static/js/index.b568c837.js></script></body></html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save