main
liudan 1 year ago
parent e2ccd09ce0
commit 7d72786958
  1. 39
      .hbuilderx/launch.json
  2. 5
      components/shopro-auth-modal/shopro-auth-modal.vue
  3. 2
      pages/activity/seckill/list.vue
  4. 2
      pages/index/components/sh-seckill.vue
  5. 47
      pages/order/confirm.vue
  6. 91
      pages/order/detail.vue
  7. 4
      pages/order/list.vue
  8. 36
      pages/user/address/edit.vue
  9. 12
      shopro/pay/index.js
  10. 2
      shopro/wechat/wechat.js
  11. 1
      uview-ui/components/u-input/u-input.vue

@ -1,20 +1,23 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
{
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"mp-weixin" : {
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "standard",
"type" : "uni-app:app-android"
}
]
}

@ -673,6 +673,7 @@ export default {
//
async thirdLogin(provider, payload = null) {
console.log(provider,payload,"66666666")
if (this.platform === 'wxMiniProgram' && payload === null) return;
if (!this.protocol) {
this.$u.toast("请同意用户协议");
@ -680,6 +681,7 @@ export default {
}
const that = this;
let token = "";
console.log(payload,"777")
switch (provider) {
case "wechat":
token = await wechat.login(payload);
@ -707,7 +709,8 @@ export default {
"user.accountLogin",
{
account: that.form["accountLogin"].data.account,
password: that.form["accountLogin"].data.password
password: that.form["accountLogin"].data.password,
session_id: uni.getStorageSync("session_id")||'',
},
"登录中..."
)

@ -32,7 +32,7 @@
<view class=" u-flex u-row-between u-col-center">
<view class="u-flex u-col-bottom font-OPPOSANS">
<view class="price u-m-r-10">{{ item.price }}</view>
<view class="origin-price" v-if="item.original_price!='0.00'">{{ item.original_price }}</view>
<view class="origin-price" v-if="item.original_price_two!='0.00'">{{ item.original_price_two }}</view>
</view>
<button class="u-reset-button buy-btn">去抢购</button>
</view>

@ -31,7 +31,7 @@
<!-- <view class="goods-title u-m-b-10 u-ellipsis-1">{{ mgoods.title }}</view> -->
<view class="price-box font-OPPOSANS">
<view class="price u-m-b-10">{{ mgoods.price }}</view>
<view class="original-price">{{ mgoods.original_price }}</view>
<view class="original-price">{{ mgoods.original_price_two }}</view>
</view>
</view>
</view>

@ -16,6 +16,7 @@
></text>
</view>
</view>
<view class="add-address-box u-p-30" v-else>
<view class="top u-flex">
<text class="name">{{ addressData.consignee }}</text>
@ -285,7 +286,7 @@
</view>
<button
class="cu-btn sub-btn"
@tap="subOrder"
@tap="tijiaoHandle"
:disabled="isDisabled"
hover-class="btn-hover"
>
@ -403,7 +404,15 @@
</view>
</view>
</u-popup>
<u-popup v-model="showOverAddress" :closeable="true" mode="center" border-radius="20" :mask-close-able="false" @close="closeHandleText">
<view class="innerContent">
<view class="innerText">
<text>您所在的位置不在我们的配送范围</text>
<view class="submitBtn" @click="secondConfirm">确认</view>
</view>
</view>
</u-popup>
<!-- 配送方式弹窗 -->
<u-popup
v-model="showExpressType"
@ -864,6 +873,7 @@
>
</view>
</u-popup>
</view>
</template>
@ -877,6 +887,7 @@ export default {
},
data() {
return {
showOverAddress:false,
msgText:'',
isGroup: true, //
platform: this.$platform.get(),
@ -1064,6 +1075,9 @@ export default {
this.invoiceType = type;
this.invoiceForm.model.type = type;
},
closeHandleText() {
this.show = false
},
//
onInvoice() {
this.showInvoice = !this.showInvoice;
@ -1357,8 +1371,19 @@ export default {
}
})
},
tijiaoHandle(){
if(this.msgText=='当前收货地址不在配送范围'){
this.showOverAddress = true;
}else{
this.subOrder()
}
},
secondConfirm(){
this.subOrder()
},
//
subOrder() {
let that = this;
that.isDisabled = true;
console.log({
@ -2398,5 +2423,23 @@ export default {
background-color: #fff;
}
}
}
.innerContent{
.innerText{
padding:50rpx;
text-align: center;
margin-top: 50rpx;
}
}
.submitBtn{
background-color: #17C161;
padding:20rpx;
text-align: center;
border-radius:50rpx;
color:#ffffff;
margin-top: 60rpx;
}
</style>

@ -28,7 +28,21 @@
<view class="order-list" v-for="order in orderDetail.item" :key="order.id">
<view style="border-bottom:1px solid #eaeaea;padding: 24rpx 0;">商品信息</view>
<view class="order-card" @tap="jump('/pages/goods/detail', { id: order.goods_id })">
<shopro-mini-card :title="order.goods_title" :image="order.goods_image">
<image class="goods_img" lazy-load fade-show :src="order.goods_image" mode="aspectFill"></u-image>
<view class="u-m-l-20" style="width: calc(100% - 180rpx);height:159rpx;display: flex;flex-direction: column;justify-content: space-between;">
<view class="goods-title u-ellipsis-2">{{ order.goods_title }}</view>
<view v-if="subtitle" class="describe-text u-m-b-10 u-ellipsis-2">{{ order.subtitle }}</view>
<view class="order-sku u-ellipsis-1">
<text class="order-num">数量:{{ order.goods_num || 0 }};</text>
{{ order.goods_sku_text ? order.goods_sku_text : '' }}
</view>
<view class="card-price-box u-flex">
<text class="order-price font-OPPOSANS">{{ order.goods_price || 0 }}</text>
<!-- <button class="u-reset-button status-btn" v-if="order.status_name">{{ order.status_name }}</button> -->
</view>
</view>
<!-- <shopro-mini-card :title="order.goods_title" :image="order.goods_image">
<template #describe>
<view class="order-sku u-ellipsis-1">
<text class="order-num">数量:{{ order.goods_num || 0 }};</text>
@ -37,11 +51,11 @@
</template>
<template #cardBottom>
<view class="card-price-box u-flex">
<text class="order-price font-OPPOSANS">{{ order.goods_price || 0 }}</text>
<text class="order-price font-OPPOSANS">{{ order.goods_price || 0 }}</text> -->
<!-- <button class="u-reset-button status-btn" v-if="order.status_name">{{ order.status_name }}</button> -->
</view>
<!-- </view>
</template>
</shopro-mini-card>
</shopro-mini-card> -->
</view>
<!-- 配送方式 -->
<!-- <view class="express-type-box u-flex u-row-between">
@ -224,7 +238,68 @@ export default {
data() {
return {
time: 0,
orderDetail: {},
orderDetail: {
"id": null,
"type": null,
"order_sn": null,
"user_id": null,
"activity_type": "",
"goods_amount": "",
"dispatch_amount": "",
"phone": "",
"consignee": "",
"community_id": null,
"community_case_id": null,
"community_case_num": null,
"community_case_name": null,
"province_name": "",
"city_name": "",
"area_name": "",
"address": "",
"province_id": null,
"city_id": null,
"area_id": null,
"status": null,
"invoice_status": "",
"memo": null,
"remark": "",
"total_amount": "",
"score_amount": null,
"total_fee": "",
"last_total_fee": "",
"discount_fee": "",
"coupon_fee": "",
"activity_discount_money": "",
"dispatch_discount_money": "",
"pay_fee": "",
"score_fee": null,
"goods_original_amount": "",
"coupons_id": null,
"transaction_id": "",
"payment_json": "",
"pay_type": "",
"paytime": null,
"ext": "",
"platform": "",
"price_difference": "",
"rider_order_sn": null,
"rider_order_status": null,
"rider_phone": null,
"createtime": null,
"item": [
],
"status_code": "",
"status_name": "",
"status_desc": "",
"btns": [],
"ext_arr": {
"buy_type": "",
"groupon_id": null,
"expired_time": null
}
},
itemList:[],
orderStatus: {
'-2': '已关闭',
'-1': '已取消',
@ -249,7 +324,9 @@ export default {
};
},
onShow() {
this.getOrderDetail();
this.$nextTick(()=>{
this.getOrderDetail();
})
},
onLoad() {},
computed: {
@ -283,7 +360,9 @@ export default {
}).then(res => {
console.log(res,"9999")
if (res.code === 1) {
that.itemList = res.data.item;
that.orderDetail = res.data;
that.orderDetail.item = res.data.item
that.orderDetail.createtime = that.$u.timeFormat(res.data.createtime, 'yyyy-mm-dd hh:MM');
that.orderDetail.paytime = that.$u.timeFormat(res.data.paytime, 'yyyy-mm-dd hh:MM');
// let that = this;

@ -126,7 +126,7 @@
},
{
id: 1,
title: '待分拣',
title: '待支付',
type: 'nopay'
},
{
@ -411,7 +411,7 @@
}
.state {
font-size: 26rpx;
font-size: 22rpx;
color: #17C161;
}
}

@ -47,7 +47,9 @@
</view>
</u-form>
<!-- 小区选择器 -->
<u-select mode="single-column" safe-area-inset-bottom :list="communityList" value-name="id" label-name="name" v-model="comshowSelect" @confirm="communityConfirm"></u-select>
<u-select mode="single-column" safe-area-inset-bottom :list="communityList" value-name="id" label-name="name"
:default-value="selectIndex"
v-model="comshowSelect" @confirm="communityConfirm"></u-select>
<!-- 省市区选择器 -->
<u-select mode="mutil-column-auto" safe-area-inset-bottom :list="addressAreaList" v-model="showSelect" @confirm="regionConfirm"></u-select>
</view>
@ -69,6 +71,7 @@ export default {
'font-size': '30rpx',
color: '#999999'
},
selectIndex:[0],
model: {
id: 0,
consignee: '',
@ -134,17 +137,19 @@ export default {
title: this.addressId ? '编辑收货地址' : '添加收货地址'
});
this.addressId && this.getAddressInfo();
this.addressId && this.getNearbyCommunity()
// this.addressId && this.getNearbyCommunity()
this.getNearbyCommunity()
//
this.$Route.query.addressData && this.wxAddressInit();
},
methods: {
isChooseCommunity(){
if(!this.communityDisabled){
this.comshowSelect = true
}else{
this.comshowSelect = false
}
// if(!this.communityDisabled){
// this.comshowSelect = true
// }else{
// this.comshowSelect = false
// }
this.comshowSelect = true
},
//
getArea() {
@ -171,7 +176,21 @@ export default {
}, '')
console.log(this.model.latitude,this.model.longitude)
console.log(res,"nnn")
this.communityList = res.data
this.communityList = res.data;
// this.model.community_text
let obj = this.communityList.filter((item,index)=>{
if(item.id==28){
this.selectIndex = [index];
console.log(this.selectIndex)
return item
}
})
console.log(obj[0])
// this.$nextTick(()=>{
this.model.community_text = obj[0].name
this.model.community_id = obj[0].id
},
//
wxAddressInit() {
@ -207,7 +226,6 @@ export default {
success: res => {
this.model.latitude = res.latitude;
this.model.longitude = res.longitude;
this.getNearbyCommunity()
this.getLocationInfo();
},
fail: err => {

@ -100,21 +100,24 @@ export default class ShoproPay {
let params = {
order_sn: that.order.order_sn,
payment: that.payment,
session_id: uni.getStorageSync('session_id') || '',
return_url: return_url
}
if (uni.getStorageSync('openid')) {
params.openid = uni.getStorageSync('openid');
}
$http('money.prepay', params, '支付中').then(res => {
console.log(res)
if (res.code === 1) {
res.data === 'no_openid' ?
uni.showModal({
title: '微信支付',
content: '请先绑定微信再使用微信支付',
success: function(res) {
if (res.confirm) {
wechat.bind();
}
success: (res)=> {
console.log(this)
// if (res.confirm) {
// wechat.bind();
// }
},
}) :
resolve(res);
@ -239,6 +242,7 @@ export default class ShoproPay {
async wechatPay() {
let that = this;
let result = await this.prepay();
console.log(JSON.parse(result.data.pay_data),"999")
if (result.code === 1) {
uni.requestPayment({
provider: 'wxpay',

@ -59,6 +59,7 @@ export default {
// #endif
},
async bind(payload) {
console.log(payload,"44444")
let token = "";
// #ifdef MP-WEIXIN
token = await this.wxMiniProgramOauth("bind", payload);
@ -174,6 +175,7 @@ export default {
// 微信小程序获取用户手机号登录
async wxMiniProgramOauth(event = "login", payload) {
let that = this;
uni.showLoading({
title: that.eventMap(event)

@ -232,6 +232,7 @@ export default {
},
watch: {
value(nVal, oVal) {
console.log(nVal, oVal,"jjj")
this.defaultValue = nVal;
// select(inputdisabled@input)@input
if (nVal != oVal && this.type == 'select')

Loading…
Cancel
Save