From 7d72786958a99c8c2e80067845230f9b4b59010d Mon Sep 17 00:00:00 2001
From: liudan <18634735655@163.com>
Date: Sat, 22 Jul 2023 16:03:11 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.hbuilderx/launch.json | 39 ++++----
.../shopro-auth-modal/shopro-auth-modal.vue | 5 +-
pages/activity/seckill/list.vue | 2 +-
pages/index/components/sh-seckill.vue | 2 +-
pages/order/confirm.vue | 47 +++++++++-
pages/order/detail.vue | 91 +++++++++++++++++--
pages/order/list.vue | 4 +-
pages/user/address/edit.vue | 36 ++++++--
shopro/pay/index.js | 12 ++-
shopro/wechat/wechat.js | 2 +
uview-ui/components/u-input/u-input.vue | 1 +
11 files changed, 197 insertions(+), 44 deletions(-)
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index ee5be77..07d9281 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -1,20 +1,23 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
- // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
- "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/
+ // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+ "version" : "0.0",
+ "configurations" : [
+ {
+ "app-plus" : {
+ "launchtype" : "local"
+ },
+ "default" : {
+ "launchtype" : "local"
+ },
+ "mp-weixin" : {
+ "launchtype" : "local"
+ },
+ "type" : "uniCloud"
+ },
+ {
+ "playground" : "standard",
+ "type" : "uni-app:app-android"
+ }
]
}
diff --git a/components/shopro-auth-modal/shopro-auth-modal.vue b/components/shopro-auth-modal/shopro-auth-modal.vue
index 853b040..1a73705 100644
--- a/components/shopro-auth-modal/shopro-auth-modal.vue
+++ b/components/shopro-auth-modal/shopro-auth-modal.vue
@@ -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")||'',
},
"登录中..."
)
diff --git a/pages/activity/seckill/list.vue b/pages/activity/seckill/list.vue
index acecf9e..01b2035 100644
--- a/pages/activity/seckill/list.vue
+++ b/pages/activity/seckill/list.vue
@@ -32,7 +32,7 @@
{{ item.price }}
- {{ item.original_price }}
+ {{ item.original_price_two }}
diff --git a/pages/index/components/sh-seckill.vue b/pages/index/components/sh-seckill.vue
index a4d64d9..c6cb83a 100644
--- a/pages/index/components/sh-seckill.vue
+++ b/pages/index/components/sh-seckill.vue
@@ -31,7 +31,7 @@
{{ mgoods.price }}
- ¥{{ mgoods.original_price }}
+ ¥{{ mgoods.original_price_two }}
diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue
index 8e50b5a..dbb1589 100644
--- a/pages/order/confirm.vue
+++ b/pages/order/confirm.vue
@@ -16,6 +16,7 @@
>
+
{{ addressData.consignee }}
@@ -285,7 +286,7 @@
-
+
+
+
+ 您所在的位置不在我们的配送范围
+ 确认
+
+
+
+
+
@@ -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;
}
+
diff --git a/pages/order/detail.vue b/pages/order/detail.vue
index 117c24d..9f99101 100644
--- a/pages/order/detail.vue
+++ b/pages/order/detail.vue
@@ -28,7 +28,21 @@
商品信息
-
+
+
+ {{ order.goods_title }}
+ {{ order.subtitle }}
+
+ 数量:{{ order.goods_num || 0 }};
+ {{ order.goods_sku_text ? order.goods_sku_text : '' }}
+
+
+ ¥{{ order.goods_price || 0 }}
+
+
+
+
+
-
+
-
+
@@ -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 => {
diff --git a/shopro/pay/index.js b/shopro/pay/index.js
index 7b31197..ce003c1 100644
--- a/shopro/pay/index.js
+++ b/shopro/pay/index.js
@@ -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',
diff --git a/shopro/wechat/wechat.js b/shopro/wechat/wechat.js
index d0d6e9f..3dacd02 100644
--- a/shopro/wechat/wechat.js
+++ b/shopro/wechat/wechat.js
@@ -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)
diff --git a/uview-ui/components/u-input/u-input.vue b/uview-ui/components/u-input/u-input.vue
index 8c6399d..5ea7a5d 100644
--- a/uview-ui/components/u-input/u-input.vue
+++ b/uview-ui/components/u-input/u-input.vue
@@ -232,6 +232,7 @@ export default {
},
watch: {
value(nVal, oVal) {
+ console.log(nVal, oVal,"jjj")
this.defaultValue = nVal;
// 当值发生变化,且为select类型时(此时input被设置为disabled,不会触发@input事件),模拟触发@input事件
if (nVal != oVal && this.type == 'select')