Browse Source

Merge remote-tracking branch 'origin/yuenan' into yuenan

yuenan
娄梦宁 3 years ago
parent
commit
06806b98b8
18 changed files with 81 additions and 115 deletions
  1. +2
    -2
      addons/unishop/uniapp/uni-shop/pages.json
  2. +8
    -8
      addons/unishop/uniapp/uni-shop/pages/address/addressManage.vue
  3. +27
    -28
      addons/unishop/uniapp/uni-shop/pages/order/createOrder.vue
  4. +1
    -1
      addons/unishop/uniapp/uni-shop/pages/order/order.vue
  5. +2
    -2
      addons/unishop/uniapp/uni-shop/pages/order/orderDetail.vue
  6. +34
    -67
      addons/unishop/uniapp/uni-shop/pages/product/product.vue
  7. +1
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html
  8. +1
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.5989c4c2.js
  9. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-addressManage.4633aeba.js
  10. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-addressManage.9ae1df57.js
  11. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-createOrder.7b7d7516.js
  12. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-createOrder.99233993.js
  13. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-order.28993065.js
  14. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-order.af2f8fc3.js
  15. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-orderDetail.e16afe61.js
  16. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-orderDetail.f8c11267.js
  17. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-product-product.23599a4c.js
  18. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-product-product.513a1f62.js

+ 2
- 2
addons/unishop/uniapp/uni-shop/pages.json View File

