Commit 2f350050 authored by zhoucong's avatar zhoucong

vlog上线测试

parent c86001dc
......@@ -194,15 +194,6 @@
"backgroundColor":"#192033"
}
}
,{
"path" : "pages/vlog/photoAlbum/photoAlbum",
"style" : {
"navigationBarTitleText": "我的照片集",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
}
,{
"path" : "pages/vlog/share/share",
"style" : {
......
......@@ -10,7 +10,7 @@
<!-- start:请在该区域编写自己的渲染逻辑 -->
<view class="info">
<view class="info__item">
<image class="image" :src="imgUrl+item.data.images" mode="widthFix"></image>
<image class="image" :src="$imgUrl+item.data.images" mode="widthFix"></image>
</view>
<view class="info__item_btn" @click.stop="replace(item)">
更换
......@@ -19,10 +19,11 @@
<!-- end:请在该区域编写自己的渲染逻辑 -->
</view>
</view>
<!-- 更换图片弹窗 -->
<u-popup v-model="show" mode="bottom" height="50%">
<view style="display: flex;flex-wrap: wrap;width: 100%;">
<view style="width: 25%;padding: 10rpx;" :style="{ height: itemWrapHeight + 'px' }" v-for="(item,index) in alternateImages" :key="index">
<image :src="imgUrl+item.images" style="width: 100%;height: 100%;"@click="changeImglist(item.images)"></image>
<view style="width: 25%;padding: 10rpx;" v-for="(item,index) in alternateImages" :key="index">
<image :src="'http://picture.pangdly.com/'+item.images" style="width: 100%;height: 100%;"@click="changeImglist(item.images)" mode="widthFix" ></image>
</view>
</view>
</u-popup>
......@@ -63,6 +64,7 @@
overOnePage: false, // 整个区域是否超过一个屏幕
itemTransition: false, // item 变换是否需要过渡动画, 首次渲染不需要
platform: "", //使用平台
$imgUrl:""//图片前缀
}
},
watch: {
......@@ -72,6 +74,7 @@
},
},
onReady() {
this.$imgUrl=this.imgUrl//因main.js挂载的全局变量页面中显示undifined,特此重新赋值
this.init()
},
methods: {
......
......@@ -49,7 +49,7 @@
phone: "", //联系电话
address: "" //地址
}, //地址信息
addressShow: true,
addressShow: true,//地址栏弹窗
Freight: {}, //手续费信息
}
},
......@@ -136,16 +136,20 @@
})
},
changeAddress() { //跳转修改地址页面
this.$u.route("pages/vlog/shippingAddress/shippingAddress", this.address)
this.$u.route("pages/vlog/shippingAddress/shippingAddress",this.address)
},
getAddress() { //获取收货地址
this.$request('wechatUser/contact/findContactList', {
openid: uni.getStorageSync("openid")
}).then(res => {
if (res.code == "00") {
this.address = res.data[0]
this.addressShow = false
this.getFreight()
if(res.data.length==0){
this.$u.route("pages/vlog/shippingAddress/shippingAddress")
}else{
this.address = res.data[0]
this.addressShow = false
this.getFreight()
}
} else {
uni.showModal({
showCancel: false,
......@@ -157,7 +161,8 @@
},
getFreight() { //获取运费
this.$request('scenic/user/product/getProductPostage', {
id: this.productVo.id
id: this.productVo.id,
userAddress:this.address.address
}).then(res => {
if (res.code == "00") {
this.Freight = res.data
......
<template>
<view class="content">
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad(){//代替 vue 里面的 created
},
onReady() {//代替 vue 里面的 mounted
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.content{padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;}
</style>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<u-icon name="bell-fill" color="#6C8EF3"></u-icon><text style="margin-left: 20rpx;">提醒:长按拖拽排序</text>
</view>
<view class="top">
<dragImg :alternateImages="alternateImages" :listData="imgList" @change="changeImgList" :columns="3"></dragImg>
<dragImg :alternateImages="alternateImages" :listData="imgList" @change="changeImgList" :columns="columns"></dragImg>
</view>
<view class="bottom" @click="next">
下一步
......@@ -20,13 +20,16 @@
},
data() {
return {
columns:3,//每行显示几张图片
alternateImages:[],//备选图片
imgList: [],//已选择图片
sortImglist:[]//排序后图片
}
},
onLoad() { //代替 vue 里面的 created
var allImgList=uni.getStorageSync('imgList')
//深拷贝方式防止改变源数据
var allImgList1=JSON.parse(JSON.stringify(allImgList))
allImgList.forEach(item=>{//备选图片
var obj={
......
......@@ -27,12 +27,16 @@
</view>
</view>
</block>
<view class="" v-show="aa">
成功
</view>
</view>
</template>
<script>
export default {
data() {
return {
aa:false,
list:[],//商品列表
}
},
......@@ -45,11 +49,12 @@ export default {
getList(){//获取商品列表
this.$request("scenic/user/product/findProductList", {
openid: uni.getStorageSync("openid"),
productType:4,
productType:9,
type:4
}).then(res => {
if (res.code === "00") {
if (res.code == "00") {
this.list=res.data.list
this.aa=true
}else{
uni.showModal({
title: '提示',
......
......@@ -22,6 +22,7 @@
export default {
data() {
return {
isAdd:"",//判断是否为新增
address: {
name: "", //姓名
phone: "", //联系电话
......@@ -31,40 +32,81 @@
},
onLoad(opction) { //代替 vue 里面的 created
this.address = opction
if(JSON.stringify(opction) === '{}'){
this.isAdd=true
}else{
this.isAdd=false
}
console.log(this.isAdd);
},
onReady() { //代替 vue 里面的 mounted
},
methods: {
baocun() { //保存收货地址
if (this.$u.test.mobile(this.address.phone)) { //手机号验证
let data = {
id: this.address.id,
name: this.address.name,
phone: this.address.phone,
address: this.address.address,
openid: uni.getStorageSync('openid')
if(this.isAdd){
if (this.$u.test.mobile(this.address.phone)) { //手机号验证
let data = {
name: this.address.name,
phone: this.address.phone,
address: this.address.address,
openid: uni.getStorageSync('openid'),
credentialNumber:"500226199407035525",
credentialType:1,
category:0
}
this.$request('wechatUser/contact/saveContact', data).then(res => {
if (res.code == '00') { //保存成功后跳转
this.$u.route("pages/vlog/orderPay/orderPay")
uni.showToast({
title: '保存成功',
duration: 1000
});
}else{
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
}
})
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: "请正确输入手机号!",
});
}
this.$request('wechatUser/contact/updateContact', data).then(res => {
if (res.code == '00') { //保存成功后跳转
this.$u.route("pages/vlog/orderPay/orderPay")
uni.showToast({
title: '保存成功',
duration: 1000
});
}else{
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
}else{
if (this.$u.test.mobile(this.address.phone)) { //手机号验证
let data = {
id: this.address.id,
name: this.address.name,
phone: this.address.phone,
address: this.address.address,
openid: uni.getStorageSync('openid')
}
})
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: "请正确输入手机号!",
});
this.$request('wechatUser/contact/updateContact', data).then(res => {
if (res.code == '00') { //保存成功后跳转
this.$u.route("pages/vlog/orderPay/orderPay")
uni.showToast({
title: '保存成功',
duration: 1000
});
}else{
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
}
})
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: "请正确输入手机号!",
});
}
}
},
}
......
......@@ -12,7 +12,7 @@
<view class="img">
<block v-for="(item,index) in imgList" :key="index">
<view class="imgItem" @click="changeImg(item,index)">
<image :src="imgUrl+item.url"></image>
<image :src="$imgUrl+item.url"></image>
<image v-if="item.check===1" src="../../../static/img/vlog/icon/check.png" class="icon"></image>
</view>
</block>
......@@ -35,9 +35,12 @@
maxImg: "", //相册规格张数
imgList: [], //上传的图片列表
checkList: [], //选中的图片下标
$imgUrl:""
}
},
onLoad(opction) { //代替 vue 里面的 created
this.$imgUrl=this.imgUrl//因main.js挂载的全局变量页面中显示undifined,特此重新赋值
this.maxImg = opction.yeshu //获取相册规格
this.imgList = uni.getStorageSync("imgList")
......@@ -58,7 +61,7 @@
if (process.env.NODE_ENV === 'development') { //开发环境
url = "http://192.168.0.213:7888/"
} else {
url = "http://picture.pangdly.com/"
url = "http://manager.pangdly.com/"
}
uni.uploadFile({ // s上传图片
url: url + 'upload/file/newUpload',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment