Browse Source

Merge branch 'dev' into new

# Conflicts:
#	common/api.js
#	pages/center/index.vue
#	pages/goodsDetail/index.vue
#	pages/route/index.vue
threedate
Enzo 4 years ago
parent
commit
343ca3c53e
  1. 6
      common/api.js
  2. 6
      common/http.js
  3. 2
      common/shared.js
  4. 9
      pages.json
  5. 11
      pages/collect/index.vue
  6. 14
      pages/goodsDetail/index.vue
  7. 2
      pages/order/apply-details.vue
  8. 23
      pages/order/apply-refund.vue
  9. 2
      pages/order/confirm-atonce.vue
  10. 10
      pages/order/confirm-order.vue
  11. 4
      pages/order/index.vue
  12. 2
      pages/order/order-details.vue
  13. 2
      pages/order/unpay-details.vue
  14. 1
      pages/shopOrder/index.vue
  15. 6
      uview-ui/components/u-tabs/u-tabs.vue

6
common/api.js

@ -1,9 +1,9 @@
// appId: 正式 null | 测试 wxb35ef055a4dd8ad4
export const DEV = "dev"; // dev 测试 | prod 正式
export const DEV = "prod"; // dev 测试 | prod 正式
export const VERSION = '1.0.0'; // 版本号
export const DEVURL = 'https://gxsky.lanzulive.com'; // 测试服请求地址
// export const DEVURL = 'http://192.168.3.23'; // 测试服请求地址, 韦港电脑
export const PRODURL = ''; // 正式服请求地址
// export const DEVURL = 'http://192.168.3.8'; // 测试服请求地址, 韦港电脑
export const PRODURL = 'https://mall.gxsky.com'; // 正式服请求地址
/* 首页相关接口 */
export const API_CATEGORY_LIST = '/api/category/list'; // 首页-分类

6
common/http.js

@ -19,7 +19,11 @@ function getsign(params) {
}
s_data = arr.join('&');
let sign = sha1(SparkMD5.hash(s_data) + 'lanzu@123');
//测试
// let sign = sha1(SparkMD5.hash(s_data) + 'lanzu@123');
//正式
let sign = sha1(SparkMD5.hash(s_data) + 'base64:8oVqQuUYKI+Fg2iPP1VZwqTbMvpphc/oqhU5+Hzul+4=');
params.sign = sign;
return params;
}

2
common/shared.js

@ -11,6 +11,8 @@ export function isRight(obj) {
}
} else if (isValueType(obj) === 'number' && (isValueType(obj) === "number" && !isNaN(obj)) && obj !== 0) {
return true;
} else if (isValueType(obj) === 'boolean') {
return obj
}
for (var key in obj) {
return true;

9
pages.json

@ -7,7 +7,8 @@
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
@ -20,14 +21,16 @@
"path": "pages/order/index",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
"path": "pages/shopOrder/index",
"style": {
"navigationBarTitleText": "商户订单",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{

11
pages/collect/index.vue

@ -15,12 +15,12 @@
<view @click="switchCollect(index)" class="lf-font-40">
<view v-if="item.is_collect" class="flex flex-direction justify-around align-center text-center" style="width: 100%;">
<u-icon name="heart-fill" color="#ff0f00"></u-icon>
<text class="lf-font-24">取消收藏</text>
<text class="collect-btn">取消收藏</text>
</view>
<view v-else class="flex flex-direction justify-around align-center text-center" style="width: 100%;">
<u-icon name="heart"></u-icon>
<text class="lf-font-24">添加收藏</text>
<text class="collect-btn">添加收藏</text>
</view>
</view>
@ -133,4 +133,11 @@
}
}
}
.collect-btn{
display: inline-block;
padding: 2rpx 9rpx;
border: 1rpx solid #333333;
border-radius: 20rpx;
font-size: 22rpx;
}
</style>

14
pages/goodsDetail/index.vue

