Commit 0df2ead740c2c5c18dd1fe9405e3f3241100278f
1 parent
a658edc461
Exists in
master
确认订单传参修改&新增眼镜数据的录入功能
Showing
4 changed files
with
137 additions
and
109 deletions
Show diff stats
src/components/BottomSheet/BottomSheet.vue
| 1 | <template> | 1 | <template> |
| 2 | <view class="BottomSheetContent"> | 2 | <view class="BottomSheetContent"> |
| 3 | <view class="sheet" :class="{sheetShow:isShowBottom,sheeHide:!isShowBottom}" @touchmove.stop.prevent="moveHandle" @click="closeSheet()"> | 3 | <view class="sheet" :class="{sheetShow:isShowBottom,sheeHide:!isShowBottom}" @touchmove.stop.prevent="moveHandle" @click="closeSheet()"> |
| 4 | <scroll-view scroll-y="true" class="sheetView" :class="{sheetView_active:isShowBottom}" @click.stop="stopEvent()" > | 4 | <scroll-view scroll-y="true" class="sheetView" :class="{sheetView_active:isShowBottom}" @click.stop="stopEvent()" > |
| 5 | <view class="BottomSheetContent"> | 5 | <view class="BottomSheetContent"> |
| 6 | <view class="goodInfo"> | 6 | <view class="goodInfo"> |
| 7 | <view class="imageWrap"> | 7 | <view class="imageWrap"> |
| 8 | <image | 8 | <image |
| 9 | :src="skuItem.pic" | 9 | :src="skuItem.pic" |
| 10 | mode="aspectFill" | 10 | mode="aspectFill" |
| 11 | style="width: 188rpx;height: 168rpx;" | 11 | style="width: 188rpx;height: 168rpx;" |
| 12 | 12 | ||
| 13 | ></image> | 13 | ></image> |
| 14 | 14 | ||
| 15 | </view> | 15 | </view> |
| 16 | <view class="infoRight"> | 16 | <view class="infoRight"> |
| 17 | <text class="goodName">{{goodInfo.p_name}}</text> | 17 | <text class="goodName">{{goodInfo.p_name}}</text> |
| 18 | <text class="remarks">支持7天无理由退货 顺丰发货</text> | 18 | <text class="remarks">支持7天无理由退货 顺丰发货</text> |
| 19 | <view class="priceBox"> | 19 | <view class="priceBox"> |
| 20 | <view class="price">¥{{skuItem.real_price || '暂无'}}</view> | 20 | <view class="price">¥{{skuItem.real_price || '暂无'}}</view> |
| 21 | <text>(限购{{maxCount}}副)</text> | 21 | <text>(限购{{maxCount}}副)</text> |
| 22 | <view class="counter"> | 22 | <view class="counter"> |
| 23 | <view | 23 | <view |
| 24 | class="btn" | 24 | class="btn" |
| 25 | disabled="this.addDisabled" | 25 | disabled="this.addDisabled" |
| 26 | type="default" | 26 | type="default" |
| 27 | @click="counter(false)" | 27 | @click="counter(false)" |
| 28 | >-</view> | 28 | >-</view> |
| 29 | <text>{{count}}</text> | 29 | <text>{{count}}</text> |
| 30 | <view | 30 | <view |
| 31 | class="btn" | 31 | class="btn" |
| 32 | disabled="this.desDisabled" | 32 | disabled="this.desDisabled" |
| 33 | type="default" | 33 | type="default" |
| 34 | @click="counter(true)" | 34 | @click="counter(true)" |
| 35 | >+</view> | 35 | >+</view> |
| 36 | </view> | 36 | </view> |
| 37 | </view> | 37 | </view> |
| 38 | </view> | 38 | </view> |
| 39 | </view> | 39 | </view> |
| 40 | <view class="peopleChoose"> | 40 | <view class="peopleChoose"> |
| 41 | <view class="title">选择使用人</view> | 41 | <view class="title">选择使用人</view> |
| 42 | <view class="loveList"> | 42 | <view class="loveList"> |
| 43 | <view class="peopleName" v-for="(item,index) in loveList" :key='index' :class="{ active2: loveCurrent === index }" | 43 | <view class="peopleName" v-for="(item,index) in loveList" :key='index' :class="{ active2: loveCurrent === index }" |
| 44 | @click="onClickLoveItem(index,item.name)"> | 44 | @click="onClickLoveItem(index,item.name)"> |
| 45 | {{item.name}} | 45 | {{item.name}} |
| 46 | </view> | 46 | </view> |
| 47 | </view> | 47 | </view> |
| 48 | </view> | 48 | </view> |
| 49 | <view class="goods-data" v-if="isCart !== 3"> | 49 | <view class="goods-data" v-if="isCart !== 3"> |
| 50 | <view class="opCollapse"> | 50 | <view class="opCollapse"> |
| 51 | <view class="body"> | 51 | <view class="body"> |
| 52 | <template v-if="opIsOpen"> | 52 | <template v-if="opIsOpen"> |
| 53 | <view class="goods-form"> | 53 | <view class="goods-form"> |
| 54 | <view class="p1"> | 54 | <view class="p1"> |
| 55 | <image class="image2" src="../../static/img/myOpticsData/dataWrite.png" mode="aspectFit"></image> | 55 | <image class="image2" src="../../static/img/myOpticsData/dataWrite.png" mode="aspectFit"></image> |
| 56 | 填写验光数据 | 56 | 填写验光数据 |
| 57 | </view> | 57 | </view> |
| 58 | <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> | 58 | <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> |
| 59 | <view class="picker"> | 59 | <view class="picker"> |
| 60 | <view class="picker-choice"> | 60 | <view class="picker-choice"> |
| 61 | <view class="choice-left"> | 61 | <view class="choice-left"> |
| 62 | <text class="pd">验光单取名:</text> | 62 | <text class="pd">验光单取名:</text> |
| 63 | </view> | 63 | </view> |
| 64 | <input type="text" @blur="handleInput" class="input" | 64 | <input type="text" @blur="handleInput" class="input" |
| 65 | placeholder="请输入名称" maxlength="20" :value="name" /> | 65 | placeholder="请输入名称" maxlength="20" :value="name" /> |
| 66 | </view> | 66 | </view> |
| 67 | </view> | 67 | </view> |
| 68 | <view class="picker" > | 68 | <view class="picker" > |
| 69 | <view class="picker-choice"> | 69 | <view class="picker-choice"> |
| 70 | <view class="choice-left"> | 70 | <view class="choice-left"> |
| 71 | <text class="p11">{{pickerInfoList[0].nameC}}</text> | 71 | <text class="p11">{{pickerInfoList[0].nameC}}</text> |
| 72 | <text class="p12">{{pickerInfoList[0].nameE}}</text> | 72 | <text class="p12">{{pickerInfoList[0].nameE}}</text> |
| 73 | </view> | 73 | </view> |
| 74 | <text class="p13">左 (OD)</text> | 74 | <text class="p13">左 (OD)</text> |
| 75 | <!-- <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> --> | 75 | <!-- <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> --> |
| 76 | <picker @change="bindPickerChange01" :value="pickerInfoList[0].nameIndex1" :range="pickerInfoList[0].nameArray1"> | 76 | <picker @change="bindPickerChange01" :value="pickerInfoList[0].nameIndex1" :range="pickerInfoList[0].nameArray1"> |
| 77 | <view class="p14"> | 77 | <view class="p14"> |
| 78 | {{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}} | 78 | {{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}} |
| 79 | <image src="../../static/detail-tabicon.png" ></image> | 79 | <image src="../../static/detail-tabicon.png" ></image> |
| 80 | </view> | 80 | </view> |
| 81 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 81 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 82 | </picker> | 82 | </picker> |
| 83 | <text class="p13">右 (OS)</text> | 83 | <text class="p13">右 (OS)</text> |
| 84 | <!-- <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> --> | 84 | <!-- <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> --> |
| 85 | <picker @change="bindPickerChange02" :value="pickerInfoList[0].nameIndex2" :range="pickerInfoList[0].nameArray2"> | 85 | <picker @change="bindPickerChange02" :value="pickerInfoList[0].nameIndex2" :range="pickerInfoList[0].nameArray2"> |
| 86 | <view class="p14"> | 86 | <view class="p14"> |
| 87 | {{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}} | 87 | {{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}} |
| 88 | <image src="../../static/detail-tabicon.png" ></image> | 88 | <image src="../../static/detail-tabicon.png" ></image> |
| 89 | </view> | 89 | </view> |
| 90 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 90 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 91 | </picker> | 91 | </picker> |
| 92 | </view> | 92 | </view> |
| 93 | </view> | 93 | </view> |
| 94 | <view class="picker" > | 94 | <view class="picker" > |
| 95 | <view class="picker-choice"> | 95 | <view class="picker-choice"> |
| 96 | <view class="choice-left"> | 96 | <view class="choice-left"> |
| 97 | <text class="p11">{{pickerInfoList[1].nameC}}</text> | 97 | <text class="p11">{{pickerInfoList[1].nameC}}</text> |
| 98 | <text class="p12">{{pickerInfoList[1].nameE}}</text> | 98 | <text class="p12">{{pickerInfoList[1].nameE}}</text> |
| 99 | </view> | 99 | </view> |
| 100 | <text class="p13">左 (OD)</text> | 100 | <text class="p13">左 (OD)</text> |
| 101 | <!-- <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> --> | 101 | <!-- <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> --> |
| 102 | <picker @change="bindPickerChange11" :value="pickerInfoList[1].nameIndex1" :range="pickerInfoList[1].nameArray1"> | 102 | <picker @change="bindPickerChange11" :value="pickerInfoList[1].nameIndex1" :range="pickerInfoList[1].nameArray1"> |
| 103 | <view class="p14"> | 103 | <view class="p14"> |
| 104 | {{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}} | 104 | {{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}} |
| 105 | <image src="../../static/detail-tabicon.png" ></image> | 105 | <image src="../../static/detail-tabicon.png" ></image> |
| 106 | </view> | 106 | </view> |
| 107 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 107 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 108 | </picker> | 108 | </picker> |
| 109 | <text class="p13">右 (OS)</text> | 109 | <text class="p13">右 (OS)</text> |
| 110 | <!-- <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> --> | 110 | <!-- <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> --> |
| 111 | <picker @change="bindPickerChange12" :value="pickerInfoList[1].nameIndex2" :range="pickerInfoList[1].nameArray2"> | 111 | <picker @change="bindPickerChange12" :value="pickerInfoList[1].nameIndex2" :range="pickerInfoList[1].nameArray2"> |
| 112 | <view class="p14"> | 112 | <view class="p14"> |
| 113 | {{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}} | 113 | {{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}} |
| 114 | <image src="../../static/detail-tabicon.png" ></image> | 114 | <image src="../../static/detail-tabicon.png" ></image> |
| 115 | </view> | 115 | </view> |
| 116 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 116 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 117 | </picker> | 117 | </picker> |
| 118 | </view> | 118 | </view> |
| 119 | </view> | 119 | </view> |
| 120 | <view class="picker" > | 120 | <view class="picker" > |
| 121 | <view class="picker-choice"> | 121 | <view class="picker-choice"> |
| 122 | <view class="choice-left"> | 122 | <view class="choice-left"> |
| 123 | <text class="p11">{{pickerInfoList[2].nameC}}</text> | 123 | <text class="p11">{{pickerInfoList[2].nameC}}</text> |
| 124 | <text class="p12">{{pickerInfoList[2].nameE}}</text> | 124 | <text class="p12">{{pickerInfoList[2].nameE}}</text> |
| 125 | </view> | 125 | </view> |
| 126 | <text class="p13">左 (OD)</text> | 126 | <text class="p13">左 (OD)</text> |
| 127 | <picker @change="bindPickerChange21" :value="pickerInfoList[2].nameIndex1" :range="pickerInfoList[2].nameArray1"> | 127 | <picker @change="bindPickerChange21" :value="pickerInfoList[2].nameIndex1" :range="pickerInfoList[2].nameArray1"> |
| 128 | <view class="p14"> | 128 | <view class="p14"> |
| 129 | {{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}} | 129 | {{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}} |
| 130 | <image src="../../static/detail-tabicon.png" ></image> | 130 | <image src="../../static/detail-tabicon.png" ></image> |
| 131 | </view> | 131 | </view> |
| 132 | </picker> | 132 | </picker> |
| 133 | <text class="p13">右 (OS)</text> | 133 | <text class="p13">右 (OS)</text> |
| 134 | <!-- <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> --> | 134 | <!-- <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> --> |
| 135 | <picker @change="bindPickerChange22" :value="pickerInfoList[2].nameIndex2" :range="pickerInfoList[2].nameArray2"> | 135 | <picker @change="bindPickerChange22" :value="pickerInfoList[2].nameIndex2" :range="pickerInfoList[2].nameArray2"> |
| 136 | <view class="p14"> | 136 | <view class="p14"> |
| 137 | {{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}} | 137 | {{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}} |
| 138 | <image src="../../static/detail-tabicon.png" ></image> | 138 | <image src="../../static/detail-tabicon.png" ></image> |
| 139 | </view> | 139 | </view> |
| 140 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 140 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 141 | </picker> | 141 | </picker> |
| 142 | </view> | 142 | </view> |
| 143 | </view> | 143 | </view> |
| 144 | <view class="picker"> | 144 | <view class="picker"> |
| 145 | <view class="picker-choice"> | 145 | <view class="picker-choice"> |
| 146 | <view class="choice-left"> | 146 | <view class="choice-left"> |
| 147 | <text class="pd">瞳距:</text> | 147 | <text class="pd">瞳距:</text> |
| 148 | </view> | 148 | </view> |
| 149 | <input type="digit" @change="handleInputPd" class="input" | 149 | <input type="digit" @change="handleInputPd" class="input" |
| 150 | placeholder="请输入瞳距,单位cm" maxlength="20" :value="pd" /> | 150 | placeholder="请输入瞳距,单位cm" maxlength="20" :value="pd" /> |
| 151 | </view> | 151 | </view> |
| 152 | </view> | 152 | </view> |
| 153 | <view class="picker" > | 153 | <view class="picker" > |
| 154 | <view class="picker-choice"> | 154 | <view class="picker-choice"> |
| 155 | <view class="choice-left"> | 155 | <view class="choice-left"> |
| 156 | <text class="p11">{{pickerInfoList[3].nameC}}</text> | 156 | <text class="p11">{{pickerInfoList[3].nameC}}</text> |
| 157 | </view> | 157 | </view> |
| 158 | <text class="p13-date">年 (Y)</text> | 158 | <text class="p13-date">年 (Y)</text> |
| 159 | <picker @change="bindPickerChange41" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1"> | 159 | <picker @change="bindPickerChange41" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1"> |
| 160 | <view class="p14" style="width: 30px;"> | 160 | <view class="p14" style="width: 30px;"> |
| 161 | {{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}} | 161 | {{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}} |
| 162 | <image src="../../static/detail-tabicon.png" ></image> | 162 | <image src="../../static/detail-tabicon.png" ></image> |
| 163 | </view> | 163 | </view> |
| 164 | </picker> | 164 | </picker> |
| 165 | <text class="p13-date">月 (M)</text> | 165 | <text class="p13-date">月 (M)</text> |
| 166 | <picker @change="bindPickerChange42" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2"> | 166 | <picker @change="bindPickerChange42" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2"> |
| 167 | <view class="p14" style="width: 30px;"> | 167 | <view class="p14" style="width: 30px;"> |
| 168 | {{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}} | 168 | {{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}} |
| 169 | <image src="../../static/detail-tabicon.png" ></image> | 169 | <image src="../../static/detail-tabicon.png" ></image> |
| 170 | </view> | 170 | </view> |
| 171 | </picker> | 171 | </picker> |
| 172 | <text class="p13-date">日 (D)</text> | 172 | <text class="p13-date">日 (D)</text> |
| 173 | <picker @change="bindPickerChange43" :value="pickerInfoList[3].nameIndex3" :range="pickerInfoList[3].nameArray3"> | 173 | <picker @change="bindPickerChange43" :value="pickerInfoList[3].nameIndex3" :range="pickerInfoList[3].nameArray3"> |
| 174 | <view class="p14" style="width: 30px;"> | 174 | <view class="p14" style="width: 30px;"> |
| 175 | {{pickerInfoList[3].nameArray3[pickerInfoList[3].nameIndex3]}} | 175 | {{pickerInfoList[3].nameArray3[pickerInfoList[3].nameIndex3]}} |
| 176 | <image src="../../static/detail-tabicon.png" ></image> | 176 | <image src="../../static/detail-tabicon.png" ></image> |
| 177 | </view> | 177 | </view> |
| 178 | </picker> | 178 | </picker> |
| 179 | </view> | 179 | </view> |
| 180 | </view> | 180 | </view> |
| 181 | <view class="ipts"> | 181 | <view class="ipts"> |
| 182 | <view class="inputItem"> | 182 | <view class="inputItem"> |
| 183 | <text class="text">镜片宽度</text> | 183 | <text class="text">镜片宽度</text> |
| 184 | <input class="input" @input="glassInfoInput($event,0)" type="text" :value="glassInfo.glassWidth" placeholder="请输入镜片宽度"/> | 184 | <input class="input" @input="glassInfoInput($event,0)" type="text" :value="glassInfo.glassWidth!=='0'?glassInfo.glassWidth:''" placeholder="请输入镜片宽度"/> |
| 185 | </view> | 185 | </view> |
| 186 | <view class="inputItem"> | 186 | <view class="inputItem"> |
| 187 | <text class="text">鼻梁宽度</text> | 187 | <text class="text">鼻梁宽度</text> |
| 188 | <input class="input" @input="glassInfoInput($event,1)" type="text" :value="glassInfo.norseWidth" placeholder="请输入鼻梁宽度"/> | 188 | <input class="input" @input="glassInfoInput($event,1)" type="text" :value="glassInfo.norseWidth!=='0'?glassInfo.norseWidth:''" placeholder="请输入鼻梁宽度"/> |
| 189 | </view> | 189 | </view> |
| 190 | <view class="inputItem"> | 190 | <view class="inputItem"> |
| 191 | <text class="text">镜腿长度</text> | 191 | <text class="text">镜腿长度</text> |
| 192 | <input class="input" @input="glassInfoInput($event,2)" type="text" :value="glassInfo.legWidth" placeholder="请输入镜腿长度"/> | 192 | <input class="input" @input="glassInfoInput($event,2)" type="text" :value="glassInfo.legWidth!=='0'?glassInfo.legWidth:''" placeholder="请输入镜腿长度"/> |
| 193 | </view> | 193 | </view> |
| 194 | 194 | ||
| 195 | </view> | 195 | </view> |
| 196 | <view class="confirm"> | 196 | <!-- <view class="confirm"> |
| 197 | <image class="image1" :src="confirm ? tabicon[0] : tabicon[1]" @tap="changeConfirm"></image> | 197 | <image class="image1" :src="confirm ? tabicon[0] : tabicon[1]" @tap="changeConfirm"></image> |
| 198 | <text>确认以上输入信息来源于我的验光数据!</text> | 198 | <text>确认以上输入信息来源于我的验光数据!</text> |
| 199 | </view> | 199 | </view> --> |
| 200 | </view> | 200 | </view> |
| 201 | </template> | 201 | </template> |
| 202 | <template v-else> | 202 | <template v-else> |
| 203 | <view | 203 | <view |
| 204 | v-for="item in pickerInfoList" | 204 | v-for="item in pickerInfoList" |
| 205 | :key="item.key" | 205 | :key="item.key" |
| 206 | class="bodyBox" | 206 | class="bodyBox" |
| 207 | > | 207 | > |
| 208 | <template v-if="item.nameC==='验光日期'"> | 208 | <template v-if="item.nameC==='验光日期'"> |
| 209 | <text class="names">{{item.nameC}}</text> | 209 | <text class="names">{{item.nameC}}</text> |
| 210 | <text style="margin-right: 5px;">{{item.nameArray1[item.nameIndex1]}}年</text> | 210 | <text style="margin-right: 5px;">{{item.nameArray1[item.nameIndex1]}}年</text> |
| 211 | <text style="margin-right: 5px;">{{item.nameArray2[item.nameIndex2]}}月</text> | 211 | <text style="margin-right: 5px;">{{item.nameArray2[item.nameIndex2]}}月</text> |
| 212 | <text>{{item.nameArray3[item.nameIndex2]}}日</text> | 212 | <text>{{item.nameArray3[item.nameIndex2]}}日</text> |
| 213 | </template> | 213 | </template> |
| 214 | <template v-else> | 214 | <template v-else> |
| 215 | <template v-if="item.nameC==='度数'"> | 215 | <template v-if="item.nameC==='度数'"> |
| 216 | <text style="display: inline;">*</text> | 216 | <text style="display: inline;">*</text> |
| 217 | </template> | 217 | </template> |
| 218 | 218 | ||
| 219 | <text class="names">{{item.nameC}}</text> | 219 | <text class="names">{{item.nameC}}</text> |
| 220 | <text style="margin-right: 10px;">左 {{item.nameArray1[item.nameIndex1]}}</text> | 220 | <text style="margin-right: 10px;">左 {{item.nameArray1[item.nameIndex1]}}</text> |
| 221 | <text>右 {{item.nameArray2[item.nameIndex2]}}</text> | 221 | <text>右 {{item.nameArray2[item.nameIndex2]}}</text> |
| 222 | </template> | 222 | </template> |
| 223 | </view> | 223 | </view> |
| 224 | </template> | 224 | </template> |
| 225 | </view> | 225 | </view> |
| 226 | </view> | 226 | </view> |
| 227 | </view> | 227 | </view> |
| 228 | <view class="choose"> | 228 | <view class="choose"> |
| 229 | <view | 229 | <view |
| 230 | class="chooseItem_1_content" | 230 | class="chooseItem_1_content" |
| 231 | v-for="(item,index) in attrList" | 231 | v-for="(item,index) in attrList" |
| 232 | :key="index" | 232 | :key="index" |
| 233 | > | 233 | > |
| 234 | <UniCollapse @change="changeShow(index)"> | 234 | <UniCollapse @change="changeShow(index)"> |
| 235 | <UniCollapseItem | 235 | <UniCollapseItem |
| 236 | :open="show[index]" | 236 | :open="show[index]" |
| 237 | :title="item.meta_name" | 237 | :title="item.meta_name" |
| 238 | showAnimation=false | 238 | showAnimation=false |
| 239 | > | 239 | > |
| 240 | <view class="chooseItem_1_content"> | 240 | <view class="chooseItem_1_content"> |
| 241 | <view class="itemsWrap" v-if="isCart ==3"> | 241 | <view class="itemsWrap" v-if="isCart ==3"> |
| 242 | <view | 242 | <view |
| 243 | class="item2" | 243 | class="item2" |
| 244 | v-for="(one,i) in item.attr" | 244 | v-for="(one,i) in item.attr" |
| 245 | :key="i" | 245 | :key="i" |
| 246 | :class="{ active2: current[index] === i}" | 246 | :class="{ active2: current[index] === i}" |
| 247 | @click="cartOnClickItem(index, i,one.aid)" | 247 | @click="cartOnClickItem(index, i,one.aid)" |
| 248 | >{{one.name}}</view> | 248 | >{{one.name}}</view> |
| 249 | </view> | 249 | </view> |
| 250 | <view class="itemsWrap" v-else> | 250 | <view class="itemsWrap" v-else> |
| 251 | <view | 251 | <view |
| 252 | class="item2" | 252 | class="item2" |
| 253 | v-for="(one,i) in item.attr" | 253 | v-for="(one,i) in item.attr" |
| 254 | :key="i" | 254 | :key="i" |
| 255 | :class="{ active2: current[index] === i }" | 255 | :class="{ active2: current[index] === i }" |
| 256 | @click="cartOnClickItem(index, i,one.aid)" | 256 | @click="cartOnClickItem(index, i,one.aid)" |
| 257 | >{{one.name}}</view> | 257 | >{{one.name}}</view> |
| 258 | </view> | 258 | </view> |
| 259 | </view> | 259 | </view> |
| 260 | </UniCollapseItem> | 260 | </UniCollapseItem> |
| 261 | </UniCollapse> | 261 | </UniCollapse> |
| 262 | <view | 262 | <view |
| 263 | class="chooseRes" | 263 | class="chooseRes" |
| 264 | v-show="!show[index]" | 264 | v-show="!show[index]" |
| 265 | >* {{attrList[index].attr[current[index]].name}}</view> | 265 | >* {{attrList[index].attr[current[index]].name}}</view> |
| 266 | </view> | 266 | </view> |
| 267 | </view> | 267 | </view> |
| 268 | <view | 268 | <view |
| 269 | class="button" | 269 | class="button" |
| 270 | @click.native="addCart" | 270 | @click.native="addCart" |
| 271 | v-if="isCart == 1" | 271 | v-if="isCart == 1" |
| 272 | > | 272 | > |
| 273 | 加入购物车 | 273 | 加入购物车 |
| 274 | </view> | 274 | </view> |
| 275 | <view | 275 | <view |
| 276 | class="button" | 276 | class="button" |
| 277 | @click="toComfirmOrder" | 277 | @click="toComfirmOrder" |
| 278 | v-if="isCart == 2" | 278 | v-if="isCart == 2" |
| 279 | > | 279 | > |
| 280 | 立即结算 | 280 | 立即结算 |
| 281 | </view> | 281 | </view> |
| 282 | <view | 282 | <view |
| 283 | class="button" | 283 | class="button" |
| 284 | @click="comfirmChoose" | 284 | @click="comfirmChoose" |
| 285 | v-if="isCart == 3" | 285 | v-if="isCart == 3" |
| 286 | > | 286 | > |
| 287 | 确定 | 287 | 确定 |
| 288 | </view> | 288 | </view> |
| 289 | </view> | 289 | </view> |
| 290 | </scroll-view> | 290 | </scroll-view> |
| 291 | </view> | 291 | </view> |
| 292 | </view> | 292 | </view> |
| 293 | </template> | 293 | </template> |
| 294 | <script> | 294 | <script> |
| 295 | import UniCollapse from '@/components/UniCollapse/UniCollapse.vue' | 295 | import UniCollapse from '@/components/UniCollapse/UniCollapse.vue' |
| 296 | import UniCollapseItem from '@/components/UniCollapseItem/UniCollapseItem.vue' | 296 | import UniCollapseItem from '@/components/UniCollapseItem/UniCollapseItem.vue' |
| 297 | import store from '@/store' | 297 | import store from '@/store' |
| 298 | export default { | 298 | export default { |
| 299 | components: { | 299 | components: { |
| 300 | UniCollapse, | 300 | UniCollapse, |
| 301 | UniCollapseItem, | 301 | UniCollapseItem, |
| 302 | }, | 302 | }, |
| 303 | props: { | 303 | props: { |
| 304 | isShowBottom : Boolean, | 304 | isShowBottom : Boolean, |
| 305 | pid: Number, | 305 | pid: Number, |
| 306 | sk_id:String, | 306 | sk_id:String, |
| 307 | propMpId:String, | 307 | propMpId:String, |
| 308 | goodInfo:Object, | 308 | goodInfo:Object, |
| 309 | isCart:Number, | 309 | isCart:Number, |
| 310 | cart_id:Number, | 310 | cart_id:Number, |
| 311 | index:Number | 311 | index:Number |
| 312 | }, | 312 | }, |
| 313 | data() { | 313 | data() { |
| 314 | return { | 314 | return { |
| 315 | loveCurrent:Number, | 315 | loveCurrent:Number, |
| 316 | count: 1, | 316 | count: 1, |
| 317 | // pid: 0, | 317 | // pid: 0, |
| 318 | maxCount: 20, | 318 | maxCount: 20, |
| 319 | dataName: '', // 验光数据人员名称 | 319 | dataName: '', // 验光数据人员名称 |
| 320 | isDataName: false, // 是否是已存在的人员数据 | 320 | isDataName: false, // 是否是已存在的人员数据 |
| 321 | dataConfirm: false, // 已确认所输入验光数据 | 321 | dataConfirm: false, // 已确认所输入验光数据 |
| 322 | opIsOpen: true, | 322 | opIsOpen: true, |
| 323 | addDisabled: false, | 323 | addDisabled: false, |
| 324 | desDisabled: false, | 324 | desDisabled: false, |
| 325 | current: [], | 325 | current: [], |
| 326 | show: [true,true], | 326 | show: [true,true], |
| 327 | checkedData: {}, | 327 | checkedData: {}, |
| 328 | // 度数相关数据 | 328 | // 度数相关数据 |
| 329 | pickerInfoList: [ | 329 | pickerInfoList: [ |
| 330 | { nameC: '度数', nameE: '(SPH)', nameArray1: [''], nameIndex1: 0, nameArray2: [''], nameIndex2: 0, key: 0 }, | 330 | { nameC: '度数', nameE: '(SPH)', nameArray1: [''], nameIndex1: 0, nameArray2: [''], nameIndex2: 0, key: 0 }, |
| 331 | { nameC: '散光', nameE: '(CYL)', nameArray1: [''], nameIndex1: 0, nameArray2: [''], nameIndex2: 0, key: 1 }, | 331 | { nameC: '散光', nameE: '(CYL)', nameArray1: [''], nameIndex1: 0, nameArray2: [''], nameIndex2: 0, key: 1 }, |
| 332 | { nameC: '散光轴位', nameE: '(AXI)', nameArray1: [''], nameIndex1: 0, nameArray2: [''], nameIndex2: 0, key: 2 }, | 332 | { nameC: '散光轴位', nameE: '(AXI)', nameArray1: [''], nameIndex1: 0, nameArray2: [''], nameIndex2: 0, key: 2 }, |
| 333 | { nameC: '验光日期', nameE: '', nameArray1: [''], nameIndex1: 0, nameArray2: ['', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], nameIndex2: 0, nameArray3: [''], nameIndex3: 0 }, | 333 | { nameC: '验光日期', nameE: '', nameArray1: [''], nameIndex1: 0, nameArray2: ['', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], nameIndex2: 0, nameArray3: [''], nameIndex3: 0 }, |
| 334 | ], | 334 | ], |
| 335 | confirm: false, // 用户是否确认 | 335 | // confirm: false, // 用户是否确认 |
| 336 | tabicon: ['/static/detail-button.png', '/static/detail-button-unselected.png'], | 336 | // tabicon: ['/static/detail-button.png', '/static/detail-button-unselected.png'], |
| 337 | name: '', | 337 | name: '', |
| 338 | oldname: '', // 用于判读用户是否改变名字 | 338 | oldname: '', // 用于判读用户是否改变名字 |
| 339 | pickerInfoChioce: { | 339 | pickerInfoChioce: { |
| 340 | leftSph: '', | 340 | leftSph: '', |
| 341 | rightSph: '', | 341 | rightSph: '', |
| 342 | leftCyl: '', | 342 | leftCyl: '', |
| 343 | rightCyl: '', | 343 | rightCyl: '', |
| 344 | leftAxi: '', | 344 | leftAxi: '', |
| 345 | rightAxi: '', | 345 | rightAxi: '', |
| 346 | time: { | 346 | time: { |
| 347 | year: 0, | 347 | year: 0, |
| 348 | month: 0, | 348 | month: 0, |
| 349 | day: 0, | 349 | day: 0, |
| 350 | }, | 350 | }, |
| 351 | }, | 351 | }, |
| 352 | glassInfo:{ | 352 | glassInfo:{ |
| 353 | norseWidth:Number,//鼻宽 | ||
| 354 | glassWidth:Number,//镜片宽度 | 353 | glassWidth:Number,//镜片宽度 |
| 354 | norseWidth:Number,//鼻宽 | ||
| 355 | legWidth:Number//镜腿长度 | 355 | legWidth:Number//镜腿长度 |
| 356 | }, | 356 | }, |
| 357 | pd: '', // 瞳距 | 357 | pd: '', // 瞳距 |
| 358 | oldpd: '', // 用于判断用户是否改变瞳距 | 358 | oldpd: '', // 用于判断用户是否改变瞳距 |
| 359 | kinds: 1, // kinds=1,提交为新增验光,2为修改 | 359 | kinds: 1, // kinds=1,提交为新增验光,2为修改 |
| 360 | mp_id: Number, | 360 | mp_id: Number, |
| 361 | skuValueArray:[], | 361 | skuValueArray:[], |
| 362 | skId:String | 362 | skId:String |
| 363 | } | 363 | } |
| 364 | }, | 364 | }, |
| 365 | computed: { | 365 | computed: { |
| 366 | //进购物车选择的人的index | 366 | //进购物车选择的人的index |
| 367 | p_current(){ | 367 | p_current(){ |
| 368 | const getLoveItemIndex = (item) => item.mp_id == this.propMpId | 368 | const getLoveItemIndex = (item) => item.mp_id == this.propMpId |
| 369 | const p_current = this.$store.state.myLoveList.loveList.findIndex(getLoveItemIndex ) | 369 | const p_current = this.$store.state.myLoveList.loveList.findIndex(getLoveItemIndex ) |
| 370 | if(this.isCart == 3){ | 370 | if(this.isCart == 3){ |
| 371 | this.loveCurrent = p_current | 371 | this.loveCurrent = p_current |
| 372 | } | 372 | } |
| 373 | return p_current | 373 | return p_current |
| 374 | }, | 374 | }, |
| 375 | arr_current(){ | 375 | arr_current(){ |
| 376 | if(this.isCart == 3){ | 376 | if(this.isCart == 3){ |
| 377 | const skId = this.sk_id | 377 | const skId = this.sk_id |
| 378 | const skuValue = this.skuItem.sku_value | 378 | const skuValue = this.skuItem.sku_value |
| 379 | const skuValueArray = skuValue.split('_') | 379 | const skuValueArray = skuValue.split('_') |
| 380 | this.skuValueArray = skuValueArray | 380 | this.skuValueArray = skuValueArray |
| 381 | const attrList = this.$store.state.read.goodInfo.attrList | 381 | const attrList = this.$store.state.read.goodInfo.attrList |
| 382 | for (let i = 0;i<attrList.length;i++) { | 382 | for (let i = 0;i<attrList.length;i++) { |
| 383 | const getArrIndex = (item) => item.aid == skuValueArray[i] | 383 | const getArrIndex = (item) => item.aid == skuValueArray[i] |
| 384 | const arr_current = this.$store.state.read.goodInfo.attrList[i].attr.findIndex(getArrIndex ) | 384 | const arr_current = this.$store.state.read.goodInfo.attrList[i].attr.findIndex(getArrIndex ) |
| 385 | // console.log('arr_current',arr_current) | 385 | // console.log('arr_current',arr_current) |
| 386 | this.current.push(arr_current) | 386 | this.current.push(arr_current) |
| 387 | } | 387 | } |
| 388 | }else{ | 388 | }else{ |
| 389 | return null | 389 | return null |
| 390 | } | 390 | } |
| 391 | }, | 391 | }, |
| 392 | loveList() { | 392 | loveList() { |
| 393 | return this.$store.state.myLoveList.loveList || [] | 393 | return this.$store.state.myLoveList.loveList || [] |
| 394 | }, | 394 | }, |
| 395 | attrList() { | 395 | attrList() { |
| 396 | // console.log('attrList',this.$store.state.read.goodInfo.attrList) | 396 | // console.log('attrList',this.$store.state.read.goodInfo.attrList) |
| 397 | let attrList = this.$store.state.read.goodInfo.attrList | 397 | let attrList = this.$store.state.read.goodInfo.attrList |
| 398 | if(attrList !== undefined){ | 398 | if(attrList !== undefined){ |
| 399 | return attrList | 399 | return attrList |
| 400 | }else{ | 400 | }else{ |
| 401 | return [] | 401 | return [] |
| 402 | } | 402 | } |
| 403 | }, | 403 | }, |
| 404 | skuList() { | 404 | skuList() { |
| 405 | // console.log('skuList',this.$store.state.read.goodInfo.skuList) | 405 | // console.log('skuList',this.$store.state.read.goodInfo.skuList) |
| 406 | return this.$store.state.read.goodInfo.skuList | 406 | return this.$store.state.read.goodInfo.skuList |
| 407 | }, | 407 | }, |
| 408 | skuItem(){ | 408 | skuItem(){ |
| 409 | // if(this.isCart == 3){ | 409 | // if(this.isCart == 3){ |
| 410 | const skuList = this.$store.state.read.goodInfo.skuList | 410 | const skuList = this.$store.state.read.goodInfo.skuList |
| 411 | const skuItem = skuList.filter(item => item.sk_id === this.skId)[0] | 411 | const skuItem = skuList.filter(item => item.sk_id === this.skId)[0] |
| 412 | return skuItem | 412 | return skuItem |
| 413 | // }else{ | 413 | // }else{ |
| 414 | // const skuList = this.$store.state.read.goodInfo.skuList | 414 | // const skuList = this.$store.state.read.goodInfo.skuList |
| 415 | // const skuItem = skuList[0] | 415 | // const skuItem = skuList[0] |
| 416 | // return skuItem | 416 | // return skuItem |
| 417 | // } | 417 | // } |
| 418 | }, | 418 | }, |
| 419 | mpList() { | 419 | mpList() { |
| 420 | 420 | ||
| 421 | return this.$store.state.myLoveList.loveList | 421 | return this.$store.state.myLoveList.loveList |
| 422 | }, | 422 | }, |
| 423 | glassInfoRight(){ | ||
| 424 | const glassInfoArr = Object.values(this.glassInfo) | ||
| 425 | // console.log('glassInfoArr',glassInfoArr.find(item => item == '0')) | ||
| 426 | return glassInfoArr.find(item => item == '0') ==undefined | ||
| 427 | } | ||
| 423 | }, | 428 | }, |
| 429 | // beforeDestroy() { | ||
| 430 | // //获取关心的人列表 | ||
| 431 | // store.dispatch('myLoveList/getLoveList', { | ||
| 432 | // uid: this.$store.state.user.userInfo.uid, | ||
| 433 | // }); | ||
| 434 | // }, | ||
| 424 | created() { | 435 | created() { |
| 425 | this.skuValueArray = this.skuList[0].sku_value.split("_") | 436 | this.skuValueArray = this.skuList[0].sku_value.split("_") |
| 426 | // console.log(this.sk_id) | 437 | // console.log(this.sk_id) |
| 427 | this.mp_id = this.propMpId | 438 | this.mp_id = this.propMpId |
| 428 | const pid = this.pid | 439 | const pid = this.pid |
| 429 | if(this.isCart!==3){ | 440 | if(this.isCart!==3){ |
| 430 | this.skId = this.skuList[0].sk_id | 441 | this.skId = this.skuList[0].sk_id |
| 431 | const current = [] | 442 | const current = [] |
| 432 | const show = [] | 443 | const show = [] |
| 433 | for (let index = 0; index < this.attrList.length; index++) { | 444 | for (let index = 0; index < this.attrList.length; index++) { |
| 434 | current.push(0) | 445 | current.push(0) |
| 435 | show.push(true) | 446 | show.push(true) |
| 436 | } | 447 | } |
| 437 | this.current = current | 448 | this.current = current |
| 438 | this.show = show | 449 | this.show = show |
| 439 | }else{ | 450 | }else{ |
| 440 | this.skId = this.sk_id | 451 | this.skId = this.sk_id |
| 441 | } | 452 | } |
| 442 | |||
| 443 | //获取关心的人列表 | 453 | //获取关心的人列表 |
| 444 | store.dispatch('myLoveList/getLoveList', { | 454 | store.dispatch('myLoveList/getLoveList', { |
| 445 | uid: this.$store.state.user.userInfo.uid, | 455 | uid: this.$store.state.user.userInfo.uid, |
| 446 | }); | 456 | }); |
| 447 | |||
| 448 | |||
| 449 | // 初始化SPL、CYL、AXI的值 | 457 | // 初始化SPL、CYL、AXI的值 |
| 450 | for (let j = 0; j < 3; j++) { | 458 | for (let j = 0; j < 3; j++) { |
| 451 | for (let i = -12; i < 6; i++) { | 459 | for (let i = -12; i < 6; i++) { |
| 452 | this.pickerInfoList[j].nameArray1.push(i) | 460 | this.pickerInfoList[j].nameArray1.push(i) |
| 453 | this.pickerInfoList[j].nameArray1.push(i + 0.5) | 461 | this.pickerInfoList[j].nameArray1.push(i + 0.5) |
| 454 | this.pickerInfoList[j].nameArray2.push(i) | 462 | this.pickerInfoList[j].nameArray2.push(i) |
| 455 | this.pickerInfoList[j].nameArray2.push(i + 0.5) | 463 | this.pickerInfoList[j].nameArray2.push(i + 0.5) |
| 456 | if (i >= -6) { | 464 | if (i >= -6) { |
| 457 | this.pickerInfoList[j].nameArray1.push(i + 0.25) | 465 | this.pickerInfoList[j].nameArray1.push(i + 0.25) |
| 458 | this.pickerInfoList[j].nameArray1.push(i + 0.75) | 466 | this.pickerInfoList[j].nameArray1.push(i + 0.75) |
| 459 | this.pickerInfoList[j].nameArray2.push(i + 0.25) | 467 | this.pickerInfoList[j].nameArray2.push(i + 0.25) |
| 460 | this.pickerInfoList[j].nameArray2.push(i + 0.75) | 468 | this.pickerInfoList[j].nameArray2.push(i + 0.75) |
| 461 | } | 469 | } |
| 462 | if (i === 5) { | 470 | if (i === 5) { |
| 463 | this.pickerInfoList[j].nameArray1.push(i + 1) | 471 | this.pickerInfoList[j].nameArray1.push(i + 1) |
| 464 | this.pickerInfoList[j].nameArray2.push(i + 1) | 472 | this.pickerInfoList[j].nameArray2.push(i + 1) |
| 465 | } | 473 | } |
| 466 | } | 474 | } |
| 467 | } | 475 | } |
| 468 | // 初始化日期值 | 476 | // 初始化日期值 |
| 469 | for (let i = 1; i < 32; i++) { | 477 | for (let i = 1; i < 32; i++) { |
| 470 | this.pickerInfoList[3].nameArray3.push(i) | 478 | this.pickerInfoList[3].nameArray3.push(i) |
| 471 | } | 479 | } |
| 472 | // 初始化年份前后五年 | 480 | // 初始化年份前后五年 |
| 473 | const myDate = new Date() | 481 | const myDate = new Date() |
| 474 | const nowYear = myDate.getFullYear() | 482 | const nowYear = myDate.getFullYear() |
| 475 | for (let i = 0; i < 5; i++) { | 483 | for (let i = 0; i < 5; i++) { |
| 476 | this.pickerInfoList[3].nameArray1.push(nowYear - i) | 484 | this.pickerInfoList[3].nameArray1.push(nowYear - i) |
| 477 | } | 485 | } |
| 478 | }, | 486 | }, |
| 479 | name : "bottomSheet", | 487 | name : "bottomSheet", |
| 480 | methods: { | 488 | methods: { |
| 489 | //判断眼镜数据是否为0 | ||
| 481 | checkGlassInfo(){ | 490 | checkGlassInfo(){ |
| 482 | const glassInfoArr = Object.values(this.glassInfo) | 491 | // const glassInfoArr = Object.values(this.glassInfo) |
| 483 | if(glassInfoArr.find(item => item == '0') !=='undefind'){ | 492 | // console.log(this.glassInfoRight) |
| 484 | uni.showModal({ | 493 | if(!this.glassInfoRight){ |
| 485 | title:'请完善镜框数据~' | 494 | uni.showToast({ |
| 495 | title:'请完善镜框数据~', | ||
| 496 | icon:'none' | ||
| 486 | }) | 497 | }) |
| 487 | } | 498 | } |
| 488 | }, | 499 | }, |
| 489 | updateMylove(){ | 500 | updateMylove(){ |
| 490 | const loveItem = this.loveList[this.loveCurrent] | 501 | const loveItem = this.loveList[this.loveCurrent] |
| 491 | const glassWidth = this.glassInfo.glassWidth | 502 | const glassWidth = this.glassInfo.glassWidth |
| 492 | const norseWidth = this.glassInfo.norseWidth | 503 | const norseWidth = this.glassInfo.norseWidth |
| 493 | const legWidth = this.glassInfo.legWidth | 504 | const legWidth = this.glassInfo.legWidth |
| 494 | console.log(loveItem.glassWidth) | ||
| 495 | console.log(glassWidth) | ||
| 496 | if(loveItem.glassWidth !== glassWidth){ | 505 | if(loveItem.glassWidth !== glassWidth){ |
| 497 | store.dispatch('myLoveList/updateMylove', { | 506 | store.dispatch('myLoveList/updateMylove', { |
| 498 | uid: this.$store.state.user.userInfo.uid, | 507 | uid: this.$store.state.user.userInfo.uid, |
| 499 | openid: this.$store.state.user.userInfo.openid, | 508 | openid: this.$store.state.user.userInfo.openid, |
| 500 | mp_id: this.mp_id, | 509 | mp_id: this.mp_id, |
| 501 | keyname: 'glassWidth', | 510 | keyname: 'glassWidth', |
| 502 | keyvalue: glassWidth | 511 | keyvalue: glassWidth |
| 503 | }); | 512 | }); |
| 504 | } | 513 | } |
| 505 | if(loveItem.norseWidth !== norseWidth){ | 514 | if(loveItem.norseWidth !== norseWidth){ |
| 506 | store.dispatch('myLoveList/updateMylove', { | 515 | store.dispatch('myLoveList/updateMylove', { |
| 507 | uid: this.$store.state.user.userInfo.uid, | 516 | uid: this.$store.state.user.userInfo.uid, |
| 508 | openid: this.$store.state.user.userInfo.openid, | 517 | openid: this.$store.state.user.userInfo.openid, |
| 509 | mp_id: this.mp_id, | 518 | mp_id: this.mp_id, |
| 510 | keyname: 'norseWidth', | 519 | keyname: 'norseWidth', |
| 511 | keyvalue: norseWidth | 520 | keyvalue: norseWidth |
| 512 | }); | 521 | }); |
| 513 | } | 522 | } |
| 514 | if(loveItem.legWidth !== legWidth){ | 523 | if(loveItem.legWidth !== legWidth){ |
| 515 | store.dispatch('myLoveList/updateMylove', { | 524 | store.dispatch('myLoveList/updateMylove', { |
| 516 | uid: this.$store.state.user.userInfo.uid, | 525 | uid: this.$store.state.user.userInfo.uid, |
| 517 | openid: this.$store.state.user.userInfo.openid, | 526 | openid: this.$store.state.user.userInfo.openid, |
| 518 | mp_id: this.mp_id, | 527 | mp_id: this.mp_id, |
| 519 | keyname: 'legWidth', | 528 | keyname: 'legWidth', |
| 520 | keyvalue: legWidth | 529 | keyvalue: legWidth |
| 521 | }); | 530 | }); |
| 522 | } | 531 | } |
| 523 | }, | 532 | }, |
| 524 | glassInfoInput(e,type){ | 533 | glassInfoInput(e,type){ |
| 525 | switch(type){ | 534 | switch(type){ |
| 526 | case 0: | 535 | case 0: |
| 527 | this.glassInfo.glassWidth = e.detail.value | 536 | this.glassInfo.glassWidth = e.detail.value |
| 528 | break; | 537 | break; |
| 529 | case 1: | 538 | case 1: |
| 530 | this.glassInfo.norseWidth = e.detail.value | 539 | this.glassInfo.norseWidth = e.detail.value |
| 531 | break; | 540 | break; |
| 532 | case 2: | 541 | case 2: |
| 533 | this.glassInfo.legWidth = e.detail.value | 542 | this.glassInfo.legWidth = e.detail.value |
| 534 | break; | 543 | break; |
| 535 | default: | 544 | default: |
| 536 | break; | 545 | break; |
| 537 | } | 546 | } |
| 538 | }, | 547 | }, |
| 539 | //参数点击事件==》改变对应图片 | 548 | //参数点击事件==》改变对应图片 |
| 540 | cartOnClickItem(index, i,aid) { | 549 | cartOnClickItem(index, i,aid) { |
| 541 | //根据aid拼接skuValue | 550 | //根据aid拼接skuValue |
| 542 | this.skuValueArray[index] = aid | 551 | this.skuValueArray[index] = aid |
| 543 | const sku_value = this.skuValueArray.join('_') | 552 | const sku_value = this.skuValueArray.join('_') |
| 544 | //根据sku_value获取对应的sk_id | 553 | //根据sku_value获取对应的sk_id |
| 545 | const itemSk_id = this.skuList.filter(item=>item.sku_value == sku_value)[0].sk_id | 554 | const itemSk_id = this.skuList.filter(item=>item.sku_value == sku_value)[0].sk_id |
| 546 | //修改sk_id | 555 | //修改sk_id |
| 547 | this.skId = itemSk_id | 556 | this.skId = itemSk_id |
| 548 | if (this.current[index] !== i) { | 557 | if (this.current[index] !== i) { |
| 549 | this.current[index] = i | 558 | this.current[index] = i |
| 550 | } | 559 | } |
| 551 | this.$forceUpdate() | 560 | this.$forceUpdate() |
| 552 | }, | 561 | }, |
| 553 | comfirmChoose(){ | 562 | comfirmChoose(){ |
| 554 | this.checkGlassInfo() | 563 | this.checkGlassInfo() |
| 555 | this.updateMylove() | 564 | if(this.glassInfoRight){ |
| 556 | const price = this.skuList.filter(item=>item.sk_id == this.skId)[0].real_price | 565 | this.updateMylove() |
| 557 | this.$emit("chooseCartModi",this.mp_id,this.skId,price,this.pid,this.count,this.cart_id,this.index)//添加购物车 | 566 | const price = this.skuList.filter(item=>item.sk_id == this.skId)[0].real_price |
| 558 | this.$emit("closeBottom") | 567 | this.$emit("chooseCartModi",this.mp_id,this.skId,price,this.pid,this.count,this.cart_id,this.index)//添加购物车 |
| 568 | this.$emit("closeBottom") | ||
| 569 | } | ||
| 559 | }, | 570 | }, |
| 560 | addCart(){ | 571 | addCart(){ |
| 561 | this.checkGlassInfo() | 572 | this.checkGlassInfo() |
| 562 | this.updateMylove() | 573 | if(this.glassInfoRight){ |
| 563 | const that = this | 574 | this.updateMylove() |
| 564 | const checkedSKUName = [that.goodInfo.attrList[0].meta_name,that.goodInfo.attrList[1].meta_name] | 575 | const that = this |
| 565 | const checkedSKU = [] | 576 | const checkedSKUName = [that.goodInfo.attrList[0].meta_name,that.goodInfo.attrList[1].meta_name] |
| 566 | let j; | 577 | const checkedSKU = [] |
| 567 | for (let i = 0;i<that.current.length;i++) { | 578 | let j; |
| 568 | checkedSKU.push(that.goodInfo.attrList[i].attr[that.current[i]]) | 579 | for (let i = 0;i<that.current.length;i++) { |
| 569 | // console.log('i', i, j, i !== this.current.length - 1) | 580 | checkedSKU.push(that.goodInfo.attrList[i].attr[that.current[i]]) |
| 570 | if (i !== this.current.length - 1) { | 581 | // console.log('i', i, j, i !== this.current.length - 1) |
| 571 | // 后续需修改算法:目前暂定只有两个参数选择,后续若有多个参数需要修改实现自适应 | 582 | if (i !== this.current.length - 1) { |
| 572 | j = this.current[i] * this.attrList[1].attr.length | 583 | // 后续需修改算法:目前暂定只有两个参数选择,后续若有多个参数需要修改实现自适应 |
| 573 | } else { | 584 | j = this.current[i] * this.attrList[1].attr.length |
| 574 | j += this.current[i] | 585 | } else { |
| 575 | } | 586 | j += this.current[i] |
| 587 | } | ||
| 588 | } | ||
| 589 | const price = this.skuList.filter(item=>item.sk_id == this.skuList[j].sk_id)[0].real_price | ||
| 590 | let sk_id = this.skuList[j].sk_id | ||
| 591 | // console.log('选择的商品sk_id',sk_id,'选择的商品参数',checkedSKU) | ||
| 592 | // console.log('mp_id',this.mp_id,'数量',this.count) | ||
| 593 | this.$emit("addCart",this.mp_id,this.count,checkedSKU,sk_id,price)//添加购物车 | ||
| 594 | this.$emit("closeBottom")//关闭弹窗 | ||
| 576 | } | 595 | } |
| 577 | const price = this.skuList.filter(item=>item.sk_id == this.skuList[j].sk_id)[0].real_price | ||
| 578 | let sk_id = this.skuList[j].sk_id | ||
| 579 | // console.log('选择的商品sk_id',sk_id,'选择的商品参数',checkedSKU) | ||
| 580 | // console.log('mp_id',this.mp_id,'数量',this.count) | ||
| 581 | this.$emit("addCart",this.mp_id,this.count,checkedSKU,sk_id,price)//添加购物车 | ||
| 582 | this.$emit("closeBottom")//关闭弹窗 | ||
| 583 | }, | 596 | }, |
| 584 | onClickLoveItem(index,name){ | 597 | onClickLoveItem(index,name){ |
| 585 | const loveList = this.loveList | 598 | const loveList = this.loveList |
| 586 | this.glassInfo.glassWidth = loveList[index].glassWidth | 599 | this.glassInfo.glassWidth = loveList[index].glassWidth |
| 587 | this.glassInfo.norseWidth = loveList[index].norseWidth | 600 | this.glassInfo.norseWidth = loveList[index].norseWidth |
| 588 | this.glassInfo.legWidth = loveList[index].legWidth | 601 | this.glassInfo.legWidth = loveList[index].legWidth |
| 589 | for (let index = 0; index < loveList.length; index++) { | 602 | for (let index = 0; index < loveList.length; index++) { |
| 590 | if (name === loveList[index].name && name!==this.name) { | 603 | if (name === loveList[index].name && name!==this.name) { |
| 591 | this.isDataName = true | 604 | this.isDataName = true |
| 592 | this.kinds = 2 | 605 | this.kinds = 2 |
| 593 | this.name = loveList[index].name | 606 | this.name = loveList[index].name |
| 594 | this.pd = loveList[index].pd | 607 | this.pd = loveList[index].pd |
| 595 | this.mp_id = loveList[index].mp_id | 608 | this.mp_id = loveList[index].mp_id |
| 596 | this.oldname = loveList[index].name | 609 | this.oldname = loveList[index].name |
| 597 | this.oldpd = loveList[index].pd | 610 | this.oldpd = loveList[index].pd |
| 598 | this.pickerInfoList[0].nameArray1.unshift(loveList[index].leftSph) | 611 | this.pickerInfoList[0].nameArray1.unshift(loveList[index].leftSph) |
| 599 | this.pickerInfoList[0].nameArray2.unshift(loveList[index].rightSph) | 612 | this.pickerInfoList[0].nameArray2.unshift(loveList[index].rightSph) |
| 600 | this.pickerInfoList[1].nameArray1.unshift(loveList[index].leftCyl) | 613 | this.pickerInfoList[1].nameArray1.unshift(loveList[index].leftCyl) |
| 601 | this.pickerInfoList[1].nameArray2.unshift(loveList[index].rightCyl) | 614 | this.pickerInfoList[1].nameArray2.unshift(loveList[index].rightCyl) |
| 602 | this.pickerInfoList[2].nameArray1.unshift(loveList[index].leftAxi) | 615 | this.pickerInfoList[2].nameArray1.unshift(loveList[index].leftAxi) |
| 603 | this.pickerInfoList[2].nameArray2.unshift(loveList[index].rightAxi) | 616 | this.pickerInfoList[2].nameArray2.unshift(loveList[index].rightAxi) |
| 604 | this.pickerInfoList[3].nameArray1.unshift(loveList[index].in_time.toString().slice(0, 4)) | 617 | this.pickerInfoList[3].nameArray1.unshift(loveList[index].in_time.toString().slice(0, 4)) |
| 605 | if (loveList[index].in_time.toString().slice(5, 6) === 0) { | 618 | if (loveList[index].in_time.toString().slice(5, 6) === 0) { |
| 606 | this.pickerInfoList[3].nameArray2.unshift(loveList[index].in_time.toString().slice(6, 7)) | 619 | this.pickerInfoList[3].nameArray2.unshift(loveList[index].in_time.toString().slice(6, 7)) |
| 607 | } else { | 620 | } else { |
| 608 | this.pickerInfoList[3].nameArray2.unshift(loveList[index].in_time.toString().slice(5, 7)) | 621 | this.pickerInfoList[3].nameArray2.unshift(loveList[index].in_time.toString().slice(5, 7)) |
| 609 | } | 622 | } |
| 610 | if (loveList[index].in_time.toString().slice(8, 9) === 0) { | 623 | if (loveList[index].in_time.toString().slice(8, 9) === 0) { |
| 611 | this.pickerInfoList[3].nameArray3.unshift(loveList[index].in_time.toString().slice(9, 10)) | 624 | this.pickerInfoList[3].nameArray3.unshift(loveList[index].in_time.toString().slice(9, 10)) |
| 612 | } else { | 625 | } else { |
| 613 | this.pickerInfoList[3].nameArray3.unshift(loveList[index].in_time.toString().slice(8, 10)) | 626 | this.pickerInfoList[3].nameArray3.unshift(loveList[index].in_time.toString().slice(8, 10)) |
| 614 | } | 627 | } |
| 615 | } | 628 | } |
| 616 | } | 629 | } |
| 617 | this.name = name; | 630 | this.name = name; |
| 618 | this.loveCurrent = index; | 631 | this.loveCurrent = index; |
| 619 | }, | 632 | }, |
| 620 | closeSheet(){ | 633 | closeSheet(){ |
| 621 | this.$emit('closeBottom'); | 634 | this.$emit('closeBottom'); |
| 622 | }, | 635 | }, |
| 623 | stopEvent(){ //@click.stop防止事件冒泡 | 636 | stopEvent(){ //@click.stop防止事件冒泡 |
| 624 | 637 | ||
| 625 | }, | 638 | }, |
| 626 | moveHandle(){ //不让页面滚动 | 639 | moveHandle(){ //不让页面滚动 |
| 627 | 640 | ||
| 628 | }, | 641 | }, |
| 629 | // picker相关功能 | 642 | // picker相关功能 |
| 630 | handleInput(e) { | 643 | handleInput(e) { |
| 631 | this.name = e.target.value | 644 | this.name = e.target.value |
| 632 | this.isDataName = false | 645 | this.isDataName = false |
| 633 | const mpList = this.mpList | 646 | const mpList = this.mpList |
| 634 | // console.log('mpList===>', mpList) | 647 | // console.log('mpList===>', mpList) |
| 635 | for (let index = 0; index < mpList.length; index++) { | 648 | for (let index = 0; index < mpList.length; index++) { |
| 636 | if (e.detail.value === mpList[index].name) { | 649 | if (e.detail.value === mpList[index].name) { |
| 637 | this.isDataName = true | 650 | this.isDataName = true |
| 638 | uni.showModal({ | 651 | uni.showModal({ |
| 639 | title: '提示', | 652 | title: '提示', |
| 640 | content: `是否填充已有的"${e.detail.value}"的数据`, | 653 | content: `是否填充已有的"${e.detail.value}"的数据`, |
| 641 | success: (res) => { | 654 | success: (res) => { |
| 642 | if (res.confirm) { | 655 | if (res.confirm) { |
| 643 | this.kinds = 2 | 656 | this.kinds = 2 |
| 644 | // console.log('args===>', index) | 657 | // console.log('args===>', index) |
| 645 | // const mpList=Object.assign({},this.$store.state.mympList.mpList) | 658 | // const mpList=Object.assign({},this.$store.state.mympList.mpList) |
| 646 | this.name = mpList[index].name | 659 | this.name = mpList[index].name |
| 647 | this.pd = mpList[index].pd | 660 | this.pd = mpList[index].pd |
| 648 | this.mp_id = mpList[index].mp_id | 661 | this.mp_id = mpList[index].mp_id |
| 649 | this.oldname = mpList[index].name | 662 | this.oldname = mpList[index].name |
| 650 | this.oldpd = mpList[index].pd | 663 | this.oldpd = mpList[index].pd |
| 651 | // 将kinds =2时的值传到该页面 | 664 | // 将kinds =2时的值传到该页面 |
| 652 | this.pickerInfoList[0].nameArray1.unshift(mpList[index].leftSph) | 665 | this.pickerInfoList[0].nameArray1.unshift(mpList[index].leftSph) |
| 653 | this.pickerInfoList[0].nameArray2.unshift(mpList[index].rightSph) | 666 | this.pickerInfoList[0].nameArray2.unshift(mpList[index].rightSph) |
| 654 | this.pickerInfoList[1].nameArray1.unshift(mpList[index].leftCyl) | 667 | this.pickerInfoList[1].nameArray1.unshift(mpList[index].leftCyl) |
| 655 | this.pickerInfoList[1].nameArray2.unshift(mpList[index].rightCyl) | 668 | this.pickerInfoList[1].nameArray2.unshift(mpList[index].rightCyl) |
| 656 | this.pickerInfoList[2].nameArray1.unshift(mpList[index].leftAxi) | 669 | this.pickerInfoList[2].nameArray1.unshift(mpList[index].leftAxi) |
| 657 | this.pickerInfoList[2].nameArray2.unshift(mpList[index].rightAxi) | 670 | this.pickerInfoList[2].nameArray2.unshift(mpList[index].rightAxi) |
| 658 | this.pickerInfoList[3].nameArray1.unshift(mpList[index].in_time.toString().slice(0, 4)) | 671 | this.pickerInfoList[3].nameArray1.unshift(mpList[index].in_time.toString().slice(0, 4)) |
| 659 | if (mpList[index].in_time.toString().slice(5, 6) === 0) { | 672 | if (mpList[index].in_time.toString().slice(5, 6) === 0) { |
| 660 | this.pickerInfoList[3].nameArray2.unshift(mpList[index].in_time.toString().slice(6, 7)) | 673 | this.pickerInfoList[3].nameArray2.unshift(mpList[index].in_time.toString().slice(6, 7)) |
| 661 | } else { | 674 | } else { |
| 662 | this.pickerInfoList[3].nameArray2.unshift(mpList[index].in_time.toString().slice(5, 7)) | 675 | this.pickerInfoList[3].nameArray2.unshift(mpList[index].in_time.toString().slice(5, 7)) |
| 663 | } | 676 | } |
| 664 | if (mpList[index].in_time.toString().slice(8, 9) === 0) { | 677 | if (mpList[index].in_time.toString().slice(8, 9) === 0) { |
| 665 | this.pickerInfoList[3].nameArray3.unshift(mpList[index].in_time.toString().slice(9, 10)) | 678 | this.pickerInfoList[3].nameArray3.unshift(mpList[index].in_time.toString().slice(9, 10)) |
| 666 | } else { | 679 | } else { |
| 667 | this.pickerInfoList[3].nameArray3.unshift(mpList[index].in_time.toString().slice(8, 10)) | 680 | this.pickerInfoList[3].nameArray3.unshift(mpList[index].in_time.toString().slice(8, 10)) |
| 668 | } | 681 | } |
| 669 | // this.checkedData = mpList[index] | 682 | // this.checkedData = mpList[index] |
| 670 | // console.log('checkedData', this.checkedData) | 683 | // console.log('checkedData', this.checkedData) |
| 671 | } else if (res.cancel) { | 684 | } else if (res.cancel) { |
| 672 | this.kinds = 2 | 685 | this.kinds = 2 |
| 673 | } | 686 | } |
| 674 | }, | 687 | }, |
| 675 | }) | 688 | }) |
| 676 | } | 689 | } |
| 677 | } | 690 | } |
| 678 | }, | 691 | }, |
| 679 | handleInputPd(e) { | 692 | handleInputPd(e) { |
| 680 | // 只能输入正浮点数或正数 | 693 | // 只能输入正浮点数或正数 |
| 681 | if (/^\d+(\.\d+)?$/.test(e.target.value)) { | 694 | if (/^\d+(\.\d+)?$/.test(e.target.value)) { |
| 682 | this.pd = e.target.value | 695 | this.pd = e.target.value |
| 683 | } else { | 696 | } else { |
| 684 | uni.showToast({ | 697 | uni.showToast({ |
| 685 | title: '请输入有效数据;示例:89', | 698 | title: '请输入有效数据;示例:89', |
| 686 | icon: 'none', | 699 | icon: 'none', |
| 687 | duration: 2000, | 700 | duration: 2000, |
| 688 | }) | 701 | }) |
| 689 | this.pd = '' | 702 | this.pd = '' |
| 690 | } | 703 | } |
| 691 | }, | 704 | }, |
| 692 | changeConfirm() { | 705 | // changeConfirm() { |
| 693 | this.confirm = !this.confirm | 706 | // this.confirm = !this.confirm |
| 694 | }, | 707 | // }, |
| 695 | bindPickerChange01: function(e) { | 708 | bindPickerChange01: function(e) { |
| 696 | this.pickerInfoList[0].nameIndex1 = e.target.value | 709 | this.pickerInfoList[0].nameIndex1 = e.target.value |
| 697 | this.pickerInfoChioce.leftSph = this.pickerInfoList[0].nameArray1[e.target.value] | 710 | this.pickerInfoChioce.leftSph = this.pickerInfoList[0].nameArray1[e.target.value] |
| 698 | }, | 711 | }, |
| 699 | bindPickerChange02: function(e) { | 712 | bindPickerChange02: function(e) { |
| 700 | this.pickerInfoList[0].nameIndex2 = e.target.value | 713 | this.pickerInfoList[0].nameIndex2 = e.target.value |
| 701 | this.pickerInfoChioce.rightSph = this.pickerInfoList[0].nameArray2[e.target.value] | 714 | this.pickerInfoChioce.rightSph = this.pickerInfoList[0].nameArray2[e.target.value] |
| 702 | }, | 715 | }, |
| 703 | 716 | ||
| 704 | bindPickerChange11: function(e) { | 717 | bindPickerChange11: function(e) { |
| 705 | this.pickerInfoList[1].nameIndex1 = e.target.value | 718 | this.pickerInfoList[1].nameIndex1 = e.target.value |
| 706 | this.pickerInfoChioce.leftCyl = this.pickerInfoList[1].nameArray1[e.target.value] | 719 | this.pickerInfoChioce.leftCyl = this.pickerInfoList[1].nameArray1[e.target.value] |
| 707 | }, | 720 | }, |
| 708 | bindPickerChange12: function(e) { | 721 | bindPickerChange12: function(e) { |
| 709 | this.pickerInfoList[1].nameIndex2 = e.target.value | 722 | this.pickerInfoList[1].nameIndex2 = e.target.value |
| 710 | this.pickerInfoChioce.rightCyl = this.pickerInfoList[1].nameArray2[e.target.value] | 723 | this.pickerInfoChioce.rightCyl = this.pickerInfoList[1].nameArray2[e.target.value] |
| 711 | }, | 724 | }, |
| 712 | 725 | ||
| 713 | bindPickerChange21: function(e) { | 726 | bindPickerChange21: function(e) { |
| 714 | this.pickerInfoList[2].nameIndex1 = e.target.value | 727 | this.pickerInfoList[2].nameIndex1 = e.target.value |
| 715 | this.pickerInfoChioce.leftAxi = this.pickerInfoList[2].nameArray1[e.target.value] | 728 | this.pickerInfoChioce.leftAxi = this.pickerInfoList[2].nameArray1[e.target.value] |
| 716 | }, | 729 | }, |
| 717 | bindPickerChange22: function(e) { | 730 | bindPickerChange22: function(e) { |
| 718 | this.pickerInfoList[2].nameIndex2 = e.target.value | 731 | this.pickerInfoList[2].nameIndex2 = e.target.value |
| 719 | this.pickerInfoChioce.rightAxi = this.pickerInfoList[2].nameArray2[e.target.value] | 732 | this.pickerInfoChioce.rightAxi = this.pickerInfoList[2].nameArray2[e.target.value] |
| 720 | }, | 733 | }, |
| 721 | 734 | ||
| 722 | bindPickerChange41: function(e) { | 735 | bindPickerChange41: function(e) { |
| 723 | this.pickerInfoList[3].nameIndex1 = e.target.value | 736 | this.pickerInfoList[3].nameIndex1 = e.target.value |
| 724 | this.pickerInfoChioce.time.year = this.pickerInfoList[3].nameArray1[e.target.value] | 737 | this.pickerInfoChioce.time.year = this.pickerInfoList[3].nameArray1[e.target.value] |
| 725 | }, | 738 | }, |
| 726 | bindPickerChange42: function(e) { | 739 | bindPickerChange42: function(e) { |
| 727 | this.pickerInfoList[3].nameIndex2 = e.target.value | 740 | this.pickerInfoList[3].nameIndex2 = e.target.value |
| 728 | this.pickerInfoChioce.time.month = this.pickerInfoList[3].nameArray2[e.target.value] | 741 | this.pickerInfoChioce.time.month = this.pickerInfoList[3].nameArray2[e.target.value] |
| 729 | }, | 742 | }, |
| 730 | bindPickerChange43: function(e) { | 743 | bindPickerChange43: function(e) { |
| 731 | this.pickerInfoList[3].nameIndex3 = e.target.value | 744 | this.pickerInfoList[3].nameIndex3 = e.target.value |
| 732 | this.pickerInfoChioce.time.day = this.pickerInfoList[3].nameArray3[e.target.value] | 745 | this.pickerInfoChioce.time.day = this.pickerInfoList[3].nameArray3[e.target.value] |
| 733 | }, | 746 | }, |
| 734 | changeShow(num) { | 747 | changeShow(num) { |
| 735 | this.show[num] = !this.show[num] | 748 | this.show[num] = !this.show[num] |
| 736 | this.$forceUpdate() | 749 | this.$forceUpdate() |
| 737 | }, | 750 | }, |
| 738 | counter(isadd) { | 751 | counter(isadd) { |
| 739 | if (isadd) { | 752 | if (isadd) { |
| 740 | this.count >= this.maxCount ? this.addDisabled = true : this.count++ | 753 | this.count >= this.maxCount ? this.addDisabled = true : this.count++ |
| 741 | } else { | 754 | } else { |
| 742 | this.count <= 1 ? this.desDisabled = true : this.count-- | 755 | this.count <= 1 ? this.desDisabled = true : this.count-- |
| 743 | } | 756 | } |
| 744 | }, | 757 | }, |
| 745 | toComfirmOrder() { | 758 | toComfirmOrder() { |
| 746 | this.checkGlassInfo() | 759 | this.checkGlassInfo() |
| 747 | this.updateMylove() | 760 | this.updateMylove() |
| 748 | // 先处理验光部分的逻辑,如果ok在跳转 | 761 | // 先处理验光部分的逻辑,如果ok在跳转 |
| 749 | let flag = 0 | 762 | let flag = 0 |
| 750 | if (this.name === '') { | 763 | if (this.name === '') { |
| 751 | uni.showToast({ | 764 | uni.showToast({ |
| 752 | title: '请输入验光单取名', | 765 | title: '请输入验光单取名', |
| 753 | icon: 'none', | 766 | icon: 'none', |
| 754 | duration: 2000, | 767 | duration: 2000, |
| 755 | }) | 768 | }) |
| 756 | } else { | 769 | } else { |
| 757 | if (this.pd === '') { | 770 | if (this.pd === '') { |
| 758 | uni.showToast({ | 771 | uni.showToast({ |
| 759 | title: '请输入瞳距', | 772 | title: '请输入瞳距', |
| 760 | icon: 'none', | 773 | icon: 'none', |
| 761 | duration: 2000, | 774 | duration: 2000, |
| 762 | }) | 775 | }) |
| 763 | } else { | 776 | } else { |
| 764 | if (this.kinds === 1) { | 777 | if (this.kinds === 1) { |
| 765 | // 添加用户验光单 | 778 | // 添加用户验光单 |
| 766 | console.log('kinds====>', this.pickerInfoChioce.leftSph) | ||
| 767 | console.log('kinds====>', this.pickerInfoChioce.leftSph === Number) | ||
| 768 | console.log('kinds====>', this.pickerInfoChioce.rightSph === Number) | ||
| 769 | if (this.pickerInfoChioce.rightSph === '' || this.pickerInfoChioce.leftSph === '' || | 779 | if (this.pickerInfoChioce.rightSph === '' || this.pickerInfoChioce.leftSph === '' || |
| 770 | this.pickerInfoChioce.leftCyl === '' || this.pickerInfoChioce.rightCyl === '' || | 780 | this.pickerInfoChioce.leftCyl === '' || this.pickerInfoChioce.rightCyl === '' || |
| 771 | this.pickerInfoChioce.leftAxi === '' || this.pickerInfoChioce.rightAxi === '' | 781 | this.pickerInfoChioce.leftAxi === '' || this.pickerInfoChioce.rightAxi === '' |
| 772 | ) { | 782 | ) { |
| 773 | uni.showToast({ | 783 | uni.showToast({ |
| 774 | title: '请输入您的验光数据', | 784 | title: '请输入您的验光数据', |
| 775 | icon: 'none', | 785 | icon: 'none', |
| 776 | duration: 2000, | 786 | duration: 2000, |
| 777 | }) | 787 | }) |
| 778 | } else { | 788 | } else { |
| 779 | if (this.confirm) { | 789 | // if (this.confirm) { |
| 780 | store.dispatch('myLoveList/addMylove', { | 790 | store.dispatch('myLoveList/addMylove', { |
| 781 | uid: this.$store.state.user.userInfo.uid, | 791 | uid: this.$store.state.user.userInfo.uid, |
| 782 | openid: this.$store.state.user.userInfo.openid, | 792 | openid: this.$store.state.user.userInfo.openid, |
| 783 | // mp_name: this.$store.state.user.userInfo.mp_name, | 793 | // mp_name: this.$store.state.user.userInfo.mp_name, |
| 784 | leftSph: this.pickerInfoChioce.leftSph, | 794 | leftSph: this.pickerInfoChioce.leftSph, |
| 785 | rightSph: this.pickerInfoChioce.rightSph, | 795 | rightSph: this.pickerInfoChioce.rightSph, |
| 786 | leftCyl: this.pickerInfoChioce.leftCyl, | 796 | leftCyl: this.pickerInfoChioce.leftCyl, |
| 787 | rightCyl: this.pickerInfoChioce.rightCyl, | 797 | rightCyl: this.pickerInfoChioce.rightCyl, |
| 788 | leftAxi: this.pickerInfoChioce.leftAxi, | 798 | leftAxi: this.pickerInfoChioce.leftAxi, |
| 789 | rightAxi: this.pickerInfoChioce.rightAxi, | 799 | rightAxi: this.pickerInfoChioce.rightAxi, |
| 790 | pd: this.pd, // 瞳距 | 800 | pd: this.pd, // 瞳距 |
| 791 | mp_name: this.name, | 801 | mp_name: this.name, |
| 792 | // time: this.pickerInfoChioce.time, | 802 | // time: this.pickerInfoChioce.time, |
| 793 | // img_url2: "http://localhost:8087/images/shop_1/1/", | 803 | // img_url2: "http://localhost:8087/images/shop_1/1/", |
| 794 | }).then(({ mp_id: mpId }) => { | 804 | }).then(({ mp_id: mpId }) => { |
| 795 | this.mp_id = mpId | 805 | this.mp_id = mpId |
| 796 | }) | 806 | }) |
| 797 | flag = 1 | 807 | flag = 1 |
| 798 | } else { | ||
| 799 | uni.showToast({ | ||
| 800 | title: '请确认您的验光数据', | ||
| 801 | icon: 'none', | ||
| 802 | duration: 3000, | ||
| 803 | }) | ||
| 804 | } | ||
| 805 | } | 808 | } |
| 806 | } | 809 | } |
| 807 | if (this.kinds === 2) { | 810 | if (this.kinds === 2) { |
| 808 | if (this.confirm) { | 811 | // if (this.confirm) { |
| 809 | const leftList = ['leftSph', 'leftCyl', 'leftAxi'] | 812 | const leftList = ['leftSph', 'leftCyl', 'leftAxi'] |
| 810 | const rightList = ['rightSph', 'rightCyl', 'rightAxi'] | 813 | const rightList = ['rightSph', 'rightCyl', 'rightAxi'] |
| 811 | // let flag=0; | 814 | // let flag=0; |
| 812 | if (this.name !== this.oldname) { | 815 | if (this.name !== this.oldname) { |
| 813 | store.dispatch('myLoveList/updateMylove', { | 816 | store.dispatch('myLoveList/updateMylove', { |
| 814 | uid: this.$store.state.user.userInfo.uid, | 817 | uid: this.$store.state.user.userInfo.uid, |
| 815 | openid: this.$store.state.user.userInfo.openid, | 818 | openid: this.$store.state.user.userInfo.openid, |
| 816 | mp_id: this.mp_id, | 819 | mp_id: this.mp_id, |
| 817 | keyname: 'name', | 820 | keyname: 'name', |
| 818 | keyvalue: this.name, | 821 | keyvalue: this.name, |
| 819 | }) | 822 | }) |
| 820 | flag = 1 | 823 | flag = 1 |
| 821 | } | 824 | } |
| 822 | if (this.pd !== this.oldpd) { | 825 | if (this.pd !== this.oldpd) { |
| 823 | store.dispatch('myLoveList/updateMylove', { | 826 | store.dispatch('myLoveList/updateMylove', { |
| 824 | uid: this.$store.state.user.userInfo.uid, | 827 | uid: this.$store.state.user.userInfo.uid, |
| 825 | openid: this.$store.state.user.userInfo.openid, | 828 | openid: this.$store.state.user.userInfo.openid, |
| 826 | mp_id: this.mp_id, | 829 | mp_id: this.mp_id, |
| 827 | keyname: 'pd', | 830 | keyname: 'pd', |
| 828 | keyvalue: this.pd, | 831 | keyvalue: this.pd, |
| 829 | }) | 832 | }) |
| 830 | flag = 1 | 833 | flag = 1 |
| 831 | } | 834 | } |
| 832 | // 先验证是否输入有无空 | 835 | // 先验证是否输入有无空 |
| 833 | let q = true | 836 | let q = true |
| 834 | for (let k = 0; k < 3; k++) { | 837 | for (let k = 0; k < 3; k++) { |
| 835 | q = q && (this.pickerInfoList[k].nameArray1[this.pickerInfoList[k].nameIndex1] !== '' && | 838 | q = q && (this.pickerInfoList[k].nameArray1[this.pickerInfoList[k].nameIndex1] !== '' && |
| 836 | this.pickerInfoList[k].nameArray2[this.pickerInfoList[k].nameIndex2] !== '') | 839 | this.pickerInfoList[k].nameArray2[this.pickerInfoList[k].nameIndex2] !== '') |
| 837 | } | 840 | } |
| 838 | if (q) { | 841 | if (q) { |
| 839 | for (let j = 0; j < 3; j++) { | 842 | for (let j = 0; j < 3; j++) { |
| 840 | if (this.pickerInfoList[j].nameIndex1 !== 0) { | 843 | if (this.pickerInfoList[j].nameIndex1 !== 0) { |
| 841 | store.dispatch('myLoveList/updateMylove', { | 844 | store.dispatch('myLoveList/updateMylove', { |
| 842 | uid: this.$store.state.user.userInfo.uid, | 845 | uid: this.$store.state.user.userInfo.uid, |
| 843 | openid: this.$store.state.user.userInfo.openid, | 846 | openid: this.$store.state.user.userInfo.openid, |
| 844 | mp_id: this.mp_id, | 847 | mp_id: this.mp_id, |
| 845 | keyname: leftList[j], | 848 | keyname: leftList[j], |
| 846 | keyvalue: this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1], | 849 | keyvalue: this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1], |
| 847 | }) | 850 | }) |
| 848 | } | 851 | } |
| 849 | if (this.pickerInfoList[j].nameIndex2 !== 0) { | 852 | if (this.pickerInfoList[j].nameIndex2 !== 0) { |
| 850 | store.dispatch('myLoveList/updateMylove', { | 853 | store.dispatch('myLoveList/updateMylove', { |
| 851 | uid: this.$store.state.user.userInfo.uid, | 854 | uid: this.$store.state.user.userInfo.uid, |
| 852 | openid: this.$store.state.user.userInfo.openid, | 855 | openid: this.$store.state.user.userInfo.openid, |
| 853 | mp_id: this.mp_id, | 856 | mp_id: this.mp_id, |
| 854 | keyname: rightList[j], | 857 | keyname: rightList[j], |
| 855 | keyvalue: this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2], | 858 | keyvalue: this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2], |
| 856 | }) | 859 | }) |
| 857 | } | 860 | } |
| 858 | flag = 1 | 861 | flag = 1 |
| 859 | } | 862 | } |
| 860 | } else { | 863 | } else { |
| 861 | flag = 0 | 864 | flag = 0 |
| 862 | uni.showToast({ | 865 | uni.showToast({ |
| 863 | title: '请输入您的验光数据', | 866 | title: '请输入您的验光数据', |
| 864 | icon: 'none', | 867 | icon: 'none', |
| 865 | duration: 2000, | 868 | duration: 2000, |
| 866 | }) | 869 | }) |
| 867 | } | 870 | } |
| 868 | if (flag !== 0) { | 871 | |
| 869 | store.dispatch('myLoveList/getLoveList', { | 872 | // } else { |
| 870 | uid: this.$store.state.user.userInfo.uid, | 873 | // uni.showToast({ |
| 871 | }) | 874 | // title: '请确认您的验光数据', |
| 872 | } | 875 | // icon: 'none', |
| 873 | } else { | 876 | // duration: 3000, |
| 874 | uni.showToast({ | 877 | // }) |
| 875 | title: '请确认您的验光数据', | 878 | // } |
| 876 | icon: 'none', | ||
| 877 | duration: 3000, | ||
| 878 | }) | ||
| 879 | } | ||
| 880 | } | 879 | } |
| 881 | } | 880 | } |
| 882 | } | 881 | } |
| 883 | if (flag !== 0) { | 882 | if (flag !== 0) { |
| 884 | // 如果数据验证无误,那么更新验光单的数据 | 883 | // 如果数据验证无误,那么更新验光单的数据 |
| 885 | store.dispatch('myLoveList/getLoveList', { | 884 | store.dispatch('myLoveList/getLoveList', { |
| 886 | uid: this.$store.state.user.userInfo.uid, | 885 | uid: this.$store.state.user.userInfo.uid, |
| 887 | }) | 886 | }) |
| 888 | let i = 0 | 887 | let i = 0 |
| 889 | // 判断出是哪一个sku被选中 | 888 | // 判断出是哪一个sku被选中 |
| 890 | for (let index = 0; index < this.current.length; index++) { | 889 | for (let index = 0; index < this.current.length; index++) { |
| 891 | // console.log('index', index, i, index !== this.current.length - 1) | 890 | // console.log('index', index, i, index !== this.current.length - 1) |
| 892 | if (index !== this.current.length - 1) { | 891 | if (index !== this.current.length - 1) { |
| 893 | // 后续需修改算法:目前暂定只有两个参数选择,后续若有多个参数需要修改实现自适应 | 892 | // 后续需修改算法:目前暂定只有两个参数选择,后续若有多个参数需要修改实现自适应 |
| 894 | i = this.current[index] * this.attrList[1].attr.length | 893 | i = this.current[index] * this.attrList[1].attr.length |
| 895 | } else { | 894 | } else { |
| 896 | i += this.current[index] | 895 | i += this.current[index] |
| 897 | } | 896 | } |
| 898 | } | 897 | } |
| 899 | // 判断是否其输入的人员数据是否已存在 | 898 | // 判断是否其输入的人员数据是否已存在 |
| 900 | store.dispatch('order/saveParams', { | 899 | store.dispatch('order/saveParams', { |
| 901 | sk_id_arr: this.skuList[i], | 900 | sk_id_arr: this.skuList[i], |
| 902 | current: this.current, | 901 | current: this.current, |
| 903 | mp_id: this.mp_id, | 902 | mp_id: this.mp_id, |
| 904 | attrList: this.attrList, | 903 | attrList: this.attrList, |
| 905 | }) | 904 | }) |
| 906 | this.$store.state.cart.buyItem = this.skuItem | 905 | this.$store.state.cart.buyItem = this.skuItem |
| 907 | // 跳转到确认订单页面 | 906 | // 跳转到确认订单页面 |
| 908 | uni.navigateTo({ | 907 | uni.navigateTo({ |
| 909 | url: `../confirmOrder/confirmOrder?pid=${this.pid}&count=${this.count}&name=${this.name}&isCart=false`, | 908 | url: `../confirmOrder/confirmOrder?pid=${this.pid}&count=${this.count}&name=${this.name}&isCart=false`, |
| 910 | }) | 909 | }) |
| 911 | } | 910 | } |
| 912 | }, | 911 | }, |
| 913 | } | 912 | } |
| 914 | } | 913 | } |
| 915 | </script> | 914 | </script> |
| 916 | 915 | ||
| 917 | <style lang="scss"> | 916 | <style lang="scss"> |
| 918 | .BottomSheetContent { | 917 | .BottomSheetContent { |
| 919 | min-height: 100vh; | 918 | min-height: 100vh; |
| 920 | background-color: #f2f2f2; | 919 | background-color: #f2f2f2; |
| 921 | // padding-top: 20rpx; | 920 | // padding-top: 20rpx; |
| 922 | .goodInfo { | 921 | .goodInfo { |
| 923 | width: 100%; | 922 | width: 100%; |
| 924 | height: 272rpx; | 923 | height: 272rpx; |
| 925 | border-radius: 16rpx; | 924 | border-radius: 16rpx; |
| 926 | background-color: #ffffff; | 925 | background-color: #ffffff; |
| 927 | box-sizing: border-box; | 926 | box-sizing: border-box; |
| 928 | padding: 36rpx; | 927 | padding: 36rpx; |
| 929 | display: flex; | 928 | display: flex; |
| 930 | flex-direction: row; | 929 | flex-direction: row; |
| 931 | justify-content: flex-start; | 930 | justify-content: flex-start; |
| 932 | position: sticky; | 931 | position: sticky; |
| 933 | top: 0rpx; | 932 | top: 0rpx; |
| 934 | left: 0rpx; | 933 | left: 0rpx; |
| 935 | z-index: 99999; | 934 | z-index: 99999; |
| 936 | .imageWrap { | 935 | .imageWrap { |
| 937 | height: 188rpx; | 936 | height: 188rpx; |
| 938 | width: 188rpx; | 937 | width: 188rpx; |
| 939 | margin-right: 28rpx; | 938 | margin-right: 28rpx; |
| 940 | image { | 939 | image { |
| 941 | height: 188rpx; | 940 | height: 188rpx; |
| 942 | width: 188rpx; | 941 | width: 188rpx; |
| 943 | } | 942 | } |
| 944 | } | 943 | } |
| 945 | .infoRight { | 944 | .infoRight { |
| 946 | display: flex; | 945 | display: flex; |
| 947 | flex-direction: column; | 946 | flex-direction: column; |
| 948 | align-items: flex-start; | 947 | align-items: flex-start; |
| 949 | justify-content: space-between; | 948 | justify-content: space-between; |
| 950 | width: 100%; | 949 | width: 100%; |
| 951 | .goodName { | 950 | .goodName { |
| 952 | font-size: 28rpx; | 951 | font-size: 28rpx; |
| 953 | color: #333333; | 952 | color: #333333; |
| 954 | } | 953 | } |
| 955 | .remarks { | 954 | .remarks { |
| 956 | font-size: 20rpx; | 955 | font-size: 20rpx; |
| 957 | color: #999999; | 956 | color: #999999; |
| 958 | } | 957 | } |
| 959 | .priceBox { | 958 | .priceBox { |
| 960 | display: flex; | 959 | display: flex; |
| 961 | justify-content: space-between; | 960 | justify-content: space-between; |
| 962 | align-items: center; | 961 | align-items: center; |
| 963 | width: 100%; | 962 | width: 100%; |
| 964 | font-size: 14px; | 963 | font-size: 14px; |
| 965 | color: #999999; | 964 | color: #999999; |
| 966 | .price { | 965 | .price { |
| 967 | color: #ff6b4a; | 966 | color: #ff6b4a; |
| 968 | font-size: 28rpx; | 967 | font-size: 28rpx; |
| 969 | } | 968 | } |
| 970 | .counter { | 969 | .counter { |
| 971 | display: flex; | 970 | display: flex; |
| 972 | flex-direction: row; | 971 | flex-direction: row; |
| 973 | justify-content: space-between; | 972 | justify-content: space-between; |
| 974 | align-items: center; | 973 | align-items: center; |
| 975 | font-size: 28rpx; | 974 | font-size: 28rpx; |
| 976 | color: #333333; | 975 | color: #333333; |
| 977 | width: 122rpx; | 976 | width: 122rpx; |
| 978 | .btn { | 977 | .btn { |
| 979 | display: flex; | 978 | display: flex; |
| 980 | justify-content: center; | 979 | justify-content: center; |
| 981 | line-height: 32rpx; | 980 | line-height: 32rpx; |
| 982 | height: 32rpx; | 981 | height: 32rpx; |
| 983 | width: 32rpx; | 982 | width: 32rpx; |
| 984 | background-color: #f2f2f2; | 983 | background-color: #f2f2f2; |
| 985 | color: #cfcfcf; | 984 | color: #cfcfcf; |
| 986 | } | 985 | } |
| 987 | } | 986 | } |
| 988 | } | 987 | } |
| 989 | } | 988 | } |
| 990 | } | 989 | } |
| 991 | .peopleChoose{ | 990 | .peopleChoose{ |
| 992 | width: 100%; | 991 | width: 100%; |
| 993 | min-height: 200rpx; | 992 | min-height: 200rpx; |
| 994 | border-radius: 16rpx; | 993 | border-radius: 16rpx; |
| 995 | background-color: #ffffff; | 994 | background-color: #ffffff; |
| 996 | box-sizing: border-box; | 995 | box-sizing: border-box; |
| 997 | padding: 36rpx; | 996 | padding: 36rpx; |
| 998 | margin: 10px 0; | 997 | margin: 10px 0; |
| 999 | display: flex; | 998 | display: flex; |
| 1000 | flex-direction: column; | 999 | flex-direction: column; |
| 1001 | justify-content: flex-start; | 1000 | justify-content: flex-start; |
| 1002 | align-items: center; | 1001 | align-items: center; |
| 1003 | .title{ | 1002 | .title{ |
| 1004 | font-size: 16px; | 1003 | font-size: 16px; |
| 1005 | color: #333333; | 1004 | color: #333333; |
| 1006 | letter-spacing: -0.3px; | 1005 | letter-spacing: -0.3px; |
| 1007 | text-align: justify; | 1006 | text-align: justify; |
| 1008 | line-height: 24px; | 1007 | line-height: 24px; |
| 1009 | margin: 4px 0; | 1008 | margin: 4px 0; |
| 1010 | } | 1009 | } |
| 1011 | .loveList{ | 1010 | .loveList{ |
| 1012 | display: flex; | 1011 | display: flex; |
| 1013 | flex-direction: row; | 1012 | flex-direction: row; |
| 1014 | flex-wrap: wrap; | 1013 | flex-wrap: wrap; |
| 1015 | justify-content: flex-start; | 1014 | justify-content: flex-start; |
| 1016 | align-items: center; | 1015 | align-items: center; |
| 1017 | padding-top: 24rpx; | 1016 | padding-top: 24rpx; |
| 1018 | width: 100%; | 1017 | width: 100%; |
| 1019 | .peopleName { | 1018 | .peopleName { |
| 1020 | padding: 0 30rpx; | 1019 | padding: 0 30rpx; |
| 1021 | height: 60rpx; | 1020 | height: 60rpx; |
| 1022 | margin: 0 20rpx 20rpx 0; | 1021 | margin: 0 20rpx 20rpx 0; |
| 1023 | transition: all 0.3s; | 1022 | transition: all 0.3s; |
| 1024 | background: #f2f2f2; | 1023 | background: #f2f2f2; |
| 1025 | border-radius: 2px; | 1024 | border-radius: 2px; |
| 1026 | border-radius: 2px; | 1025 | border-radius: 2px; |
| 1027 | line-height: 60rpx; | 1026 | line-height: 60rpx; |
| 1028 | text-align: center; | 1027 | text-align: center; |
| 1029 | color: #666666; | 1028 | color: #666666; |
| 1030 | font-size: 12px; | 1029 | font-size: 12px; |
| 1031 | } | 1030 | } |
| 1032 | .active2 { | 1031 | .active2 { |
| 1033 | background: rgba(255, 107, 74, 0.15); | 1032 | background: rgba(255, 107, 74, 0.15); |
| 1034 | color: #ff6b4a; | 1033 | color: #ff6b4a; |
| 1035 | } | 1034 | } |
| 1036 | } | 1035 | } |
| 1037 | } | 1036 | } |
| 1038 | .goods-data { | 1037 | .goods-data { |
| 1039 | width: 100%; | 1038 | width: 100%; |
| 1040 | box-sizing: border-box; | 1039 | box-sizing: border-box; |
| 1041 | padding: 37rpx 40rpx 0 40rpx; | 1040 | padding: 37rpx 40rpx 0 40rpx; |
| 1042 | background: #ffffff; | 1041 | background: #ffffff; |
| 1043 | border-radius: 12rpx; | 1042 | border-radius: 12rpx; |
| 1044 | .opCollapse { | 1043 | .opCollapse { |
| 1045 | width: 100%; | 1044 | width: 100%; |
| 1046 | padding-bottom: 28rpx; | 1045 | padding-bottom: 28rpx; |
| 1047 | margin-top: 7px; | 1046 | margin-top: 7px; |
| 1048 | border-bottom: 1px solid #e9e9e9; | 1047 | border-bottom: 1px solid #e9e9e9; |
| 1049 | .head { | 1048 | .head { |
| 1050 | display: flex; | 1049 | display: flex; |
| 1051 | justify-content: space-between; | 1050 | justify-content: space-between; |
| 1052 | height: 24px; | 1051 | height: 24px; |
| 1053 | // font-family: PingFangSC-Medium; | 1052 | // font-family: PingFangSC-Medium; |
| 1054 | font-size: 16px; | 1053 | font-size: 16px; |
| 1055 | color: #333333; | 1054 | color: #333333; |
| 1056 | letter-spacing: -0.3px; | 1055 | letter-spacing: -0.3px; |
| 1057 | text-align: justify; | 1056 | text-align: justify; |
| 1058 | line-height: 24px; | 1057 | line-height: 24px; |
| 1059 | margin-bottom: 18rpx; | 1058 | margin-bottom: 18rpx; |
| 1060 | .headRighted { | 1059 | .headRighted { |
| 1061 | width: 0; | 1060 | width: 0; |
| 1062 | height: 0; | 1061 | height: 0; |
| 1063 | border-left: 4px solid transparent; | 1062 | border-left: 4px solid transparent; |
| 1064 | border-right: 4px solid transparent; | 1063 | border-right: 4px solid transparent; |
| 1065 | border-bottom: 4px solid #cfcfcf; | 1064 | border-bottom: 4px solid #cfcfcf; |
| 1066 | transform: scaleY(-1); | 1065 | transform: scaleY(-1); |
| 1067 | margin-top: 10px; | 1066 | margin-top: 10px; |
| 1068 | } | 1067 | } |
| 1069 | .headMid { | 1068 | .headMid { |
| 1070 | font-size: 10px; | 1069 | font-size: 10px; |
| 1071 | color: #999999; | 1070 | color: #999999; |
| 1072 | letter-spacing: -0.19px; | 1071 | letter-spacing: -0.19px; |
| 1073 | margin-left: -120rpx; | 1072 | margin-left: -120rpx; |
| 1074 | } | 1073 | } |
| 1075 | .headRight { | 1074 | .headRight { |
| 1076 | width: 0; | 1075 | width: 0; |
| 1077 | height: 0; | 1076 | height: 0; |
| 1078 | border-left: 4px solid transparent; | 1077 | border-left: 4px solid transparent; |
| 1079 | border-right: 4px solid transparent; | 1078 | border-right: 4px solid transparent; |
| 1080 | border-bottom: 4px solid #cfcfcf; | 1079 | border-bottom: 4px solid #cfcfcf; |
| 1081 | margin-top: 10px; | 1080 | margin-top: 10px; |
| 1082 | } | 1081 | } |
| 1083 | } | 1082 | } |
| 1084 | .body { | 1083 | .body { |
| 1085 | font-size: 12px; | 1084 | font-size: 12px; |
| 1086 | color: #666666; | 1085 | color: #666666; |
| 1087 | letter-spacing: 0; | 1086 | letter-spacing: 0; |
| 1088 | .bodyBox { | 1087 | .bodyBox { |
| 1089 | margin-top: 15px; | 1088 | margin-top: 15px; |
| 1090 | .names { | 1089 | .names { |
| 1091 | font-size: 12px; | 1090 | font-size: 12px; |
| 1092 | color: #151515; | 1091 | color: #151515; |
| 1093 | letter-spacing: 0; | 1092 | letter-spacing: 0; |
| 1094 | text-align: justify; | 1093 | text-align: justify; |
| 1095 | line-height: 17px; | 1094 | line-height: 17px; |
| 1096 | margin-left: 5px; | 1095 | margin-left: 5px; |
| 1097 | margin-right: 10px; | 1096 | margin-right: 10px; |
| 1098 | } | 1097 | } |
| 1099 | text { | 1098 | text { |
| 1100 | font-size: 12px; | 1099 | font-size: 12px; |
| 1101 | color: #666666; | 1100 | color: #666666; |
| 1102 | letter-spacing: 0; | 1101 | letter-spacing: 0; |
| 1103 | text-align: justify; | 1102 | text-align: justify; |
| 1104 | } | 1103 | } |
| 1105 | } | 1104 | } |
| 1106 | } | 1105 | } |
| 1107 | .goods-form { | 1106 | .goods-form { |
| 1108 | display: flex; | 1107 | display: flex; |
| 1109 | flex-direction: column; | 1108 | flex-direction: column; |
| 1110 | align-items: center; | 1109 | align-items: center; |
| 1111 | justify-content: center; | 1110 | justify-content: center; |
| 1112 | background-color: #fff; | 1111 | background-color: #fff; |
| 1113 | width: 100%; | 1112 | width: 100%; |
| 1114 | padding: 40rpx 0; | 1113 | padding: 40rpx 0; |
| 1115 | .p1 { | 1114 | .p1 { |
| 1116 | font-size: 16px; | 1115 | font-size: 16px; |
| 1117 | color: #333333; | 1116 | color: #333333; |
| 1118 | letter-spacing: -0.3px; | 1117 | letter-spacing: -0.3px; |
| 1119 | text-align: justify; | 1118 | text-align: justify; |
| 1120 | line-height: 24px; | 1119 | line-height: 24px; |
| 1121 | margin: 4px 0; | 1120 | margin: 4px 0; |
| 1122 | 1121 | ||
| 1123 | } | 1122 | } |
| 1124 | .p2 { | 1123 | .p2 { |
| 1125 | font-size: 12px; | 1124 | font-size: 12px; |
| 1126 | color: #999999; | 1125 | color: #999999; |
| 1127 | letter-spacing: -0.23px; | 1126 | letter-spacing: -0.23px; |
| 1128 | margin-bottom: 32rpx; | 1127 | margin-bottom: 32rpx; |
| 1129 | } | 1128 | } |
| 1130 | .image2{ | 1129 | .image2{ |
| 1131 | width: 42rpx; | 1130 | width: 42rpx; |
| 1132 | height: 34rpx; | 1131 | height: 34rpx; |
| 1133 | margin-right: 12rpx; | 1132 | margin-right: 12rpx; |
| 1134 | } | 1133 | } |
| 1135 | .confirm { | 1134 | .confirm { |
| 1136 | display: flex; | 1135 | display: flex; |
| 1137 | align-items: center; | 1136 | align-items: center; |
| 1138 | font-size: 12px; | 1137 | font-size: 12px; |
| 1139 | color: #666666; | 1138 | color: #666666; |
| 1140 | letter-spacing: -0.23px; | 1139 | letter-spacing: -0.23px; |
| 1141 | width: 684rpx; | 1140 | width: 684rpx; |
| 1142 | .image1{ | 1141 | .image1{ |
| 1143 | margin-right:25rpx; | 1142 | margin-right:25rpx; |
| 1144 | width: 42rpx; | 1143 | width: 42rpx; |
| 1145 | height: 38rpx; | 1144 | height: 38rpx; |
| 1146 | } | 1145 | } |
| 1147 | } | 1146 | } |
| 1148 | .picker{ | 1147 | .picker{ |
| 1149 | display: flex; | 1148 | display: flex; |
| 1150 | flex-direction: column; | 1149 | flex-direction: column; |
| 1151 | justify-content: center; | 1150 | justify-content: center; |
| 1152 | align-items: center; | 1151 | align-items: center; |
| 1153 | width: 100%; | 1152 | width: 100%; |
| 1154 | 1153 | ||
| 1155 | .picker-choice{ | 1154 | .picker-choice{ |
| 1156 | display: flex; | 1155 | display: flex; |
| 1157 | width: 684rpx; | 1156 | width: 684rpx; |
| 1158 | align-items: center; | 1157 | align-items: center; |
| 1159 | margin-bottom: 40rpx; | 1158 | margin-bottom: 40rpx; |
| 1160 | .input{ | 1159 | .input{ |
| 1161 | border-bottom: 1px solid #CFCFCF; | 1160 | border-bottom: 1px solid #CFCFCF; |
| 1162 | height: 40rpx; | 1161 | height: 40rpx; |
| 1163 | } | 1162 | } |
| 1164 | .choice-left{ | 1163 | .choice-left{ |
| 1165 | width: 210rpx; | 1164 | width: 210rpx; |
| 1166 | .pd{ | 1165 | .pd{ |
| 1167 | font-size: 14px; | 1166 | font-size: 14px; |
| 1168 | color: #333333; | 1167 | color: #333333; |
| 1169 | letter-spacing: -0.26px; | 1168 | letter-spacing: -0.26px; |
| 1170 | text-align: justify; | 1169 | text-align: justify; |
| 1171 | line-height: 24px; | 1170 | line-height: 24px; |
| 1172 | margin-right: 44rpx; | 1171 | margin-right: 44rpx; |
| 1173 | } | 1172 | } |
| 1174 | .p11 { | 1173 | .p11 { |
| 1175 | font-size: 14px; | 1174 | font-size: 14px; |
| 1176 | color: #333333; | 1175 | color: #333333; |
| 1177 | letter-spacing: -0.26px; | 1176 | letter-spacing: -0.26px; |
| 1178 | text-align: justify; | 1177 | text-align: justify; |
| 1179 | line-height: 24px; | 1178 | line-height: 24px; |
| 1180 | // margin-right: 10px; | 1179 | // margin-right: 10px; |
| 1181 | } | 1180 | } |
| 1182 | .p12 { | 1181 | .p12 { |
| 1183 | font-size: 10px; | 1182 | font-size: 10px; |
| 1184 | color: #3F3F3F; | 1183 | color: #3F3F3F; |
| 1185 | letter-spacing: -0.19px; | 1184 | letter-spacing: -0.19px; |
| 1186 | text-align: justify; | 1185 | text-align: justify; |
| 1187 | line-height: 24px; | 1186 | line-height: 24px; |
| 1188 | } | 1187 | } |
| 1189 | 1188 | ||
| 1190 | } | 1189 | } |
| 1191 | .p13 { | 1190 | .p13 { |
| 1192 | font-size: 10px; | 1191 | font-size: 10px; |
| 1193 | color: #999999; | 1192 | color: #999999; |
| 1194 | letter-spacing: -0.19px; | 1193 | letter-spacing: -0.19px; |
| 1195 | margin-right: 10px; | 1194 | margin-right: 10px; |
| 1196 | } | 1195 | } |
| 1197 | .p13-date { | 1196 | .p13-date { |
| 1198 | font-size: 10px; | 1197 | font-size: 10px; |
| 1199 | color: #999999; | 1198 | color: #999999; |
| 1200 | letter-spacing: -0.19px; | 1199 | letter-spacing: -0.19px; |
| 1201 | margin-right: 5px; | 1200 | margin-right: 5px; |
| 1202 | } | 1201 | } |
| 1203 | picker{ | 1202 | picker{ |
| 1204 | width: 144rpx; | 1203 | width: 144rpx; |
| 1205 | height: 40rpx; | 1204 | height: 40rpx; |
| 1206 | display: flex; | 1205 | display: flex; |
| 1207 | position: relative; | 1206 | position: relative; |
| 1208 | .p14 { | 1207 | .p14 { |
| 1209 | font-size: 14px; | 1208 | font-size: 14px; |
| 1210 | color: #666666; | 1209 | color: #666666; |
| 1211 | letter-spacing: -0.26px; | 1210 | letter-spacing: -0.26px; |
| 1212 | text-align: center; | 1211 | text-align: center; |
| 1213 | width: 124rpx; | 1212 | width: 124rpx; |
| 1214 | border-bottom: 1px solid #CFCFCF; | 1213 | border-bottom: 1px solid #CFCFCF; |
| 1215 | height: 38rpx; | 1214 | height: 38rpx; |
| 1216 | } | 1215 | } |
| 1217 | image{ | 1216 | image{ |
| 1218 | width: 20rpx; | 1217 | width: 20rpx; |
| 1219 | height: 20rpx; | 1218 | height: 20rpx; |
| 1220 | position: absolute; | 1219 | position: absolute; |
| 1221 | right: 20rpx; | 1220 | right: 20rpx; |
| 1222 | top: 8rpx; | 1221 | top: 8rpx; |
| 1223 | } | 1222 | } |
| 1224 | } | 1223 | } |
| 1225 | 1224 | ||
| 1226 | } | 1225 | } |
| 1227 | } | 1226 | } |
| 1228 | 1227 | ||
| 1229 | .ipts{ | 1228 | .ipts{ |
| 1230 | width: 100%; | 1229 | width: 100%; |
| 1231 | display: flex; | 1230 | display: flex; |
| 1232 | flex-direction: column; | 1231 | flex-direction: column; |
| 1233 | justify-content: center; | 1232 | justify-content: center; |
| 1234 | align-items: flex-start; | 1233 | align-items: flex-start; |
| 1235 | // padding: 20rpx 36rpx; | 1234 | // padding: 20rpx 36rpx; |
| 1236 | box-sizing: border-box; | 1235 | box-sizing: border-box; |
| 1237 | .inputItem{ | 1236 | .inputItem{ |
| 1238 | display: flex; | 1237 | display: flex; |
| 1239 | flex-direction: row; | 1238 | flex-direction: row; |
| 1240 | justify-content: center; | 1239 | justify-content: center; |
| 1241 | align-items: center; | 1240 | align-items: center; |
| 1242 | margin-bottom: 36rpx; | 1241 | margin-bottom: 36rpx; |
| 1243 | .text{ | 1242 | .text{ |
| 1244 | margin-right: 100rpx; | 1243 | margin-right: 100rpx; |
| 1245 | } | 1244 | } |
| 1246 | .input{ | 1245 | .input{ |
| 1247 | border-bottom: 1px solid #CFCFCF; | 1246 | border-bottom: 1px solid #CFCFCF; |
| 1248 | } | 1247 | } |
| 1249 | } | 1248 | } |
| 1250 | 1249 | ||
| 1251 | } | 1250 | } |
| 1252 | } | 1251 | } |
| 1253 | } | 1252 | } |
| 1254 | } | 1253 | } |
| 1255 | .choose { | 1254 | .choose { |
| 1256 | width: 100%; | 1255 | width: 100%; |
| 1257 | background: #ffffff; | 1256 | background: #ffffff; |
| 1258 | border-radius: 12rpx; | 1257 | border-radius: 12rpx; |
| 1259 | margin-top: 20rpx; | 1258 | margin-top: 20rpx; |
| 1260 | padding: 40rpx 40rpx 112rpx 40rpx; | 1259 | padding: 40rpx 40rpx 112rpx 40rpx; |
| 1261 | box-sizing: border-box; | 1260 | box-sizing: border-box; |
| 1262 | .chooseItem { | 1261 | .chooseItem { |
| 1263 | width: 100%; | 1262 | width: 100%; |
| 1264 | padding-bottom: 32rpx; | 1263 | padding-bottom: 32rpx; |
| 1265 | border-bottom: 1px solid #e9e9e9; | 1264 | border-bottom: 1px solid #e9e9e9; |
| 1266 | margin-bottom: 28rpx; | 1265 | margin-bottom: 28rpx; |
| 1267 | } | 1266 | } |
| 1268 | .chooseRes { | 1267 | .chooseRes { |
| 1269 | font-size: 12px; | 1268 | font-size: 12px; |
| 1270 | color: #666666; | 1269 | color: #666666; |
| 1271 | } | 1270 | } |
| 1272 | .itemsWrap { | 1271 | .itemsWrap { |
| 1273 | display: flex; | 1272 | display: flex; |
| 1274 | flex-direction: row; | 1273 | flex-direction: row; |
| 1275 | flex-wrap: wrap; | 1274 | flex-wrap: wrap; |
| 1276 | justify-content: flex-start; | 1275 | justify-content: flex-start; |
| 1277 | align-items: center; | 1276 | align-items: center; |
| 1278 | padding-top: 24rpx; | 1277 | padding-top: 24rpx; |
| 1279 | .item1 { | 1278 | .item1 { |
| 1280 | width: 64rpx; | 1279 | width: 64rpx; |
| 1281 | height: 64rpx; | 1280 | height: 64rpx; |
| 1282 | border-radius: 32rpx; | 1281 | border-radius: 32rpx; |
| 1283 | margin: 0 36rpx 24rpx 0; | 1282 | margin: 0 36rpx 24rpx 0; |
| 1284 | transition: all 0.3s; | 1283 | transition: all 0.3s; |
| 1285 | border: 1px solid #ffffff; | 1284 | border: 1px solid #ffffff; |
| 1286 | } | 1285 | } |
| 1287 | .item2 { | 1286 | .item2 { |
| 1288 | // width: 100rpx; | 1287 | // width: 100rpx; |
| 1289 | padding: 0 30rpx; | 1288 | padding: 0 30rpx; |
| 1290 | height: 60rpx; | 1289 | height: 60rpx; |
| 1291 | margin: 0 20rpx 20rpx 0; | 1290 | margin: 0 20rpx 20rpx 0; |
| 1292 | transition: all 0.3s; | 1291 | transition: all 0.3s; |
| 1293 | background: #f2f2f2; | 1292 | background: #f2f2f2; |
| 1294 | border-radius: 2px; | 1293 | border-radius: 2px; |
| 1295 | border-radius: 2px; | 1294 | border-radius: 2px; |
| 1296 | line-height: 60rpx; | 1295 | line-height: 60rpx; |
| 1297 | text-align: center; | 1296 | text-align: center; |
| 1298 | color: #666666; | 1297 | color: #666666; |
| 1299 | font-size: 12px; | 1298 | font-size: 12px; |
| 1300 | } | 1299 | } |
| 1301 | .active1 { | 1300 | .active1 { |
| 1302 | opacity: 0.7; | 1301 | opacity: 0.7; |
| 1303 | border: 1px solid #ff6b4a; | 1302 | border: 1px solid #ff6b4a; |
| 1304 | } | 1303 | } |
| 1305 | .active2 { | 1304 | .active2 { |
| 1306 | background: rgba(255, 107, 74, 0.15); | 1305 | background: rgba(255, 107, 74, 0.15); |
| 1307 | color: #ff6b4a; | 1306 | color: #ff6b4a; |
| 1308 | } | 1307 | } |
| 1309 | } | 1308 | } |
| 1310 | } | 1309 | } |
| 1311 | .button { | 1310 | .button { |
| 1312 | width: 100%; | 1311 | width: 100%; |
| 1313 | height: 112rpx; | 1312 | height: 112rpx; |
| 1314 | background-color: #ff6b4a; | 1313 | background-color: #ff6b4a; |
| 1315 | font-size: 16px; | 1314 | font-size: 16px; |
| 1316 | color: #ffffff; | 1315 | color: #ffffff; |
| 1317 | line-height: 112rpx; | 1316 | line-height: 112rpx; |
| 1318 | text-align: center; | 1317 | text-align: center; |
| 1319 | position: sticky; | 1318 | position: sticky; |
| 1320 | bottom: 0rpx; | 1319 | bottom: 0rpx; |
| 1321 | left: 0rpx; | 1320 | left: 0rpx; |
| 1322 | z-index: 9999; | 1321 | z-index: 9999; |
| 1323 | } | 1322 | } |
| 1324 | } | 1323 | } |
| 1325 | /* sheet弹窗 */ | 1324 | /* sheet弹窗 */ |
| 1326 | .sheet{ | 1325 | .sheet{ |
| 1327 | width: 100%; | 1326 | width: 100%; |
| 1328 | height: 100%; | 1327 | height: 100%; |
| 1329 | position: fixed; | 1328 | position: fixed; |
| 1330 | top: 150%; | 1329 | top: 150%; |
| 1331 | left: 0upx; | 1330 | left: 0upx; |
| 1332 | bottom: 0upx; | 1331 | bottom: 0upx; |
| 1333 | right: 0upx; | 1332 | right: 0upx; |
| 1334 | background:rgba(0,0,0,0.3); | 1333 | background:rgba(0,0,0,0.3); |
| 1335 | z-index: 10000; | 1334 | z-index: 10000; |
| 1336 | } | 1335 | } |
| 1337 | 1336 | ||
| 1338 | /* 显示时候的动画默认0.5s */ | 1337 | /* 显示时候的动画默认0.5s */ |
src/pages/addOpticsData/addOpticsData.vue
| 1 | <template> | 1 | <template> |
| 2 | <view class="wrap"> | 2 | <view class="wrap"> |
| 3 | <!-- 弹窗 --> | 3 | <!-- 弹窗 --> |
| 4 | <uni-popup ref="popup" type="center"> | 4 | <uni-popup ref="popup" type="center"> |
| 5 | <!-- 给一个左边弹窗的样式 --> | 5 | <!-- 给一个左边弹窗的样式 --> |
| 6 | <view class="popUpWrap" :class="{'popUpWrap1': whichTap == 0}"> | 6 | <view class="popUpWrap" :class="{'popUpWrap1': whichTap == 0}"> |
| 7 | <!-- 关闭弹窗按钮 --> | 7 | <!-- 关闭弹窗按钮 --> |
| 8 | <view class="closeBtn" @click="this.$refs.popup.close()"></view> | 8 | <view class="closeBtn" @click="this.$refs.popup.close()"></view> |
| 9 | <!-- 左 --> | 9 | <!-- 左 --> |
| 10 | <image class="glassInfo" src="../../static/img/myOpticsData/glassInfo.png" v-if="whichTap == 0" mode="aspectFit"></image> | 10 | <image class="glassInfo" src="../../static/img/myOpticsData/glassInfo.png" v-if="whichTap == 0" mode="aspectFit"></image> |
| 11 | <!-- 右 --> | 11 | <!-- 右 --> |
| 12 | <image class="dataInfo" src="../../static/img/myOpticsData/dataInfo.png" v-else mode="aspectFit"></image> | 12 | <image class="dataInfo" src="../../static/img/myOpticsData/dataInfo.png" v-else mode="aspectFit"></image> |
| 13 | </view> | 13 | </view> |
| 14 | </uni-popup> | 14 | </uni-popup> |
| 15 | <!-- 点击弹窗部分 --> | 15 | <!-- 点击弹窗部分 --> |
| 16 | <view class="header"> | 16 | <view class="header"> |
| 17 | <view class="headerLeft" @click=changeTap(1)> | 17 | <view class="headerLeft" @click=changeTap(1)> |
| 18 | <text>如何查看验光单?</text> | 18 | <text>如何查看验光单?</text> |
| 19 | <image src="../../static/dataLook.png" mode="aspectFit"></image> | 19 | <image src="../../static/dataLook.png" mode="aspectFit"></image> |
| 20 | </view> | 20 | </view> |
| 21 | <view class="headerRight" @click=changeTap(0)> | 21 | <view class="headerRight" @click=changeTap(0)> |
| 22 | <text>如何查看眼镜框架?</text> | 22 | <text>如何查看眼镜框架?</text> |
| 23 | <image src="../../static/glassLook.png" mode="aspectFit"></image> | 23 | <image src="../../static/glassLook.png" mode="aspectFit"></image> |
| 24 | </view> | 24 | </view> |
| 25 | </view> | 25 | </view> |
| 26 | <!-- 数据展示部分 --> | 26 | <!-- 数据展示部分 --> |
| 27 | <view class="dataMenu"> | 27 | <view class="dataMenu"> |
| 28 | <uni-collapse accordion="true"> | 28 | <uni-collapse accordion="true"> |
| 29 | <view class="item" v-for="(loveItem,index) in loveList" :key="index" > | 29 | <view class="item" v-for="(loveItem,index) in loveList" :key="index" > |
| 30 | <uni-collapse-item :title='loveItem.name' :time='getRightTime(loveItem.in_time)' :iconText='getFirstName(loveItem.name)' showAnimation='true'> | 30 | <uni-collapse-item :title='loveItem.name' :time='getRightTime(loveItem.in_time)' :iconText='getFirstName(loveItem.name)' showAnimation='true'> |
| 31 | <view class="loveDataInfo" @click="toNewData(2,index)"> | 31 | <view class="loveDataInfo" @click="toNewData(2,index)"> |
| 32 | <view class="dataInfoItem"> | 32 | <view class="dataInfoItem"> |
| 33 | <text>度数(SPH):</text><text>左:{{loveItem.leftSph}}</text><text>右:{{loveItem.rightSph}}</text> | 33 | <text>度数(SPH):</text><text>左:{{loveItem.leftSph}}</text><text>右:{{loveItem.rightSph}}</text> |
| 34 | </view> | 34 | </view> |
| 35 | <view class="dataInfoItem"> | 35 | <view class="dataInfoItem"> |
| 36 | <text>散光(CYL):</text><text>左:{{loveItem.leftCyl}}</text><text>右:{{loveItem.rightCyl}}</text> | 36 | <text>散光(CYL):</text><text>左:{{loveItem.leftCyl}}</text><text>右:{{loveItem.rightCyl}}</text> |
| 37 | </view> | 37 | </view> |
| 38 | <view class="dataInfoItem"> | 38 | <view class="dataInfoItem"> |
| 39 | <text>轴位(AXI):</text><text>左:{{loveItem.leftAxi}}</text><text>右:{{loveItem.rightAxi}}</text> | 39 | <text>轴位(AXI):</text><text>左:{{loveItem.leftAxi}}</text><text>右:{{loveItem.rightAxi}}</text> |
| 40 | </view> | 40 | </view> |
| 41 | <view class="dataInfoItem"> | 41 | <view class="dataInfoItem"> |
| 42 | <text>瞳距(PD):</text><text>{{loveItem.pd}}</text> | 42 | <text>瞳距(PD):</text><text>{{loveItem.pd}}</text> |
| 43 | </view> | 43 | </view> |
| 44 | <view class="dataInfoItem"> | 44 | <view class="dataInfoItem"> |
| 45 | <text>镜片宽度:</text><text>{{loveItem.glassWidth!=='0'?loveItem.glassWidth:'暂无数据'}}</text> | 45 | <text>镜片宽度:</text><text>{{loveItem.glassWidth!=''?loveItem.glassWidth:'暂无数据'}}</text> |
| 46 | </view> | 46 | </view> |
| 47 | <view class="dataInfoItem"> | 47 | <view class="dataInfoItem"> |
| 48 | <text>鼻梁宽度:</text><text>{{loveItem.norseWidth!=='0'?loveItem.norseWidth:'暂无数据'}}</text> | 48 | <text>鼻梁宽度:</text><text>{{loveItem.norseWidth!=''?loveItem.norseWidth:'暂无数据'}}</text> |
| 49 | </view> | 49 | </view> |
| 50 | <view class="dataInfoItem"> | 50 | <view class="dataInfoItem"> |
| 51 | <text>镜腿长度:</text><text>{{loveItem.legWidth!=='0'?loveItem.legWidth:'暂无数据'}}</text> | 51 | <text>镜腿长度:</text><text>{{loveItem.legWidth!=''?loveItem.legWidth:'暂无数据'}}</text> |
| 52 | </view> | 52 | </view> |
| 53 | </view> | 53 | </view> |
| 54 | </uni-collapse-item> | 54 | </uni-collapse-item> |
| 55 | </view> | 55 | </view> |
| 56 | </uni-collapse> | 56 | </uni-collapse> |
| 57 | </view> | 57 | </view> |
| 58 | <view class="footer"> | 58 | <view class="footer"> |
| 59 | <button class="btn" type="default" @click="toNewData(1)">新建验光单</button> | 59 | <button class="btn" type="default" @click="toNewData(1)">新建验光单</button> |
| 60 | </view> | 60 | </view> |
| 61 | </view> | 61 | </view> |
| 62 | </template> | 62 | </template> |
| 63 | 63 | ||
| 64 | <script> | 64 | <script> |
| 65 | import UniCollapse from '@/components/UniCollapse/UniCollapse.vue' | 65 | import UniCollapse from '@/components/UniCollapse/UniCollapse.vue' |
| 66 | import UniCollapseItem from '@/components/UniCollapseItem/UniCollapseItem.vue' | 66 | import UniCollapseItem from '@/components/UniCollapseItem/UniCollapseItem.vue' |
| 67 | import UniPopup from '@/components/UniPopup/uni-popup.vue' | 67 | import UniPopup from '@/components/UniPopup/uni-popup.vue' |
| 68 | import store from '@/store'; | 68 | import store from '@/store'; |
| 69 | export default { | 69 | export default { |
| 70 | components: {UniCollapse,UniCollapseItem,UniPopup}, | 70 | components: {UniCollapse,UniCollapseItem,UniPopup}, |
| 71 | data() { | 71 | data() { |
| 72 | return { | 72 | return { |
| 73 | whichTap:0 | 73 | whichTap:0 |
| 74 | }; | 74 | }; |
| 75 | }, | 75 | }, |
| 76 | onShow() { | 76 | onShow() { |
| 77 | //获取关心的人列表 | 77 | //获取关心的人列表 |
| 78 | store.dispatch('myLoveList/getLoveList', { | 78 | store.dispatch('myLoveList/getLoveList', { |
| 79 | uid: this.$store.state.user.userInfo.uid, | 79 | uid: this.$store.state.user.userInfo.uid, |
| 80 | }); | 80 | }); |
| 81 | }, | 81 | }, |
| 82 | onLoad: function(option) { | 82 | onLoad: function(option) { |
| 83 | // //获取关心的人列表 | 83 | // //获取关心的人列表 |
| 84 | // store.dispatch('myLoveList/getLoveList', { | 84 | // store.dispatch('myLoveList/getLoveList', { |
| 85 | // uid: this.$store.state.user.userInfo.uid, | 85 | // uid: this.$store.state.user.userInfo.uid, |
| 86 | // }); | 86 | // }); |
| 87 | }, | 87 | }, |
| 88 | computed:{ | 88 | computed:{ |
| 89 | loveList() { | 89 | loveList() { |
| 90 | console.log(this.$store.state.myLoveList.loveList) | 90 | // console.log(this.$store.state.myLoveList.loveList) |
| 91 | return this.$store.state.myLoveList.loveList || [] | 91 | return this.$store.state.myLoveList.loveList || [] |
| 92 | }, | 92 | }, |
| 93 | }, | 93 | }, |
| 94 | methods:{ | 94 | methods:{ |
| 95 | changeTap(item){ | 95 | changeTap(item){ |
| 96 | this.whichTap = item | 96 | this.whichTap = item |
| 97 | this.$refs.popup.open() | 97 | this.$refs.popup.open() |
| 98 | }, | 98 | }, |
| 99 | //给时间搞一个nice的格式 | 99 | //给时间搞一个的格式 |
| 100 | getRightTime(time){ | 100 | getRightTime(time){ |
| 101 | //如果小于10 则返回'0'+m | 101 | //如果小于10 则返回'0'+m |
| 102 | // function add(m){return m<10?'0'+m:m} | 102 | // function add(m){return m<10?'0'+m:m} |
| 103 | //传给我的带有时分秒,想去除一下,但是完事IOS显示NaN,暂时不用吧 | 103 | //传给我的带有时分秒,想去除一下,但是完事IOS显示NaN,暂时不用吧 |
| 104 | // const oldTime = (new Date(time)).getTime() | 104 | // const oldTime = (new Date(time)).getTime() |
| 105 | // const year = new Date(oldTime).getFullYear() | 105 | // const year = new Date(oldTime).getFullYear() |
| 106 | // const month = new Date(oldTime).getMonth()+1 | 106 | // const month = new Date(oldTime).getMonth()+1 |
| 107 | // const day = new Date(oldTime).getDate() | 107 | // const day = new Date(oldTime).getDate() |
| 108 | // const newTime = add(year)+'-'+add(month)+'-'+add(day) | 108 | // const newTime = add(year)+'-'+add(month)+'-'+add(day) |
| 109 | 109 | ||
| 110 | // console.log(newTime) | 110 | // console.log(newTime) |
| 111 | // return newTime.replace(/-/g, '/') | 111 | // return newTime.replace(/-/g, '/') |
| 112 | return time | 112 | return time |
| 113 | }, | 113 | }, |
| 114 | getFirstName(name){ | 114 | getFirstName(name){ |
| 115 | return name.substring(0,1) | 115 | return name.substring(0,1) |
| 116 | }, | 116 | }, |
| 117 | toNewData(item,index){ | 117 | toNewData(item,index){ |
| 118 | // const args={ | 118 | // const args={ |
| 119 | // name:loveItem.name, | 119 | // name:loveItem.name, |
| 120 | // pd:loveItem.pd, | 120 | // pd:loveItem.pd, |
| 121 | // leftSph:loveItem.leftSph, | 121 | // leftSph:loveItem.leftSph, |
| 122 | // rightSph:loveItem.rightSph, | 122 | // rightSph:loveItem.rightSph, |
| 123 | // leftCyl:loveItem.leftCyl, | 123 | // leftCyl:loveItem.leftCyl, |
| 124 | // rightCyl:loveItem.rightCyl, | 124 | // rightCyl:loveItem.rightCyl, |
| 125 | // leftAxi:loveItem.leftAxi, | 125 | // leftAxi:loveItem.leftAxi, |
| 126 | // rightAxi:loveItem.rightAxi | 126 | // rightAxi:loveItem.rightAxi |
| 127 | // } | 127 | // } |
| 128 | uni.navigateTo({ | 128 | uni.navigateTo({ |
| 129 | // kinds 参数为 1 表示添加新的验光单, 2 表示更新验光单 | 129 | // kinds 参数为 1 表示添加新的验光单, 2 表示更新验光单 |
| 130 | // name 表示修改的人名儿,pd瞳距 | 130 | // name 表示修改的人名儿,pd瞳距 |
| 131 | url:'../newOpticsData/newOpticsData?kinds='+item+'&index='+index | 131 | url:'../newOpticsData/newOpticsData?kinds='+item+'&index='+index |
| 132 | }) | 132 | }) |
| 133 | } | 133 | } |
| 134 | } | 134 | } |
| 135 | } | 135 | } |
| 136 | </script> | 136 | </script> |
| 137 | 137 | ||
| 138 | <style lang="scss"> | 138 | <style lang="scss"> |
| 139 | .wrap{ | 139 | .wrap{ |
| 140 | min-height: 100vh; | 140 | min-height: 100vh; |
| 141 | width: 100%; | 141 | width: 100%; |
| 142 | background-color: #F2F2F2; | 142 | background-color: #F2F2F2; |
| 143 | .header{ | 143 | .header{ |
| 144 | height: 304rpx; | 144 | height: 304rpx; |
| 145 | width: 100%; | 145 | width: 100%; |
| 146 | background-color: #FFFFFF; | 146 | background-color: #FFFFFF; |
| 147 | display: flex; | 147 | display: flex; |
| 148 | justify-content: space-around; | 148 | justify-content: space-around; |
| 149 | align-items: center; | 149 | align-items: center; |
| 150 | view{ | 150 | view{ |
| 151 | height: 210rpx; | 151 | height: 210rpx; |
| 152 | width: 304rpx; | 152 | width: 304rpx; |
| 153 | background: #FDF7F5; | 153 | background: #FDF7F5; |
| 154 | border-radius: 4px; | 154 | border-radius: 4px; |
| 155 | border-radius: 4px; | 155 | border-radius: 4px; |
| 156 | display: flex; | 156 | display: flex; |
| 157 | flex-direction: column; | 157 | flex-direction: column; |
| 158 | align-items: center; | 158 | align-items: center; |
| 159 | justify-content: center; | 159 | justify-content: center; |
| 160 | text{ | 160 | text{ |
| 161 | font-size: 12px; | 161 | font-size: 12px; |
| 162 | color: #333333; | 162 | color: #333333; |
| 163 | } | 163 | } |
| 164 | image{ | 164 | image{ |
| 165 | height: 144rpx; | 165 | height: 144rpx; |
| 166 | width: 144rpx; | 166 | width: 144rpx; |
| 167 | } | 167 | } |
| 168 | } | 168 | } |
| 169 | } | 169 | } |
| 170 | .dataMenu{ | 170 | .dataMenu{ |
| 171 | margin-top: 20rpx; | 171 | margin-top: 20rpx; |
| 172 | box-shadow: 0 0 4px 0 rgba(133,107,107,0.10); | 172 | box-shadow: 0 0 4px 0 rgba(133,107,107,0.10); |
| 173 | width: 100%; | 173 | width: 100%; |
| 174 | background-color: #FFFFFF; | 174 | background-color: #FFFFFF; |
| 175 | margin-bottom: 120rpx; | 175 | margin-bottom: 120rpx; |
| 176 | .item{ | 176 | .item{ |
| 177 | padding: 0 40rpx; | 177 | padding: 0 40rpx; |
| 178 | .loveDataInfo{ | 178 | .loveDataInfo{ |
| 179 | padding: 0 44rpx 0 70rpx; | 179 | padding: 0 44rpx 0 70rpx; |
| 180 | display: flex; | 180 | display: flex; |
| 181 | justify-content: space-around; | 181 | justify-content: space-around; |
| 182 | flex-direction: column; | 182 | flex-direction: column; |
| 183 | align-items: flex-start; | 183 | align-items: flex-start; |
| 184 | .dataInfoItem{ | 184 | .dataInfoItem{ |
| 185 | font-size: 12px; | 185 | font-size: 12px; |
| 186 | color: #333333; | 186 | color: #333333; |
| 187 | margin-bottom: 34rpx; | 187 | margin-bottom: 34rpx; |
| 188 | text{ | 188 | text{ |
| 189 | font-size: 12px; | 189 | font-size: 12px; |
| 190 | color: #2A2A2A; | 190 | color: #2A2A2A; |
| 191 | margin-right: 20rpx; | 191 | margin-right: 20rpx; |
| 192 | } | 192 | } |
| 193 | } | 193 | } |
| 194 | } | 194 | } |
| 195 | } | 195 | } |
| 196 | } | 196 | } |
| 197 | .footer{ | 197 | .footer{ |
| 198 | width: 100%; | 198 | width: 100%; |
| 199 | position: fixed; | 199 | position: fixed; |
| 200 | bottom: 0; | 200 | bottom: 0; |
| 201 | left: 0; | 201 | left: 0; |
| 202 | .btn{ | 202 | .btn{ |
| 203 | width: 100%; | 203 | width: 100%; |
| 204 | height: 112rpx; | 204 | height: 112rpx; |
| 205 | line-height: 112rpx; | 205 | line-height: 112rpx; |
| 206 | background: #FF6B4A; | 206 | background: #FF6B4A; |
| 207 | font-size: 16px; | 207 | font-size: 16px; |
| 208 | color: #FFFFFF; | 208 | color: #FFFFFF; |
| 209 | } | 209 | } |
| 210 | } | 210 | } |
| 211 | } | 211 | } |
| 212 | .popUpWrap{ | 212 | .popUpWrap{ |
| 213 | height: 850rpx; | 213 | height: 850rpx; |
| 214 | width: 542rpx; | 214 | width: 542rpx; |
| 215 | background-color: #FFFFFF; | 215 | background-color: #FFFFFF; |
| 216 | border-radius: 4px; | 216 | border-radius: 4px; |
| 217 | border: 1px solid #979797; | 217 | border: 1px solid #979797; |
| 218 | .closeBtn{ | 218 | .closeBtn{ |
| 219 | height: 28rpx; | 219 | height: 28rpx; |
| 220 | width: 28rpx; | 220 | width: 28rpx; |
| 221 | // border: 1px solid red; | 221 | // border: 1px solid red; |
| 222 | position: absolute; | 222 | position: absolute; |
| 223 | top: 20rpx; | 223 | top: 20rpx; |
| 224 | right: 20rpx; | 224 | right: 20rpx; |
| 225 | } | 225 | } |
| 226 | .glassInfo{ | 226 | .glassInfo{ |
| 227 | height: 474rpx; | 227 | height: 474rpx; |
| 228 | width: 528rpx; | 228 | width: 528rpx; |
| 229 | } | 229 | } |
| 230 | .dataInfo{ | 230 | .dataInfo{ |
| 231 | height: 850rpx; | 231 | height: 850rpx; |
| 232 | width: 542rpx; | 232 | width: 542rpx; |
| 233 | } | 233 | } |
| 234 | } | 234 | } |
| 235 | .popUpWrap1{ | 235 | .popUpWrap1{ |
| 236 | height: 474rpx; | 236 | height: 474rpx; |
| 237 | width: 528rpx; | 237 | width: 528rpx; |
| 238 | border-radius: 4px; | 238 | border-radius: 4px; |
| 239 | border: 1px solid #979797; | 239 | border: 1px solid #979797; |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | </style> | 242 | </style> |
| 243 | 243 |
src/pages/confirmOrder/confirmOrder.vue
| 1 | <template> | 1 | <template> |
| 2 | <view class="wrap"> | 2 | <view class="wrap"> |
| 3 | <view></view> | 3 | <view></view> |
| 4 | <view | 4 | <view |
| 5 | class="addAddress" | 5 | class="addAddress" |
| 6 | @tap="toaddAddress" | 6 | @tap="toaddAddress" |
| 7 | v-if="this.showAddress" | 7 | v-if="this.showAddress" |
| 8 | > | 8 | > |
| 9 | <view class="addIcon"> | 9 | <view class="addIcon"> |
| 10 | <image | 10 | <image |
| 11 | src="../../static/add.png" | 11 | src="../../static/add.png" |
| 12 | mode="aspectFill" | 12 | mode="aspectFill" |
| 13 | ></image> | 13 | ></image> |
| 14 | </view> | 14 | </view> |
| 15 | <view class="addressText">{{addAddress}}</view> | 15 | <view class="addressText">{{addAddress}}</view> |
| 16 | <image | 16 | <image |
| 17 | src="../../static/right.png" | 17 | src="../../static/right.png" |
| 18 | mode="aspectFill" | 18 | mode="aspectFill" |
| 19 | ></image> | 19 | ></image> |
| 20 | </view> | 20 | </view> |
| 21 | <view | 21 | <view |
| 22 | v-else | 22 | v-else |
| 23 | @tap="toaddAddress" | 23 | @tap="toaddAddress" |
| 24 | class="list order-user" | 24 | class="list order-user" |
| 25 | > | 25 | > |
| 26 | <view class="order-user-head"> | 26 | <view class="order-user-head"> |
| 27 | <view class="name"> | 27 | <view class="name"> |
| 28 | <view | 28 | <view |
| 29 | v-if="addressInfo.default === '1'" | 29 | v-if="addressInfo.default === '1'" |
| 30 | class="default" | 30 | class="default" |
| 31 | ><text>默认</text></view>{{addressInfo.name}} | 31 | ><text>默认</text></view>{{addressInfo.name}} |
| 32 | </view> | 32 | </view> |
| 33 | <text class="mobile">{{addressInfo.mobile}}</text> | 33 | <text class="mobile">{{addressInfo.mobile}}</text> |
| 34 | </view> | 34 | </view> |
| 35 | <view class="order-user-body"> | 35 | <view class="order-user-body"> |
| 36 | <image src="../../static/myorder-paying-location.png"></image> | 36 | <image src="../../static/myorder-paying-location.png"></image> |
| 37 | <text class="address">{{addressInfo.address}}\n{{addressInfo.add_detail}}</text> | 37 | <text class="address">{{addressInfo.address}}\n{{addressInfo.add_detail}}</text> |
| 38 | </view> | 38 | </view> |
| 39 | <image | 39 | <image |
| 40 | class="arrow" | 40 | class="arrow" |
| 41 | src="../../static/right.png" | 41 | src="../../static/right.png" |
| 42 | mode="aspectFill" | 42 | mode="aspectFill" |
| 43 | ></image> | 43 | ></image> |
| 44 | </view> | 44 | </view> |
| 45 | <view class="content"> | 45 | <view class="content"> |
| 46 | <view class="orderInfo"> | 46 | <view class="orderInfo"> |
| 47 | <view class="title"> | 47 | <view class="title"> |
| 48 | <image | 48 | <image |
| 49 | src="../../static/store.png" | 49 | src="../../static/store.png" |
| 50 | mode="aspectFill" | 50 | mode="aspectFill" |
| 51 | style="width: 40rpx;height: 40rpx;" | 51 | style="width: 40rpx;height: 40rpx;" |
| 52 | ></image> | 52 | ></image> |
| 53 | <text>非常戴镜</text> | 53 | <text>非常戴镜</text> |
| 54 | </view> | 54 | </view> |
| 55 | 55 | ||
| 56 | <view | 56 | <view |
| 57 | class="infoBox" | 57 | class="infoBox" |
| 58 | v-if="isCart == 'true'" | 58 | v-if="isCart == 'true'" |
| 59 | v-for="(item, index) in checkedCartLst" | 59 | v-for="(item, index) in checkedCartLst" |
| 60 | :key="index" | 60 | :key="index" |
| 61 | > | 61 | > |
| 62 | <view class="infoTop"> | 62 | <view class="infoTop"> |
| 63 | <image | 63 | <image |
| 64 | :src="item.img_index_url" | 64 | :src="item.img_index_url" |
| 65 | mode="aspectFill" | 65 | mode="aspectFill" |
| 66 | ></image> | 66 | ></image> |
| 67 | <view class="infoRight"> | 67 | <view class="infoRight"> |
| 68 | <text class="goodName">{{item.p_name}}</text> | 68 | <text class="goodName">{{item.p_name}}</text> |
| 69 | <text class="remarks">支持7天无理由退货 顺丰发货</text> | 69 | <text class="remarks">支持7天无理由退货 顺丰发货</text> |
| 70 | <view class="priceBox"> | 70 | <view class="priceBox"> |
| 71 | <view class="price">¥{{Number(item.nowPrice) * item.num}}<text class="originCost"> | 71 | <view class="price">¥{{Number(item.nowPrice) * item.num}}<text class="originCost"> |
| 72 | ¥{{item.oldPrice*item.num}} | 72 | ¥{{item.oldPrice*item.num}} |
| 73 | </text></view> | 73 | </text></view> |
| 74 | <view class="counter"> | 74 | <view class="counter"> |
| 75 | <view | 75 | <view |
| 76 | class="btn" | 76 | class="btn" |
| 77 | disabled="this.disabled" | 77 | disabled="this.disabled" |
| 78 | type="default" | 78 | type="default" |
| 79 | @click="counter(false,index)" | 79 | @click="counter(false,index)" |
| 80 | >-</view> | 80 | >-</view> |
| 81 | <text>{{checkedCartLst[index].num}}</text> | 81 | <text>{{checkedCartLst[index].num}}</text> |
| 82 | <view | 82 | <view |
| 83 | class="btn" | 83 | class="btn" |
| 84 | type="default" | 84 | type="default" |
| 85 | @click="counter(true,index)" | 85 | @click="counter(true,index)" |
| 86 | >+</view> | 86 | >+</view> |
| 87 | </view> | 87 | </view> |
| 88 | </view> | 88 | </view> |
| 89 | </view> | 89 | </view> |
| 90 | </view> | 90 | </view> |
| 91 | <view class="infoBottom"> | 91 | <view class="infoBottom"> |
| 92 | <view class="norm">规格 <text> | 92 | <view class="norm">规格 <text> |
| 93 | <!-- 长度超出变省略号未做 --> | 93 | <!-- 长度超出变省略号未做 --> |
| 94 | <block>{{item.sku_name}}<block v-if="index !== current.length -1">/</block> | 94 | <block>{{item.sku_name}}<block v-if="index !== current.length -1">/</block> |
| 95 | </block> | 95 | </block> |
| 96 | </text></view> | 96 | </text></view> |
| 97 | <view class="shippingMethod">使用人 <text> | 97 | <view class="shippingMethod">使用人 <text> |
| 98 | {{item.peopleName}} | 98 | {{item.peopleName}} |
| 99 | </text></view> | 99 | </text></view> |
| 100 | <view class="shippingMethod">配送方式 <text>快递</text></view> | 100 | <view class="shippingMethod">配送方式 <text>快递</text></view> |
| 101 | <view class="message">买家留言 | 101 | <view class="message">买家留言 |
| 102 | <input | 102 | <input |
| 103 | type="text" | 103 | type="text" |
| 104 | :value="note" | 104 | :value="note" |
| 105 | placeholder="建议提前协商(50字以内)" | 105 | placeholder="建议提前协商(50字以内)" |
| 106 | /> | 106 | /> |
| 107 | </view> | 107 | </view> |
| 108 | </view> | 108 | </view> |
| 109 | </view> | 109 | </view> |
| 110 | 110 | ||
| 111 | <view | 111 | <view |
| 112 | class="infoBox" | 112 | class="infoBox" |
| 113 | v-if="isCart !== 'true'" | 113 | v-if="isCart !== 'true'" |
| 114 | > | 114 | > |
| 115 | <view class="infoTop"> | 115 | <view class="infoTop"> |
| 116 | <image | 116 | <image |
| 117 | :src="buyItem.pic" | 117 | :src="buyItem.pic" |
| 118 | mode="aspectFill" | 118 | mode="aspectFill" |
| 119 | ></image> | 119 | ></image> |
| 120 | <view class="infoRight"> | 120 | <view class="infoRight"> |
| 121 | <text class="goodName">{{goodInfo.p_name}}</text> | 121 | <text class="goodName">{{goodInfo.p_name}}</text> |
| 122 | <text class="remarks">支持7天无理由退货 顺丰发货</text> | 122 | <text class="remarks">支持7天无理由退货 顺丰发货</text> |
| 123 | <view class="priceBox"> | 123 | <view class="priceBox"> |
| 124 | <view class="price">¥{{buyItem.real_price * count}}<text class="originCost"> | 124 | <view class="price">¥{{buyItem.real_price * count}}<text class="originCost"> |
| 125 | ¥{{buyItem.out_price * count}} | 125 | ¥{{buyItem.out_price * count}} |
| 126 | </text></view> | 126 | </text></view> |
| 127 | <view class="counter"> | 127 | <view class="counter"> |
| 128 | <view | 128 | <view |
| 129 | class="btn" | 129 | class="btn" |
| 130 | disabled="this.disabled" | 130 | disabled="this.disabled" |
| 131 | type="default" | 131 | type="default" |
| 132 | @click="counter(false)" | 132 | @click="counter(false)" |
| 133 | >-</view> | 133 | >-</view> |
| 134 | <text>{{count}}</text> | 134 | <text>{{count}}</text> |
| 135 | <view | 135 | <view |
| 136 | class="btn" | 136 | class="btn" |
| 137 | type="default" | 137 | type="default" |
| 138 | @click="counter(true)" | 138 | @click="counter(true)" |
| 139 | >+</view> | 139 | >+</view> |
| 140 | </view> | 140 | </view> |
| 141 | </view> | 141 | </view> |
| 142 | </view> | 142 | </view> |
| 143 | </view> | 143 | </view> |
| 144 | <view class="infoBottom"> | 144 | <view class="infoBottom"> |
| 145 | <view class="norm">规格 <text> | 145 | <view class="norm">规格 <text> |
| 146 | <!-- 长度超出变省略号未做 --> | 146 | <!-- 长度超出变省略号未做 --> |
| 147 | <block | 147 | <block |
| 148 | v-for="(item, index) in current" | 148 | v-for="(item, index) in current" |
| 149 | :key="index" | 149 | :key="index" |
| 150 | >{{attrList[index].attr[item].name}}<block v-if="index !== current.length -1">/</block> | 150 | >{{attrList[index].attr[item].name}}<block v-if="index !== current.length -1">/</block> |
| 151 | </block> | 151 | </block> |
| 152 | </text></view> | 152 | </text></view> |
| 153 | <view class="shippingMethod">使用人 <text> | 153 | <view class="shippingMethod">使用人 <text> |
| 154 | {{name}} | 154 | {{name}} |
| 155 | </text></view> | 155 | </text></view> |
| 156 | <view class="shippingMethod">配送方式 <text>快递</text></view> | 156 | <view class="shippingMethod">配送方式 <text>快递</text></view> |
| 157 | <view class="message">买家留言 | 157 | <view class="message">买家留言 |
| 158 | <input | 158 | <input |
| 159 | type="text" | 159 | type="text" |
| 160 | :value="note" | 160 | :value="note" |
| 161 | placeholder="建议提前协商(50字以内)" | 161 | placeholder="建议提前协商(50字以内)" |
| 162 | /> | 162 | /> |
| 163 | </view> | 163 | </view> |
| 164 | </view> | 164 | </view> |
| 165 | </view> | 165 | </view> |
| 166 | </view> | 166 | </view> |
| 167 | <view class="payWay"> | 167 | <view class="payWay"> |
| 168 | <view class="item"> | 168 | <view class="item"> |
| 169 | <text>支付方式</text> | 169 | <text>支付方式</text> |
| 170 | <view class="itemRight"> | 170 | <view class="itemRight"> |
| 171 | <view class="rightText"> | 171 | <view class="rightText"> |
| 172 | <view class="choosePayWay"> | 172 | <view class="choosePayWay"> |
| 173 | <image | 173 | <image |
| 174 | src="../../static/chat_logo.png" | 174 | src="../../static/chat_logo.png" |
| 175 | mode="aspectFill" | 175 | mode="aspectFill" |
| 176 | ></image> | 176 | ></image> |
| 177 | <text>微信支付</text> | 177 | <text>微信支付</text> |
| 178 | </view> | 178 | </view> |
| 179 | <!-- <view class="randomSubstraction">最高随机立减¥99</view> --> | 179 | <!-- <view class="randomSubstraction">最高随机立减¥99</view> --> |
| 180 | </view> | 180 | </view> |
| 181 | <!-- <image | 181 | <!-- <image |
| 182 | src="../../static/right.png" | 182 | src="../../static/right.png" |
| 183 | mode="aspectFill" | 183 | mode="aspectFill" |
| 184 | ></image> --> | 184 | ></image> --> |
| 185 | </view> | 185 | </view> |
| 186 | </view> | 186 | </view> |
| 187 | <!-- <view class="item"> | 187 | <!-- <view class="item"> |
| 188 | <text>优惠券</text> | 188 | <text>优惠券</text> |
| 189 | <view class="itemRight"> | 189 | <view class="itemRight"> |
| 190 | <view class="rightText"> | 190 | <view class="rightText"> |
| 191 | <view class="chooseOffers"> | 191 | <view class="chooseOffers"> |
| 192 | <text>-¥70.00</text> | 192 | <text>-¥70.00</text> |
| 193 | </view> | 193 | </view> |
| 194 | <view class="preferentialWay">最大优惠</view> | 194 | <view class="preferentialWay">最大优惠</view> |
| 195 | </view> | 195 | </view> |
| 196 | <image | 196 | <image |
| 197 | src="../../static/right.png" | 197 | src="../../static/right.png" |
| 198 | mode="aspectFill" | 198 | mode="aspectFill" |
| 199 | ></image> | 199 | ></image> |
| 200 | </view> | 200 | </view> |
| 201 | </view> --> | 201 | </view> --> |
| 202 | <view class="item"> | 202 | <view class="item"> |
| 203 | <text>运费</text> | 203 | <text>运费</text> |
| 204 | <view class="itemRight"> | 204 | <view class="itemRight"> |
| 205 | <view class="freight">免运费</view> | 205 | <view class="freight">免运费</view> |
| 206 | </view> | 206 | </view> |
| 207 | </view> | 207 | </view> |
| 208 | <view class="item"> | 208 | <view class="item"> |
| 209 | <text>合计</text> | 209 | <text>合计</text> |
| 210 | <view class="itemRight"> | 210 | <view class="itemRight"> |
| 211 | <view class="total">¥{{totalPrice}}</view> | 211 | <view class="total">¥{{totalPrice}}</view> |
| 212 | <!-- <view class="total" v-else>¥{{Number(skuInfo.real_price) * count}}</view> --> | 212 | <!-- <view class="total" v-else>¥{{Number(skuInfo.real_price) * count}}</view> --> |
| 213 | </view> | 213 | </view> |
| 214 | </view> | 214 | </view> |
| 215 | </view> | 215 | </view> |
| 216 | <!-- | 216 | <!-- |
| 217 | <view class="checkBox"> | 217 | <view class="checkBox"> |
| 218 | <checkbox-group> | 218 | <checkbox-group> |
| 219 | <label> | 219 | <label> |
| 220 | <checkbox color="#FF6B4A" value="isAnonymous" checked="true" />匿名购买 | 220 | <checkbox color="#FF6B4A" value="isAnonymous" checked="true" />匿名购买 |
| 221 | </label> | 221 | </label> |
| 222 | </checkbox-group> | 222 | </checkbox-group> |
| 223 | </view> --> | 223 | </view> --> |
| 224 | </view> | 224 | </view> |
| 225 | <view class="last_zhanwei"></view> | 225 | <view class="last_zhanwei"></view> |
| 226 | <view class="footer"> | 226 | <view class="footer"> |
| 227 | <view class="footerLeft">实付金额: | 227 | <view class="footerLeft">实付金额: |
| 228 | <text>¥{{totalPrice}}</text> | 228 | <text>¥{{totalPrice}}</text> |
| 229 | <!-- <text v-else>¥{{Number(skuInfo.real_price) * count}}</text> --> | 229 | <!-- <text v-else>¥{{Number(skuInfo.real_price) * count}}</text> --> |
| 230 | </view> | 230 | </view> |
| 231 | <view class="footerRight"> | 231 | <view class="footerRight"> |
| 232 | <view | 232 | <view |
| 233 | class="paybtn" | 233 | class="paybtn" |
| 234 | @tap="orderBuild" | 234 | @tap="orderBuild" |
| 235 | >立即支付</view> | 235 | >立即支付</view> |
| 236 | </view> | 236 | </view> |
| 237 | </view> | 237 | </view> |
| 238 | </view> | 238 | </view> |
| 239 | </template> | 239 | </template> |
| 240 | 240 | ||
| 241 | <script> | 241 | <script> |
| 242 | import store from '@/store' | 242 | import store from '@/store' |
| 243 | import MD5Util from '../../utils/md5' | 243 | import MD5Util from '../../utils/md5' |
| 244 | 244 | ||
| 245 | export default { | 245 | export default { |
| 246 | data() { | 246 | data() { |
| 247 | return { | 247 | return { |
| 248 | name: String, | 248 | name: String, |
| 249 | addAddress: '添加收货地址', | 249 | addAddress: '添加收货地址', |
| 250 | count: 1, | 250 | count: 1, |
| 251 | pid: 0, | 251 | pid: 0, |
| 252 | disabled: false, | 252 | disabled: false, |
| 253 | freight: 0.0, | 253 | freight: 0.0, |
| 254 | showAddress: false, | 254 | showAddress: false, |
| 255 | note: '', | 255 | note: '', |
| 256 | addressInfo: { | 256 | addressInfo: { |
| 257 | address: '', | 257 | address: '', |
| 258 | }, | 258 | }, |
| 259 | isCart: Boolean, | 259 | isCart: Boolean, |
| 260 | // isAnonymous: | 260 | // isAnonymous: |
| 261 | checkedCartLst: [], | 261 | checkedCartLst: [], |
| 262 | } | 262 | } |
| 263 | }, | 263 | }, |
| 264 | onShow(addressId) { | 264 | onShow(addressId) { |
| 265 | // console.log('+-+-*-*-+-+',addressId) | 265 | // console.log('+-+-*-*-+-+',addressId) |
| 266 | if (addressId) { | 266 | if (addressId) { |
| 267 | store | 267 | store |
| 268 | .dispatch('address/details', { | 268 | .dispatch('address/details', { |
| 269 | add_id: addressId, | 269 | add_id: addressId, |
| 270 | }) | 270 | }) |
| 271 | .then(({ code, data }) => { | 271 | .then(({ code, data }) => { |
| 272 | if (code === 1) { | 272 | if (code === 1) { |
| 273 | // console.log('code', code, data) | 273 | // console.log('code', code, data) |
| 274 | this.showAddress = true | 274 | this.showAddress = true |
| 275 | this.addressInfo = data | 275 | this.addressInfo = data |
| 276 | } | 276 | } |
| 277 | }) | 277 | }) |
| 278 | } | 278 | } |
| 279 | }, | 279 | }, |
| 280 | onLoad({ pid, addressId, isCart, count, name }) { | 280 | onLoad({ pid, addressId, isCart, count, name }) { |
| 281 | if (isCart == 'false') { | 281 | if (isCart == 'false') { |
| 282 | this.pid = pid | 282 | this.pid = pid |
| 283 | store.dispatch('read/fetch', { | 283 | // store.dispatch('read/fetch', { |
| 284 | pid, | 284 | // pid, |
| 285 | }) | 285 | // }) |
| 286 | } | 286 | } |
| 287 | this.count = count | 287 | this.count = count |
| 288 | this.name = name | 288 | this.name = name |
| 289 | this.isCart = isCart | 289 | this.isCart = isCart |
| 290 | 290 | ||
| 291 | console.log('++++++++++++' + pid, addressId, isCart) | 291 | console.log('++++++++++++' + pid, addressId, isCart) |
| 292 | this.checkedCartLst = this.$store.state.cart.checkedCartLst | 292 | this.checkedCartLst = this.$store.state.cart.checkedCartLst |
| 293 | // console.log('++++++++++6666666666++',this.$store.state.cart.checkedCartLst) | 293 | // console.log('++++++++++6666666666++',this.$store.state.cart.checkedCartLst) |
| 294 | // 若已经选择地址 | 294 | // 若已经选择地址 |
| 295 | if (addressId) { | 295 | if (addressId) { |
| 296 | store | 296 | store |
| 297 | .dispatch('address/details', { | 297 | .dispatch('address/details', { |
| 298 | add_id: addressId, | 298 | add_id: addressId, |
| 299 | }) | 299 | }) |
| 300 | .then(({ code, data }) => { | 300 | .then(({ code, data }) => { |
| 301 | if (code === 1) { | 301 | if (code === 1) { |
| 302 | // console.log('code', code, data) | 302 | // console.log('code', code, data) |
| 303 | this.showAddress = true | 303 | this.showAddress = true |
| 304 | this.addressInfo = data | 304 | this.addressInfo = data |
| 305 | } | 305 | } |
| 306 | }) | 306 | }) |
| 307 | } else { | 307 | } else { |
| 308 | store.dispatch('address/default').then(({ code, data }) => { | 308 | store.dispatch('address/default').then(({ code, data }) => { |
| 309 | if (code === 1) { | 309 | if (code === 1) { |
| 310 | // console.log('code', code, data) | 310 | // console.log('code', code, data) |
| 311 | this.showAddress = true | 311 | this.showAddress = true |
| 312 | this.addressInfo = data | 312 | this.addressInfo = data |
| 313 | } | 313 | } |
| 314 | }) | 314 | }) |
| 315 | } | 315 | } |
| 316 | }, | 316 | }, |
| 317 | computed: { | 317 | computed: { |
| 318 | totalPrice() { | 318 | totalPrice() { |
| 319 | if (this.isCart == 'true') { | 319 | if (this.isCart == 'true') { |
| 320 | let total = 0 | 320 | let total = 0 |
| 321 | this.$store.state.cart.checkedCartLst.map(item => { | 321 | this.$store.state.cart.checkedCartLst.map(item => { |
| 322 | total += item.nowPrice * item.num | 322 | total += item.nowPrice * item.num |
| 323 | }) | 323 | }) |
| 324 | return total | 324 | return total |
| 325 | } else { | 325 | } else { |
| 326 | return this.buyItem.real_price * this.count | 326 | return this.buyItem.real_price * this.count |
| 327 | } | 327 | } |
| 328 | }, | 328 | }, |
| 329 | buyItem() { | 329 | buyItem() { |
| 330 | return this.$store.state.cart.buyItem | 330 | return this.$store.state.cart.buyItem |
| 331 | }, | 331 | }, |
| 332 | // checkedCartLst(){ | 332 | // checkedCartLst(){ |
| 333 | // console.log('checkedCartLst',this.$store.state.cart.checkedCartLst) | 333 | // console.log('checkedCartLst',this.$store.state.cart.checkedCartLst) |
| 334 | // return this.$store.state.cart.checkedCartLst | 334 | // return this.$store.state.cart.checkedCartLst |
| 335 | // }, | 335 | // }, |
| 336 | goodInfo() { | 336 | goodInfo() { |
| 337 | console.log('state', this.$store.state.read.goodInfo) | 337 | console.log('state', this.$store.state.read.goodInfo) |
| 338 | return this.$store.state.read.goodInfo | 338 | return this.$store.state.read.goodInfo |
| 339 | }, | 339 | }, |
| 340 | skuInfo() { | 340 | skuInfo() { |
| 341 | return this.$store.state.order.param.sk_id_arr | 341 | return this.$store.state.order.param.sk_id_arr |
| 342 | }, | 342 | }, |
| 343 | attrList() { | 343 | attrList() { |
| 344 | return this.$store.state.order.param.attrList | 344 | return this.$store.state.order.param.attrList |
| 345 | }, | 345 | }, |
| 346 | current() { | 346 | current() { |
| 347 | return this.$store.state.order.param.current | 347 | return this.$store.state.order.param.current |
| 348 | }, | 348 | }, |
| 349 | }, | 349 | }, |
| 350 | methods: { | 350 | methods: { |
| 351 | counter(isadd, index) { | 351 | counter(isadd, index) { |
| 352 | if (isadd) { | 352 | if (isadd) { |
| 353 | if (this.isCart == 'true') { | 353 | if (this.isCart == 'true') { |
| 354 | this.checkedCartLst[index].num++ | 354 | this.checkedCartLst[index].num++ |
| 355 | } else { | 355 | } else { |
| 356 | this.count++ | 356 | this.count++ |
| 357 | } | 357 | } |
| 358 | } else { | 358 | } else { |
| 359 | if (this.isCart == 'true') { | 359 | if (this.isCart == 'true') { |
| 360 | this.checkedCartLst[index].num <= 1 ? (this.disabled = true) : this.checkedCartLst[index].num-- | 360 | this.checkedCartLst[index].num <= 1 ? (this.disabled = true) : this.checkedCartLst[index].num-- |
| 361 | } else { | 361 | } else { |
| 362 | this.count <= 1 ? (this.disabled = true) : this.count-- | 362 | this.count <= 1 ? (this.disabled = true) : this.count-- |
| 363 | } | 363 | } |
| 364 | } | 364 | } |
| 365 | }, | 365 | }, |
| 366 | // 跳转添加地址页面 | 366 | // 跳转添加地址页面 |
| 367 | toaddAddress() { | 367 | toaddAddress() { |
| 368 | uni.navigateTo({ | 368 | uni.navigateTo({ |
| 369 | url: `../address/addressList?edit=${1}`, | 369 | url: `../address/addressList?edit=${1}`, |
| 370 | success: res => {}, | 370 | success: res => {}, |
| 371 | fail: error => { | 371 | fail: error => { |
| 372 | console.log('跳转到地址列表页面失败====>', error) | 372 | console.log('跳转到地址列表页面失败====>', error) |
| 373 | }, | 373 | }, |
| 374 | complete: () => {}, | 374 | complete: () => {}, |
| 375 | }) | 375 | }) |
| 376 | }, | 376 | }, |
| 377 | // 下单 | 377 | // 下单 |
| 378 | orderBuild() { | 378 | orderBuild() { |
| 379 | uni.showLoading({ | 379 | uni.showLoading({ |
| 380 | title: '支付中', | 380 | title: '支付中', |
| 381 | }) | 381 | }) |
| 382 | if (this.isCart === 'true') { | 382 | if (this.isCart === 'true') { |
| 383 | const checkedGoods = [] | 383 | const checkedGoods = [] |
| 384 | const sk_id_arr = [] | 384 | const sk_id_arr = [] |
| 385 | this.checkedCartLst.map(item => { | 385 | this.checkedCartLst.map(item => { |
| 386 | checkedGoods.push(item.cart_id) | 386 | checkedGoods.push(item.cart_id) |
| 387 | sk_id_arr.push(item.sk_id) | 387 | sk_id_arr.push(item.sk_id) |
| 388 | }) | 388 | }) |
| 389 | store.dispatch('order/build', { | 389 | store.dispatch('order/build', { |
| 390 | uid: this.$store.state.user.userInfo.uid, | 390 | uid: this.$store.state.user.userInfo.uid, |
| 391 | address: JSON.stringify(this.addressInfo), | 391 | address: JSON.stringify(this.addressInfo), |
| 392 | checkedGoods: checkedGoods, | 392 | checkedGoods: checkedGoods, |
| 393 | sk_id_arr: sk_id_arr, | 393 | sk_id_arr: sk_id_arr, |
| 394 | totalPrice: this.totalPrice, | 394 | totalPrice: this.totalPrice, |
| 395 | }).then((res) => { | 395 | }).then((res) => { |
| 396 | this.pay(res) | 396 | this.pay(res) |
| 397 | }) | 397 | }) |
| 398 | } | 398 | } |
| 399 | if (this.isCart === 'false') { | 399 | if (this.isCart === 'false') { |
| 400 | const { sk_id_arr: skId, mp_id: mpId } = this.$store.state.order.param | 400 | const { sk_id_arr: skId, mp_id: mpId } = this.$store.state.order.param |
| 401 | store.dispatch('order/buyNow', { | 401 | store.dispatch('order/buyNow', { |
| 402 | pid: skId.pid, | 402 | pid: skId.pid, |
| 403 | sk_id: skId.sk_id, | 403 | sk_id: skId.sk_id, |
| 404 | number: this.count, | 404 | number: this.count, |
| 405 | mp_id: mpId, | 405 | mp_id: mpId, |
| 406 | address: JSON.stringify(this.addressInfo), | 406 | address: JSON.stringify(this.addressInfo), |
| 407 | totalPrice: this.totalPrice, | 407 | totalPrice: this.totalPrice, |
| 408 | liuyan: this.note, | 408 | liuyan: this.note, |
| 409 | dir: 1, | 409 | dir: 1, |
| 410 | }).then((res) => { | 410 | }).then((res) => { |
| 411 | this.pay(res) | 411 | this.pay(res) |
| 412 | }) | 412 | }) |
| 413 | } | 413 | } |
| 414 | }, | 414 | }, |
| 415 | // 支付 | 415 | // 支付 |
| 416 | pay(res) { | 416 | pay(res) { |
| 417 | console.log('pay', res) | 417 | console.log('pay', res) |
| 418 | const { data, exKeyName: keyName } = res | 418 | const { data, exKeyName: keyName } = res |
| 419 | const uid = uni.getStorageSync('uid') | 419 | const uid = uni.getStorageSync('uid') |
| 420 | const timeStamp = new Date().getTime().toString() | 420 | const timeStamp = new Date().getTime().toString() |
| 421 | const nonceStr = 'asfafasfasfasfasf' | 421 | const nonceStr = 'asfafasfasfasfasf' |
| 422 | // 支付参数 | 422 | // 支付参数 |
| 423 | const fieldSet = { | 423 | const fieldSet = { |
| 424 | openid: this.$store.state.user.userInfo.openid, | 424 | openid: this.$store.state.user.userInfo.openid, |
| 425 | uid: this.$store.state.user.userInfo.uid, | 425 | uid: this.$store.state.user.userInfo.uid, |
| 426 | shopid: 0, | 426 | shopid: 0, |
| 427 | payCate: 2020, | 427 | payCate: 2020, |
| 428 | payMoney: this.totalPrice, | 428 | payMoney: this.totalPrice, |
| 429 | payWoodId: `fcdj-${uid}-${keyName}`, | 429 | payWoodId: `fcdj-${uid}-${keyName}`, |
| 430 | payWoodDesc: '在【非常戴镜】的微信付款凭证', | 430 | payWoodDesc: '在【非常戴镜】的微信付款凭证', |
| 431 | nonceStr, | 431 | nonceStr, |
| 432 | signType: 'MD5', | 432 | signType: 'MD5', |
| 433 | app_uid: 2020, | 433 | app_uid: 2020, |
| 434 | timeStamp, | 434 | timeStamp, |
| 435 | keyname: keyName, | 435 | keyname: keyName, |
| 436 | billInfo: JSON.stringify(data), | 436 | billInfo: JSON.stringify(data), |
| 437 | } | 437 | } |
| 438 | // 请求后台支付接口 | 438 | // 请求后台支付接口 |
| 439 | store.dispatch('order/pay', fieldSet).then(({ data, data2, pay_id: payId }) => { | 439 | store.dispatch('order/pay', fieldSet).then(({ data, data2, pay_id: payId }) => { |
| 440 | if (data.return_code === 'SUCCESS' && data.result_code === 'SUCCESS') { | 440 | if (data.return_code === 'SUCCESS' && data.result_code === 'SUCCESS') { |
| 441 | const stringA = `appId=wx115b25aa396d27ac&nonceStr=${nonceStr}&package=prepay_id=${data.prepay_id}&signType=MD5&timeStamp=${timeStamp}` | 441 | const stringA = `appId=wx115b25aa396d27ac&nonceStr=${nonceStr}&package=prepay_id=${data.prepay_id}&signType=MD5&timeStamp=${timeStamp}` |
| 442 | const stringSignTemp = stringA + '&key=NewMoney2017hatemydaddy123456789' | 442 | const stringSignTemp = stringA + '&key=NewMoney2017hatemydaddy123456789' |
| 443 | 443 | ||
| 444 | // 微信支付接口 | 444 | // 微信支付接口 |
| 445 | uni.requestPayment({ | 445 | uni.requestPayment({ |
| 446 | appId: data.appid, | 446 | appId: data.appid, |
| 447 | timeStamp, | 447 | timeStamp, |
| 448 | nonceStr, | 448 | nonceStr, |
| 449 | total_fee: this.totalPrice, | 449 | total_fee: this.totalPrice, |
| 450 | package: `prepay_id=${data.prepay_id}`, | 450 | package: `prepay_id=${data.prepay_id}`, |
| 451 | signType: 'MD5', | 451 | signType: 'MD5', |
| 452 | paySign: MD5Util.MD5(stringSignTemp).toUpperCase(), | 452 | paySign: MD5Util.MD5(stringSignTemp).toUpperCase(), |
| 453 | success: (res) => { | 453 | success: (res) => { |
| 454 | // 支付成功 | 454 | // 支付成功 |
| 455 | uni.showModal({ | 455 | uni.showModal({ |
| 456 | content: '支付成功', | 456 | content: '支付成功', |
| 457 | showCancel: false, | 457 | showCancel: false, |
| 458 | }) | 458 | }) |
| 459 | // 跳转订单详情页->状态 待收货 | 459 | // 跳转订单详情页->状态 待收货 |
| 460 | uni.reLaunch({ | 460 | uni.reLaunch({ |
| 461 | url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=1&isPay=1`, | 461 | url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=1&isPay=1`, |
| 462 | }) | 462 | }) |
| 463 | }, | 463 | }, |
| 464 | fail: (res) => { | 464 | fail: (res) => { |
| 465 | // 支付失败 | 465 | // 支付失败 |
| 466 | uni.showModal({ | 466 | uni.showModal({ |
| 467 | content: '支付失败', | 467 | content: '支付失败', |
| 468 | showCancel: false, | 468 | showCancel: false, |
| 469 | }) | 469 | }) |
| 470 | // 跳转订单详情页->状态 待付款 | 470 | // 跳转订单详情页->状态 待付款 |
| 471 | uni.reLaunch({ | 471 | uni.reLaunch({ |
| 472 | url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=0&isPay=1`, | 472 | url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=0&isPay=1`, |
| 473 | }) | 473 | }) |
| 474 | }, | 474 | }, |
| 475 | complete: () => { | 475 | complete: () => { |
| 476 | uni.hideLoading() | 476 | uni.hideLoading() |
| 477 | }, | 477 | }, |
| 478 | }) | 478 | }) |
| 479 | } else { | 479 | } else { |
| 480 | uni.showModal({ | 480 | uni.showModal({ |
| 481 | content: '支付失败', | 481 | content: '支付失败', |
| 482 | showCancel: false, | 482 | showCancel: false, |
| 483 | }) | 483 | }) |
| 484 | console.log('支付失败') | 484 | console.log('支付失败') |
| 485 | uni.hideLoading() | 485 | uni.hideLoading() |
| 486 | } | 486 | } |
| 487 | }) | 487 | }) |
| 488 | }, | 488 | }, |
| 489 | }, | 489 | }, |
| 490 | } | 490 | } |
| 491 | </script> | 491 | </script> |
| 492 | 492 | ||
| 493 | <style lang="scss"> | 493 | <style lang="scss"> |
| 494 | .wrap { | 494 | .wrap { |
| 495 | height: 100vh; | 495 | height: 100vh; |
| 496 | background-color: #f2f2f2; | 496 | background-color: #f2f2f2; |
| 497 | font-family: PingFangSC-Regular; | 497 | font-family: PingFangSC-Regular; |
| 498 | letter-spacing: -0.23px; | 498 | letter-spacing: -0.23px; |
| 499 | position: absolute; | 499 | position: absolute; |
| 500 | } | 500 | } |
| 501 | .addAddress { | 501 | .addAddress { |
| 502 | background-color: #ffffff; | 502 | background-color: #ffffff; |
| 503 | box-sizing: border-box; | 503 | box-sizing: border-box; |
| 504 | height: 124rpx; | 504 | height: 124rpx; |
| 505 | width: 100%; | 505 | width: 100%; |
| 506 | display: flex; | 506 | display: flex; |
| 507 | align-items: center; | 507 | align-items: center; |
| 508 | padding: 0 40rpx; | 508 | padding: 0 40rpx; |
| 509 | .addIcon { | 509 | .addIcon { |
| 510 | background-color: #f2f2f2; | 510 | background-color: #f2f2f2; |
| 511 | height: 56rpx; | 511 | height: 56rpx; |
| 512 | width: 60rpx; | 512 | width: 60rpx; |
| 513 | border-radius: 4rpx; | 513 | border-radius: 4rpx; |
| 514 | display: flex; | 514 | display: flex; |
| 515 | justify-content: center; | 515 | justify-content: center; |
| 516 | align-items: center; | 516 | align-items: center; |
| 517 | margin-right: 40rpx; | 517 | margin-right: 40rpx; |
| 518 | } | 518 | } |
| 519 | image { | 519 | image { |
| 520 | height: 28rpx; | 520 | height: 28rpx; |
| 521 | width: 30rpx; | 521 | width: 30rpx; |
| 522 | } | 522 | } |
| 523 | .addressText { | 523 | .addressText { |
| 524 | font-size: 28rpx; | 524 | font-size: 28rpx; |
| 525 | color: #333333; | 525 | color: #333333; |
| 526 | margin-right: 364rpx; | 526 | margin-right: 364rpx; |
| 527 | } | 527 | } |
| 528 | } | 528 | } |
| 529 | .content { | 529 | .content { |
| 530 | background-color: #f2f2f2; | 530 | background-color: #f2f2f2; |
| 531 | width: 100%; | 531 | width: 100%; |
| 532 | display: flex; | 532 | display: flex; |
| 533 | flex-direction: column; | 533 | flex-direction: column; |
| 534 | justify-content: center; | 534 | justify-content: center; |
| 535 | align-items: center; | 535 | align-items: center; |
| 536 | padding: 40rpx; | 536 | padding: 40rpx; |
| 537 | box-sizing: border-box; | 537 | box-sizing: border-box; |
| 538 | .orderInfo { | 538 | .orderInfo { |
| 539 | width: 670rpx; | 539 | width: 670rpx; |
| 540 | min-height: 488rpx; | 540 | min-height: 488rpx; |
| 541 | background-color: #ffffff; | 541 | background-color: #ffffff; |
| 542 | border-radius: 20rpx; | 542 | border-radius: 20rpx; |
| 543 | box-sizing: border-box; | 543 | box-sizing: border-box; |
| 544 | padding: 0 40rpx 40rpx 40rpx; | 544 | padding: 0 40rpx 40rpx 40rpx; |
| 545 | .title { | 545 | .title { |
| 546 | display: flex; | 546 | display: flex; |
| 547 | align-items: center; | 547 | align-items: center; |
| 548 | font-size: 28rpx; | 548 | font-size: 28rpx; |
| 549 | color: #333333; | 549 | color: #333333; |
| 550 | height: 60rpx; | 550 | height: 60rpx; |
| 551 | line-height: 40rpx; | 551 | line-height: 40rpx; |
| 552 | padding: 10rpx 10rpx 10rpx 0rpx; | 552 | padding: 10rpx 10rpx 10rpx 0rpx; |
| 553 | image { | 553 | image { |
| 554 | margin-right: 20rpx; | 554 | margin-right: 20rpx; |
| 555 | } | 555 | } |
| 556 | } | 556 | } |
| 557 | .infoBox { | 557 | .infoBox { |
| 558 | margin-top: 42rpx; | 558 | margin-top: 42rpx; |
| 559 | .infoTop { | 559 | .infoTop { |
| 560 | display: flex; | 560 | display: flex; |
| 561 | flex-direction: row; | 561 | flex-direction: row; |
| 562 | image { | 562 | image { |
| 563 | height: 188rpx; | 563 | height: 188rpx; |
| 564 | width: 188rpx; | 564 | width: 188rpx; |
| 565 | margin-right: 24rpx; | 565 | margin-right: 24rpx; |
| 566 | } | 566 | } |
| 567 | .infoRight { | 567 | .infoRight { |
| 568 | width: 374rpx; | 568 | width: 374rpx; |
| 569 | display: flex; | 569 | display: flex; |
| 570 | flex-direction: column; | 570 | flex-direction: column; |
| 571 | align-items: flex-start; | 571 | align-items: flex-start; |
| 572 | justify-content: space-between; | 572 | justify-content: space-between; |
| 573 | .goodName { | 573 | .goodName { |
| 574 | font-size: 28rpx; | 574 | font-size: 28rpx; |
| 575 | color: #333333; | 575 | color: #333333; |
| 576 | } | 576 | } |
| 577 | .remarks { | 577 | .remarks { |
| 578 | font-size: 20rpx; | 578 | font-size: 20rpx; |
| 579 | color: #999999; | 579 | color: #999999; |
| 580 | } | 580 | } |
| 581 | .priceBox { | 581 | .priceBox { |
| 582 | display: flex; | 582 | display: flex; |
| 583 | justify-content: space-between; | 583 | justify-content: space-between; |
| 584 | align-items: center; | 584 | align-items: center; |
| 585 | width: 100%; | 585 | width: 100%; |
| 586 | .price { | 586 | .price { |
| 587 | color: #ff6b4a; | 587 | color: #ff6b4a; |
| 588 | font-size: 28rpx; | 588 | font-size: 28rpx; |
| 589 | text{ | ||
| 590 | margin-left: 10rpx; | ||
| 591 | } | ||
| 589 | } | 592 | } |
| 590 | .originCost { | 593 | .originCost { |
| 591 | text-decoration: line-through; | 594 | text-decoration: line-through; |
| 592 | color: #999999; | 595 | color: #999999; |
| 593 | font-size: 20rpx; | 596 | font-size: 20rpx; |
| 594 | } | 597 | } |
| 595 | .counter { | 598 | .counter { |
| 596 | display: flex; | 599 | display: flex; |
| 597 | flex-direction: row; | 600 | flex-direction: row; |
| 598 | justify-content: space-between; | 601 | justify-content: space-between; |
| 599 | font-size: 28rpx; | 602 | font-size: 28rpx; |
| 600 | color: #333333; | 603 | color: #333333; |
| 601 | width: 122rpx; | 604 | width: 122rpx; |
| 602 | .btn { | 605 | .btn { |
| 603 | display: flex; | 606 | display: flex; |
| 604 | justify-content: center; | 607 | justify-content: center; |
| 605 | line-height: 32rpx; | 608 | line-height: 32rpx; |
| 606 | height: 32rpx; | 609 | height: 32rpx; |
| 607 | width: 32rpx; | 610 | width: 32rpx; |
| 608 | background-color: #f2f2f2; | 611 | background-color: #f2f2f2; |
| 609 | color: #cfcfcf; | 612 | color: #cfcfcf; |
| 610 | } | 613 | } |
| 611 | } | 614 | } |
| 612 | } | 615 | } |
| 613 | } | 616 | } |
| 614 | } | 617 | } |
| 615 | .infoBottom { | 618 | .infoBottom { |
| 616 | display: flex; | 619 | display: flex; |
| 617 | flex-direction: column; | 620 | flex-direction: column; |
| 618 | justify-content: flex-start; | 621 | justify-content: flex-start; |
| 619 | font-size: 24rpx; | 622 | font-size: 24rpx; |
| 620 | color: #333333; | 623 | color: #333333; |
| 621 | text { | 624 | text { |
| 622 | color: #999999; | 625 | color: #999999; |
| 623 | margin-left: 20rpx; | 626 | margin-left: 20rpx; |
| 624 | } | 627 | } |
| 625 | 628 | ||
| 626 | .norm { | 629 | .norm { |
| 627 | margin-top: 28rpx; | 630 | margin-top: 28rpx; |
| 628 | } | 631 | } |
| 629 | .shippingMethod { | 632 | .shippingMethod { |
| 630 | margin-top: 12rpx; | 633 | margin-top: 12rpx; |
| 631 | } | 634 | } |
| 632 | .message { | 635 | .message { |
| 633 | display: flex; | 636 | display: flex; |
| 634 | flex-direction: row; | 637 | flex-direction: row; |
| 635 | align-items: center; | 638 | align-items: center; |
| 636 | margin-top: 18rpx; | 639 | margin-top: 18rpx; |
| 637 | input { | 640 | input { |
| 638 | margin-left: 20rpx; | 641 | margin-left: 20rpx; |
| 639 | width: 75%; | 642 | width: 75%; |
| 640 | } | 643 | } |
| 641 | } | 644 | } |
| 642 | } | 645 | } |
| 643 | } | 646 | } |
| 644 | } | 647 | } |
| 645 | .payWay { | 648 | .payWay { |
| 646 | height: 464rpx; | 649 | height: 464rpx; |
| 647 | width: 670rpx; | 650 | width: 670rpx; |
| 648 | background-color: #ffffff; | 651 | background-color: #ffffff; |
| 649 | color: #333333; | 652 | color: #333333; |
| 650 | font-size: 24rpx; | 653 | font-size: 24rpx; |
| 651 | border-radius: 20rpx; | 654 | border-radius: 20rpx; |
| 652 | box-sizing: border-box; | 655 | box-sizing: border-box; |
| 653 | padding: 0 52rpx 0rpx 40rpx; | 656 | padding: 0 52rpx 0rpx 40rpx; |
| 654 | margin-top: 20rpx; | 657 | margin-top: 20rpx; |
| 655 | display: flex; | 658 | display: flex; |
| 656 | flex-direction: column; | 659 | flex-direction: column; |
| 657 | justify-content: center; | 660 | justify-content: center; |
| 658 | align-items: flex-start; | 661 | align-items: flex-start; |
| 659 | .item { | 662 | .item { |
| 660 | display: flex; | 663 | display: flex; |
| 661 | flex-direction: row; | 664 | flex-direction: row; |
| 662 | justify-content: space-between; | 665 | justify-content: space-between; |
| 663 | align-items: center; | 666 | align-items: center; |
| 664 | width: 100%; | 667 | width: 100%; |
| 665 | height: 115rpx; | 668 | height: 115rpx; |
| 666 | .itemRight { | 669 | .itemRight { |
| 667 | display: flex; | 670 | display: flex; |
| 668 | flex-direction: row; | 671 | flex-direction: row; |
| 669 | justify-content: space-between; | 672 | justify-content: space-between; |
| 670 | align-items: center; | 673 | align-items: center; |
| 671 | image { | 674 | image { |
| 672 | height: 24rpx; | 675 | height: 24rpx; |
| 673 | width: 12rpx; | 676 | width: 12rpx; |
| 674 | } | 677 | } |
| 675 | .rightText { | 678 | .rightText { |
| 676 | margin-right: 20rpx; | 679 | margin-right: 20rpx; |
| 677 | text-align: right; | 680 | text-align: right; |
| 678 | .choosePayWay { | 681 | .choosePayWay { |
| 679 | display: flex; | 682 | display: flex; |
| 680 | align-items: center; | 683 | align-items: center; |
| 681 | text { | 684 | text { |
| 682 | color: #333333; | 685 | color: #333333; |
| 683 | } | 686 | } |
| 684 | image { | 687 | image { |
| 685 | height: 36rpx; | 688 | height: 36rpx; |
| 686 | width: 40rpx; | 689 | width: 40rpx; |
| 687 | margin-right: 8px; | 690 | margin-right: 8px; |
| 688 | } | 691 | } |
| 689 | } | 692 | } |
| 690 | .randomSubstraction { | 693 | .randomSubstraction { |
| 691 | color: #ff6b4a; | 694 | color: #ff6b4a; |
| 692 | } | 695 | } |
| 693 | .preferentialWay { | 696 | .preferentialWay { |
| 694 | color: #999999; | 697 | color: #999999; |
| 695 | } | 698 | } |
| 696 | } | 699 | } |
| 697 | .freight, | 700 | .freight, |
| 698 | .total { | 701 | .total { |
| 699 | margin-right: 32rpx; | 702 | margin-right: 32rpx; |
| 700 | } | 703 | } |
| 701 | text { | 704 | text { |
| 702 | color: #ff6b4a; | 705 | color: #ff6b4a; |
| 703 | } | 706 | } |
| 704 | } | 707 | } |
| 705 | } | 708 | } |
| 706 | } | 709 | } |
| 707 | // .checkBox { | 710 | // .checkBox { |
| 708 | // height: 58rpx; | 711 | // height: 58rpx; |
| 709 | // line-height: 58rpx; | 712 | // line-height: 58rpx; |
| 710 | // width: 100%; | 713 | // width: 100%; |
| 711 | // margin-top: 36rpx; | 714 | // margin-top: 36rpx; |
| 712 | // margin-left: 40rpx; | 715 | // margin-left: 40rpx; |
| 713 | // font-size: 12px; | 716 | // font-size: 12px; |
| 714 | // color: #999999; | 717 | // color: #999999; |
| 715 | // } | 718 | // } |
| 716 | } | 719 | } |
| 717 | .footer { | 720 | .footer { |
| 718 | height: 112rpx; | 721 | height: 112rpx; |
| 719 | width: 100%; | 722 | width: 100%; |
| 720 | background-color: #fff; | 723 | background-color: #fff; |
| 721 | font-size: 16px; | 724 | font-size: 16px; |
| 722 | display: flex; | 725 | display: flex; |
| 723 | justify-content: space-between; | 726 | justify-content: space-between; |
| 724 | align-items: center; | 727 | align-items: center; |
| 725 | position: fixed; | 728 | position: fixed; |
| 726 | bottom: 0; | 729 | bottom: 0; |
| 727 | z-index: 9999; | 730 | z-index: 9999; |
| 728 | .footerLeft { | 731 | .footerLeft { |
| 729 | display: flex; | 732 | display: flex; |
| 730 | justify-content: center; | 733 | justify-content: center; |
| 731 | align-items: center; | 734 | align-items: center; |
| 732 | width: 50%; | 735 | width: 50%; |
| 733 | color: #333333; | 736 | color: #333333; |
| 734 | text { | 737 | text { |
| 735 | color: #ff6b4a; | 738 | color: #ff6b4a; |
| 736 | } | 739 | } |
| 737 | } | 740 | } |
| 738 | .footerRight { | 741 | .footerRight { |
| 739 | display: flex; | 742 | display: flex; |
| 740 | justify-content: flex-end; | 743 | justify-content: flex-end; |
| 741 | align-items: center; | 744 | align-items: center; |
| 742 | width: 50%; | 745 | width: 50%; |
| 743 | margin-right: 26rpx; | 746 | margin-right: 26rpx; |
| 744 | .paybtn { | 747 | .paybtn { |
| 745 | display: flex; | 748 | display: flex; |
| 746 | justify-content: center; | 749 | justify-content: center; |
| 747 | align-items: center; | 750 | align-items: center; |
| 748 | background: #ff6b4a; | 751 | background: #ff6b4a; |
| 749 | border-radius: 20px; | 752 | border-radius: 20px; |
| 750 | border-radius: 20px; | 753 | border-radius: 20px; |
| 751 | color: #ffffff; | 754 | color: #ffffff; |
| 752 | width: 204rpx; | 755 | width: 204rpx; |
| 753 | height: 80rpx; | 756 | height: 80rpx; |
| 754 | } | 757 | } |
| 755 | } | 758 | } |
| 756 | } | 759 | } |
| 757 | // 地址信息样式 | 760 | // 地址信息样式 |
| 758 | .order-user { | 761 | .order-user { |
| 759 | width: 670rpx; | 762 | width: 670rpx; |
| 760 | height: 228rpx; | 763 | height: 228rpx; |
| 761 | background: #ffffff; | 764 | background: #ffffff; |
| 762 | border-radius: 14rpx; | 765 | border-radius: 14rpx; |
| 763 | margin: 0 auto; | 766 | margin: 0 auto; |
| 764 | margin-top: 20rpx; | 767 | margin-top: 20rpx; |
| 765 | position: relative; | 768 | position: relative; |
| 766 | .order-user-head { | 769 | .order-user-head { |
| 767 | display: flex; | 770 | display: flex; |
| 768 | height: 108rpx; | 771 | height: 108rpx; |
| 769 | width: 100%; | 772 | width: 100%; |
| 770 | align-items: center; | 773 | align-items: center; |
| 771 | padding-left: 126rpx; | 774 | padding-left: 126rpx; |
| 772 | box-sizing: border-box; | 775 | box-sizing: border-box; |
| 773 | .name { | 776 | .name { |
| 774 | display: flex; | 777 | display: flex; |
| 775 | justify-content: space-between; | 778 | justify-content: space-between; |
| 776 | font-size: 14px; | 779 | font-size: 14px; |
| 777 | color: #333333; | 780 | color: #333333; |
| 778 | letter-spacing: -0.26px; | 781 | letter-spacing: -0.26px; |
| 779 | margin-right: 20rpx; | 782 | margin-right: 20rpx; |
| 780 | .default { | 783 | .default { |
| 781 | height: 40rpx; | 784 | height: 40rpx; |
| 782 | width: 80rpx; | 785 | width: 80rpx; |
| 783 | background-color: #4a90e2; | 786 | background-color: #4a90e2; |
| 784 | border-radius: 13px; | 787 | border-radius: 13px; |
| 785 | border-radius: 13px; | 788 | border-radius: 13px; |
| 786 | text-align: center; | 789 | text-align: center; |
| 787 | margin-right: 20rpx; | 790 | margin-right: 20rpx; |
| 788 | text { | 791 | text { |
| 789 | display: flex; | 792 | display: flex; |
| 790 | justify-content: center; | 793 | justify-content: center; |
| 791 | align-items: center; | 794 | align-items: center; |
| 792 | font-size: 12px; | 795 | font-size: 12px; |
| 793 | color: #ffffff; | 796 | color: #ffffff; |
| 794 | letter-spacing: -0.23px; | 797 | letter-spacing: -0.23px; |
| 795 | } | 798 | } |
| 796 | } | 799 | } |
| 797 | } | 800 | } |
| 798 | .mobile { | 801 | .mobile { |
| 799 | font-size: 14px; | 802 | font-size: 14px; |
| 800 | color: #999999; | 803 | color: #999999; |
| 801 | letter-spacing: -0.26px; | 804 | letter-spacing: -0.26px; |
| 802 | } | 805 | } |
| 803 | } | 806 | } |
| 804 | .order-user-body { | 807 | .order-user-body { |
| 805 | display: flex; | 808 | display: flex; |
| 806 | width: 100%; | 809 | width: 100%; |
| 807 | image { | 810 | image { |
| 808 | width: 24px; | 811 | width: 24px; |
| 809 | height: 28px; | 812 | height: 28px; |
| 810 | margin: 12rpx 32rpx 0 40rpx; | 813 | margin: 12rpx 32rpx 0 40rpx; |
| 811 | } | 814 | } |
| 812 | .address { | 815 | .address { |
| 813 | font-weight: bold; | 816 | font-weight: bold; |
| 814 | font-size: 14px; | 817 | font-size: 14px; |
| 815 | color: #333333; | 818 | color: #333333; |
| 816 | letter-spacing: -0.26px; | 819 | letter-spacing: -0.26px; |
| 817 | } | 820 | } |
| 818 | } | 821 | } |
| 819 | .arrow { | 822 | .arrow { |
| 820 | width: 12px; | 823 | width: 12px; |
| 821 | height: 12px; | 824 | height: 12px; |
| 822 | position: absolute; | 825 | position: absolute; |
| 823 | right: 40rpx; | 826 | right: 40rpx; |
| 824 | bottom: 104rpx; | 827 | bottom: 104rpx; |
| 825 | } | 828 | } |
| 826 | } | 829 | } |
| 827 | .last_zhanwei { | 830 | .last_zhanwei { |
| 828 | background: #f2f2f2; | 831 | background: #f2f2f2; |
| 829 | height: 60px; | 832 | height: 60px; |
| 830 | } | 833 | } |
| 831 | </style> | 834 | </style> |
| 832 | 835 |
src/pages/newOpticsData/newOpticsData.vue
| 1 | <template> | 1 | <template> |
| 2 | <view class="wrap"> | 2 | <view class="wrap"> |
| 3 | <view class="body"> | 3 | <view class="body"> |
| 4 | <template > | 4 | <template > |
| 5 | <view class="goods-form"> | 5 | <view class="goods-form"> |
| 6 | <view class="p1"> | 6 | <view class="p1"> |
| 7 | <image class="image2" src="../../static/img/myOpticsData/dataWrite.png" mode="aspectFit"></image> | 7 | <image class="image2" src="../../static/img/myOpticsData/dataWrite.png" mode="aspectFit"></image> |
| 8 | 填写验光数据 | 8 | 填写验光数据 |
| 9 | </view> | 9 | </view> |
| 10 | <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> | 10 | <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> |
| 11 | <view class="picker"> | 11 | <view class="picker"> |
| 12 | <view class="picker-choice"> | 12 | <view class="picker-choice"> |
| 13 | <view class="choice-left"> | 13 | <view class="choice-left"> |
| 14 | <text class="pd">验光单取名:</text> | 14 | <text class="pd">验光单取名:</text> |
| 15 | </view> | 15 | </view> |
| 16 | <input type="text" @change="handleInput" class="input" | 16 | <input type="text" @change="handleInput" class="input" |
| 17 | placeholder="请输入名称" maxlength="20" :value="name" /> | 17 | placeholder="请输入名称" maxlength="20" :value="name" /> |
| 18 | </view> | 18 | </view> |
| 19 | </view> | 19 | </view> |
| 20 | <view class="picker" > | 20 | <view class="picker" > |
| 21 | <view class="picker-choice"> | 21 | <view class="picker-choice"> |
| 22 | <view class="choice-left"> | 22 | <view class="choice-left"> |
| 23 | <text class="p11">{{pickerInfoList[0].nameC}}</text> | 23 | <text class="p11">{{pickerInfoList[0].nameC}}</text> |
| 24 | <text class="p12">{{pickerInfoList[0].nameE}}</text> | 24 | <text class="p12">{{pickerInfoList[0].nameE}}</text> |
| 25 | </view> | 25 | </view> |
| 26 | <text class="p13">左 (OD)</text> | 26 | <text class="p13">左 (OD)</text> |
| 27 | <!-- <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> --> | 27 | <!-- <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> --> |
| 28 | <picker @change="bindPickerChange01" :value="pickerInfoList[0].nameIndex1" :range="pickerInfoList[0].nameArray1"> | 28 | <picker @change="bindPickerChange01" :value="pickerInfoList[0].nameIndex1" :range="pickerInfoList[0].nameArray1"> |
| 29 | <view class="p14"> | 29 | <view class="p14"> |
| 30 | {{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}} | 30 | {{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}} |
| 31 | <image src="../../static/detail-tabicon.png" ></image> | 31 | <image src="../../static/detail-tabicon.png" ></image> |
| 32 | </view> | 32 | </view> |
| 33 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 33 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 34 | </picker> | 34 | </picker> |
| 35 | <text class="p13">右 (OS)</text> | 35 | <text class="p13">右 (OS)</text> |
| 36 | <!-- <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> --> | 36 | <!-- <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> --> |
| 37 | <picker @change="bindPickerChange02" :value="pickerInfoList[0].nameIndex2" :range="pickerInfoList[0].nameArray2"> | 37 | <picker @change="bindPickerChange02" :value="pickerInfoList[0].nameIndex2" :range="pickerInfoList[0].nameArray2"> |
| 38 | <view class="p14"> | 38 | <view class="p14"> |
| 39 | {{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}} | 39 | {{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}} |
| 40 | <image src="../../static/detail-tabicon.png" ></image> | 40 | <image src="../../static/detail-tabicon.png" ></image> |
| 41 | </view> | 41 | </view> |
| 42 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 42 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 43 | </picker> | 43 | </picker> |
| 44 | </view> | 44 | </view> |
| 45 | </view> | 45 | </view> |
| 46 | <view class="picker" > | 46 | <view class="picker" > |
| 47 | <view class="picker-choice"> | 47 | <view class="picker-choice"> |
| 48 | <view class="choice-left"> | 48 | <view class="choice-left"> |
| 49 | <text class="p11">{{pickerInfoList[1].nameC}}</text> | 49 | <text class="p11">{{pickerInfoList[1].nameC}}</text> |
| 50 | <text class="p12">{{pickerInfoList[1].nameE}}</text> | 50 | <text class="p12">{{pickerInfoList[1].nameE}}</text> |
| 51 | </view> | 51 | </view> |
| 52 | <text class="p13">左 (OD)</text> | 52 | <text class="p13">左 (OD)</text> |
| 53 | <!-- <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> --> | 53 | <!-- <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> --> |
| 54 | <picker @change="bindPickerChange11" :value="pickerInfoList[1].nameIndex1" :range="pickerInfoList[1].nameArray1"> | 54 | <picker @change="bindPickerChange11" :value="pickerInfoList[1].nameIndex1" :range="pickerInfoList[1].nameArray1"> |
| 55 | <view class="p14"> | 55 | <view class="p14"> |
| 56 | {{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}} | 56 | {{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}} |
| 57 | <image src="../../static/detail-tabicon.png" ></image> | 57 | <image src="../../static/detail-tabicon.png" ></image> |
| 58 | </view> | 58 | </view> |
| 59 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 59 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 60 | </picker> | 60 | </picker> |
| 61 | <text class="p13">右 (OS)</text> | 61 | <text class="p13">右 (OS)</text> |
| 62 | <!-- <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> --> | 62 | <!-- <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> --> |
| 63 | <picker @change="bindPickerChange12" :value="pickerInfoList[1].nameIndex2" :range="pickerInfoList[1].nameArray2"> | 63 | <picker @change="bindPickerChange12" :value="pickerInfoList[1].nameIndex2" :range="pickerInfoList[1].nameArray2"> |
| 64 | <view class="p14"> | 64 | <view class="p14"> |
| 65 | {{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}} | 65 | {{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}} |
| 66 | <image src="../../static/detail-tabicon.png" ></image> | 66 | <image src="../../static/detail-tabicon.png" ></image> |
| 67 | </view> | 67 | </view> |
| 68 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 68 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 69 | </picker> | 69 | </picker> |
| 70 | </view> | 70 | </view> |
| 71 | </view> | 71 | </view> |
| 72 | <view class="picker" > | 72 | <view class="picker" > |
| 73 | <view class="picker-choice"> | 73 | <view class="picker-choice"> |
| 74 | <view class="choice-left"> | 74 | <view class="choice-left"> |
| 75 | <text class="p11">{{pickerInfoList[2].nameC}}</text> | 75 | <text class="p11">{{pickerInfoList[2].nameC}}</text> |
| 76 | <text class="p12">{{pickerInfoList[2].nameE}}</text> | 76 | <text class="p12">{{pickerInfoList[2].nameE}}</text> |
| 77 | </view> | 77 | </view> |
| 78 | <text class="p13">左 (OD)</text> | 78 | <text class="p13">左 (OD)</text> |
| 79 | <picker @change="bindPickerChange21" :value="pickerInfoList[2].nameIndex1" :range="pickerInfoList[2].nameArray1"> | 79 | <picker @change="bindPickerChange21" :value="pickerInfoList[2].nameIndex1" :range="pickerInfoList[2].nameArray1"> |
| 80 | <view class="p14"> | 80 | <view class="p14"> |
| 81 | {{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}} | 81 | {{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}} |
| 82 | <image src="../../static/detail-tabicon.png" ></image> | 82 | <image src="../../static/detail-tabicon.png" ></image> |
| 83 | </view> | 83 | </view> |
| 84 | </picker> | 84 | </picker> |
| 85 | <text class="p13">右 (OS)</text> | 85 | <text class="p13">右 (OS)</text> |
| 86 | <!-- <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> --> | 86 | <!-- <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> --> |
| 87 | <picker @change="bindPickerChange22" :value="pickerInfoList[2].nameIndex2" :range="pickerInfoList[2].nameArray2"> | 87 | <picker @change="bindPickerChange22" :value="pickerInfoList[2].nameIndex2" :range="pickerInfoList[2].nameArray2"> |
| 88 | <view class="p14"> | 88 | <view class="p14"> |
| 89 | {{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}} | 89 | {{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}} |
| 90 | <image src="../../static/detail-tabicon.png" ></image> | 90 | <image src="../../static/detail-tabicon.png" ></image> |
| 91 | </view> | 91 | </view> |
| 92 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> | 92 | <!-- <image src="../../static/detail-tabicon.png" ></image> --> |
| 93 | </picker> | 93 | </picker> |
| 94 | </view> | 94 | </view> |
| 95 | </view> | 95 | </view> |
| 96 | <view class="picker"> | 96 | <view class="picker"> |
| 97 | <view class="picker-choice"> | 97 | <view class="picker-choice"> |
| 98 | <view class="choice-left"> | 98 | <view class="choice-left"> |
| 99 | <text class="pd">瞳距:</text> | 99 | <text class="pd">瞳距:</text> |
| 100 | </view> | 100 | </view> |
| 101 | <input type="digit" @change="handleInputPd" class="input" | 101 | <input type="digit" @change="handleInputPd" class="input" |
| 102 | placeholder="请输入瞳距,单位cm" maxlength="20" :value="pd" /> | 102 | placeholder="请输入瞳距,单位cm" maxlength="20" :value="pd" /> |
| 103 | </view> | 103 | </view> |
| 104 | </view> | 104 | </view> |
| 105 | <view class="picker" > | 105 | <view class="picker" > |
| 106 | <view class="picker-choice"> | 106 | <view class="picker-choice"> |
| 107 | <view class="choice-left"> | 107 | <view class="choice-left"> |
| 108 | <text class="p11">{{pickerInfoList[3].nameC}}</text> | 108 | <text class="p11">{{pickerInfoList[3].nameC}}</text> |
| 109 | </view> | 109 | </view> |
| 110 | <text class="p13-date">年 (Y)</text> | 110 | <text class="p13-date">年 (Y)</text> |
| 111 | <picker @change="bindPickerChange41" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1"> | 111 | <picker @change="bindPickerChange41" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1"> |
| 112 | <view class="p14" style="width: 30px;"> | 112 | <view class="p14" style="width: 30px;"> |
| 113 | {{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}} | 113 | {{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}} |
| 114 | <image src="../../static/detail-tabicon.png" ></image> | 114 | <image src="../../static/detail-tabicon.png" ></image> |
| 115 | </view> | 115 | </view> |
| 116 | </picker> | 116 | </picker> |
| 117 | <text class="p13-date">月 (M)</text> | 117 | <text class="p13-date">月 (M)</text> |
| 118 | <picker @change="bindPickerChange42" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2"> | 118 | <picker @change="bindPickerChange42" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2"> |
| 119 | <view class="p14" style="width: 30px;"> | 119 | <view class="p14" style="width: 30px;"> |
| 120 | {{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}} | 120 | {{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}} |
| 121 | <image src="../../static/detail-tabicon.png" ></image> | 121 | <image src="../../static/detail-tabicon.png" ></image> |
| 122 | </view> | 122 | </view> |
| 123 | </picker> | 123 | </picker> |
| 124 | <text class="p13-date">日 (D)</text> | 124 | <text class="p13-date">日 (D)</text> |
| 125 | <picker @change="bindPickerChange43" :value="pickerInfoList[3].nameIndex3" :range="pickerInfoList[3].nameArray3"> | 125 | <picker @change="bindPickerChange43" :value="pickerInfoList[3].nameIndex3" :range="pickerInfoList[3].nameArray3"> |
| 126 | <view class="p14" style="width: 30px;"> | 126 | <view class="p14" style="width: 30px;"> |
| 127 | {{pickerInfoList[3].nameArray3[pickerInfoList[3].nameIndex3]}} | 127 | {{pickerInfoList[3].nameArray3[pickerInfoList[3].nameIndex3]}} |
| 128 | <image src="../../static/detail-tabicon.png" ></image> | 128 | <image src="../../static/detail-tabicon.png" ></image> |
| 129 | </view> | 129 | </view> |
| 130 | </picker> | 130 | </picker> |
| 131 | </view> | 131 | </view> |
| 132 | </view> | 132 | </view> |
| 133 | <view class="ipts"> | 133 | <view class="ipts"> |
| 134 | <view class="inputItem"> | 134 | <view class="inputItem"> |
| 135 | <text class="text">镜片宽度</text> | 135 | <text class="text">镜片宽度</text> |
| 136 | <input class="input" @input="glassInfoInput($event,0)" type="text" :value="glassInfo.glassWidth" placeholder="请输入镜片宽度"/> | 136 | <input class="input" @input="glassInfoInput($event,0)" type="text" :value="glassInfo.glassWidth!='0'?glassInfo.glassWidth:''" placeholder="请输入镜片宽度"/> |
| 137 | </view> | 137 | </view> |
| 138 | <view class="inputItem"> | 138 | <view class="inputItem"> |
| 139 | <text class="text">鼻梁宽度</text> | 139 | <text class="text">鼻梁宽度</text> |
| 140 | <input class="input" @input="glassInfoInput($event,1)" type="text" :value="glassInfo.norseWidth" placeholder="请输入鼻梁宽度"/> | 140 | <input class="input" @input="glassInfoInput($event,1)" type="text" :value="glassInfo.norseWidth!='0'?glassInfo.norseWidth:''" placeholder="请输入鼻梁宽度"/> |
| 141 | </view> | 141 | </view> |
| 142 | <view class="inputItem"> | 142 | <view class="inputItem"> |
| 143 | <text class="text">镜腿长度</text> | 143 | <text class="text">镜腿长度</text> |
| 144 | <input class="input" @input="glassInfoInput($event,2)" type="text" :value="glassInfo.legWidth" placeholder="请输入镜腿长度"/> | 144 | <input class="input" @input="glassInfoInput($event,2)" type="text" :value="glassInfo.legWidth!='0'?glassInfo.legWidth:''" placeholder="请输入镜腿长度"/> |
| 145 | </view> | 145 | </view> |
| 146 | 146 | ||
| 147 | </view> | 147 | </view> |
| 148 | <view class="confirm"> | 148 | <view class="confirm"> |
| 149 | <image class="image1" :src="confirm ? tabicon[0] : tabicon[1]" @tap="changeConfirm"></image> | 149 | <image class="image1" :src="confirm ? tabicon[0] : tabicon[1]" @tap="changeConfirm"></image> |
| 150 | <text>确认以上输入信息来源于我的验光数据!</text> | 150 | <text>确认以上输入信息来源于我的验光数据!</text> |
| 151 | </view> | 151 | </view> |
| 152 | </view> | 152 | </view> |
| 153 | 153 | ||
| 154 | </template> | 154 | </template> |
| 155 | </view> | 155 | </view> |
| 156 | 156 | ||
| 157 | 157 | ||
| 158 | <view class="footer" @click="handleSubmit"> | 158 | <view class="footer" @click="handleSubmit"> |
| 159 | <button class="btn" type="default">提 交</button> | 159 | <button class="btn" type="default">提 交</button> |
| 160 | </view> | 160 | </view> |
| 161 | </view> | 161 | </view> |
| 162 | </template> | 162 | </template> |
| 163 | 163 | ||
| 164 | <script> | 164 | <script> |
| 165 | import store from '@/store'; | 165 | import store from '@/store'; |
| 166 | 166 | ||
| 167 | export default { | 167 | export default { |
| 168 | data() { | 168 | data() { |
| 169 | return { | 169 | return { |
| 170 | pickerInfoList:[ | 170 | pickerInfoList:[ |
| 171 | {nameC:"度数",nameE:"(SPH)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:0}, | 171 | {nameC:"度数",nameE:"(SPH)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:0}, |
| 172 | {nameC:"散光",nameE:"(CYL)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:1}, | 172 | {nameC:"散光",nameE:"(CYL)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:1}, |
| 173 | {nameC:"散光轴位",nameE:"(AXI)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:2}, | 173 | {nameC:"散光轴位",nameE:"(AXI)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:2}, |
| 174 | {nameC:"验光日期",nameE:'',nameArray1:[''],nameIndex1:0,nameArray2:['',1,2,3,4,5,6,7,8,9,10,11,12],nameIndex2:0,nameArray3:[''],nameIndex3:0} | 174 | {nameC:"验光日期",nameE:'',nameArray1:[''],nameIndex1:0,nameArray2:['',1,2,3,4,5,6,7,8,9,10,11,12],nameIndex2:0,nameArray3:[''],nameIndex3:0} |
| 175 | ], | 175 | ], |
| 176 | confirm: false, // 用户是否确认 | 176 | confirm: false, // 用户是否确认 |
| 177 | tabicon:['/static/detail-button.png','/static/detail-button-unselected.png'], | 177 | tabicon:['/static/detail-button.png','/static/detail-button-unselected.png'], |
| 178 | name: '请输入W姓名', | 178 | name: '请输入W姓名', |
| 179 | oldname:'',// 用于判读用户是否改变名字 | 179 | oldname:'',// 用于判读用户是否改变名字 |
| 180 | pickerInfoChioce:{ | 180 | pickerInfoChioce:{ |
| 181 | "leftSph": '', | 181 | "leftSph": '', |
| 182 | "rightSph": '', | 182 | "rightSph": '', |
| 183 | "leftCyl": '', | 183 | "leftCyl": '', |
| 184 | "rightCyl": '', | 184 | "rightCyl": '', |
| 185 | "leftAxi": '', | 185 | "leftAxi": '', |
| 186 | "rightAxi": '', | 186 | "rightAxi": '', |
| 187 | "time":{ | 187 | "time":{ |
| 188 | "year":0, | 188 | "year":0, |
| 189 | "month": 0, | 189 | "month": 0, |
| 190 | "day":0 , | 190 | "day":0 , |
| 191 | } | 191 | } |
| 192 | }, | 192 | }, |
| 193 | glassInfo:{ | 193 | glassInfo:{ |
| 194 | norseWidth:0,//鼻宽 | 194 | norseWidth:0,//鼻宽 |
| 195 | glassWidth:0,//镜片宽度 | 195 | glassWidth:0,//镜片宽度 |
| 196 | legWidth:0//镜腿长度 | 196 | legWidth:0//镜腿长度 |
| 197 | }, | 197 | }, |
| 198 | pd: '',// 瞳距 | 198 | pd: '',// 瞳距 |
| 199 | oldpd: '',// 用于判断用户是否改变瞳距 | 199 | oldpd: '',// 用于判断用户是否改变瞳距 |
| 200 | kinds:Number, // kinds=1,提交为新增验光,2为修改 | 200 | kinds:Number, // kinds=1,提交为新增验光,2为修改 |
| 201 | mp_id: Number | 201 | mp_id: Number, |
| 202 | loveItem:Object | ||
| 202 | }; | 203 | }; |
| 203 | }, | 204 | }, |
| 204 | onLoad: function (option) { | 205 | onLoad: function (option) { |
| 205 | //option为object类型,会序列化上个页面传递的参数 | 206 | //option为object类型,会序列化上个页面传递的参数 |
| 206 | // 初始化SPL、CYL、AXI的值 | 207 | // 初始化SPL、CYL、AXI的值 |
| 207 | for (let j = 0; j < 3; j++) { | 208 | for (let j = 0; j < 3; j++) { |
| 208 | for(let i=-12;i<6;i++){ | 209 | for(let i=-12;i<6;i++){ |
| 209 | this.pickerInfoList[j].nameArray1.push(i) | 210 | this.pickerInfoList[j].nameArray1.push(i) |
| 210 | this.pickerInfoList[j].nameArray1.push(i+0.5) | 211 | this.pickerInfoList[j].nameArray1.push(i+0.5) |
| 211 | this.pickerInfoList[j].nameArray2.push(i) | 212 | this.pickerInfoList[j].nameArray2.push(i) |
| 212 | this.pickerInfoList[j].nameArray2.push(i+0.5) | 213 | this.pickerInfoList[j].nameArray2.push(i+0.5) |
| 213 | if(i>=-6){ | 214 | if(i>=-6){ |
| 214 | this.pickerInfoList[j].nameArray1.push(i+0.25) | 215 | this.pickerInfoList[j].nameArray1.push(i+0.25) |
| 215 | this.pickerInfoList[j].nameArray1.push(i+0.75) | 216 | this.pickerInfoList[j].nameArray1.push(i+0.75) |
| 216 | this.pickerInfoList[j].nameArray2.push(i+0.25) | 217 | this.pickerInfoList[j].nameArray2.push(i+0.25) |
| 217 | this.pickerInfoList[j].nameArray2.push(i+0.75) | 218 | this.pickerInfoList[j].nameArray2.push(i+0.75) |
| 218 | } | 219 | } |
| 219 | if(i==5){ | 220 | if(i==5){ |
| 220 | this.pickerInfoList[j].nameArray1.push(i+1) | 221 | this.pickerInfoList[j].nameArray1.push(i+1) |
| 221 | this.pickerInfoList[j].nameArray2.push(i+1) | 222 | this.pickerInfoList[j].nameArray2.push(i+1) |
| 222 | } | 223 | } |
| 223 | } | 224 | } |
| 224 | } | 225 | } |
| 225 | // 初始化日期值 | 226 | // 初始化日期值 |
| 226 | for (let i = 1; i < 32; i++){ | 227 | for (let i = 1; i < 32; i++){ |
| 227 | this.pickerInfoList[3].nameArray3.push(i) | 228 | this.pickerInfoList[3].nameArray3.push(i) |
| 228 | } | 229 | } |
| 229 | // 初始化年份前后五年 | 230 | // 初始化年份前后五年 |
| 230 | let myDate = new Date(); | 231 | let myDate = new Date(); |
| 231 | let nowYear = myDate.getFullYear(); | 232 | let nowYear = myDate.getFullYear(); |
| 232 | for(let i=0;i<5;i++){ | 233 | for(let i=0;i<5;i++){ |
| 233 | this.pickerInfoList[3].nameArray1.push(nowYear-i) | 234 | this.pickerInfoList[3].nameArray1.push(nowYear-i) |
| 234 | } | 235 | } |
| 235 | 236 | ||
| 236 | this.kinds=option.kinds | 237 | this.kinds=option.kinds |
| 237 | if(option.kinds==1){ | 238 | if(option.kinds==1){ |
| 238 | this.name= ''; | 239 | this.name= ''; |
| 239 | this.pd= ''; | 240 | this.pd= ''; |
| 240 | } else{ | 241 | } else{ |
| 241 | console.log('args===>',option.index) | 242 | console.log('args===>',option.index) |
| 242 | const loveList=Object.assign({},this.$store.state.myLoveList.loveList) | 243 | const loveList=Object.assign({},this.$store.state.myLoveList.loveList) |
| 243 | console.log('args===>',loveList[option.index].in_time) | 244 | // console.log('args===>',loveList[option.index].in_time) |
| 244 | console.log('args===>',loveList[option.index].in_time.toString().slice(0,4)) | 245 | // console.log('args===>',loveList[option.index].in_time.toString().slice(0,4)) |
| 245 | console.log('args===>',loveList[option.index].in_time.toString().slice(5,6)==0) | 246 | // console.log('args===>',loveList[option.index].in_time.toString().slice(5,6)==0) |
| 246 | console.log('args===>',loveList[option.index].in_time.toString().slice(8,10)) | 247 | // console.log('args===>',loveList[option.index].in_time.toString().slice(8,10)) |
| 247 | this.name=loveList[option.index].name | 248 | this.name=loveList[option.index].name |
| 248 | this.pd=loveList[option.index].pd | 249 | this.pd=loveList[option.index].pd |
| 249 | this.mp_id=loveList[option.index].mp_id | 250 | this.mp_id=loveList[option.index].mp_id |
| 250 | this.oldname=loveList[option.index].name | 251 | this.oldname=loveList[option.index].name |
| 251 | this.oldpd=loveList[option.index].pd | 252 | this.oldpd=loveList[option.index].pd |
| 252 | // 将kinds =2时的值传到该页面 | 253 | // 将kinds =2时的值传到该页面 |
| 253 | this.pickerInfoList[0].nameArray1.unshift(loveList[option.index].leftSph) | 254 | this.pickerInfoList[0].nameArray1.unshift(loveList[option.index].leftSph) |
| 254 | this.pickerInfoList[0].nameArray2.unshift(loveList[option.index].rightSph) | 255 | this.pickerInfoList[0].nameArray2.unshift(loveList[option.index].rightSph) |
| 255 | this.pickerInfoList[1].nameArray1.unshift(loveList[option.index].leftCyl) | 256 | this.pickerInfoList[1].nameArray1.unshift(loveList[option.index].leftCyl) |
| 256 | this.pickerInfoList[1].nameArray2.unshift(loveList[option.index].rightCyl) | 257 | this.pickerInfoList[1].nameArray2.unshift(loveList[option.index].rightCyl) |
| 257 | this.pickerInfoList[2].nameArray1.unshift(loveList[option.index].leftAxi) | 258 | this.pickerInfoList[2].nameArray1.unshift(loveList[option.index].leftAxi) |
| 258 | this.pickerInfoList[2].nameArray2.unshift(loveList[option.index].rightAxi) | 259 | this.pickerInfoList[2].nameArray2.unshift(loveList[option.index].rightAxi) |
| 259 | 260 | ||
| 260 | this.pickerInfoList[3].nameArray1.unshift(loveList[option.index].in_time.toString().slice(0,4)) | 261 | this.pickerInfoList[3].nameArray1.unshift(loveList[option.index].in_time.toString().slice(0,4)) |
| 261 | if(loveList[option.index].in_time.toString().slice(5,6)==0){ | 262 | if(loveList[option.index].in_time.toString().slice(5,6)==0){ |
| 262 | this.pickerInfoList[3].nameArray2.unshift(loveList[option.index].in_time.toString().slice(6,7)) | 263 | this.pickerInfoList[3].nameArray2.unshift(loveList[option.index].in_time.toString().slice(6,7)) |
| 263 | } else{ | 264 | } else{ |
| 264 | this.pickerInfoList[3].nameArray2.unshift(loveList[option.index].in_time.toString().slice(5,7)) | 265 | this.pickerInfoList[3].nameArray2.unshift(loveList[option.index].in_time.toString().slice(5,7)) |
| 265 | } | 266 | } |
| 266 | if(loveList[option.index].in_time.toString().slice(8,9)==0){ | 267 | if(loveList[option.index].in_time.toString().slice(8,9)==0){ |
| 267 | this.pickerInfoList[3].nameArray3.unshift(loveList[option.index].in_time.toString().slice(9,10)) | 268 | this.pickerInfoList[3].nameArray3.unshift(loveList[option.index].in_time.toString().slice(9,10)) |
| 268 | } else{ | 269 | } else{ |
| 269 | this.pickerInfoList[3].nameArray3.unshift(loveList[option.index].in_time.toString().slice(8,10)) | 270 | this.pickerInfoList[3].nameArray3.unshift(loveList[option.index].in_time.toString().slice(8,10)) |
| 270 | } | 271 | } |
| 272 | this.glassInfo.glassWidth = loveList[option.index].glassWidth | ||
| 273 | this.glassInfo.norseWidth = loveList[option.index].norseWidth | ||
| 274 | this.glassInfo.legWidth = loveList[option.index].legWidth | ||
| 275 | this.loveItem = loveList[option.index] | ||
| 276 | } | ||
| 277 | }, | ||
| 278 | computed:{ | ||
| 279 | //判断当前眼镜信息是否有0 | ||
| 280 | glassInfoRight(){ | ||
| 281 | const glassInfoArr = Object.values(this.glassInfo) | ||
| 282 | return glassInfoArr.find(item => item == '0') ==undefined | ||
| 271 | } | 283 | } |
| 272 | }, | 284 | }, |
| 273 | methods:{ | 285 | methods:{ |
| 274 | glassInfoInput(e,type){ | 286 | glassInfoInput(e,type){ |
| 275 | switch(type){ | 287 | switch(type){ |
| 276 | case 0: | 288 | case 0: |
| 277 | this.glassInfo.glassWidth = e.detail.value | 289 | this.glassInfo.glassWidth = e.detail.value |
| 278 | break; | 290 | break; |
| 279 | case 1: | 291 | case 1: |
| 280 | this.glassInfo.norseWidth = e.detail.value | 292 | this.glassInfo.norseWidth = e.detail.value |
| 281 | break; | 293 | break; |
| 282 | case 2: | 294 | case 2: |
| 283 | this.glassInfo.legWidth = e.detail.value | 295 | this.glassInfo.legWidth = e.detail.value |
| 284 | break; | 296 | break; |
| 285 | default: | 297 | default: |
| 286 | break; | 298 | break; |
| 287 | } | 299 | } |
| 288 | }, | 300 | }, |
| 289 | handleInput(e){ | 301 | handleInput(e){ |
| 290 | this.name=e.target.value | 302 | this.name=e.target.value |
| 291 | }, | 303 | }, |
| 292 | handleInputPd(e){ | 304 | handleInputPd(e){ |
| 293 | // 只能输入正浮点数或正数 | 305 | // 只能输入正浮点数或正数 |
| 294 | if(/^\d+(\.\d+)?$/.test(e.target.value)){ | 306 | if(/^\d+(\.\d+)?$/.test(e.target.value)){ |
| 295 | this.pd=e.target.value | 307 | this.pd=e.target.value |
| 296 | } else { | 308 | } else { |
| 297 | uni.showToast({ | 309 | uni.showToast({ |
| 298 | title:"请输入有效数据;示例:89", | 310 | title:"请输入有效数据;示例:89", |
| 299 | icon: "none", | 311 | icon: "none", |
| 300 | duration: 2000, | 312 | duration: 2000, |
| 301 | }) | 313 | }) |
| 302 | this.pd = '' | 314 | this.pd = '' |
| 303 | } | 315 | } |
| 304 | 316 | ||
| 305 | }, | 317 | }, |
| 318 | updateMylove(){ | ||
| 319 | const loveItem = this.loveItem | ||
| 320 | const glassWidth = this.glassInfo.glassWidth | ||
| 321 | const norseWidth = this.glassInfo.norseWidth | ||
| 322 | const legWidth = this.glassInfo.legWidth | ||
| 323 | // console.log(loveItem.glassWidth) | ||
| 324 | // console.log(glassWidth) | ||
| 325 | if(loveItem.glassWidth !== glassWidth){ | ||
| 326 | store.dispatch('myLoveList/updateMylove', { | ||
| 327 | uid: this.$store.state.user.userInfo.uid, | ||
| 328 | openid: this.$store.state.user.userInfo.openid, | ||
| 329 | mp_id: this.mp_id, | ||
| 330 | keyname: 'glassWidth', | ||
| 331 | keyvalue: glassWidth | ||
| 332 | }); | ||
| 333 | } | ||
| 334 | if(loveItem.norseWidth !== norseWidth){ | ||
| 335 | store.dispatch('myLoveList/updateMylove', { | ||
| 336 | uid: this.$store.state.user.userInfo.uid, | ||
| 337 | openid: this.$store.state.user.userInfo.openid, | ||
| 338 | mp_id: this.mp_id, | ||
| 339 | keyname: 'norseWidth', | ||
| 340 | keyvalue: norseWidth | ||
| 341 | }); | ||
| 342 | } | ||
| 343 | if(loveItem.legWidth !== legWidth){ | ||
| 344 | store.dispatch('myLoveList/updateMylove', { | ||
| 345 | uid: this.$store.state.user.userInfo.uid, | ||
| 346 | openid: this.$store.state.user.userInfo.openid, | ||
| 347 | mp_id: this.mp_id, | ||
| 348 | keyname: 'legWidth', | ||
| 349 | keyvalue: legWidth | ||
| 350 | }); | ||
| 351 | } | ||
| 352 | }, | ||
| 306 | // 用户提交 | 353 | // 用户提交 |
| 307 | handleSubmit(){ | 354 | handleSubmit(){ |
| 308 | if(this.name==''){ | 355 | if(this.name==''){ |
| 309 | uni.showToast({ | 356 | uni.showToast({ |
| 310 | title:"请输入验光单取名", | 357 | title:"请输入验光单取名", |
| 311 | icon: "none", | 358 | icon: "none", |
| 312 | duration: 2000, | 359 | duration: 2000, |
| 313 | }) | 360 | }) |
| 314 | }else{ | 361 | }else{ |
| 315 | 362 | ||
| 316 | if(this.pd==''){ | 363 | if(this.pd==''){ |
| 317 | uni.showToast({ | 364 | uni.showToast({ |
| 318 | title:"请输入瞳距", | 365 | title:"请输入瞳距", |
| 319 | icon: "none", | 366 | icon: "none", |
| 320 | duration: 2000, | 367 | duration: 2000, |
| 321 | }) | 368 | }) |
| 322 | }else{ | 369 | }else{ |
| 323 | 370 | ||
| 324 | if(this.kinds==1){ | 371 | if(this.kinds==1){ |
| 325 | // 添加用户验光单 | 372 | // 添加用户验光单 |
| 326 | console.log('kinds====>',this.pickerInfoChioce.leftSph) | ||
| 327 | console.log('kinds====>',this.pickerInfoChioce.leftSph==Number) | ||
| 328 | console.log('kinds====>',this.pickerInfoChioce.rightSph==Number) | ||
| 329 | if(this.pickerInfoChioce.rightSph==''||this.pickerInfoChioce.leftSph==''|| | 373 | if(this.pickerInfoChioce.rightSph==''||this.pickerInfoChioce.leftSph==''|| |
| 330 | this.pickerInfoChioce.leftCyl==''||this.pickerInfoChioce.rightCyl==''|| | 374 | this.pickerInfoChioce.leftCyl==''||this.pickerInfoChioce.rightCyl==''|| |
| 331 | this.pickerInfoChioce.leftAxi==''||this.pickerInfoChioce.rightAxi=='' | 375 | this.pickerInfoChioce.leftAxi==''||this.pickerInfoChioce.rightAxi=='' ||!this.glassInfoRight |
| 332 | ){ | 376 | ){ |
| 333 | uni.showToast({ | 377 | uni.showToast({ |
| 334 | title:"请输入您的验光数据", | 378 | title:"请完善您的数据~", |
| 335 | icon: "none", | 379 | icon: "none", |
| 336 | duration: 2000, | 380 | duration: 2000, |
| 337 | }) | 381 | }) |
| 338 | }else{ | 382 | }else{ |
| 339 | if(this.confirm){ | 383 | if(this.confirm){ |
| 340 | store.dispatch('myLoveList/addMylove', { | 384 | store.dispatch('myLoveList/addMylove', { |
| 341 | uid: this.$store.state.user.userInfo.uid, | 385 | uid: this.$store.state.user.userInfo.uid, |
| 342 | openid: this.$store.state.user.userInfo.openid, | 386 | openid: this.$store.state.user.userInfo.openid, |
| 343 | // mp_name: this.$store.state.user.userInfo.mp_name, | 387 | // mp_name: this.$store.state.user.userInfo.mp_name, |
| 344 | leftSph: this.pickerInfoChioce.leftSph, | 388 | leftSph: this.pickerInfoChioce.leftSph, |
| 345 | rightSph: this.pickerInfoChioce.rightSph, | 389 | rightSph: this.pickerInfoChioce.rightSph, |
| 346 | leftCyl: this.pickerInfoChioce.leftCyl, | 390 | leftCyl: this.pickerInfoChioce.leftCyl, |
| 347 | rightCyl: this.pickerInfoChioce.rightCyl, | 391 | rightCyl: this.pickerInfoChioce.rightCyl, |
| 348 | leftAxi: this.pickerInfoChioce.leftAxi, | 392 | leftAxi: this.pickerInfoChioce.leftAxi, |
| 349 | rightAxi: this.pickerInfoChioce.rightAxi, | 393 | rightAxi: this.pickerInfoChioce.rightAxi, |
| 350 | pd: this.pd,// 瞳距 | 394 | pd: this.pd,// 瞳距 |
| 351 | mp_name:this.name, | 395 | mp_name:this.name, |
| 352 | glassWidth:this.glassInfo.glassWidth, | 396 | glassWidth:this.glassInfo.glassWidth, |
| 353 | norseWidth:this.glassInfo.norseWidth, | 397 | norseWidth:this.glassInfo.norseWidth, |
| 354 | legWidth:this.glassInfo.legWidth | 398 | legWidth:this.glassInfo.legWidth |
| 355 | // time: this.pickerInfoChioce.time, | 399 | // time: this.pickerInfoChioce.time, |
| 356 | // img_url2: "http://localhost:8087/images/shop_1/1/", | 400 | // img_url2: "http://localhost:8087/images/shop_1/1/", |
| 357 | }); | 401 | }); |
| 358 | // store.dispatch('myLoveList/getLoveList', { | ||
| 359 | // uid: this.$store.state.user.userInfo.uid, | ||
| 360 | // }); | ||
| 361 | uni.navigateBack({ | 402 | uni.navigateBack({ |
| 362 | delta:1, | 403 | delta:1, |
| 363 | animationDuration:2000 | 404 | animationDuration:2000 |
| 364 | }) | 405 | }) |
| 365 | |||
| 366 | } else{ | 406 | } else{ |
| 367 | uni.showToast({ | 407 | uni.showToast({ |
| 368 | title:"请确认您的验光数据", | 408 | title:"请确认您的验光数据", |
| 369 | icon: "none", | 409 | icon: "none", |
| 370 | duration: 3000, | 410 | duration: 3000, |
| 371 | }) | 411 | }) |
| 372 | } | 412 | } |
| 373 | |||
| 374 | } | 413 | } |
| 375 | |||
| 376 | } | 414 | } |
| 377 | if(this.kinds==2){ | 415 | if(this.kinds==2){ |
| 378 | // console.log('kinds====>',this.kinds) | ||
| 379 | // console.log('pickerindex=====>',this.pickerInfoList[0].nameIndex1) | ||
| 380 | // console.log('this.pickerInfoChioce====>',type(this.pickerInfoChioce)) | ||
| 381 | if(this.confirm){ | 416 | if(this.confirm){ |
| 382 | const leftList = ["leftSph","leftCyl","leftAxi"]; | 417 | const leftList = ["leftSph","leftCyl","leftAxi"]; |
| 383 | const rightList = ["rightSph", "rightCyl", "rightAxi"]; | 418 | const rightList = ["rightSph", "rightCyl", "rightAxi"]; |
| 384 | let flag=0; | 419 | let flag=0; |
| 385 | |||
| 386 | |||
| 387 | if(this.name!=this.oldname){ | 420 | if(this.name!=this.oldname){ |
| 388 | store.dispatch('myLoveList/updateMylove', { | 421 | store.dispatch('myLoveList/updateMylove', { |
| 389 | uid: this.$store.state.user.userInfo.uid, | 422 | uid: this.$store.state.user.userInfo.uid, |
| 390 | openid: this.$store.state.user.userInfo.openid, | 423 | openid: this.$store.state.user.userInfo.openid, |
| 391 | mp_id: this.mp_id, | 424 | mp_id: this.mp_id, |
| 392 | keyname: 'name', | 425 | keyname: 'name', |
| 393 | keyvalue: this.name, | 426 | keyvalue: this.name, |
| 394 | }); | 427 | }); |
| 395 | flag=1 | 428 | flag=1 |
| 396 | } | 429 | } |
| 397 | if(this.pd!=this.oldpd){ | 430 | if(this.pd!=this.oldpd){ |
| 398 | store.dispatch('myLoveList/updateMylove', { | 431 | store.dispatch('myLoveList/updateMylove', { |
| 399 | uid: this.$store.state.user.userInfo.uid, | 432 | uid: this.$store.state.user.userInfo.uid, |
| 400 | openid: this.$store.state.user.userInfo.openid, | 433 | openid: this.$store.state.user.userInfo.openid, |
| 401 | mp_id: this.mp_id, | 434 | mp_id: this.mp_id, |
| 402 | keyname: 'pd', | 435 | keyname: 'pd', |
| 403 | keyvalue: this.pd, | 436 | keyvalue: this.pd, |
| 404 | }); | 437 | }); |
| 405 | flag=1 | 438 | flag=1 |
| 406 | } | 439 | } |
| 407 | // 先验证是否有改动项, | 440 | // 先验证是否有改动项, |
| 408 | for (let j=0; j<3; j++) { | 441 | for (let j=0; j<3; j++) { |
| 409 | if(this.pickerInfoList[j].nameIndex1!=0||this.pickerInfoList[j].nameIndex2!=0){ | 442 | if(this.pickerInfoList[j].nameIndex1!=0||this.pickerInfoList[j].nameIndex2!=0){ |
| 410 | if(this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1]!=''&& | 443 | if(this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1]!=''&& |
| 411 | this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2]!=''){ | 444 | this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2]!=''){ |
| 412 | if(this.pickerInfoList[j].nameIndex1!=0){ | 445 | if(this.pickerInfoList[j].nameIndex1!=0){ |
| 413 | store.dispatch('myLoveList/updateMylove', { | 446 | store.dispatch('myLoveList/updateMylove', { |
| 414 | uid: this.$store.state.user.userInfo.uid, | 447 | uid: this.$store.state.user.userInfo.uid, |
| 415 | openid: this.$store.state.user.userInfo.openid, | 448 | openid: this.$store.state.user.userInfo.openid, |
| 416 | mp_id: this.mp_id, | 449 | mp_id: this.mp_id, |
| 417 | keyname: leftList[j], | 450 | keyname: leftList[j], |
| 418 | keyvalue: this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1], | 451 | keyvalue: this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1], |
| 419 | }); | 452 | }); |
| 420 | } | 453 | } |
| 421 | if(this.pickerInfoList[j].nameIndex2!=0){ | 454 | if(this.pickerInfoList[j].nameIndex2!=0){ |
| 422 | store.dispatch('myLoveList/updateMylove', { | 455 | store.dispatch('myLoveList/updateMylove', { |
| 423 | uid: this.$store.state.user.userInfo.uid, | 456 | uid: this.$store.state.user.userInfo.uid, |
| 424 | openid: this.$store.state.user.userInfo.openid, | 457 | openid: this.$store.state.user.userInfo.openid, |
| 425 | mp_id: this.mp_id, | 458 | mp_id: this.mp_id, |
| 426 | keyname: rightList[j], | 459 | keyname: rightList[j], |
| 427 | keyvalue: this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2] | 460 | keyvalue: this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2] |
| 428 | }); | 461 | }); |
| 429 | } | 462 | } |
| 430 | flag=1; | 463 | flag=1; |
| 431 | } else{ | 464 | } else{ |
| 432 | flag=0; | 465 | flag=0; |
| 433 | uni.showToast({ | 466 | uni.showToast({ |
| 434 | title:"请输入您的验光数据", | 467 | title:"请输入您的验光数据", |
| 435 | icon: "none", | 468 | icon: "none", |
| 436 | duration: 2000, | 469 | duration: 2000, |
| 437 | }) | 470 | }) |
| 438 | 471 | ||
| 439 | } | 472 | } |
| 440 | } | 473 | } |
| 441 | 474 | ||
| 442 | } | 475 | } |
| 476 | this.updateMylove() | ||
| 477 | flag=1 | ||
| 443 | if(flag!=0){ | 478 | if(flag!=0){ |
| 444 | store.dispatch('myLoveList/getLoveList', { | ||
| 445 | uid: this.$store.state.user.userInfo.uid, | ||
| 446 | }); | ||
| 447 | uni.navigateBack({ | 479 | uni.navigateBack({ |
| 448 | delta:1, | 480 | delta:1, |
| 449 | animationDuration:2000 | 481 | animationDuration:2000 |
| 450 | }) | 482 | }) |
| 451 | } | 483 | } |
| 452 | |||
| 453 | } else{ | 484 | } else{ |
| 454 | uni.showToast({ | 485 | uni.showToast({ |
| 455 | title:"请确认您的验光数据", | 486 | title:"请确认您的验光数据", |
| 456 | icon: "none", | 487 | icon: "none", |
| 457 | duration: 3000, | 488 | duration: 3000, |
| 458 | }) | 489 | }) |
| 459 | } | 490 | } |
| 460 | |||
| 461 | } | 491 | } |
| 462 | |||
| 463 | |||
| 464 | } | 492 | } |
| 465 | |||
| 466 | } | 493 | } |
| 467 | |||
| 468 | }, | 494 | }, |
| 469 | changeConfirm() { | 495 | changeConfirm() { |
| 470 | this.confirm = !this.confirm | 496 | this.confirm = !this.confirm |
| 471 | }, | 497 | }, |
| 472 | 498 | ||
| 473 | bindPickerChange01: function(e) { | 499 | bindPickerChange01: function(e) { |
| 474 | this.pickerInfoList[0].nameIndex1 = e.target.value | 500 | this.pickerInfoList[0].nameIndex1 = e.target.value |
| 475 | this.pickerInfoChioce.leftSph=this.pickerInfoList[0].nameArray1[e.target.value] | 501 | this.pickerInfoChioce.leftSph=this.pickerInfoList[0].nameArray1[e.target.value] |
| 476 | }, | 502 | }, |
| 477 | bindPickerChange02: function(e) { | 503 | bindPickerChange02: function(e) { |
| 478 | this.pickerInfoList[0].nameIndex2 = e.target.value | 504 | this.pickerInfoList[0].nameIndex2 = e.target.value |
| 479 | this.pickerInfoChioce.rightSph=this.pickerInfoList[0].nameArray2[e.target.value] | 505 | this.pickerInfoChioce.rightSph=this.pickerInfoList[0].nameArray2[e.target.value] |
| 480 | }, | 506 | }, |
| 481 | 507 | ||
| 482 | bindPickerChange11: function(e) { | 508 | bindPickerChange11: function(e) { |
| 483 | this.pickerInfoList[1].nameIndex1 = e.target.value | 509 | this.pickerInfoList[1].nameIndex1 = e.target.value |
| 484 | this.pickerInfoChioce.leftCyl=this.pickerInfoList[1].nameArray1[e.target.value] | 510 | this.pickerInfoChioce.leftCyl=this.pickerInfoList[1].nameArray1[e.target.value] |
| 485 | }, | 511 | }, |
| 486 | bindPickerChange12: function(e) { | 512 | bindPickerChange12: function(e) { |
| 487 | this.pickerInfoList[1].nameIndex2 = e.target.value | 513 | this.pickerInfoList[1].nameIndex2 = e.target.value |
| 488 | this.pickerInfoChioce.rightCyl=this.pickerInfoList[1].nameArray2[e.target.value] | 514 | this.pickerInfoChioce.rightCyl=this.pickerInfoList[1].nameArray2[e.target.value] |
| 489 | }, | 515 | }, |
| 490 | 516 | ||
| 491 | bindPickerChange21: function(e) { | 517 | bindPickerChange21: function(e) { |
| 492 | this.pickerInfoList[2].nameIndex1 = e.target.value | 518 | this.pickerInfoList[2].nameIndex1 = e.target.value |
| 493 | this.pickerInfoChioce.leftAxi=this.pickerInfoList[2].nameArray1[e.target.value] | 519 | this.pickerInfoChioce.leftAxi=this.pickerInfoList[2].nameArray1[e.target.value] |
| 494 | }, | 520 | }, |
| 495 | bindPickerChange22: function(e) { | 521 | bindPickerChange22: function(e) { |
| 496 | this.pickerInfoList[2].nameIndex2 = e.target.value | 522 | this.pickerInfoList[2].nameIndex2 = e.target.value |
| 497 | this.pickerInfoChioce.rightAxi=this.pickerInfoList[2].nameArray2[e.target.value] | 523 | this.pickerInfoChioce.rightAxi=this.pickerInfoList[2].nameArray2[e.target.value] |
| 498 | }, | 524 | }, |
| 499 | 525 | ||
| 500 | bindPickerChange41: function(e) { | 526 | bindPickerChange41: function(e) { |
| 501 | this.pickerInfoList[3].nameIndex1 = e.target.value | 527 | this.pickerInfoList[3].nameIndex1 = e.target.value |
| 502 | this.pickerInfoChioce.time.year=this.pickerInfoList[3].nameArray1[e.target.value] | 528 | this.pickerInfoChioce.time.year=this.pickerInfoList[3].nameArray1[e.target.value] |
| 503 | }, | 529 | }, |
| 504 | bindPickerChange42: function(e) { | 530 | bindPickerChange42: function(e) { |
| 505 | this.pickerInfoList[3].nameIndex2 = e.target.value | 531 | this.pickerInfoList[3].nameIndex2 = e.target.value |
| 506 | this.pickerInfoChioce.time.month=this.pickerInfoList[3].nameArray2[e.target.value] | 532 | this.pickerInfoChioce.time.month=this.pickerInfoList[3].nameArray2[e.target.value] |
| 507 | }, | 533 | }, |
| 508 | bindPickerChange43: function(e) { | 534 | bindPickerChange43: function(e) { |
| 509 | this.pickerInfoList[3].nameIndex3 = e.target.value | 535 | this.pickerInfoList[3].nameIndex3 = e.target.value |
| 510 | this.pickerInfoChioce.time.day=this.pickerInfoList[3].nameArray3[e.target.value] | 536 | this.pickerInfoChioce.time.day=this.pickerInfoList[3].nameArray3[e.target.value] |
| 511 | }, | 537 | }, |
| 512 | } | 538 | } |
| 513 | } | 539 | } |
| 514 | </script> | 540 | </script> |
| 515 | 541 | ||
| 516 | <style lang="scss"> | 542 | <style lang="scss"> |
| 517 | .wrap{ | 543 | .wrap{ |
| 518 | min-height: 100vh; | 544 | min-height: 100vh; |
| 519 | background-color: #F2F2F2; | 545 | background-color: #F2F2F2; |
| 520 | .body{ | 546 | .body{ |
| 521 | // font-family: PingFangSC-Regular; | 547 | // font-family: PingFangSC-Regular; |
| 522 | font-size: 12px; | 548 | font-size: 12px; |
| 523 | color: #666666; | 549 | color: #666666; |
| 524 | letter-spacing: 0; | 550 | letter-spacing: 0; |
| 525 | .bodyBox{ | 551 | .bodyBox{ |
| 526 | margin-top: 15px; | 552 | margin-top: 15px; |
| 527 | .names{ | 553 | .names{ |
| 528 | // font-family: PingFangSC-Regular; | 554 | // font-family: PingFangSC-Regular; |
| 529 | font-size: 12px; | 555 | font-size: 12px; |
| 530 | color: #151515; | 556 | color: #151515; |
| 531 | letter-spacing: 0; | 557 | letter-spacing: 0; |
| 532 | text-align: justify; | 558 | text-align: justify; |
| 533 | line-height: 17px; | 559 | line-height: 17px; |
| 534 | margin-left: 5px; | 560 | margin-left: 5px; |
| 535 | margin-right: 10px; | 561 | margin-right: 10px; |
| 536 | } | 562 | } |
| 537 | text{ | 563 | text{ |
| 538 | // font-family: PingFangSC-Regular; | 564 | // font-family: PingFangSC-Regular; |
| 539 | font-size: 12px; | 565 | font-size: 12px; |
| 540 | color: #666666; | 566 | color: #666666; |
| 541 | letter-spacing: 0; | 567 | letter-spacing: 0; |
| 542 | text-align: justify; | 568 | text-align: justify; |
| 543 | } | 569 | } |
| 544 | } | 570 | } |
| 545 | 571 | ||
| 546 | } | 572 | } |
| 547 | .goods-form { | 573 | .goods-form { |
| 548 | display: flex; | 574 | display: flex; |
| 549 | flex-direction: column; | 575 | flex-direction: column; |
| 550 | align-items: center; | 576 | align-items: center; |
| 551 | justify-content: center; | 577 | justify-content: center; |
| 552 | background-color: #fff; | 578 | background-color: #fff; |
| 553 | width: 100%; | 579 | width: 100%; |
| 554 | padding: 40rpx 0; | 580 | padding: 40rpx 0; |
| 555 | .p1 { | 581 | .p1 { |
| 556 | font-size: 16px; | 582 | font-size: 16px; |
| 557 | color: #333333; | 583 | color: #333333; |
| 558 | letter-spacing: -0.3px; | 584 | letter-spacing: -0.3px; |
| 559 | text-align: justify; | 585 | text-align: justify; |
| 560 | line-height: 24px; | 586 | line-height: 24px; |
| 561 | margin: 4px 0; | 587 | margin: 4px 0; |
| 562 | 588 | ||
| 563 | } | 589 | } |
| 564 | .p2 { | 590 | .p2 { |
| 565 | font-size: 12px; | 591 | font-size: 12px; |
| 566 | color: #999999; | 592 | color: #999999; |
| 567 | letter-spacing: -0.23px; | 593 | letter-spacing: -0.23px; |
| 568 | margin-bottom: 32rpx; | 594 | margin-bottom: 32rpx; |
| 569 | } | 595 | } |
| 570 | .image2{ | 596 | .image2{ |
| 571 | width: 42rpx; | 597 | width: 42rpx; |
| 572 | height: 34rpx; | 598 | height: 34rpx; |
| 573 | margin-right: 12rpx; | 599 | margin-right: 12rpx; |
| 574 | } | 600 | } |
| 575 | .confirm { | 601 | .confirm { |
| 576 | display: flex; | 602 | display: flex; |
| 577 | align-items: center; | 603 | align-items: center; |
| 578 | font-size: 12px; | 604 | font-size: 12px; |
| 579 | color: #666666; | 605 | color: #666666; |
| 580 | letter-spacing: -0.23px; | 606 | letter-spacing: -0.23px; |
| 581 | width: 684rpx; | 607 | width: 684rpx; |
| 582 | .image1{ | 608 | .image1{ |
| 583 | margin-right:25rpx; | 609 | margin-right:25rpx; |
| 584 | width: 42rpx; | 610 | width: 42rpx; |
| 585 | height: 38rpx; | 611 | height: 38rpx; |
| 586 | } | 612 | } |
| 587 | } | 613 | } |
| 588 | .picker{ | 614 | .picker{ |
| 589 | display: flex; | 615 | display: flex; |
| 590 | flex-direction: column; | 616 | flex-direction: column; |
| 591 | justify-content: center; | 617 | justify-content: center; |
| 592 | align-items: center; | 618 | align-items: center; |
| 593 | width: 100%; | 619 | width: 100%; |
| 594 | 620 | ||
| 595 | .picker-choice{ | 621 | .picker-choice{ |
| 596 | display: flex; | 622 | display: flex; |
| 597 | width: 684rpx; | 623 | width: 684rpx; |
| 598 | align-items: center; | 624 | align-items: center; |
| 599 | margin-bottom: 40rpx; | 625 | margin-bottom: 40rpx; |
| 600 | .input{ | 626 | .input{ |
| 601 | border-bottom: 1px solid #CFCFCF; | 627 | border-bottom: 1px solid #CFCFCF; |
| 602 | height: 40rpx; | 628 | height: 40rpx; |
| 603 | } | 629 | } |
| 604 | .choice-left{ | 630 | .choice-left{ |
| 605 | width: 210rpx; | 631 | width: 210rpx; |
| 606 | .pd{ | 632 | .pd{ |
| 607 | font-size: 14px; | 633 | font-size: 14px; |
| 608 | color: #333333; | 634 | color: #333333; |
| 609 | letter-spacing: -0.26px; | 635 | letter-spacing: -0.26px; |
| 610 | text-align: justify; | 636 | text-align: justify; |
| 611 | line-height: 24px; | 637 | line-height: 24px; |
| 612 | margin-right: 44rpx; | 638 | margin-right: 44rpx; |
| 613 | } | 639 | } |
| 614 | .p11 { | 640 | .p11 { |
| 615 | font-size: 14px; | 641 | font-size: 14px; |
| 616 | color: #333333; | 642 | color: #333333; |
| 617 | letter-spacing: -0.26px; | 643 | letter-spacing: -0.26px; |
| 618 | text-align: justify; | 644 | text-align: justify; |
| 619 | line-height: 24px; | 645 | line-height: 24px; |
| 620 | // margin-right: 10px; | 646 | // margin-right: 10px; |
| 621 | } | 647 | } |
| 622 | .p12 { | 648 | .p12 { |
| 623 | font-size: 10px; | 649 | font-size: 10px; |
| 624 | color: #3F3F3F; | 650 | color: #3F3F3F; |
| 625 | letter-spacing: -0.19px; | 651 | letter-spacing: -0.19px; |
| 626 | text-align: justify; | 652 | text-align: justify; |
| 627 | line-height: 24px; | 653 | line-height: 24px; |
| 628 | } | 654 | } |
| 629 | 655 | ||
| 630 | 656 | ||
| 631 | } | 657 | } |
| 632 | .p13 { | 658 | .p13 { |
| 633 | font-size: 10px; | 659 | font-size: 10px; |
| 634 | color: #999999; | 660 | color: #999999; |
| 635 | letter-spacing: -0.19px; | 661 | letter-spacing: -0.19px; |
| 636 | margin-right: 10px; | 662 | margin-right: 10px; |
| 637 | } | 663 | } |
| 638 | .p13-date { | 664 | .p13-date { |
| 639 | font-size: 10px; | 665 | font-size: 10px; |
| 640 | color: #999999; | 666 | color: #999999; |
| 641 | letter-spacing: -0.19px; | 667 | letter-spacing: -0.19px; |
| 642 | margin-right: 5px; | 668 | margin-right: 5px; |
| 643 | } | 669 | } |
| 644 | picker{ | 670 | picker{ |
| 645 | width: 144rpx; | 671 | width: 144rpx; |
| 646 | height: 40rpx; | 672 | height: 40rpx; |
| 647 | display: flex; | 673 | display: flex; |
| 648 | position: relative; | 674 | position: relative; |
| 649 | .p14 { | 675 | .p14 { |
| 650 | font-size: 14px; | 676 | font-size: 14px; |
| 651 | color: #666666; | 677 | color: #666666; |
| 652 | letter-spacing: -0.26px; | 678 | letter-spacing: -0.26px; |
| 653 | text-align: center; | 679 | text-align: center; |
| 654 | width: 124rpx; | 680 | width: 124rpx; |
| 655 | border-bottom: 1px solid #CFCFCF; | 681 | border-bottom: 1px solid #CFCFCF; |
| 656 | height: 38rpx; | 682 | height: 38rpx; |
| 657 | } | 683 | } |
| 658 | image{ | 684 | image{ |
| 659 | width: 20rpx; | 685 | width: 20rpx; |
| 660 | height: 20rpx; | 686 | height: 20rpx; |
| 661 | position: absolute; | 687 | position: absolute; |
| 662 | right: 20rpx; | 688 | right: 20rpx; |
| 663 | top: 8rpx; | 689 | top: 8rpx; |
| 664 | } | 690 | } |
| 665 | } | 691 | } |
| 666 | 692 | ||
| 667 | 693 | ||
| 668 | } | 694 | } |
| 669 | } | 695 | } |
| 670 | .ipts{ | 696 | .ipts{ |
| 671 | width: 100%; | 697 | width: 100%; |
| 672 | display: flex; | 698 | display: flex; |
| 673 | flex-direction: column; | 699 | flex-direction: column; |
| 674 | justify-content: center; | 700 | justify-content: center; |
| 675 | align-items: flex-start; | 701 | align-items: flex-start; |
| 676 | padding: 20rpx 36rpx; | 702 | padding: 20rpx 36rpx; |
| 677 | box-sizing: border-box; | 703 | box-sizing: border-box; |
| 678 | .inputItem{ | 704 | .inputItem{ |
| 679 | display: flex; | 705 | display: flex; |
| 680 | flex-direction: row; | 706 | flex-direction: row; |
| 681 | justify-content: center; | 707 | justify-content: center; |
| 682 | align-items: center; | 708 | align-items: center; |
| 683 | margin-bottom: 36rpx; | 709 | margin-bottom: 36rpx; |
| 684 | .text{ | 710 | .text{ |
| 685 | margin-right: 100rpx; | 711 | margin-right: 100rpx; |
| 686 | } | 712 | } |
| 687 | .input{ | 713 | .input{ |
| 688 | border-bottom: 1px solid #CFCFCF; | 714 | border-bottom: 1px solid #CFCFCF; |