Gao xiaosong 4 years ago
parent
commit
107c4c40f0
  1. 2
      assets/css/style.less
  2. 3
      components/CitySelect.vue
  3. 2
      components/OrderGoods.vue
  4. 4
      config/index.js
  5. 3
      manifest.json
  6. 23
      pages/activity/DargainDetails/index.vue
  7. 4
      pages/activity/SeckillDetails/index.vue
  8. 6
      pages/home/index.vue
  9. 2
      pages/user/UserVip/index.vue
  10. 322
      pages/user/promotion/PromoterList/index.vue
  11. 1
      unpackage/debug/.ios.ins
  12. BIN
      unpackage/debug/iOS_debug.ipa
  13. 7
      utils/index.js
  14. 7
      utils/request.js

2
assets/css/style.less

@ -6313,7 +6313,7 @@ page {
margin: 0.25*100rpx auto 0 auto; margin: 0.25*100rpx auto 0 auto;
padding: 0.53*100rpx 0 0.58*100rpx 0; padding: 0.53*100rpx 0 0.58*100rpx 0;
left: 50%; left: 50%;
margin-left: -3.55*100rpx; //margin-left: -3.55*100rpx;
} }
.cash-audit .pictrue { .cash-audit .pictrue {

3
components/CitySelect.vue

@ -195,7 +195,6 @@ export default {
background-color: #fff; background-color: #fff;
z-index: 1502; z-index: 1502;
position: relative; position: relative;
height: 800rpx;
padding-bottom: 0; padding-bottom: 0;
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
@ -203,7 +202,7 @@ export default {
height: 100%; height: 100%;
} }
.swiper { .swiper {
height: 100%; height: 800rpx;
} }
} }
.cityselect-header { .cityselect-header {

2
components/OrderGoods.vue

@ -16,7 +16,7 @@
v-if="cart.productInfo.attrInfo" v-if="cart.productInfo.attrInfo"
>{{ cart.productInfo.attrInfo.sku }}</view> >{{ cart.productInfo.attrInfo.sku }}</view>
<view class="money font-color-red">{{ cart.truePrice }}</view> <view class="money font-color-red">{{ cart.truePrice }}</view>
<view class="evaluate" v-if="evaluate == 3" @click="routerGo(cart)">评价</view> <view class="evaluate" v-if="evaluate == 3 && cart.isReply==0" @click="routerGo(cart)">评价</view>
</view> </view>
</view> </view>
</view> </view>

4
config/index.js

@ -1,7 +1,7 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'; //export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
// export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api'; // export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api';
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static'; export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static';

3
manifest.json

@ -92,7 +92,8 @@
"hdpi" : "unpackage/res/splash/480+762.png", "hdpi" : "unpackage/res/splash/480+762.png",
"xhdpi" : "unpackage/res/splash/720+1242.png", "xhdpi" : "unpackage/res/splash/720+1242.png",
"xxhdpi" : "unpackage/res/splash/1080+1882.png" "xxhdpi" : "unpackage/res/splash/1080+1882.png"
} },
"iosStyle" : "common"
}, },
"icons" : { "icons" : {
"android" : { "android" : {

23
pages/activity/DargainDetails/index.vue

@ -55,8 +55,8 @@
<!-- 砍价进度条下的金额 --> <!-- 砍价进度条下的金额 -->
<view class="balance acea-row row-between-wrapper"> <view class="balance acea-row row-between-wrapper">
<view v-text="'已砍' + bargainHelpCount.alreadyPrice + '元'"></view> <view v-text="'已砍' + bargainHelpCount.alreadyPrice + '元'"></view>
<view v-if="bargainHelpCount.remainingPrice === 0">砍价成功</view> <view v-if="bargainHelpCount.price === 0">砍价成功</view>
<view v-else v-text="'还剩' + bargainHelpCount.remainingPrice + '元'"></view> <view v-else v-text="'还剩' + bargainHelpCount.price + '元'"></view>
</view> </view>
<!-- 砍价成功--> <!-- 砍价成功-->
@ -267,15 +267,18 @@
// //
openAlone: function () { openAlone: function () {
this.$yrouter.push({ this.$yrouter.push({
path: "/detail/" + this.bargain.productId path: "/pages/shop/GoodsCon/index",
query: {
id: this.goodsDetail.productId
}
}); });
}, },
// //
goPay: function () { goPay: function () {
var data = {}; var data = {};
var that = this; var that = this;
data.productId = that.bargain.productId; data.productId = that.goodsDetail.productId;
data.cartNum = that.bargain.num; data.cartNum = that.goodsDetail.num;
data.uniqueId = ""; data.uniqueId = "";
data.bargainId = that.bargainId; data.bargainId = that.bargainId;
data.new = 1; data.new = 1;
@ -379,7 +382,7 @@
getBargainHelp: function () { getBargainHelp: function () {
var that = this; var that = this;
if ( if (
this.bargainHelpCount.remainingPrice === 0 && this.bargainHelpCount.price === 0 &&
that.bargainUid !== that.userInfo.uid that.bargainUid !== that.userInfo.uid
) { ) {
return uni.showToast({ return uni.showToast({
@ -478,7 +481,7 @@
bargainUserUid: this.bargainUid bargainUserUid: this.bargainUid
}) })
.then(res => { .then(res => {
// = - // ** 使 = -
let remainingPrice = (this.goodsDetail.price - res.data.alreadyPrice).toFixed(2) let remainingPrice = (this.goodsDetail.price - res.data.alreadyPrice).toFixed(2)
this.bargainHelpCount = { this.bargainHelpCount = {
...res.data, ...res.data,
@ -514,7 +517,7 @@
if ( if (
this.bargainUid === this.userInfo.uid && this.bargainUid === this.userInfo.uid &&
this.bargainHelpCount.status == 1 && this.bargainHelpCount.status == 1 &&
this.bargainHelpCount.remainingPrice > 0 this.bargainHelpCount.price > 0
) { ) {
this.inviteFriends = true this.inviteFriends = true
} else { } else {
@ -526,7 +529,7 @@
this.bargainUid != this.userInfo.uid && this.bargainUid != this.userInfo.uid &&
this.bargainHelpCount.status == 1 && this.bargainHelpCount.status == 1 &&
// this.bargainHelpCount.userBargainStatus && // this.bargainHelpCount.userBargainStatus &&
this.bargainHelpCount.remainingPrice > 0 this.bargainHelpCount.price > 0
) { ) {
this.helpFriendsBargain = true this.helpFriendsBargain = true
} else { } else {
@ -537,7 +540,7 @@
if ( if (
this.bargainUid === this.userInfo.uid && this.bargainUid === this.userInfo.uid &&
this.bargainHelpCount.status == 1 && this.bargainHelpCount.status == 1 &&
this.bargainHelpCount.remainingPrice <= 0 this.bargainHelpCount.price <= 0
) { ) {
this.pay = true this.pay = true
} else { } else {

4
pages/activity/SeckillDetails/index.vue

@ -10,8 +10,8 @@
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="times"> <view class="times">
<view>距秒杀结束仅剩</view> <view>距秒杀结束仅剩</view>
<count-down :isDay="false" :tipText="false" :dayText="false" :hourText="' : '" :minuteText="' : '" <count-down :isDay="false" :tipText="' '" :dayText="' '" :hourText="' : '" :minuteText="' : '"
:secondText="false" :datatime="datatime"></count-down> :secondText="' '" :datatime="datatime"></count-down>
</view> </view>
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>

6
pages/home/index.vue

@ -214,7 +214,7 @@
}, },
}, },
onShow: function() { onLoad: function() {
this.getLocation() this.getLocation()
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
@ -451,7 +451,7 @@
} }
.nav-title { .nav-title {
margin-left: 20rpx; margin-left: 20rpx;
line-height: 40px; line-height: 40px;
} }
</style> </style>

2
pages/user/UserVip/index.vue

@ -178,7 +178,7 @@ export default {
res => { res => {
that.vipRequire = res.data.list; that.vipRequire = res.data.list;
that.vipComplete = res.data.task; that.vipComplete = res.data.task;
that.taskCount = res.data.reach_count; that.taskCount = res.data.reachCount;
}, },
err => { err => {
uni.showToast({ uni.showToast({

322
pages/user/promotion/PromoterList/index.vue

@ -13,22 +13,14 @@
</view> </view>
</view> </view>
<view class="nav acea-row row-around"> <view class="nav acea-row row-around">
<view <view class="item" :class="screen.grade == 0 ? 'on' : ''" @click="checkGrade(0)">一级({{ first||'0' }})</view>
class="item" <view class="item" :class="screen.grade == 1 ? 'on' : ''" @click="checkGrade(1)">二级({{ second||'0' }})</view>
:class="screen.grade == 0 ? 'on' : ''"
@click="checkGrade(0)"
>一级({{ first||'0' }})</view>
<view
class="item"
:class="screen.grade == 1 ? 'on' : ''"
@click="checkGrade(1)"
>二级({{ second||'0' }})</view>
</view> </view>
<view class="search acea-row row-between-wrapper"> <view class="search acea-row row-between-wrapper">
<form @submit.prevent="submitForm"> <form @submit.prevent="submitForm">
<view class="input"> <view class="input">
<input placeholder="点击搜索会员名称" v-model="screen.keyword" /> <input placeholder="点击搜索会员名称" v-model="screen.keyword" />
<text class="iconfont icon-guanbi"></text> <text class="iconfont icon-guanbi" @click="screen.keyword=''"></text>
</view> </view>
</form> </form>
<view class="iconfont icon-sousuo2"></view> <view class="iconfont icon-sousuo2"></view>
@ -56,11 +48,8 @@
</view> </view>
</view> </view>
<view :class="fixedState === true ? 'sortList' : ''"> <view :class="fixedState === true ? 'sortList' : ''">
<view <view class="item acea-row row-between-wrapper" v-for="(val, spreadListIndex) in spreadList"
class="item acea-row row-between-wrapper" :key="spreadListIndex">
v-for="(val, spreadListIndex) in spreadList"
:key="spreadListIndex"
>
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
<image :src="val.avatar" /> <image :src="val.avatar" />
@ -84,166 +73,167 @@
</view> </view>
</template> </template>
<script> <script>
import { getSpreadUser } from "@/api/user"; import {
import Loading from "@/components/Loading"; getSpreadUser
export default { } from "@/api/user";
name: "PromoterList", import Loading from "@/components/Loading";
components: { export default {
Loading name: "PromoterList",
}, components: {
props: {}, Loading
data: function() { },
return { props: {},
fixedState: false, data: function () {
screen: { return {
page: 1, fixedState: false,
limit: 15, screen: {
grade: 0, page: 1,
keyword: "", limit: 15,
sort: "" grade: 0,
}, keyword: "",
childCount: 2, sort: ""
numberCount: 2, },
orderCount: 2, childCount: 2,
loaded: false, numberCount: 2,
loading: false, orderCount: 2,
spreadList: [], loaded: false,
loadTitle: "", loading: false,
first: "", spreadList: [],
second: "" loadTitle: "",
}; first: "",
}, second: ""
mounted: function() { };
this.getSpreadUsers();
},
onReachBottom() {
!this.loading && this.getSpreadUsers();
},
watch: {
"screen.sort": function() {
this.screen.page = 0;
this.loaded = false;
this.loading = false;
this.spreadList = [];
this.getSpreadUsers();
}
},
methods: {
handleScroll: function() {
// var scrollTop =
// document.documentElement.scrollTop || document.body.scrollTop;
// var offsetTop = document.querySelector(".header").clientHeight;
// if (scrollTop >= offsetTop) {
// this.fixedState = true;
// } else {
// this.fixedState = false;
// }
}, },
submitForm: function() { mounted: function () {
this.screen.page = 0;
this.loaded = false;
this.loading = false;
this.spreadList = [];
this.getSpreadUsers(); this.getSpreadUsers();
}, },
getSpreadUsers: function() { onReachBottom() {
let that = this, !this.loading && this.getSpreadUsers();
screen = that.screen;
if (that.loaded || that.loading) return;
that.loading = true;
getSpreadUser(screen).then(
res => {
that.loading = false;
that.spreadList.push.apply(that.spreadList, res.data.list);
that.loaded = res.data.list.length < that.screen.limit; //
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
that.screen.page = that.screen.page + 1;
that.first = res.data.total;
that.second = res.data.totalLevel;
},
err => {
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
},
300
);
}, },
checkGrade: function(val) { watch: {
if (val == this.screen.grade) return; "screen.sort": function () {
else { this.screen.page = 0;
this.screen.page = 1;
this.screen.grade = val;
this.loading = false;
this.loaded = false; this.loaded = false;
this.loading = false;
this.spreadList = []; this.spreadList = [];
this.getSpreadUsers(); this.getSpreadUsers();
} }
}, },
sort: function(types) { methods: {
let that = this; handleScroll: function () {
switch (types) { // var scrollTop =
case "childCount": // document.documentElement.scrollTop || document.body.scrollTop;
if (that.childCount == 2) { // var offsetTop = document.querySelector(".header").clientHeight;
that.childCount = 1; // if (scrollTop >= offsetTop) {
that.orderCount = 2; // this.fixedState = true;
that.numberCount = 2; // } else {
that.screen.sort = "childCount DESC"; // this.fixedState = false;
} else if (that.childCount == 1) { // }
that.childCount = 3; },
that.orderCount = 2; submitForm: function () {
that.numberCount = 2; this.screen.page = 0;
that.screen.sort = "childCount ASC"; this.loaded = false;
} else if (that.childCount == 3) { this.loading = false;
that.childCount = 2; this.spreadList = [];
that.orderCount = 2; this.getSpreadUsers();
that.numberCount = 2; },
that.screen.sort = ""; getSpreadUsers: function () {
} let that = this,
break; screen = that.screen;
case "numberCount": if (that.loaded || that.loading) return;
if (that.numberCount == 2) { that.loading = true;
that.numberCount = 1; getSpreadUser(screen).then(
that.orderCount = 2; res => {
that.childCount = 2; that.loading = false;
that.screen.sort = "numberCount DESC"; that.spreadList.push.apply(that.spreadList, res.data.list);
} else if (that.numberCount == 1) { that.loaded = res.data.list.length < that.screen.limit; //
that.numberCount = 3; that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
that.orderCount = 2; that.screen.page = that.screen.page + 1;
that.childCount = 2; that.first = res.data.total;
that.screen.sort = "numberCount ASC"; that.second = res.data.totalLevel;
} else if (that.numberCount == 3) { },
that.numberCount = 2; err => {
that.orderCount = 2; uni.showToast({
that.childCount = 2; title: err.msg || err.response.data.msg || err.response.data.message,
that.screen.sort = ""; icon: "none",
} duration: 2000
break; });
case "orderCount": },
if (that.orderCount == 2) { 300
that.orderCount = 1; );
that.numberCount = 2; },
that.childCount = 2; checkGrade: function (val) {
that.screen.sort = "orderCount DESC"; if (val == this.screen.grade) return;
} else if (that.orderCount == 1) { else {
that.orderCount = 3; this.screen.page = 1;
that.numberCount = 2; this.screen.grade = val;
that.childCount = 2; this.loading = false;
that.screen.sort = "orderCount ASC"; this.loaded = false;
} else if (that.orderCount == 3) { this.spreadList = [];
that.orderCount = 2; this.getSpreadUsers();
that.numberCount = 2; }
that.childCount = 2; },
sort: function (types) {
let that = this;
switch (types) {
case "childCount":
if (that.childCount == 2) {
that.childCount = 1;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "childCount DESC";
} else if (that.childCount == 1) {
that.childCount = 3;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "childCount ASC";
} else if (that.childCount == 3) {
that.childCount = 2;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "";
}
break;
case "numberCount":
if (that.numberCount == 2) {
that.numberCount = 1;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "numberCount DESC";
} else if (that.numberCount == 1) {
that.numberCount = 3;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "numberCount ASC";
} else if (that.numberCount == 3) {
that.numberCount = 2;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "";
}
break;
case "orderCount":
if (that.orderCount == 2) {
that.orderCount = 1;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "orderCount DESC";
} else if (that.orderCount == 1) {
that.orderCount = 3;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "orderCount ASC";
} else if (that.orderCount == 3) {
that.orderCount = 2;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "";
}
break;
default:
that.screen.sort = ""; that.screen.sort = "";
} }
break;
default:
that.screen.sort = "";
} }
} }
} };
};
</script> </script>

1
unpackage/debug/.ios.ins

@ -0,0 +1 @@
installed

BIN
unpackage/debug/iOS_debug.ipa

Binary file not shown.

7
utils/index.js

@ -240,6 +240,11 @@ export const login = () => {
reject('当前运行环境为H5') reject('当前运行环境为H5')
return return
} }
if (Vue.prototype.$deviceType == 'app') {
console.log('当前运行环境为app')
reject('当前运行环境为app')
return
}
console.log('————————————————————') console.log('————————————————————')
console.log('开始登录') console.log('开始登录')
console.log('————————————————————') console.log('————————————————————')
@ -983,7 +988,7 @@ export function chooseImage(callback) {
console.log(image); console.log(image);
uni.showLoading({ title: "图片上传中", mask: true }); uni.showLoading({ title: "图片上传中", mask: true });
uni.uploadFile({ uni.uploadFile({
url: `${VUE_APP_API_URL} /api/upload`, url: `${VUE_APP_API_URL}/api/upload`,
file: image, file: image,
filePath: image.path, filePath: image.path,
header: { header: {

7
utils/request.js

@ -41,6 +41,13 @@ fly.interceptors.response.use(
console.log('————————') console.log('————————')
handleLoginFailure(); handleLoginFailure();
return Promise.reject({ msg: "未登录", toLogin: true }); return Promise.reject({ msg: "未登录", toLogin: true });
}
if (error.response.data.status == 5109) {
uni.showToast({
title: error.response.data.msg,
icon: "none",
duration: 2000
});
} }
return Promise.reject(error); return Promise.reject(error);
} }

Loading…
Cancel
Save