@@ -149,7 +149,7 @@
}, {
"path": "pages/order/createOrder",
"style": {
"navigationBarTitleText": "创建订单"
"navigationBarTitleText": "Mua ngay"
}
}, {
"path": "pages/address/address",
@@ -235,7 +235,7 @@
"path" : "pages/product/evaluate",
"style" : {
"enablePullDownRefresh": true,
"navigationBarTitleText": "评价"
"navigationBarTitleText": "Bình luận"
}
},
{


+ 8
- 8
addons/unishop/uniapp/uni-shop/pages/address/addressManage.vue View File

@@ -1,22 +1,22 @@
<template>
<view class="content">
<view class="row b-b">
<text class="tit">联系人</text>
<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名" placeholder-class="placeholder" />
<text class="tit">Thông tin liên hệ</text>
<input class="input" type="text" v-model="addressData.name" placeholder="Tên người nhận" placeholder-class="placeholder" />
</view>
<view class="row b-b">
<text class="tit">手机号</text>
<input class="input" type="number" v-model="addressData.mobile" placeholder="收货人手机号码" placeholder-class="placeholder" />
<text class="tit">Số điện thoại</text>
<input class="input" type="number" v-model="addressData.mobile" placeholder="Số điện thoại người nhận" placeholder-class="placeholder" />
</view>
<view class="row b-b" v-on:click="showCityPicker()">
<text class="tit">地区</text>
<text class="tit">Khu vực</text>
<view class="input">
{{cityLebel}}
</view>
</view>
<view class="row b-b">
<text class="tit">详细</text>
<input class="input" type="text" v-model="addressData.address" placeholder="详细地址,楼号" placeholder-class="placeholder" />
<text class="tit">Địa chỉ</text>
<input class="input" type="text" v-model="addressData.address" placeholder="Vui lòng nhập cụ thể số nhà, tên đường" placeholder-class="placeholder" />
</view>

<view class="row default-row">
@@ -48,7 +48,7 @@
is_default: false
},
pickerValueDefault: [0, 0, 0] ,//城市选择器默认值 省市区id
cityLebel:'请选择地区',
cityLebel:'Vui lòng chọn khu vực',
}
},
onLoad(option) {


+ 27
- 28
addons/unishop/uniapp/uni-shop/pages/order/createOrder.vue View File

@@ -1,24 +1,24 @@
<template>
<view>
<view class="row b-b">
<text class="tit">联系人</text>
<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名"
<text class="tit">Thông tin liên hệ</text>
<input class="input" type="text" v-model="addressData.name" placeholder="Tên người nhận"
placeholder-class="placeholder" />
</view>
<view class="row b-b">
<text class="tit">手机号</text>
<input class="input" type="number" v-model="addressData.mobile" placeholder="收货人手机号码"
<text class="tit">Số điện thoại</text>
<input class="input" type="number" v-model="addressData.mobile" placeholder="Số điện thoại người nhận"
placeholder-class="placeholder" />
</view>
<view class="row b-b" v-on:click="showCityPicker()">
<text class="tit">地区</text>
<text class="tit">Khu vực</text>
<view class="input">
{{cityLebel}}
</view>
</view>
<view class="row b-b">
<text class="tit">地址</text>
<input class="input" type="text" v-model="addressData.address" placeholder="详细地址,楼号"
<text class="tit" style="width: 140upx">Địa chỉ</text>
<input class="input" type="text" v-model="addressData.address" placeholder="Vui lòng nhập cụ thể số nhà, tên đường"
placeholder-class="placeholder" />
</view>

@@ -46,7 +46,7 @@
<view class="right">
<text class="title clamp" style="margin-bottom: 25px">{{item.title}}</text>
<view class="price-box">
<view class="price">{{item.sales_price|million}}
<view class="price">{{item.sales_price|million}}
</view>
<!-- <text class="number">x 1</text> -->
<uni-number-box v-if="progress.number" class="step" :min="1"
@@ -63,12 +63,12 @@
</view>
<view class="c-list">
<view class="c-row b-b" @click="toggleSpec">
<text class="tit">购买类型</text>
<text class="tit">Kích thước</text>
<view class="con">
<text class="selected-text">
{{specSelectedName}}
</text>
<text style="margin-left: 50rpx;">库存:{{specProduct.stock}}</text>
<text style="margin-left: 50rpx;">Tồn kho:{{specProduct.stock}}</text>
</view>
<text class="yticon icon-you"></text>
</view>
@@ -99,28 +99,28 @@
<!-- 金额明细 -->
<view class="yt-list">
<view class="yt-list-cell b-b">
<view class="cell-tit clamp">总共合计</view>
<view class="cell-tip">{{price|million}}</view>
<view class="cell-tit clamp">Tổng</view>
<view class="cell-tip">{{price|million}}</view>
</view>
<view class="yt-list-cell b-b" v-if="couponList && couponList.length">
<view class="cell-tit clamp">优惠金额</view>
<view class="cell-tip red">-¥{{coupon_price}}</view>
</view>
<view class="yt-list-cell b-b">
<view class="cell-tit clamp">配送方式
<view class="cell-tit clamp">Phương thức vận chuyển
<!-- <text style="color:red" @click="deliveryTemplate">(查看详情)</text> -->
</view>
<view class="cell-tip">
包邮
Miễn phí
</view>
</view>
<view class="yt-list-cell b-b">
<view class="cell-tit clamp">运费</view>
<view class="cell-tit clamp">Phí giao hàng</view>
<view class="cell-tip">¥{{deliveryPrice}}</view>
</view>
<view class="yt-list-cell desc-cell">
<view class="cell-tit clamp">备注</view>
<input class="desc" type="text" v-model="remark" placeholder="请填写备注信息"
<view class="cell-tit clamp">Lưu ý</view>
<input class="desc" type="text" v-model="remark" placeholder="Vui lòng để lại thông tin ghi chú nếu có"
placeholder-class="placeholder" />
</view>
</view>
@@ -128,11 +128,10 @@
<!-- 底部 -->
<view class="footer">
<view class="price-content">
<text>实付款</text>
<text class="price-tip">¥</text>
<text class="price">{{total|million}}</text>
<text>Số tiền cần thanh toán</text>
<text class="price">{{total|million}}₫</text>
</view>
<text class="submit" @click="submit">提交订单</text>
<text class="submit" @click="submit">Đặt hàng</text>
</view>

<!-- 优惠券面板 -->
@@ -167,8 +166,8 @@
<view class="a-t">
<image v-if="specProduct.image" mode="aspectFill" :src="specProduct.image"></image>
<view class="right">
<text class="price">¥{{specProduct.sales_price}}</text>
<text class="stock">库存:{{specProduct.stock}}件</text>
<text class="price">{{specProduct.sales_price}}</text>
<text class="stock">Tồn kho:{{specProduct.stock}}件</text>
<view class="selected">
已选:
<text class="selected-text">
@@ -246,7 +245,7 @@
},
pickerValueArray:json,
pickerValueDefault: [0, 0, 0] ,//城市选择器默认值 省市区id
cityLebel:'请选择地区',
cityLebel:'Vui lòng chọn khu vực',
id: "", //商品ID
maskState: 0, //优惠券面板显示状态
remark: '', //备注
@@ -318,7 +317,7 @@
filters: {
million: function (value) {
if (!value) return 0;
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); // 将整数部分逢三一断
return parseInt(value.replace(/\,/g, "")).toFixed(0).toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); // 将整数部分逢三一断
}
},
methods: {
@@ -498,7 +497,7 @@
uni.showModal({
showCancel: false,
title: '提示',
content: ' 尊敬的客户,您好。\n您的订单已经创建成功,稍后客服将会与你联系。',
content: ' Quý khách hàng thân mến。\nBạn đã đặt hàng thành công. Bộ phận hỗ trợ của chúng tôi sẽ liên hệ bạn trong thời gian sớm nhất. ',
success: (res) => {
uni.redirectTo({
url: `/pages/product/product?id=${this.id}&flash=0`
@@ -786,7 +785,7 @@
}

.tit {
width: 140upx;
width: 160upx;
}

.con {
@@ -836,7 +835,7 @@

.tit {
flex-shrink: 0;
width: 120upx;
width: 250upx;
font-size: 30upx;
color: $font-color-dark;
}


+ 1
- 1
addons/unishop/uniapp/uni-shop/pages/order/order.vue View File

@@ -36,7 +36,7 @@
<view class="price-box">
<text class="num">{{quantity(item.products)}}</text>
件商品 合计
件商品 Tổng
<text class="price">{{item.total_price}}</text>

<text v-if="item.discount_price > 0">(已优惠¥{{item.discount_price}})</text>


+ 2
- 2
addons/unishop/uniapp/uni-shop/pages/order/orderDetail.vue View File

@@ -37,9 +37,9 @@

<view class="price">
<view>商品总价 <text>¥ {{order.order_price}}</text></view>
<view>运费 <text>¥ {{order.delivery_price}}</text></view>
<view>Phí giao hàng <text>¥ {{order.delivery_price}}</text></view>
<view>优惠 <text>¥ {{order.discount_price}}</text></view>
<view class="total">实付款(含运费) <text>¥ {{order.total_price}}</text></view>
<view class="total">Số tiền cần thanh toán(含运费) <text>¥ {{order.total_price}}</text></view>
</view>
</view>
<view class="order" v-if="order.createtime">


+ 34
- 67
addons/unishop/uniapp/uni-shop/pages/product/product.vue View File

@@ -50,13 +50,13 @@
<view class="introduce-section" v-if="product.product_id">
<view style="display: flex;justify-content: space-between;align-items: center;">
<view class="price-box" v-if="flash == false">
<text class="price-tip">¥</text>
<text class="price">{{specProduct.sales_price|million}}</text>
<text class="m-price" v-if="specProduct.market_price">¥{{specProduct.market_price|million}}</text>
<text class="price-tip">₫</text>
<text class="m-price" v-if="specProduct.market_price">{{specProduct.market_price|million}}₫</text>
<text class="coupon-tip" v-if="specProduct.market_price > 0 && specProduct.market_price > specProduct.sales_price">{{(specProduct.sales_price/specProduct.market_price*10).toFixed(1)}}折</text>
</view>
<view class="bot-row">
<text>已售: {{product.sales|round|million}}+</text>
<text>Đã bán: {{product.sales|round}}+</text>
</view>
</view>
<view style="display: flex;justify-content: space-between;align-items: center;">
@@ -80,24 +80,21 @@

<view class="c-list">
<view class="c-row b-b" @click="toggleSpec" v-if="product.use_spec">
<text class="tit">购买类型</text>
<text class="tit">Kích thước</text>
<view class="con">
<text class="selected-text">
{{specSelectedName}}
</text>
<text style="margin-left: 50rpx;">库存:{{specProduct.stock}}</text>
<text style="margin-left: 50rpx;">Tồn kho:{{specProduct.stock}}</text>
</view>
<text class="yticon icon-you"></text>
</view>
<view class="c-row b-b" @click="toggleCoupon" v-if="product.coupon.length">
<text class="tit">优惠券</text>
<text class="con t-r red">查看可用优惠券</text>
<text class="yticon icon-you"></text>
</view>
<view class="c-row b-b" v-if="product.server">
<text class="tit">服务</text>
<text class="tit">Hỗ trợ mua hàng</text>
<view class="bz-list con">
免邮费 假一赔三 7天无理由退换货
<text class="duihao">√</text>Freeship
<text class="duihao">√</text>Chất lượng kém đền gấp 3
<text class="duihao">√</text>Đổi trả trong vòng 7 ngày
</view>
</view>
</view>
@@ -105,9 +102,9 @@
<!-- 评价 -->
<view class="eva-section" v-if="product.evaluate_data && product.evaluate_data.count > 0">
<view class="e-header" @click="$api.navTo('/pages/product/evaluate?product_id='+product.product_id)">
<text class="tit">评价</text>
<text class="tit">Bình luận</text>
<text>({{product.evaluate_data.count}})</text>
<text class="tip">好评率 {{product.evaluate_data.avg}}%</text>
<text class="tip">Đánh giá Shop {{product.evaluate_data.avg}}%</text>
<text class="yticon icon-you"></text>
</view>
<view class="eva-box" v-for="(item, index) in product.evaluate_list" :key="index">
@@ -151,22 +148,9 @@

<!-- 底部操作菜单 -->
<view class="page-bottom">
<!-- <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
<text class="yticon icon-fangzi"></text>
<text>首页</text>
</navigator>
<navigator url="/pages/cart/cart" open-type="switchTab" class="p-b-btn">
<text class="yticon icon-gouwuche"></text>
<text>购物车</text>
<text class="cart-count" v-if="product.cart_num">{{product.cart_num}}</text>
</navigator> -->
<!-- <view class="p-b-btn" :class="{active: favorite}" @click="toFavorite" v-if="!flash">
<text class="yticon icon-shoucang"></text>
<text>收藏</text>
</view> -->
<view class="p-b-btn" @click="showServe" v-if="!flash">
<text class="yticon icon-shouhou"></text>
<text>客服</text>
<text>Chat ngay</text>
</view>
<view class="p-b-btn" v-else>
<!-- 站位 -->
@@ -174,37 +158,11 @@
</view>

<view class="action-btn-group">
<button :class="{'only': flash}" type="primary" class=" action-btn no-border buy-now-btn" @click="buy">立即购买</button>
<button :class="{'only': flash}" type="primary" class=" action-btn no-border buy-now-btn" @click="buy">Mua ngay</button>
<!-- <button v-if="!flash" type="primary" class=" action-btn no-border add-cart-btn" @click="addCart">加入购物车</button> -->
</view>
</view>

<!-- 领取优惠券-模态层弹窗 -->
<view class="popup spec" :class="couponClass" @touchmove.stop.prevent="stopPrevent" @click="toggleCoupon">
<!-- 遮罩层 -->
<view class="mask"></view>
<view class="layer attr-content content-coupon" @click.stop="stopPrevent">

<!-- 优惠券页面,仿mt -->
<view class="coupon-item" v-for="(item, index) in product.coupon" :key="index">
<view class="con">
<view class="left">
<text class="title">{{item.title}}</text>
<text class="time">有效期至{{item.endtime_text}}</text>
</view>
<view class="right">
<text class="price">{{item.value}}</text>
<text>满{{item.least}}可用</text>
</view>
<view class="circle l"></view>
<view class="circle r"></view>
</view>
<text class="tips">限一张使用</text>
</view>
</view>
<button class="btn retract" @click="toggleCoupon">收起</button>
</view>

<!-- 规格-模态层弹窗 -->
<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
<!-- 遮罩层 -->
@@ -213,8 +171,8 @@
<view class="a-t">
<image v-if="specProduct.image" mode="aspectFill" :src="specProduct.image"></image>
<view class="right">
<text class="price">¥{{specProduct.sales_price}}</text>
<text class="stock">库存:{{specProduct.stock}}件</text>
<text class="price">{{specProduct.sales_price|million}}</text>
<text class="stock">Tồn kho:{{specProduct.stock}}件</text>
<view class="selected">
已选:
<text class="selected-text">
@@ -236,8 +194,6 @@
</view>
</view>

<!-- 分享 -->
<!-- <share ref="share" :contentHeight="580" :shareList="shareList"></share> -->
</view>
</template>

@@ -260,7 +216,7 @@
filters: {
million: function (value) {
if (!value) return 0;
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); // 将整数部分逢三一断
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); // 将整数部分逢三一断
},
round: function (value) {
if (!value) return 0;
@@ -305,8 +261,8 @@
data() {
return {
modelData:[
{label:"商品详情",},
{label:"咨询与售后"}
{label:"Chi tiết sản phẩm",},
{label:"Hỏi đáp"}
],
tabindex:0,
couponClass: 'none',
@@ -476,8 +432,8 @@
showServe(){
uni.showModal({
showCancel: false,
title: '客服',
content: ' 请拨打客服电话:\n021-12345678'
title: 'Chat ngay',
content: 'Gọi ngay cho chúng tôi:\n0342261765'
})
},
async buy() {
@@ -537,6 +493,19 @@
</script>

<style lang='scss'>
.duihao{
color:red;
padding-top: 2upx;
margin: 0 5px;
font-size: 20upx;
border: 1px solid red;
border-radius: 50%;
width: 35upx;
height: 35upx;
text-align: center;
vertical-align: middle;
display: inline-block;
}
.icons{
color:white;
border-radius: 50%;
@@ -742,13 +711,11 @@
}

.bz-list {
height: 40upx;
font-size: $font-sm+2upx;
color: $font-color-dark;

text {
display: inline-block;
margin-right: 30upx;
}
}

@@ -1064,7 +1031,7 @@
justify-content: center;
font-size: $font-sm;
color: $font-color-base;
width: 96upx;
width: 120upx;
height: 80upx;
position: relative;



+ 1
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html View File

@@ -1,3 +1,3 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>宜家自购商城</title><script>document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})</script><link rel=stylesheet href=/h5/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/h5/static/js/chunk-vendors.99ddd405.js></script><script src=/h5/static/js/index.78b0cc8e.js></script></body></html>
})</script><link rel=stylesheet href=/h5/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/h5/static/js/chunk-vendors.99ddd405.js></script><script src=/h5/static/js/index.5989c4c2.js></script></body></html>

addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.5989c4c2.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-addressManage.4633aeba.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-addressManage.9ae1df57.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-createOrder.7b7d7516.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-createOrder.99233993.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-order.28993065.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-order.af2f8fc3.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-orderDetail.e16afe61.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-orderDetail.f8c11267.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-product-product.23599a4c.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-product-product.513a1f62.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save