Loki 2 years ago
parent
commit
c8f23d5381
  1. 29
      components/PromotionGood.vue
  2. 2
      components/UserEvaluation.vue
  3. 6
      config/index.js
  4. 3
      libs/wechat.js
  5. 22
      manifest.json
  6. 6
      pages.json
  7. 2
      pages/home/components/Banner.vue
  8. 36
      pages/order/OrderSubmission/index.vue
  9. 4
      pages/shop/GoodsCon/index.vue
  10. 2
      pages/user/User/index.vue
  11. 23
      store/index.js
  12. 5
      utils/index.js
  13. 6
      utils/request.js

29
components/PromotionGood.vue

@ -3,7 +3,7 @@
<view class="sh-title-card mb10"> <view class="sh-title-card mb10">
<view class="title-box"> <view class="title-box">
<image class="title-bg" :src="`${$VUE_APP_RESOURCES_URL}/images/title1.png`" mode="aspectFill" /> <image class="title-bg" :src="`${$VUE_APP_RESOURCES_URL}/images/title1.png`" mode="aspectFill" />
<view class="title-text">为你推荐</view> <view class="title-text">精选食品</view>
<!-- <view class="title-text" :style="{ color: detail.color }">为你推荐</view> --> <!-- <view class="title-text" :style="{ color: detail.color }">为你推荐</view> -->
</view> </view>
</view> </view>
@ -13,13 +13,13 @@
<view class="goods-box" @tap="routerGo(item)"> <view class="goods-box" @tap="routerGo(item)">
<view class="img-box"> <view class="img-box">
<!-- <image class="tag-img" :src="item.image" mode=""></image> --> <!-- <image class="tag-img" :src="item.image" mode=""></image> -->
<image class="img" :src="item.image" lazy-load mode="aspectFill"></image> <image class="img" :src="item.image" lazy-load mode="aspectFit"></image>
</view> </view>
<view class="tip one-t">{{ item.storeName }}</view> <view class="tip one-t">{{ item.storeName }}</view>
<view class="title more-t">{{ item.storeName }}</view> <view class="title more-t">{{ item.storeName }}</view>
<view class="price-box"> <view class="price-box">
<view class="flex x-bc align-end"> <view class="flex x-bc align-end">
<view class="current">{{ item.price }} </view> <view class="current"> 优品特价:{{ item.price }} <text>/市场价:{{item.otPrice}}</text> </view>
<view class="sales miso-font">仅剩{{ item.stock }}{{ item.unitName }}</view> <view class="sales miso-font">仅剩{{ item.stock }}{{ item.unitName }}</view>
</view> </view>
<view class="x-f tag-box"> <view class="x-f tag-box">
@ -81,14 +81,14 @@ export default {
} }
.goods-box { .goods-box {
width: 345rpx; width: 690rpx;
background: #fff; background: #fff;
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
.img-box { .img-box {
width: 345rpx; width: 690rpx;
height: 345rpx; height: 345rpx;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@ -103,14 +103,14 @@ export default {
} }
.img { .img {
width: 345rpx; width: 690rpx;
height: 345rpx; height: 345rpx;
background-color: #ccc; background-color: #fff;
} }
} }
.tip { .tip {
width: 346rpx; width: 690rpx;
line-height: 56rpx; line-height: 56rpx;
background: rgba(246, 242, 234, 1); background: rgba(246, 242, 234, 1);
font-size: 22rpx; font-size: 22rpx;
@ -131,7 +131,7 @@ export default {
.price-box { .price-box {
padding: 10rpx 20rpx 0; padding: 10rpx 20rpx 0;
width: 344rpx; width: 690rpx;
box-sizing: border-box; box-sizing: border-box;
.sales { .sales {
@ -153,7 +153,14 @@ export default {
&:before { &:before {
content: '¥'; content: '¥';
font-size: 26rpx; font-size: 26rpx;
} }
text{
color: #000000;
text-decoration: line-through;
font-size: 28rpx;
font-style: italic;
}
} }
.original { .original {
@ -199,7 +206,7 @@ export default {
.goods-item { .goods-item {
margin-right: 20rpx; margin-right: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
width: 345rpx; width: 690rpx;
box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22); box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
border-radius: 20rpx; border-radius: 20rpx;

2
components/UserEvaluation.vue

@ -19,7 +19,7 @@
</view> </view>
</view> </view>
<view class="reply" v-if="item.merchantReplyContent"> <view class="reply" v-if="item.merchantReplyContent">
<span class="font-color-red">武设优品电商店员</span> <span class="font-color-red">电商店员</span>
{{item.merchantReplyContent}} {{item.merchantReplyContent}}
</view> </view>
</view> </view>

6
config/index.js

@ -1,4 +1,4 @@
export const VUE_APP_API_URL = 'https://bxg.api.cyjyyjy.com/bxgApp'
// export const VUE_APP_API_URL = 'http://192.168.10.150:7777/xiaohuiapp' // export const VUE_APP_API_URL = 'http://192.168.10.254:48080/bxgApp'
export const VUE_APP_API_URL = 'https://xiaohui.shop.cyjyyjy.com/xiaohuiapp' // export const VUE_APP_API_URL = 'https://xiaohui.shop.cyjyyjy.com/xiaohuiapp'
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static' export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static'

3
libs/wechat.js

@ -354,7 +354,8 @@ export function ready() {
}) })
} }
export function wxShowLocation() { export function wxShowLocation() {
console.log("wxShowLocation","尝试获取地理位置");
return new Promise(() => { return new Promise(() => {
wechatEvevt('getLocation', { type: 'wgs84' }) wechatEvevt('getLocation', { type: 'wgs84' })
.then(res => { .then(res => {

22
manifest.json

@ -53,20 +53,32 @@
] ]
}, },
/* ios */ /* ios */
"ios" : {}, "ios" : {
"urltypes" : "",
"capabilities" : {
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:demo.com" ]
}
}
},
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs" : {
"oauth" : { "oauth" : {
"weixin" : { "weixin" : {
"appid" : "wx7c84ede33062d1e4", "appid" : "wx7c84ede33062d1e4",
"appsecret" : "c47ef66d3311194da44e60387d5c1abd", "appsecret" : "c47ef66d3311194da44e60387d5c1abd",
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks" : "https://WWWW/"
} }
}, },
"payment" : { "payment" : {
"weixin" : { "weixin" : {
"appid" : "wx7c84ede33062d1e4", "appid" : "wx7c84ede33062d1e4",
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks" : "https://WWWW/"
},
"paypal" : {
"__platform__" : [ "ios", "android" ],
"returnURL_ios" : "S",
"returnURL_android" : "SSSS"
} }
}, },
/* */ /* */
@ -237,7 +249,7 @@
}, },
"quickapp" : {}, "quickapp" : {},
"mp-weixin" : { "mp-weixin" : {
"appid" : "wxbf7999be196853d5", "appid" : "wxcd49c83634afd731",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },
@ -265,7 +277,7 @@
"usingComponents" : true "usingComponents" : true
}, },
"h5" : { "h5" : {
"title" : "武设优品电商", "title" : "品电商",
"devServer" : { "devServer" : {
"disableHostCheck" : true, "disableHostCheck" : true,
"proxy" : { "proxy" : {

6
pages.json

@ -3,7 +3,7 @@
{ {
"path": "pages/Loading/index", "path": "pages/Loading/index",
"style": { "style": {
"navigationBarTitleText": "武设优品电商" "navigationBarTitleText": "优品电商"
} }
}, },
{ {
@ -40,7 +40,7 @@
{ {
"path": "pages/home/index", "path": "pages/home/index",
"style": { "style": {
"navigationBarTitleText": "武设优品电商", "navigationBarTitleText": "优品电商",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
@ -444,7 +444,7 @@
}, },
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "武设优品电商", "navigationBarTitleText": "优品电商",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
"navigationStyle": "default" "navigationStyle": "default"

2
pages/home/components/Banner.vue

@ -3,7 +3,7 @@
<canvas canvas-id="colorThief" class="hide-canvas"></canvas> <canvas canvas-id="colorThief" class="hide-canvas"></canvas>
<swiper class="banner-carousel Shop-selector-rect" circular @change="swiperChange" :autoplay="true"> <swiper class="banner-carousel Shop-selector-rect" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in detail" :key="index" class="carousel-item"> <swiper-item v-for="(item, index) in detail" :key="index" class="carousel-item">
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load> <image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="aspectFit" lazy-load>
</image> </image>
</swiper-item> </swiper-item>
</swiper> </swiper>

36
pages/order/OrderSubmission/index.vue

@ -2,7 +2,7 @@
<view class="order-submission"> <view class="order-submission">
<view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'"> <view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'">
<view class="nav acea-row"> <view class="nav acea-row">
<view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)" v-if="systemStore"></view> <!-- <view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)" v-if="systemStore"></view> -->
<view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)" v-if="systemStore && !isIntegral"></view> <view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)" v-if="systemStore && !isIntegral"></view>
</view> </view>
<view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap"> <view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap">
@ -17,7 +17,7 @@
</view> </view>
</view> </view>
<view class="addressCon" v-else> <view class="addressCon" v-else>
<view class="setaddress">设置收货地址</view> <view class="setaddress">设置地址</view>
</view> </view>
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>
@ -71,9 +71,10 @@
</view> </view>
</view> </view>
<view class="item acea-row row-between-wrapper" v-if="shipping_type === 0"> <view class="item acea-row row-between-wrapper" v-if="shipping_type === 0">
<view>快递费用</view> <view>配送费用</view>
<view class="discount"> <view class="discount">
{{ orderGroupInfo.priceGroup.storePostage > 0 ? orderGroupInfo.priceGroup.storePostage : '免运费' }} 19元起送,配送免费,请保持手机畅通~
<!-- {{ orderGroupInfo.priceGroup.storePostage > 0 ? orderGroupInfo.priceGroup.storePostage : '免运费' }} -->
</view> </view>
</view> </view>
<view v-if="shipping_type === 1"> <view v-if="shipping_type === 1">
@ -107,10 +108,10 @@
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 </view> <view class="name acea-row row-center-wrapper"> <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 </view>
<view class="tip">微信快捷支付</view> <view class="tip">微信快捷支付</view>
</view> </view>
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')"> <!-- <view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付 </view> <view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付 </view>
<view class="tip">可用余额{{ userInfo.nowMoney || 0 }}</view> <view class="tip">可用余额{{ userInfo.nowMoney || 0 }}</view>
</view> </view> -->
<view class="payItem acea-row row-middle" v-if="isIntegral" :class="active === 'integral' ? 'on' : ''" @click="payItem('integral')"> <view class="payItem acea-row row-middle" v-if="isIntegral" :class="active === 'integral' ? 'on' : ''" @click="payItem('integral')">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'integral' ? 'bounceIn' : ''"></view>积分支付 </view> <view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'integral' ? 'bounceIn' : ''"></view>积分支付 </view>
<view class="tip">可用积分{{ userInfo.integral || 0 }}</view> <view class="tip">可用积分{{ userInfo.integral || 0 }}</view>
@ -188,7 +189,7 @@
.order-submission .allAddress .nav .item.on:before { .order-submission .allAddress .nav .item.on:before {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
content: '快递配送'; content: '免费送货';
font-size: 0.28 * 100rpx; font-size: 0.28 * 100rpx;
display: block; display: block;
height: 0; height: 0;
@ -273,7 +274,7 @@ export default {
offlinePayStatus: 2, offlinePayStatus: 2,
from: this.$deviceType, from: this.$deviceType,
deduction: true, deduction: true,
enableIntegral: true, enableIntegral: false,
enableIntegralNum: 0, enableIntegralNum: 0,
isWeixin: _isWeixin, isWeixin: _isWeixin,
pinkId: 0, pinkId: 0,
@ -293,7 +294,7 @@ export default {
}, },
mark: '', mark: '',
systemStore: {}, systemStore: {},
shipping_type: 0, shipping_type: 1,
contacts: '', contacts: '',
contactsTel: '', contactsTel: '',
storeSelfMention: 0, storeSelfMention: 0,
@ -444,7 +445,16 @@ export default {
this.addressInfo = addressInfo this.addressInfo = addressInfo
this.computedPrice() this.computedPrice()
}, },
createOrder() { createOrder() {
// if (this.orderPrice.payPrice < 19){
// uni.showToast({
// title: '19.',
// icon: 'none',
// duration: 2000,
// })
// return
// }
if (this.isIntegral) { if (this.isIntegral) {
// //
if (this.userInfo.integral < this.orderPrice.payIntegral) { if (this.userInfo.integral < this.orderPrice.payIntegral) {
@ -485,7 +495,7 @@ export default {
return return
} }
if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(this.contactsTel)) { if (!/^1(3|4|5|7|8|9|6|7)\d{9}$/.test(this.contactsTel)) {
uni.showToast({ uni.showToast({
title: '请填写正确的手机号', title: '请填写正确的手机号',
icon: 'none', icon: 'none',
@ -495,7 +505,7 @@ export default {
} }
if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(this.contacts)) { if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(this.contacts)) {
uni.showToast({ uni.showToast({
title: '请填写您的真实姓名', title: '请填写您的称呼',
icon: 'none', icon: 'none',
duration: 2000, duration: 2000,
}) })

4
pages/shop/GoodsCon/index.vue

@ -36,7 +36,7 @@
<!-- 运费 --> <!-- 运费 -->
<div class="attribute acea-row row-between-wrapper"> <div class="attribute acea-row row-between-wrapper">
<div> <div>
运费 配送方式
<span class="atterTxt">{{ tempName }}</span> <span class="atterTxt">{{ tempName }}</span>
</div> </div>
</div> </div>
@ -73,7 +73,7 @@
</view> </view>
<view class="addressBox"> <view class="addressBox">
<a class="iconfont icon-dadianhua01 font-color-red phone" @click="telPhone(systemStore.phone)"></a> <a class="iconfont icon-dadianhua01 font-color-red phone" @click="telPhone(systemStore.phone)"></a>
<view class="addressTxt corlor-yshop">距离{{ systemStore.distance }}千米</view> <view class="addressTxt corlor-yshop" v-if="systemStore.distance">距离{{ systemStore.distance }}千米</view>
</view> </view>
</view> </view>
</view> </view>

2
pages/user/User/index.vue

@ -118,7 +118,7 @@
</view> </view>
<view class="by"> <view class="by">
<view> <view>
<text class="by-text">技术支持</text> <!-- <text class="by-text">技术支持</text> -->
</view> </view>
</view> </view>
<!-- <SwitchWindow <!-- <SwitchWindow

23
store/index.js

@ -73,17 +73,18 @@ const vuexStore = new Vuex.Store({
}, },
}, },
actions: { actions: {
getLocation({ state, commit }, force) { getLocation({ state, commit }, force) {
uni.getLocation({ console.log("暂时注释地理位置");
type: 'gcj02', // uni.getLocation({
success: function(res) { // type: 'gcj02',
console.log(res) // success: function(res) {
commit('setLocation', { // console.log(res)
longitude: res.longitude, // commit('setLocation', {
latitude: res.latitude, // longitude: res.longitude,
}) // latitude: res.latitude,
}, // })
}) // },
// })
}, },
userInfo({ state, commit }, force) { userInfo({ state, commit }, force) {
if (state.userInfo !== null && !force) { if (state.userInfo !== null && !force) {

5
utils/index.js

@ -69,7 +69,10 @@ export function isType(arg, type) {
return Object.prototype.toString.call(arg) === '[object ' + type + ']' return Object.prototype.toString.call(arg) === '[object ' + type + ']'
} }
export function isWeixin() { export function isWeixin() {
// #ifdef MP-WEIXIN
return true;
// #endif
if (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { if (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) {
return true return true
} }

6
utils/request.js

@ -73,7 +73,8 @@ function baseRequest(options) {
// 如果接口需要登录,携带 token 去请求 // 如果接口需要登录,携带 token 去请求
console.log(options) console.log(options)
options.headers = { options.headers = {
"tenant-id": 125,
...options.headers, ...options.headers,
// hahah: 'Bearer2 ', // hahah: 'Bearer2 ',
} }
@ -98,7 +99,6 @@ console.log(options)
// 结构请求需要的参数 // 结构请求需要的参数
const { url, params, data, login, ...option } = options const { url, params, data, login, ...option } = options
console.log("111",url);
// 发起请求 // 发起请求
return fly return fly
.request(url, params || data, { .request(url, params || data, {
@ -113,7 +113,7 @@ console.log(options)
if ([401, 403].indexOf(data.status) !== -1) { if ([401, 403].indexOf(data.status) !== -1) {
handleLoginFailure() handleLoginFailure()
return Promise.reject({ msg: res.data.msg, res, data, toLogin: true }) return Promise.reject({ msg: res.data.msg, res, data, toLogin: true })
} else if (data.status === 200) { } else if (data.status === 200) {
return Promise.resolve(data, res) return Promise.resolve(data, res)
} else if (data.status == 5101) { } else if (data.status == 5101) {
return Promise.reject({ msg: res.data.msg, res, data }) return Promise.reject({ msg: res.data.msg, res, data })

Loading…
Cancel
Save