修改bug
This commit is contained in:
20
README.md
20
README.md
@ -21,6 +21,26 @@
|
|||||||
- 如需修改样式问题,请编辑.less的文件,请勿编辑.css的文件
|
- 如需修改样式问题,请编辑.less的文件,请勿编辑.css的文件
|
||||||
|
|
||||||
|
|
||||||
|
## git issuse 地址
|
||||||
|
|
||||||
|
https://gitee.com/guchengwuyue/yshopmall
|
||||||
|
|
||||||
|
### 请按照以下模板提交 issuse
|
||||||
|
标题:
|
||||||
|
H5/uni/后端代码/后台管理系统+简单描述
|
||||||
|
|
||||||
|
问题端:
|
||||||
|
H5/uni/后端代码/后台管理系统
|
||||||
|
|
||||||
|
代码版本:
|
||||||
|
v3.0
|
||||||
|
|
||||||
|
代码运行环境:
|
||||||
|
windows/macOS/Linux
|
||||||
|
|
||||||
|
问题描述:
|
||||||
|
Ps:如果是uni出现问题,请具体描述是运行那个端小程序/android/ios
|
||||||
|
|
||||||
## 声明
|
## 声明
|
||||||
- app测试版已上,请通过 `https://www.pgyer.com/yRYf` 安装测试。
|
- app测试版已上,请通过 `https://www.pgyer.com/yRYf` 安装测试。
|
||||||
- 运行app项目ios需要安装xcode,安卓需要装安卓的sdk以及安卓模拟器,建议安卓安装genymotion https://www.genymotion.com/ 登录时可选择私人使用,勾选后无需付费
|
- 运行app项目ios需要安装xcode,安卓需要装安卓的sdk以及安卓模拟器,建议安卓安装genymotion https://www.genymotion.com/ 登录时可选择私人使用,勾选后无需付费
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<view class="line1">{{ attr.productSelect.store_name }}</view>
|
<view class="line1">{{ attr.productSelect.store_name }}</view>
|
||||||
<view class="money font-color-red">
|
<view class="money font-color-red">
|
||||||
¥
|
¥
|
||||||
<text class="num">{{ attr.productSelect.price }}</text>
|
<text class="num">{{ attr.productSelect.price+'' }}</text>
|
||||||
<text class="stock">库存: {{ attr.productSelect.stock }}</text>
|
<text class="stock">库存: {{ attr.productSelect.stock }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -55,54 +55,51 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
attr: {
|
attr: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {}
|
default: () => {},
|
||||||
},
|
},
|
||||||
cartNum: {
|
cartNum: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: () => 1
|
default: () => 1,
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data: function() {
|
},
|
||||||
|
data: function () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function () {
|
||||||
console.log(this);
|
console.log(this);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeAttr: function() {
|
closeAttr: function () {
|
||||||
this.$emit("changeFun", { action: "changeattr", value: false });
|
this.$emit("changeFun", { action: "changeattr", value: false });
|
||||||
},
|
},
|
||||||
CartNumDes: function() {
|
CartNumDes: function () {
|
||||||
this.$emit("changeFun", { action: "ChangeCartNum", value: false });
|
this.$emit("changeFun", { action: "ChangeCartNum", value: false });
|
||||||
},
|
},
|
||||||
CartNumAdd: function() {
|
CartNumAdd: function () {
|
||||||
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 });
|
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 });
|
||||||
},
|
},
|
||||||
tapAttr: function(indexw, indexn) {
|
tapAttr: function (indexw, indexn) {
|
||||||
// 修改商品规格不生效的原因:
|
// 修改商品规格不生效的原因:
|
||||||
// H5端下面写法,attr更新,但是除H5外其他端不支持,
|
// H5端下面写法,attr更新,但是除H5外其他端不支持,
|
||||||
// 尽量避免下面的骚写法,不要在子组件内更新props
|
// 尽量避免下面的骚写法,不要在子组件内更新props
|
||||||
// 这里修改是为了能获取到被选中的属性
|
// 这里修改是为了能获取到被选中的属性
|
||||||
this.attr.productAttr[indexw].index = indexn;
|
this.attr.productAttr[indexw].index = indexn;
|
||||||
let that = this;
|
let that = this;
|
||||||
let value = that
|
let value = that.getCheckedValue().sort().join(",");
|
||||||
.getCheckedValue()
|
|
||||||
.sort()
|
|
||||||
.join(",");
|
|
||||||
that.$emit("changeFun", {
|
that.$emit("changeFun", {
|
||||||
action: "ChangeAttr",
|
action: "ChangeAttr",
|
||||||
value: {
|
value: {
|
||||||
value,
|
value,
|
||||||
indexw,
|
indexw,
|
||||||
indexn
|
indexn,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取被选中属性;
|
//获取被选中属性;
|
||||||
getCheckedValue: function() {
|
getCheckedValue: function () {
|
||||||
let productAttr = this.attr.productAttr;
|
let productAttr = this.attr.productAttr;
|
||||||
let value = [];
|
let value = [];
|
||||||
console.log(productAttr)
|
console.log(productAttr);
|
||||||
for (let i = 0; i < productAttr.length; i++) {
|
for (let i = 0; i < productAttr.length; i++) {
|
||||||
for (let j = 0; j < productAttr[i].attrValueArr.length; j++) {
|
for (let j = 0; j < productAttr[i].attrValueArr.length; j++) {
|
||||||
if (productAttr[i].index === j) {
|
if (productAttr[i].index === j) {
|
||||||
@ -111,7 +108,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -486,6 +486,7 @@ export default {
|
|||||||
},
|
},
|
||||||
changeAddress(addressInfo) {
|
changeAddress(addressInfo) {
|
||||||
this.addressInfo = addressInfo;
|
this.addressInfo = addressInfo;
|
||||||
|
this.getCartInfo()
|
||||||
},
|
},
|
||||||
createOrder() {
|
createOrder() {
|
||||||
let shipping_type = this.shipping_type;
|
let shipping_type = this.shipping_type;
|
||||||
|
@ -44,9 +44,7 @@
|
|||||||
>
|
>
|
||||||
<view>
|
<view>
|
||||||
<text class="state">{{ item.title }}</text>
|
<text class="state">{{ item.title }}</text>
|
||||||
<view>
|
<div>{{ dataFormat(item.addTime) }}</div>
|
||||||
<data-format :date="item.addTime"></data-format>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<text class="num" v-if="item.pm == 1">+{{ item.number }}</text>
|
<text class="num" v-if="item.pm == 1">+{{ item.number }}</text>
|
||||||
<text class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</text>
|
<text class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</text>
|
||||||
@ -74,12 +72,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getIntegralList, postSignUser } from "@/api/user";
|
import { getIntegralList, postSignUser } from "@/api/user";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
import DataFormat from "@/components/DataFormat";
|
import { dataFormat } from "@/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Integral",
|
name: "Integral",
|
||||||
components: {
|
components: {
|
||||||
Loading,
|
Loading,
|
||||||
DataFormat
|
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
data: function() {
|
data: function() {
|
||||||
@ -112,6 +110,7 @@ export default {
|
|||||||
!this.loading && this.getInfo();
|
!this.loading && this.getInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
dataFormat,
|
||||||
goSignIn() {
|
goSignIn() {
|
||||||
this.$yrouter.push("/pages/user/signIn/Sign/index");
|
this.$yrouter.push("/pages/user/signIn/Sign/index");
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user