@ -26,7 +26,7 @@
</view>
<view class="lf-font-24 lf-text-right">
<view class="lf-color-gray">{{ goods_detail.specs[0].sold_stock_text }}</view>
<view class="lf-color-primary">{{ goods_detail.specs[0].stock_text }}</view>
<view class="lf-color-primary" v-if="goods_detail.specs[0].stock && goods_detail.specs[0].stock < 100">{{ goods_detail.specs[0].stock_text }}</view>
</view>
</view>
<view class="label-box" v-if="goods_detail.tags && goods_detail.tags.length">
@ -353,13 +353,13 @@
},
//
openMap(){
// return;
let { address, lat, lng } = this.goods_detail?.store || {};
uni.openLocation({
longitude: 108.36637,
latitude: 22.817746,
scale: 18,
name: this.goods_detail.store.address
})
longitude: Number(lat),
latitude: Number(lng),
scale: 20,
name: address
});
},
//
toAddOrder() {

2
pages/order/apply-details.vue

@ -8,7 +8,7 @@
<view class="flex justify-between align-start" style="padding: 32rpx 32rpx 30rpx 32rpx;">
<image :src="orderDetails.order.goods.cover" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 10rpx;"></image>
<view class="flex-sub padding-left-sm">
<view class="bref-box text-black1 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;" v-if="orderDetails.order.goods.name">
<view class="bref-box text-black1 lf-line-2 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;" v-if="orderDetails.order.goods.name">
{{orderDetails.order.goods.name}}
</view>
<text class="block text-gray lf-font-28" style="margin-top: 20rpx;line-height: 40rpx;">数量 <text class="margin-left margin-right-xs text-gray">x</text>{{orderDetails.order.number}}</text>

23
pages/order/apply-refund.vue

@ -8,7 +8,7 @@
<view class="flex justify-between align-start" style="padding: 32rpx 32rpx 30rpx 32rpx;">
<image :src="applyDetails.order.goods.cover" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 10rpx;"></image>
<view class="flex-sub padding-left-sm">
<view class="bref-box text-black1 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;" v-if="applyDetails.order.goods.name">
<view class="bref-box text-black1 lf-line-2 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;" v-if="applyDetails.order.goods.name">
{{applyDetails.order.goods.name}}
</view>
<text class="block text-gray lf-font-28" style="margin-top: 20rpx;line-height: 40rpx;">数量 <text class="margin-left margin-right-xs text-gray">x</text>{{applyDetails.order.number}}</text>
@ -77,8 +77,9 @@
<view class="cu-self menu">
<view class="lf-font-32 text-black1">退款说明</view>
</view>
<view class="cu-self menu" style="margin-top: 30rpx;">
<textarea :cursor-spacing="120" :adjust-position="true" type="text" v-model="applyInfo" class="text-left lf-font-32 area-self" placeholder="请输入反馈信息" />
<view class="cu-self menu" style="margin-top: 30rpx;position: relative;">
<textarea :cursor-spacing="120" maxlength="300" :adjust-position="true" type="text" v-model="applyInfo" class="text-left lf-font-32 area-self" placeholder="请输入反馈信息" />
<view class="font-change">{{ dynamicLength() }}/300</view>
</view>
</view>
<view class="cu-form-group">
@ -143,6 +144,9 @@
},1000)
},
methods: {
dynamicLength(){
return parseInt(this.applyInfo.length);
},
getApplyDetails() {
this.$http(this.API.API_APPLY_DETAILS, {order_id: this.order_id}).then(res => {
if(res.code == 0) {
@ -339,10 +343,17 @@
}
.area-self {
width: 100%;
padding: 30rpx 0 0 30rpx;
color: #999999;
padding: 30rpx;
padding-bottom: 36rpx;
color: #333;
border: 1px solid #D0D0D0;
border-radius: 10rpx;
}
.font-change{
position: absolute;
right: 10rpx;
bottom: 10rpx;
width: max-content;
color: #777777;
}
</style>

2
pages/order/confirm-atonce.vue

@ -8,7 +8,7 @@
<view class="flex justify-between align-start padding-top-sm padding-lr">
<image :src="orderDetails.goods.cover" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 10rpx;"></image>
<view class="flex-sub padding-left-sm">
<view class="bref-box margin-top-xs lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;color: #222;">
<view class="bref-box margin-top-xs lf-line-2 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;color: #222;">
{{orderDetails.goods.name}}
</view>
<view class="flex justify-between align-center text-center">

10
pages/order/confirm-order.vue

@ -8,7 +8,7 @@
<view class="flex justify-between align-start padding-top-sm padding-lr">
<image :src="orderDetails.goods.cover" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 10rpx;"></image>
<view class="flex-sub padding-left-sm">
<view class="bref-box lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;color: #222;">
<view class="bref-box lf-font-32 lf-line-2 lf-font-bold" style="height: 88rpx;line-height: 44rpx;color: #222;">
{{orderDetails.goods.name}}
</view>
<view class="flex justify-between align-center text-center">
@ -137,9 +137,13 @@
methods: {
changeNum(num) {
if(num > this.limit) {
if(this.limit == 0 || this.limit == '') {
this.num = num
}else {
this.$msg('该商品限购'+this.limit+'件')
this.num = this.limit
return
}
}else if(num < 1) {
this.num = 1
}
@ -153,12 +157,14 @@
})
},
reduce() {
if (this.num === 1) return
if (this.num === 1 || this.num === 0) return
this.num--
},
add() {
if(this.num < this.limit) {
this.num++
}else if(this.limit == 0 || this.limit == ''){
this.num++
}else {
this.$msg('该商品限购'+this.limit+'件')
this.num = this.limit

4
pages/order/index.vue

@ -204,6 +204,7 @@
tab_item.page = 1;
tab_item.isPage = true;
tab_item.loadingClass = true;
tab_item.list = []
tab_item.loadingText = '正在加载中';
this.getUserOrder(options);
}
@ -248,7 +249,7 @@
.title {
font-size: 28rpx;
color: $u-content-color;
height: 98rpx;
height: 80rpx;
}
// tab
@ -261,6 +262,7 @@
//
.com {
width: 100%;
height: 100%;
overflow: hidden;
.list {

2
pages/order/order-details.vue

@ -7,7 +7,7 @@
<view class="flex justify-between align-start" style="padding: 32rpx 32rpx 30rpx 32rpx;">
<image :src="orderDetails.goods.cover" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 10rpx;"></image>
<view class="flex-sub padding-left-sm">
<view class="bref-box text-black1 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;" v-if="orderDetails.goods.name">
<view class="bref-box lf-line-2 text-black1 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;" v-if="orderDetails.goods.name">
{{orderDetails.goods.name}}
</view>
<text class="block text-gray lf-font-28" style="margin-top: 20rpx;line-height: 40rpx;">数量 <text class="margin-left margin-right-xs text-gray">x</text>{{orderDetails.number}}</text>

2
pages/order/unpay-details.vue

@ -8,7 +8,7 @@
<view class="flex justify-between align-start" style="padding: 32rpx 32rpx 30rpx 32rpx;">
<image :src="orderDetails.goods.cover" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 10rpx;"></image>
<view class="flex-sub padding-left-sm">
<view class="bref-box text-black1 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;" v-if="orderDetails.goods.name">
<view class="bref-box text-black1 lf-line-2 lf-font-32 lf-font-bold" style="height: 88rpx;line-height: 44rpx;" v-if="orderDetails.goods.name">
{{orderDetails.goods.name}}
</view>
<text class="block text-gray lf-font-28" style="margin-top: 20rpx;line-height: 40rpx;">数量 <text class="margin-left margin-right-xs text-gray">x</text>{{orderDetails.number}}</text>

1
pages/shopOrder/index.vue

@ -206,6 +206,7 @@
//
.com {
width: 100%;
height: 100%;
overflow: hidden;
.list {

6
uview-ui/components/u-tabs/u-tabs.vue

@ -178,7 +178,11 @@
// applist
list(n, o) {
// list
if(n.length !== o.length) this.currentIndex = 0;
if(n.length !== o.length){
this.currentIndex = 0;
}else{
return;
}
// $nextTicktabtab
this.$nextTick(() => {
this.init();

Loading…
Cancel
Save