Browse Source

调整

undefined
xubinxcode 4 years ago
parent
commit
7278fe70b4
16 changed files with 41 additions and 42 deletions
  1. +2
    -2
      addons/unishop/uniapp/uni-shop/pages.json
  2. +2
    -2
      addons/unishop/uniapp/uni-shop/pages/cart/cart.vue
  3. +1
    -1
      addons/unishop/uniapp/uni-shop/pages/index/index.vue
  4. +24
    -25
      addons/unishop/uniapp/uni-shop/pages/money/pay.vue
  5. +6
    -6
      addons/unishop/uniapp/uni-shop/pages/product/product.vue
  6. +1
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html
  7. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.8b9577a4.js
  8. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.cd755b03.js
  9. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-cart-cart.172beb71.js
  10. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-cart-cart.de452e15.js
  11. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.c2f8659c.js
  12. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.f91a979f.js
  13. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-money-pay.884c38b5.js
  14. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-money-pay.af719821.js
  15. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-product-product.e0454542.js
  16. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-product-product.f961f385.js

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

@@ -265,7 +265,7 @@
"text": "Home"
},
{
"pagePath": "pages/category/category",
"pagePath": "pages/product/list",
"iconPath": "static/tab-cate.png",
"selectedIconPath": "static/tab-cate-current.png",
"text": "Catagory"
@@ -274,7 +274,7 @@
"pagePath": "pages/cart/cart",
"iconPath": "static/tab-cart.png",
"selectedIconPath": "static/tab-cart-current.png",
"text": "购物车"
"text": "ShopCart"
},
{
"pagePath": "pages/user/user",


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

@@ -42,13 +42,13 @@
<image style="position: absolute;" :src="allChoose?'/static/selected.png':'/static/select.png'" mode="aspectFit"
@click="check('all')"></image>
<view class="clear-btn" :class="{show: allChoose}" @click="clearCart">
清空
Clear
</view>
</view>
<view class="total-box">
<text class="price">¥{{total}}</text>
</view>
<button type="primary" class="no-border confirm-btn" @click="createOrder">To Settle</button>
<button type="primary" class="no-border confirm-btn" @click="createOrder">Buy Now</button>
</view>
</view>
</view>


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

@@ -460,7 +460,7 @@

.carousel {
width: 100%;
height: 350upx;
height: 400upx;

.carousel-item {
width: 100%;


+ 24
- 25
addons/unishop/uniapp/uni-shop/pages/money/pay.vue View File

@@ -65,6 +65,7 @@
this.total = options.total;
this.orderId = options.order_id;
this.out_trade_no = options.out_trade_no;
console.log(window.location.href)
this.getPayType();
},
methods: {
@@ -85,31 +86,31 @@
case 2: // 支付宝支付

break;
// case 3: // 货到付款
// break;
// case 3: // 货到付款
// break;
}
},
//确认支付
async confirm() {

if (this.payType == 1) {
// #ifdef H5 || APP-PLUS || MP-WEIXIN
this.weixinPay();
// #endif
} else if (this.payType == 2) {
// 支付宝支付
this.alipay();
}
// if (this.payType == 1) {
// // #ifdef H5 || APP-PLUS || MP-WEIXIN
// this.weixinPay();
// // #endif
// } else if (this.payType == 2) {
// // 支付宝支付
// this.alipay();
// }
// else if (this.payType == 3) {
// // 货到付款
// this.offlinePay();
this.offlinePay();
// }
},
async alipay() {
// #ifdef H5
window.open(this.$unishow + '/pay/alipay?order_id='+this.orderId);
window.open(this.$unishow + '/pay/alipay?order_id=' + this.orderId);
setTimeout(function() {
uni.showModal({
title: 'Tip',
@@ -133,29 +134,29 @@
// #endif

// #ifdef APP-PLUS
let orderInfo = await this.$api.request('/pay/alipay', 'POST',{
order_id : this.orderId
let orderInfo = await this.$api.request('/pay/alipay', 'POST', {
order_id: this.orderId
});
if (orderInfo) {
//console.log(orderInfo);
uni.requestPayment({
provider: 'alipay',
orderInfo: orderInfo,
success: function (res) {
success: function(res) {
console.log('success:' + JSON.stringify(res));
uni.redirectTo({
url: '/pages/money/paySuccess'
})
},
fail: function (err) {
fail: function(err) {
console.log('fail:' + JSON.stringify(err));
that.$api.msg('支付失败');
}
});
}
// #endif
},
async weixinPay() {
let data = await this.$api.request('/pay/unify', 'GET', {
@@ -184,8 +185,8 @@
uni.showModal({
title: 'Tip',
content: 'Whether paid?',
cancelText:'NO',
confirmText:'Yes',
cancelText: 'NO',
confirmText: 'Yes',
success: function(res) {
if (res.confirm) {
uni.redirectTo({
@@ -263,9 +264,7 @@
},

async offlinePay() {
let data = await this.$api.request('/pay/offline', 'GET', {
order_id: this.orderId
});
let data = await this.$api.request('/order/addQRCode?url=' + encodeURIComponent(window.location.href), 'GET', );
if (data) {
uni.redirectTo({
url: '/pages/money/paySuccess'


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

@@ -124,12 +124,12 @@
</navigator>
<navigator url="/pages/cart/cart" open-type="switchTab" class="p-b-btn">
<text class="yticon icon-gouwuche"></text>
<text>购物车</text>
<text>ShopCart</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>
<text>collection</text>
</view>
<view class="p-b-btn" v-else>
<!-- 站位 -->
@@ -139,11 +139,11 @@
<view class="action-btn-group" v-if="countdown && progress.number != progress.sold">
<button v-if="product.flash.text=='距开始:'" :class="{'only': flash}" type="primary" disabled class=" action-btn-gray action-btn no-border buy-now-btn">Buy&nbspNow</button>
<button v-else :class="{'only': flash}" type="primary" class=" action-btn no-border buy-now-btn" @click="buy">Buy&nbspNow</button>
<button v-if="!flash" type="primary" class=" action-btn no-border add-cart-btn" @click="addCart">加入购物车</button>
<button v-if="!flash" type="primary" class=" action-btn no-border add-cart-btn" @click="addCart">Add Cart</button>
</view>
<view class="action-btn-group" v-else>
<button v-if="!flash" type="primary" class=" action-btn no-border add-cart-btn" @click="addCart">加入购物车</button>
<button :class="{'only': flash}" type="primary" class=" action-btn no-border buy-now-btn" @click="buy">立即购买</button>
<button v-if="!flash" type="primary" class=" action-btn no-border add-cart-btn" @click="addCart">Add Cart</button>
<button :class="{'only': flash}" type="primary" class=" action-btn no-border buy-now-btn" @click="buy">Buy Now</button>
</view>
<!-- <view class="p-b-btn" v-else> -->
<!-- 站位
@@ -995,7 +995,7 @@
justify-content: center;
font-size: $font-sm;
color: $font-color-base;
width: 96upx;
width: 100upx;
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.445a3e90.js></script><script src=/h5/static/js/index.cd755b03.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.445a3e90.js></script><script src=/h5/static/js/index.8b9577a4.js></script></body></html>

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


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.cd755b03.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-cart-cart.172beb71.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-cart-cart.de452e15.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-index-index.c2f8659c.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-index-index.f91a979f.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-money-pay.884c38b5.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-money-pay.af719821.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.e0454542.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.f961f385.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save